void-packages/srcpkgs/freeimage/template
Jürgen Buchmüller 1abaa947b1
freeimage: update to 3.18.0
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2018-08-01 15:18:54 +02:00

70 lines
1.8 KiB
Bash

# Template file for 'freeimage'
pkgname=freeimage
version=3.18.0
revision=1
wrksrc=FreeImage
build_style=gnu-makefile
hostmakedepends="unzip"
short_desc="Support library for popular graphics image formats"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-2.0-or-later FIPL"
homepage="http://freeimage.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/freeimage/Source%20Distribution/FreeImage${version//./}.zip"
checksum=f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd
CFLAGS="-fPIC -DPIC -fexceptions -fvisibility=hidden"
CXXFLAGS="${CFLAGS} -Wno-ctor-dtor-privacy"
subpackages="freeimage-plus freeimage-devel freeimage-plus-devel"
post_extract() {
mkdir /tmp/fi
mv ${wrksrc}/* /tmp/fi
cp -a /tmp/fi ${wrksrc}/fip
mv /tmp/fi ${wrksrc}
}
do_build() {
cd ${wrksrc}/fi
make ${makejobs}
cd ${wrksrc}/fip
make -f Makefile.fip ${makejobs}
}
do_install() {
cd ${wrksrc}/fi
make DESTDIR="${DESTDIR}" install
vlicense license-fi.txt LICENSE
}
freeimage-plus_package() {
short_desc+=" (plus)"
pkg_install() {
cd ${wrksrc}/fip
make -f Makefile.fip DESTDIR="${PKGDESTDIR}" install
vlicense license-fi.txt LICENSE
}
}
freeimage-devel_package() {
short_desc+=" - development files"
depends="freeimage>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/libfreeimage.a
vmove usr/lib/libfreeimage.so
}
}
freeimage-plus-devel_package() {
short_desc+=" (plus) - development files"
depends="freeimage-plus>=${version}_${revision}"
pkg_install() {
DESTDIR="${DESTDIR/freeimage-/freeimage-plus-}"
vmove usr/include
vmove usr/lib/libfreeimageplus.a
vmove usr/lib/libfreeimageplus.so
# vmkdir usr/lib
# mv ${_destdir}/usr/include ${PKGDESTDIR}/usr
# mv ${_destdir}/usr/lib/libfreeimageplus.{a,so} ${PKGDESTDIR}/usr/lib
}
}