aboutsummaryrefslogtreecommitdiffstats
path: root/community/abiword/APKBUILD
blob: 6b52c9c74bc3ed17a26c7fbaf66f950d9d501c74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=abiword
pkgver=3.0.5
pkgrel=3
pkgdesc="A fully-featured word processor"
url="https://www.abisource.com/"
# s390x and riscv64 blocked by librsvg
arch="all !s390x !riscv64"
options="!check"  # Test suite requires valgrind, etc
license="GPL-2.0-or-later"
makedepends="gtk+3.0-dev readline-dev libgsf-dev enchant2-dev fribidi-dev wv-dev
	popt-dev libjpeg-turbo-dev librsvg-dev bzip2-dev goffice-dev pcre-dev
	libxslt-dev perl automake autoconf libtool autoconf-archive"

# openxml plugin
makedepends="$makedepends boost-dev"

# collab plugin
makedepends="$makedepends gnutls-dev libsoup-dev dbus-glib-dev"

subpackages="$pkgname-dev $pkgname-doc $pkgname-plugins"

_plugins="applix babelfish bmp clarisworks collab docbook command eml epub \
	freetranslation garble gdict gimp google hancom hrtext iscii kword \
	latex loadbindings mht mif mswrite openwriter openxml opml paint \
	passepartout pdb pdf presentation s5 sdw t602 urldict wikipedia wml \
	xslfo"

for _i in $_plugins; do
	subpackages="$subpackages $pkgname-plugin-$_i:_plugin"
done

source="https://www.abisource.com/downloads/abiword/$pkgver/source/abiword-$pkgver.tar.gz
	enchant.patch
	musl-1.2.3.patch
	"

prepare() {
	default_prepare

	sed -i 's/enchant >=/enchant-2 >=/' configure.ac

	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-shared \
		--disable-static \
		--enable-plugins="$_plugins"
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

_plugin() {
	local plugin="${subpkgname#$pkgname-plugin-}"
	pkgdesc="Abiword $plugin plugin"
	local dir="usr/lib/abiword-${pkgver%.*}/plugins"
	mkdir -p "$subpkgdir"/$dir
	mv "$pkgdir"/$dir/$plugin.so "$subpkgdir"/$dir/
}

plugins() {
	pkgdesc="Abiword plugins, all of them"
	depends=
	for _i in $_plugins; do
		depends="$depends $pkgname-plugin-$_i"
	done
	mkdir -p "$subpkgdir"
}

sha512sums="
a2484268901ff47307c9d1f1928622e364f1006f22ce38257c585144df9411dfe3c2dea28c1f1f50a6e545e8cc579cce34117a89dfa771e20312e3ea1a9989d6  abiword-3.0.5.tar.gz
16f28eafdd1c1444dec5b3f8cbdd00f12c6178ba8db5bb94196064653cdada4cb8e4b2ac78ee9a7093c7968c0ddeb9f50a4e6209a5d5836a24b1b2f1941fb576  enchant.patch
a4ee1de8df01a6570eb4d069a1b1abd38c39181020f862ce632ab5b863650a58fcaeadc4c988e7fcae3aade5841399d3d5d482d280d44a48286c24e3701e7969  musl-1.2.3.patch
"