libcurl: fix up prefix in curl-config
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 2 Jun 2012 06:13:52 +0000 (06:13 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 11 Jun 2012 20:35:45 +0000 (22:35 +0200)
While most packages that rely on libcurl use pkg-config, a few
packages (such as libxmlrpc) still use curl-config. So we need to fix
up the prefix locations in the curl-config script installed in
STAGING_DIR.

[Peter: only fixup if prefix=/usr]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/libcurl/libcurl.mk

index e8f13bb4c6f145d0bbc00b4b7ce8354e81f08ae6..50a55b4de03810ffd4bdde66d3ae2682aba0bf27 100644 (file)
@@ -30,6 +30,12 @@ endef
 
 LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_CLEANUP
 
+define LIBCURL_STAGING_FIXUP_CURL_CONFIG
+       $(SED) "s,prefix=/usr,prefix=$(STAGING_DIR)/usr," $(STAGING_DIR)/usr/bin/curl-config
+endef
+
+LIBCURL_POST_INSTALL_STAGING_HOOKS += LIBCURL_STAGING_FIXUP_CURL_CONFIG
+
 $(eval $(call AUTOTARGETS))
 
 curl: libcurl