lib/argp-standalone: add STATIC option

Tue, 08 Oct 2019 20:35:00 +0200

author
David Demelier <markand@malikania.fr>
date
Tue, 08 Oct 2019 20:35:00 +0200
changeset 1168
4c9819a4c990
parent 1167
9eb7c3c561fc
child 1169
194681a6d42d

lib/argp-standalone: add STATIC option

lib/argp-standalone/argp-standalone.sh file | annotate | diff | comparison | revisions
--- a/lib/argp-standalone/argp-standalone.sh	Tue Oct 08 20:33:00 2019 +0200
+++ b/lib/argp-standalone/argp-standalone.sh	Tue Oct 08 20:35:00 2019 +0200
@@ -21,6 +21,7 @@
 PKGLICENSE="GPLv20+"
 PKGSUMMARY="argument parsing extracted from glibc"
 PKGDOWNLOAD="http://www.lysator.liu.se/~nisse/misc/$PKGNAME-$PKGVERSION.tar.gz"
+PKGOPTIONS="STATIC"
 
 : ${CHOST:=$(uname -m)-linux-musl}
 : ${CBUILD:=$(uname -m)-linux-musl}
@@ -28,6 +29,11 @@
 : ${CFLAGS:=-O2}
 : ${LDFLAGS:=}
 : ${LIBS:=}
+: ${STATIC:=no}
+
+if [ "$STATIC" = "yes" ]; then
+	with_static="--disable-shared"
+fi
 
 build()
 {
@@ -49,7 +55,8 @@
 	./configure \
 		--build=$CBUILD \
 		--host=$CHOST \
-		--prefix=
+		--prefix= \
+		$with_static
 	make
 	make install DESTDIR=$DESTDIR
 	install -Dm0644 argp.h $DESTDIR/include/argp.h

mercurial