1SUMMARY="C library for the Flickr API"
2DESCRIPTION="Flickcurl is a C library for the Flickr API, handling creating the \
3requests, signing, token management, calling the API, marshalling \
4request parameters and decoding responses. Flickcurl supports all \
5of the API (see Flickcurl API coverage for details) including the \
6functions for photo/video uploading, browsing, searching, adding \
7and editing comments, groups, notes, photosets, categories, activity, \
8blogs, favorites, places, tags, machine tags, institutions, \
9pandas and photo/video metadata. It also includes a program flickrdf to \
10turn photo metadata, tags, machine tags and places into an RDF triples \
11description."
12HOMEPAGE="https://librdf.org/flickcurl/"
13COPYRIGHT="2007-2014 David Beckett
14	2007 Vanilla I. Shu"
15LICENSE="GNU LGPL v2.1"
16REVISION="8"
17SOURCE_URI="http://download.dajobe.org/flickcurl/flickcurl-$portVersion.tar.gz"
18CHECKSUM_SHA256="ff42a36c7c1c7d368246f6bc9b7d792ed298348e5f0f5d432e49f6803562f5a3"
19PATCHES="flickcurl-$portVersion.patchset"
20
21ARCHITECTURES="all"
22SECONDARY_ARCHITECTURES="x86_gcc2 x86"
23
24libVersion="0.0.0"
25libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
26
27PROVIDES="
28	flickcurl$secondaryArchSuffix = $portVersion compat >= 1
29	cmd:flickcurl$secondaryArchSuffix
30	cmd:flickrdf$secondaryArchSuffix
31	lib:libflickcurl$secondaryArchSuffix = $libVersionCompat
32	"
33REQUIRES="
34	haiku$secondaryArchSuffix
35	lib:libcrypto$secondaryArchSuffix # required by libcurl
36	lib:libcurl$secondaryArchSuffix
37	lib:libssl$secondaryArchSuffix # required by libcurl
38	lib:libxml2$secondaryArchSuffix
39	lib:libz$secondaryArchSuffix # required by libcurl and libxml2
40	"
41
42PROVIDES_devel="
43	flickcurl${secondaryArchSuffix}_devel = $portVersion compat >= 1
44	cmd:flickcurl_config$secondaryArchSuffix
45	devel:libflickcurl$secondaryArchSuffix = $libVersionCompat
46	"
47REQUIRES_devel="
48	flickcurl$secondaryArchSuffix == $portVersion base
49	"
50
51BUILD_REQUIRES="
52	haiku${secondaryArchSuffix}_devel
53	devel:libcurl$secondaryArchSuffix
54	devel:libxml2$secondaryArchSuffix
55	"
56BUILD_PREREQUIRES="
57	cmd:aclocal
58	cmd:autoconf
59	cmd:automake
60	cmd:gcc$secondaryArchSuffix
61	cmd:gtkdocize
62	cmd:ld$secondaryArchSuffix
63	cmd:libtoolize$secondaryArchSuffix
64	cmd:make
65	cmd:pkg_config$secondaryArchSuffix
66	"
67
68defineDebugInfoPackage flickcurl$secondaryArchSuffix \
69	$binDir/flickcurl \
70	$binDir/flickrdf \
71	$libDir/libflickcurl.so.$libVersion
72
73BUILD()
74{
75	autoreconf -fi
76	runConfigure ./configure --with-xml2-config=no \
77		--with-curl-config=no \
78		--disable-static
79	make $jobArgs
80}
81
82INSTALL()
83{
84	make install
85
86	# remove libtool library file
87	rm $libDir/libflickcurl.la
88
89	prepareInstalledDevelLib libflickcurl
90	fixPkgconfig
91
92	# devel package
93	packageEntries devel \
94		$binDir/flickcurl-config \
95		$developDir
96}
97