pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/ninja-build Support a shell other than /bin/sh a...
details: https://anonhg.NetBSD.org/pkgsrc/rev/cbb65378295d
branches: trunk
changeset: 427800:cbb65378295d
user: dsainty <dsainty%pkgsrc.org@localhost>
date: Tue Apr 21 07:48:55 2020 +0000
description:
Support a shell other than /bin/sh as a workaround for MacOS X.
Under MacOS X the LD_LIBRARY_PATH variable is unset by the build system
running executables under /bin (namely /bin/sh). This is part of MacOS X
System Integrity Protection.
Because many (most?) users of ninja/meson seem to need hacks involving
LD_LIBRARY_PATH, use a non-SIP-triggering shell under MacOS X.
Fixes MacOS X builds of glib2, gobject-introspection and others.
Bump PKGREVISION for the new behaviour under MacOS X.
diffstat:
devel/ninja-build/Makefile | 20 ++++++++++++-
devel/ninja-build/distinfo | 3 +-
devel/ninja-build/patches/patch-src_subprocess-posix.cc | 26 +++++++++++++++++
3 files changed, 47 insertions(+), 2 deletions(-)
diffs (79 lines):
diff -r ff9b16ab9e42 -r cbb65378295d devel/ninja-build/Makefile
--- a/devel/ninja-build/Makefile Mon Apr 20 22:55:04 2020 +0000
+++ b/devel/ninja-build/Makefile Tue Apr 21 07:48:55 2020 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.12 2020/03/18 00:05:18 rillig Exp $
+# $NetBSD: Makefile,v 1.13 2020/04/21 07:48:55 dsainty Exp $
DISTNAME= ninja-1.10.0
PKGNAME= ${DISTNAME:S/ninja/ninja-build/}
+PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=ninja-build/}
GITHUB_TAG= v${PKGVERSION_NOREV}
@@ -14,6 +15,23 @@
BUILD_DEPENDS+= re2c>=0.11.3:../../devel/re2c
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Darwin"
+#
+# Under MacOS X the LD_LIBRARY_PATH variable is unset by the build system
+# running executables under /bin (namely /bin/sh). This is part of MacOS X
+# System Integrity Protection.
+#
+# Because many (most?) users of ninja/meson seem to need hacks involving
+# LD_LIBRARY_PATH, use a non-SIP-triggering shell under MacOS X.
+#
+DEPENDS+= pdksh-[0-9]*:../../shells/pdksh
+CFLAGS+= -DNINJA_SHELL=${PREFIX}/bin/pdksh
+.else
+CFLAGS+= -DNINJA_SHELL=/bin/sh
+.endif
+
USE_LANGUAGES= c c++
INSTALLATION_DIRS= bin share/doc/ninja share/ninja
diff -r ff9b16ab9e42 -r cbb65378295d devel/ninja-build/distinfo
--- a/devel/ninja-build/distinfo Mon Apr 20 22:55:04 2020 +0000
+++ b/devel/ninja-build/distinfo Tue Apr 21 07:48:55 2020 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.12 2020/02/10 13:13:04 ryoon Exp $
+$NetBSD: distinfo,v 1.13 2020/04/21 07:48:55 dsainty Exp $
SHA1 (ninja-1.10.0.tar.gz) = 7134bca607e17238d272e281ce1cae05d04be970
RMD160 (ninja-1.10.0.tar.gz) = cebdbc2b0d7b1d393ef6c3e449e902463b135eed
SHA512 (ninja-1.10.0.tar.gz) = 5ed47ef1ff18a03eb73296629679a8617a08ee443e10e28ae9cb24e4506f84fe1eb142888adea9a62364b626b35817def8c55ba956c9b3cbc7b82d3e62293044
Size (ninja-1.10.0.tar.gz) = 210313 bytes
+SHA1 (patch-src_subprocess-posix.cc) = aff45ff1080c8556bc9a749666c532896bd73609
diff -r ff9b16ab9e42 -r cbb65378295d devel/ninja-build/patches/patch-src_subprocess-posix.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ninja-build/patches/patch-src_subprocess-posix.cc Tue Apr 21 07:48:55 2020 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_subprocess-posix.cc,v 1.3 2020/04/21 07:48:55 dsainty Exp $
+
+Support a shell other than /bin/sh as a workaround for MacOS X.
+
+Under MacOS X the LD_LIBRARY_PATH variable is unset by the build system
+running executables under /bin (namely /bin/sh). This is part of MacOS X
+System Integrity Protection.
+
+Because many (most?) users of ninja/meson seem to need hacks involving
+LD_LIBRARY_PATH, use a non-SIP-triggering shell under MacOS X.
+
+--- src/subprocess-posix.cc.orig 2019-11-24 01:57:30.000000000 +1300
++++ src/subprocess-posix.cc 2019-11-24 01:58:15.000000000 +1300
+@@ -110,8 +110,10 @@
+ if (err != 0)
+ Fatal("posix_spawnattr_setflags: %s", strerror(err));
+
+- const char* spawned_args[] = { "/bin/sh", "-c", command.c_str(), NULL };
+- err = posix_spawn(&pid_, "/bin/sh", &action, &attr,
++#define xstr(s) str(s)
++#define str(s) #s
++ const char* spawned_args[] = { xstr(NINJA_SHELL), "-c", command.c_str(), NULL };
++ err = posix_spawn(&pid_, xstr(NINJA_SHELL), &action, &attr,
+ const_cast<char**>(spawned_args), environ);
+ if (err != 0)
+ Fatal("posix_spawn: %s", strerror(err));
Home |
Main Index |
Thread Index |
Old Index