pkgsrc-WIP-changes archive

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

gjs: more workarounds for PaX systems, still not working.



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <tk%giga.or.at@localhost>
Pushed By:	wiz
Date:		Sun Apr 26 18:49:32 2020 +0200
Changeset:	b3fab3f7c1ed103a40490e0fc0506d0173e328f2

Modified Files:
	gjs/Makefile

Log Message:
gjs: more workarounds for PaX systems, still not working.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b3fab3f7c1ed103a40490e0fc0506d0173e328f2

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

diffstat:
 gjs/Makefile | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diffs:
diff --git a/gjs/Makefile b/gjs/Makefile
index 0cd9134655..54f8abb2e1 100644
--- a/gjs/Makefile
+++ b/gjs/Makefile
@@ -22,11 +22,35 @@ PKGCONFIG_OVERRIDE_STAGE=	post-configure
 # Needed by the Javascript JIT used in gjs
 NOT_PAX_MPROTECT_SAFE+=	bin/gjs-console
 
-#pre-configure:
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD"
+PREPEND_PATH+=	${BUILDLINK_DIR}/bin
+
+# override default target
+.PHONY: meson-configure
+meson-configure:
+.  for d in ${CONFIGURE_DIRS}
+	cd ${WRKSRC} && cd ${d} && ${SETENV} ${MAKE_ENV} ${BUILDLINK_DIR}/bin/python${PYVERSSUFFIX} meson \
+		--prefix ${PREFIX} --libdir lib --mandir ${PKGMANDIR} \
+		--sysconfdir ${PKG_SYSCONFDIR} --buildtype=plain ${MESON_ARGS} . output
+.  endfor
+
+pre-configure:
+	cp ${PYTHONBIN} ${BUILDLINK_DIR}/bin/python${PYVERSSUFFIX}
+	paxctl +m ${BUILDLINK_DIR}/bin/python${PYVERSSUFFIX}
+	sed "s,${PYTHONBIN},${BUILDLINK_DIR}/bin/python${PYVERSSUFFIX}," ${PREFIX}/bin/g-ir-scanner > ${BUILDLINK_DIR}/bin/g-ir-scanner
+	chmod 755 ${BUILDLINK_DIR}/bin/g-ir-scanner
+	sed "s,.{bindir}/g-ir-scanner,${BUILDLINK_DIR}/bin/g-ir-scanner," ${BUILDLINK_DIR}/lib/pkgconfig/gobject-introspection-1.0.pc \
+		> ${WRKDIR}/tmp.pc && ${RM} -f ${BUILDLINK_DIR}/lib/pkgconfig/gobject-introspection-1.0.pc && \
+		mv ${WRKDIR}/tmp.pc ${BUILDLINK_DIR}/lib/pkgconfig/gobject-introspection-1.0.pc
+	${LN} -sf ${PREFIX}/share/gir-1.0/*.* ${BUILDLINK_DIR}/share/gir-1.0/
+	${LN} -sf ${PREFIX}/share/gobject-introspection-1.0/gdump.c ${BUILDLINK_DIR}/share/gobject-introspection-1.0/
 #	echo '#!/bin/sh' > ${WRKSRC}/handle_pax
 #	echo 'cp $$1 $$2' >> ${WRKSRC}/handle_pax
 #	echo 'paxctl +m $$2' >> ${WRKSRC}/handle_pax
 #	chmod 755 ${WRKSRC}/handle_pax
+.endif
 
 .include "../../devel/glib2/buildlink3.mk"
 .include "../../devel/gobject-introspection/buildlink3.mk"


Home | Main Index | Thread Index | Old Index