Skip to content

Commit

Permalink
Fix Wayland driver compilation on 9.0-rc1 and newer
Browse files Browse the repository at this point in the history
  • Loading branch information
Kron4ek committed Dec 20, 2023
1 parent 7f4b903 commit e73e7c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build_wine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export CROSSCXXFLAGS="${CROSSCFLAGS_X32}"

mkdir "${BUILD_DIR}"/build32-tools
cd "${BUILD_DIR}"/build32-tools || exit
PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig ${BWRAP32} "${BUILD_DIR}"/wine/configure ${WINE_BUILD_OPTIONS} --prefix "${BUILD_DIR}"/wine-"${BUILD_NAME}"-x86
PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib/i386-linux-gnu/pkgconfig ${BWRAP32} "${BUILD_DIR}"/wine/configure ${WINE_BUILD_OPTIONS} --prefix "${BUILD_DIR}"/wine-"${BUILD_NAME}"-x86
${BWRAP32} make -j$(nproc)
${BWRAP32} make install

Expand All @@ -374,7 +374,7 @@ export CROSSCXXFLAGS="${CROSSCFLAGS_X64}"

mkdir "${BUILD_DIR}"/build32
cd "${BUILD_DIR}"/build32 || exit
PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig ${BWRAP32} "${BUILD_DIR}"/wine/configure --with-wine64="${BUILD_DIR}"/build64 --with-wine-tools="${BUILD_DIR}"/build32-tools ${WINE_BUILD_OPTIONS} --prefix "${BUILD_DIR}"/wine-${BUILD_NAME}-amd64
PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib/i386-linux-gnu/pkgconfig ${BWRAP32} "${BUILD_DIR}"/wine/configure --with-wine64="${BUILD_DIR}"/build64 --with-wine-tools="${BUILD_DIR}"/build32-tools ${WINE_BUILD_OPTIONS} --prefix "${BUILD_DIR}"/wine-${BUILD_NAME}-amd64
${BWRAP32} make -j$(nproc)
${BWRAP32} make install

Expand Down
11 changes: 11 additions & 0 deletions create_ubuntu_bootstraps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ create_build_scripts () {
vulkan_loader_version="1.3.239"
spirv_headers_version="sdk-1.3.239.0"
libpcap_version="1.10.4"
libxkbcommon_version="1.6.0"

cat <<EOF > "${MAINDIR}"/prepare_chroot.sh
#!/bin/bash
Expand Down Expand Up @@ -100,9 +101,13 @@ apt-get -y install ccache gcc-9 g++-9 wget git gcc-mingw-w64 g++-mingw-w64
apt-get -y install libxpresent-dev libjxr-dev libusb-1.0-0-dev libgcrypt20-dev libpulse-dev libudev-dev libsane-dev libv4l-dev libkrb5-dev libgphoto2-dev liblcms2-dev libcapi20-dev
apt-get -y install libjpeg62-dev samba-dev
apt-get -y install libpcsclite-dev libcups2-dev
apt-get -y install python3-pip libxcb-xkb-dev
apt-get -y purge libvulkan-dev libvulkan1 libsdl2-dev libsdl2-2.0-0 libpcap0.8-dev libpcap0.8 --purge --autoremove
apt-get -y clean
apt-get -y autoclean
pip3 install meson
pip3 install ninja
export PATH="/usr/local/bin:${PATH}"
mkdir /opt/build_libs
cd /opt/build_libs
wget -O sdl.tar.gz https://www.libsdl.org/release/SDL2-${sdl2_version}.tar.gz
Expand All @@ -111,6 +116,7 @@ wget -O vulkan-loader.tar.gz https://github.com/KhronosGroup/Vulkan-Loader/archi
wget -O vulkan-headers.tar.gz https://github.com/KhronosGroup/Vulkan-Headers/archive/v${vulkan_headers_version}.tar.gz
wget -O spirv-headers.tar.gz https://github.com/KhronosGroup/SPIRV-Headers/archive/${spirv_headers_version}.tar.gz
wget -O libpcap.tar.gz https://www.tcpdump.org/release/libpcap-${libpcap_version}.tar.gz
wget -O libxkbcommon.tar.xz https://xkbcommon.org/download/libxkbcommon-${libxkbcommon_version}.tar.xz
if [ -d /usr/lib/i386-linux-gnu ]; then wget -O wine.deb https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-i386/wine-stable_4.0.3~bionic_i386.deb; fi
if [ -d /usr/lib/x86_64-linux-gnu ]; then wget -O wine.deb https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-amd64/wine-stable_4.0.3~bionic_amd64.deb; fi
git clone git://source.winehq.org/git/vkd3d.git
Expand All @@ -120,6 +126,7 @@ tar xf vulkan-loader.tar.gz
tar xf vulkan-headers.tar.gz
tar xf spirv-headers.tar.gz
tar xf libpcap.tar.gz
tar xf libxkbcommon.tar.xz
export CFLAGS="-O2"
export CXXFLAGS="-O2"
mkdir build && cd build
Expand All @@ -141,6 +148,10 @@ cd ../ && rm -r build && mkdir build && cd build
../vkd3d/configure && make -j$(nproc) && make install
cd ../ && rm -r build && mkdir build && cd build
../libpcap-${libpcap_version}/configure && make -j$(nproc) install
cd ../libxkbcommon-${libxkbcommon_version}
meson setup build -Denable-docs=false
meson compile -C build
meson install -C build
cd /opt && rm -r /opt/build_libs
EOF

Expand Down

0 comments on commit e73e7c6

Please sign in to comment.