pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/editors/retext



Module Name:    pkgsrc
Committed By:   gutteridge
Date:           Fri Aug 11 22:01:44 UTC 2023

Modified Files:
        pkgsrc/editors/retext: Makefile
Added Files:
        pkgsrc/editors/retext: PLIST.NetBSD
        pkgsrc/editors/retext/files: retext.sh

Log Message:
retext: add a workaround for libEGL woes on NetBSD

Borrowed from www/firefox, with some tweaks.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 pkgsrc/editors/retext/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/editors/retext/PLIST.NetBSD
cvs rdiff -u -r0 -r1.1 pkgsrc/editors/retext/files/retext.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/editors/retext/Makefile
diff -u pkgsrc/editors/retext/Makefile:1.16 pkgsrc/editors/retext/Makefile:1.17
--- pkgsrc/editors/retext/Makefile:1.16 Thu Aug 10 14:10:40 2023
+++ pkgsrc/editors/retext/Makefile      Fri Aug 11 22:01:43 2023
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2023/08/10 14:10:40 gutteridge Exp $
+# $NetBSD: Makefile,v 1.17 2023/08/11 22:01:43 gutteridge Exp $
 
 DISTNAME=      ReText-8.0.1
 PKGNAME=       ${DISTNAME:tl}
+PKGREVISION=   1
 CATEGORIES=    editors python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=R/ReText/}
 
@@ -22,6 +23,16 @@ PYTHON_VERSIONS_INCOMPATIBLE=        27 38 # py
 
 USE_PKG_RESOURCES=     yes
 
+.include "../../mk/bsd.prefs.mk"
+
+# Workaround for PR#57445/50277 for netbsd-9 & netbsd-10 pre 2023-08-05
+post-install:
+.if ${OPSYS} == "NetBSD"
+       ${MV} ${DESTDIR}${PREFIX}/bin/retext ${DESTDIR}${PREFIX}/bin/retext-py
+       ${INSTALL_SCRIPT} ${FILESDIR}/retext.sh ${DESTDIR}${PREFIX}/bin/retext
+       ${SED} -i -e 's|@PREFIX@|${PREFIX}|g' ${DESTDIR}${PREFIX}/bin/retext
+.endif
+
 .include "../../graphics/hicolor-icon-theme/buildlink3.mk"
 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"

Added files:

Index: pkgsrc/editors/retext/PLIST.NetBSD
diff -u /dev/null pkgsrc/editors/retext/PLIST.NetBSD:1.1
--- /dev/null   Fri Aug 11 22:01:44 2023
+++ pkgsrc/editors/retext/PLIST.NetBSD  Fri Aug 11 22:01:43 2023
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST.NetBSD,v 1.1 2023/08/11 22:01:43 gutteridge Exp $
+bin/retext-py

Index: pkgsrc/editors/retext/files/retext.sh
diff -u /dev/null pkgsrc/editors/retext/files/retext.sh:1.1
--- /dev/null   Fri Aug 11 22:01:44 2023
+++ pkgsrc/editors/retext/files/retext.sh       Fri Aug 11 22:01:44 2023
@@ -0,0 +1,10 @@
+#!/bin/sh
+if [ -f /usr/X11R7/lib/libEGL.so ] && [ -z "$LD_PRELOAD" ] && \
+  nm /usr/X11R7/lib/libGL.so | grep -Fq "B _glapi_tls_Dispatch"; then
+    # Workaround for PR#57445/50277 for netbsd-9 & netbsd-10 pre 2023-08-05
+    # This may not avoid a crash 100% of the time, but changes at least some
+    # cases of 100% crash on startup to "have not yet seen crash on startup"
+    echo "Applying libEGL LD_PRELOAD workaround for NetBSD" >&2
+    export LD_PRELOAD=/usr/X11R7/lib/libEGL.so
+fi
+exec @PREFIX@/bin/retext-py "$@"



Home | Main Index | Thread Index | Old Index