From patchwork Sun Jan 19 21:04:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 312404 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 CD6532C00AB for ; Mon, 20 Jan 2014 08:04:55 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 95B828BD54; Sun, 19 Jan 2014 21:04:44 +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 6fluNxQtvcSz; Sun, 19 Jan 2014 21:04:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 789C18BE5D; Sun, 19 Jan 2014 21:04:42 +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 9AD641BF86C for ; Sun, 19 Jan 2014 21:04:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 93C3E8A99D for ; Sun, 19 Jan 2014 21:04:37 +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 7o-dVCo35bdu for ; Sun, 19 Jan 2014 21:04:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by whitealder.osuosl.org (Postfix) with ESMTPS id 44D478A91D for ; Sun, 19 Jan 2014 21:04:36 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id m19so223870wiv.16 for ; Sun, 19 Jan 2014 13:04:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+smeXmKM+yxvxONTDZPQI3dvaoU8bGjh2BTv4G78Mjk=; b=oDMFNA7AtmqlPUm8fpTv1fupX1BQyVzquWV145rShNBL4TdchTAR/93FL2aeaeGnDo 1ounIwXHmSj6FL2o1sdEtVcZaWX2U3XsiAFD3GY490M8SurqFbdpDyX+b0dWkGvd1AjI Ow6VfEa2DxwrQMmIjcbS92wAEXA1ye6lL+Vsat70WsgtsBTv5NEJD9nU+V2/gKWz8Q+e /P5iHOnuncuwOKOMk52MkbTxZbDfE2apNJ+s6Qr0ogkDo8GRSWlcKw1jT7TJTCEfa1aw /h43/onG5zhbLIj32z3RyxNbOxc3GPZTv/ioJSw4cWr2ombWn+W3VeOwen9b6PYxANgy FJRA== X-Received: by 10.180.107.136 with SMTP id hc8mr7268245wib.11.1390165474821; Sun, 19 Jan 2014 13:04:34 -0800 (PST) Received: from localhost (13-105-190-109.dsl.ovh.fr. [109.190.105.13]) by mx.google.com with ESMTPSA id bj3sm17023648wjb.14.2014.01.19.13.04.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 19 Jan 2014 13:04:34 -0800 (PST) From: Maxime Hadjinlian To: buildroot@busybox.net Date: Sun, 19 Jan 2014 22:04:06 +0100 Message-Id: <1390165448-9130-11-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1390165448-9130-1-git-send-email-maxime.hadjinlian@gmail.com> References: <1390165448-9130-1-git-send-email-maxime.hadjinlian@gmail.com> Cc: gimli Subject: [Buildroot] [PATCH v3 10/12] libenca: new package 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 Extremely Naive Charset Analyser. This package was originally found at : https://github.com/huceke/buildroot-rbp By gimli Signed-off-by: Maxime Hadjinlian Cc: gimli --- Changes v2 --> v3: - Bump libenca to 1.15 (1.9 was 4 years ago) - Rework the whole libenca.mk file - Switch source to github - New patch against Makefile.am and do AUTORECONF (Thomas Petazzoni, Yann E. Morin) - Remove the uses of prefix by adding a patch which removes a hack in the configure.ac (Yann E. Morin) Changes v1 --> v2: - Rename patch files (Thomas Petazzoni) - Fix header of the mk files (Thomas Petazzoni) - Fix indent (Thomas Petazzoni) - Put LIBENCA_CONF_ENV on one line (Thomas Petazzoni) --- package/Config.in | 1 + package/libenca/Config.in | 6 +++ .../libenca/libenca-000-do-not-build-tools.patch | 44 ++++++++++++++++++++++ .../libenca-001-fix-installation-error.patch | 44 ++++++++++++++++++++++ ...benca-002-remove-prefix-hack-in-configure.patch | 33 ++++++++++++++++ package/libenca/libenca.mk | 36 ++++++++++++++++++ 6 files changed, 164 insertions(+) create mode 100644 package/libenca/Config.in create mode 100644 package/libenca/libenca-000-do-not-build-tools.patch create mode 100644 package/libenca/libenca-001-fix-installation-error.patch create mode 100644 package/libenca/libenca-002-remove-prefix-hack-in-configure.patch create mode 100644 package/libenca/libenca.mk diff --git a/package/Config.in b/package/Config.in index 80fe1ba..675e5a2 100644 --- a/package/Config.in +++ b/package/Config.in @@ -771,6 +771,7 @@ menu "Text and terminal handling" source "package/enchant/Config.in" source "package/icu/Config.in" source "package/libedit/Config.in" +source "package/libenca/Config.in" source "package/libfribidi/Config.in" source "package/libiconv/Config.in" source "package/linenoise/Config.in" diff --git a/package/libenca/Config.in b/package/libenca/Config.in new file mode 100644 index 0000000..5e951ed --- /dev/null +++ b/package/libenca/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBENCA + bool "libenca" + help + Extremely Naive Charset Analyser + + http://cihar.com/software/enca/ diff --git a/package/libenca/libenca-000-do-not-build-tools.patch b/package/libenca/libenca-000-do-not-build-tools.patch new file mode 100644 index 0000000..83db61b --- /dev/null +++ b/package/libenca/libenca-000-do-not-build-tools.patch @@ -0,0 +1,44 @@ +From be1fe3e057ccb90fd476bf855f19ecbe97bf4e1e Mon Sep 17 00:00:00 2001 +From: Maxime Hadjinlian +Date: Wed, 15 Jan 2014 00:18:34 +0100 +Subject: [PATCH 1/3] Do not build tools + +We don't want to build tools using buildroot because there is currently no +support for cross compile. +And we need to execute make_hash (which seems to be the only things that get +compiled in tools) to create encodings.h which will later be used during the +build process. +Thus, we disable the build of the tools, and we do ourselves using a +POST_CONFIGURE_HOOKS. + +Signed-off-by: Maxime Hadjinlian +--- + Makefile.am | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index c9f203a..b5b50be 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,8 +1,8 @@ + # @(#) $Id: Makefile.am,v 1.35 2005/11/24 10:21:32 yeti Exp $ + if MAINTAINER_MODE +-SUBDIRS = tools data script lib src devel-docs test ++SUBDIRS = data script lib src devel-docs test + else +-SUBDIRS = tools script lib src devel-docs test ++SUBDIRS = script lib src devel-docs test + endif + man_MANS = man/enca.1 + +@@ -19,7 +19,6 @@ M4TESTS = \ + m4/localias.m4 \ + m4/long-text.l2 \ + m4/recode-bugs.m4 \ +- m4/tools.m4 \ + m4/typevar.m4 + + EXTRA_DIST = \ +-- +1.8.5.2 + diff --git a/package/libenca/libenca-001-fix-installation-error.patch b/package/libenca/libenca-001-fix-installation-error.patch new file mode 100644 index 0000000..fc27841 --- /dev/null +++ b/package/libenca/libenca-001-fix-installation-error.patch @@ -0,0 +1,44 @@ +From 1ca09a1a8f3dd07e2805855a1f1a67a54e8d8adb Mon Sep 17 00:00:00 2001 +From: Maxime Hadjinlian +Date: Wed, 15 Jan 2014 00:20:08 +0100 +Subject: [PATCH 2/3] Fix installation error + +ln will complain that the link already exists and will error. +Adding the -f flag, force ln to recreate the link without failing the +build. + +Signed-off-by: Maxime Hadjinlian +--- + Makefile.am | 2 +- + src/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index b5b50be..ddf1d5f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -54,7 +54,7 @@ install-data-hook: + cd $(DESTDIR)$(man1dir); \ + inst1=`echo enca | sed '$(transform)'`.1; \ + inst2=`echo enconv | sed '$(transform)'`.1; \ +- $(LN_S) $$inst1 $$inst2 ++ $(LN_S) -f $$inst1 $$inst2 + + uninstall-hook: + inst=`echo enconv | sed '$(transform)'`.1; \ +diff --git a/src/Makefile.am b/src/Makefile.am +index 2f01a12..3885137 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -47,7 +47,7 @@ install-exec-hook: + cd $(DESTDIR)$(bindir); \ + inst1=`echo enca | sed '$(transform)'`; \ + inst2=`echo enconv | sed '$(transform)'`; \ +- $(LN_S) $$inst1$(EXEEXT) $$inst2$(EXEEXT) ++ $(LN_S) -f $$inst1$(EXEEXT) $$inst2$(EXEEXT) + + uninstall-hook: + inst=`echo enconv | sed '$(transform)'`; \ +-- +1.8.5.2 + diff --git a/package/libenca/libenca-002-remove-prefix-hack-in-configure.patch b/package/libenca/libenca-002-remove-prefix-hack-in-configure.patch new file mode 100644 index 0000000..45701f9 --- /dev/null +++ b/package/libenca/libenca-002-remove-prefix-hack-in-configure.patch @@ -0,0 +1,33 @@ +From 354a8217eb735c9678f42436d647571fcebc3ead Mon Sep 17 00:00:00 2001 +From: Maxime Hadjinlian +Date: Wed, 15 Jan 2014 00:46:10 +0100 +Subject: [PATCH 3/3] Remove prefix hack in configure + +Signed-off-by: Maxime Hadjinlian +--- + configure.ac | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9db3b21..9b99df4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -100,15 +100,6 @@ gtk_CHECK_GTK_DOC + dnl Check for good random number sources + AC_CHECK_FILES(/dev/random /dev/urandom /dev/srandom /dev/arandom) + +-dnl Dirty path hack. Helps some people with badly set up search paths. +-if test "$prefix" = "NONE"; then +- LDFLAGS="$LDFLAGS -L$ac_default_prefix/lib" +- CPPFLAGS="$CPPFLAGS -I$ac_default_prefix/include" +-else +- LDFLAGS="$LDFLAGS -L$prefix/lib" +- CPPFLAGS="$CPPFLAGS -I$prefix/include" +-fi +- + dnl Checks for libraries. + ye_CHECK_LIBM + +-- +1.8.5.2 + diff --git a/package/libenca/libenca.mk b/package/libenca/libenca.mk new file mode 100644 index 0000000..e69c124 --- /dev/null +++ b/package/libenca/libenca.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# libenca +# +################################################################################ + +LIBENCA_VERSION = 1.15 +LIBENCA_SITE = $(call github,nijel,enca,$(LIBENCA_VERSION)) +LIBENCA_INSTALL_STAGING = YES +LIBENCA_AUTORECONF = YES +LIBENCA_LICENSE = GPLv2 +LIBENCA_LICENSE_FILES = COPYING + +LIBENCA_CONF_ENV += ac_cv_file__dev_random=yes \ + ac_cv_file__dev_urandom=yes \ + ac_cv_file__dev_arandom=no \ + ac_cv_file__dev_srandom=no + +define LIBENCA_MAKE_HOST_TOOL + cd $(@D)/tools && sed -e 's/^#define \([A-Z0-9_]*\) \(.*\)/@\1@ \2/' \ + -e 's/"//g' \ + -e 's/NULL$$//' \ + -e 's/ /\//' \ + -e 's/^\(.*\)$$/s\/\1\//' \ + ../iconvenc.h >encodings.sed + cd $(@D)/tools && $(HOSTCC) -o make_hash make_hash.c + cd $(@D)/tools && sed -f encodings.sed ./encodings.dat | ./make_hash >encodings.h +endef + +LIBENCA_POST_CONFIGURE_HOOKS += LIBENCA_MAKE_HOST_TOOL + +$(eval $(autotools-package)) + +XERCES_CONF_OPT = --disable-threads \ + --with-gnu-ld +