argp: Add package (closes #1883)
authorFredrik Fornwall <fredrik@fornwall.net>
Tue, 5 Dec 2017 22:31:43 +0000 (23:31 +0100)
committerFredrik Fornwall <fredrik@fornwall.net>
Tue, 5 Dec 2017 22:31:43 +0000 (23:31 +0100)
packages/argp/argp-fmtstream.h.patch [new file with mode: 0644]
packages/argp/build.sh [new file with mode: 0644]

diff --git a/packages/argp/argp-fmtstream.h.patch b/packages/argp/argp-fmtstream.h.patch
new file mode 100644 (file)
index 0000000..a868071
--- /dev/null
@@ -0,0 +1,11 @@
+--- ./argp-fmtstream.h.orig    2003-12-11 09:37:05.000000000 +0100
++++ ./argp-fmtstream.h 2011-08-12 11:56:43.000000000 +0200
+@@ -192,7 +192,7 @@
+ extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
+ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
\f
+-#ifdef __OPTIMIZE__
++#if defined(__OPTIMIZE__) && !defined(__clang__)
+ /* Inline versions of above routines.  */
+ #if !_LIBC
diff --git a/packages/argp/build.sh b/packages/argp/build.sh
new file mode 100644 (file)
index 0000000..1925f5e
--- /dev/null
@@ -0,0 +1,12 @@
+TERMUX_PKG_HOMEPAGE=https://www.lysator.liu.se/~nisse/misc/
+TERMUX_PKG_DESCRIPTION="Standalone version of arguments parsing functions from GLIBC"
+TERMUX_PKG_VERSION=1.3
+TERMUX_PKG_SHA256=dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be
+TERMUX_PKG_SRCURL=https://www.lysator.liu.se/~nisse/misc/argp-standalone-$TERMUX_PKG_VERSION.tar.gz
+TERMUX_PKG_KEEP_STATIC_LIBRARIES=true
+TERMUX_PKG_NO_DEVELSPLIT=true
+
+termux_step_post_make_install() {
+        cp libargp.a $TERMUX_PREFIX/lib
+        cp $TERMUX_PKG_SRCDIR/argp.h $TERMUX_PREFIX/include
+}