summaryrefslogtreecommitdiff
path: root/emulators/wine
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2022-07-24 23:05:50 +0200
committerStefan Eßer <se@FreeBSD.org>2022-07-24 23:13:13 +0200
commit116e5db787062c008379e8cd22b8896dd02ef758 (patch)
treedf3632fb6a7dc626d1fac6ecd88f817fa894d9a1 /emulators/wine
parentx11-themes/yaru-icon-theme: Update to 22.04.4 (diff)
emulators/wine: Fix crash due to ASLR
ASLR has been enabled by default on -CURRENT and -STABLE and this causes Wine to crash. The clean solution would be to implement some memory mapping code that already exists for macOS and Linux, but this is not an essy task. In order to allow use of Wine on systems with ASLR mark the Wine executables as not compatible with ASLR using elfctl. This allows to keeps ASLR enabled on the system for all other binaries. If the required memory mapping functionality is made available, the elfctl commands should be removed from this and the other Wine ports. Approved by: portmgr (implicit)
Diffstat (limited to 'emulators/wine')
-rw-r--r--emulators/wine/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/emulators/wine/Makefile b/emulators/wine/Makefile
index ca3084b3c4a9..880575b6029a 100644
--- a/emulators/wine/Makefile
+++ b/emulators/wine/Makefile
@@ -1,5 +1,6 @@
PORTNAME= wine
DISTVERSION= 6.0.4
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= emulators
MASTER_SITES= SF/${PORTNAME}/Source \
@@ -158,9 +159,11 @@ post-install:
.if ${ARCH} == i386
${MV} ${STAGEDIR}${PREFIX}/bin/wineserver ${STAGEDIR}${PREFIX}/bin/wineserver32
${MV} ${STAGEDIR}${PREFIX}/bin/wine ${STAGEDIR}${PREFIX}/bin/wine.bin
+ -${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/bin/wine.bin
${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/bin/wine
.else
${MV} ${STAGEDIR}${PREFIX}/bin/wine64 ${STAGEDIR}${PREFIX}/bin/wine64.bin
+ -${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/bin/wine64.bin
${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/bin/wine64
${INSTALL_SCRIPT} ${FILESDIR}/wine-wow64.sh ${STAGEDIR}${PREFIX}/bin/wine
${INSTALL_SCRIPT} ${FILESDIR}/pkg32.sh ${STAGEDIR}${DATADIR}/pkg32.sh