summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Paul <Torsten.Paul@gmx.de>2014-01-06 23:07:39 (GMT)
committerMarius Kintel <marius@kintel.net>2014-01-08 19:43:04 (GMT)
commite6bfee021b3cb4843a78cf7b526986f51966de32 (patch)
tree14d485f92b2823ce76f0ed6f3d3389a1e07da7c0
parent20938506b6eb7bb9ee6d211df8b067c9fead47d4 (diff)
Add libffi to MacOS build.
-rw-r--r--README.md4
-rwxr-xr-xscripts/macosx-build-dependencies.sh25
2 files changed, 28 insertions, 1 deletions
diff --git a/README.md b/README.md
index 1f7b497..30d92ce 100644
--- a/README.md
+++ b/README.md
@@ -99,6 +99,7 @@ Follow the instructions for the platform you're compiling on below.
* [GCC C++ Compiler (4.2 ->)](http://gcc.gnu.org/)
* [Bison (2.4)](http://www.gnu.org/software/bison/)
* [Flex (2.5.35)](http://flex.sourceforge.net/)
+* [pkg-config (0.26)](http://www.freedesktop.org/wiki/Software/pkg-config/)
### Getting the source code
@@ -117,7 +118,8 @@ To pull the MCAD library (http://reprap.org/wiki/MCAD), do the following:
Prerequisites:
* XCode, including XCode command-line tools (install from XCode Preferences).
-* [CMake](http://cmake.org), which can be installed manually or through MacPorts/homebrew.
+* [CMake](http://cmake.org) and [pkg-config](http://www.freedesktop.org/wiki/Software/pkg-config/),
+ both can be installed manually or through MacPorts/homebrew.
Then after you've cloned this git repository, run the script that sets up the
environment variables.
diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh
index ce555ca..2aedd11 100755
--- a/scripts/macosx-build-dependencies.sh
+++ b/scripts/macosx-build-dependencies.sh
@@ -294,6 +294,28 @@ build_glew()
make GLEW_DEST=$DEPLOYDIR CC=$CC CFLAGS.EXTRA="-no-cpp-precomp -dynamic -fno-common -mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" LDFLAGS.EXTRA="-mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" STRIP= install
}
+build_libffi()
+{
+ version="$1"
+
+ if [ -e "$DEPLOYDIR/lib/libffi.a" ]; then
+ echo "libffi already installed. not building"
+ return
+ fi
+
+ echo "Building libffi $version..."
+ cd "$BASEDIR"/src
+ rm -rf "libffi-$version"
+ if [ ! -f "libffi-$version.tar.gz" ]; then
+ curl --insecure -LO "ftp://sourceware.org/pub/libffi/libffi-$version.tar.gz"
+ fi
+ tar xzf "libffi-$version.tar.gz"
+ cd "libffi-$version"
+ ./configure --prefix="$DEPLOYDIR"
+ make -j4
+ make install
+}
+
build_gettext()
{
version=$1
@@ -326,7 +348,9 @@ build_glib2()
tar xJf "glib-$version.tar.xz"
cd "glib-$version"
+ export PKG_CONFIG_LIBDIR="$DEPLOYDIR/lib/pkgconfig"
./configure --disable-gtk-doc --disable-man --prefix="$DEPLOYDIR" CFLAGS="-I$DEPLOYDIR/include" LDFLAGS="-L$DEPLOYDIR/lib"
+ unset PKG_CONFIG_LIBDIR
make -j4
make install
}
@@ -496,6 +520,7 @@ build_boost 1.54.0
build_cgal 4.3
build_glew 1.10.0
build_gettext 0.18.3.1
+build_libffi 3.0.13
build_glib2 2.38.2
build_opencsg 1.3.2
if $OPTION_DEPLOY; then
contact: Jan Huwald // Impressum