Hi. Please apply these patches and rebuild the php core.
Thanks. Chears. -- Regards // Oden Eriksson, Deserve-IT.com
php-4.3.0-credits.patch.bz2
Description: BZip2 compressed data
php-4.3.0-apache2.patch.bz2
Description: BZip2 compressed data
php-4.3.0-db4.patch.bz2
Description: BZip2 compressed data
php-4.3.0-no_egg.patch.bz2
Description: BZip2 compressed data
--- php.spec 2003-01-08 05:24:58.000000000 +0100
+++ php.spec.oden 2003-01-17 16:06:25.000000000 +0100
@@ -1,8 +1,32 @@
+# OE: conditional switches
+#
+#(ie. use with rpm --rebuild):
+#
+# --with debug Compile with debugging code
+#
+# enable build with debugging code: will _not_ strip away any debugging code,
+# will _add_ -g3 to CFLAGS, will _add_ --enable-maintainer-mode to
+# configure.
+
+%define build_debug 0
+
+# commandline overrides:
+# rpm -ba|--rebuild --with 'xxx'
+%{?_with_debug: %{expand: %%define build_debug 1}}
+
+%if %{build_debug}
+# disable build root strip policy
+%define __spec_install_post %{_libdir}/rpm/brp-compress || :
+
+# This gives extra debuggin and huge binaries
+%{expand:%%define optflags %{optflags} %([ ! $DEBUG ] && echo '-g3')}
+%endif
+
%define phpdir %{_libdir}/php
%define peardir %{_datadir}/pear
%define libversion 430
%define phpversion 4.3.0
-%define phprelease 1mdk
+%define phprelease 2mdk
#The external_modules definition has been put in the %%build section
#to clean things a bit
@@ -23,18 +47,26 @@
Patch3: php-4.3.0-info.patch.bz2
Patch4: php-4.3.0-64bit.patch.bz2
Patch6: php-4.3.0-fix-pear.patch.bz2
+
+# OE: here's my patches
+# note P7 and P8 don't changes the php core
+Patch7: php-4.3.0-db4.patch.bz2
+Patch8: php-4.3.0-apache2.patch.bz2
+
+Patch9: php-4.3.0-credits.patch.bz2
+Patch10: php-4.3.0-no_egg.patch.bz2
+
+# OE: here's jmdaults patch, it's great!
+Patch11: php-4.3.0-scandir.patch.bz2
+
# Stolen from PLD
Patch14: php-4.3.0-mail.patch.bz2
Patch15: php-4.3.0-mcal-shared-lib.patch.bz2
Patch16: php-4.3.0-msession-shared-lib.patch.bz2
-BuildRequires: bison
-BuildRequires: byacc
-BuildRequires: pam-devel
-BuildRequires: flex
-BuildRequires: libopenssl0-devel
-BuildRequires: zlib-devel
-BuildRequires: glibc-devel
-BuildRequires: gettext-devel
+
+BuildRequires: bison byacc pam-devel flex openssl-devel zlib-devel
+BuildRequires: glibc-devel gettext-devel
+#BuildRequires: autoconf2.5
BuildRoot: %{_tmppath}/%{name}-%{version}
Provides: ADVXpackage
@@ -45,6 +77,12 @@
systems, so writing a database-enabled script with PHP is fairly simple. The
most common use of PHP coding is probably as a replacement for CGI scripts.
+You can build %{name} with some conditional build swithes;
+
+(ie. use with rpm --rebuild):
+--with debug Compile with debugging code
+
+
%package cli
Group: Development/Other
Summary: Command-line interface to PHP
@@ -90,24 +128,6 @@
If you need apache module support, you also need to install the mod_php
package.
-
-#%package pear
-#Group: Development/Other
-#Summary: PEAR-related files from PHP
-#URL: http://pear.php.net
-#Requires: php-xmlrpc = %{version}
-#Requires: php
-#
-#%description pear
-#PEAR is short for "PHP Extension and Application Repository" and is pronounced
-#just like the fruit. The purpose of PEAR is to provide:
-#
-#* A structured library of open-sourced code for PHP users
-#* A system for code distribution and package maintenance
-#* A standard style for code written in PHP
-#* The PHP Foundation Classes (PFC)
-#* The PHP Extension Code Library (PECL)
-
%package -n libphp_common%{libversion}
Version: %{libversion}
Group: Development/Other
@@ -132,6 +152,8 @@
Obsoletes: php-zlib
Provides: php-zlib
Obsoletes: php-gettext
+Obsoletes: php-common
+Provides: php-common
Provides: php-gettext
Provides: ADVXpackage
@@ -160,7 +182,6 @@
SELF-CONTAINED-EXTENSIONS.
%prep
-[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%setup -q
%patch0 -p1
@@ -169,6 +190,11 @@
%patch3 -p1
%patch4 -p1
%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
# Stolen from PLD
%patch14 -p1
@@ -194,6 +220,12 @@
rm -f php-devel/extensions/skeleton/EXPERIMENTAL
rm -f php-devel/extensions/ncurses/EXPERIMENTAL
+# don't ship MS Windows source
+rm -rf php-devel/extensions/com
+rm -rf php-devel/extensions/dotnet
+rm -rf php-devel/extensions/printer
+rm -rf php-devel/extensions/w32api
+
cp -dpR sapi/* php-devel/sapi/
rm -f php-devel/sapi/thttpd/stub.c
rm -f php-devel/sapi/cgi/php.sym
@@ -205,16 +237,15 @@
cat > php-devel/buildext <<EOF
#!/bin/bash
gcc -fPIC -shared %{optflags} \\
- -I. \\
- -I/usr/include/php \\
- -I/usr/include/php/Zend \\
- -I/usr/include/php/TSRM \\
- -I/usr/include/php/main \\
+ -I. \`%{_bindir}/php-config --includes\` \\
-I/usr/include/freetype \\
+ -I/usr/include/openssl \\
-I/usr/include/\$1 \\
\$4 \$2 -o \$1.so \$3 -lc
EOF
+chmod 755 php-devel/buildext
+
cat > php-devel/PHP_BUILD <<EOF
%%global phpdir %{phpdir}
%%global peardir %{peardir}
@@ -223,9 +254,12 @@
%%global phprelease %{phprelease}
EOF
-chmod 755 php-devel/buildext
-
%build
+
+# OE: we should run buildconf if applied patches changes the configure stuff...
+# but currently I'm just too lazy to fix P1 ;)
+#./buildconf
+
%serverbuild
#For eventual compatibility with RedHat
@@ -241,7 +275,7 @@
#############################################################################
# Yes I know..., some of these names are mandrake specific.
# JMD: put mysql, pgsql ... ldap first, so people will see them first.
-%define external_modules mysql pgsql gd imap ldap bcmath bz2 calendar com cpdf crack curl cyrus db dba_bundle dbase dbx dio domxml dotnet exif fbsql fdftk filepro fribidi gmp hwapi hyperwave iconv informix ingres_ii interbase ircg java mcrypt mbstring mhash mime_magic ming mnogosearch msession msql mssql ncurses notes oci8 odbc oracle ovrimos pcntl pdf pfpro pspell qtdom readline recode rpc shmop snmp sockets swf sybase sybase_ct sysvmsg wddx xml xmlrpc xslt yaz zip
+%define external_modules mysql pgsql gd imap ldap bcmath bz2 calendar cpdf crack ctype curl cyrus db dba dba_bundle dbase dbx dio domxml exif fbsql fdf filepro fribidi gmp hwapi hyperwave iconv imagick informix ingres_ii interbase ircg java mbstring mcal mcrypt mcve mhash mime_magic ming mnogosearch msession msql mssql ncurses notes oci8 odbc oracle overload ovrimos pam_auth pcntl pdf pfpro pgsql posix pspell qtdom readline recode rrdtool shmop snmp smbauth sockets swf sybase sybase_ct sysvmsg tokenizer wddx xml xmlrpc xslt yaz zip
#DO NOT PUT THESE EXTENSIONS AS EXTERNAL:
# Here are reasons for each extension
@@ -299,8 +333,10 @@
--with-config-file-scan-dir=%{_sysconfdir}/php \
--with-pear=%{peardir} \
--enable-magic-quotes \
+%if %{build_debug}
+ --enable-maintainer-mode \
+%endif
--enable-debugger \
- --with-openssl \
--enable-track-vars \
--with-exec-dir=%{_bindir} \
--with-versioning \
@@ -309,22 +345,19 @@
--enable-track-vars \
--enable-trans-sid \
--enable-safe-mode \
- --with-ctype \
- --with-ttf \
- --with-freetype-dir=%{_prefix} \
- --with-zlib \
+ --enable-ftp \
+ --enable-gettext=%{_prefix} \
+ --enable-posix \
+ --enable-session \
--enable-sysvsem \
--enable-sysvshm \
--enable-yp \
- --enable-ftp \
- --with-gettext \
- --without-aspell \
+ --with-openssl=%{_prefix} \
--without-kerberos \
- --without-dba \
- --without-db2 \
- --without-db3 \
+ --with-ttf --with-freetype-dir=%{_prefix} --with-zlib=%{_prefix} \
+ --with-zlib=%{_prefix} --with-zlib-dir=%{_prefix} \
`for i in %{external_modules}; do echo --without-${i} --disable-${i}; done` \
- --without-gdbm
+ --without-dba --without-gdbm --without-ndbm --without-db2 --without-db3 --without-db4 --without-dbm --without-cdb --without-flatfile
### This configuration makes a dependency on those libs:
# -ldl -lpam -lcrypt -lresolv -lm -lz
@@ -348,14 +381,21 @@
./php-killrpath sapi/cli/php
./php-killrpath sapi/cgi/php
+
%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
-mv libphp_common.so libphp_common.so.430
-ln -s libphp_common.so.430 libphp_common.so
+# OE: make this somewhat short-circuitable
+if ! [ -f libphp_common.so.430 ]; then
+ mv libphp_common.so libphp_common.so.430
+ ln -s libphp_common.so.430 libphp_common.so
+fi
+
export LD_LIBRARY_PATH="."
export INSTALL_ROOT="$RPM_BUILD_ROOT"
export PHP_PEAR_INSTALL_DIR="%{peardir}"
+touch php.ini
+export PHPRC="."
make install
mkdir -p %{buildroot}%{_libdir}
@@ -381,6 +421,7 @@
ln -s extensions ext
rm -rf %{buildroot}%{peardir}
+rm -f %{buildroot}%{_bindir}/pear
%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
@@ -410,13 +451,6 @@
%doc Readme1st
%{_bindir}/php-cli
-#%files pear
-#%defattr(-,root,root)
-#%doc pear/README pear/CODING_STANDARDS
-#%{_bindir}/pear
-#%dir %{peardir}
-#%{peardir}/*
-
%files -n libphp_common%{version}
%defattr(-,root,root)
%{_libdir}/*so.*
@@ -424,7 +458,7 @@
%files -n php%{libversion}-devel
%defattr(-,root,root)
-%doc SELF-CONTAINED-EXTENSIONS CODING_STANDARDS README.* TODO
+%doc SELF-CONTAINED-EXTENSIONS CODING_STANDARDS README.* TODO EXTENSIONS
%doc Zend/ZEND_*
%{_bindir}/php-config
%{_bindir}/phpextdist
@@ -439,6 +473,22 @@
%{_libdir}/*.so
%changelog
+* Wed Jan 15 2003 Oden Eriksson <[EMAIL PROTECTED]> 4.3.0-2mdk
+- merged unofficial rpm releases up to 6mdk (my packages)
+- rebuilt against openssl-0.9.7
+- added P9, P10 & P11 (packager credits, no eastern egg and jmdaults
+ scandir patch)
+- added apache2 fix from CVS (P8) (php bugs: #21045 & #17098)
+- added ctype, overload, imagick, pam_auth smbauth, tokenizer and rrdtool
+ to the EXTENSIONS HACK, this prevents for example ctype, overload and
+ tokenizer to be built in.
+- enable build with debugging code, used ideas from my apache2 package
+- fix the buildext script
+- remove aspell from spec file (it's gone)
+- ignore all MS stuff (don't ship it, duh!)
+- added P7 (db4 support from CVS) Yihaa!
+- misc spec file fixes
+
* Tue Jan 07 2003 Jean-Michel Dault <[EMAIL PROTECTED]> 4.3.0-2mdk
- Put all extensions in the EXTERNAL_MANDRAKE_MODULES hack.
- Add Provides: ADVXpackage, all ADVX package will have this tag,
php-4.3.0-scandir.patch.bz2
Description: BZip2 compressed data
