summaryrefslogtreecommitdiff
path: root/repo/wine
diff options
context:
space:
mode:
Diffstat (limited to 'repo/wine')
-rw-r--r--repo/wine/rpath.patch57
-rw-r--r--repo/wine/wine.xibuild64
2 files changed, 121 insertions, 0 deletions
diff --git a/repo/wine/rpath.patch b/repo/wine/rpath.patch
new file mode 100644
index 0000000..68b2558
--- /dev/null
+++ b/repo/wine/rpath.patch
@@ -0,0 +1,57 @@
+diff --git a/configure b/configure
+index 774a95ce003..d408e77cc78 100755
+--- a/configure
++++ b/configure
+@@ -11137,6 +11137,38 @@ fi
+ LIBWINE_DEPENDS="wine.map"
+
+ TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.so.$libwine_version libs/wine/libwine.so.$libwine_soversion"
++
++ # do this at the end because it needs double dollar for makefile
++ as_ac_var=`printf "%s\n" "ac_cv_cflags_-Wl,-rpath,\\\\\\$ORIGIN" | $as_tr_sh`
++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-rpath,\\\$ORIGIN" >&5
++printf %s "checking whether the compiler supports -Wl,-rpath,\\\$ORIGIN... " >&6; }
++if eval test \${$as_ac_var+y}
++then :
++ printf %s "(cached) " >&6
++else $as_nop
++ ac_wine_try_cflags_saved=$CFLAGS
++CFLAGS="$CFLAGS -Wl,-rpath,\\\$ORIGIN"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++int main(int argc, char **argv) { return 0; }
++_ACEOF
++if ac_fn_c_try_link "$LINENO"
++then :
++ eval "$as_ac_var=yes"
++else $as_nop
++ eval "$as_ac_var=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.beam \
++ conftest$ac_exeext conftest.$ac_ext
++CFLAGS=$ac_wine_try_cflags_saved
++fi
++eval ac_res=\$$as_ac_var
++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++printf "%s\n" "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_var"\" = x"yes"
++then :
++ UNIXLDFLAGS="$UNIXLDFLAGS '-Wl,-rpath,\$\$ORIGIN'"
++fi
+ ;;
+ esac
+
+diff --git a/configure.ac b/configure.ac
+index 8c5066a3de6..01ede86df1e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -916,6 +916,9 @@ case $host_os in
+ AC_SUBST(LIBWINE_SHAREDLIB,"libwine.so.$libwine_version")
+ AC_SUBST(LIBWINE_DEPENDS,"wine.map")
+ TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.so.$libwine_version libs/wine/libwine.so.$libwine_soversion"
++
++ # do this at the end because it needs double dollar for makefile
++ WINE_TRY_CFLAGS([-Wl,-rpath,\\\$ORIGIN],[UNIXLDFLAGS="$UNIXLDFLAGS '-Wl,-rpath,\$\$ORIGIN'"])
+ ;;
+ esac
+
diff --git a/repo/wine/wine.xibuild b/repo/wine/wine.xibuild
new file mode 100644
index 0000000..88c16ef
--- /dev/null
+++ b/repo/wine/wine.xibuild
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+NAME="wine"
+DESC="A compatibility layer for running Windows programs"
+
+MAKEDEPS=" alsa-lib autoconf automake bison cups dbus flex fontconfig freetype giflib gnutls gstreamer gst-plugins-base krb5 libgphoto2 libpcap libusb libxcomposite libxcursor libxdamage libxi libxinerama libxrandr libxrender mesa mingw-w64-gcc mpg123 ncurses openal-soft opencl sane sdl2 udisks2 v4l-utils vkd3d vulkan-loader"
+
+PKG_VER=7.18
+SOURCE="https://dl.winehq.org/wine/source/7.x/wine-$PKG_VER.tar.xz"
+
+ADDITIONAL="
+rpath.patch
+"
+
+prepare() {
+ apply_patches
+ # fix opencl header detection
+ sed 's|OpenCL/opencl.h|CL/opencl.h|g' -i configure*
+}
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-dbus \
+ --without-ldap \
+ --with-mingw \
+ --with-x \
+ --with-vulkan \
+ --enable-win64
+ make LDFLAGS="$LDFLAGS $_no_pie" tools/winedump/winedump
+ make
+}
+
+check() {
+ xvfb-run make test
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+
+ install -Dm755 tools/wineapploader \
+ "$PKG_DEST"/usr/bin/wineapploader
+
+ local file
+ for file in msiexec notepad regedit regsvr32 wineboot \
+ winecfg wineconsole winefile winemine winepath
+ do
+ rm "$PKG_DEST"/usr/bin/$file
+ ln -sf /usr/bin/wineapploader "$PKG_DEST"/usr/bin/$file
+ done
+
+ case "$CARCH" in
+ x86_64)
+ x86_64-w64-mingw32-strip --strip-unneeded "$PKG_DEST"/usr/lib/wine/x86_64-windows/*.dll
+ ;;
+ x86)
+ i686-w64-mingw32-strip --strip-unneeded "$PKG_DEST"/usr/lib/wine/i386-windows/*.dll
+ ;;
+ esac
+}
+