summaryrefslogtreecommitdiff
path: root/openwrt/package/cgilib/patches
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-08-10 21:01:34 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-08-10 21:01:34 +0000
commit5da9c9ebcaa8d2c8c42a7ff8287950dccd42aed2 (patch)
tree62a436193f9bdcfe070a7db9e7c181ee91e4eb0a /openwrt/package/cgilib/patches
parent3750c44c0ee03d7d514ec359c7c77ed5b9d966eb (diff)
Add cgilib package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1600 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/cgilib/patches')
-rw-r--r--openwrt/package/cgilib/patches/100-shared_lib.patch41
-rw-r--r--openwrt/package/cgilib/patches/200-cgitest_bugfix.patch11
2 files changed, 52 insertions, 0 deletions
diff --git a/openwrt/package/cgilib/patches/100-shared_lib.patch b/openwrt/package/cgilib/patches/100-shared_lib.patch
new file mode 100644
index 0000000000..5603340f9d
--- /dev/null
+++ b/openwrt/package/cgilib/patches/100-shared_lib.patch
@@ -0,0 +1,41 @@
+diff -ruN cgilib-0.5-orig/Makefile cgilib-0.5-1/Makefile
+--- cgilib-0.5-orig/Makefile 1999-08-20 23:14:07.000000000 +0200
++++ cgilib-0.5-1/Makefile 2005-08-10 20:28:17.000000000 +0200
+@@ -14,14 +14,26 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+
+-CFLAGS = -I. -Wall -O2 -g
++OFLAGS = -O2 -g
++CFLAGS = -I. -Wall $(OFLAGS)
+ LDFLAGS = -L.
+ LIBS = -lcgi
+
++SOVER_MAJ := 0
++SOVER_MIN := 0
++SOVER_REV := 0
++SONAME := libcgi.so.$(SOVER_MAJ)
++SOREAL := libcgi.so.$(SOVER_MAJ).$(SOVER_MIN).$(SOVER_REV)
++
+ OBJS = cgi.o cookies.o
+
+ libcgi.a: $(OBJS)
+- ar rc $@ $^
++ $(AR) rc $@ $^
++
++libcgi.so: $(OBJS)
++ $(CC) -shared -o $(SOREAL) $(LDFLAGS) -Wl,-soname,$(SONAME) $^
++ ln -sf $(SOREAL) $(SONAME)
++ ln -sf $(SONAME) libcgi.so
+
+ cgitest: cgitest.o libcgi.a
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+@@ -29,7 +41,7 @@
+ jumpto: jumpto.o libcgi.a
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+-all: libcgi.a cgitest jumpto
++all: libcgi.a libcgi.so cgitest jumpto
+
+ install: cgitest
+ install -m 755 cgitest /usr/lib/cgi-bin
diff --git a/openwrt/package/cgilib/patches/200-cgitest_bugfix.patch b/openwrt/package/cgilib/patches/200-cgitest_bugfix.patch
new file mode 100644
index 0000000000..62a68e7391
--- /dev/null
+++ b/openwrt/package/cgilib/patches/200-cgitest_bugfix.patch
@@ -0,0 +1,11 @@
+--- cgilib-0.5/cgitest.c.orig 1999-08-17 15:21:20.000000000 +0200
++++ cgilib-0.5/cgitest.c 2005-08-10 20:49:01.000000000 +0200
+@@ -113,7 +113,7 @@
+ cgiHeader();
+ printf ("<html>\n<head><title>cgilib</title></title>\n\n<body bgcolor=\"#ffffff\">\n");
+ printf ("<h1><a href=\"%s\">cgilib</a></h1>\n", URL);
+- printf ("<h3>Cookie "Library" set</h3>\n");
++ printf ("<h3>Cookie \"Library\" set</h3>\n");
+ printf ("<p><br><p><br><a href=\"/cgi-bin/cgitest\">Test</a><p>\n");
+ printf ("<p><br><p><br><a href=\"/cgi-bin/cgitest/redirect\">Redirect</a><p>\n");
+ printf ("<p><br><p><br><a href=\"/cgi-bin/cgitest/listall\">List Everything</a><p>\n");