diff options
author | Andrew Clemons <andrew.clemons@gmail.com> | 2017-06-12 16:01:53 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-06-15 18:35:54 +0700 |
commit | 0a5a84f7dcd3d9feae3819e4a9026ffb723e8843 (patch) | |
tree | 19d33001d4db2747ce4a26d6e235aabffa9b51fc /libraries/libreadline-java/libreadline-java.SlackBuild | |
parent | cfa0c5034e90ed10ae1a7d07e2053f3be3e37ead (diff) | |
download | slackbuilds-0a5a84f7dcd3d9feae3819e4a9026ffb723e8843.tar.gz |
libraries/libreadline-java: Build with getline & optional editline.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'libraries/libreadline-java/libreadline-java.SlackBuild')
-rw-r--r-- | libraries/libreadline-java/libreadline-java.SlackBuild | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/libraries/libreadline-java/libreadline-java.SlackBuild b/libraries/libreadline-java/libreadline-java.SlackBuild index 1d22a3d55b..682e74888d 100644 --- a/libraries/libreadline-java/libreadline-java.SlackBuild +++ b/libraries/libreadline-java/libreadline-java.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=libreadline-java VERSION=${VERSION:-0.8.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -64,14 +64,22 @@ tar xvf $CWD/$PRGNAM-$VERSION-src.tar.gz cd $PRGNAM-$VERSION # allow building with clang -patch -p1 < $CWD/clang.patch +patch -p1 < $CWD/patches/8cf1b175458acd54cf2f4c2eee166dd8cdfe5e80.patch +sed -i 's/^CC/#CC/' src/native/Makefile + +# fix collision with getline(3) +patch -p1 < $CWD/patches/8f1e8f8357c48088f72952860ede68f54dc61d8e.patch + +# fix building against newer libedit +patch -p1 < $CWD/patches/c87604b44853663b6d101088db8f894aa4cfb6e3.patch # make build respect our CFLAGS -sed -i -e "s/-fPIC -DPOSIX/$SLKCFLAGS/" src/native/Makefile +sed -i -e "s/\(-fPIC -DPOSIX\)/\1 $SLKCFLAGS/" src/native/Makefile -# allow running on anything >= jdk1.4 -sed -i -e "s/JC_FLAGS =/JC_FLAGS = -target 1.5 -source 1.5/" Makefile +# allow running on anything >= jdk1.6 +sed -i -e "s/JC_FLAGS =/JC_FLAGS = -target 1.6 -source 1.6/" Makefile +# fix building docs with JDK8 sed -i -e 's/\(-version -author org.gnu.readline\)/\1 -Xdoclint:none/' Makefile chown -R root:root . @@ -81,12 +89,18 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +T_LIBS="JavaReadline JavaGetline" + +if pkg-config --exists libedit ; then + T_LIBS="$T_LIBS JavaEditline" +fi + for target in jar build-native apidoc ; do - make "$target" + make "$target" T_LIBS="$T_LIBS" done install -Dm644 $PRGNAM.jar $PKG/usr/share/java/$PRGNAM.jar -install -Dm644 libJavaReadline.so $PKG/usr/lib$LIBDIRSUFFIX/libJavaReadline.so +find . -name '*.so' | xargs -n1 -I xx install -Dm644 xx $PKG/usr/lib$LIBDIRSUFFIX/xx find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |