libharu-2.3.0.recipe revision 42668535
1SUMMARY="C/C++ library for PDF generation"
2DESCRIPTION="
3Haru is a free, cross platform, open-sourced software library for generating \
4PDF. It supports the following features.
5   1. Generating PDF files with lines, text, images.
6   2. Outline, text annotation, link annotation.
7   3. Compressing document with deflate-decode.
8   4. Embedding PNG, Jpeg images.
9   5. Embedding Type1 font and TrueType font.
10   6. Creating encrypted PDF files.
11   7. Using various character set (ISO8859-1~16, MSCP1250~8, KOI8-R).
12   8. Supporting CJK fonts and encodings.
13"
14HOMEPAGE="http://www.libharu.org/"
15COPYRIGHT="
16	2000-2006 Takeshi Kanno
17	2007-2009 Antony Dovgal et al.
18	"
19LICENSE="Zlib"
20REVISION="3"
21SOURCE_URI="https://github.com/libharu/libharu/archive/RELEASE_2_3_0.tar.gz"
22CHECKSUM_SHA256="8f9e68cc5d5f7d53d1bc61a1ed876add1faf4f91070dbc360d8b259f46d9a4d2"
23SOURCE_FILENAME="libharu-$portVersion.tar.gz"
24SOURCE_DIR="libharu-RELEASE_2_3_0"
25PATCHES="libharu-$portVersion.patchset"
26
27ARCHITECTURES="x86_gcc2 x86 ?x86_64"
28SECONDARY_ARCHITECTURES="x86_gcc2 x86"
29
30PROVIDES="
31	libharu$secondaryArchSuffix = $portVersion compat >= 2
32	lib:libhpdf$secondaryArchSuffix = 2.3.0 compat >= 2
33	"
34REQUIRES="
35	haiku$secondaryArchSuffix
36	lib:libpng16$secondaryArchSuffix
37	lib:libz$secondaryArchSuffix
38	"
39
40PROVIDES_devel="
41	libharu${secondaryArchSuffix}_devel = $portVersion compat >= 2
42	devel:libhpdf$secondaryArchSuffix = 2.3.0 compat >= 2
43	"
44REQUIRES_devel="
45	libharu$secondaryArchSuffix == $portVersion base
46	"
47
48BUILD_REQUIRES="
49	haiku${secondaryArchSuffix}_devel
50	devel:libpng16$secondaryArchSuffix
51	devel:libz$secondaryArchSuffix
52	"
53BUILD_PREREQUIRES="
54	cmd:cmake
55	cmd:gcc$secondaryArchSuffix
56	cmd:ld$secondaryArchSuffix
57	cmd:make
58	"
59
60BUILD()
61{
62	rm -rf build
63	mkdir build
64	cd build
65
66	cmake -DCMAKE_INSTALL_PREFIX=$prefix \
67		-DCMAKE_BUILD_TYPE=release ..
68	make $jobArgs
69}
70
71INSTALL()
72{
73	cd build
74	make install
75
76	if [ -n "$secondaryArchSuffix" ]; then
77		mv $prefix/lib $prefix/lib2
78		mkdir -p $libDir
79		mv $prefix/lib2/* $libDir/
80		rmdir $prefix/lib2
81	fi
82
83	mv $libDir/libhpdfs.a $libDir/libhpdf.a
84	mv $libDir/libhpdf.so $libDir/libhpdf.so.2.3
85	ln -s libhpdf.so.2.3 $libDir/libhpdf.so
86	prepareInstalledDevelLibs libhpdf
87
88	# devel package
89	packageEntries devel \
90		$developDir
91}
92