pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/ninja-build
Module Name: pkgsrc
Committed By: dsainty
Date: Tue Apr 21 07:48:55 UTC 2020
Modified Files:
pkgsrc/devel/ninja-build: Makefile distinfo
Added Files:
pkgsrc/devel/ninja-build/patches: patch-src_subprocess-posix.cc
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/devel/ninja-build/Makefile \
pkgsrc/devel/ninja-build/distinfo
cvs rdiff -u -r0 -r1.3 \
pkgsrc/devel/ninja-build/patches/patch-src_subprocess-posix.cc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/ninja-build/Makefile
diff -u pkgsrc/devel/ninja-build/Makefile:1.12 pkgsrc/devel/ninja-build/Makefile:1.13
--- pkgsrc/devel/ninja-build/Makefile:1.12 Wed Mar 18 00:05:18 2020
+++ pkgsrc/devel/ninja-build/Makefile Tue Apr 21 07:48:55 2020
@@ -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 @@ LICENSE= apache-2.0
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
Index: pkgsrc/devel/ninja-build/distinfo
diff -u pkgsrc/devel/ninja-build/distinfo:1.12 pkgsrc/devel/ninja-build/distinfo:1.13
--- pkgsrc/devel/ninja-build/distinfo:1.12 Mon Feb 10 13:13:04 2020
+++ pkgsrc/devel/ninja-build/distinfo Tue Apr 21 07:48:55 2020
@@ -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
Added files:
Index: pkgsrc/devel/ninja-build/patches/patch-src_subprocess-posix.cc
diff -u /dev/null pkgsrc/devel/ninja-build/patches/patch-src_subprocess-posix.cc:1.3
--- /dev/null Tue Apr 21 07:48:55 2020
+++ pkgsrc/devel/ninja-build/patches/patch-src_subprocess-posix.cc Tue Apr 21 07:48:55 2020
@@ -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