Commits

Ivan Vučica committed b93f175

Added checking whether a library is already installed. Added installation of CoreBase, of patched Opal, and of QuartzCore.

Comments (0)

Files changed (11)

GNUstep with libobjc2 on Ubuntu.sh

 . "$GSU_SCRIPT_ROOT/phases/25-build-gnustep-base.sh"
 . "$GSU_SCRIPT_ROOT/phases/30-build-gnustep-gui.sh"
 . "$GSU_SCRIPT_ROOT/phases/35-build-gnustep-back.sh"
+. "$GSU_SCRIPT_ROOT/phases/40-build-gnustep-corebase.sh"
+. "$GSU_SCRIPT_ROOT/phases/45-patch-gnustep-opal.sh"
+. "$GSU_SCRIPT_ROOT/phases/46-build-gnustep-opal.sh"
+. "$GSU_SCRIPT_ROOT/phases/50-build-gnustep-quartzcore.sh"
 
     export CXX=clang++
     export OBJC=clang
     . /GNUstep/System/Library/Makefiles/GNUstep.sh
+    export PATH=$PATH:/GNUstep/System/Tools
+
+After a system reboot, the following line should not be necessary, since
+the file `/etc/ld.so.conf.d/GNUstep.conf` is being created containing
+`/GNUstep/lib`. However, if it doesn't work for some reason, use this:
+
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/GNUstep/lib
 
 Written by Ivan Vucica based on Etoile's `INSTALL` file.
 

phases/15-build-libobjc2.sh

 export CXXFLAGS="-I/GNUstep/include $CXXFLAGS"
 export LDFLAGS="-L/GNUstep/lib $LDFLAGS"
 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/GNUstep/lib"
-echo "/GNUstep/lib" | sudo tee -a /etc/ld.so.conf.d/GNUstep.conf
+echo "/GNUstep/lib" | sudo tee /etc/ld.so.conf.d/GNUstep.conf
 # or: sudo sh -c "echo '/GNUstep/lib' > /etc/ld.so.conf.d/GNUstep.conf"
 
 

phases/20-build-gnustep-make.sh

 echo "Building GNUstep Make"
 echo "====================="
 
-# - Install GNUstep Make. It detects the new ObjC runtime we just installed.
-cd gnustep/core/make/
-if ./configure \
-	--enable-debug-by-default \
-	--with-layout=gnustep \
-	--enable-objc-nonfragile-abi \
-	--prefix=/GNUstep \
-	; then
-	echo "Configured ok"
+if [ -e /GNUstep/System/Library/Makefiles/GNUstep.sh ] ; then
+	echo "Skipping; looks like GNUstep Make is already installed"
 else
-	echo "GNUstep Make configure failed"
-	exit 1
-fi
+	# - Install GNUstep Make. It detects the new ObjC runtime we just installed.
+	cd gnustep/core/make/
+	if ./configure \
+		--enable-debug-by-default \
+		--with-layout=gnustep \
+		--enable-objc-nonfragile-abi \
+		--prefix=/GNUstep \
+		; then
+		echo "Configured ok"
+	else
+		echo "GNUstep Make configure failed"
+		exit 1
+	fi
 
-if make -j 3 && sudo -E make install ; then
-	echo "GNUstep Make installed ok"
-else
-	echo "GNUstep Make failed to build or install"
-	exit 1
+	if make -j 3 && sudo -E make install ; then
+		echo "GNUstep Make installed ok"
+	else
+		echo "GNUstep Make failed to build or install"
+		exit 1
+	fi
 fi
 
 # Re-source GNUstep

phases/25-build-gnustep-base.sh

 echo "Building GNUstep Base"
 echo "====================="
 
-# - Build and Install GNUstep Base:
-cd gnustep/core/base
-# For Linux e.g. Ubuntu, --with-ffi-include is usually required
-if ./configure \
-	--with-ffi-include=/usr/include/`gcc -dumpmachine` \
-	--disable-mixedabi ; then
-	echo "Configured ok"
+if [ -e /GNUstep/Local/Library/Headers/Foundation/NSObject.h ] ; then
+	echo "Skipping; looks like Foundation is already installed"
 else
