summaryrefslogtreecommitdiff
path: root/libre/abiword/PKGBUILD
blob: 4f0a915f0805c06ab3aaccb5479c301f3093f963 (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
87
88
89
90
91
92
93
94
95
96
97
98
# $Id: PKGBUILD 266625 2016-04-29 13:05:20Z jgc $
# Maintainer (Arch): Jan de Groot <jgc@archlinux.org>
# Contributor (Arch): Giovanni Scafora <giovanni@archlinux.org>
# Contributor (Arch): Maël Lavault <moimael@neuf.fr>
# Maintainer: André Silva <emulatorman@parabola.nu>

pkgname=abiword
pkgver=3.0.1
pkgrel=6.parabola1
pkgdesc='Fully-featured word processor, without Google search engine and nonfree fonts support'
arch=('i686' 'x86_64')
license=('GPL')
url='http://www.abisource.com'
depends=('fribidi' 'wv' 'goffice' 'librsvg' 'enchant' 'desktop-file-utils'
         'redland' 'libical' 'gtk-update-icon-cache' 'loudmouth' 'libwpg' 'libwps' 'libwmf' 'link-grammar'
         'gtkmathview' 'aiksaurus' 'libxslt' 'libsoup' 'libots' 'libgsf' 'psiconv')
makedepends=('pkgconfig' 'asio' 'boost' 'gobject-introspection' 'python2' 'libwpd' 'libwps')
conflicts=('abiword-plugins' 'abiword-libre')
replaces=('abiword-plugins' 'abiword-libre')
options=('!makeflags')
source=(http://abisource.com/downloads/$pkgname/$pkgver/source/$pkgname-$pkgver.tar.gz
        abiword-3.0.0-librevenge.patch
        abiword-3.0.0-link-grammar-5.patch
        abiword-3.0.0-link-grammar-5-second.patch
        link-grammar-panic.patch
        abiword-3.0.1-libwps-0.4.patch
        aiksaurus-plugin.m4
        command-plugin.m4
        gnutls-3.4.0.patch
        liberation-fonts.patch)
sha256sums=('e094f6fbf0afc5c5538b4894888e7c346f8ee8f49c9d24821dd696d0734865c6'
            '77b52a3722096cec3bfbe4fff3802f51b6c9e0ff7aaa30028c29825fd4e6a65f'
            '6d88800f1e16becd69ed93d5f070793a56b9f162f7d886c71756643bcaed7ef5'
            'd2c80da81a339634a7a4ee4cef12f7ee968f2c2a8c2f75533b6713b71f0d61fd'
            '94d1e638f7b85123dc2282d2e59b982bde6ad0dbbe1b6b54351e610c5a0ea578'
            'f1375b2ab7af2959717cba0259ba546c8e75ef849e84263bdc253019e849cb2a'
            '5f80a2f94f9929cdba9809c5e1a87cd5d537a2518bb879bfb9eab51a71c8dac1'
            '2f26826e9d59d80dacd0dae4aceb815804eaa75954e47507a0897794f33e45be'
            'b393e26c19f92901f64d2bae54c86708ea7dd0b647572088a8ac0cd2eec89100'
            '8a0b6e444e937924743f95c747cbe395a30fb8677a010e60c973b9039e258079')

prepare() {
  cd $pkgname-$pkgver

  # fix build with librevenge based import filters
  patch -Np0 -i ../abiword-3.0.0-librevenge.patch

  # Fix build with recent versions of link-grammar
  patch -Np1 -i ../abiword-3.0.0-link-grammar-5.patch
  patch -Np1 -i ../abiword-3.0.0-link-grammar-5-second.patch
  patch -Np0 -i ../link-grammar-panic.patch

  # Fix build with new gnutls 3.4.x
  patch -Np0 -i ../gnutls-3.4.0.patch

  # Fix libwpd 0.4 detection
  patch -Np1 -i ../abiword-3.0.1-libwps-0.4.patch

  # python2 fix
  sed -i 's/python -c/python2 -c/' src/gi-overrides/Makefile.{am,in}

  # Replace nonfree fonts support to liberation fonts
  patch -Np1 -i ../liberation-fonts.patch

  # Install missing m4 file
  install -m644 ../aiksaurus-plugin.m4 plugins/aiksaurus/plugin.m4
  install -m644 ../command-plugin.m4 plugins/command/plugin.m4

  # Generate m4 file for configure
  find plugins -name plugin.m4 | xargs cat > plugin-configure.m4

  libtoolize --force
  autoreconf -fi
}


build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr \
    --enable-shared \
    --disable-static \
    --enable-clipart \
    --enable-templates \
    --enable-plugins="aiksaurus applix babelfish bmp clarisworks collab docbook \
                      eml epub freetranslation garble gdict gimp goffice grammar \
                      hancom hrtext iscii kword latex loadbindings mathview mht \
                      mif mswrite opendocument openwriter openxml opml ots paint \
                      passepartout pdb pdf presentation psion s5 sdw t602 urldict \
                      wikipedia wmf wml wordperfect wpg xslfo" \
    --enable-introspection
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}