summaryrefslogtreecommitdiff
path: root/bin/build-binary-dist.sh
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2016-06-20 14:11:45 +0000
committerhallgren <hallgren@chalmers.se>2016-06-20 14:11:45 +0000
commitab138e5a8ca0036b9e228de6c358a367a921e357 (patch)
treee394e6090f41ed4b95488575c0c04aa4775793b5 /bin/build-binary-dist.sh
parent83d340dbefd7206e59978f9da34c0cd860430263 (diff)
bin/build-binary-dist.sh: fixes for the Java and Python bindings.
* Just skip the Java binding if there were errors compiling it. * Install the Python binding in the expected place on Mac OS X when creating an OS X installer package. (i.e. under /Library/Python/2.7/site-packages) Also updated the 3.8 download page and release notes to reflect the above.
Diffstat (limited to 'bin/build-binary-dist.sh')
-rw-r--r--bin/build-binary-dist.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh
index 30acadffa..e44aaef0c 100644
--- a/bin/build-binary-dist.sh
+++ b/bin/build-binary-dist.sh
@@ -36,6 +36,13 @@ if which >/dev/null python; then
pushd src/runtime/python
EXTRA_INCLUDE_DIRS="$extrainclude" EXTRA_LIB_DIRS="$extralib" python setup.py build
python setup.py install --prefix="$destdir$prefix"
+ if [ "$fmt" == pkg ] ; then
+ # A hack for Python on OS X to find the PGF modules
+ pyver=$(ls "$destdir$prefix/lib" | sed -n 's/^python//p')
+ pydest="$destdir/Library/Python/$pyver/site-packages"
+ mkdir -p "$pydest"
+ ln "$destdir$prefix/lib/python$pyver/site-packages"/pgf* "$pydest"
+ fi
popd
else
echo "Python is not installed, so the Python binding will not be included"
@@ -45,8 +52,12 @@ fi
if which >/dev/null javac && which >/dev/null jar ; then
pushd src/runtime/java
rm -f libjpgf.la # In case it contains the wrong INSTALL_PATH
- make CFLAGS="-I$extrainclude -L$extralib" INSTALL_PATH="$prefix/lib"
- make INSTALL_PATH="$destdir$prefix/lib" install
+ if make CFLAGS="-I$extrainclude -L$extralib" INSTALL_PATH="$prefix/lib"
+ then
+ make INSTALL_PATH="$destdir$prefix/lib" install
+ else
+ echo "*** Skipping the Java binding because of errors"
+ fi
popd
else
echo "Java SDK is not installed, so the Java binding will not be included"
@@ -68,7 +79,7 @@ case $fmt in
;;
pkg)
pkg=$name.pkg
- pkgbuild --identifier org.grammaticalframework.gf.pkg --version "$ver" --root "$destdir$prefix" --install-location "$prefix" dist/$pkg
+ pkgbuild --identifier org.grammaticalframework.gf.pkg --version "$ver" --root "$destdir" --install-location / dist/$pkg
echo "Created $pkg"
esac