summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDynamo2015-08-31 16:05:54 +0700
committerDynamo2015-08-31 16:06:18 +0700
commit725eed2885cdaa13c0dad6b7641764009f8f242c (patch)
tree2760c51f57d44e151fc3974c85a5d921b5b58f64
downloadaur-725eed2885cdaa13c0dad6b7641764009f8f242c.tar.gz
Initial import
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD38
-rw-r--r--fix-compilation.patch11
-rw-r--r--fix-lz-linking.patch92
-rw-r--r--fix-typo.patch11
-rw-r--r--fix-zlib.patch22
6 files changed, 200 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d9abb1c87d85
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = stardict-tools
+ pkgdesc = Stardict tools
+ pkgver = 3.0.2
+ pkgrel = 1
+ url = http://code.google.com/p/stardict-3
+ arch = i686
+ arch = x86_64
+ license = GPLv3
+ makedepends = intltool
+ makedepends = libtool
+ makedepends = libmysqlclient
+ depends = gtk2
+ depends = glib2
+ source = https://stardict-3.googlecode.com/files/stardict-tools-3.0.2.tar.bz2
+ source = fix-compilation.patch
+ source = fix-lz-linking.patch
+ source = fix-typo.patch
+ source = fix-zlib.patch
+ md5sums = 177c2c7b963669ed657c46d915e08c02
+ md5sums = dd55902a93e7c8cd4dcddc2efb407c57
+ md5sums = 9d2312c00edb6abbc38a5a7e8fa866db
+ md5sums = cfc5af4ed3cee7df637da641f19fa5f5
+ md5sums = f936a9d742b19a4fd29b94e55f0baf97
+
+pkgname = stardict-tools
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..54c8ad876039
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+pkgname=stardict-tools
+pkgver=3.0.2
+pkgrel=1
+pkgdesc='Stardict tools'
+arch=('i686' 'x86_64')
+url='http://code.google.com/p/stardict-3'
+license=('GPLv3')
+depends=('gtk2' 'glib2')
+makedepends=('intltool' 'libtool' 'libmysqlclient')
+
+source=("https://stardict-3.googlecode.com/files/$pkgname-$pkgver.tar.bz2"
+ 'fix-compilation.patch'
+ 'fix-lz-linking.patch'
+ 'fix-typo.patch'
+ 'fix-zlib.patch')
+
+build()
+{
+ cd "$srcdir/${pkgname}-$pkgver"
+
+ patch -p1 < ../fix-compilation.patch
+ patch -p1 < ../fix-lz-linking.patch
+ patch -p1 < ../fix-typo.patch
+ patch -p1 < ../fix-zlib.patch
+
+ ./autogen.sh --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/${pkgname}-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
+md5sums=('177c2c7b963669ed657c46d915e08c02'
+ 'dd55902a93e7c8cd4dcddc2efb407c57'
+ '9d2312c00edb6abbc38a5a7e8fa866db'
+ 'cfc5af4ed3cee7df637da641f19fa5f5'
+ 'f936a9d742b19a4fd29b94e55f0baf97')
diff --git a/fix-compilation.patch b/fix-compilation.patch
new file mode 100644
index 000000000000..bdaa23e270cc
--- /dev/null
+++ b/fix-compilation.patch
@@ -0,0 +1,11 @@
+--- a/src/lib_binary_dict_parser.cpp
++++ b/src/lib_binary_dict_parser.cpp
+@@ -33,7 +33,7 @@
+ /* Limit the initially reserved index size.
+ * .ifo file may contain incorrect, unreasonably large value of index size,
+ * so we'd be out of memory if we try to allocate such amount. */
+-const size_t MAX_RESERVED_INDEX_SIZE = 200*1024;
++const guint32 MAX_RESERVED_INDEX_SIZE = 200*1024;
+
+ static bool compare_worditem_by_offset(const worditem_t* left, const worditem_t* right)
+ {
diff --git a/fix-lz-linking.patch b/fix-lz-linking.patch
new file mode 100644
index 000000000000..202eaae56277
--- /dev/null
+++ b/fix-lz-linking.patch
@@ -0,0 +1,92 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -27,12 +27,12 @@
+ lingvosound2resdb_SOURCES = lingvosound2resdb.cpp
+
+ dir2resdatabase_LDFLAGS =
+-dir2resdatabase_LDADD = $(STARDICT_LIBS)
++dir2resdatabase_LDADD = $(STARDICT_LIBS) -lz
+ dir2resdatabase_SOURCES = dir2resdatabase.cpp resourcewrap.hpp \
+ libcommon.cpp libcommon.h
+
+ resdatabase2dir_LDFLAGS =
+-resdatabase2dir_LDADD = $(STARDICT_LIBS)
++resdatabase2dir_LDADD = $(STARDICT_LIBS) -lz
+ resdatabase2dir_SOURCES = resdatabase2dir.cpp resourcewrap.hpp \
+ libcommon.cpp libcommon.h
+
+@@ -113,7 +113,7 @@
+ buddhist_SOURCES = buddhist.cpp
+
+ tabfile_LDFLAGS =
+-tabfile_LDADD = $(STARDICT_LIBS)
++tabfile_LDADD = $(STARDICT_LIBS) -lz
+ tabfile_SOURCES = tabfile.cpp libtabfile.cpp libtabfile.h libcommon.cpp \
+ libcommon.h resourcewrap.hpp
+
+@@ -173,17 +173,17 @@
+ tabfile2sql_SOURCES = tabfile2sql.cpp
+
+ babylon_LDFLAGS =
+-babylon_LDADD = $(STARDICT_LIBS)
++babylon_LDADD = $(STARDICT_LIBS) -lz
+ babylon_SOURCES = babylon.cpp libbabylonfile.cpp libbabylonfile.h \
+ libcommon.cpp libcommon.h resourcewrap.hpp
+
+ stardict2txt_LDFLAGS =
+-stardict2txt_LDADD = $(STARDICT_LIBS)
++stardict2txt_LDADD = $(STARDICT_LIBS) -lz
+ stardict2txt_SOURCES = stardict2txt.cpp libstardict2txt.cpp libstardict2txt.h \
+ libcommon.cpp libcommon.h resourcewrap.hpp
+
+ stardict_dict_update_LDFLAGS =
+-stardict_dict_update_LDADD = $(STARDICT_LIBS)
++stardict_dict_update_LDADD = $(STARDICT_LIBS) -lz
+ stardict_dict_update_SOURCES = stardict_dict_update.cpp
+
+ fest2dict_LDFLAGS =
+@@ -244,7 +244,7 @@
+
+ bgl2txt_DEPENDENCIES = libbgl2txt.a
+ bgl2txt_LDFLAGS =
+-bgl2txt_LDADD = $(STARDICT_LIBS) -lz libbgl2txt.a
++bgl2txt_LDADD = $(STARDICT_LIBS) libbgl2txt.a -lz
+ bgl2txt_SOURCES = bgl2txt.cpp libcommon.h libcommon.cpp
+
+ stardict_index_LDFLAGS =
+@@ -253,7 +253,7 @@
+
+ stardict_verify_CPPFLAGS = $(AM_CPPFLAGS) $(LIBXML_CFLAGS)
+ stardict_verify_LDFLAGS =
+-stardict_verify_LDADD = $(STARDICT_LIBS)
++stardict_verify_LDADD = $(STARDICT_LIBS) -lz
+ stardict_verify_SOURCES = stardict_verify.cpp libstardictverify.cpp \
+ libstardictverify.h libcommon.cpp libcommon.h resourcewrap.hpp \
+ ifo_file.hpp ifo_file.cpp lib_res_store.cpp lib_res_store.h \
+@@ -262,7 +262,7 @@
+
+ stardict_bin2text_CPPFLAGS = $(AM_CPPFLAGS) $(LIBXML_CFLAGS)
+ stardict_bin2text_LDFLAGS =
+-stardict_bin2text_LDADD = $(STARDICT_LIBS)
++stardict_bin2text_LDADD = $(STARDICT_LIBS) -lz
+ stardict_bin2text_SOURCES = stardict_bin2text.cpp \
+ lib_stardict_bin2text.cpp lib_stardict_bin2text.h \
+ lib_binary_dict_parser.cpp lib_binary_dict_parser.h lib_dict_data_block.cpp lib_dict_data_block.h \
+@@ -272,7 +272,7 @@
+
+ stardict_text2bin_CPPFLAGS = $(AM_CPPFLAGS) $(LIBXML_CFLAGS)
+ stardict_text2bin_LDFLAGS =
+-stardict_text2bin_LDADD = $(STARDICT_LIBS) $(LIBXML_LIBS)
++stardict_text2bin_LDADD = $(STARDICT_LIBS) $(LIBXML_LIBS) -lz
+ stardict_text2bin_SOURCES = stardict_text2bin.cpp \
+ lib_stardict_text2bin.cpp lib_stardict_text2bin.h resourcewrap.hpp \
+ ifo_file.hpp ifo_file.cpp libcommon.cpp libcommon.h \
+@@ -282,7 +282,7 @@
+ stardict_editor_CPPFLAGS = $(AM_CPPFLAGS) $(LIBXML_CFLAGS)
+ stardict_editor_DEPENDENCIES = libbgl2txt.a
+ stardict_editor_LDFLAGS =
+-stardict_editor_LDADD = $(STARDICT_LIBS) $(LIBXML_LIBS) -lz libbgl2txt.a
++stardict_editor_LDADD = $(STARDICT_LIBS) $(LIBXML_LIBS) libbgl2txt.a -lz
+ stardict_editor_SOURCES = stardict-editor.cpp libtabfile.cpp libtabfile.h \
+ libcommon.cpp libcommon.h libbabylonfile.cpp libbabylonfile.h \
+ libstardict2txt.cpp libstardict2txt.h libstardictverify.cpp \
diff --git a/fix-typo.patch b/fix-typo.patch
new file mode 100644
index 000000000000..4116b69201d4
--- /dev/null
+++ b/fix-typo.patch
@@ -0,0 +1,11 @@
+--- a/src/stardict-editor.cpp
++++ b/src/stardict-editor.cpp
+@@ -138,7 +138,7 @@
+ "b\t4\\\\5\\n6\n"
+ "c\t789\n"
+ "============\n"
+- "Each line contains a word - definition pair. The word is splitted from definition with a tab character. "
++ "Each line contains a word - definition pair. The word is split from definition with a tab character. "
+ "You may use the following escapes: \\n - new line, \\\\ - \\, \\t - tab character.\n"
+ "\n\n"
+ "Babylon source file format\n"
diff --git a/fix-zlib.patch b/fix-zlib.patch
new file mode 100644
index 000000000000..2b3d7984ff67
--- /dev/null
+++ b/fix-zlib.patch
@@ -0,0 +1,22 @@
+--- a/src/resourcewrap.hpp
++++ b/src/resourcewrap.hpp
+@@ -67,7 +67,7 @@
+ }
+
+ namespace zip {
+-typedef ResourceWrapper<void, void, int, gzclose> gzFile;
++ typedef ResourceWrapper<struct gzFile_s, struct gzFile_s , int, gzclose> gzFileWrapper;
+ }
+
+ #endif//!_RESOURCE_HPP_
+--- a/src/libcommon.cpp
++++ b/src/libcommon.cpp
+@@ -190,7 +190,7 @@
+
+ int unpack_zlib(const char* arch_file_name, const char* out_file_name, print_info_t print_info)
+ {
+- zip::gzFile in(gzopen(arch_file_name, "rb"));
++ zip::gzFileWrapper in(gzopen(arch_file_name, "rb"));
+ if(!in) {
+ print_info("Unable to open archive file %s\n", arch_file_name);
+ return EXIT_FAILURE;