[gtk-osx] Better work-around for El Capitan's SIP:



commit 3ded1da307266e65b9340f94476b72d77d97ac63
Author: John Ralls <jralls ceridwen us>
Date:   Mon Dec 14 12:18:43 2015 -0800

    Better work-around for El Capitan's SIP:
    
    Move bash to bootstrap.modules so that it's built as part of the
    bootstarp step. For all other modulesets export CONFIG_SHELL pointing to
    that bash, which ensures that everything with @SHELL@ in its .in files
    along with libtool .la files and automake shell scripts like test-driver
    get that path instead of /bin/sh, which eats the linker environment on
    El Cap.

 jhbuildrc-gtk-osx                             |   13 ++++-
 modulesets-stable/bootstrap.modules           |   71 ++++++++++++++-----------
 modulesets-stable/gtk-osx-bootstrap.modules   |    9 ---
 modulesets-stable/gtk-osx-random.modules      |    1 +
 modulesets-unstable/gtk-osx-bootstrap.modules |    9 ---
 modulesets/gtk-osx-bootstrap.modules          |    9 ---
 6 files changed, 51 insertions(+), 61 deletions(-)
---
diff --git a/jhbuildrc-gtk-osx b/jhbuildrc-gtk-osx
index 1068507..bd60705 100644
--- a/jhbuildrc-gtk-osx
+++ b/jhbuildrc-gtk-osx
@@ -330,7 +330,7 @@ def setup_sdk(target, sdk_version, architectures=[_default_arch]):
         os.environ["CXX"] = os.path.join(_toolpath, "g++-4.2")
 
     os.environ['LD'] = os.path.join(_toolpath, "ld")
-        
+
     # Set the -arch flags for everything we're building.
     #
     for arch in architectures:
@@ -365,6 +365,14 @@ def setup_sdk(target, sdk_version, architectures=[_default_arch]):
     if _osx_version >= 5.0:
        skip.append('m4')
 
+    # El Capitan needs bash to work around SIP. If you're using a
+    # common bootstrap directory (e.g. $HOME/.local) then override
+    # CONFIG_SHELL in .jhbuildrc-custom after calling setup_sdk().
+    if _osx_version < 11.0:
+        skip.append('bash')
+    elif not 'bootstrap' in modules:
+        os.environ['CONFIG_SHELL'] = os.path.join(prefix, 'bin', 'bash')
+
     # gettext-fw rebuilds gettext with an in-tree libiconv to get
     # around the Apple-provided one not defining _libiconv_init for
     # x86_64
@@ -417,7 +425,7 @@ def setup_sdk(target, sdk_version, architectures=[_default_arch]):
     os.environ['CFLAGS_FOR_BUILD'] = os.environ['CFLAGS']
 
     # Make sure we don't link against XQuartz whose freetype-config is on PATH
-    # when XQuartz is installed by removing it from PATH    
+    # when XQuartz is installed by removing it from PATH
     environ_remove('PATH', '/opt/X11/bin')
     return sdkdir
 
@@ -490,7 +498,6 @@ modules = [ 'meta-gtk-osx-bootstrap', 'meta-gtk-osx-core' ]
 
 # A list of modules to skip.
 #
-skip.append("bash") #Needed only on OSX10.11 when something needs a subshell.
 # Source and installation locations.
 #
 _root = os.path.expanduser("~/gtk")
diff --git a/modulesets-stable/bootstrap.modules b/modulesets-stable/bootstrap.modules
index 0ead9fa..f222428 100644
--- a/modulesets-stable/bootstrap.modules
+++ b/modulesets-stable/bootstrap.modules
@@ -2,29 +2,37 @@
 <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
 <moduleset>
   <repository type="tarball" name="ftp.gnome.org" default="yes"
-             href="ftp://ftp.gnome.org/pub/gnome/sources/"/>
+              href="ftp://ftp.gnome.org/pub/gnome/sources/"/>
   <repository type="tarball" name="ftp.gnu.org"
-             href="ftp://ftp.gnu.org/gnu/"/>
+              href="ftp://ftp.gnu.org/gnu/"/>
   <repository type="tarball" name="pkgconfig"
-             href="http://pkgconfig.freedesktop.org/releases/"/>
+              href="http://pkgconfig.freedesktop.org/releases/"/>
   <repository type="tarball" name="python"
