aboutsummaryrefslogtreecommitdiff
path: root/libraries/libsunpinyin/libsunpinyin.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libsunpinyin/libsunpinyin.SlackBuild')
-rw-r--r--libraries/libsunpinyin/libsunpinyin.SlackBuild16
1 files changed, 15 insertions, 1 deletions
diff --git a/libraries/libsunpinyin/libsunpinyin.SlackBuild b/libraries/libsunpinyin/libsunpinyin.SlackBuild
index cdc331f2895c8..ff146d1778ba7 100644
--- a/libraries/libsunpinyin/libsunpinyin.SlackBuild
+++ b/libraries/libsunpinyin/libsunpinyin.SlackBuild
@@ -6,7 +6,9 @@
PRGNAM=libsunpinyin
VERSION=${VERSION:-2.0.3}
-BUILD=${BUILD:-1}
+LMVER=${LMVER:-20120212}
+DIVER=${DIVER:-20120830}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -51,6 +53,18 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix building with gcc-4.7.x
+patch -p1 < $CWD/gcc47.patch
+
+# The dictionary and language model files are renamed with dates and the olds deleted
+# Fix this so it won't break build
+sed -i \
+ -e "s|open-gram.*|ponce.cc/slackware/sources/repo/open-gram|" \
+ -e "s|arpa\.tar|arpa-${LMVER}.tar|" \
+ -e "s|utf8\.tar|utf8-${DIVER}.tar|" \
+ raw/Makefile
+cp -a $CWD/{lm_sc.t3g.arpa-${LMVER},dict.utf8-${DIVER}}.tar.bz2 raw/ || true
+
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
scons --prefix=/usr --libdir=/usr/lib$LIBDIRSUFFIX --libdatadir=/usr/lib$LIBDIRSUFFIX