From patchwork Wed Nov 28 23:54:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 202575 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 4D2EA2C0081 for ; Thu, 29 Nov 2012 10:55:33 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 577DF1017BD; Wed, 28 Nov 2012 23:55:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nBT30b3jO0Cj; Wed, 28 Nov 2012 23:55:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 26E61101561; Wed, 28 Nov 2012 23:55:19 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D50618F74A for ; Wed, 28 Nov 2012 23:55:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AB0788A35F for ; Wed, 28 Nov 2012 23:55:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dz0BdYEXTWpH for ; Wed, 28 Nov 2012 23:55:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by whitealder.osuosl.org (Postfix) with ESMTPS id 48FF28A99B for ; Wed, 28 Nov 2012 23:55:11 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id hm2so4574042wib.10 for ; Wed, 28 Nov 2012 15:55:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=eOuujsySTUea7qQf+FCRhiIT53sxfg5yhwMdn1yY16Y=; b=BV7MbyF7/r+br1fZ8loq06yDQTsUnyjjGWXVKoC+iG8zSq+mo0BKt7O9z1+hro+C8a RXD7bjAWXTaGPh/EZlWI3WgHjFXeZXpaGQEJ1MFOHyHAaW63kZRtDUF1sYETLl6+gFZU 4oQXKP0q+ZhRO+dXz9kX5r4fUiOfAfmi9eeF/6LzGRsbn43HIG18j9d/olCdJRTuPm5G JOZk2splm6sLp5UCuqOdxd/LM3Hqz1hp1NiF8Yrvmbrc+yeH3+ZkxfSGjiJw0RblF+rE bf40UkNO7jTTC7qjKyW+2g/WkC9A7b856QsoL0EA6jAzIc8NxCeE83bUKWg4X6/uLx1z b9dQ== Received: by 10.180.98.67 with SMTP id eg3mr8887368wib.9.1354146909594; Wed, 28 Nov 2012 15:55:09 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-141-45.w90-32.abo.wanadoo.fr. [90.32.252.45]) by mx.google.com with ESMTPS id i6sm9076156wix.5.2012.11.28.15.55.08 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 28 Nov 2012 15:55:09 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Thu, 29 Nov 2012 00:54:00 +0100 Message-Id: <1354146890-27380-2-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1354146890-27380-1-git-send-email-yann.morin.1998@free.fr> References: <1354146890-27380-1-git-send-email-yann.morin.1998@free.fr> Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 01/51] package/cURL: fix static link whith openSSL X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net When openSSL is selected, cURL is configured to use it. But in this case, the libcurl.pc file /forgets/ to require link against -ldl. This can happen, for example, when BR2_PREFER_STATIC_LIB is not set, but an executable wants to be linked statically (for various reasons which are irrelevant here). Fix that by appending a 'Requires: openssl' line to libcurl.pc.in, but only if openSSL is enabled. As suggested by Arnout, do it in a post-patch hook, rather as a post-install hook. Cc: Arnout Vandecappelle Signed-off-by: "Yann E. MORIN" --- package/libcurl/libcurl.mk | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk index 8d8fdb4..888f6d0 100644 --- a/package/libcurl/libcurl.mk +++ b/package/libcurl/libcurl.mk @@ -25,17 +25,20 @@ else LIBCURL_CONF_OPT += --without-ssl endif +define LIBCURL_FIX_DOT_PC + printf 'Requires: openssl\n' >>$(@D)/libcurl.pc.in +endef +LIBCURL_POST_PATCH_HOOKS += $(if $(BR2_PACKAGE_OPENSSL),LIBCURL_FIX_DOT_PC) + define LIBCURL_TARGET_CLEANUP rm -rf $(TARGET_DIR)/usr/bin/curl-config \ $(if $(BR2_PACKAGE_CURL),,$(TARGET_DIR)/usr/bin/curl) 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 $(autotools-package))