From patchwork Sun Apr 14 15:51:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1085331 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nRnCeXXI"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44hx313khqz9sB3 for ; Mon, 15 Apr 2019 01:52:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5394921F68; Sun, 14 Apr 2019 15:52:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k3huf9MOTn3x; Sun, 14 Apr 2019 15:52:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 90E9C22721; Sun, 14 Apr 2019 15:52:04 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D74EC1BF389 for ; Sun, 14 Apr 2019 15:52:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D081C87360 for ; Sun, 14 Apr 2019 15:52:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s-Q1zz2MAkcs for ; Sun, 14 Apr 2019 15:52:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id 7E3B4870A1 for ; Sun, 14 Apr 2019 15:52:01 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id c1so17331773wml.4 for ; Sun, 14 Apr 2019 08:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3/GW9RlXpcvPfOSyT0SlvQRC5RKGepljL1S+1Reui4g=; b=nRnCeXXIlCHT/Iyl7ke/IvTziZ/NfrtxfoqR1l96ZGOres5sOt/GrDrnBJAHK4SBrx kq8F7nYMc+mLD1qXhGuaG5k4aW8pOOHhUSrze5Ww2Gl+0ga98FeTOCv83CXdicFwAZB7 o8zxbYmEGTZVguX6HWfsx5yPiA/slM/PERdNZLlFWUNMZHtR7jioJTRKgLyAOcq5bV4V stRimbFcrzyQYbijYw0t2CWjpHJDlcvSLJ6EHiMm0paVheSZhR4CU2hmG666AwynAoA6 SP1aQxd89tdpJrKWOMjBEGlJ/Rx2C+xjk7Ixyf25ucRcaqRIzbTAzP88asytEl2vXNvY 2+PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3/GW9RlXpcvPfOSyT0SlvQRC5RKGepljL1S+1Reui4g=; b=S9tG2o2IItH/w9H+5HZ2VKEvtsHmeDIDmGsLJkv7wehhOJdu5atcL0GBVKjrJVhBMx FfNWgOkVi98IRuqdMIJU5eQK5279dTbDxs+YwbjhkGs0Myn37JhgE3pKK+5iwVqs/uUw lZdIYf6r2ThFLl+O9hEdpUg2sWJOrNwGzvky2ilDs8IrNpr8Vt0urgbDZaLrhEU98QHD t3t/hqjarNzRlR15YrCDc9DpBWTpEqx2MgbuekqlrtVaXUI8W8+NZ8HpB+rAlkcXiRRN r3hLUBgZ+OS6vaTIOj6GxuQy3Ag/rhEFKj6CoKoc2SDPiD0Mc6AhGa8TXK/PyBG9/mTr z3Hw== X-Gm-Message-State: APjAAAVnswGwVMRI6arjhoB8d8/sUQaDXjxXBP8h5YQRsHXvDrUEolIl gnu+9QyHRAEwMp6yW+gTLCjZ+G5v X-Google-Smtp-Source: APXvYqwGmw2IrxIO2LQb/riQdSR50nsAn/QY7BIxt9Rppdv5TEjXKM5xCQCPcCCnGlzY/0qVPJMBiA== X-Received: by 2002:a1c:1d49:: with SMTP id d70mr18929591wmd.36.1555257119640; Sun, 14 Apr 2019 08:51:59 -0700 (PDT) Received: from kali.home (lfbn-ren-1-314-196.w2-10.abo.wanadoo.fr. [2.10.15.196]) by smtp.gmail.com with ESMTPSA id h18sm56082412wrt.97.2019.04.14.08.51.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Apr 2019 08:51:58 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Sun, 14 Apr 2019 17:51:53 +0200 Message-Id: <20190414155153.4317-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2, 1/1] package/ngircd: fix static build with openssl and atomic X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes: - http://autobuild.buildroot.org/results/72345ebd144bed824329618e66721a98eba3be22 Signed-off-by: Fabrice Fontaine --- Changes v1 -> v2 (after review of Thomas Petazzoni): - Do not call autogen.sh, use AUTORECONF and apply the same tweaks than autogen.sh to remove de-ANSI-fication ...-pkg-config-to-find-openssl-dependen.patch | 35 +++++++++++++++++++ package/ngircd/ngircd.mk | 23 ++++++++++-- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 package/ngircd/0001-configure.ng-use-pkg-config-to-find-openssl-dependen.patch diff --git a/package/ngircd/0001-configure.ng-use-pkg-config-to-find-openssl-dependen.patch b/package/ngircd/0001-configure.ng-use-pkg-config-to-find-openssl-dependen.patch new file mode 100644 index 0000000000..bf05f99dc4 --- /dev/null +++ b/package/ngircd/0001-configure.ng-use-pkg-config-to-find-openssl-dependen.patch @@ -0,0 +1,35 @@ +From 75f669b9a00a76f0abf35cce8b9f80711aff7600 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Thu, 11 Apr 2019 23:24:36 +0200 +Subject: [PATCH] configure.ng: use pkg-config to find openssl dependencies + +openssl can depends on lz or latomic so use pkg-config to find those +dependencies and fallback to existing mechanism + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/ngircd/ngircd/pull/256] +--- + configure.ng | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/configure.ng b/configure.ng +index 57ae8bb8..899d00f7 100644 +--- a/configure.ng ++++ b/configure.ng +@@ -464,8 +464,11 @@ AC_ARG_WITH(openssl, + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi +- AC_CHECK_LIB(crypto, BIO_s_mem) +- AC_CHECK_LIB(ssl, SSL_new) ++ PKG_CHECK_MODULES([OPENSSL], [libssl libcrypto], ++ [LIBS="$LIBS $OPENSSL_LIBS" CFLAGS="$CFLAGS $OPENSSL_CFLAGS"], ++ [AC_CHECK_LIB(crypto, BIO_s_mem) ++ AC_CHECK_LIB(ssl, SSL_new)] ++ ) + AC_CHECK_FUNCS(SSL_new, x_ssl_openssl=yes, + AC_MSG_ERROR([Can't enable openssl]) + ) +-- +2.20.1 + diff --git a/package/ngircd/ngircd.mk b/package/ngircd/ngircd.mk index 5fa86afdd5..582da563ac 100644 --- a/package/ngircd/ngircd.mk +++ b/package/ngircd/ngircd.mk @@ -9,6 +9,25 @@ NGIRCD_SOURCE = ngircd-$(NGIRCD_VERSION).tar.xz NGIRCD_SITE = https://arthur.barton.de/pub/ngircd NGIRCD_LICENSE = GPL-2.0+ NGIRCD_LICENSE_FILES = COPYING +# We're patching configure.ac +NGIRCD_AUTORECONF = YES + +# We're patching configure.ng, but package cannot autoreconf with +# automake >= 1.12 because de-ANSI-fication has been removed so apply the same +# tweaks that are done by upstream in autogen.sh +define NGIRCD_REMOVE_DE_ANSI_FICATION + sed -e "s|^__ng_PROTOTYPES__|AC_C_PROTOTYPES|g" \ + $(@D)/configure.ng > $(@D)/configure.ac + + sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} #ansi2knr|g" \ + $(@D)/src/portab/Makefile.ng > $(@D)/src/portab/Makefile.am + for i in ipaddr/Makefile ngircd/Makefile testsuite/Makefile tool/Makefile; do \ + sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} #../portab/ansi2knr|g" \ + $(@D)/src/$$i.ng > $(@D)/src/$$i.am ; \ + done +endef + +NGIRCD_PRE_CONFIGURE_HOOKS += NGIRCD_REMOVE_DE_ANSI_FICATION ifeq ($(BR2_PACKAGE_LINUX_PAM),y) NGIRCD_CONF_OPTS += --with-pam=$(STAGING_DIR)/usr @@ -18,8 +37,8 @@ NGIRCD_CONF_OPTS += --without-pam endif ifeq ($(BR2_PACKAGE_OPENSSL),y) -NGIRCD_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr -NGIRCD_DEPENDENCIES += openssl +NGIRCD_CONF_OPTS += --with-openssl +NGIRCD_DEPENDENCIES += host-pkgconf openssl else NGIRCD_CONF_OPTS += --without-openssl ifeq ($(BR2_PACKAGE_GNUTLS),y)