diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2012-09-18 07:58:30 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2012-09-18 19:33:38 -0500 |
commit | 9340d5f121e53280c4ae43bcbba05d6277d88e7e (patch) | |
tree | 4dca7f2d8382371095e5761bc184d676f9b7723a /libraries | |
parent | adf7c14f1489f51f45878db7e8c813eb3556802e (diff) |
libraries/libsunpinyin: Added a patch for gcc-4.7.x.
Fixed downloads of additional files needed.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/libsunpinyin/gcc47.patch | 22 | ||||
-rw-r--r-- | libraries/libsunpinyin/libsunpinyin.SlackBuild | 16 | ||||
-rw-r--r-- | libraries/libsunpinyin/libsunpinyin.info | 8 |
3 files changed, 41 insertions, 5 deletions
diff --git a/libraries/libsunpinyin/gcc47.patch b/libraries/libsunpinyin/gcc47.patch new file mode 100644 index 0000000000000..d3db5c1d99367 --- /dev/null +++ b/libraries/libsunpinyin/gcc47.patch @@ -0,0 +1,22 @@ +diff -Naur sunpinyin-2.0.3.orig/src/ime-core/ic_history.cpp sunpinyin-2.0.3/src/ime-core/ic_history.cpp +--- sunpinyin-2.0.3.orig/src/ime-core/ic_history.cpp 2011-02-18 04:39:52.000000000 +0100 ++++ sunpinyin-2.0.3/src/ime-core/ic_history.cpp 2012-09-18 05:32:14.687001314 +0200 +@@ -41,6 +41,7 @@ + + #include <fcntl.h> + #include <stdio.h> ++#include <unistd.h> + #include <stdint.h> + #include <cassert> + #include <sys/stat.h> +diff -Naur sunpinyin-2.0.3.orig/src/lexicon/genPYT.cpp sunpinyin-2.0.3/src/lexicon/genPYT.cpp +--- sunpinyin-2.0.3.orig/src/lexicon/genPYT.cpp 2011-02-18 04:39:52.000000000 +0100 ++++ sunpinyin-2.0.3/src/lexicon/genPYT.cpp 2012-09-18 05:29:24.570735820 +0200 +@@ -37,6 +37,7 @@ + + #include <locale.h> + #include <stdlib.h> ++#include <unistd.h> + + #include "pytrie.h" + #include "pytrie_gen.h" 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 diff --git a/libraries/libsunpinyin/libsunpinyin.info b/libraries/libsunpinyin/libsunpinyin.info index 473b5f9968183..0531f90468666 100644 --- a/libraries/libsunpinyin/libsunpinyin.info +++ b/libraries/libsunpinyin/libsunpinyin.info @@ -2,11 +2,11 @@ PRGNAM="libsunpinyin" VERSION="2.0.3" HOMEPAGE="http://code.google.com/p/sunpinyin/" DOWNLOAD="http://sunpinyin.googlecode.com/files/sunpinyin-2.0.3.tar.gz \ - http://open-gram.googlecode.com/files/lm_sc.t3g.arpa.tar.bz2 \ - http://open-gram.googlecode.com/files/dict.utf8.tar.bz2" + http://ponce.cc/slackware/sources/repo/open-gram/lm_sc.t3g.arpa-20120212.tar.bz2 \ + http://ponce.cc/slackware/sources/repo/open-gram/dict.utf8-20120830.tar.bz2" MD5SUM="bc1cd4d7d48a73276dfe4c9f5a434cc7 \ - d2bc8dbf56f7b49e5dff2e94794fa980 \ - 7b4068d6ad0a7c307ba997fb0a33ba63" + 31dd2667d9a5cae9d2ecdacf2201ab13 \ + 52b9a47861bef707f65b682d52e8117f" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="scons" |