-             href="http://www.python.org/ftp/python/"/>
+              href="http://www.python.org/ftp/python/"/>
   <repository type="tarball" name="sourceforge"
-             href="http://downloads.sourceforge.net/sourceforge/"/>
+              href="http://downloads.sourceforge.net/sourceforge/"/>
   <repository type="tarball" name="apache.org"
-             href="http://archive.apache.org/dist/"/>
+              href="http://archive.apache.org/dist/"/>
   <repository type="tarball" name="tukaani.org"
-             href="http://tukaani.org/"/>
+              href="http://tukaani.org/"/>
   <repository type="tarball" name="cmake"
-             href="http://www.cmake.org/files/"/>
+              href="http://www.cmake.org/files/"/>
   <repository type="tarball" name="cpan" href="http://search.cpan.org/CPAN/"; />
   <repository type="tarball" name="intltool"
-              href="http://launchpad.net/intltool/trunk/"/>
+              href="http://launchpad.net/intltool/trunk/"/>
 
   <autotools id="make">
     <branch repo="ftp.gnu.org" module="make/make-3.82.tar.gz" version="3.82"/>
   </autotools>
 
+  <autotools id='bash' autogen-sh="configure">
+    <branch repo="ftp.gnu.org" module="bash/bash-4.3.30.tar.gz"
+            version="4.3.30"/>
+    <dependencies>
+      <dep package="readline"/>
+    </dependencies>
+  </autotools>
+
   <autotools id="xz" autogen-sh="configure">
     <branch repo="tukaani.org" module="xz/xz-5.2.1.tar.bz2" version="5.2.1"/>
   </autotools>
@@ -35,7 +43,7 @@
 
   <autotools id="apr-util" autogenargs="--with-apr=$PREFIX/bin/apr-1-config">
     <branch repo="apache.org" module="apr/apr-util-1.3.12.tar.bz2"
-           version="1.3.12"/>
+            version="1.3.12"/>
     <dependencies>
       <dep package="apr"/>
     </dependencies>
@@ -43,21 +51,21 @@
 
   <autotools id="subversion">
     <branch repo="apache.org" module="subversion/subversion-1.5.9.tar.bz2"
-           version="1.5.9"/>
+            version="1.5.9"/>
     <dependencies>
       <dep package="apr-util"/>
     </dependencies>
   </autotools>
 
   <autotools id="gettext-tools" autogen-sh="configure"
-            autogenargs="--without-emacs --disable-java --disable-native-java --disable-libasprintf 
--disable-csharp --with-included-glib">
+             autogenargs="--without-emacs --disable-java --disable-native-java --disable-libasprintf 
--disable-csharp --with-included-glib">
     <branch repo="ftp.gnu.org" source-subdir="gettext-tools"
             module="gettext/gettext-0.19.4.tar.xz" version="0.19.4"/>
   </autotools>
 
   <!-- cmakes ./configure is picky about invalid flags so we manually set it -->
   <autotools id="cmake" autogen-sh="bootstrap"
-            autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s">
+             autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s">
     <branch repo="cmake" module="v3.2/cmake-3.2.1.tar.gz" version="3.2.1">
       <patch file="http://git.gnome.org/browse/gtk-osx/plain/patches/cmake-libnetwork.patch"; strip="1"/>
     </branch>
@@ -89,12 +97,12 @@
 
   <autotools id="automake-1.11" autogen-sh="configure">
     <branch repo="ftp.gnu.org"
-           module="automake/automake-1.11.6.tar.xz" version="1.11.6"/>
+            module="automake/automake-1.11.6.tar.xz" version="1.11.6"/>
   </autotools>
 
   <autotools id="automake-1.12" autogen-sh="configure">
     <branch repo="ftp.gnu.org"
-           module="automake/automake-1.12.6.tar.xz" version="1.12.6"/>
+            module="automake/automake-1.12.6.tar.xz" version="1.12.6"/>
   </autotools>
 
   <autotools id="automake-1.13" autogen-sh="configure">
@@ -130,22 +138,22 @@
   </autotools>
 
   <!-- 10.4 has 2.5.4, too old for gstreamer (and probably others as well)
-  10.6-10.10 have 2.5.35, 10.5 2.5.33 -->
+       10.6-10.10 have 2.5.35, 10.5 2.5.33 -->
   <autotools id="flex" autogen-sh="configure">
     <branch repo="sourceforge" module="flex/flex-2.5.37.tar.bz2"
