From 79b8c229c6958fa695d905b52f7ceba7eaddeef8 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Fri, 10 Oct 2014 15:47:47 +0000 Subject: [PATCH] flickcurl: add recipe for version 1.26 --- media-libs/flickcurl/flickcurl-1.26.recipe | 95 +++++++++++++++++++ .../flickcurl/patches/flickcurl-1.26.patchset | 51 ++++++++++ 2 files changed, 146 insertions(+) create mode 100644 media-libs/flickcurl/flickcurl-1.26.recipe create mode 100644 media-libs/flickcurl/patches/flickcurl-1.26.patchset diff --git a/media-libs/flickcurl/flickcurl-1.26.recipe b/media-libs/flickcurl/flickcurl-1.26.recipe new file mode 100644 index 000000000..9313814d0 --- /dev/null +++ b/media-libs/flickcurl/flickcurl-1.26.recipe @@ -0,0 +1,95 @@ +SUMMARY="C library for the Flickr API" +DESCRIPTION=" +Flickcurl is a C library for the Flickr API, handling creating the \ +requests, signing, token management, calling the API, marshalling \ +request parameters and decoding responses. Flickcurl supports all \ +of the API (see Flickcurl API coverage for details) including the \ +functions for photo/video uploading, browsing, searching, adding \ +and editing comments, groups, notes, photosets, categories, activity, \ +blogs, favorites, places, tags, machine tags, institutions, \ +pandas and photo/video metadata. It also includes a program flickrdf to \ +turn photo metadata, tags, machine tags and places into an RDF triples \ +description. +" +HOMEPAGE="http://librdf.org/flickcurl/" +COPYRIGHT=" + 2007-2014 David Beckett + 2007 Vanilla I. Shu +" +LICENSE=" +GNU LGPL v2.1 +" +SRC_URI="http://download.dajobe.org/flickcurl/flickcurl-$portVersion.tar.gz" +CHECKSUM_SHA256="ff42a36c7c1c7d368246f6bc9b7d792ed298348e5f0f5d432e49f6803562f5a3" +REVISION="1" +ARCHITECTURES="x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86_gcc2 x86" + +PATCHES="flickcurl-$portVersion.patchset" + +PROVIDES=" + flickcurl$secondaryArchSuffix = $portVersion compat >= 1 + lib:libflickcurl$secondaryArchSuffix = 0.0.0 compat >= 0 + cmd:flickcurl$secondaryArchSuffix + cmd:flickrdf$secondaryArchSuffix + " +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libcurl$secondaryArchSuffix + lib:libxml2$secondaryArchSuffix + # required by libcurl and libxml2 + lib:libz$secondaryArchSuffix + # required by libcurl + lib:libssl$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + devel:libcurl$secondaryArchSuffix + devel:libxml2$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:libtoolize + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + autoreconf -fi + runConfigure ./configure --with-xml2-config=no \ + --with-curl-config=no + make $jobArgs +} + +INSTALL() +{ + make install + + # remove libtool library file + rm $libDir/libflickcurl.la + + prepareInstalledDevelLibs libflickcurl + fixPkgconfig + + # devel package + packageEntries devel \ + $binDir/flickcurl-config \ + $developDir +} + +# ----- devel package ------------------------------------------------------- + +PROVIDES_devel=" + flickcurl${secondaryArchSuffix}_devel = $portVersion compat >= 1 + cmd:flickcurl_config$secondaryArchSuffix + devel:libflickcurl$secondaryArchSuffix = 0.0.0 compat >= 0 + " +REQUIRES_devel=" + flickcurl$secondaryArchSuffix == $portVersion base + " diff --git a/media-libs/flickcurl/patches/flickcurl-1.26.patchset b/media-libs/flickcurl/patches/flickcurl-1.26.patchset new file mode 100644 index 000000000..2e96da11a --- /dev/null +++ b/media-libs/flickcurl/patches/flickcurl-1.26.patchset @@ -0,0 +1,51 @@ +From 38c2f2d203dbae75d1c7a54933e8607a08cdfc60 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Fri, 10 Oct 2014 15:38:14 +0000 +Subject: On Haiku use the user settings directory. + + +diff --git a/utils/cmdline.c b/utils/cmdline.c +index 3e5ca8d..ada74fa 100644 +--- a/utils/cmdline.c ++++ b/utils/cmdline.c +@@ -37,6 +37,10 @@ + + #include + ++#ifdef __HAIKU__ ++#include ++#include ++#endif + + /* private to this module */ + #define CONFIG_FILENAME_LEN 15 +@@ -50,15 +54,26 @@ char* flickcurl_cmdline_config_path = NULL; + int + flickcurl_cmdline_init(void) + { ++#ifdef __HAIKU__ ++ char settingsPath[B_PATH_NAME_LENGTH]; ++#endif + size_t config_len = CONFIG_FILENAME_LEN; + const char* home; + + if(flickcurl_cmdline_config_path) + return 0; + ++#ifndef __HAIKU__ + home = getenv("HOME"); + if(home) + config_len += strlen(home) + 1; ++#else ++ if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, true, settingsPath, ++ sizeof(settingsPath)) == B_OK) { ++ home = settingsPath; ++ } else ++ home = NULL; ++#endif + + flickcurl_cmdline_config_path = malloc(config_len + 1); + if(!flickcurl_cmdline_config_path) +-- +1.8.3.4 +