archrelease: copy trunk to community-any
[ArchLinux/community.git] / stardict / trunk / PKGBUILD
blob3678f8ce9962caf3a6df8ed857edfbd72fdd28b2
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 >
7 pkgname=stardict
8 pkgver=3.0.6.2
9 pkgrel=1
10 pkgdesc='International dictionary software'
11 arch=('x86_64')
12 url='http://stardict-4.sourceforge.net/'
13 license=('GPL')
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"
20         'glib2.patch'
21         'mariadb.patch')
22 sha256sums=('05ff1644497e8f9c5f4199d9ae1198fcc571052286b4707c4b61ed9d349cccbc'
23             '5be4d0468f6089b760924a5d25030110ca62869b4611afb46a411cd4eb59b832'
24             'f66b916c358bddf48fcb91a7d0190a7109fe92a1388ec982c47dfa9ac1ee69cf')
26 prepare() {
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
39   ./autogen.sh
42 build() {
43   cd "${srcdir}/${pkgname}-${pkgver}"
45   CXXFLAGS+=" -std=gnu++11"
46   ./configure \
47     --prefix=/usr \
48     --sysconfdir=/etc \
49     --mandir=/usr/share/man \
50     --disable-gnome-support \
51     --disable-gucharmap \
52     --disable-festival \
53     --disable-flite \
54     --disable-updateinfo
55   sed -e 's/ -shared / -Wl,-O1,--as-needed\0/g' -i {dict,lib,tools}/libtool
56   make
59 package() {
60   cd "${srcdir}/${pkgname}-${pkgver}"
61   make DESTDIR="${pkgdir}" install