From patchwork Sun Dec 16 16:56:19 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: 206697 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 683E52C009B for ; Mon, 17 Dec 2012 03:58:36 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id ED98D2065D; Sun, 16 Dec 2012 16:58:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xLPi4OAQhQ6K; Sun, 16 Dec 2012 16:58:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 704B32067F; Sun, 16 Dec 2012 16:57:56 +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 419E58F74B for ; Sun, 16 Dec 2012 16:57:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B55728AEC3 for ; Sun, 16 Dec 2012 16:57:25 +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 dp0a7YdlKDA0 for ; Sun, 16 Dec 2012 16:57:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 203628AC5E for ; Sun, 16 Dec 2012 16:56:55 +0000 (UTC) Received: by mail-wi0-f171.google.com with SMTP id hn14so1456953wib.10 for ; Sun, 16 Dec 2012 08:56:53 -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=wnbZTwRjpDrNSW9xsIC/boXgp6vWq+FK2A1n++waeDw=; b=NbFwqAf/wAbPvgCUvtQxn8Gl+j1Z7rhKQtNSZM1PvjR1FjxogxotOuspJQ/km/opxq oVX7jvdpy5dmDc21WN34gAGZrrNSoA0sGM94wahb69p8OcOvCHNDdAL6iTMkpLO+CIMo SGNkXQxq/2+nHRLLZJ45Im3oBG23h6ME5PZfrt/SoXQm3XISEM4lBe/DSJefXR+15cVx dhdeH5p9oMJUfmoTBhnPKyZMKF7PuLHKFoR7+Zsj4SdunbnbDewAR0lwQzyZ72S9uKCX Y9VhFQjOmzPcvwAzltim690feQ8lHaPm3Peb7itCjb5mSmoXPD3ckIOZRq64imhsPhn6 IS9g== X-Received: by 10.180.108.236 with SMTP id hn12mr2515710wib.6.1355677013824; Sun, 16 Dec 2012 08:56:53 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-41-119.w90-32.abo.wanadoo.fr. [90.32.24.119]) by mx.google.com with ESMTPS id bz12sm8243078wib.5.2012.12.16.08.56.52 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 16 Dec 2012 08:56:53 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Sun, 16 Dec 2012 17:56:19 +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 12/19] package/libseccomp: 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" --- package/Config.in | 1 + package/libseccomp/Config.in | 13 +++++++++++ ...ibseccomp-use-system-headers-from-sysroot.patch | 17 +++++++++++++++ package/libseccomp/libseccomp.mk | 22 ++++++++++++++++++++ 4 files changed, 53 insertions(+), 0 deletions(-) create mode 100644 package/libseccomp/Config.in create mode 100644 package/libseccomp/libseccomp-use-system-headers-from-sysroot.patch create mode 100644 package/libseccomp/libseccomp.mk diff --git a/package/Config.in b/package/Config.in index eff2887..2f67d10 100644 --- a/package/Config.in +++ b/package/Config.in @@ -523,6 +523,7 @@ source "package/libical/Config.in" source "package/libnspr/Config.in" source "package/libsigc/Config.in" source "package/libtpl/Config.in" +source "package/libseccomp/Config.in" source "package/liburcu/Config.in" source "package/linux-pam/Config.in" source "package/lttng-libust/Config.in" diff --git a/package/libseccomp/Config.in b/package/libseccomp/Config.in new file mode 100644 index 0000000..183cf4e --- /dev/null +++ b/package/libseccomp/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBSECCOMP + bool "libseccomp" + help + High level interface to the Linux Kernel's seccomp filter + + The libseccomp library provides and easy to use, platform independent, + interface to the Linux Kernel's syscall filtering mechanism: seccomp. + The libseccomp API is designed to abstract away the underlying BPF + based syscall filter language and present a more conventional + function-call based filtering interface that should be familiar to, + and easily adopted by application developers. + + http://sourceforge.net/projects/libseccomp/ diff --git a/package/libseccomp/libseccomp-use-system-headers-from-sysroot.patch b/package/libseccomp/libseccomp-use-system-headers-from-sysroot.patch new file mode 100644 index 0000000..0997edd --- /dev/null +++ b/package/libseccomp/libseccomp-use-system-headers-from-sysroot.patch @@ -0,0 +1,17 @@ +configure: check headers in sysroot, not in host's system headers + +Signed-off-by: "Yann E. MORIN" + +diff -durN libseccomp-1.0.0.orig/configure libseccomp-1.0.0/configure +--- libseccomp-1.0.0.orig/configure 2012-07-27 22:35:05.000000000 +0200 ++++ libseccomp-1.0.0/configure 2012-10-27 00:12:50.739196219 +0200 +@@ -205,7 +205,8 @@ + # + + # system seccomp includes +-if [[ -r "/usr/include/linux/seccomp.h" ]]; then ++# ${SYSROOT} added by buildroot for cross-compilation ++if [[ -r "${SYSROOT}/usr/include/linux/seccomp.h" ]]; then + opt_sysinc_seccomp="yes" + else + opt_sysinc_seccomp="no" diff --git a/package/libseccomp/libseccomp.mk b/package/libseccomp/libseccomp.mk new file mode 100644 index 0000000..73fe632 --- /dev/null +++ b/package/libseccomp/libseccomp.mk @@ -0,0 +1,22 @@ +############################################################# +# +# libseccomp +# +############################################################# + +LIBSECCOMP_VERSION = 1.0.0 +LIBSECCOMP_SOURCE = libseccomp-$(LIBSECCOMP_VERSION).tar.gz +LIBSECCOMP_SITE = http://downloads.sourceforge.net/project/libseccomp +LIBSECCOMP_LICENSE = LGPLv2.1 +LIBSECCOMP_LICENSE_FILES = LICENSE +LIBSECCOMP_INSTALL_STAGING = YES + +# Needed for configure to find our system headers: +LIBSECCOMP_CONF_ENV = SYSROOT=$(STAGING_DIR) +LIBSECCOMP_MAKE_ENV = $(TARGET_CONFIGURE_OPTS) +LIBSECCOMP_MAKE_OPT = SUBDIRS_BUILD=src +LIBSECCOMP_INSTALL_STAGING_OPT = SUBDIRS_BUILD=src SUBDIRS_INSTALL="src include" DESTDIR=$(STAGING_DIR) install +LIBSECCOMP_INSTALL_TARGET_OPT = SUBDIRS_BUILD=src SUBDIRS_INSTALL="src include" DESTDIR=$(TARGET_DIR) install + +# Not a real autotools package, but works quite OK nonetheless +$(eval $(autotools-package))