blob: 9c9485dde9869b4b880a5722df1ecd8e4d259a51 (
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 < aur at pingplug dot me >
# Contributor: Schala Zeal < schalaalexiazeal at gmail dot com >
# Contributor: ant32 < antreimer at gmail dot com >
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
pkgname=mingw-w64-poppler
pkgver=21.04.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=('5e2219656c6bbd36154133fef2e12b7d0938464518827098b29a10b1697ea79c')
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 rm {} \;
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:
|