From 3701594fe575c9f064ee65f0078a615a305fdb8f Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 23 Oct 2014 00:22:22 +0700 Subject: [PATCH] libraries/argtable: Updated for version 2.13 + new maintainer. Signed-off-by: Willy Sudiarto Raharjo --- libraries/argtable/argtable.SlackBuild | 49 ++++++++++++++++----- libraries/argtable/argtable.info | 10 ++--- libraries/argtable/doc_paths.diff | 60 ++++++++++++++++++++++++++ 3 files changed, 104 insertions(+), 15 deletions(-) create mode 100644 libraries/argtable/doc_paths.diff diff --git a/libraries/argtable/argtable.SlackBuild b/libraries/argtable/argtable.SlackBuild index fab2637daf..f04205ae5a 100644 --- a/libraries/argtable/argtable.SlackBuild +++ b/libraries/argtable/argtable.SlackBuild @@ -22,9 +22,24 @@ # Modified by the SlackBuilds.org Project +# modified again 20140210 bkw: +# - took over maintenance +# - update for v2.13 +# - derive SRCVER from VERSION +# - 'make install-strip' instead of boilerplate find/strip +# - get rid of static lib +# - simplify man page gzipping, make argtable.3.gz a symlink to +# argtable2.3.gz, since they're identical +# - don't need full API docs in HTML, PDF, *and* PS, install only +# HTML by default, add env vars for PS and PDF +# - don't install INSTALL (it's autoconf boilerplate) +# - do install AUTHORS (contains actual information) +# - fix paths in FILES section of man page + html doc +# Installed package is now 1/14 the size the old 2.9 package was. + PRGNAM=argtable -VERSION=2.9 -SRCVER=2-9 +VERSION=${VERSION:-2.13} +SRCVER=${VERSION/./-} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -70,6 +85,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# man and html pages misuse autoconf macros +patch -p1 < $CWD/doc_paths.diff + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -79,21 +97,32 @@ CXXFLAGS="$SLKCFLAGS" \ --mandir=/usr/man \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --localstatedir=/var \ + --enable-shared \ + --disable-static \ --build=$ARCH-slackware-linux \ --host=$ARCH-slackware-linux make -make install DESTDIR=$PKG +make install-strip DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +# upstream installs 2 copies of the man page, use symlink instead +MAN3=$PKG/usr/man/man3 +rm -f $MAN3/$PRGNAM.3 +gzip $MAN3/${PRGNAM}2.3 +ln -s ${PRGNAM}2.3.gz $MAN3/$PRGNAM.3.gz -( cd $PKG/usr/man - find . -type f -name "*.?" -exec gzip -9 {} \; -) +# before adding this bit, the package was 4.7MB ungzipped, 4.3MB (92%) +# of which were PDF and PostScript copies of the API docs, which almost +# nobody is ever going to read anyway. We'll keep the HTML ones, they're +# the same information, much smaller. If anyone *really* wants the bloated +# docs, they can set PS=yes and/or PDF=yes. -cp -a ChangeLog COPYING INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION +[ "${PS:-no}" != "yes" ] && rm -f $DOCDIR/*.ps +[ "${PDF:-no}" != "yes" ] && rm -f $DOCDIR/*.pdf + +cp -a AUTHORS ChangeLog COPYING README $DOCDIR +cat $CWD/$PRGNAM.SlackBuild > $DOCDIR/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/libraries/argtable/argtable.info b/libraries/argtable/argtable.info index 68675f019b..d3946cc063 100644 --- a/libraries/argtable/argtable.info +++ b/libraries/argtable/argtable.info @@ -1,10 +1,10 @@ PRGNAM="argtable" -VERSION="2.9" +VERSION="2.13" HOMEPAGE="http://argtable.sourceforge.net/" -DOWNLOAD="http://prdownloads.sourceforge.net/argtable/argtable2-9.tar.gz" -MD5SUM="a7fcddef768db0ae66534ec4c4a51dee" +DOWNLOAD="http://prdownloads.sourceforge.net/argtable/argtable2-13.tar.gz" +MD5SUM="156773989d0d6406cea36526d3926668" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Rodney Cobb" -EMAIL="rdc@ktabic.co.uk" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/libraries/argtable/doc_paths.diff b/libraries/argtable/doc_paths.diff new file mode 100644 index 0000000000..2667952e08 --- /dev/null +++ b/libraries/argtable/doc_paths.diff @@ -0,0 +1,60 @@ +diff -Naur argtable2-13/doc/argtable2.3.in argtable2-13.patched/doc/argtable2.3.in +--- argtable2-13/doc/argtable2.3.in 2011-01-10 05:44:01.000000000 -0500 ++++ argtable2-13.patched/doc/argtable2.3.in 2014-02-10 08:52:25.000000000 -0500 +@@ -59,7 +59,7 @@ + Argtable is an ANSI C library for parsing GNU style command line arguments with a minimum of fuss. It enables the programmer to define their program's argument syntax directly in the source code as an array of structs. The command line is then parsed according to that specification and the resulting values stored directly into user\-defined program variables where they are accessible to the main program. + .PP + This man page is only for reference. +-Introductory documentation and example source code is typically installed under \fB@prefix@/share/doc/argtable2/\fP ++Introductory documentation and example source code is typically installed under \fB@docdir@/\fP + and is also available from the argtable homepage at http://argtable.sourceforge.net. + + .SS Constructing an arg_ data structure +@@ -352,15 +352,13 @@ + .SH "FILES" + @prefix@/include/argtable2.h + .br +-@prefix@/lib/libargtable2.a ++@libdir@/libargtable2.so + .br +-@prefix@/lib/libargtable2.so ++@mandir@/man3/argtable2.3.gz + .br +-@prefix@/man3/argtable2.3 ++@docdir@/ + .br +-@prefix@/share/doc/argtable2/ +-.br +-@prefix@/share/doc/argtable2/example/ ++@docdir@/example/ + + .SH "AUTHOR" + Stewart Heitmann +diff -Naur argtable2-13/doc/argtable2.html.in argtable2-13.patched/doc/argtable2.html.in +--- argtable2-13/doc/argtable2.html.in 2011-01-10 06:29:53.000000000 -0500 ++++ argtable2-13.patched/doc/argtable2.html.in 2014-02-10 08:52:20.000000000 -0500 +@@ -115,7 +115,7 @@ +

This man page + is only for reference. Introductory documentation and + example source code is typically installed under +-@prefix@/share/doc/argtable2/ and is also available ++@docdir@/ and is also available + from the argtable homepage at + http://argtable.sourceforge.net.

+ +@@ -577,11 +577,10 @@ + +

@prefix@/include/argtable2.h +
+-@prefix@/lib/libargtable2.a
+-@prefix@/lib/libargtable2.so
+-@prefix@/man3/argtable2.3
+-@prefix@/share/doc/argtable2/
+-@prefix@/share/doc/argtable2/example/

++@libdir@/libargtable2.so
++@mandir@/man3/argtable2.3.gz
++@docdir@/
++@docdir@/example/

+ +

AUTHOR +