57 lines
1.7 KiB
Bash
57 lines
1.7 KiB
Bash
# Template file for 'devil'
|
|
pkgname=devil
|
|
version=1.7.8
|
|
revision=3
|
|
build_style=gnu-configure
|
|
configure_args="--enable-ILU --enable-ILUT --with-examples"
|
|
hostmakedepends="automake libtool pkg-config"
|
|
makedepends="lcms-devel libpng-devel libmng-devel jasper-devel
|
|
glew-devel libfreeglut-devel SDL_image-devel"
|
|
short_desc="Developer's Image Library"
|
|
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
|
license="LGPL-2.1"
|
|
homepage="http://openil.sourceforge.net/"
|
|
distfiles="${SOURCEFORGE_SITE}/openil/DevIL-${version}.tar.gz"
|
|
checksum=682ffa3fc894686156337b8ce473c954bf3f4fb0f3ecac159c73db632d28a8fd
|
|
|
|
if [ -z "$CROSS_BUILD" ]; then
|
|
makedepends+=" libopenexr-devel"
|
|
fi
|
|
|
|
pre_configure() {
|
|
autoreconf -if
|
|
# Replace obsolete libpng function names
|
|
sed -e "s;png_set_gray_1_2_4_to_8;png_set_expand_gray_1_2_4_to_8;" \
|
|
-i ${wrksrc}/src-IL/src/il_png.c
|
|
sed -e "s;png_set_gray_1_2_4_to_8;png_set_expand_gray_1_2_4_to_8;" \
|
|
-i ${wrksrc}/src-IL/src/il_icon.c
|
|
}
|
|
|
|
post_configure() {
|
|
# Disable RESTRICT_KEYWORD for gcc5 and newer
|
|
if [ ${XBPS_GCC_VERSION_MAJOR} -gt 4 ]; then
|
|
sed -i include/IL/config.h \
|
|
-e's;#define RESTRICT_KEYWORD.*;#undef RESTRICT_KEYWORD;'
|
|
fi
|
|
}
|
|
|
|
devil-devel_package() {
|
|
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmkdir usr/share/doc/devil
|
|
cp -aR docs/html docs/images ${PKGDESTDIR}/usr/share/doc/devil
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|
|
devil-examples_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - examples"
|
|
pkg_install() {
|
|
vmove usr/share/devil/examples
|
|
cp -aR ${wrksrc}/examples/* ${PKGDESTDIR}/usr/share/devil/examples
|
|
}
|
|
}
|