Date: Thursday, July 12, 2012 @ 08:41:37
  Author: bisson
Revision: 163463

fix FS#30654

Added:
  stardict/trunk/crash-empty-dict.patch
    (from rev 163462, stardict/trunk/NetDictRequests.patch)
  stardict/trunk/glib2.patch
  stardict/trunk/zlib.patch
Modified:
  stardict/trunk/PKGBUILD
Deleted:
  stardict/trunk/NetDictRequests.patch

------------------------+
 NetDictRequests.patch  |   12 ------------
 PKGBUILD               |   24 +++++++++++++++---------
 crash-empty-dict.patch |   12 ++++++++++++
 glib2.patch            |   36 ++++++++++++++++++++++++++++++++++++
 zlib.patch             |   35 +++++++++++++++++++++++++++++++++++
 5 files changed, 98 insertions(+), 21 deletions(-)

Deleted: NetDictRequests.patch
===================================================================
--- NetDictRequests.patch       2012-07-12 10:24:03 UTC (rev 163462)
+++ NetDictRequests.patch       2012-07-12 12:41:37 UTC (rev 163463)
@@ -1,12 +0,0 @@
-diff -aur old/dict/src/lib/compositelookup.cpp 
new/dict/src/lib/compositelookup.cpp
---- old/dict/src/lib/compositelookup.cpp       2011-07-02 23:58:40.000000000 
-0700
-+++ new/dict/src/lib/compositelookup.cpp       2011-07-18 07:40:01.795710505 
-0700
-@@ -50,7 +50,7 @@
- void CompositeLookup::send_net_dict_request(const std::string& dict_id, const 
std::string& key)
- {
-       NetDictRequest request(dict_id, key);
--      g_assert(NetDictRequests.end() == std::find(NetDictRequests.begin(), 
NetDictRequests.end(), request));
-+      std::find(NetDictRequests.begin(), NetDictRequests.end(), request);
-       NetDictRequests.push_back(request);
- }
- 

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2012-07-12 10:24:03 UTC (rev 163462)
+++ PKGBUILD    2012-07-12 12:41:37 UTC (rev 163463)
@@ -1,31 +1,37 @@
 # $Id$
-# Maintainer: Aaron Griffin <[email protected]>
+# Maintainer: Gaetan Bisson <[email protected]>
+# Contributor: Aaron Griffin <[email protected]>
 # Contributor: Neil Lin <[email protected]>
 
 pkgname=stardict
 pkgver=3.0.3
-pkgrel=1
+pkgrel=2
 pkgdesc='International dictionary software'
 arch=('i686' 'x86_64')
 url='http://www.stardict.org/'
 license=('GPL')
 depends=('enchant' 'gtk2' 'libsigc++' 'libsm')
