* Fixed a conflict with haserl 0.9.23 (FFLuCI) and haserl 0.8.x (OpenWRT)
authorSteven Barth <steven@midlink.org>
Mon, 31 Mar 2008 19:40:31 +0000 (19:40 +0000)
committerSteven Barth <steven@midlink.org>
Mon, 31 Mar 2008 19:40:31 +0000 (19:40 +0000)
- Thanks to mickey (FF Hannover) for this patch

contrib/package/ffluci/Makefile
contrib/package/haserl-devel/Makefile [deleted file]
contrib/package/haserl-lua/Makefile [new file with mode: 0644]
contrib/package/haserl-lua/patches/100-cookie_prefix.patch [new file with mode: 0644]

index 4612735..3bf9eb5 100644 (file)
@@ -15,8 +15,6 @@ PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-
-
 MAKE_ACTION:=dist-source
 
 include $(INCLUDE_DIR)/package.mk
@@ -25,7 +23,7 @@ define Package/ffluci
   SECTION:=admin
   CATEGORY:=Administration
   TITLE:=FFLuCI
-  DEPENDS:=+liblua +luaposix +haserl
+  DEPENDS:=+liblua +luaposix +haserl-lua
   MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
 endef
 
diff --git a/contrib/package/haserl-devel/Makefile b/contrib/package/haserl-devel/Makefile
deleted file mode 100644 (file)
index 76838cf..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-# $Id$
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=haserl
-PKG_VERSION:=0.9.23
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/haserl
-PKG_MD5SUM:=31d1f505afe3ba1b351e18612aa57a70
-
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/haserl
-  SECTION:=utils
-  CATEGORY:=Utilities
-  TITLE:=A CGI wrapper to embed shell scripts in HTML documents
-  URL:=http://haserl.sourceforge.net/
-  DEPENDS:=+liblua
-endef
-
-CONFIGURE_ARGS += \
-        --with-lua
-
-define Package/haserl/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(STRIP) $(PKG_BUILD_DIR)/src/haserl
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/haserl $(1)/usr/bin/
-endef
-
-$(eval $(call BuildPackage,haserl))
diff --git a/contrib/package/haserl-lua/Makefile b/contrib/package/haserl-lua/Makefile
new file mode 100644 (file)
index 0000000..b214633
--- /dev/null
@@ -0,0 +1,39 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: Makefile 1719 2008-03-24 16:07:38Z Cyrus $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=haserl-lua
+PKG_VERSION:=0.9.23
+PKG_RELEASE:=1
+
+PKG_SOURCE:=haserl-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/haserl
+PKG_MD5SUM:=31d1f505afe3ba1b351e18612aa57a70
+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/haserl-lua
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=A CGI wrapper to embed shell scripts in HTML documents
+  URL:=http://haserl.sourceforge.net/
+  DEPENDS:=+liblua
+endef
+
+CONFIGURE_ARGS += \
+        --with-lua
+
+define Package/haserl-lua/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(STRIP) $(PKG_BUILD_DIR)/src/haserl
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/haserl $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,haserl-lua))
diff --git a/contrib/package/haserl-lua/patches/100-cookie_prefix.patch b/contrib/package/haserl-lua/patches/100-cookie_prefix.patch
new file mode 100644 (file)
index 0000000..0547d9d
--- /dev/null
@@ -0,0 +1,29 @@
+--- haserl-0.9.23.orig/src/haserl.c    2008-03-18 18:17:55.000000000 +0100
++++ haserl-0.9.23/src/haserl.c 2008-03-27 16:58:27.000000000 +0100
+@@ -340,7 +340,7 @@
+       {
+         token++;
+       }
+-      myputenv (env, token, global.var_prefix);
++      myputenv (env, token, global.cookie_prefix);
+       token = strtok (NULL, ";");
+     }
+   free (qs);
+@@ -614,6 +614,7 @@
+   global.acceptall = FALSE;   /* don't allow POST data for GET method         */
+   global.uploadlist = NULL;   /* we don't have any uploaded files             */
+   global.var_prefix = HASERL_VAR_PREFIX;
++  global.cookie_prefix = "COOKIE_";
+   global.nul_prefix = "";
+ }
+--- haserl-0.9.23.orig/src/haserl.h    2008-01-25 22:11:38.000000000 +0100
++++ haserl-0.9.23/src/haserl.h 2008-03-27 16:58:18.000000000 +0100
+@@ -10,6 +10,7 @@
+   char *uploaddir;              /* where we upload to                                   */
+   char *uploadhandler;                /* a handler for uploads                                */
+   char *var_prefix;           /* what name we give to FORM variables                  */
++  char *cookie_prefix;
+   char *nul_prefix;           /* what name we give to environment variables           */
+   token_t *uploadlist;                /* a linked list of pathspecs                           */
+   int debug;                    /* true if in "debug" mode                              */