[oe-commits] org.oe.dev apache2: native and cross compile patches and BB files

awilcox commit openembedded-commits at lists.openembedded.org
Thu Dec 7 19:38:41 UTC 2006


apache2: native and cross compile patches and BB files

Author: awilcox at openembedded.org
Branch: org.openembedded.dev
Revision: f3f92e60f4a8e3b853e62130e37db4bd1a89f0fe
ViewMTN: http://monotone.openembedded.org/revision.psp?id=f3f92e60f4a8e3b853e62130e37db4bd1a89f0fe
Files:
1
packages/apache2
packages/apache2/apache2-2.2.3
packages/apache2/files
packages/apache2/apache2-2.2.3/apr-sockets-patch
packages/apache2/apache2-2.2.3/configure-patch
packages/apache2/apache2-2.2.3/dftables-makefile-patch
packages/apache2/apache2-2.2.3/server-makefile-patch
packages/apache2/apache2-native_2.2.3.bb
packages/apache2/apache2_2.2.3.bb
packages/apache2/files/init
mtn:execute
true
Diffs:

#
# mt diff -re9db0bd1b7226d9a2e9894e23181ea1139a39be0 -rf3f92e60f4a8e3b853e62130e37db4bd1a89f0fe
#
# 
# 
# add_dir "packages/apache2"
# 
# add_dir "packages/apache2/apache2-2.2.3"
# 
# add_dir "packages/apache2/files"
# 
# add_file "packages/apache2/apache2-2.2.3/apr-sockets-patch"
#  content [cfc88875a39a98f1f4af591ca46d00602837987c]
# 
# add_file "packages/apache2/apache2-2.2.3/configure-patch"
#  content [29ae115dcf742ee74fc96ae4ce88015b2df6d356]
# 
# add_file "packages/apache2/apache2-2.2.3/dftables-makefile-patch"
#  content [f2edf2f26d75ef4685bf28741440e68ffc81c415]
# 
# add_file "packages/apache2/apache2-2.2.3/server-makefile-patch"
#  content [ae3b0dfe04be38ba88149c395da2fc2366191e83]
# 
# add_file "packages/apache2/apache2-native_2.2.3.bb"
#  content [18163767e4b55247ff724d3ba2d3d2f794083898]
# 
# add_file "packages/apache2/apache2_2.2.3.bb"
#  content [88e603314b5011eb5554b6f20d7cd4c4101ed43d]
# 
# add_file "packages/apache2/files/init"
#  content [a5ed06f2155e86260a06b3cd48cb83a2fab74a38]
# 
#   set "packages/apache2/files/init"
#  attr "mtn:execute"
# value "true"
# 
============================================================
--- packages/apache2/apache2-2.2.3/apr-sockets-patch	cfc88875a39a98f1f4af591ca46d00602837987c
+++ packages/apache2/apache2-2.2.3/apr-sockets-patch	cfc88875a39a98f1f4af591ca46d00602837987c
@@ -0,0 +1,10 @@
+--- httpd-2.2.3/srclib/apr/network_io/unix/sockets.c.orig
++++ httpd-2.2.3/srclib/apr/network_io/unix/sockets.c	
+@@ -231,6 +231,7 @@
+ #if APR_O_NONBLOCK_INHERITED
+     if (apr_is_option_set(sock, APR_SO_NONBLOCK) == 1) {
+         apr_set_option(*new, APR_SO_NONBLOCK, 1);
++	apr_socket_opt_set(*new, APR_SO_NONBLOCK, 0); 
+     }
+ #endif /* APR_O_NONBLOCK_INHERITED */
+ 
============================================================
--- packages/apache2/apache2-2.2.3/configure-patch	29ae115dcf742ee74fc96ae4ce88015b2df6d356
+++ packages/apache2/apache2-2.2.3/configure-patch	29ae115dcf742ee74fc96ae4ce88015b2df6d356
@@ -0,0 +1,52 @@
+--- httpd-2.2.3/configure-orig	2006-08-11 11:00:11.000000000 -0700
++++ httpd-2.2.3/configure	2006-08-11 10:59:44.000000000 -0700
+@@ -2643,24 +2643,6 @@
+ 
+ else
+ 
+-        if test -n "1" && test "1" = "1"; then
+-      for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
+-      do
+-        if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
+-          apr_found="yes"
+-          apr_config="$apr_temp_apr_config_file"
+-          break
+-        else
+-                    for lookdir in /usr /usr/local /usr/local/apr /opt/apr /usr/local/apache2; do
+-            if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
+-              apr_found="yes"
+-              apr_config="$lookdir/bin/$apr_temp_apr_config_file"
+-              break 2
+-            fi
+-          done
+-        fi
+-      done
+-    fi
+         if test "$apr_found" = "no" && test -d ""$srcdir/srclib/apr""; then
+       apr_temp_abs_srcdir="`cd "$srcdir/srclib/apr" && pwd`"
+       apr_found="reconfig"
+@@ -2979,24 +2961,6 @@
+ 
+ else
+ 
+-    if test -n "1" && test "1" = "1"; then
+-      for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config
+-      do
+-        if $apu_temp_apu_config_file --help > /dev/null 2>&1 ; then
+-          apu_found="yes"
+-          apu_config="$apu_temp_apu_config_file"
+-          break
+-        else
+-                    for lookdir in /usr /usr/local /usr/local/apr /opt/apr /usr/local/apache2 ; do
+-            if $TEST_X "$lookdir/bin/$apu_temp_apu_config_file"; then
+-              apu_found="yes"
+-              apu_config="$lookdir/bin/$apu_temp_apu_config_file"
+-              break 2
+-            fi
+-          done
+-        fi
+-      done
+-    fi
+         if test "$apu_found" = "no" && test -d ""$srcdir/srclib/apr-util""; then
+       apu_temp_abs_srcdir="`cd "$srcdir/srclib/apr-util" && pwd`"
+       apu_found="reconfig"
============================================================
--- packages/apache2/apache2-2.2.3/dftables-makefile-patch	f2edf2f26d75ef4685bf28741440e68ffc81c415
+++ packages/apache2/apache2-2.2.3/dftables-makefile-patch	f2edf2f26d75ef4685bf28741440e68ffc81c415
@@ -0,0 +1,10 @@
+--- http-2.2.3/srclib/pcre/Makefile.in-orig
++++ http-2.2.3/srclib/pcre/Makefile.in	2005-12-20 13:12:03.000000000 -0500
+@@ -15,6 +15,6 @@
+ 	$(LINK) $(EXTRA_LDFLAGS) dftables.lo $(EXTRA_LIBS)
+ 
+ $(srcdir)/chartables.c: dftables
+-	./dftables $@
++	dftables $@
+ 
+ pcre.lo: $(srcdir)/chartables.c
============================================================
--- packages/apache2/apache2-2.2.3/server-makefile-patch	ae3b0dfe04be38ba88149c395da2fc2366191e83
+++ packages/apache2/apache2-2.2.3/server-makefile-patch	ae3b0dfe04be38ba88149c395da2fc2366191e83
@@ -0,0 +1,11 @@
+--- http-2.0.54/server/Makefile.in-old	2005-12-20 13:26:56.000000000 -0500
++++ http-2.0.54/server/Makefile.in	2005-12-20 13:27:22.000000000 -0500
+@@ -27,7 +27,7 @@
+ 	$(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
+ 
+ test_char.h: gen_test_char
+-	./gen_test_char > test_char.h
++	gen_test_char > test_char.h
+ 
+ util.lo: test_char.h
+ 
============================================================
--- packages/apache2/apache2-native_2.2.3.bb	18163767e4b55247ff724d3ba2d3d2f794083898
+++ packages/apache2/apache2-native_2.2.3.bb	18163767e4b55247ff724d3ba2d3d2f794083898
@@ -0,0 +1,44 @@
+SECTION = "net"
+DEPENDS = "expat pcre"
+
+inherit  native
+
+PR="r4"
+SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2"
+
+S = "${WORKDIR}/httpd-${PV}"
+
+do_configure () {
+	./configure --prefix=${prefix}
+}
+
+do_populate_staging () {
+	cp srclib/pcre/dftables ../../../staging/i686-linux/bin/
+	cp server/gen_test_char ../../../staging/i686-linux/bin/
+	cp srclib/apr/apr-1-config ../../../staging/i686-linux/bin/
+	cp srclib/apr-util/apu-1-config ../../../staging/i686-linux/bin/
+	cp support/apxs ../../../staging/i686-linux/bin/
+	chmod 755 ../../../staging/i686-linux/bin/apxs
+	mkdir -p ../../../staging/build
+	cp build/*.mk ../../../staging/build
+	cat build/config_vars.mk | \
+		sed -e '/^prefix/s,staging,staging/i686-linux,' | \
+		sed -e '/^includedir/s,/include,/include/apache2,' | \
+		sed -e 's,staging/bin,staging/i686-linux/bin,' > \
+			../../../staging/build/config_vars.mk
+	cp build/instdso.sh ../../../staging/build
+	cp .libs/httpd ../../../staging/i686-linux/bin
+
+	(cd srclib/apr/.libs; tar -cf - libapr-*.so* ) | 
+	  (cd ../../../staging/i686-linux/lib; tar -xf - )
+	(cd srclib/apr-util/.libs; tar -cf - libaprutil-*.so* ) | 
+	  (cd ../../../staging/i686-linux/lib; tar -xf - )
+
+    	mkdir -p ../../../staging/i686-linux/include/apache2
+    	cp include/* ../../../staging/i686-linux/include/apache2
+	cp os/unix/os.h ../../../staging/i686-linux/include/apache2
+	cp os/unix/unixd.h ../../../staging/i686-linux/include/apache2
+
+  	cp support/envvars-std ../../../staging/i686-linux/bin/envvars
+    	chmod 755 ../../../staging/i686-linux/bin/envvars
+}
============================================================
--- packages/apache2/apache2_2.2.3.bb	88e603314b5011eb5554b6f20d7cd4c4101ed43d
+++ packages/apache2/apache2_2.2.3.bb	88e603314b5011eb5554b6f20d7cd4c4101ed43d
@@ -0,0 +1,106 @@
+SECTION = "net"
+DESCRIPTION = "The apache v2 web server"
+DEPENDS = "apache2-native openssl expat pcre"
+RDEPENDS += "openssl"
+
+PR = "r4"
+
+SRC_URI = "http://apache.mirrors.tds.net/httpd/httpd-2.2.3.tar.bz2 \
+	   file://dftables-makefile-patch;patch=1 \
+	   file://apr-sockets-patch;patch=1 \
+	   file://configure-patch;patch=1 \
+	   file://server-makefile-patch;patch=1"
+
+#
+# over-ride needed since apache unpacks into httpd
+#
+S = "${WORKDIR}/httpd-${PV}"
+
+#
+# implications - autotools defines suitable do_configure, do_install, etc.
+# update-rc.d adds hooks for rc-update.
+# 
+#
+inherit autotools update-rc.d
+
+#
+# implications - used by update-rc.d scripts
+#
+INITSCRIPT_NAME = "apache2"
+INITSCRIPT_PARAMS = "defaults 91 20"
+LEAD_SONAME = "libapr-1.so.0"
+
+CONFFILES_${PN} = "${sysconfdir}/${PN}/httpd.conf \
+		   ${sysconfdir}/${PN}/magic \
+		   ${sysconfdir}/${PN}/mime.types \
+		   ${sysconfdir}/init.d/${PN} "
+
+#
+PACKAGES = "${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
+
+# we override here rather than append so that .so links are
+# included in the runtime package rather than here (-dev)
+# and to get build, icons, error into the -dev package
+FILES_${PN}-dev = "${datadir}/${PN}/build \
+		${datadir}/${PN}/icons \
+		${datadir}/${PN}/error \
+		${bindir}/apr-config ${bindir}/apu-config \
+		${libdir}/apr*.exp \
+		${includedir}/${PN} \
+		${libdir}/*.la \
+		${libdir}/*.a"
+
+# manual to manual
+FILES_${PN}-doc += " ${datadir}/${PN}/manual"
+
+#
+# override this too - here is the default, less datadir
+#
+FILES_${PN} =  "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \
+		${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \
+		${libdir}/${PN}"
+
+# we want htdocs and cgi-bin to go with the binary 
+FILES_${PN} += "${datadir}/${PN}/htdocs ${datadir}/${PN}/cgi-bin"
+
+#make sure the lone .so links also get wrapped in the base package
+FILES_${PN} += " ${libdir}/lib*.so ${libdir}/pkgconfig/*"
+
+CFLAGS_append = " -DPATH_MAX=4096"
+CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
+EXTRA_OECONF = "--enable-ssl \
+		--with-ssl=${STAGING_LIBDIR}/.. \
+		--with-expat=${STAGING_LIBDIR}/.. \
+		--enable-info \
+		--enable-rewrite \
+		--with-dbm=sdbm \
+		--with-berkeley-db=no \
+		--localstatedir=/var/${PN} \
+		--with-gdbm=no \
+		--with-ndbm=no \
+		--includedir=${includedir}/${PN} \
+		--datadir=${datadir}/${PN} \
+		--sysconfdir=${sysconfdir}/${PN} \
+		"
+
+#
+# here we over-ride the autotools provided do_configure.
+#
+do_configure() {
+	oe_runconf
+}
+
+do_install_append() {
+	install -d ${D}/${sysconfdir}/init.d
+	cat ${FILESDIR}/../files/init | \
+		sed -e 's,/usr/sbin/,${sbindir}/,g' \
+		    -e 's,/usr/bin/,${bindir}/,g' \
+		    -e 's,/usr/lib,${libdir}/,g' \
+		    -e 's,/etc/,${sysconfdir}/,g' \
+		    -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${PN}
+	chmod 755 ${D}/${sysconfdir}/init.d/${PN}
+# remove the goofy original files...
+	rm -rf ${D}/${sysconfdir}/${PN}/original
+# Expat should be found in the staging area via DEPENDS...
+	rm -f ${D}/${libdir}/libexpat.*
+}
============================================================
--- packages/apache2/files/init	a5ed06f2155e86260a06b3cd48cb83a2fab74a38
+++ packages/apache2/files/init	a5ed06f2155e86260a06b3cd48cb83a2fab74a38
@@ -0,0 +1,70 @@
+#!/bin/sh
+ARGS="-D SSL -k start"
+NAME=apache2
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/httpd
+SUEXEC=/usr/lib/apache/suexec
+PIDFILE=/var/run/$NAME.pid
+CONF=/etc/apache2/httpd.conf
+APACHECTL=/usr/sbin/apachectl 
+
+trap "" 1
+export LANG=C
+export PATH
+
+test -f $DAEMON || exit 0
+test -f $APACHECTL || exit 0
+
+# ensure we don't leak environment vars into apachectl
+APACHECTL="env -i LANG=${LANG} PATH=${PATH} $APACHECTL"
+
+if egrep -q -i "^[[:space:]]*ServerType[[:space:]]+inet" $CONF
+then
+    exit 0
+fi
+
+case "$1" in
+  start)
+    echo -n "Starting web server: $NAME"
+    start-stop-daemon --start --quiet --background --exec $DAEMON -- $ARGS
+    ;;
+
+  stop)
+    echo -n "Stopping web server: $NAME"
+    start-stop-daemon --stop --signal 3 --quiet --exec $DAEMON
+    ;;
+
+  reload)
+    echo -n "Reloading $NAME configuration"
+    start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
+    ;;
+
+  reload-modules)
+    echo -n "Reloading $NAME modules"
+    $0 stop
+    $0 start
+    ;;
+
+  restart)
+    $0 reload-modules
+    exit $?
+    ;;
+
+  force-reload)
+    $0 reload-modules
+    exit $?
+    ;;
+
+  *)
+    echo "Usage: /etc/init.d/$NAME {start|stop|reload|reload-modules|force-reload|restart}"
+    exit 1
+    ;;
+esac
+
+if [ $? = 0 ]; then
+	echo .
+	exit 0
+else
+	echo failed
+	exit 1
+fi






More information about the Openembedded-commits mailing list