zlib-1.2.11.recipe revision 99901b49
1SUMMARY="A massively spiffy yet delicately unobtrusive compression library"
2DESCRIPTION="Zlib is designed to be a free, general-purpose, legally \
3unencumbered -- that is, not covered by any patents -- lossless \
4data-compression library for use on virtually any computer hardware and \
5operating system. The zlib data format is itself portable across platforms.
6
7Unlike the LZW compression method used in Unix compress(1) and in the GIF \
8image format, the compression method currently used in zlib essentially never \
9expands the data. (LZW can double or triple the file size in extreme cases.) \
10zlib's memory footprint is also independent of the input data and can be \
11reduced, if necessary, at some cost in compression."
12HOMEPAGE="http://www.zlib.net/"
13COPYRIGHT="1995-2017 Jean-loup Gailly and Mark Adler"
14LICENSE="Zlib"
15REVISION="3"
16SOURCE_URI="http://zlib.net/fossils/zlib-$portVersion.tar.gz"
17CHECKSUM_SHA256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"
18PATCHES="zlib-$portVersion.patchset"
19
20ARCHITECTURES="x86_gcc2 x86 x86_64 arm ?ppc"
21SECONDARY_ARCHITECTURES="x86_gcc2 x86"
22
23PROVIDES="
24	zlib$secondaryArchSuffix = $portVersion compat >= 1
25	lib:libz$secondaryArchSuffix = $portVersion compat >= 1
26	"
27REQUIRES="
28	haiku$secondaryArchSuffix
29	"
30
31SUMMARY_devel="The zlib development files"
32PROVIDES_devel="
33	zlib${secondaryArchSuffix}_devel = $portVersion compat >= 1
34	devel:libz$secondaryArchSuffix = $portVersion compat >= 1
35	"
36REQUIRES_devel="
37	zlib$secondaryArchSuffix == $portVersion base
38	"
39
40BUILD_REQUIRES="
41	haiku${secondaryArchSuffix}_devel
42	"
43BUILD_PREREQUIRES="
44	cmd:cmake
45	cmd:gcc$secondaryArchSuffix
46	cmd:grep
47	cmd:ld$secondaryArchSuffix
48	cmd:make
49	cmd:sed
50	"
51
52PATCH()
53{
54	sed -i 's,${CMAKE_INSTALL_PREFIX}/bin',$binDir, CMakeLists.txt
55	sed -i 's,${CMAKE_INSTALL_PREFIX}/include',$includeDir, CMakeLists.txt
56	sed -i 's,${CMAKE_INSTALL_PREFIX}/lib',$libDir, CMakeLists.txt
57	sed -i 's,${CMAKE_INSTALL_PREFIX}/share/man',$manDir, CMakeLists.txt
58	sed -i 's,${CMAKE_INSTALL_PREFIX}/share/pkgconfig',$developLibDir/pkgconfig, \
59		CMakeLists.txt
60}
61
62BUILD()
63{
64	rm -rf build
65	mkdir build
66	cd build
67
68	cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix ..
69	make $jobArgs
70}
71
72INSTALL()
73{
74	cd build
75	make install
76
77	touch $libDir/libz.so.1
78
79	prepareInstalledDevelLib libz
80
81	# devel package
82	packageEntries devel \
83		$developDir \
84		$documentationDir
85}
86