buildroot/package/libcgicc/libcgicc-3.2.9-disable-documentation-option.patch

51 lines
1.3 KiB
Diff
Raw Normal View History

libcgicc: fix build breakage and bump version First, the build was failing with: cd .. && /bin/sh /home/test/brbuild/build/cgicc-3.2.7/support/missing --run autoheader /home/test/brbuild/build/cgicc-3.2.7/support/missing: line 52: autoheader: command not found WARNING: `autoheader' is missing on your system. You should only need it if you modified `acconfig.h' or `configure.ac'. You might want to install the `Autoconf' and `GNU m4' packages. Grab them from any GNU archive site. That was because the PATH doesn't contain $(HOST_DIR)/usr/bin. So we pass $(TARGET_MAKE_ENV) when calling make. Then, the build was failing because of the crappy configure.ac and doc/Makefile.am this project has. configure.ac checks if doxygen is available, and if it isn't, it sets DOXYGEN to /bin/echo. Then, doc/Makefile.am does: DATE=`date '+%-d %b %Y'` VERSION=$(VERSION) $(DOXYGEN) Doxyfile cp $(IMAGES) cgicc-doc.css html mv html/index.html html/index.html.bak When DOXYGEN=/bin/echo, then the first line does not generate anything in html/, and the third line fails. Therefore, we add a patch that allows to pass a --disable-doc option, which removes the check for Doxygen. If --enable-doc is passed, then the configure script fails if Doxygen isn't found (but in the Buildroot case, we always pass --disable-doc to avoid the doxygen dependency). We also take this opportunity to bump the version of libcgicc, and to remove a patch that is no longer needed due to this version bump. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-02-25 22:24:07 +08:00
Index: cgicc-3.2.9/Makefile.am
===================================================================
--- cgicc-3.2.9.orig/Makefile.am 2010-02-25 16:34:06.000000000 +0100
+++ cgicc-3.2.9/Makefile.am 2010-02-25 16:34:14.000000000 +0100
@@ -8,9 +8,15 @@
DEMO =
endif
+if DOC
+DOCDIR = doc
+else
+DOC =
+endif
+
ACLOCAL_AMFLAGS=
-SUBDIRS = cgicc doc support $(DEMO)
+SUBDIRS = cgicc $(DOCDIR) support $(DEMO)
CLEANFILES = *~
Index: cgicc-3.2.9/configure.ac
===================================================================
--- cgicc-3.2.9.orig/configure.ac 2010-02-25 16:34:06.000000000 +0100
+++ cgicc-3.2.9/configure.ac 2010-02-25 16:45:46.000000000 +0100
@@ -17,9 +17,23 @@
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LIBTOOL
-AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, /bin/echo)
+AC_ARG_ENABLE(doc,
+ [ --enable-doc build doc [[default=yes]]],
+ [case "${enableval}" in
+ yes) cgicc_doc=yes ;;
+ no) cgicc_doc=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-doc) ;;
+ esac], cgicc_doc=yes)
+
+if test "$cgicc_doc" = yes; then
+ AC_CHECK_PROG(DOXYGEN, doxygen, doxygen)
+ if test -z "$DOXYGEN" ; then
+ AC_MSG_ERROR([Doxygen is required to build the documentation])
+ fi
+fi
+AM_CONDITIONAL(DOC, test "$cgicc_doc" = yes)
dnl Determine host system type