-makedepends=('intltool' 'popt' 'gnome-doc-utils' 'libmysqlclient')
+makedepends=('intltool' 'popt' 'gnome-doc-utils' 'gnome-common' 
'libmysqlclient')
 options=('!libtool' '!emptydirs')
 source=("http://stardict-3.googlecode.com/files/stardict-${pkgver}.tar.bz2";
-        'NetDictRequests.patch'
-        'gcc46.patch')
+        'crash-empty-dict.patch'
+        'gcc46.patch'
+        'glib2.patch'
+        'zlib.patch')
 sha1sums=('5043c0918963cd4d40e6d6289353f295766ec74f'
           '97af8fdb73c8f04674234b629c6867254e9bd043'
-          '6605a9cdfc4abc2a0ab4462d1228233d34806f0a')
+          '6605a9cdfc4abc2a0ab4462d1228233d34806f0a'
+          '467880bca5e89aa25cb4a57a9e1caba9a8841822'
+          '024ac5eb75a11c96569e31021a4bd65463b3cf5b')
 
 build() {
        cd "${srcdir}/${pkgname}-${pkgver}"
 
-       # ugly hack to avoid crashing with empty dictionaries
-       patch -p1 -i ../NetDictRequests.patch
+       patch -p1 -i ../crash-empty-dict.patch
        patch -p1 -i ../gcc46.patch
-       automake
+       patch -p1 -i ../glib2.patch
+       patch -p1 -i ../zlib.patch
+       ./autogen.sh # gnome-autogen.sh requires gnome-common
 
        ./configure \
                PKG_CONFIG=/usr/bin/pkg-config \

Copied: stardict/trunk/crash-empty-dict.patch (from rev 163462, 
stardict/trunk/NetDictRequests.patch)
===================================================================
--- crash-empty-dict.patch                              (rev 0)
+++ crash-empty-dict.patch      2012-07-12 12:41:37 UTC (rev 163463)
@@ -0,0 +1,12 @@
+diff -aur old/dict/src/lib/compositelookup.cpp 
new/dict/src/lib/compositelookup.cpp
+--- old/dict/src/lib/compositelookup.cpp       2011-07-02 23:58:40.000000000 
-0700
++++ new/dict/src/lib/compositelookup.cpp       2011-07-18 07:40:01.795710505 
-0700
+@@ -50,7 +50,7 @@
+ void CompositeLookup::send_net_dict_request(const std::string& dict_id, const 
std::string& key)
+ {
+       NetDictRequest request(dict_id, key);
+-      g_assert(NetDictRequests.end() == std::find(NetDictRequests.begin(), 
NetDictRequests.end(), request));
++      std::find(NetDictRequests.begin(), NetDictRequests.end(), request);
+       NetDictRequests.push_back(request);
+ }
+ 

Added: glib2.patch
===================================================================
--- glib2.patch                         (rev 0)
+++ glib2.patch 2012-07-12 12:41:37 UTC (rev 163463)
@@ -0,0 +1,36 @@
+diff -Naur old/dict/configure.ac new/dict/configure.ac
+--- old/dict/configure.ac      2011-07-03 16:58:40.000000000 +1000
++++ new/dict/configure.ac      2012-07-12 22:31:52.875176842 +1000
+@@ -266,6 +266,9 @@
+ fi
+ AC_SUBST(WIKI_PARSEDATA_PLUGIN_DIR)
+ 
++GMODULE2_LIBS=`pkg-config --libs gmodule-2.0`
++AC_SUBST([GMODULE2_LIBS])
++
+ dnl ================================================================
+ dnl main program checks.
+ dnl ================================================================
+diff -Naur old/dict/src/Makefile.am new/dict/src/Makefile.am
+--- old/dict/src/Makefile.am   2011-07-03 16:58:40.000000000 +1000
++++ new/dict/src/Makefile.am   2012-07-12 22:29:53.714870692 +1000
+@@ -33,7 +33,7 @@
+ stardict_DEPENDENCIES = lib/libstardict.la $(LOCAL_SIGCPP_LIBFILE)
+ stardict_LDFLAGS = 
+ ## place libstardict.la before any system library, otherwise build with 
--as-needed linker option may fail
+-stardict_LDADD = lib/libstardict.la $(STARDICT_LIBS) $(LOCAL_SIGCPP_LIBFILE)
++stardict_LDADD = lib/libstardict.la $(STARDICT_LIBS) $(LOCAL_SIGCPP_LIBFILE) 
$(GMODULE2_LIBS)
+ 
+ if !GNOME_SUPPORT
+ if MAEMO_SUPPORT
+diff -Naur old/dict/src/tomboykeybinder.h new/dict/src/tomboykeybinder.h
+--- old/dict/src/tomboykeybinder.h     2011-07-03 16:58:40.000000000 +1000
++++ new/dict/src/tomboykeybinder.h     2012-07-12 22:28:04.337920391 +1000
+@@ -21,7 +21,6 @@
+ #ifndef __TOMBOY_KEY_BINDER_H__
+ #define __TOMBOY_KEY_BINDER_H__
+ 
+-#include <glib/gtypes.h>
+ 
+ G_BEGIN_DECLS
+ 

Added: zlib.patch
===================================================================
--- zlib.patch                          (rev 0)
+++ zlib.patch  2012-07-12 12:41:37 UTC (rev 163463)
@@ -0,0 +1,35 @@
+diff -Naur old/lib/src/libcommon.cpp new/lib/src/libcommon.cpp
+--- old/lib/src/libcommon.cpp  2012-07-12 11:33:30.343333334 +0000
++++ new/lib/src/libcommon.cpp  2012-07-12 11:34:05.006568754 +0000
+@@ -614,7 +614,7 @@
+               return EXIT_FAILURE;
+       }
+       while(true) {
+-              len = gzread(get_impl(in), buf, buffer_size);
++              len = gzread((gzFile)get_impl(in), buf, buffer_size);
+               if(len < 0) {
+                       g_critical(read_file_err, arch_file_name, "");
+                       return EXIT_FAILURE;
+@@ -871,3 +871,8 @@
+               return res;
+       }
+ }
++
++int gzclose_compat(void * file)
++{
++    return gzclose ((gzFile)file);
++}
+diff -Naur old/lib/src/libcommon.h new/lib/src/libcommon.h
+--- old/lib/src/libcommon.h    2012-07-12 11:33:30.343333334 +0000
++++ new/lib/src/libcommon.h    2012-07-12 11:34:05.006568754 +0000
+@@ -187,8 +187,9 @@
+       typedef ResourceWrapper<FILE, FILE*, int, fclose> File;
+ }
+ 
++extern int gzclose_compat(void * file);
+ namespace zip {
+-typedef ResourceWrapper<void, void*, int, gzclose> gzFile;
++typedef ResourceWrapper<void, void*, int, gzclose_compat> gzFile;
+ }
+ 
+ /* Create a new temporary file. Return file name in file name encoding.

Reply via email to