tiff4-4.1.0.recipe revision e96386d7
1SUMMARY="A library to read/write TIFF images"
2DESCRIPTION="TIFF the Tag Image File Format, is a widely used format for \
3storing image data. Included in this software is a library, libtiff, for \
4reading and writing TIFF and a small collection of tools for doing simple \
5manipulations of TIFF images."
6HOMEPAGE="http://www.libtiff.org/"
7COPYRIGHT="1988-1997 Sam Leffler
8	1991-1997 Silicon Graphics, Inc."
9LICENSE="MIT"
10REVISION="1"
11SOURCE_URI="https://download.osgeo.org/libtiff/tiff-$portVersion.tar.gz"
12CHECKSUM_SHA256="5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634"
13SOURCE_DIR="tiff-$portVersion"
14PATCHES="tiff4-$portVersion.patchset"
15
16ARCHITECTURES="x86_gcc2 x86 x86_64"
17SECONDARY_ARCHITECTURES="x86_gcc2 x86"
18
19libVersion="5.5.0"
20libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
21portVersionCompat="$portVersion compat >= ${portVersion%%.*}"
22
23PROVIDES="
24	tiff4$secondaryArchSuffix = $portVersionCompat
25	lib:libtiff$secondaryArchSuffix = $libVersionCompat
26	lib:libtiffxx$secondaryArchSuffix = $libVersionCompat
27	"
28REQUIRES="
29	haiku$secondaryArchSuffix
30	lib:libjpeg$secondaryArchSuffix
31	lib:libz$secondaryArchSuffix
32	"
33
34PROVIDES_devel="
35	tiff4${secondaryArchSuffix}_devel = $portVersionCompat
36	devel:libtiff$secondaryArchSuffix = $libVersionCompat
37	devel:libtiffxx$secondaryArchSuffix = $libVersionCompat
38	"
39REQUIRES_devel="
40	tiff4$secondaryArchSuffix == $portVersion base
41	"
42CONFLICTS_devel="
43	tiff${secondaryArchSuffix}_devel
44	"
45
46if [ -z "$secondaryArchSuffix" ]; then
47	SUMMARY_tools="The TIFF tools"
48	PROVIDES_tools="
49		tiff4_tools = $portVersion
50		cmd:fax2ps
51		cmd:fax2tiff
52		cmd:pal2rgb
53		cmd:ppm2tiff
54		cmd:raw2tiff
55#		cmd:rgb2ycbcr
56#		cmd:thumbnail
57		cmd:tiff2bw
58		cmd:tiff2pdf
59		cmd:tiff2ps
60		cmd:tiff2rgba
61		cmd:tiffcmp
62		cmd:tiffcp
63		cmd:tiffcrop
64		cmd:tiffdither
65		cmd:tiffdump
66#		cmd:tiffgt
67		cmd:tiffinfo
68		cmd:tiffmedian
69		cmd:tiffset
70		cmd:tiffsplit
71		"
72	REQUIRES_tools="
73		haiku
74		tiff4 == $portVersion base
75		lib:libjpeg
76		lib:libz
77		"
78fi
79
80BUILD_REQUIRES="
81	haiku${secondaryArchSuffix}_devel
82	devel:libjpeg$secondaryArchSuffix >= 9
83	devel:libz$secondaryArchSuffix
84	"
85BUILD_PREREQUIRES="
86	cmd:aclocal
87	cmd:autoconf
88	cmd:automake
89	cmd:gcc$secondaryArchSuffix
90	cmd:ld$secondaryArchSuffix
91	cmd:libtoolize$secondaryArchSuffix
92	cmd:make
93	"
94
95debugList=(
96	"$libDir"/libtiff.so.$libVersion
97	"$libDir"/libtiffxx.so.$libVersion
98	)
99if [ -z "$secondaryArchSuffix" ]; then
100	for i in `echo "$PROVIDES_tools" | sed -n -e "s/^\s*cmd://p"`; do
101		debugList+=("${binDir/$portName/${portName}_tools}"/$i)
102	done
103fi
104defineDebugInfoPackage $portName "${debugList[@]}"
105
106PATCH()
107{
108	if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
109		sed -i \
110			-e 's/ios::pos_type/streampos/g' \
111			-e 's/ios::off_type/streamoff/g' \
112			libtiff/tif_stream.cxx
113	fi
114}
115
116BUILD()
117{
118	autoreconf -fi
119	runConfigure ./configure --with-docdir=$documentationDir/$portName
120	make $jobArgs
121}
122
123INSTALL()
124{
125	make install
126
127	rm -f $libDir/libtiff*.la
128	prepareInstalledDevelLibs libtiff libtiffxx
129	fixPkgconfig
130
131	# devel package
132	packageEntries devel \
133		$developDir
134
135	# tools package
136	if [ -z "$secondaryArchSuffix" ]; then
137		packageEntries tools \
138			$binDir \
139			$documentationDir
140	fi
141
142	# Remove stuff we don't need in the secondary architecture base package.
143	if [ -n "$secondaryArchSuffix" ]; then
144		rm -rf $binDir
145		rm -rf $documentationDir
146	fi
147}
148
149TEST()
150{
151	make check
152}
153