From ea37f4734818492b1072456f04aae9115ec39d73 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 11 Oct 2018 17:48:28 +0200 Subject: [PATCH] System/getopt - added --- System/getopt/build | 43 ++++++++++++++++++++++++++++++ System/getopt/files/Makefile.patch | 15 +++++++++++ System/getopt/files/variants | 1 + System/getopt/modulefile | 11 ++++++++ 4 files changed, 70 insertions(+) create mode 100755 System/getopt/build create mode 100644 System/getopt/files/Makefile.patch create mode 100644 System/getopt/files/variants create mode 100644 System/getopt/modulefile diff --git a/System/getopt/build b/System/getopt/build new file mode 100755 index 0000000..9a4f33a --- /dev/null +++ b/System/getopt/build @@ -0,0 +1,43 @@ +#!/usr/bin/env modbuild + +pbuild::set_download_url "http://frodo.looijaard.name/system/files/software/$P/$P-${V_PKG}.tar.gz" +pbuild::compile_in_sourcetree + +module use System + +pbuild::pre_configure_Linux() { + pbuild::add_patch "files/Makefile.patch" +} + +pbuild::configure() { + : +} + +pbuild::compile() { + case ${OS} in + Linux ) + declare -x LDFLAGS="-lintl" + ;; + Darwin ) + declare -x LDFLAGS="-lintl -liconv -framework CoreFoundation" + ;; + esac + + make -e all +} + +pbuild::install() { + declare -x DESTDIR="${PREFIX}" + declare -x prefix='' + make -e install +} + +pbuild::cleanup_build() { + make -e realclean +} + +# Local Variables: +# mode: sh +# sh-basic-offset: 8 +# tab-width: 8 +# End: diff --git a/System/getopt/files/Makefile.patch b/System/getopt/files/Makefile.patch new file mode 100644 index 0000000..e6795a9 --- /dev/null +++ b/System/getopt/files/Makefile.patch @@ -0,0 +1,15 @@ +diff -u getopt-1.1.6.orig//Makefile getopt-1.1.6/Makefile +--- getopt-1.1.6.orig//Makefile 2014-11-24 04:33:39.000000000 -0800 ++++ getopt-1.1.6/Makefile 2016-10-27 08:27:52.000000000 -0700 +@@ -61,7 +61,7 @@ + -$(RM) $(objects) $(binaries) + + getopt: $(objects) +- $(CC) $(LDFLAGS) -o $@ $(objects) ++ $(CC) -o $@ $(objects) $(LDFLAGS) + + install: getopt install_po + $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) +Common subdirectories: getopt-1.1.6.orig//gnu and getopt-1.1.6/gnu +Common subdirectories: getopt-1.1.6.orig//po and getopt-1.1.6/po +Common subdirectories: getopt-1.1.6.orig//tests and getopt-1.1.6/tests diff --git a/System/getopt/files/variants b/System/getopt/files/variants new file mode 100644 index 0000000..7bbc25e --- /dev/null +++ b/System/getopt/files/variants @@ -0,0 +1 @@ +getopt/1.1.6 stable b:gettext/0.19.8 diff --git a/System/getopt/modulefile b/System/getopt/modulefile new file mode 100644 index 0000000..ecaefed --- /dev/null +++ b/System/getopt/modulefile @@ -0,0 +1,11 @@ +#%Module1.0 + +module-whatis "parse command-line arguments from shell scripts" +module-url "http://frodo.looijaard.name/project/getopt" +module-license "GNU GPLv2" +module-maintainer "Achim Gsell " + +module-help " +Getopt(1) is a program to help shell scripts parse command-line parameters. +" +