gjs: Remove hacks and require fixed mozjs68.

This commit is contained in:
nia 2020-11-05 17:46:16 +01:00
parent 60b3764e47
commit 0e345f7f04
4 changed files with 2 additions and 61 deletions

View File

@ -19,39 +19,6 @@ MESON_ARGS+= -Dinstalled_tests=false
PKGCONFIG_OVERRIDE+= output/meson-private/gjs-1.0.pc
PKGCONFIG_OVERRIDE_STAGE= post-configure
# Needed by the Javascript JIT used in gjs
NOT_PAX_MPROTECT_SAFE+= bin/gjs-console
.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"
.include "../../devel/libffi/buildlink3.mk"
@ -59,6 +26,7 @@ pre-configure:
.include "../../graphics/cairo-gobject/buildlink3.mk"
.include "../../graphics/gdk-pixbuf2/buildlink3.mk"
.include "../../lang/python/extension.mk"
BUILDLINK_API_DEPENDS.mozjs68+= mozjs68>=68.6.0nb6
.include "../../lang/mozjs68/buildlink3.mk"
.include "../../sysutils/dbus-glib/buildlink3.mk"
.include "../../x11/gtk3/buildlink3.mk"

View File

@ -1,6 +0,0 @@
On PaX mprotect systems, the g-ir-scanner used to generate the typelib
loads the mozjs68 javascript interpreter library and fails to run.
sysctl -w security.pax.mprotect.enabled=0
works around this, but I found no other workaround.

View File

@ -4,4 +4,4 @@ SHA1 (gjs-1.64.3.tar.xz) = f3a6372321cda99f78feaf3ebdc6391532741f67
RMD160 (gjs-1.64.3.tar.xz) = cf7057847308b17f39d348dc952feb0bce20a1a8
SHA512 (gjs-1.64.3.tar.xz) = 9d92e52a7fef07853f3beb181798f89deb60b97b928d916cd827c99a6ab8f83abf7c352a1aa46be476a50e2efadfaf09befa54ccab0d51b0ac7127f2fe794801
Size (gjs-1.64.3.tar.xz) = 422436 bytes
SHA1 (patch-meson.build.diff) = a0bef282355dd2cf4db5719cb84c71b64c6b217a
SHA1 (patch-tools_run__iwyu.sh) = a03e6cc832d41c63c81448332e6ee822ff809a41

View File

@ -1,21 +0,0 @@
$NetBSD$
On PaX mprotect systems, the test binary would need to be marked with
"paxctl +m". Disable test.
--- meson.build.orig 2020-03-28 05:38:50.000000000 +0000
+++ meson.build
@@ -232,13 +232,6 @@ int main(void) {
args: debug_arg, dependencies: spidermonkey,
name: 'SpiderMonkey sanity check')
-if not minimal_program.compiled() or minimal_program.returncode() != 0
- error('''A minimal SpiderMonkey program
-could not be compiled, linked, or run. Most likely you should build it with a
-different configuration. Check the recommended configuration:
-https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr60/docs/Building%20SpiderMonkey.md''')
-endif
-
have_printf_alternative_int = cc.compiles('''
#include <stdio.h>
int main(void) {