aboutsummaryrefslogtreecommitdiff
path: root/emulators/wine-proton
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2022-07-24 21:14:23 +0000
committerStefan Eßer <se@FreeBSD.org>2022-07-24 21:14:23 +0000
commit023338f7d107b80a8a40b6aadbcf7cccce0354f2 (patch)
tree344f30903de09aaa67ec8304af1f3c583bb32636 /emulators/wine-proton
parent116e5db787062c008379e8cd22b8896dd02ef758 (diff)
downloadports-023338f7d107b80a8a40b6aadbcf7cccce0354f2.tar.gz
ports-023338f7d107b80a8a40b6aadbcf7cccce0354f2.zip
emulators/wine-proton: 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-proton')
-rw-r--r--emulators/wine-proton/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/emulators/wine-proton/Makefile b/emulators/wine-proton/Makefile
index a648a13c545f..9ad4465e5310 100644
--- a/emulators/wine-proton/Makefile
+++ b/emulators/wine-proton/Makefile
@@ -1,6 +1,6 @@
PORTNAME= wine-proton
DISTVERSION= 6.3-2
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= emulators
MAINTAINER= iwtcex@gmail.com
@@ -108,10 +108,12 @@ post-install:
.if ${ARCH} == i386
${MV} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wineserver ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wineserver32
${MV} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine.bin
+ -${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine.bin
${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine
.else
${INSTALL_SCRIPT} ${FILESDIR}/pkg32.sh ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/pkg32.sh
${MV} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine64 ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine64.bin
+ -${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine64.bin
${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine64
${INSTALL_SCRIPT} ${FILESDIR}/wine-wow64.sh ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine
.endif