blob: 3c8c5a107a4a1d3061e70d301f08626a9347f640 (
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
|
# Maintainer: pingplug <pingplug@foxmail.com>
# Contributor: Schala Zeal <schalaalexiazeal@gmail.com>
# Contributor: ant32 <antreimer@gmail.com>
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
pkgname=mingw-w64-poppler
pkgver=0.76.0
pkgrel=1
pkgdesc="PDF rendering library based on xpdf 3.0 (mingw-w64)"
arch=('any')
url="https://poppler.freedesktop.org"
license=('GPL')
depends=('mingw-w64-openjpeg2'
'mingw-w64-cairo')
optdepends=('mingw-w64-glib2: libpoppler-glib'
'mingw-w64-qt5-base: libpoppler-qt5')
makedepends=('mingw-w64-cmake'
'mingw-w64-glib2'
'mingw-w64-icu'
'mingw-w64-curl'
'python')
options=('!strip' 'staticlibs' '!buildflags')
source=("https://poppler.freedesktop.org/poppler-${pkgver}.tar.xz")
sha256sums=('370f5fcfe2bbf0c76fc394d338cd72ed7f2044b67f4eb4b115eb074ccfc70d63')
prepare() {
cd "${srcdir}/poppler-${pkgver}/utils"
# they moved gstrndup() to copyString() but forgot pdftocairo-win32.cc
sed -i 's|gstrndup|copyString|g' pdftocairo-win32.cc
}
build() {
cd "${srcdir}/poppler-${pkgver}"
for _arch in ${_architectures}; do
mkdir -p "${_arch%%-*}" && pushd "${_arch%%-*}"
${_arch}-cmake \
-DBUILD_CPP_TESTS=NO \
-DBUILD_GTK_TESTS=NO \
-DBUILD_QT5_TESTS=NO \
..
make
popd
done
}
package() {
for _arch in ${_architectures}; do
cd "${srcdir}/poppler-${pkgver}/${_arch%%-*}"
make DESTDIR="${pkgdir}" install
find "${pkgdir}/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip {} \;
find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
find "${pkgdir}/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
done
}
# vim:set ts=2 sw=2 et:
|