blob: 53c61ac1048f347eab0069064ed43675dfc0ac81 (
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
|
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Laurent Carlier <lordheavym@archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: TheHoff <forums>
_android_arch=x86-64
pkgname=android-${_android_arch}-devil
pkgver=1.8.0
pkgrel=3
arch=('any')
pkgdesc="Library for reading several different image formats (Android ${_android_arch})"
url="https://sourceforge.net/projects/openil/"
license=('GPL')
depends=("android-${_android_arch}-libpng"
"android-${_android_arch}-jasper"
"android-${_android_arch}-lcms2"
"android-${_android_arch}-libjpeg-turbo")
makedepends=('android-cmake')
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://downloads.sourceforge.net/openil/DevIL-${pkgver}.tar.gz"
'jasper.patch')
sha256sums=('0075973ee7dd89f0507873e2580ac78336452d29d34a07134b208f44e2feb709'
'a3e1009e70be5a159250e3ea30d39f5aef1fa23eacece79e72deda51d7200159')
prepare() {
cd "${srcdir}/DevIL"
# https://github.com/DentonW/DevIL/commit/42a62648e727e9a0217280474546de3ac69cbff1
patch -Np1 -i ../jasper.patch
sed -i 's| SHARED | |g' DevIL/src-IL/CMakeLists.txt
sed -i 's| SHARED | |g' DevIL/src-ILU/CMakeLists.txt
sed -i 's| SHARED | |g' DevIL/src-ILUT/CMakeLists.txt
sed -i 's|register ||g' DevIL/src-IL/src/il_manip.cpp
}
build() {
cd "${srcdir}/DevIL/DevIL"
source android-env ${_android_arch}
android-${_android_arch}-cmake \
-S . \
-B build-shared \
-DBUILD_SHARED_LIBS=ON \
-DPNG_PNG_INCLUDE_DIR="${ANDROID_PREFIX_INCLUDE}/libpng" \
-DPNG_LIBRARY="${ANDROID_PREFIX_LIB}/libpng.so" \
-DTIFF_INCLUDE_DIR="${ANDROID_PREFIX_INCLUDE}" \
-DTIFF_LIBRARY="${ANDROID_PREFIX_LIB}/libtiff.so" \
-DJPEG_INCLUDE_DIR="${ANDROID_PREFIX_INCLUDE}" \
-DJPEG_LIBRARY="${ANDROID_PREFIX_LIB}/libjpeg.so" \
-DJASPER_INCLUDE_DIR="${ANDROID_PREFIX_INCLUDE}" \
-DJASPER_LIBRARIES="${ANDROID_PREFIX_LIB}/libjasper.so" \
-DLCMS2_INCLUDE_DIR="${ANDROID_PREFIX_INCLUDE}" \
-DLCMS2_LIBRARY="${ANDROID_PREFIX_LIB}/liblcms2.so"
make -C build-shared $MAKEFLAGS
export LDFLAGS="${LDFLAGS} -ljbig -ldeflate -llzma -lwebp -lzstd"
android-${_android_arch}-cmake \
-S . \
-B build-static \
-DBUILD_SHARED_LIBS=OFF \
-DPNG_PNG_INCLUDE_DIR="${ANDROID_PREFIX_INCLUDE}/libpng" \
-DPNG_LIBRARY="${ANDROID_PREFIX_LIB}/libpng.a" \
-DTIFF_INCLUDE_DIR="${ANDROID_PREFIX_INCLUDE}" \
-DTIFF_LIBRARY="${ANDROID_PREFIX_LIB}/libtiff.a" \
-DJPEG_INCLUDE_DIR="${ANDROID_PREFIX_INCLUDE}" \
-DJPEG_LIBRARY="${ANDROID_PREFIX_LIB}/libjpeg.a" \
-DJASPER_INCLUDE_DIR="${ANDROID_PREFIX_INCLUDE}" \
-DJASPER_LIBRARIES="${ANDROID_PREFIX_LIB}/libjasper.a" \
-DLCMS2_INCLUDE_DIR="${ANDROID_PREFIX_INCLUDE}" \
-DLCMS2_LIBRARY="${ANDROID_PREFIX_LIB}/liblcms2.a"
make -C build-static $MAKEFLAGS
}
package() {
cd "${srcdir}/DevIL/DevIL"
source android-env ${_android_arch}
make -C build-shared DESTDIR="$pkgdir" install
make -C build-static DESTDIR="$pkgdir" install
${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so
${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a
}
|