-           version="2.5.37"/>
+            version="2.5.37"/>
   </autotools>
 
   <!-- Expat could be skipped for >= 10.5 since it's is part of the SDK there. -->
   <autotools id="expat" autogen-sh="configure">
     <branch module="expat/expat-2.1.0.tar.gz" version="2.1.0"
-           repo="sourceforge"/>
+            repo="sourceforge"/>
   </autotools>
 
   <perl id="perl-xml-parser" makeargs="EXPATLIBPATH=${prefix}/lib EXPATINCPATH=${prefix}/include">
     <branch repo="cpan"
-        module="authors/id/T/TO/TODDR/XML-Parser-2.41.tar.gz"
-       version="2.41"/>
+            module="authors/id/T/TO/TODDR/XML-Parser-2.41.tar.gz"
+            version="2.41"/>
     <dependencies>
       <dep package="expat"/>
     </dependencies>
@@ -153,8 +161,8 @@
 
   <perl id="perl-xml-simple">
     <branch repo="cpan"
-        module="authors/id/G/GR/GRANTM/XML-Simple-2.20.tar.gz" version="2.20"
-        size="75993" md5sum="4d10964e123b76eca36678464daa63cd"/>
+            module="authors/id/G/GR/GRANTM/XML-Simple-2.20.tar.gz" version="2.20"
+            size="75993" md5sum="4d10964e123b76eca36678464daa63cd"/>
     <dependencies>
       <dep package="perl-xml-parser"/>
     </dependencies>
@@ -162,8 +170,8 @@
 
   <!-- Needed for building Gnome apps from the repository -->
   <autotools id="gnome-common">
-     <branch module="gnome-common/3.14/gnome-common-3.14.0.tar.xz" version="3.14.0"
-             hash="sha256:4c00242f781bb441289f49dd80ed1d895d84de0c94bfc2c6818a104c9e39262c"/>
+    <branch module="gnome-common/3.14/gnome-common-3.14.0.tar.xz" version="3.14.0"
+            hash="sha256:4c00242f781bb441289f49dd80ed1d895d84de0c94bfc2c6818a104c9e39262c"/>
   </autotools>
   <!-- This is generated by tarring up the needed docbook stylesheets
        for gtk-doc to work. If someone wants to work on a setup that
@@ -171,17 +179,17 @@
        it used to be a huge amount of work, but might be easier these
        days.
 
-   -->
+  -->
   <autotools id="gtk-osx-docbook" autogen-sh="configure"
-            supports-non-srcdir-builds="no" >
-     <branch repo="sourceforge" module="gtk-osx/gtk-osx-docbook-1.2.tar.gz"
-            version="1.2"/>
+             supports-non-srcdir-builds="no" >
+    <branch repo="sourceforge" module="gtk-osx/gtk-osx-docbook-1.2.tar.gz"
+            version="1.2"/>
   </autotools>
 
   <autotools id="intltool" autogen-sh="configure">
     <branch repo="intltool" module="0.51.0/+download/intltool-0.51.0.tar.gz"
-           version="0.51.0"
-           hash="md5:12e517cac2b57a0121cda351570f1e63"/>
+            version="0.51.0"
+            hash="md5:12e517cac2b57a0121cda351570f1e63"/>
     <dependencies>
       <dep package="gnome-common"/>
       <dep package="perl-xml-parser"/>
@@ -194,6 +202,7 @@
       <dep package="make"/>     <!-- Needed for Tiger, skipped otherwise -->
       <dep package="subversion"/>   <!-- Needed for Tiger, skipped otherwise -->
       <dep package="gettext-tools" /> <!-- Needed for 64-bit -->
+      <dep package="bash" />  <!-- Needed for El Cap and later to work around SIP. -->
       <dep package="cmake"/>
       <dep package="m4"/>      <!-- Can be skipped for Leopard and later -->
       <dep package="autoconf" />
@@ -213,7 +222,7 @@
       <dep package="gtk-osx-docbook"/>
       <dep package="gnome-common"/>
       <dep package="intltool"/>
-   </dependencies>
+    </dependencies>
   </metamodule>
 
 </moduleset>
diff --git a/modulesets-stable/gtk-osx-bootstrap.modules b/modulesets-stable/gtk-osx-bootstrap.modules
index c1ebcbd..dfa5454 100644
--- a/modulesets-stable/gtk-osx-bootstrap.modules
+++ b/modulesets-stable/gtk-osx-bootstrap.modules
@@ -34,14 +34,6 @@
     </branch>
   </autotools>
 
