summaryrefslogtreecommitdiff
path: root/extra/stardict
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/stardict
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/stardict')
-rw-r--r--extra/stardict/PKGBUILD42
-rw-r--r--extra/stardict/as-needed.patch29
-rw-r--r--extra/stardict/help-in-destdir.patch21
3 files changed, 92 insertions, 0 deletions
diff --git a/extra/stardict/PKGBUILD b/extra/stardict/PKGBUILD
new file mode 100644
index 000000000..b02aefd11
--- /dev/null
+++ b/extra/stardict/PKGBUILD
@@ -0,0 +1,42 @@
+# $Id: PKGBUILD 106155 2011-01-14 21:07:17Z bisson $
+# Maintainer: Aaron Griffin <aaron@archlinux.org>
+# Contributor: Neil Lin <neil@vip.url.com.tw>
+
+pkgname=stardict
+pkgver=3.0.2
+pkgrel=2
+pkgdesc='A powerful international dictionary written in Gtk2.'
+arch=('i686' 'x86_64')
+url='http://stardict.sourceforge.net/'
+license=('GPL')
+depends=('enchant' 'gtk2' 'libsigc++' 'libsm')
+makedepends=('intltool' 'popt' 'gnome-doc-utils')
+options=('!libtool' '!emptydirs')
+source=("http://downloads.sourceforge.net/sourceforge/stardict/$pkgname-$pkgver.tar.bz2"
+ 'help-in-destdir.patch'
+ 'as-needed.patch')
+sha1sums=('301875657cd39b5f25e5933ece22936a28db1230'
+ '0249d769e5cc85e183eb395b824342f8ca320f56'
+ '22fca061d1be23ac79da6c0ec5fc488ae0aca9c1')
+
+build()
+{
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # patches accepted upstream; will be in stardict>3.0.2
+ patch -p1 -i ../help-in-destdir.patch
+ patch -p1 -i ../as-needed.patch
+ automake
+
+ ./configure PKG_CONFIG=/usr/bin/pkg-config --prefix=/usr \
+ --sysconfdir=/etc --mandir=/usr/share/man \
+ --disable-gnome-support --disable-schemas-install \
+ --disable-espeak --disable-gucharmap \
+ --disable-festival --disable-updateinfo
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/extra/stardict/as-needed.patch b/extra/stardict/as-needed.patch
new file mode 100644
index 000000000..1e924be9f
--- /dev/null
+++ b/extra/stardict/as-needed.patch
@@ -0,0 +1,29 @@
+Index: stardict/src/Makefile.am
+===================================================================
+--- stardict/src/Makefile.am (revision 489)
++++ stardict/src/Makefile.am (working copy)
+@@ -26,9 +26,9 @@
+ -DSTARDICT_LIB_DIR=\""$(libdir)/stardict"\"
+
+
+-stardict_DEPENDENCIES = $(LOCAL_SIGCPP_LIBFILE) lib/libstardict.a
++stardict_DEPENDENCIES = lib/libstardict.a $(LOCAL_SIGCPP_LIBFILE)
+ stardict_LDFLAGS =
+-stardict_LDADD = $(STARDICT_LIBS) $(LOCAL_SIGCPP_LIBFILE) lib/libstardict.a
++stardict_LDADD = lib/libstardict.a $(STARDICT_LIBS) $(LOCAL_SIGCPP_LIBFILE)
+
+ if !GNOME_SUPPORT
+ if MAEMO_SUPPORT
+Index: stardict/tests/Makefile.am
+===================================================================
+--- stardict/tests/Makefile.am (revision 489)
++++ stardict/tests/Makefile.am (working copy)
+@@ -49,7 +49,7 @@
+ t_res_database_SOURCES = t_res_database.cpp
+ t_res_database_DEPENDENCIES = $(top_builddir)/src/lib/libstardict.a
+
+-LDADD = @STARDICT_LIBS@ $(top_builddir)/src/lib/libstardict.a \
++LDADD = $(top_builddir)/src/lib/libstardict.a $(STARDICT_LIBS) \
+ $(LOCAL_SIGCPP_LIBFILE)
+ ## -I$(top_builddir) is for config.h, it's generated by configure in the build dir
+ AM_CPPFLAGS = @STARDICT_CFLAGS@ $(LOCAL_SIGCPP_INCLUDE) -I$(top_builddir) \
diff --git a/extra/stardict/help-in-destdir.patch b/extra/stardict/help-in-destdir.patch
new file mode 100644
index 000000000..ba301b332
--- /dev/null
+++ b/extra/stardict/help-in-destdir.patch
@@ -0,0 +1,21 @@
+diff -aur old/help/Makefile.am new/help/Makefile.am
+--- old/help/Makefile.am 2011-01-03 17:14:20.000000000 +0100
++++ new/help/Makefile.am 2011-01-13 21:42:06.046672489 +0100
+@@ -104,7 +104,7 @@
+ else
+ stardict-install-html:
+ for lc in $(STARDICT_ALL_LINGUAS); do \
+- install_dir=$(STARDICT_HTML_INSTALL_DIR)/$${lc}; \
++ install_dir=$(DESTDIR)$(STARDICT_HTML_INSTALL_DIR)/$${lc}; \
+ htmldir=$(srcdir)/$${lc}/html; \
+ for file in `find $${htmldir} -type f -print`; do \
+ relfile=$${file#$${htmldir}/}; \
+@@ -126,7 +126,7 @@
+ else
+ stardict-uninstall-html:
+ for lc in $(STARDICT_ALL_LINGUAS); do \
+- install_dir=$(STARDICT_HTML_INSTALL_DIR)/$${lc}; \
++ install_dir=$(DESTDIR)$(STARDICT_HTML_INSTALL_DIR)/$${lc}; \
+ rm -rf $${install_dir}; \
+ done;
+ endif