1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Gaetan Bisson <bisson@archlinux.org>
3 # Contributor: Aaron Griffin <aaron@archlinux.org>
4 # Contributor: Neil Lin <neil@vip.url.com.tw>
5 # Contributor: Cravix < dr dot neemous at gmail dot com >
10 pkgdesc='International dictionary software'
12 url='http://stardict-4.sourceforge.net/'
14 depends=('gtk2' 'libsigc++')
15 makedepends=('enchant' 'espeak-ng' 'mariadb-libs' 'gnome-common')
16 optdepends=('enchant: spell checker plugin'
17 'espeak-ng: text to speech plugin')
18 options=('!emptydirs')
19 source=("https://downloads.sourceforge.net/project/stardict-4/$pkgver/$pkgname-$pkgver-github-2.tar.xz"
22 sha256sums=('05ff1644497e8f9c5f4199d9ae1198fcc571052286b4707c4b61ed9d349cccbc'
23 '5be4d0468f6089b760924a5d25030110ca62869b4611afb46a411cd4eb59b832'
24 'f66b916c358bddf48fcb91a7d0190a7109fe92a1388ec982c47dfa9ac1ee69cf')
27 cd "${srcdir}/${pkgname}-${pkgver}"
29 patch -p1 -i ../glib2.patch
30 patch -p1 -i ../mariadb.patch
32 sed -i 's/, enchant/, enchant-2/' dict/configure.ac
33 sed -i '/AM_GCONF_SOURCE_2/d' dict/configure.ac
34 sed -i '/GNOME_DOC_INIT/d' dict/configure.ac
35 sed -i '/gnome-doc-utils.make/d' dict/help/Makefile.am
36 sed -i 's|espeak/speak_lib.h|espeak-ng/speak_lib.h|' dict/configure.ac dict/stardict-plugins/stardict-espeak-tts-plugin/stardict_espeak.cpp
37 sed -i 's/ESPEAK_LIBS="-lespeak"/ESPEAK_LIBS="-lespeak-ng"/' dict/configure.ac
43 cd "${srcdir}/${pkgname}-${pkgver}"
45 CXXFLAGS+=" -std=gnu++11"
49 --mandir=/usr/share/man \
50 --disable-gnome-support \
55 sed -e 's/ -shared / -Wl,-O1,--as-needed\0/g' -i {dict,lib,tools}/libtool
60 cd "${srcdir}/${pkgname}-${pkgver}"
61 make DESTDIR="${pkgdir}" install