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

This commit is contained in:
Thomas Klausner 2020-04-26 18:49:32 +02:00
parent eac45bf14c
commit b3fab3f7c1
1 changed files with 25 additions and 1 deletions

View File

@ -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"