-  <autotools id='bash' autogen-sh="configure">
-    <branch repo="ftp.gnu.org" module="bash/bash-4.3.30.tar.gz"
-            version="4.3.30"/>
-    <dependencies>
-      <dep package="readline"/>
-    </dependencies>
-  </autotools>
-  
   <autotools id="libpng" autogenargs="--enable-shared" autogen-sh="configure">
     <branch version="1.6.17" module="libpng/libpng-1.6.17.tar.xz"
             repo="sourceforge" md5sum="430a9b76b78533235cd4b9b26ce75c7e"/>
@@ -201,7 +193,6 @@
   <metamodule id="meta-gtk-osx-bootstrap">
     <dependencies>
       <dep package="readline"/>
-      <dep package="bash"/>
       <dep package="cups"/>
       <dep package="libpng"/>
       <dep package="libjpeg"/>
diff --git a/modulesets-stable/gtk-osx-random.modules b/modulesets-stable/gtk-osx-random.modules
index d9e058c..b543550 100644
--- a/modulesets-stable/gtk-osx-random.modules
+++ b/modulesets-stable/gtk-osx-random.modules
@@ -461,6 +461,7 @@ Libglade itself is deprecated. This is the last release. -->
     <branch repo="ftp.gnu.org" module="guile/guile-2.0.11.tar.gz"
            version="2.0.11">
       <patch file="http://git.gnome.org/browse/gtk-osx/plain/patches/guile20-align-fix.patch"; strip="1"/>
+      <patch file="http://git.gnome.org/browse/gtk-osx/plain/patches/guild-shell.patch"; strip="1"/>
     </branch>
     <dependencies>
       <dep package="libunistring"/>
diff --git a/modulesets-unstable/gtk-osx-bootstrap.modules b/modulesets-unstable/gtk-osx-bootstrap.modules
index 2759f7f..5c51a72 100644
--- a/modulesets-unstable/gtk-osx-bootstrap.modules
+++ b/modulesets-unstable/gtk-osx-bootstrap.modules
@@ -36,14 +36,6 @@
     </branch>
   </autotools>
 
-<autotools id='bash' autogen-sh="configure">
-    <branch repo="ftp.gnu.org" module="bash/bash-4.3.30.tar.gz"
-            version="4.3.30"/>
-    <dependencies>
-      <dep package="readline"/>
-    </dependencies>
-</autotools>
-
   <autotools id="libpng" autogenargs="--enable-shared" autogen-sh="configure">
     <branch version="1.6.17" module="libpng/libpng-1.6.17.tar.xz"
             repo="sourceforge" md5sum="430a9b76b78533235cd4b9b26ce75c7e"/>
@@ -197,7 +189,6 @@
    <metamodule id="meta-gtk-osx-bootstrap">
     <dependencies>
       <dep package="readline"/>
-      <dep package="bash"/>
       <dep package="cups"/>
       <dep package="libpng"/>
       <dep package="libjpeg"/>
diff --git a/modulesets/gtk-osx-bootstrap.modules b/modulesets/gtk-osx-bootstrap.modules
index 39f9d96..f6f60e7 100644
--- a/modulesets/gtk-osx-bootstrap.modules
+++ b/modulesets/gtk-osx-bootstrap.modules
@@ -34,14 +34,6 @@
     </branch>
   </autotools>
 
-<autotools id='bash' autogen-sh="configure">
-    <branch repo="ftp.gnu.org" module="bash/bash-4.3.30.tar.gz"
-            version="4.3.30"/>
-    <dependencies>
-      <dep package="readline"/>
-    </dependencies>
-</autotools>
-
 <autotools id="libpng" autogenargs="--enable-shared" autogen-sh="configure">
     <branch version="1.6.17" module="libpng/libpng-1.6.17.tar.xz"
             repo="sourceforge" md5sum="430a9b76b78533235cd4b9b26ce75c7e"/>
@@ -188,7 +180,6 @@
   <metamodule id="meta-gtk-osx-bootstrap">
     <dependencies>
       <dep package="readline"/>
-      <dep package="bash"/>
       <dep package="cups"/>
       <dep package="libpng"/>
       <dep package="libjpeg"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]