Ticket #8453: shttpd.3.patch

File shttpd.3.patch, 6.6 KB (added by alangrow+openwrt@…, 5 years ago)

updated patch - category "Network", not "Networking"

  • files/auto-str.pl

    diff -x '.svn*' -ruN package/.orig/files/auto-str.pl package/shttpd/files/auto-str.pl
    old new  
     1#!/usr/bin/perl 
     2 
     3use warnings; 
     4use strict; 
     5 
     6my $name = shift or die; 
     7my $value = shift or die; 
     8my $oct = join "" => map sprintf("\\%03o",ord $_) => split //, $value; 
     9 
     10print <<EOF; 
     11const char ${name}[] = "\\ 
     12$oct\\ 
     13"; 
     14 
     15EOF 
     16 
  • files/configure

    diff -x '.svn*' -ruN package/.orig/files/configure package/shttpd/files/configure
    old new  
     1#!/bin/sh 
     2 
     3cat >conf <<__CONF__ 
     4#!/bin/sh 
     5 
     6AR="$AR" 
     7AS="$AS" 
     8LD="$LD" 
     9NM="$NM" 
     10CC="$CC" 
     11CXX="$CXX" 
     12RANLIB="$RANLIB" 
     13STRIP="$STRIP" 
     14OBJCOPY="$OBJCOPY" 
     15OBJDUMP="$OBJDUMP" 
     16SIZE="$SIZE" 
     17CFLAGS="$CFLAGS" 
     18CXXFLAGS="$CXXFLAGS" 
     19CPPFLAGS="$CPPFLAGS" 
     20LDFLAGS="$LDFLAGS" 
     21 
     22export AR AS LD NM CC CXX RANLIB STRIP OBJCOPY OBJDUMP SIZE CFLAGS CXXFLAGS CPPFLAGS LDFLAGS 
     23 
     24exec "\$@" 
     25 
     26__CONF__ 
     27 
     28chmod +x conf 
     29exit 0 
     30 
  • Makefile

    diff -x '.svn*' -ruN package/.orig/Makefile package/shttpd/Makefile
    old new  
     1include $(TOPDIR)/rules.mk 
     2 
     3PKG_NAME:=shttpd 
     4PKG_VERSION:=0.53 
     5PKG_RELEASE:=1 
     6 
     7PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     8PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
     9PKG_SOURCE_URL:=http://www.superscript.com/shttpd 
     10PKG_MD5SUM:=d0e62e1497899c63577d8e7f751a4b3b 
     11 
     12include $(INCLUDE_DIR)/package.mk 
     13 
     14define Package/shttpd 
     15  $(call Package/shttpd/Default) 
     16  SECTION:=net 
     17  CATEGORY:=Network 
     18  TITLE:=UCSPI-based tools for serving dynamic HTTP content. 
     19  DEPENDS:= 
     20  URL:=http://www.superscript.com/shttpd/index.html 
     21endef 
     22 
     23define Package/shttpd/description 
     24 UCSPI-based tools for serving dynamic HTTP content: cgi-httpd, cgi-dispatch, redir-httpd, and more. 
     25endef 
     26 
     27define Build/Configure 
     28        $(INSTALL_BIN) ./files/configure $(PKG_BUILD_DIR)/configure 
     29        $(INSTALL_BIN) ./files/auto-str.pl $(PKG_BUILD_DIR)/auto-str.pl 
     30        $(call Build/Configure/Default) 
     31endef 
     32 
     33define Build/Compile 
     34        $(MAKE) -C $(PKG_BUILD_DIR) \ 
     35                $(TARGET_CONFIGURE_OPTS) \ 
     36                LD="$(TARGET_CC)" \ 
     37                PROGRAMS="cgi-config cgi-dispatch cgi-env cgi-httpd cgiuser-config cgiuser-httpd constant-config constant-httpd echo-config echo-httpd redir-config redir-data redir-httpd" 
     38endef 
     39 
     40define Package/shttpd/install 
     41        $(INSTALL_DIR) $(1)/usr/bin 
     42        $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi-dispatch $(1)/usr/bin/cgi-dispatch 
     43        $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi-env $(1)/usr/bin/cgi-env 
     44        $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi-httpd $(1)/usr/bin/cgi-httpd 
     45        $(INSTALL_BIN) $(PKG_BUILD_DIR)/constant-httpd $(1)/usr/bin/constant-httpd 
     46        $(INSTALL_BIN) $(PKG_BUILD_DIR)/echo-httpd $(1)/usr/bin/echo-httpd 
     47        $(INSTALL_BIN) $(PKG_BUILD_DIR)/redir-data $(1)/usr/bin/redir-data 
     48        $(INSTALL_BIN) $(PKG_BUILD_DIR)/redir-httpd $(1)/usr/bin/redir-httpd 
     49        $(INSTALL_DIR) $(1)/usr/lib/opkg/info 
     50endef 
     51 
     52$(eval $(call BuildPackage,shttpd)) 
  • patches/001-errno.patch

    Binary files package/.orig/.Makefile.swp and package/shttpd/.Makefile.swp differ
    diff -x '.svn*' -ruN package/.orig/patches/001-errno.patch package/shttpd/patches/001-errno.patch
    old new  
     1--- shttpd-0.53.orig/error.h 2001-04-14 21:06:25.000000000 -0400 
     2+++ shttpd-0.53/error.h 2010-04-09 00:34:49.000000000 -0400 
     3@@ -1,7 +1,7 @@ 
     4 #ifndef ERROR_H 
     5 #define ERROR_H 
     6  
     7-extern int errno; 
     8+#include <errno.h> 
     9  
     10 extern int error_intr; 
     11 extern int error_nomem; 
  • patches/002-compilers.patch

    diff -x '.svn*' -ruN package/.orig/patches/002-compilers.patch package/shttpd/patches/002-compilers.patch
    old new  
     1--- shttpd-0.53.orig/conf-cc    2010-12-12 17:30:08.458997362 -0500 
     2+++ shttpd-0.53/conf-cc 2010-12-12 17:28:08.583809913 -0500 
     3@@ -1,3 +1,3 @@ 
     4-gcc -O2 
     5+./conf sh -c 'exec $CC $CFLAGS $0 "$@"' 
     6  
     7 This will be used to compile .c files. 
     8--- shttpd-0.53.orig/conf-lds   2000-04-28 20:10:21.000000000 -0400 
     9+++ shttpd-0.53/conf-lds        2010-12-12 17:36:24.946851123 -0500 
     10@@ -1,3 +1,3 @@ 
     11-gcc -s -static 
     12+./conf sh -c 'exec $CC -s $CFLAGS $0 "$@"' 
     13  
     14 This will be used to statically link .o files into an executable. 
     15--- shttpd-0.53.orig/conf-ld    2008-01-14 15:15:54.000000000 -0500 
     16+++ shttpd-0.53/conf-ld 2010-12-12 20:21:14.363428074 -0500 
     17@@ -1,3 +1,3 @@ 
     18-gcc -s 
     19+./conf sh -c 'exec $CC -s $CFLAGS $0 "$@"' 
     20  
     21 This will be used to link .o files into an executable. 
  • patches/003-makefile.patch

    diff -x '.svn*' -ruN package/.orig/patches/003-makefile.patch package/shttpd/patches/003-makefile.patch
    old new  
     1reverted: 
     2--- /home/agrow/tmp/shttpd-0.53/Makefile        2001-07-01 15:19:52.000000000 -0400 
     3+++ shttpd-0.53/Makefile        2010-12-12 23:30:09.891440415 -0500 
     4@@ -28,16 +28,16 @@ 
     5 auto_home.c 
     6        ./compile auto_home.c 
     7  
     8+auto_home.c: auto-str.pl conf-home 
     9+       ./auto-str.pl auto_home `head -1 conf-home` > auto_home.c 
     10-auto_home.c: auto-str conf-home 
     11-       ./auto-str auto_home `head -1 conf-home` > auto_home.c 
     12  
     13+#auto-str: load auto-str.o buffer.a error.a str.a 
     14+#      ./load auto-str buffer.a error.a str.a  
     15+# 
     16+#auto-str.o: compile \ 
     17+#auto-str.c \ 
     18+#buffer.h exit.h 
     19+#      ./compile auto-str.c 
     20-auto-str: load auto-str.o buffer.a error.a str.a 
     21-       ./load auto-str buffer.a error.a str.a  
     22- 
     23-auto-str.o: compile \ 
     24-auto-str.c \ 
     25-buffer.h exit.h 
     26-       ./compile auto-str.c 
     27  
     28 makelib: warn-auto.sh systype 
     29        ( cat warn-auto.sh; \ 
     30@@ -608,11 +608,6 @@ 
     31 error.h haswaitp.h 
     32        ./compile wait_pid.c 
     33  
     34-chkshsgr.o: compile \ 
     35-chkshsgr.c \ 
     36-exit.h 
     37-       ./compile chkshsgr.c 
     38- 
     39 haswaitp.h: choose trywaitp.c haswaitp.h1 haswaitp.h2 compile load 
     40        ./choose cl trywaitp haswaitp.h1 haswaitp.h2 >haswaitp.h 
     41  
     42@@ -660,13 +655,8 @@ 
     43        stralloc.a alloc.a buffer.a error.a sig.a env.a pathexec.a str.a fs.a \ 
     44        open.a  `cat socket.lib` 
     45  
     46+hasshsgr.h: hasshsgr.h1 hasshsgr.h2 
     47+       cat hasshsgr.h1 > hasshsgr.h 
     48-hasshsgr.h: choose compile tryshsgr.c hasshsgr.h1 hasshsgr.h2 chkshsgr \ 
     49-warn-shsgr 
     50-       ./chkshsgr || ( cat warn-shsgr; exit 1 ) 
     51-       ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h 
     52- 
     53-chkshsgr: load chkshsgr.o 
     54-       ./load chkshsgr  
     55  
     56 utime.o: compile \ 
     57 utime.c \