Procházet zdrojové kódy

fcgi: import from packages, add myself as maintainer, fix build errors.

Signed-off-by: Jacob Siverskog <jacob@teenageengineering.com>
Jacob Siverskog před 10 roky
rodič
revize
3f365a8350

+ 82
- 0
libs/fcgi/Makefile Zobrazit soubor

@@ -0,0 +1,82 @@
1
+#
2
+# Copyright (C) 2007-2011 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=fcgi
11
+PKG_VERSION:=2.4.0
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://www.fastcgi.com/dist/
16
+PKG_MD5SUM:=d15060a813b91383a9f3c66faf84867e
17
+
18
+PKG_FIXUP:=libtool-ucxx
19
+
20
+PKG_MAINTAINER:=Jacob Siverskog <jacob@teenageengineering.com>
21
+
22
+PKG_INSTALL:=1
23
+
24
+include $(INCLUDE_DIR)/uclibc++.mk
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+define Package/fcgi/Default
28
+  SECTION:=libs
29
+  CATEGORY:=Libraries
30
+  URL:=http://www.fastcgi.com/
31
+endef
32
+
33
+define Package/fcgi
34
+  $(call Package/fcgi/Default)
35
+  MENU:=1
36
+  DEPENDS:= +libpthread
37
+  TITLE:=Shared library of FastCGI
38
+endef
39
+
40
+define Package/fcgixx
41
+  $(call Package/fcgi/Default)
42
+  DEPENDS:=fcgi $(CXX_DEPENDS)
43
+  TITLE:=Shared library of FastCGI++
44
+endef
45
+
46
+define Package/fcgi/description
47
+ FastCGI is a language independent, scalable, open extension to
48
+ CGI that provides high performance without the limitations of
49
+ server specific APIs.
50
+endef
51
+
52
+TARGET_CFLAGS += $(FPIC)
53
+
54
+CONFIGURE_ARGS += \
55
+	--enable-shared \
56
+	--enable-static \
57
+
58
+CONFIGURE_VARS += \
59
+	LIBS="-lm" \
60
+
61
+define Build/InstallDev
62
+	$(INSTALL_DIR) $(1)/usr/include
63
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/fastcgi.h $(1)/usr/include/
64
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/fcgi{app,_config,misc,o,os,_stdio}.h $(1)/usr/include/
65
+	$(INSTALL_DIR) $(1)/usr/lib
66
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi{,++}.{a,so*} $(1)/usr/lib/
67
+endef
68
+
69
+define Package/fcgi/install
70
+	$(INSTALL_DIR) $(1)/usr/bin
71
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgi-fcgi $(1)/usr/bin/
72
+	$(INSTALL_DIR) $(1)/usr/lib
73
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.so.* $(1)/usr/lib/
74
+endef
75
+
76
+define Package/fcgixx/install
77
+	$(INSTALL_DIR) $(1)/usr/lib
78
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi++.so.* $(1)/usr/lib/
79
+endef
80
+
81
+$(eval $(call BuildPackage,fcgi))
82
+$(eval $(call BuildPackage,fcgixx))

+ 38
- 0
libs/fcgi/patches/100-fcgio-int-type-fix.patch Zobrazit soubor

@@ -0,0 +1,38 @@
1
+Index: fcgi-2.4.0/include/fcgio.h
2
+===================================================================
3
+--- fcgi-2.4.0.orig/include/fcgio.h	2007-07-17 13:30:28.000000000 +0200
4
++++ fcgi-2.4.0/include/fcgio.h	2007-07-17 13:30:28.000000000 +0200
5
+@@ -77,10 +77,10 @@
6
+     virtual int sync();
7
+ 
8
+     // Remove and return the current character.
9
+-    virtual int uflow();
10
++    virtual int_type uflow();
11
+ 
12
+     // Fill the get area (if buffered) and return the current character.
13
+-    virtual int underflow();
14
++    virtual int_type underflow();
15
+ 
16
+     // Use a buffer.  The only reasons that a buffer would be useful is
17
+     // to support the use of the unget()/putback() or seek() methods.  Using
18
+diff -urN fcgi-2.4.0/libfcgi/fcgio.cpp fcgi-2.4.0.new/libfcgi/fcgio.cpp
19
+--- fcgi-2.4.0/libfcgi/fcgio.cpp	2002-02-24 21:12:22.000000000 +0100
20
++++ fcgi-2.4.0.new/libfcgi/fcgio.cpp	2007-08-28 11:22:22.000000000 +0200
21
+@@ -89,7 +89,7 @@
22
+ }
23
+ 
24
+ // uflow() removes the char, underflow() doesn't
25
+-int fcgi_streambuf::uflow() 
26
++std::basic_streambuf<char>::int_type fcgi_streambuf::uflow()
27
+ {
28
+     int rv = underflow();
29
+     if (this->bufsize) gbump(1);
30
+@@ -97,7 +97,7 @@
31
+ }
32
+ 				
33
+ // Note that the expected behaviour when there is no buffer varies
34
+-int fcgi_streambuf::underflow()
35
++std::basic_streambuf<char>::int_type fcgi_streambuf::underflow()
36
+ {
37
+     if (this->bufsize)
38
+     {

+ 24
- 0
libs/fcgi/patches/110-no_examples.patch Zobrazit soubor

@@ -0,0 +1,24 @@
1
+diff -urN fcgi-2.4.0/Makefile.am fcgi-2.4.0.new/Makefile.am
2
+--- fcgi-2.4.0/Makefile.am	2001-12-22 14:05:39.000000000 +0100
3
++++ fcgi-2.4.0.new/Makefile.am	2007-08-28 11:05:10.000000000 +0200
4
+@@ -4,7 +4,7 @@
5
+ #  $Id: Makefile.am,v 1.7 2001/12/22 13:05:39 robs Exp $
6
+ #
7
+ 
8
+-SUBDIRS = libfcgi cgi-fcgi examples include
9
++SUBDIRS = libfcgi cgi-fcgi include
10
+ 
11
+ include_HEADERS = fcgi_config.h
12
+ 
13
+diff -urN fcgi-2.4.0/Makefile.in fcgi-2.4.0.new/Makefile.in
14
+--- fcgi-2.4.0/Makefile.in	2003-01-19 18:21:15.000000000 +0100
15
++++ fcgi-2.4.0.new/Makefile.in	2007-08-28 11:04:55.000000000 +0200
16
+@@ -93,7 +93,7 @@
17
+ am__quote = @am__quote@
18
+ install_sh = @install_sh@
19
+ 
20
+-SUBDIRS = libfcgi cgi-fcgi examples include
21
++SUBDIRS = libfcgi cgi-fcgi include
22
+ 
23
+ include_HEADERS = fcgi_config.h
24
+ 

+ 12
- 0
libs/fcgi/patches/120-stdio.patch Zobrazit soubor

@@ -0,0 +1,12 @@
1
+Index: fcgi-2.4.0/libfcgi/fcgio.cpp
2
+===================================================================
3
+--- fcgi-2.4.0.orig/libfcgi/fcgio.cpp	2014-05-15 10:43:15.153971782 +0200
4
++++ fcgi-2.4.0/libfcgi/fcgio.cpp	2014-05-15 10:44:44.037974020 +0200
5
+@@ -23,6 +23,7 @@
6
+ #endif
7
+ 
8
+ #include <limits.h>
9
++#include <stdio.h>
10
+ #include "fcgio.h"
11
+ 
12
+ using std::streambuf;