-	echo "Failed to configure GNUstep Base"
-	exit 1
+	# - Build and Install GNUstep Base:
+	cd gnustep/core/base
+	# For Linux e.g. Ubuntu, --with-ffi-include is usually required
+	if ./configure \
+		--with-ffi-include=/usr/include/`gcc -dumpmachine` \
+		--disable-mixedabi ; then
+		echo "Configured ok"
+	else
+		echo "Failed to configure GNUstep Base"
+		exit 1
+	fi
+
+	if make -j 3 && sudo -E make install ; then
+		echo "Installed GNUstep Base"
+	else
+		echo "Failed to build of install GNUstep Base"
+		exit 1
+	fi
 fi
-
-if make -j 3 && sudo -E make install ; then
-	echo "Installed GNUstep Base"
-else
-	echo "Failed to build of install GNUstep Base"
-	exit 1
-fi
-

phases/30-build-gnustep-gui.sh

 echo "Building GNUstep GUI"
 echo "===================="
 
-cd gnustep/core/gui/
-if ./configure && make -j 3 && sudo -E make install ; then
-	echo "Ok"
+if [ -e /GNUstep/Local/Library/Headers/AppKit/NSWindow.h ] ; then
+	echo "Skipping; looks like GNUstep GUI is already installed"
 else
-	echo "Failed to configure, build or install GNUstep GUI"
-	exit 1
+	cd gnustep/core/gui/
+	if ./configure && make -j 3 && sudo -E make install ; then
+		echo "Ok"
+	else
+		echo "Failed to configure, build or install GNUstep GUI"
+		exit 1
+	fi
 fi
-
-

phases/35-build-gnustep-back.sh

 echo "Building GNUstep Back (with cairo)"
 echo "=================================="
 
-cd gnustep/core/back/
-./configure --enable-graphics=cairo && make -j 3 && sudo -E make install
-
+if [ -e /GNUstep/Local/Library/Bundles/libgnustep-back-023.bundle/libgnustep-back-023 ] ; then
+	echo "Skipping; looks like GNUstep Back is already installed"
+else
+	cd gnustep/core/back/
+	if ./configure --enable-graphics=cairo && make -j 3 && sudo -E make install ; then
+		echo "Ok"
+	else
+		echo "Failed to build GNUstep Back"
+		exit 1
+	fi
+fi

phases/40-build-gnustep-corebase.sh

+#!/bin/bash
+
+cd "$GSU_BUILD_ROOT"/
+
+echo "Building GNUstep CoreBase"
+echo "========================="
+
+if [ -e /GNUstep/Local/Library/Headers/CoreFoundation/CoreFoundation.h ] ; then
+	echo "Skipping; looks like GNUstep CoreBase is already installed"
+else
+	cd gnustep/dev-libs/corebase/
+	if ./configure && make -j 3 && sudo -E make install ; then
+		echo Ok
+	else
+		echo "Failed to build GNUstep CoreBase"
+		exit 1
+	fi
+fi

phases/45-patch-gnustep-opal.sh

+#!/bin/bash
+
+cd "$GSU_BUILD_ROOT"/
+
+echo "Patching GNUstep Opal"
+echo "====================="
+
+cd gnustep/dev-libs/opal/
+patch --quiet -f -r/dev/null -p0 < ../quartzcore/opal-nsfonthacks.patch
+

phases/46-build-gnustep-opal.sh

+#!/bin/bash
+
+cd "$GSU_BUILD_ROOT"/
+
+echo "Building GNUstep Opal"
+echo "====================="
+
+if [ -e /GNUstep/Local/Library/Headers/CoreGraphics/CoreGraphics.h ] ; then
+	echo "Skipping; looks like GNUstep Opal is already installed"
+else
+	cd gnustep/dev-libs/opal/
+	if make -j 3 && sudo -E make install ; then
+		echo Ok
+	else
+		echo "Failed to build GNUstep Opal"
+		exit 1
+	fi
+fi

phases/50-build-gnustep-quartzcore.sh

+#!/bin/bash
+
+cd "$GSU_BUILD_ROOT"/
+
+echo "Building GNUstep QuartzCore"
+echo "==========================="
+
+export PATH=$PATH:/GNUstep/System/Tools
+if [ -e /GNUstep/Local/Library/Headers/QuartzCore/QuartzCore.h ] ; then
+	echo "Skipping; looks like GNUstep QuartzCore is already installed"
+else
+	cd gnustep/dev-libs/quartzcore/
+	if make -j 3 && sudo -E make install ; then
+		echo Ok
+	else
+		echo "Failed to build GNUstep QuartzCore"
+		exit 1
+	fi
+fi
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.