summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-14 17:28:17 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-14 17:28:17 -0500
commit1fdd6e1d01436611217b6738fdc997e5af4a342b (patch)
tree7233fab85c1462915350a5cf30124f4d6438c290 /user
parentb7c1783e11101b34e7014a1bcdfd41f9673a6a10 (diff)
downloadpackages-1fdd6e1d01436611217b6738fdc997e5af4a342b.tar.gz
packages-1fdd6e1d01436611217b6738fdc997e5af4a342b.tar.bz2
packages-1fdd6e1d01436611217b6738fdc997e5af4a342b.tar.xz
packages-1fdd6e1d01436611217b6738fdc997e5af4a342b.zip
move consolekit2, py*, wine to user/
Diffstat (limited to 'user')
-rw-r--r--user/consolekit2/0001-busybox-reboot-and-poweroff-support.patch40
-rw-r--r--user/consolekit2/APKBUILD63
-rw-r--r--user/consolekit2/ac_disable_static.patch13
-rw-r--r--user/consolekit2/add-listseats.patch100
-rw-r--r--user/consolekit2/consolekit2.initd9
-rw-r--r--user/consolekit2/pam-foreground-compat.ck17
-rw-r--r--user/py-mako/APKBUILD51
-rw-r--r--user/py3-lxml/APKBUILD27
-rw-r--r--user/wine/APKBUILD139
-rw-r--r--user/wine/no-pie.patch14
-rw-r--r--user/wine/nopie.patch10
-rw-r--r--user/wine/winhlp32-flex.patch9
12 files changed, 492 insertions, 0 deletions
diff --git a/user/consolekit2/0001-busybox-reboot-and-poweroff-support.patch b/user/consolekit2/0001-busybox-reboot-and-poweroff-support.patch
new file mode 100644
index 000000000..2db9f032b
--- /dev/null
+++ b/user/consolekit2/0001-busybox-reboot-and-poweroff-support.patch
@@ -0,0 +1,40 @@
+From 5e557dd212657f7e75a0c4bd70d11ca06ccb3f84 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 4 Apr 2011 18:46:25 +0000
+Subject: [PATCH] busybox reboot and poweroff support
+
+---
+ tools/linux/ck-system-restart | 3 +++
+ tools/linux/ck-system-stop | 3 +++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/tools/linux/ck-system-restart b/tools/linux/ck-system-restart
+index 8e0664e..5cabb3d 100755
+--- a/tools/linux/ck-system-restart
++++ b/tools/linux/ck-system-restart
+@@ -7,6 +7,9 @@ if [ -x "/sbin/shutdown" ] ; then
+ elif [ -x "/usr/sbin/shutdown" ] ; then
+ /usr/sbin/shutdown -r now
+ exit $?
++elif [ -x "/sbin/reboot" ]; then
++ /sbin/reboot
++ exit $?
+ else
+ exit 1
+ fi
+diff --git a/tools/linux/ck-system-stop b/tools/linux/ck-system-stop
+index e26bca3..a0be3ac 100755
+--- a/tools/linux/ck-system-stop
++++ b/tools/linux/ck-system-stop
+@@ -7,6 +7,9 @@ if [ -x "/sbin/shutdown" ] ; then
+ elif [ -x "/usr/sbin/shutdown" ] ; then
+ /usr/sbin/shutdown -h now
+ exit $?
++elif [ -x "/sbin/poweroff" ] ; then
++ /sbin/poweroff
++ exit $?
+ else
+ exit 1
+ fi
+--
+1.7.4.2
diff --git a/user/consolekit2/APKBUILD b/user/consolekit2/APKBUILD
new file mode 100644
index 000000000..3273092ed
--- /dev/null
+++ b/user/consolekit2/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Bart Ribbers <bribbers@disroot.org>
+# Maintainer: Bart Ribbers <bribbers@disroot.org>
+pkgbase=ConsoleKit2
+pkgname=consolekit2
+pkgver=1.2.0
+pkgrel=6
+pkgdesc="A framework for defining and tracking users, login sessions, and seats"
+provides="consolekit=$pkgver"
+replaces=consolekit
+arch=all
+url="https://consolekit2.github.io/ConsoleKit2"
+license=GPL2
+depends="polkit eudev"
+makedepends="git automake autoconf gettext-dev glib-dev zlib-dev libxslt-dev
+ polkit-dev eudev-dev libdrm-dev libnih-dev libtool linux-pam-dev
+ xorg-server-dev acl-dev xmlto docbook-xml libevdev-dev"
+checkdepends="libxml2-utils"
+source="$pkgname-$pkgver.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz
+ consolekit2.initd
+ ac_disable_static.patch
+ 0001-busybox-reboot-and-poweroff-support.patch
+ add-listseats.patch
+ pam-foreground-compat.ck"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-openrc"
+builddir="$srcdir"/$pkgbase-$pkgver
+
+prepare() {
+ default_prepare
+
+ cd "$builddir"
+
+ NOCONFIGURE=1 ./autogen.sh
+}
+
+build() {
+ cd "$builddir"
+ XMLTO_FLAGS='--skip-validation' ./configure \
+ --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --disable-static --enable-pam-module --enable-udev-acl \
+ --enable-tests --enable-docbook-docs --enable-polkit
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ install -m 755 "$srcdir"/pam-foreground-compat.ck \
+ "$pkgdir"/usr/lib/ConsoleKit/run-session.d/
+ install -D -m755 "$srcdir"/consolekit2.initd \
+ "$pkgdir"/etc/init.d/consolekit
+}
+sha512sums="30f2ceec14044669f40676e9b17513874350e2b70f0a918be934f7e64309c8595dbec4ac0937044c98dda51eb97c99443dc9d1de33f08365d72da8600296ad78 consolekit2-1.2.0.tar.gz
+8c16c452707475bdd4a50d3ade367d52ad92a6560be48b4e21e5b5eadef6e56c39d3d03d3a64f9b45a59eca50179cf5aa9c11978904d5d101db7498fb9bc0339 consolekit2.initd
+0f628fd1589b1790ad9adcb2278de504b75cc6b4ec7284a1cbda44ebd34b9966014989f47f343cb936d8503acc4eeec43ddff07cb11f55388e47256b8420e2e8 ac_disable_static.patch
+ec0c88e640afac0561c84131d63fa8c9e2e29611b789ae5c163cd11465b22017602d88dc853866624f57bce2ee466ab63af075d083a9ba6e87327ad8d0a0769f 0001-busybox-reboot-and-poweroff-support.patch
+c2adfad3f7f6d5f880e0b7e7ed99f62bd7f2bd510492bba5634f0b2391bacd43cb3246a072400392c508d42acdba114cb920f5d498b0c4339d86cf19f691b6fa add-listseats.patch
+3b114fbbe74cfba0bfd4dad0eb1b85d08b4979a998980c1cbcd7f44b8a16b0ceca224680d4f4a1644cd24698f8817e5e8bdfcdc4ead87a122d0e323142f47910 pam-foreground-compat.ck"
diff --git a/user/consolekit2/ac_disable_static.patch b/user/consolekit2/ac_disable_static.patch
new file mode 100644
index 000000000..38d6f12ac
--- /dev/null
+++ b/user/consolekit2/ac_disable_static.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 071a0d8..7469697 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,7 +30,6 @@ AC_SEARCH_LIBS([strerror],[cposix])
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+ AC_HEADER_STDC
+-AC_DISABLE_STATIC
+-LT_INIT
++LT_INIT([disable-static])
+ AC_HEADER_STDC
+ AC_FUNC_FORK
diff --git a/user/consolekit2/add-listseats.patch b/user/consolekit2/add-listseats.patch
new file mode 100644
index 000000000..44bc034c8
--- /dev/null
+++ b/user/consolekit2/add-listseats.patch
@@ -0,0 +1,100 @@
+diff --git a/data/ConsoleKit.conf b/data/ConsoleKit.conf
+index 6c10476..216a0e9 100644
+--- a/data/ConsoleKit.conf
++++ b/data/ConsoleKit.conf
+@@ -80,6 +80,9 @@
+ send_member="CloseSession"/>
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
++ send_member="ListSeats"/>
++ <allow send_destination="org.freedesktop.ConsoleKit"
++ send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="GetSeats"/>
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
+diff --git a/src/ck-manager.c b/src/ck-manager.c
+index 4722bdb..7d8b8b2 100644
+--- a/src/ck-manager.c
++++ b/src/ck-manager.c
+@@ -3841,6 +3841,44 @@ dbus_unlock_session (ConsoleKitManager *ckmanager,
+ }
+
+ static gboolean
++dbus_list_seats (ConsoleKitManager *ckmanager,
++ GDBusMethodInvocation *context)
++{
++ CkManager *manager;
++ GVariantBuilder seat_builder;
++ GVariant *seat;
++ GHashTableIter seat_iter;
++ const gchar *key;
++ CkSeat *value;
++
++ TRACE ();
++
++ manager = CK_MANAGER (ckmanager);
++
++ g_return_val_if_fail (CK_IS_MANAGER (manager), FALSE);
++
++ /* if we don't have seats, we need to return NULL */
++ if (g_hash_table_size (manager->priv->seats) == 0) {
++ throw_error (context, CK_MANAGER_ERROR_NO_SEATS, _("User has no seats"));
++ return TRUE;
++ }
++
++ g_variant_builder_init (&seat_builder, G_VARIANT_TYPE_ARRAY);
++
++ g_hash_table_iter_init (&seat_iter, manager->priv->seats);
++ while (g_hash_table_iter_next (&seat_iter, &key, &value)) {
++ seat = g_variant_new("(so)",
++ console_kit_seat_get_name( CONSOLE_KIT_SEAT(value) ),
++ key);
++
++ g_variant_builder_add_value (&seat_builder, seat);
++ }
++
++ console_kit_manager_complete_list_seats (ckmanager, context, g_variant_builder_end (&seat_builder));
++ return TRUE;
++}
++
++static gboolean
+ dbus_get_seats (ConsoleKitManager *ckmanager,
+ GDBusMethodInvocation *context)
+ {
+@@ -4134,6 +4172,7 @@ ck_manager_iface_init (ConsoleKitManagerIface *iface)
+ iface->handle_stop = dbus_stop;
+ iface->handle_suspend = dbus_suspend;
+ iface->handle_close_session = dbus_close_session;
++ iface->handle_list_seats = dbus_list_seats;
+ iface->handle_get_seats = dbus_get_seats;
+ iface->handle_get_sessions = dbus_get_sessions;
+ iface->handle_get_sessions_for_unix_user = dbus_get_sessions_for_unix_user;
+diff --git a/src/org.freedesktop.ConsoleKit.Manager.xml b/src/org.freedesktop.ConsoleKit.Manager.xml
+index a44880c..024a3e2 100644
+--- a/src/org.freedesktop.ConsoleKit.Manager.xml
++++ b/src/org.freedesktop.ConsoleKit.Manager.xml
+@@ -531,6 +531,24 @@
+ </doc:doc>
+ </method>
+
++ <method name="ListSeats">
++ <arg name="seats" direction="out" type="a(so)">
++ <doc:doc>
++ <doc:summary>an array of seat names and IDs</doc:summary>
++ </doc:doc>
++ </arg>
++ <doc:doc>
++ <doc:description>
++ <doc:para>Retrieves a list of all <doc:ref type="interface" to="Seat">Seats</doc:ref>
++ that are present on the system.</doc:para>
++ <doc:para>Like the logind method of the same name, this returns both the seat's name
++ (such as "seat0") and the D-Bus object path for the seat object that implements the
++ <doc:ref type="interface" to="Seat">Seat</doc:ref> interface.</doc:para>
++ </doc:description>
++ <doc:seealso><doc:ref type="method" to="Manager.GetSeats">GetSeats()</doc:ref></doc:seealso>
++ </doc:doc>
++ </method>
++
+ <method name="GetSeats">
+ <arg name="seats" direction="out" type="ao">
+ <doc:doc>
diff --git a/user/consolekit2/consolekit2.initd b/user/consolekit2/consolekit2.initd
new file mode 100644
index 000000000..697eea8f9
--- /dev/null
+++ b/user/consolekit2/consolekit2.initd
@@ -0,0 +1,9 @@
+#!/sbin/openrc-run
+
+description="Tracks sessions and seats"
+pidfile="/var/run/ConsoleKit/pid"
+command="/usr/sbin/console-kit-daemon"
+
+depend() {
+ need dbus
+}
diff --git a/user/consolekit2/pam-foreground-compat.ck b/user/consolekit2/pam-foreground-compat.ck
new file mode 100644
index 000000000..c9255503c
--- /dev/null
+++ b/user/consolekit2/pam-foreground-compat.ck
@@ -0,0 +1,17 @@
+#!/bin/sh
+TAGDIR=/var/run/console
+
+[ -n "$CK_SESSION_USER_UID" ] || exit 1
+[ "$CK_SESSION_IS_LOCAL" = "true" ] || exit 0
+
+TAGFILE="$TAGDIR/`getent passwd $CK_SESSION_USER_UID | cut -f 1 -d:`"
+
+if [ "$1" = "session_added" ]; then
+ mkdir -p "$TAGDIR"
+ echo "$CK_SESSION_ID" >> "$TAGFILE"
+fi
+
+if [ "$1" = "session_removed" ] && [ -e "$TAGFILE" ]; then
+ sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE"
+ [ -s "$TAGFILE" ] || rm -f "$TAGFILE"
+fi
diff --git a/user/py-mako/APKBUILD b/user/py-mako/APKBUILD
new file mode 100644
index 000000000..2ef83e096
--- /dev/null
+++ b/user/py-mako/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-mako
+_pkgname=Mako
+pkgver=1.0.7
+pkgrel=0
+pkgdesc="A Python fast templating language"
+url="http://www.makotemplates.org/"
+arch="noarch"
+license="MIT"
+depends=""
+makedepends="python3-dev"
+checkdepends="py-six"
+subpackages="py3-${pkgname#py-}:_py3"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+check() {
+ cd "$builddir"
+ python3 setup.py test
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="d67af6788bf8603010361ce8b6d0355b0191657c07f3b5845f9d5e91653c3e349a7b35d5b36aa9c7f291973c83911ce94075e1cad78e6935d0ed4ee9c6e2a571 Mako-1.0.7.tar.gz"
diff --git a/user/py3-lxml/APKBUILD b/user/py3-lxml/APKBUILD
new file mode 100644
index 000000000..deb2064dc
--- /dev/null
+++ b/user/py3-lxml/APKBUILD
@@ -0,0 +1,27 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=py3-lxml
+_pkgname=lxml
+pkgver=4.2.1
+pkgrel=0
+pkgdesc="Python LXML Library"
+url="http://lxml.de/"
+arch="all"
+license="BSD-3-Clause"
+options="!check" # No test suite.
+makedepends="python3-dev libxml2-dev libxslt-dev py3-setuptools"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+package() {
+ cd "$builddir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="17dfa309f1066ba2478cdc87b8ec018f99dd9d43dd088c458dcae83683dbde2f9c341f64dfeab4e1d1f341b8294e6168b24294bec21e393c4f4bf9513b271124 lxml-4.2.1.tar.gz"
diff --git a/user/wine/APKBUILD b/user/wine/APKBUILD
new file mode 100644
index 000000000..b1aaad45b
--- /dev/null
+++ b/user/wine/APKBUILD
@@ -0,0 +1,139 @@
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
+# Contributor: Łukasz Jendrysik <scadu@yandex.com>
+# Contributor: Martell Malone <martell@marinelayer.io>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=wine
+pkgver=3.0
+_pkgver=${pkgver/_/-}
+pkgrel=0
+pkgdesc="A compatibility layer for running Windows programs"
+url="http://www.winehq.com"
+arch="pmmx x86 x86_64"
+license="LGPL-2.0-or-later"
+# As of 2.0.3 most of the tests fails
+options="!check"
+subpackages="$pkgname-libs $pkgname-dev $pkgname-doc"
+depends_dev="$pkgname perl"
+makedepends="fontconfig-dev openldap-dev libxslt-dev libxxf86dga-dev
+ libxcursor-dev libxrandr-dev libxdamage-dev mesa-dev flex-dev bison
+ libpng-dev libjpeg-turbo-dev freetype-dev ncurses-dev libressl-dev
+ libxcomposite-dev libxrender-dev libxinerama-dev zlib-dev
+ cups-dev alsa-lib-dev lcms-dev libxml2-dev paxmark dbus-dev libxi-dev
+ gnutls-dev tiff-dev v4l-utils-dev udisks2-dev autoconf automake
+ openal-soft-dev pulseaudio-dev sane-dev eudev-dev
+ "
+source="http://dl.winehq.org/$pkgname/source/${pkgver%.[1-9]}/$pkgname-$_pkgver.tar.xz
+ no-pie.patch
+ winhlp32-flex.patch
+ "
+builddir="$srcdir/$pkgname-$_pkgver"
+
+prepare() {
+ cd "$builddir"
+
+ default_prepare
+ aclocal && autoheader && autoreconf
+}
+
+build() {
+ cd "$builddir"
+
+ case "$CARCH" in
+ x86_64) _win64=--enable-win64;;
+ esac
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --libdir=/usr/lib \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-cups \
+ --with-curses \
+ --with-dbus \
+ --with-fontconfig \
+ --with-freetype \
+ --with-jpeg \
+ --with-openal \
+ --with-opengl \
+ --with-png \
+ --with-pulse \
+ --with-sane \
+ --with-udev \
+ --with-va \
+ --with-x \
+ --with-xcomposite \
+ --with-xinerama \
+ --with-xslt \
+ $_win64
+ make
+}
+
+check() {
+ cd "$builddir"
+ make test
+}
+
+package() {
+ local file
+ cd "$builddir"
+ make -j1 DESTDIR="$pkgdir" install
+
+ case "$CARCH" in
+ x86_64) _wine="wine64";;
+ *) _wine="wine";;
+ esac
+
+ paxmark -psmre "$pkgdir"/usr/bin/$_wine-preloader \
+ "$pkgdir"/usr/bin/$_wine
+
+ install -Dm755 tools/wineapploader \
+ "$pkgdir"/usr/bin/wineapploader
+
+ for file in msiexec notepad regedit regsvr32 wineboot \
+ winecfg wineconsole winefile winemine winepath
+ do
+ rm "$pkgdir"/usr/bin/$file
+ ln -sf /usr/bin/wineapploader "$pkgdir"/usr/bin/$file
+ done
+}
+
+dev() {
+ local file
+ default_dev
+
+ install -d "$subpkgdir"/usr/bin
+ for file in widl wmc wrc winebuild winedump function_grep.pl \
+ winedbg winemaker winegcc winecpp wineg++
+ do
+ mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin/
+ done
+
+ install -d "$subpkgdir"/usr/lib/wine
+ mv "$pkgdir"/usr/lib/wine/*.def "$subpkgdir"/usr/lib/wine/
+}
+
+doc() {
+ default_doc
+ rm -fr "$subpkgdir"/usr/share/man/*.UTF-8
+}
+
+libs() {
+ local file ext
+ default_libs
+
+ install -d "$subpkgdir"/usr/lib/wine/fakedlls
+ for ext in dll16 drv16 exe16 acm dll drv ds ocx sys tlb vxd; do
+ for file in $(find "$pkgdir/usr/lib/wine/fakedlls" -name "*.$ext"); do
+ mv "$pkgdir"/usr/lib/wine/fakedlls/${file##*/} \
+ "$subpkgdir"/usr/lib/wine/fakedlls/
+ mv "$pkgdir"/usr/lib/wine/${file##*/}.so \
+ "$subpkgdir"/usr/lib/wine/
+ done
+ done
+}
+
+sha512sums="a51f41b66f4805e09b223528eff6670e94b9c0c0c947be647507baf9d8d9afe7c3fdc88684c2c8d3573b4739d9a086ab929a744a8594d3c8f6ceb52070f43f0a wine-3.0.tar.xz
+d853875f7d659617bdfba364704abd75b760d12977f1f13acc73acb3c8fefec0549677fb79a4f8955e073d64078b3071d63d97262522e22b7832a66d3d820a9c no-pie.patch
+522a94a31fc459e80ea7dd05f7aee64f6ae666ec05236d06614acde118d5c60002e0f253ae75edb5f02164f22937ca89578504b690d1a5611bd60f703c8f0c00 winhlp32-flex.patch"
diff --git a/user/wine/no-pie.patch b/user/wine/no-pie.patch
new file mode 100644
index 000000000..5fb5d87b6
--- /dev/null
+++ b/user/wine/no-pie.patch
@@ -0,0 +1,14 @@
+diff --git a/loader/Makefile.in b/loader/Makefile.in
+index 8190037..437d4d9 100644
+--- a/loader/Makefile.in
++++ b/loader/Makefile.in
+@@ -26,7 +26,7 @@ wine64_DEPS = $(WINELOADER_DEPENDS)
+ wine64_LDFLAGS = $(LDEXECFLAGS) -lwine $(PTHREAD_LIBS)
+
+ wine_preloader_OBJS = preloader.o
+-wine_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000
++wine_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000 -no-pie
+
+ wine64_preloader_OBJS = preloader.o
+-wine64_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000
++wine64_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000 -no-pie
diff --git a/user/wine/nopie.patch b/user/wine/nopie.patch
new file mode 100644
index 000000000..54eb141be
--- /dev/null
+++ b/user/wine/nopie.patch
@@ -0,0 +1,10 @@
+diff --git a/loader/Makefile.in b/loader/Makefile.in
+index 8190037..b4f2902 100644
+--- a/loader/Makefile.in
++++ b/loader/Makefile.in
+@@ -29,4 +29,4 @@ wine_preloader_OBJS = preloader.o
+ wine_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000
+
+ wine64_preloader_OBJS = preloader.o
+-wine64_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000
++wine64_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000 -no-pie
diff --git a/user/wine/winhlp32-flex.patch b/user/wine/winhlp32-flex.patch
new file mode 100644
index 000000000..daeb790c2
--- /dev/null
+++ b/user/wine/winhlp32-flex.patch
@@ -0,0 +1,9 @@
+--- a/programs/winhlp32/Makefile.in
++++ b/programs/winhlp32/Makefile.in
+@@ -1,5 +1,5 @@
+ MODULE = winhlp32.exe
+-APPMODE = -mwindows
++APPMODE = -mwindows -lfl
+ IMPORTS = user32 gdi32
+ DELAYIMPORTS = shell32 comctl32 comdlg32
+