--- dev-php/roadsend-php/roadsend-php-2.9.9_p1.ebuild 2010-02-23 04:49:40.000000000 +0100 +++ dev-php/roadsend-php/roadsend-php-2.9.9_p1.ebuild 2010-03-02 12:56:58.243266658 +0100 @@ -3,7 +3,7 @@ # $Header: /var/cvsroot/gentoo-x86/dev-php/roadsend-php/roadsend-php-2.9.9_p1.ebuild,v 1.1 2010/02/23 03:49:40 yngwin Exp $ EAPI=2 -inherit eutils +inherit autotools eutils multilib MY_PV=${PV/_/-} MY_P=${PN}-${MY_PV} @@ -27,8 +27,85 @@ fastcgi? ( dev-libs/fcgi )" RDEPEND="${DEPEND}" +# Upstream comment: "Sorry, most of the pain here seems to come from bigloo. In our new +# rewrite (which is far from ready, however), bigloo is out of the picture." +# So - in short, not worth the PITA and waste of time until 3.0.0 is out. +QA_PRESTRIPPED="usr/bin/pcc + usr/bin/pdb + usr/bin/pcc.fcgi + usr/bin/pcctags" +QA_DT_HASH="usr/$(get_libdir)/libphp-pdo_u-3.2b.so" +QA_SONAME="usr/$(get_libdir)/libfastcgi_u-3.2b.so + usr/$(get_libdir)/libmhttpd_u-3.2b.so + usr/$(get_libdir)/libpcc-rl_u-3.2b.so + usr/$(get_libdir)/libphp.* + usr/$(get_libdir)/libprofiler_u-3.2b.so + usr/$(get_libdir)/libwebconnect_u-3.2b.so + usr/$(get_libdir)/libwebserver.so" + S="${WORKDIR}/${MY_P}" +src_prepare() { + # respect CFLAGS/LDFLAGS + # Upstream bugs: http://code.roadsend.com/pcc/ticket/3495 + # http://code.roadsend.com/pcc/ticket/3531 + # note the ugly ^M gremlins and make the patch not fail + # with DOS line endings depending on sys-devel/patch version installed + edos2unix bigloo-rules.mk || die "failed to sanitize bigloo-rules.mk" + for i in runtime/Makefile compiler/Makefile tools/c-interface/Makefile \ + tools/profiler/Makefile tools/readline/Makefile webconnect/fastcgi/Makefile \ + webconnect/micro/Makefile ; do + mv -f ${i} ${i}.in || die "mv ${i} failed" + done + epatch "${FILESDIR}/${P}-flags.patch" + # Bigloo needs -copt/-ldopt prefixed before *each* of CFLAGS/LDFLAGS + # Without this you get flooded with tons of "Don't know what to do with arguments" messages + local bcflags bldflags pcccflags pccldflags pccpropercflags pccproperldflags + if [[ -n ${CFLAGS} ]] ; then + for x in ${CFLAGS}; do + bcflags="${bcflags} -copt ${x}" + done + sed -i -e "s:@@CFLAGS@@:${bcflags}:g" bigloo-rules.mk || die "sed failed" + else + sed -i -e "s:@@CFLAGS@@::g" bigloo-rules.mk || die "sed failed" + fi + if [[ -n ${LDFLAGS} ]] ; then + for x in ${LDFLAGS} ; do + bldflags="${bldflags} -ldopt ${x}" + done + sed -i -e "s:@@LDFLAGS@@:${bldflags}:g" bigloo-rules.mk || die "sed failed" + else + sed -i -e "s:@@LDFLAGS@@::g" bigloo-rules.mk || die "sed failed" + fi + + # See http://code.roadsend.com/pcc/ticket/3523 for reasons for this madness + # Also, pcc itself only accepts --copt/--ldopt instead of -copt/-ldopt used for bigloo + if [[ -n ${CFLAGS} ]] ; then + for x in ${CFLAGS}; do + pcccflags="${pcccflags} --bopt -copt --bopt ${x}" + pccpropercflags="${pccpropercflags} --copt ${x}" + done + sed -i -e "s:@@CFLAGS@@:${pcccflags}:" runtime/php-ext/php-extensions.mk || die "sed failed" + sed -i -e "s:@@PCCCFLAGS@@:${pccpropercflags}:" runtime/php-ext/php-extensions.mk || die "sed failed" + else + sed -i -e "s:@@PCCCFLAGS@@::" runtime/php-ext/php-extensions.mk || die "sed failed" + sed -i -e "s:@@PCCCFLAGS@@::" runtime/php-ext/php-extensions.mk || die "sed failed" + fi + if [[ -n ${LDFLAGS} ]] ; then + for x in ${LDFLAGS}; do + pccldflags="${pccldflags} --bopt -ldopt --bopt ${x}" + pccproperldflags="${pccproperldflags} --ldopt ${x}" + done + sed -i -e "s:@@LDFLAGS@@:${pccldflags}:" runtime/php-ext/php-extensions.mk || die "sed failed" + sed -i -e "s:@@PCCLDFLAGS@@:${pccproperldflags}:" runtime/php-ext/php-extensions.mk || die "sed failed" + else + sed -i -e "s:@@LDFLAGS@@::" runtime/php-ext/php-extensions.mk || die "sed failed" + sed -i -e "s:@@PCCLDFLAGS@@::" runtime/php-ext/php-extensions.mk || die "sed failed" + fi + + eautoreconf +} + src_configure() { econf $(use_with pcre) \ $(use_with fastcgi fcgi) \