aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'libraries')
-rw-r--r--libraries/iniparser/README1
-rw-r--r--libraries/iniparser/iniparser.SlackBuild98
-rw-r--r--libraries/iniparser/iniparser.info10
-rw-r--r--libraries/iniparser/patches/fixup_Makefile.patch70
-rw-r--r--libraries/iniparser/patches/fixup_dictionary.h_include.patch12
-rw-r--r--libraries/iniparser/slack-desc19
6 files changed, 210 insertions, 0 deletions
diff --git a/libraries/iniparser/README b/libraries/iniparser/README
new file mode 100644
index 000000000000..54b71c2efa1a
--- /dev/null
+++ b/libraries/iniparser/README
@@ -0,0 +1 @@
+Iniparser is a free stand-alone INI file parsing library.
diff --git a/libraries/iniparser/iniparser.SlackBuild b/libraries/iniparser/iniparser.SlackBuild
new file mode 100644
index 000000000000..08ff63610b0e
--- /dev/null
+++ b/libraries/iniparser/iniparser.SlackBuild
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+# Slackware build script for Iniparser
+
+# Copyright 2010, Steven King <kingrst@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=iniparser
+VERSION=${VERSION:-2.17}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/${PRGNAM}-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Cleanup the Makefile quite a bit
+patch -p1 < $CWD/patches/fixup_Makefile.patch
+
+make \
+ CFLAGS="$SLKCFLAGS" \
+ LIBDIR=/usr/lib${LIBDIRSUFFIX} \
+ DOCDIR=/usr/doc/$PRGNAM-$VERSION
+
+# Install the dictionary.h include to <iniparser/>
+patch -p1 < $CWD/patches/fixup_dictionary.h_include.patch
+
+make install install-docs \
+ DESTDIR=$PKG \
+ CFLAGS="$SLKCFLAGS" \
+ LIBDIR=/usr/lib${LIBDIRSUFFIX} \
+ DOCDIR=/usr/doc/$PRGNAM-$VERSION
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/libraries/iniparser/iniparser.info b/libraries/iniparser/iniparser.info
new file mode 100644
index 000000000000..34ffca877d5a
--- /dev/null
+++ b/libraries/iniparser/iniparser.info
@@ -0,0 +1,10 @@
+PRGNAM="iniparser"
+VERSION="2.17"
+HOMEPAGE="http://ndevilla.free.fr/iniparser/"
+DOWNLOAD="http://ndevilla.free.fr/iniparser/ini2/iniparser-2.17.tar.gz"
+MD5SUM="a7425ca813c13458928b1f1012323616"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Steven King"
+EMAIL="kingrst@gmail.com"
+APPROVED="rworkman"
diff --git a/libraries/iniparser/patches/fixup_Makefile.patch b/libraries/iniparser/patches/fixup_Makefile.patch
new file mode 100644
index 000000000000..b2ee300778f4
--- /dev/null
+++ b/libraries/iniparser/patches/fixup_Makefile.patch
@@ -0,0 +1,70 @@
+diff -Nur iniparser-2.17.orig//Makefile iniparser-2.17/Makefile
+--- iniparser-2.17.orig//Makefile 2007-05-27 08:07:09.000000000 -0500
++++ iniparser-2.17/Makefile 2010-11-27 20:53:39.674677644 -0600
+@@ -6,20 +6,29 @@
+ CC = gcc
+ CFLAGS = -O3 -fPIC
+
++# Install paths
++PREFIX = /usr
++LIBDIR = $(PREFIX)/lib
++INCDIR = $(PREFIX)/include
++DOCDIR = $(PREFIX)/share/doc/iniparser
++
+ # Ar settings to build the library
+ AR = ar
+ ARFLAGS = rcv
+
+ SHLD = ${CC} ${CFLAGS}
+-LDSHFLAGS = -shared -Wl,-Bsymbolic -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
+-LDFLAGS = -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
++LDSHFLAGS = -shared -Wl,-Bsymbolic -Wl,-rpath -Wl,$(LIBDIR) -Wl,-rpath,$(LIBDIR)
++LDFLAGS = -Wl,-rpath -Wl,$(LIBDIR) -Wl,-rpath,$(LIBDIR)
+
+ # Set RANLIB to ranlib on systems that require it (Sun OS < 4, Mac OSX)
+ # RANLIB = ranlib
+ RANLIB = true
+
+ RM = rm -f
+-
++MKDIR = mkdir -p
++CP = cp -a
++LN = ln -s
++INSTALL = install
+
+ # Implicit rules
+
+@@ -37,6 +46,7 @@
+
+ OBJS = $(SRCS:.c=.o)
+
++DOCFILES = AUTHORS INSTALL LICENSE README
+
+ default: libiniparser.a libiniparser.so
+
+@@ -48,6 +58,25 @@
+ @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \
+ -Wl,-soname=`basename $@`.0
+
++install-lib: libiniparser.a libiniparser.so
++ $(MKDIR) $(DESTDIR)/$(LIBDIR)
++ $(INSTALL) -m 0755 libiniparser.so.0 $(DESTDIR)/$(LIBDIR)
++ $(INSTALL) -m 0644 libiniparser.a $(DESTDIR)/$(LIBDIR)
++ @(cd $(DESTDIR)/$(LIBDIR) ; $(LN) libiniparser.so.0 libiniparser.so)
++
++install-dev:
++ $(MKDIR) $(DESTDIR)/$(INCDIR)
++ $(INSTALL) -m 0644 src/iniparser.h $(DESTDIR)/$(INCDIR)
++ $(MKDIR) $(DESTDIR)/$(INCDIR)/iniparser
++ $(INSTALL) -m 0644 src/dictionary.h $(DESTDIR)/$(INCDIR)/iniparser/
++
++install-docs:
++ $(MKDIR) $(DESTDIR)/$(DOCDIR)
++ $(INSTALL) -m 0644 $(DOCFILES) $(DESTDIR)/$(DOCDIR)
++ $(CP) html $(DESTDIR)/$(DOCDIR)
++
++install: install-lib install-dev
++
+ clean:
+ $(RM) $(OBJS)
+
diff --git a/libraries/iniparser/patches/fixup_dictionary.h_include.patch b/libraries/iniparser/patches/fixup_dictionary.h_include.patch
new file mode 100644
index 000000000000..c41e677831f3
--- /dev/null
+++ b/libraries/iniparser/patches/fixup_dictionary.h_include.patch
@@ -0,0 +1,12 @@
+diff -Nur iniparser-2.17.orig//src/iniparser.h iniparser-2.17/src/iniparser.h
+--- iniparser-2.17.orig//src/iniparser.h 2006-09-27 06:03:35.000000000 -0500
++++ iniparser-2.17/src/iniparser.h 2010-11-27 20:17:54.230042402 -0600
+@@ -34,7 +34,7 @@
+ */
+ /* #include <unistd.h> */
+
+-#include "dictionary.h"
++#include <iniparser/dictionary.h>
+
+ /*-------------------------------------------------------------------------*/
+ /**
diff --git a/libraries/iniparser/slack-desc b/libraries/iniparser/slack-desc
new file mode 100644
index 000000000000..d4a7ba81b6b6
--- /dev/null
+++ b/libraries/iniparser/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+iniparser: iniparser (A free stand-alone INI file parsing library)
+iniparser:
+iniparser: Iniparser is a free stand-alone INI file parsing library.
+iniparser:
+iniparser: It is written in portable ANSI C and should compile anywhere.
+iniparser: Iniparser is distributed under an MIT license.
+iniparser:
+iniparser: Homepage: http://ndevilla.free.fr/iniparser
+iniparser:
+iniparser:
+iniparser: