libnsgif-0.2.1.recipe revision 29a666bb
1SUMMARY="A decoding library for GIF images"
2DESCRIPTION="Libnsgif is a decoding library for GIF image file format"
3HOMEPAGE="https://www.netsurf-browser.org/projects/libnsgif/"
4COPYRIGHT="2003-2018 The NetSurf Developers"
5LICENSE="MIT"
6REVISION="2"
7SOURCE_URI="https://download.netsurf-browser.org/libs/releases/libnsgif-$portVersion-src.tar.gz"
8CHECKSUM_SHA256="9eaea534cd70b53c5aaf45317ae957701685a6b4a88dbe34ed26f4faae879a4b"
9if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
10PATCHES="libnsgif-$portVersion-gcc2.patchset"
11fi
12
13ARCHITECTURES="x86_gcc2 x86 x86_64"
14SECONDARY_ARCHITECTURES="x86_gcc2 x86"
15
16libVersion="$portVersion"
17libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
18
19PROVIDES="
20	libnsgif$secondaryArchSuffix = $portVersion
21	lib:libnsgif$secondaryArchSuffix = $libVersionCompat
22	"
23REQUIRES="
24	haiku$secondaryArchSuffix
25	"
26
27PROVIDES_devel="
28	libnsgif${secondaryArchSuffix}_devel = $portVersion
29	devel:libnsgif$secondaryArchSuffix = $libVersion compat = $libVersionCompat
30	"
31REQUIRES_devel="
32	libnsgif$secondaryArchSuffix == $portVersion base
33	"
34
35BUILD_REQUIRES="
36	haiku${secondaryArchSuffix}_devel
37	"
38BUILD_PREREQUIRES="
39	netsurf_buildsystem >= 1.6
40	cmd:gcc$secondaryArchSuffix
41	cmd:make
42	"
43
44BUILD()
45{
46	for linkage in lib-static lib-shared; do
47		make PREFIX="$prefix" NSSHARED=/system/data/netsurf-buildsystem \
48			COMPONENT_TYPE=$linkage
49	done
50}
51
52INSTALL()
53{
54	for linkage in lib-static lib-shared; do
55		make PREFIX="$prefix" NSSHARED=/system/data/netsurf-buildsystem \
56			COMPONENT_TYPE=$linkage \
57			INCLUDEDIR=$relativeIncludeDir install \
58			LIBDIR=$relativeLibDir
59	done
60
61	prepareInstalledDevelLib libnsgif
62	fixPkgconfig
63
64	# devel package
65	packageEntries devel \
66		"$developDir"
67}
68