From patchwork Sat Feb 9 18:09:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 219420 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 0E2AD2C0087 for ; Sun, 10 Feb 2013 05:11:46 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 732991015E3; Sat, 9 Feb 2013 18:11:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28jfwZnYIVcw; Sat, 9 Feb 2013 18:11:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 502C010243A; Sat, 9 Feb 2013 18:10:02 +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 A4BC38F75B for ; Sat, 9 Feb 2013 18:10:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4B71684D87 for ; Sat, 9 Feb 2013 18:10:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5IWSPo8xr1M8 for ; Sat, 9 Feb 2013 18:09:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0C88E8147D for ; Sat, 9 Feb 2013 18:09:57 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id dr13so3803273wgb.14 for ; Sat, 09 Feb 2013 10:09:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references; bh=oto80A0tOz8FAxSzTcpWZPGliFqPWO824aBvk1uxFrg=; b=tdxRxyw7/OvekDtrUDr3VPt3CqzU9hPV0+I78IoBLC7RiPY3bhKfF9D8gCAX1u/58F GsbZ8U+qCfODGg8B23l5iyn7k1MIj6tDiYAmR8hlHpOSn3FBDCL4vLH9Mx4OBwVvwBsV lkNbKtgjvdqC8fmw5M7CTZvE8coa0IQDynSVfOZ7oq6DsZlr1ALGBck9NIJriB7Z04Kf oB5Zolt59ZQIc4YFqvOLhtUL6si/pcDtXC9SQ8dolcaldhulbFycLKZpyiT8q9Zj6f/+ gqOJxvGdmKrKbL48MSROFYgvdjW2OLBEtZlzoET5Vk8tUcdsWtt6Y3Ccnhq8dSCKDS8b OqFw== X-Received: by 10.180.100.163 with SMTP id ez3mr8249183wib.32.1360433396271; Sat, 09 Feb 2013 10:09:56 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-68-181.w90-32.abo.wanadoo.fr. [90.32.147.181]) by mx.google.com with ESMTPS id s10sm22424845wiw.4.2013.02.09.10.09.54 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 09 Feb 2013 10:09:55 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Sat, 9 Feb 2013 19:09:42 +0100 Message-Id: X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 3/6] package/libedit2: 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 Signed-off-by: "Yann E. MORIN" Cc: Arnout Vandecappelle --- package/Config.in | 1 + package/libedit2/Config.in | 9 +++++ package/libedit2/libedit2.mk | 76 ++++++++++++++++++++++++++++++++++++++++++ package/libedit2/libedit2.pc | 13 +++++++ 4 files changed, 99 insertions(+), 0 deletions(-) create mode 100644 package/libedit2/Config.in create mode 100644 package/libedit2/libedit2.mk create mode 100644 package/libedit2/libedit2.pc diff --git a/package/Config.in b/package/Config.in index ab09181..9d6055b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -572,6 +572,7 @@ menu "Text and terminal handling" source "package/enchant/Config.in" source "package/libfribidi/Config.in" source "package/icu/Config.in" +source "package/libedit2/Config.in" source "package/libiconv/Config.in" source "package/linenoise/Config.in" source "package/ncurses/Config.in" diff --git a/package/libedit2/Config.in b/package/libedit2/Config.in new file mode 100644 index 0000000..1e7b95d --- /dev/null +++ b/package/libedit2/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBEDIT2 + bool "libedit2" + select BR2_PACKAGE_LIBBSD + select BR2_PACKAGE_NCURSES + help + The editline library (from BSD) provides generic line editing + and history functions. It slightly resembles GNU readline. + + http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5-0/src/lib/libedit/ diff --git a/package/libedit2/libedit2.mk b/package/libedit2/libedit2.mk new file mode 100644 index 0000000..0916c2e --- /dev/null +++ b/package/libedit2/libedit2.mk @@ -0,0 +1,76 @@ +############################################################# +# +# libedit2 +# +############################################################# + +# Note: libedit2 does not have a regular homepage, and it seems +# there is no place where to download a tarball from. That's +# why we use the Debian way-back machine. +LIBEDIT2_VERSION_MAJOR = 2 +LIBEDIT2_VERSION_MINOR = 11 +LIBEDIT2_VERSION_EXTRA = -20080614 +LIBEDIT2_VERSION = $(LIBEDIT2_VERSION_MAJOR).$(LIBEDIT2_VERSION_MINOR) +LIBEDIT2_SOURCE = libedit_$(LIBEDIT2_VERSION)$(LIBEDIT2_VERSION_EXTRA).orig.tar.bz2 +LIBEDIT2_SITE = http://snapshot.debian.org/archive/debian/20120601T033558Z/pool/main/libe/libedit +LIBEDIT2_SUBDIR = libedit +LIBEDIT2_PATCH = libedit_2.11-20080614-5.debian.tar.bz2 +LIBEDIT2_INSTALL_STAGING = YES +LIBEDIT2_DEPENDENCIES = host-pmake libbsd ncurses + +define LIBEDIT2_POST_PATCH_PERMISSIONS + chmod +x $(@D)/libedit/makelist +endef + +LIBEDIT2_POST_PATCH_HOOKS += LIBEDIT2_POST_PATCH_PERMISSIONS + +define LIBEDIT2_FIX_VIS_H_INCLUDE + $(SED) 's,^#include $$,#include ,;' \ + $(@D)/libedit/filecomplete.c \ + $(@D)/libedit/history.c \ + $(@D)/libedit/readline.c +endef +LIBEDIT2_POST_PATCH_HOOKS += LIBEDIT2_FIX_VIS_H_INCLUDE + +LIBEDIT2_PMAKE_OPTS = MKPROFILE=no MKCATPAGES=no MLINKS= MANPAGES= NOGCCERROR=1 \ + SHLIB_SHFLAGS="-Wl,-soname,libedit.so.${LIBEDIT2_VERSION_MAJOR}" \ + +define LIBEDIT2_BUILD_CMDS + cd $(@D)/$(LIBEDIT2_SUBDIR); \ + $(TARGET_CONFIGURE_OPTS) LDADD="-lbsd -lcurses" pmake $(LIBEDIT2_PMAKE_OPTS) +endef + +LIBEDIT2_MAN_LINKS = el_init el_end el_reset el_gets el_getc el_push el_parse \ + el_set el_get el_source el_resize el_line el_insertstr \ + el_deletestr history_init history_end history + +# $1: DESTDIR to install into +# Can't use pmake to install, it wants to be root. sigh... :-( +# We need to create the .so links, otherwise we can't link; and waiting for +# ldconfig is too late as it's done just before building the images. +define LIBEDIT2_INSTALL_CMDS + $(INSTALL) -D -m 0644 package/libedit2/libedit2.pc $(1)/usr/lib/pkgconfig/libedit2.pc + ln -sf libedit2.pc $(1)/usr/lib/pkgconfig/libedit.pc + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.a $(1)/usr/lib/libedit.a + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit_pic.a $(1)/usr/lib/libedit_pic.a + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.so.2.11 $(1)/usr/lib/libedit.so.2.11 + $(INSTALL) -D -m 0644 $(@D)/libedit/histedit.h $(1)/usr/include/histedit.h + ln -sf libedit.so.$(LIBEDIT2_VERSION) $(1)/usr/lib/libedit.so.$(LIBEDIT2_VERSION_MAJOR) + ln -sf libedit.so.$(LIBEDIT2_VERSION_MAJOR) $(1)/usr/lib/libedit.so + $(INSTALL) -D -m 0644 $(@D)/libedit/readline/readline.h $(1)/usr/include/editline/readline.h + $(INSTALL) -v -D -m 0644 $(@D)/libedit/editline.3 $(1)/usr/share/man/man3/editline.3el + $(INSTALL) -v -D -m 0644 $(@D)/libedit/editrc.5 $(1)/usr/share/man/man5/editrc.5el + for lnk in $(LIBEDIT2_MAN_LINKS); do \ + ln -sfv editline.3el $(1)/usr/share/man/man3/$${lnk}.3el; \ + done +endef + +define LIBEDIT2_INSTALL_STAGING_CMDS + $(call LIBEDIT2_INSTALL_CMDS,$(STAGING_DIR)) +endef + +define LIBEDIT2_INSTALL_TARGET_CMDS + $(call LIBEDIT2_INSTALL_CMDS,$(TARGET_DIR)) +endef + +$(eval $(generic-package)) diff --git a/package/libedit2/libedit2.pc b/package/libedit2/libedit2.pc new file mode 100644 index 0000000..47ac871 --- /dev/null +++ b/package/libedit2/libedit2.pc @@ -0,0 +1,13 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libedit +Description: Not just a replacement library for libreadline and libhistory. +Version: 2.11 +Requires: libbsd ncurses +Requires.private: +Libs: -L${libdir} -ledit +Libs.private: +Cflags: -I${includedir}