archrelease: copy trunk to extra-x86_64
[arch-packages.git] / abiword / trunk / PKGBUILD
blob999012a7d238d5dc8281789adb9e0f74067e3a5c
1 # Maintainer: Jan de Groot <jgc@archlinux.org>
2 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
3 # Contributor: MaĆ«l Lavault <moimael@neuf.fr>
5 pkgname=abiword
6 pkgver=3.0.5
7 pkgrel=2
8 pkgdesc='Fully-featured word processor'
9 arch=('x86_64')
10 license=('GPL')
11 url='https://www.abisource.com'
12 depends=('fribidi' 'wv' 'goffice' 'librsvg' 'enchant' 'desktop-file-utils'
13          'redland' 'libical' 'gtk-update-icon-cache' 'loudmouth' 'libwpg' 'libwps' 'libwmf' 'link-grammar' 
14          'gtkmathview' 'aiksaurus' 'libxslt' 'libsoup' 'libots' 'libgsf' 'psiconv')
15 makedepends=('pkgconfig' 'boost' 'gobject-introspection' 'libwpd' 'libwps' 'python-gobject' 'autoconf-archive')
16 conflicts=('abiword-plugins')
17 replaces=('abiword-plugins')
18 options=('!makeflags')
19 source=(https://www.abisource.com/downloads/$pkgname/$pkgver/source/$pkgname-$pkgver.tar.gz{,.asc}
20         abiword-3.0.0-librevenge.patch
21         abiword-3.0.1-libwps-0.4.patch
22         abiword-gcc11.patch::https://github.com/AbiWord/abiword/commit/ef29fc94.patch
23         aiksaurus-plugin.m4
24         command-plugin.m4
25         python-override.patch
26         enchant-2.1.patch
27         # https://github.com/AbiWord/abiword/commit/de5dc5fd94a5fe321791d44e88d209a4972264ba
28         boost-asio.patch)       
29 sha256sums=('1257247e9970508d6d1456d3e330cd1909c4b42b25e0f0a1bc32526d6f3a21b4'
30             'SKIP'
31             '77b52a3722096cec3bfbe4fff3802f51b6c9e0ff7aaa30028c29825fd4e6a65f'
32             'f1375b2ab7af2959717cba0259ba546c8e75ef849e84263bdc253019e849cb2a'
33             'd0d9baa60349fa3e1e9f594f896b82285a9378141ff973f4265295ab8475c413'
34             '5f80a2f94f9929cdba9809c5e1a87cd5d537a2518bb879bfb9eab51a71c8dac1'
35             '2f26826e9d59d80dacd0dae4aceb815804eaa75954e47507a0897794f33e45be'
36             'dba1e3265cd42589f17b41fea1a39c8aa4b83c7203b9d5944b578d0ff9c858be'
37             '444dc2aadea3c80310a509b690097541573f6d2652c573d04da66a0f385fcfb2'
38             '3d119595c8080f90570ce09e02d6765a0cb84b16f4cc51ef8eee4ff289c19e77')
39 validpgpkeys=('6C44DB3E0BF3EAF5B433239A5FEE05E6A56E15A3') # Hubert Figuiere <hub@figuiere.net>
41 prepare() {
42   cd $pkgname-$pkgver
44   # fix build with librevenge based import filters
45   patch -Np0 -i ../abiword-3.0.0-librevenge.patch
47   # Fix libwpd 0.4 detection
48   patch -Np1 -i ../abiword-3.0.1-libwps-0.4.patch
50   # Fix build with GCC 11
51   patch -p1 -i ../abiword-gcc11.patch
53   # Fix python override code to work with Python 3.x
54   patch -Np1 -i ../python-override.patch
56   # Replace deprecated enchant functions
57   patch -Np1 -i ../enchant-2.1.patch
59   # Install missing m4 file
60   install -m644 ../aiksaurus-plugin.m4 plugins/aiksaurus/plugin.m4
61   install -m644 ../command-plugin.m4 plugins/command/plugin.m4
63   # Generate m4 file for configure
64   find plugins -name plugin.m4 | xargs cat > plugin-configure.m4
66   # enchant-2 naming change
67   sed -i 's/enchant >=/enchant-2 >=/' configure.ac
69   libtoolize --force
70   autoreconf -fi
74 build() {
75   cd $pkgname-$pkgver
76   ./configure --prefix=/usr \
77     --enable-shared \
78     --disable-static \
79     --enable-clipart \
80     --enable-templates \
81     --enable-plugins \
82     --enable-introspection
83   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
84   make
87 package() {
88   cd $pkgname-$pkgver
89   make DESTDIR="$pkgdir" install