Commit b88cd338 authored by Adam Conrad's avatar Adam Conrad Committed by Mark A. Hershberger

Imported Debian patch 5.0.4-3

parent 8f71574d
php5 (5.0.4-3) unstable; urgency=low
* And fix the module/extension API situation one last time, this time
we read ZEND_EXTENSION_API_NO, ZEND_MODULE_API_NO, and PHP_API_VERSION,
pick the most recent of the three, assume things broke in ways we're
not willing to cope with, and both change the extension directory to
use that value, as well as setting it to the provides/depends for the
various SAPI and extension packages.
* Add a new option to php-config, 'php-config --phpapi', which extension
packagers should now be using to get the current phpapi they're building
against and set their dependencies accordingly.
* Strip the -gnu off the end of the DEB_*_* variables and drop the
versioned dpkg-dev build-dep to ease backporting to sarge and hoary;
doing so in such a way as to still allow for easy cross-compiling.
* Add postgresql-dev build-dep alternate for easy hoary/sarge backports.
* Make libapache2-mod-php5 the default alternate dependency for the php5
metapackage, since we really do want to encourage the apache upgrade.
* Make php5-dev stop shipping copies of files from autotools-dev, shtool,
and libtool, and instead symlink to them and depend on those packages.
-- Adam Conrad <adconrad@0c3.net> Sun, 31 Jul 2005 03:05:08 +1000
php5 (5.0.4-2) unstable; urgency=low
* We now have a mailing list. Set the maintainer to the list, and move
......
......@@ -3,13 +3,13 @@ Section: web
Priority: optional
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Uploaders: Adam Conrad <adconrad@0c3.net>, Steve Langasek <vorlon@debian.org>, Andres Salomon <dilinger@debian.org>, Jeroen van Wolffelaar <jeroen@wolffelaar.nl>, Ondřej Surý <ondrej@debian.org>
Build-Depends: apache-dev (>= 1.3.23), apache2-prefork-dev (>= 2.0.53-3), autoconf, automake1.4, bison, chrpath, debhelper (>= 3), dpkg-dev (>= 1.13.9), flex (>= 2.5.4), freetds-dev, po-debconf, libbz2-dev (>= 1.0.0), libcurl3-dev, libdb4.2-dev, libexpat1-dev (>= 1.95.2-2.1), libfreetype6-dev, libgcrypt11-dev, libgd2-xpm-dev (>= 2.0.28-3), libjpeg62-dev, libkrb5-dev, libldap2-dev, libmhash-dev (>= 0.8.8), libmysqlclient12-dev, libncurses5-dev, libpam0g-dev, libpcre3-dev (>= 4.3-1), libpng12-dev, libpq-dev, librecode-dev, libsnmp5-dev, libsqlite0-dev, libssl-dev (>= 0.9.6), libt1-dev, libtool (>= 1.4.2-4), libwrap0-dev, libxmltok1-dev, libxml2-dev (>= 2.4.14), libxslt1-dev (>= 1.0.18), re2c, unixodbc-dev, zlib1g-dev (>= 1.0.9)
Build-Depends: apache-dev (>= 1.3.23), apache2-prefork-dev (>= 2.0.53-3), autoconf, automake1.4, bison, chrpath, debhelper (>= 3), flex (>= 2.5.4), freetds-dev, po-debconf, libbz2-dev (>= 1.0.0), libcurl3-dev, libdb4.2-dev, libexpat1-dev (>= 1.95.2-2.1), libfreetype6-dev, libgcrypt11-dev, libgd2-xpm-dev (>= 2.0.28-3), libjpeg62-dev, libkrb5-dev, libldap2-dev, libmhash-dev (>= 0.8.8), libmysqlclient12-dev, libncurses5-dev, libpam0g-dev, libpcre3-dev (>= 4.3-1), libpng12-dev, libpq-dev | postgresql-dev, librecode-dev, libsnmp5-dev, libsqlite0-dev, libssl-dev (>= 0.9.6), libt1-dev, libtool (>= 1.4.2-4), libwrap0-dev, libxmltok1-dev, libxml2-dev (>= 2.4.14), libxslt1-dev (>= 1.0.18), re2c, unixodbc-dev, zlib1g-dev (>= 1.0.9)
Build-Conflicts: bind-dev
Standards-Version: 3.6.2
Package: php5
Architecture: all
Depends: libapache-mod-php5 (>= ${Source-Version}) | libapache2-mod-php5 (>= ${Source-Version}) | php5-cgi (>= ${Source-Version}), php5-common (>= ${Source-Version})
Depends: libapache2-mod-php5 (>= ${Source-Version}) | libapache-mod-php5 (>= ${Source-Version}) | php5-cgi (>= ${Source-Version}), php5-common (>= ${Source-Version})
Description: server-side, HTML-embedded scripting language (meta-package)
This package is a meta-package that, when installed, guarantees that you
have at least one of the four server-side versions of the PHP5 interpreter
......@@ -132,8 +132,7 @@ Description: command-line interpreter for the php5 scripting language
Homepage: http://www.php.net/
Package: php5-dev
Depends: autoconf, automake1.4, libssl-dev, php5-common (>= ${Source-Version})
Conflicts: libtool (= 1.4b-1), libtool (= 1.4b-2), libtool (= 1.4b-3)
Depends: autoconf, automake1.4, libssl-dev, libtool, shtool, php5-common (>= ${Source-Version})
Section: devel
Architecture: any
Description: Files for PHP5 module development
......
diff -ur php-5.0.4/configure.in php5-5.0.4/configure.in
--- php-5.0.4/configure.in 2005-03-31 07:43:12.000000000 +1000
+++ php5-5.0.4/configure.in 2005-07-31 02:35:46.000000000 +1000
@@ -1033,8 +1033,10 @@
ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO //'`
+DEBIAN_PHP_API=`egrep -h '^#define ZEND_EXTENSION_API_NO|^#define ZEND_MODULE_API_NO|#define PHP_API_VERSION' $srcdir/Zend/zend_extensions.h $srcdir/Zend/zend_modules.h $srcdir/main/php.h | awk '{print $3}' | sed -e 's/^2200/200/' | sort -n | tail -n 1`
+
if test -z "$EXTENSION_DIR"; then
- extbasedir=$ZEND_MODULE_API_NO
+ extbasedir=$DEBIAN_PHP_API
if test "$oldstyleextdir" = "yes"; then
if test "$PHP_DEBUG" = "1"; then
part1=debug
@@ -1154,6 +1156,7 @@
PHP_SUBST(CXXFLAGS_CLEAN)
PHP_SUBST(CXX_PHP_COMPILE)
PHP_SUBST_OLD(DEBUG_CFLAGS)
+PHP_SUBST_OLD(DEBIAN_PHP_API)
PHP_SUBST_OLD(EXTENSION_DIR)
PHP_SUBST_OLD(EXTRA_LDFLAGS)
PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM)
diff -ur php-5.0.4/scripts/php-config.in php5-5.0.4/scripts/php-config.in
--- php-5.0.4/scripts/php-config.in 2005-03-16 17:36:54.000000000 +1100
+++ php5-5.0.4/scripts/php-config.in 2005-07-31 02:34:52.000000000 +1000
@@ -7,6 +7,7 @@
ldflags="@PHP_LDFLAGS@"
libs="@EXTRA_LIBS@"
extension_dir='@EXTENSION_DIR@'
+phpapi="@DEBIAN_PHP_API@"
case "$1" in
--prefix)
@@ -21,8 +22,10 @@
echo $extension_dir;;
--version)
echo $version;;
+--phpapi)
+ echo $phpapi;;
*)
- echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--version]"
+ echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--version|--phpapi]"
exit 1;;
esac
......@@ -15,29 +15,34 @@ export DH_COMPAT=3
# This has to be exported to make some magic below work.
export DH_OPTIONS
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
PHP5_HOST_GNU_TYPE = $(shell echo $(DEB_HOST_GNU_TYPE) | sed 's/-gnu$$//')
PHP5_BUILD_GNU_TYPE = $(shell echo $(DEB_BUILD_GNU_TYPE) | sed 's/-gnu$$//')
PHP5_SOURCE_VERSION = $(shell dpkg-parsechangelog | grep ^Version | sed "s/Version: //")
PHP5_UPSTREAM_VERSION = $(shell echo $(PHP5_SOURCE_VERSION) | sed -e "s/-.*//" -e "s/.*://")
PHP5_DEBIAN_REVISION = $(shell echo $(PHP5_SOURCE_VERSION) | sed "s/.*-//")
APACHE_VERSION = $(shell dpkg -s apache-dev | grep ^Version | cut -d\ -f2 | cut -d- -f1)
PROG_SENDMAIL = /usr/sbin/sendmail
CFLAGS = -O2 -Wall -fsigned-char -fno-strict-aliasing
LFSFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
# Enable IEEE-conformant floating point math on alphas (not the default)
ifeq (alpha-linux-gnu,$(DEB_HOST_GNU_TYPE))
ifeq (alpha-linux,$(PHP5_HOST_GNU_TYPE))
CFLAGS += -mieee
endif
ifeq ($(DEB_HOST_GNU_TYPE), $(findstring $(DEB_HOST_GNU_TYPE), ia64-linux-gnu powerpc64-linux-gnu))
ifeq ($(PHP5_HOST_GNU_TYPE), $(findstring $(PHP5_HOST_GNU_TYPE), ia64-linux powerpc64-linux))
CFLAGS += -g
else
CFLAGS += -gstabs
endif
COMMON_CONFIG= --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
COMMON_CONFIG= --build=$(PHP5_BUILD_GNU_TYPE)-gnu --host=$(PHP5_HOST_GNU_TYPE)-gnu \
--enable-memory-limit \
--disable-debug \
--with-regex=php \
......@@ -76,11 +81,6 @@ COMMON_CONFIG= --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
--with-mime-magic=/usr/share/misc/file/magic.mime \
--with-exec-dir=/usr/lib/php5/libexec
apachever=$(shell dpkg -s apache-dev | grep ^Version | cut -d\ -f2 | cut -d- -f1)
php5ver=$(shell head -1 debian/changelog | cut -d\ -f 2 | sed 's/[()]//g')
zendapiver=$(shell egrep '\#define ZEND_MODULE_API_NO ' ./Zend/zend_modules.h|awk '{print $$3}')
phpapiver=$(shell grep '\#define PHP_API_VERSION ' ./main/php.h|awk '{print $$3}')
patch: patch-stamp
patch-stamp:
dh_testdir
......@@ -343,6 +343,17 @@ install: build
for i in Makefile.global acinclude.m4 mkdep.awk phpize.m4 scan_makefile_in.awk; do \
chmod 644 debian/php5-dev/usr/lib/php5/build/$$i; \
done
# shipping duplicate files from other packages is hell for security audits
rm debian/php5-dev/usr/lib/php5/build/config.guess && \
ln -s ../../../share/misc/config.guess debian/php5-dev/usr/lib/php5/build/config.guess
rm debian/php5-dev/usr/lib/php5/build/config.sub && \
ln -s ../../../share/misc/config.sub debian/php5-dev/usr/lib/php5/build/config.sub
rm debian/php5-dev/usr/lib/php5/build/libtool.m4 && \
ln -s ../../../share/libtool/libtool.m4 debian/php5-dev/usr/lib/php5/build/libtool.m4
rm debian/php5-dev/usr/lib/php5/build/ltmain.sh && \
ln -s ../../../share/libtool/ltmain.sh debian/php5-dev/usr/lib/php5/build/ltmain.sh
rm debian/php5-dev/usr/lib/php5/build/shtool && \
ln -s ../../../bin/shtool debian/php5-dev/usr/lib/php5/build/shtool
# make php-dev stuff versioned
for i in php-config phpize; do \
mv debian/php5-dev/usr/bin/$$i debian/php5-dev/usr/bin/"$$i"5; \
......@@ -452,18 +463,17 @@ binary-arch: build install
# dh_makeshlibs
# dh_perl
dh_shlibdeps -a
echo "apache:Depends=apache-common (>= $(apachever))" >>debian/libapache-mod-php5.substvars
echo "php:Provides=phpapi-$(zendapiver)" >> debian/libapache-mod-php5.substvars
echo "php:Provides=phpapi-$(zendapiver)" >> debian/php5-cli.substvars
echo "php:Provides=phpapi-$(zendapiver)" >> debian/php5-cgi.substvars
echo "php:Provides=phpapi-$(zendapiver)" >> debian/libapache2-mod-php5.substvars
phpapi=`./debian/php5-dev/usr/bin/php-config5 --phpapi`; \
for i in libapache-mod-php5 libapache2-mod-php5 php5-cgi php5-cli; do \
echo "php:Provides=phpapi-$${phpapi}" >> debian/$$i.substvars; \
done; \
cat debian/modulelist | while read package extname dsoname; do \
echo "php:Depends=phpapi-$(zendapiver)" >> debian/php5-$$package.substvars; \
echo "php:Depends=phpapi-$${phpapi}" >> debian/php5-$$package.substvars; \
done
echo "apache:Depends=apache-common (>= $(APACHE_VERSION))" >>debian/libapache-mod-php5.substvars
echo "apache2:Depends=apache2-mpm-prefork (>> 2.0.52)" >>debian/libapache2-mod-php5.substvars
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment