package/libfcgi: do not build examples
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 19 Jul 2014 15:03:00 +0000 (17:03 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 19 Jul 2014 15:14:58 +0000 (17:14 +0200)
Examples do not compile for a static build, because libtool forcibly
wants to link against the shared version of libstdc++.so, instead of the
static version.

Since we do not really need the examples on the target, just disable
them, it is easier than fixing libtool.

Also, while we're at it, rename the patches to include a sequence
number.

Fixes:
    http://autobuild.buildroot.org/results/66e/66e19cfd5a6048d2aaa46365518ea875e0abcb4d/
    http://autobuild.buildroot.org/results/71d/71d9ba50b41efa05a3aff06c24412d5e8b81d8f1/

[Thomas: edit commit log to indicate that the patches are renamed to
include a sequence number.]

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libfcgi/libfcgi-0000-eof.patch [new file with mode: 0644]
package/libfcgi/libfcgi-0001-link-against-libfcgi-la.patch [new file with mode: 0644]
package/libfcgi/libfcgi-0002-link-against-math.patch [new file with mode: 0644]
package/libfcgi/libfcgi-0003-make-autoreconfable.patch [new file with mode: 0644]
package/libfcgi/libfcgi-0004-disable-examples.patch [new file with mode: 0644]
package/libfcgi/libfcgi-eof.patch [deleted file]
package/libfcgi/libfcgi-link-against-libfcgi-la.patch [deleted file]
package/libfcgi/libfcgi-link-against-math.patch [deleted file]
package/libfcgi/libfcgi-make-autoreconfable.patch [deleted file]

diff --git a/package/libfcgi/libfcgi-0000-eof.patch b/package/libfcgi/libfcgi-0000-eof.patch
new file mode 100644 (file)
index 0000000..e731426
--- /dev/null
@@ -0,0 +1,24 @@
+[PATCH] fix build with C++ support and gcc >= 4.4
+
+EOF is defined in stdio, so ensure it is included.
+
+Based on similar patch by Markus Rothe:
+http://comments.gmane.org/gmane.comp.web.fastcgi.devel/3205
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ libfcgi/fcgio.cpp |    1 +
+ 1 file changed, 1 insertion(+)
+
+Index: fcgi-2.4.0/libfcgi/fcgio.cpp
+===================================================================
+--- fcgi-2.4.0.orig/libfcgi/fcgio.cpp
++++ fcgi-2.4.0/libfcgi/fcgio.cpp
+@@ -22,6 +22,7 @@
+ #define DLLAPI  __declspec(dllexport)
+ #endif
++#include <cstdio>
+ #include <limits.h>
+ #include "fcgio.h"
diff --git a/package/libfcgi/libfcgi-0001-link-against-libfcgi-la.patch b/package/libfcgi/libfcgi-0001-link-against-libfcgi-la.patch
new file mode 100644 (file)
index 0000000..8a5973a
--- /dev/null
@@ -0,0 +1,20 @@
+Properly link libfcgi++ against libfcgi
+
+We cannot directly use -lfcgi to link libfcgi++ against libfcgi,
+because libfcgi is not installed at this time. Instead, we should rely
+on libtool doing the right thing, by specifying libfcgi.la in
+libfcgi++ LIBADD variable.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/libfcgi/Makefile.am
+===================================================================
+--- a/libfcgi/Makefile.am
++++ b/libfcgi/Makefile.am
+@@ -23,5 +23,6 @@
+                        $(INCLUDEDIR)/fcgio.h  \
+                        fcgio.cpp
+ libfcgi___la_CFLAGS  = @PTHREAD_CFLAGS@
+-libfcgi___la_LDFLAGS = -lfcgi -rpath @libdir@
++libfcgi___la_LIBADD  = libfcgi.la
++libfcgi___la_LDFLAGS = -rpath @libdir@
diff --git a/package/libfcgi/libfcgi-0002-link-against-math.patch b/package/libfcgi/libfcgi-0002-link-against-math.patch
new file mode 100644 (file)
index 0000000..4c87ea6
--- /dev/null
@@ -0,0 +1,28 @@
+Link against math libraries when needed
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/cgi-fcgi/Makefile.am
+===================================================================
+--- a/cgi-fcgi/Makefile.am
++++ b/cgi-fcgi/Makefile.am
+@@ -11,5 +11,5 @@
+ LIBDIR      = ../libfcgi
+ LIBFCGI     = $(LIBDIR)/libfcgi.la
+-LDADD = $(LIBFCGI)
++LDADD = $(LIBFCGI) -lm
+ cgi_fcgi_SOURCES = $(INCLUDE_FILES) cgi-fcgi.c
+Index: b/examples/Makefile.am
+===================================================================
+--- a/examples/Makefile.am
++++ b/examples/Makefile.am
+@@ -21,7 +21,7 @@
+ LIBDIR      = ../libfcgi
+ LIBFCGI     = $(LIBDIR)/libfcgi.la
+-LDADD = $(LIBFCGI)
++LDADD = $(LIBFCGI) -lm
+ echo_SOURCES       = $(INCLUDE_FILES) echo.c
+ echo_x_SOURCES     = $(INCLUDE_FILES) echo-x.c
diff --git a/package/libfcgi/libfcgi-0003-make-autoreconfable.patch b/package/libfcgi/libfcgi-0003-make-autoreconfable.patch
new file mode 100644 (file)
index 0000000..e255fc6
--- /dev/null
@@ -0,0 +1,67 @@
+Make the package autoreconfigurable
+
+Adjust minor details in Makefile.am and configure.in in order to make
+the package compatible with the autoconf/automake versions we are
+using in Buildroot.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/cgi-fcgi/Makefile.am
+===================================================================
+--- a/cgi-fcgi/Makefile.am
++++ b/cgi-fcgi/Makefile.am
+@@ -2,7 +2,7 @@
+ bin_PROGRAMS     = cgi-fcgi
+ INCLUDEDIR  = ../include
+-CPPFLAGS    = @CPPFLAGS@ -I$(top_srcdir)/include
++AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include
+ INCLUDE_FILES   = $(INCLUDEDIR)/fastcgi.h  \
+                 $(INCLUDEDIR)/fcgiapp.h  \
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -4,12 +4,13 @@
+ dnl     generate the file "configure", which is run during the build
+ dnl     to configure the system for the local environment.
+-AC_INIT
+-AM_INIT_AUTOMAKE(fcgi, 2.4.0)
++AC_INIT([fcgi], [2.4.0])
++AM_INIT_AUTOMAKE([foreign])
+ AM_CONFIG_HEADER(fcgi_config.h)
+ AC_PROG_CC
++AC_PROG_CC_C_O
+ AC_PROG_CPP 
+ AC_PROG_INSTALL 
+ AC_PROG_LIBTOOL
+Index: b/examples/Makefile.am
+===================================================================
+--- a/examples/Makefile.am
++++ b/examples/Makefile.am
+@@ -11,7 +11,7 @@
+ EXTRA_PROGRAMS = threaded echo-cpp
+ INCLUDEDIR  = ../include
+-CPPFLAGS    = @CPPFLAGS@ -I$(top_srcdir)/include
++AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include
+ INCLUDE_FILES   = $(INCLUDEDIR)/fastcgi.h    \
+                   $(INCLUDEDIR)/fcgiapp.h    \
+Index: b/libfcgi/Makefile.am
+===================================================================
+--- a/libfcgi/Makefile.am
++++ b/libfcgi/Makefile.am
+@@ -1,7 +1,7 @@
+ # $Id: Makefile.am,v 1.9 2001/12/22 03:16:20 robs Exp $
+ INCLUDEDIR  = ../include
+-CPPFLAGS    = @CPPFLAGS@ -I$(top_srcdir)/include
++AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include
+ INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h     \
+                 $(INCLUDEDIR)/fcgiapp.h     \
diff --git a/package/libfcgi/libfcgi-0004-disable-examples.patch b/package/libfcgi/libfcgi-0004-disable-examples.patch
new file mode 100644 (file)
index 0000000..4a9916f
--- /dev/null
@@ -0,0 +1,21 @@
+Common subdirectories: libfcgi-2.4.0.orig/cgi-fcgi and libfcgi-2.4.0/cgi-fcgi
+Common subdirectories: libfcgi-2.4.0.orig/doc and libfcgi-2.4.0/doc
+Common subdirectories: libfcgi-2.4.0.orig/examples and libfcgi-2.4.0/examples
+Common subdirectories: libfcgi-2.4.0.orig/images and libfcgi-2.4.0/images
+Common subdirectories: libfcgi-2.4.0.orig/include and libfcgi-2.4.0/include
+Common subdirectories: libfcgi-2.4.0.orig/java and libfcgi-2.4.0/java
+Common subdirectories: libfcgi-2.4.0.orig/libfcgi and libfcgi-2.4.0/libfcgi
+diff -du libfcgi-2.4.0.orig/Makefile.am libfcgi-2.4.0/Makefile.am
+--- libfcgi-2.4.0.orig/Makefile.am     2001-12-22 14:05:39.000000000 +0100
++++ libfcgi-2.4.0/Makefile.am  2014-07-19 16:56:21.935216540 +0200
+@@ -4,7 +4,7 @@
+ #  $Id: Makefile.am,v 1.7 2001/12/22 13:05:39 robs Exp $
+ #
+-SUBDIRS = libfcgi cgi-fcgi examples include
++SUBDIRS = libfcgi cgi-fcgi include
+ include_HEADERS = fcgi_config.h
+Common subdirectories: libfcgi-2.4.0.orig/perl and libfcgi-2.4.0/perl
+Common subdirectories: libfcgi-2.4.0.orig/Win32 and libfcgi-2.4.0/Win32
diff --git a/package/libfcgi/libfcgi-eof.patch b/package/libfcgi/libfcgi-eof.patch
deleted file mode 100644 (file)
index e731426..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-[PATCH] fix build with C++ support and gcc >= 4.4
-
-EOF is defined in stdio, so ensure it is included.
-
-Based on similar patch by Markus Rothe:
-http://comments.gmane.org/gmane.comp.web.fastcgi.devel/3205
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- libfcgi/fcgio.cpp |    1 +
- 1 file changed, 1 insertion(+)
-
-Index: fcgi-2.4.0/libfcgi/fcgio.cpp
-===================================================================
---- fcgi-2.4.0.orig/libfcgi/fcgio.cpp
-+++ fcgi-2.4.0/libfcgi/fcgio.cpp
-@@ -22,6 +22,7 @@
- #define DLLAPI  __declspec(dllexport)
- #endif
-+#include <cstdio>
- #include <limits.h>
- #include "fcgio.h"
diff --git a/package/libfcgi/libfcgi-link-against-libfcgi-la.patch b/package/libfcgi/libfcgi-link-against-libfcgi-la.patch
deleted file mode 100644 (file)
index 8a5973a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Properly link libfcgi++ against libfcgi
-
-We cannot directly use -lfcgi to link libfcgi++ against libfcgi,
-because libfcgi is not installed at this time. Instead, we should rely
-on libtool doing the right thing, by specifying libfcgi.la in
-libfcgi++ LIBADD variable.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/libfcgi/Makefile.am
-===================================================================
---- a/libfcgi/Makefile.am
-+++ b/libfcgi/Makefile.am
-@@ -23,5 +23,6 @@
-                        $(INCLUDEDIR)/fcgio.h  \
-                        fcgio.cpp
- libfcgi___la_CFLAGS  = @PTHREAD_CFLAGS@
--libfcgi___la_LDFLAGS = -lfcgi -rpath @libdir@
-+libfcgi___la_LIBADD  = libfcgi.la
-+libfcgi___la_LDFLAGS = -rpath @libdir@
diff --git a/package/libfcgi/libfcgi-link-against-math.patch b/package/libfcgi/libfcgi-link-against-math.patch
deleted file mode 100644 (file)
index 4c87ea6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-Link against math libraries when needed
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/cgi-fcgi/Makefile.am
-===================================================================
---- a/cgi-fcgi/Makefile.am
-+++ b/cgi-fcgi/Makefile.am
-@@ -11,5 +11,5 @@
- LIBDIR      = ../libfcgi
- LIBFCGI     = $(LIBDIR)/libfcgi.la
--LDADD = $(LIBFCGI)
-+LDADD = $(LIBFCGI) -lm
- cgi_fcgi_SOURCES = $(INCLUDE_FILES) cgi-fcgi.c
-Index: b/examples/Makefile.am
-===================================================================
---- a/examples/Makefile.am
-+++ b/examples/Makefile.am
-@@ -21,7 +21,7 @@
- LIBDIR      = ../libfcgi
- LIBFCGI     = $(LIBDIR)/libfcgi.la
--LDADD = $(LIBFCGI)
-+LDADD = $(LIBFCGI) -lm
- echo_SOURCES       = $(INCLUDE_FILES) echo.c
- echo_x_SOURCES     = $(INCLUDE_FILES) echo-x.c
diff --git a/package/libfcgi/libfcgi-make-autoreconfable.patch b/package/libfcgi/libfcgi-make-autoreconfable.patch
deleted file mode 100644 (file)
index e255fc6..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-Make the package autoreconfigurable
-
-Adjust minor details in Makefile.am and configure.in in order to make
-the package compatible with the autoconf/automake versions we are
-using in Buildroot.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/cgi-fcgi/Makefile.am
-===================================================================
---- a/cgi-fcgi/Makefile.am
-+++ b/cgi-fcgi/Makefile.am
-@@ -2,7 +2,7 @@
- bin_PROGRAMS     = cgi-fcgi
- INCLUDEDIR  = ../include
--CPPFLAGS    = @CPPFLAGS@ -I$(top_srcdir)/include
-+AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include
- INCLUDE_FILES   = $(INCLUDEDIR)/fastcgi.h  \
-                 $(INCLUDEDIR)/fcgiapp.h  \
-Index: b/configure.in
-===================================================================
---- a/configure.in
-+++ b/configure.in
-@@ -4,12 +4,13 @@
- dnl     generate the file "configure", which is run during the build
- dnl     to configure the system for the local environment.
--AC_INIT
--AM_INIT_AUTOMAKE(fcgi, 2.4.0)
-+AC_INIT([fcgi], [2.4.0])
-+AM_INIT_AUTOMAKE([foreign])
- AM_CONFIG_HEADER(fcgi_config.h)
- AC_PROG_CC
-+AC_PROG_CC_C_O
- AC_PROG_CPP 
- AC_PROG_INSTALL 
- AC_PROG_LIBTOOL
-Index: b/examples/Makefile.am
-===================================================================
---- a/examples/Makefile.am
-+++ b/examples/Makefile.am
-@@ -11,7 +11,7 @@
- EXTRA_PROGRAMS = threaded echo-cpp
- INCLUDEDIR  = ../include
--CPPFLAGS    = @CPPFLAGS@ -I$(top_srcdir)/include
-+AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include
- INCLUDE_FILES   = $(INCLUDEDIR)/fastcgi.h    \
-                   $(INCLUDEDIR)/fcgiapp.h    \
-Index: b/libfcgi/Makefile.am
-===================================================================
---- a/libfcgi/Makefile.am
-+++ b/libfcgi/Makefile.am
-@@ -1,7 +1,7 @@
- # $Id: Makefile.am,v 1.9 2001/12/22 03:16:20 robs Exp $
- INCLUDEDIR  = ../include
--CPPFLAGS    = @CPPFLAGS@ -I$(top_srcdir)/include
-+AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include
- INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h     \
-                 $(INCLUDEDIR)/fcgiapp.h     \