aboutsummaryrefslogtreecommitdiff
path: root/academic/cld2/cld2.SlackBuild
diff options
context:
space:
mode:
authorBenjamin Trigona-Harany <bosth@alumni.sfu.ca>2018-03-12 22:06:03 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-03-17 08:51:42 +0700
commit3ed6b533545cb457853052b7be03c23ed3e32cb1 (patch)
tree92df4eb3b0088ddb0b28dc6a98ab0ae137498f28 /academic/cld2/cld2.SlackBuild
parente0713c6196eea48690cdeb2c3387ba307f5edc5b (diff)
academic/cld2: Fix build on current.
Signed-off-by: Benjamin Trigona-Harany <bosth@alumni.sfu.ca>
Diffstat (limited to 'academic/cld2/cld2.SlackBuild')
-rw-r--r--academic/cld2/cld2.SlackBuild27
1 files changed, 16 insertions, 11 deletions
diff --git a/academic/cld2/cld2.SlackBuild b/academic/cld2/cld2.SlackBuild
index 0011d0d861b95..ba04d548fdcba 100644
--- a/academic/cld2/cld2.SlackBuild
+++ b/academic/cld2/cld2.SlackBuild
@@ -32,7 +32,7 @@ TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -43,8 +43,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -61,14 +61,19 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM-$SRCREV
cd $TMP
-tar xvf $CWD/$PRGNAM-$SRCREV.tar.gz || tar xvf $CWD/$SRCREV.tar.gz
+rm -rf $PRGNAM-$SRCREV
+tar xvf $CWD/$PRGNAM-$SRCREV.tar.gz
cd $PRGNAM-$SRCREV
chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
( cd internal
- g++ -shared $SLKCFLAGS \
+ g++ -shared $SLKCFLAGS -std=c++98 \
cldutil.cc cldutil_shared.cc compact_lang_det.cc compact_lang_det_hint_code.cc \
compact_lang_det_impl.cc debug.cc fixunicodevalue.cc \
generated_entities.cc generated_language.cc generated_ulscript.cc \
@@ -80,7 +85,7 @@ chown -R root:root .
cld2_generated_distinctoctachrome.cc cld_generated_score_quad_octa_2.cc \
-o libcld2.so
- g++ -shared $SLKCFLAGS \
+ g++ -shared $SLKCFLAGS -std=c++98 \
cldutil.cc cldutil_shared.cc compact_lang_det.cc compact_lang_det_hint_code.cc \
compact_lang_det_impl.cc debug.cc fixunicodevalue.cc \
generated_entities.cc generated_language.cc generated_ulscript.cc \
@@ -92,7 +97,7 @@ chown -R root:root .
cld2_generated_distinctocta0122.cc cld_generated_score_quad_octa_0122.cc \
-o libcld2_full.so
- g++ $SLKCFLAGS \
+ g++ $SLKCFLAGS -std=c++98 \
compact_lang_det_test.cc -I. -L. libcld2_full.so \
-o cld2
@@ -110,12 +115,12 @@ mkdir -p $PKG/usr/include/cld2/{internal,public}
cp compact_lang_det.h encodings.h $PKG/usr/include/cld2/public
)
-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
+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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- LICENSE \
+ LICENSE README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild