From 95a237fc4042bf42203097d4c3234be4e266ee61 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 14 Jun 2015 17:43:28 +0000 Subject: [PATCH] argp-standalone: import package from packages.git argp-standalone is required by elfutils, itself required by perf. So we'll move this package from packages.git and make it part of the core distribution. Signed-off-by: Mathieu Olivari git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45967 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/libs/argp-standalone/Makefile | 48 +++++++++++++ .../patches/001-throw-in-funcdef.patch | 79 ++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 package/libs/argp-standalone/Makefile create mode 100644 package/libs/argp-standalone/patches/001-throw-in-funcdef.patch diff --git a/package/libs/argp-standalone/Makefile b/package/libs/argp-standalone/Makefile new file mode 100644 index 0000000000..8cf23fec5e --- /dev/null +++ b/package/libs/argp-standalone/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=argp-standalone +PKG_VERSION:=1.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.lysator.liu.se/~nisse/misc/ +PKG_MD5SUM:=720704bac078d067111b32444e24ba69 +PKG_MAINTAINER:=Ted Hess + +PKG_LICENSE:=LGPL-2.1 +PKG_LICENSE:=Makefile.am + +include $(INCLUDE_DIR)/package.mk + +define Package/argp-standalone + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Hierarchial argument parsing broken out from glibc + URL:=http://www.lysator.liu.se/~nisse/misc/ +endef + +define Package/argp-standalone/description + GNU libc hierarchial argument parsing library broken out from glibc. +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) $(FPIC)" + + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/argp.h \ + $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libargp.a \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,argp-standalone)) diff --git a/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch b/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch new file mode 100644 index 0000000000..4a90751e1e --- /dev/null +++ b/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch @@ -0,0 +1,79 @@ +# --- T2-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone +# Copyright (C) 2006 The T2 SDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- T2-COPYRIGHT-NOTE-END --- + + +No __THROW in function implementation. + --jsaw + +--- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100 ++++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100 +@@ -560,17 +560,17 @@ + # endif + + # ifndef ARGP_EI +-# define ARGP_EI extern __inline__ ++# define ARGP_EI extern inline + # endif + + ARGP_EI void +-__argp_usage (__const struct argp_state *__state) __THROW ++__argp_usage (__const struct argp_state *__state) + { + __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); + } + + ARGP_EI int +-__option_is_short (__const struct argp_option *__opt) __THROW ++__option_is_short (__const struct argp_option *__opt) + { + if (__opt->flags & OPTION_DOC) + return 0; +@@ -582,7 +582,7 @@ + } + + ARGP_EI int +-__option_is_end (__const struct argp_option *__opt) __THROW ++__option_is_end (__const struct argp_option *__opt) + { + return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; + } +--- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100 ++++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100 +@@ -1290,13 +1290,13 @@ + /* Defined here, in case a user is not inlining the definitions in + * argp.h */ + void +-__argp_usage (__const struct argp_state *__state) __THROW ++__argp_usage (__const struct argp_state *__state) + { + __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); + } + + int +-__option_is_short (__const struct argp_option *__opt) __THROW ++__option_is_short (__const struct argp_option *__opt) + { + if (__opt->flags & OPTION_DOC) + return 0; +@@ -1310,7 +1310,7 @@ + } + + int +-__option_is_end (__const struct argp_option *__opt) __THROW ++__option_is_end (__const struct argp_option *__opt) + { + return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; + } -- 2.11.0