[package] update cgilib to 0.7 (#5367)
authorFlorian Fainelli <florian@openwrt.org>
Thu, 18 Jun 2009 12:41:23 +0000 (12:41 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 18 Jun 2009 12:41:23 +0000 (12:41 +0000)
SVN-Revision: 16502

libs/cgilib/Makefile
libs/cgilib/patches/100-shared_lib.patch [deleted file]
libs/cgilib/patches/200-cgitest_bugfix.patch
libs/cgilib/patches/300-cpp_bugfix.patch

index 3c773be..93c175c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cgilib
-PKG_VERSION:=0.5
-PKG_RELEASE:=2
+PKG_VERSION:=0.7
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.infodrom.org/projects/cgilib/download
-PKG_MD5SUM:=5187ba11b2ec165b6c5b6629087733b0
+PKG_MD5SUM:=2c7053f58dfb06f7a80a112797ed7e86
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -24,28 +24,26 @@ define Package/cgilib
   URL:=http://www.infodrom.org/projects/cgilib/
 endef
 
-define Build/Configure
-endef
-
 TARGET_CFLAGS += $(FPIC)
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                 OFLAGS="$(TARGET_CFLAGS)" \
-                all
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+                install
 endef
 
 define Build/InstallDev
        mkdir -p $(1)/usr/include
-       $(CP) $(PKG_BUILD_DIR)/cgi.h $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/cgi.h $(1)/usr/include/
        mkdir -p $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/libcgi.{a,so*} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcgi.{a,so*} $(1)/usr/lib/
 endef
 
 define Package/cgilib/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/libcgi.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcgi.so.* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,cgilib))
diff --git a/libs/cgilib/patches/100-shared_lib.patch b/libs/cgilib/patches/100-shared_lib.patch
deleted file mode 100644 (file)
index 5603340..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-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
index 62a68e7..745aa0e 100644 (file)
@@ -1,10 +1,10 @@
---- 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 @@
+--- a/cgitest.c
++++ b/cgitest.c
+@@ -216,7 +216,7 @@ int main (int argc, char **argv, char **
+           cgiSetHeader ("Set-Cookie", "Version=1; Library=cgilib; Path=/");
              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 (HTML_CSS HTML_HEAD);
+-          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");
index 48ff7de..c06f816 100644 (file)
@@ -1,9 +1,8 @@
-diff -Nur cgilib-0.5.orig/cgi.h cgilib-0.5/cgi.h
---- cgilib-0.5.orig/cgi.h      2008-01-03 18:02:08.000000000 +0100
-+++ cgilib-0.5/cgi.h   2008-01-03 18:02:31.000000000 +0100
-@@ -20,6 +20,10 @@
- #ifndef _CGI_H_
- #define _CGI_H_
+--- a/cgi.h
++++ b/cgi.h
+@@ -24,6 +24,10 @@
+ extern "C" {
+ #endif
  
 +#ifdef __cplusplus
 +extern "C" {
@@ -12,9 +11,9 @@ diff -Nur cgilib-0.5.orig/cgi.h cgilib-0.5/cgi.h
  typedef struct var_s {
        char    *name,
                *value;
-@@ -112,4 +116,8 @@
-  */
- void cgiFree (s_cgi *parms);
+@@ -146,4 +150,8 @@ char *cgiEscape (char *string);
+ extern }
+ #endif
  
 +#ifdef __cplusplus
 +} /* end of extern "C" */