From patchwork Mon Mar 27 20:24:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilles Talis X-Patchwork-Id: 743987 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vsQVw4gz5z9s3s for ; Tue, 28 Mar 2017 07:24:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Lo+TmAda"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C167885258; Mon, 27 Mar 2017 20:24:53 +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 uieJAp3IYEsQ; Mon, 27 Mar 2017 20:24:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 821AC84DFA; Mon, 27 Mar 2017 20:24:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 823FE1C0D27 for ; Mon, 27 Mar 2017 20:24:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7D1D7839D0 for ; Mon, 27 Mar 2017 20:24:47 +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 yZXf1K1j2wxW for ; Mon, 27 Mar 2017 20:24:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by whitealder.osuosl.org (Postfix) with ESMTPS id F402B83816 for ; Mon, 27 Mar 2017 20:24:44 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id w43so13782947wrb.1 for ; Mon, 27 Mar 2017 13:24:44 -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; bh=hNnzdkKd3VzqNO91SZzHbfmMMF+IHZM/dNUxvJdTkfg=; b=Lo+TmAda63xvH3Yjf3Vn9Q2aXmfMiMW7omjE//8WR4+fMh5gQf9ln2BH13deyDmkkL P83XmwCRd+x+zIG0f2R3O7E934ezdwo3LrNlgUscDnCiydINWoEFcNKBI4/NNQae30w3 Pa3qtcR9wauuYb1XwtWYFEWsI653Ykpp+EABXRHlZsbiXt4XEoDGJAs3Eh5q3sxqCCu2 F4AyrsEHFPfnlSrsa/x9WSkPhoPO3o9O53EbAr+O+FV58NUCsckHN3QE3hVg1EApCeZ0 FTT/txqct8OPV7g89jcTZccriYJLF8h38kHpwctGwTHJvqZplhez13zERMRofRQk+HR2 tq5A== 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; bh=hNnzdkKd3VzqNO91SZzHbfmMMF+IHZM/dNUxvJdTkfg=; b=Alz/SlhtEFsxU66Fu2dTWvjm58KGjoG09gXNlbjluoHr7lrOXTL4WyUqrYXSZjj1BG nG6twRcVGqHJs9qSmTeBxPRJkykEJW1pUTPvay4+H4phI/WTe5aICbpUY3n0PvRqedS5 c8wVkRYZldaPpMvvt/uMJoiFAWYAylBN4xed6r/LrYqbiDQoCVIneb7mAPI8o1WdcKlq HfI9HVLHSt9IpmJbIbK/tPmNeZVlgOXmAzYp04gaenfmjBN9Fx32S+M3hFDhcHDfkGh0 TUq7fpLVq+luGsyeAm/7QA8gabjzSm929AXq5nDd8oWieD/UR+UYL2NBlRVrT02FPlTk V7Ng== X-Gm-Message-State: AFeK/H3JGpClD0rbZdtiLs0D03LTS/twuvATJ7vcRW4367ktqIUhXbrEo3qpjP+i6QalzQ== X-Received: by 10.223.161.207 with SMTP id v15mr5563572wrv.71.1490646283480; Mon, 27 Mar 2017 13:24:43 -0700 (PDT) Received: from localhost.localdomain (vll06-4-78-208-168-137.fbx.proxad.net. [78.208.168.137]) by smtp.gmail.com with ESMTPSA id m188sm810301wmm.7.2017.03.27.13.24.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Mar 2017 13:24:43 -0700 (PDT) From: Gilles Talis To: buildroot@buildroot.org Date: Mon, 27 Mar 2017 22:24:38 +0200 Message-Id: <1490646278-27878-1-git-send-email-gilles.talis@gmail.com> X-Mailer: git-send-email 2.5.0 Subject: [Buildroot] [PATCH] leptonica: fix static build issue X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" leptonica configure script does not use pkg-config to find the TIFF library, so it doesn't know about the transitive dependencies of the TIFF library. Switching to PKG_CHECK_MODULES() to discover the library solves the issue. Fixes: http://autobuild.buildroot.net/results/8dd2bcc41e861bdd324dd081e39925964d1ac428 http://autobuild.buildroot.net/results/ec7366d69b00625b652915fa58e3143f1bdcaf62 http://autobuild.buildroot.net/results/0cd74312a39e3bc59d15789a4c0a891f0f417b8c http://autobuild.buildroot.net/results/35f9a0f2db30dd62733142f0fcfa72699452583f http://autobuild.buildroot.net/results/f7ea889b2fb96ff7de492e282820c800187573cb Signed-off-by: Gilles Talis --- ...ac-Use-PKG_CHECK_MODULES-to-check-libtiff.patch | 42 ++++++++++++++++++++++ package/leptonica/leptonica.mk | 6 ++++ 2 files changed, 48 insertions(+) create mode 100644 package/leptonica/0001-configure.ac-Use-PKG_CHECK_MODULES-to-check-libtiff.patch diff --git a/package/leptonica/0001-configure.ac-Use-PKG_CHECK_MODULES-to-check-libtiff.patch b/package/leptonica/0001-configure.ac-Use-PKG_CHECK_MODULES-to-check-libtiff.patch new file mode 100644 index 0000000..5b48341 --- /dev/null +++ b/package/leptonica/0001-configure.ac-Use-PKG_CHECK_MODULES-to-check-libtiff.patch @@ -0,0 +1,42 @@ +From 40427bd4ec62fe12e6dc3a8cc61b9d644be98c96 Mon Sep 17 00:00:00 2001 +From: Gilles Talis +Date: Sun, 26 Mar 2017 10:18:22 +0200 +Subject: [PATCH] configure.ac: Use PKG_CHECK_MODULES to check libtiff + availability + +When built statically, leptonica is not able to find specified +libtiff function that will determine whether library is available +or not. +Using PKG_CHECK_MODULES fixes the issue. + +Signed-off-by: Gilles Talis +--- + configure.ac | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e64cde6..52a9e0e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -66,13 +66,12 @@ AS_IF([test "x$with_giflib" != xno], + + AM_CONDITIONAL([HAVE_LIBGIF], [test "x$ac_cv_lib_gif_DGifOpenFileHandle" = xyes]) + +-AS_IF([test "x$with_libtiff" != xno], +- AC_CHECK_LIB([tiff], [TIFFOpen], +- AC_DEFINE([HAVE_LIBTIFF], 1, [Define to 1 if you have libtiff.]) AC_SUBST([LIBTIFF_LIBS], [-ltiff]), +- AS_IF([test "x$with_libtiff" = xyes], AC_MSG_ERROR([libtiff support requested but library not found])), +- ${LIBM} ${ZLIB_LIBS} ${JPEG_LIBS} ++if test "x$with_libtiff" != xno; then ++ PKG_CHECK_MODULES([LIBTIFF], [libtiff-4], ++ AC_DEFINE([HAVE_LIBTIFF], 1, [Define to 1 if you have libtiff.]), ++ AS_IF([test "x$with_libtiff" = xyes], AC_MSG_ERROR([libtiff support requested but library not found])) + ) +-) ++fi + + AS_IF([test "x$with_libwebp" != xno], + AC_CHECK_LIB([webp], [WebPGetInfo], +-- +2.5.0 + diff --git a/package/leptonica/leptonica.mk b/package/leptonica/leptonica.mk index 37e5219..aa8274d 100644 --- a/package/leptonica/leptonica.mk +++ b/package/leptonica/leptonica.mk @@ -10,6 +10,12 @@ LEPTONICA_LICENSE = BSD-2c LEPTONICA_LICENSE_FILES = leptonica-license.txt LEPTONICA_INSTALL_STAGING = YES +# we patch configure.ac +LEPTONICA_AUTORECONF = YES + +# PKG_CHECK_MODULES() is used in configure.ac patch +LEPTONICA_DEPENDENCIES = host-pkgconf + LEPTONICA_CONF_OPTS += --disable-programs ifeq ($(BR2_PACKAGE_GIFLIB),y)