summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2022-02-03 16:51:36 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-04 17:53:37 +0700
commit3b4104c452ab3f5515282a7dbcdcdb15e5c52484 (patch)
treec7c4e617b4bbe378aabba1af8428c2bd8a6b7d53 /misc
parentfc13eb20fa1980a307d874a069f6b5acb039c546 (diff)
downloadslackbuilds-3b4104c452ab3f5515282a7dbcdcdb15e5c52484.tar.gz
misc/stardict-tools: Updated for version 3.0.6.2.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc')
-rw-r--r--misc/stardict-tools/stardict-tools.SlackBuild47
-rw-r--r--misc/stardict-tools/stardict-tools.info6
-rw-r--r--misc/stardict-tools/stardict-tools.patch172
3 files changed, 33 insertions, 192 deletions
diff --git a/misc/stardict-tools/stardict-tools.SlackBuild b/misc/stardict-tools/stardict-tools.SlackBuild
index 23021ebee4..7c3b51782d 100644
--- a/misc/stardict-tools/stardict-tools.SlackBuild
+++ b/misc/stardict-tools/stardict-tools.SlackBuild
@@ -6,7 +6,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=stardict-tools
-VERSION=${VERSION:-3.0.1}
+VERSION=${VERSION:-3.0.6.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -51,9 +51,9 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar -xvf $CWD/$PRGNAM-$VERSION.tar.bz2
-cd $PRGNAM-$VERSION
+rm -rf stardict-$VERSION
+tar -xvf $CWD/stardict-$VERSION-github-2.tar.?z*
+cd stardict-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -61,10 +61,16 @@ 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 {} \;
-patch -p0 < $CWD/stardict-tools.patch
+sed -i 's/, enchant/, enchant-2/' dict/configure.ac
+sed -i '/AM_GCONF_SOURCE_2/d' dict/configure.ac
+sed -i '/GNOME_DOC_INIT/d' dict/configure.ac
+sed -i '/gnome-doc-utils.make/d' dict/help/Makefile.am
+
+./autogen.sh
+( cd dict ; ./autogen.sh )
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS -Wno-error=narrowing -fpermissive" \
+CXXFLAGS="$SLKCFLAGS -std=c++11" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -72,23 +78,30 @@ CXXFLAGS="$SLKCFLAGS -Wno-error=narrowing -fpermissive" \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
- --enable-static=no \
+ --disable-gucharmap \
+ --disable-festival \
+ --disable-flite \
+ --disable-espeak \
+ --disable-gnome-support \
+ --disable-schemas-install \
+ --disable-updateinfo \
+ --disable-static \
--build=$ARCH-slackware-linux
+sed -e 's/ -shared / -Wl,-O1,--as-needed\0/g' -i {dict,lib,tools}/libtool
make
-make install DESTDIR=$PKG
mkdir -p $PKG/usr/bin
-cd src
+cd tools/src
cp -a \
21shiji dictbuilder exc2i2e kingsoft soothill wikipedia \
21tech dictd2dic fest2dict mova stardict-editor wikipediaImage \
KangXi directory2dic frgb2utf myspell2dic stardict2txt wordnet \
- Unihan directory2treedic gmx2utf olddic2newdic stardict_dict_update wquick2dic \
- babylon downloadwiki i2e2dict ooo2dict stardict_verify wubi \
- bgl2txt dsl2dict jdictionary oxford2dic tabfile xiaoxuetang-ja \
+ Unihan directory2treedic gmx2utf olddic2newdic wquick2dic \
+ babylon downloadwiki i2e2dict ooo2dict wubi \
+ jdictionary oxford2dic tabfile xiaoxuetang-ja \
buddhist duden jpgb2utf powerword tabfile2sql xmlinout \
- cedict ec50 kanjidic2 pydict2dic testutf8 ydp2dict \
+ cedict ec50 kanjidic2 pydict2dic ydp2dict \
degb2utf edict kdic rucn treedict2dir \
$PKG/usr/bin
cd -
@@ -101,23 +114,23 @@ cp -a AUTHORS COPYING ChangeLog INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
-cd src
+cd tools/src
cp -a Po2Tab.zip example.ifo example_treedict.tar.bz2 \
$PKG/usr/doc/$PRGNAM-$VERSION/examples
cd -
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/scripts
-cd src
+cd tools/src
cp -a \
KangXiZiDian-djvu2tiff.py hanzim2dict.py makevietdict.py ooo.sh \
- dictd2dic.sh i2e.sh mkguangyunst.py parse-oxford.perl \
+ i2e.sh mkguangyunst.py parse-oxford.perl \
exc.sh jm2stardict.py myspell.sh stmerge.py \
extractKangXi.py lingea-trd-decoder.py ncce2stardict.pl uyghur2dict.py \
$PKG/usr/doc/$PRGNAM-$VERSION/scripts
cd -
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/contrib
-cp $CWD/sd $CWD/README.sd $PKG/usr/doc/$PRGNAM-$VERSION/contrib
+cp $CWD/sd $CWD/README.sd $PKG/usr/doc/$PRGNAM-$VERSION/contrib
cp $CWD/README.StarDict $PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/misc/stardict-tools/stardict-tools.info b/misc/stardict-tools/stardict-tools.info
index 34823b914c..86c526df61 100644
--- a/misc/stardict-tools/stardict-tools.info
+++ b/misc/stardict-tools/stardict-tools.info
@@ -1,8 +1,8 @@
PRGNAM="stardict-tools"
-VERSION="3.0.1"
+VERSION="3.0.6.2"
HOMEPAGE="https://sourceforge.net/projects/stardict-4/"
-DOWNLOAD="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/stardictproject/stardict-tools-3.0.1.tar.bz2"
-MD5SUM="1d78c5da68080368b854278cdf56b8da"
+DOWNLOAD="http://downloads.sourceforge.net/stardict-4/stardict-3.0.6.2-github-2.tar.xz"
+MD5SUM="bd16a483917f4ff356370feaf2bb8347"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/misc/stardict-tools/stardict-tools.patch b/misc/stardict-tools/stardict-tools.patch
deleted file mode 100644
index e7b5aa7243..0000000000
--- a/misc/stardict-tools/stardict-tools.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-Author: Cezary M. Kruk <c.kruk@bigfoot.com>
-Date: 2014-11-06
-Package: stardict-tools
-Version: 3.0.1
-Origin: https://code.google.com/p/stardict-3/downloads/list/stardict-3.0.1.tar.bz2
-Description: fixes things up for gcc-4.8.2
-
-diff -us src/KangXi.cpp src/KangXi.cpp
---- src/KangXi.cpp 2007-07-10 09:16:06.000000000 +0200
-+++ src/KangXi.cpp 2014-11-06 04:08:47.000000000 +0100
-@@ -6,6 +6,9 @@
- #include <list>
- #include <string>
-
-+#include <cstring>
-+using std::strrchr;
-+
- static int hexalpha_to_int(int c)
- {
- char hexalpha[] = "aAbBcCdDeEfF";
-@@ -57,7 +60,7 @@
- gchar utf8[7];
- gint n = g_unichar_to_utf8(uc, utf8);
- utf8[n] = '\0';
-- char *p;
-+ const char *p;
- p = strchr(line, '\t');
- if (!p) {
- g_print("Error: %s\n", line);
-diff -us src/Unihan.cpp src/Unihan.cpp
---- src/Unihan.cpp 2007-07-10 09:16:06.000000000 +0200
-+++ src/Unihan.cpp 2014-11-06 04:15:20.000000000 +0100
-@@ -57,13 +57,13 @@
- }
- const char *han = line+2;
-
-- char *p;
-+ const char *p;
- p = strchr(han, '\t');
- if (!p) {
- g_print("Error: %s\n", line);
- return;
- }
-- *p = '\0';
-+ p = '\0';
- p++;
- const char *key = p;
-
-@@ -72,7 +72,7 @@
- g_print("Error: %s\n", line);
- return;
- }
-- *p = '\0';
-+ p = '\0';
- p++;
- const char *def = p;
-
-diff -us src/bgl2txt.cpp src/bgl2txt.cpp
---- src/bgl2txt.cpp 2007-08-01 05:00:02.000000000 +0200
-+++ src/bgl2txt.cpp 2014-11-06 04:20:23.000000000 +0100
-@@ -1,5 +1,8 @@
- #include "libbgl2txt.h"
-
-+#include <string.h>
-+#include <stdio.h>
-+
- int main(int argc, char * argv[])
- {
- if (argc<2) {
-diff -us src/bgl_babylon.cpp src/bgl_babylon.cpp
---- src/bgl_babylon.cpp 2007-08-16 07:14:35.000000000 +0200
-+++ src/bgl_babylon.cpp 2014-11-06 05:02:40.090014886 +0100
-@@ -25,6 +25,8 @@
- #include <glib/gstdio.h>
- #include <iconv.h>
-
-+#include <string.h>
-+
- #ifdef _WIN32
- #include <io.h>
- #define DUP _dup
-diff -us src/bgl_stardictbuilder.cpp src/bgl_stardictbuilder.cpp
---- src/bgl_stardictbuilder.cpp 2007-09-05 05:48:06.000000000 +0200
-+++ src/bgl_stardictbuilder.cpp 2014-11-06 05:03:42.639927341 +0100
-@@ -23,6 +23,9 @@
- #include <iostream>
- #include <glib.h>
-
-+#include <cstring>
-+using std::strrchr;
-+
- StarDictBuilder::StarDictBuilder( std::string filename )
- {
- const char *p = strrchr(filename.c_str(), G_DIR_SEPARATOR);
-diff -us src/dictbuilder.cpp src/dictbuilder.cpp
---- src/dictbuilder.cpp 2007-07-10 09:16:06.000000000 +0200
-+++ src/dictbuilder.cpp 2014-11-06 03:36:56.000000000 +0100
-@@ -14,6 +14,9 @@
-
- #include "dictbuilder-tree.h"
-
-+#include <string.h>
-+#include <stdio.h>
-+
- struct sectionEntry
- {
- char sign;
-diff -us src/libbgl2txt.cpp src/libbgl2txt.cpp
---- src/libbgl2txt.cpp 2007-08-01 05:01:10.000000000 +0200
-+++ src/libbgl2txt.cpp 2014-11-06 05:04:31.950070070 +0100
-@@ -2,6 +2,9 @@
- #include "bgl_babylonreader.h"
- #include "bgl_stardictbuilder.h"
-
-+#include <cstring>
-+using std::strrchr;
-+
- void convert_bglfile(std::string infile, std::string source_charset, std::string target_charset)
- {
- std::string outfile;
-diff -us src/tabfile2sql.cpp src/tabfile2sql.cpp
---- src/tabfile2sql.cpp 2007-08-15 07:56:06.000000000 +0200
-+++ src/tabfile2sql.cpp 2014-11-06 03:38:08.000000000 +0100
-@@ -9,6 +9,9 @@
-
- #include <string>
-
-+#include <cstring>
-+using std::strrchr;
-+
- void print_info(const char *info)
- {
- g_print("%s", info);
-diff -us src/wordnet.cpp src/wordnet.cpp
---- src/wordnet.cpp 2007-09-10 09:49:15.000000000 +0200
-+++ src/wordnet.cpp 2014-11-06 05:08:15.152193594 +0100
-@@ -3,6 +3,7 @@
- #include <glib.h>
- #include <string>
-
-+#include <string.h>
-
- static int hexalpha_to_int(int c)
- {
-@@ -42,12 +43,12 @@
- return answer;
- }
-
--void convert(std::string &filename, std::string &content)
-+int convert(std::string &filename, std::string &content)
- {
- gchar *contents;
- if (!g_file_get_contents(filename.c_str(), &contents, NULL, NULL)) {
- g_print("Open file %s failed!\n", filename.c_str());
-- return;
-+// return;
- }
- char *p, *p1, *p2, *p3, *p4;
- p = contents;
-diff -us src/wubi.cpp src/wubi.cpp
---- src/wubi.cpp 2007-07-10 09:16:06.000000000 +0200
-+++ src/wubi.cpp 2014-11-06 04:18:16.000000000 +0100
-@@ -6,6 +6,9 @@
- #include <glib.h>
- #include <string>
-
-+#include <cstring>
-+#include <cstdlib>
-+
- void convert(const char *filename)
- {
- struct stat stats;