aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.eu>2020-04-20 22:28:29 +0200
committerTBK <tbk@jjtc.eu>2020-04-23 23:19:29 +0200
commit2fb7f83f8fcb4819422adf768f1169d1cb801799 (patch)
tree0a63db1008d723280cf0617dca964a063ae090fa
parent404062656826043b9ad1b494a164906103c3493b (diff)
downloadaports-2fb7f83f8fcb4819422adf768f1169d1cb801799.tar.gz
aports-2fb7f83f8fcb4819422adf768f1169d1cb801799.tar.bz2
aports-2fb7f83f8fcb4819422adf768f1169d1cb801799.tar.xz
testing/stardict: build against enchant2
- Switch to enchant2 - Disable compilation of irrelevant stuff - Modernize - Fix CXXFLAGS typo
-rw-r--r--testing/stardict/APKBUILD26
-rw-r--r--testing/stardict/enchant2.patch55
-rw-r--r--testing/stardict/makefile.patch13
3 files changed, 84 insertions, 10 deletions
diff --git a/testing/stardict/APKBUILD b/testing/stardict/APKBUILD
index 369ea90ace..a66c9ebb87 100644
--- a/testing/stardict/APKBUILD
+++ b/testing/stardict/APKBUILD
@@ -1,30 +1,33 @@
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=stardict
pkgver=3.0.6
-pkgrel=2
+pkgrel=3
pkgdesc="Cross-platform and international dictionary software"
url="http://stardict-4.sourceforge.net/"
arch="all"
license="GPL-3.0-or-later"
makedepends="automake autoconf libtool gtk+2.0-dev libsigc++-dev libxml2-dev gnome-doc-utils
- gnome-common enchant-dev espeak-dev zlib-dev mariadb-connector-c-dev"
+ gnome-common enchant2-dev espeak-dev zlib-dev mariadb-connector-c-dev"
subpackages="$pkgname-doc $pkgname-lang $pkgname-help::noarch"
-source="https://downloads.sourceforge.net/project/stardict-4/${pkgver}/${pkgname}-${pkgver}.tar.bz2
+source="https://downloads.sourceforge.net/project/stardict-4/$pkgver/stardict-$pkgver.tar.bz2
gcc46.patch
glib2.patch
mariadb.patch
gconf.patch
+ enchant2.patch
+ makefile.patch
"
options="!check"
prepare() {
default_prepare
./autogen.sh
- find dict/src/sigc++* -name \*.h -or -name \*.cc | xargs rm -f
+ # Ensure system libsigc++ is used
+ find dict/src/sigc++* -type f \( -name \*.h -o -name \*.cc \) -delete
}
build() {
- export CXXFLAGS="$CXXLAGS -std=gnu++11"
+ export CXXFLAGS="$CXXFLAGS -std=gnu++11"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -53,14 +56,17 @@ package() {
help() {
pkgdesc="Stardict help files"
- mkdir -p ${subpkgdir}/usr/share/stardict
- mv ${pkgdir}/usr/share/gnome ${subpkgdir}/usr/share/
- mv ${pkgdir}/usr/share/omf ${subpkgdir}/usr/share/
- mv ${pkgdir}/usr/share/stardict/help ${subpkgdir}/usr/share/stardict/
+ install_if="stardict=$pkgver-r$pkgrel"
+
+ amove usr/share/gnome
+ amove usr/share/omf
+ amove usr/share/stardict/help
}
sha512sums="81d93324b6e8954af7c20ea6d2a3054bb564d786a21b1cb541c728da7a18a6e7ddb23e595055ccc77e6866bbb8c89fb4f17023e33664761dbe1ee8cd55768658 stardict-3.0.6.tar.bz2
cc43b57cdf2e7fbd3e9c86acb4c8f9fef367d68f6f027e75774eec9cdf66b3fdd3b0bc58d373d076cb38671e09012ab69b8b7e81638a5be888af56372e65a838 gcc46.patch
4132eee58ab5dfb30105fd2c1a113d143528f7e904ededbb8de203bbb244377aed2c152aae7f383936e74005c2f4afa6128674a245d2a8083b2757b1ca90dd24 glib2.patch
4b47cd6beb425316cdbe45ec8b6b965521ba20a956fe6a39a49da0b5e774b3ff5bc8ade19aa03216d3405ec7fbee9ed37add0a7ec07c090a6872eb2ae2654db9 mariadb.patch
-efa225a0ff285ee81788311c0ed9875ebc93d64fb4943b8de6ba27d945e781936eebcab4c742b29cb6c8c810f5fd3f478db98cb06128e7aa552fb8512838bad6 gconf.patch"
+efa225a0ff285ee81788311c0ed9875ebc93d64fb4943b8de6ba27d945e781936eebcab4c742b29cb6c8c810f5fd3f478db98cb06128e7aa552fb8512838bad6 gconf.patch
+bc41bb144275297657424a3a41e27cab6c06fcdecbb470e6f2b9204c01c0a9e74e64e8db6da5343e9b7779eb67f19dc786ec5617b1607c39e1a6034966b96447 enchant2.patch
+f7f96979e620195b09b0b6f4183401886637badeb7c91f1889409a5ee206ac2d1e33072ae31cdde9464510406c7bb0162083b3003b7715aa9ab3c3f1df1923ab makefile.patch"
diff --git a/testing/stardict/enchant2.patch b/testing/stardict/enchant2.patch
new file mode 100644
index 0000000000..56accdb3f1
--- /dev/null
+++ b/testing/stardict/enchant2.patch
@@ -0,0 +1,55 @@
+From: Boyuan Yang <byang@debian.org>
+Date: Fri, 31 Jan 2020 13:14:01 -0500
+Subject: dict/configure.ac: Add support for enchant 2
+
+---
+ dict/configure.ac | 29 +++++++++++++++++++++--------
+ 1 file changed, 21 insertions(+), 8 deletions(-)
+
+diff --git a/dict/configure.ac b/dict/configure.ac
+index fc7101a..ea5b30c 100644
+--- a/dict/configure.ac
++++ b/dict/configure.ac
+@@ -45,21 +45,34 @@ dnl ================================================================
+ dnl spell plugin checks: enchant.
+ dnl ================================================================
+
+-ENCHANT_REQUIRED=1.2.0
++ENCHANT1_REQUIRED=1.2.0
++ENCHANT2_REQUIRED=2.2.3
+ AC_ARG_ENABLE([spell],
+ AS_HELP_STRING([--disable-spell],[Disable spell plugin (default: enabled)]),
+ [enable_enchant=$enableval],
+ [enable_enchant=yes])
+
+ if test "x$enable_enchant" = "xyes" ; then
+- PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED, \
+- have_enchant=yes, have_enchant=no)
+- if test "x$have_enchant" = "xyes"; then
+- ENCHANT_CFLAGS="${ENCHANT_CFLAGS}"
+- ENCHANT_LIBS="${ENCHANT_LIBS}"
+- SPELL_PLUGIN_DIR="stardict-spell-plugin"
++ PKG_CHECK_MODULES([ENCHANT2], enchant-2 >= $ENCHANT2_REQUIRED, \
++ have_enchant2=yes, have_enchant2=no)
++ PKG_CHECK_MODULES([ENCHANT1], enchant >= $ENCHANT1_REQUIRED, \
++ have_enchant1=yes, have_enchant1=no)
++ if test "x$have_enchant2" = "xyes"; then
++ if test "x$have_enchant1" = "xyes"; then
++ AC_MSG_ERROR([You have both Enchant 1.x and Enchant 2.x installed. This is not supported.])
++ else
++ ENCHANT_CFLAGS="${ENCHANT2_CFLAGS}"
++ ENCHANT_LIBS="${ENCHANT2_LIBS}"
++ SPELL_PLUGIN_DIR="stardict-spell-plugin"
++ fi
+ else
+- AC_MSG_ERROR([Enchant library not found or too old. Use --disable-spell to build without spell plugin.])
++ if test "x$have_enchant1" = "xyes"; then
++ ENCHANT_CFLAGS="${ENCHANT1_CFLAGS}"
++ ENCHANT_LIBS="${ENCHANT1_LIBS}"
++ SPELL_PLUGIN_DIR="stardict-spell-plugin"
++ else
++ AC_MSG_ERROR([Enchant library not found or too old. Use --disable-spell to build without spell plugin.])
++ fi
+ fi
+ else
+ ENCHANT_CFLAGS=
diff --git a/testing/stardict/makefile.patch b/testing/stardict/makefile.patch
new file mode 100644
index 0000000000..bb35d6adc8
--- /dev/null
+++ b/testing/stardict/makefile.patch
@@ -0,0 +1,13 @@
+Status: Alpine specific - disables compilation of stuff irrelevant to Alpine
+
+--- a/dict/Makefile.am
++++ b/dict/Makefile.am
+@@ -1,7 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+
+-SUBDIRS = m4 src stardict-plugins tests pixmaps po help data doc \
+- debian-upstream mac_dist msvc_2008
++SUBDIRS = m4 src stardict-plugins tests pixmaps po help data doc
+ ACLOCAL_AMFLAGS = -I m4
+
+ EXTRA_DIST = \