diff options
author | Steven King <kingrst@gmail.com> | 2010-11-27 23:33:34 -0600 |
---|---|---|
committer | Heinz Wiesinger <pprkut@slackbuilds.org> | 2010-11-29 12:45:56 +0100 |
commit | 31ececa12a18aeb26c845ac9a5ec01296f14172b (patch) | |
tree | f3a8c8557a3fbe4b3e7f8b3541683ed0e5c3d1a1 /libraries/iniparser/patches | |
parent | 2e0746d0dbabe5635d6189667c4ad0cbe57faa1e (diff) |
libraries/iniparser: Added (stand-alone INI file parsing library)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'libraries/iniparser/patches')
-rw-r--r-- | libraries/iniparser/patches/fixup_Makefile.patch | 70 | ||||
-rw-r--r-- | libraries/iniparser/patches/fixup_dictionary.h_include.patch | 12 |
2 files changed, 82 insertions, 0 deletions
diff --git a/libraries/iniparser/patches/fixup_Makefile.patch b/libraries/iniparser/patches/fixup_Makefile.patch new file mode 100644 index 0000000000000..b2ee300778f4c --- /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 0000000000000..c41e677831f33 --- /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> + + /*-------------------------------------------------------------------------*/ + /** |