From daca626e86ff51e72f6423f3fb69e1a1d16d7c59 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 16 Apr 2010 13:38:27 +0000 Subject: build: add runuhttpd sdk target --- contrib/uhttpd/Makefile | 30 ++++++++++++++++++++++++++++++ contrib/uhttpd/patches/001-pass-env.patch | 11 +++++++++++ contrib/uhttpd/patches/series | 1 + 3 files changed, 42 insertions(+) create mode 100644 contrib/uhttpd/Makefile create mode 100644 contrib/uhttpd/patches/001-pass-env.patch create mode 100644 contrib/uhttpd/patches/series (limited to 'contrib/uhttpd') diff --git a/contrib/uhttpd/Makefile b/contrib/uhttpd/Makefile new file mode 100644 index 0000000000..7b0b37fa9a --- /dev/null +++ b/contrib/uhttpd/Makefile @@ -0,0 +1,30 @@ +include ../../build/config.mk +include ../../build/gccconfig.mk + +UHTTPD_SRC = svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src +UHTTPD_DIR = uhttpd-src +UHTTPD_PATCHDIR = patches + +all: compile + +include ../../build/module.mk + +$(UHTTPD_DIR)/Makefile: + svn co $(UHTTPD_SRC) $(UHTTPD_DIR) + +$(UHTTPD_DIR)/.prepared: $(UHTTPD_DIR)/Makefile + (cd $(UHTTPD_PATCHDIR); ls *.patch | sort > series) || true + [ -f "$(UHTTPD_PATCHDIR)/series" ] && while read patch; do \ + patch -d $(UHTTPD_DIR) -p1 < $(UHTTPD_PATCHDIR)/$$patch; \ + done < $(UHTTPD_PATCHDIR)/series || true + touch $@ + +compile: $(UHTTPD_DIR)/.prepared + (cd $(UHTTPD_DIR); $(MAKE) LUA_SUPPORT=0 TLS_SUPPORT=0 CGI_SUPPORT=1) + mkdir -p dist/usr/sbin + cp $(UHTTPD_DIR)/uhttpd dist/usr/sbin + +compile-all: compile + +clean: + rm -rf $(UHTTPD_DIR) diff --git a/contrib/uhttpd/patches/001-pass-env.patch b/contrib/uhttpd/patches/001-pass-env.patch new file mode 100644 index 0000000000..b69ff17653 --- /dev/null +++ b/contrib/uhttpd/patches/001-pass-env.patch @@ -0,0 +1,11 @@ +--- a/uhttpd-cgi.c ++++ b/uhttpd-cgi.c +@@ -204,7 +204,7 @@ void uh_cgi_request(struct client *cl, s + (pi->stat.st_mode & S_IXOTH) + ) { + /* build environment */ +- clearenv(); ++ //clearenv(); + + /* common information */ + setenv("GATEWAY_INTERFACE", "CGI/1.1", 1); diff --git a/contrib/uhttpd/patches/series b/contrib/uhttpd/patches/series new file mode 100644 index 0000000000..dc852df8b0 --- /dev/null +++ b/contrib/uhttpd/patches/series @@ -0,0 +1 @@ +001-pass-env.patch -- cgit v1.2.3