From 6ded56c9f9664b5c47b2b2899b1eb6db92e2d815 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Fri, 9 May 2014 09:07:50 -0400 Subject: mod-wsgi: allow builds with separated src/build dirs Unfortunately the use of apxs, which isn't that friendly with separated src/build dirs, makes things tricky to acheive src/build separation. With the use of a symlink and a few other minor tweaks we are able to get this working. Signed-off-by: Mark Asselstine Signed-off-by: Bruce Ashfield --- ...-fix-builds-that-have-separated-build-dir.patch | 70 ++++++++++++++++++++++ .../recipes-support/mod-wsgi/mod-wsgi_3.4.bb | 1 + 2 files changed, 71 insertions(+) create mode 100644 meta-openstack/recipes-support/mod-wsgi/files/build-fix-builds-that-have-separated-build-dir.patch diff --git a/meta-openstack/recipes-support/mod-wsgi/files/build-fix-builds-that-have-separated-build-dir.patch b/meta-openstack/recipes-support/mod-wsgi/files/build-fix-builds-that-have-separated-build-dir.patch new file mode 100644 index 0000000..69be4b4 --- /dev/null +++ b/meta-openstack/recipes-support/mod-wsgi/files/build-fix-builds-that-have-separated-build-dir.patch @@ -0,0 +1,70 @@ +From 38da2cc5292b3287dd12727faa4bfaedd31e170d Mon Sep 17 00:00:00 2001 +From: Mark Asselstine +Date: Thu, 1 May 2014 09:04:36 -0400 +Subject: [PATCH] build: fix builds that have separated build dir + +Setting up the link to the Makefile.in fails since it assumes +the build is happening in the src directory. As well the Makefile.in +doesn't make use of VPATH to allow for builds out of the src dir. + +Signed-off-by: Mark Asselstine +--- + configure.ac | 6 +++++- + posix-ap2X.mk.in | 10 ++++++---- + 2 files changed, 11 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index eecaee2..40b263d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -209,6 +209,10 @@ AC_SUBST(LIBEXECDIR) + HTTPD_MAJOR_VERSION=`echo ${HTTPD_VERSION} | sed -e 's/\..*//'` + + rm -f Makefile.in +-ln -s posix-ap${HTTPD_MAJOR_VERSION}X.mk.in Makefile.in ++ln -s ${srcdir}/posix-ap${HTTPD_MAJOR_VERSION}X.mk.in Makefile.in ++ ++dnl apxs creates artifacts where the .c file lives, so to get build separation we need to use a link ++rm -f mod_wsgi.c ++ln -s ${srcdir}/mod_wsgi.c mod_wsgi.c + + AC_OUTPUT(Makefile) +diff --git a/posix-ap2X.mk.in b/posix-ap2X.mk.in +index 195cdea..de28f8a 100644 +--- a/posix-ap2X.mk.in ++++ b/posix-ap2X.mk.in +@@ -15,6 +15,8 @@ + APXS = @APXS@ + PYTHON = @PYTHON@ + ++VPATH = @srcdir@ ++ + DESTDIR = + LIBEXECDIR = @LIBEXECDIR@ + +@@ -26,7 +28,7 @@ LDLIBS = @LDLIBS@ + all : mod_wsgi.la + + mod_wsgi.la : mod_wsgi.c +- $(APXS) -c $(CPPFLAGS) $(CFLAGS) mod_wsgi.c $(LDFLAGS) $(LDLIBS) ++ $(APXS) -c $(CPPFLAGS) $(CFLAGS) $< $(LDFLAGS) $(LDLIBS) -o $@ + + $(DESTDIR)$(LIBEXECDIR) : + mkdir -p $@ +@@ -38,10 +40,10 @@ clean : + -rm -rf .libs + -rm -f mod_wsgi.o mod_wsgi.la mod_wsgi.lo mod_wsgi.slo mod_wsgi.loT + -rm -f config.log config.status +- -rm -rf autom4te.cache ++ -rm -rf @srcdir@/autom4te.cache + + distclean : clean +- -rm -f Makefile Makefile.in ++ -rm -f Makefile Makefile.in mod_wsgi.c + + realclean : distclean +- -rm -f configure ++ -rm -f @srcdir@/configure @srcdir@/config.guess @srcdir@/config.sub +-- +1.8.3.2 + diff --git a/meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb b/meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb index 650a3d5..c221b6b 100644 --- a/meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb +++ b/meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb @@ -13,6 +13,7 @@ SRCNAME = "mod_wsgi" SRC_URI = "\ http://modwsgi.googlecode.com/files/${SRCNAME}-${PV}.tar.gz \ file://configure_var.patch \ + file://build-fix-builds-that-have-separated-build-dir.patch \ " S = "${WORKDIR}/${SRCNAME}-${PV}" -- cgit v1.2.3-54-g00ecf