- remove dependency on external libtool
- ltmain patch no longer needed - move the php.ini extension lines to the end of the file - introduce a new 'phpxs' command which enables/disables modules from a shell without needing to manually edit php.ini - libphp4.so now installs into the same module dir as the extensions - php4-enable is now done by 'phpxs -s' so remove it tested by wilfried@, feedback from naddy@
This commit is contained in:
parent
392a8b07f1
commit
72c41ca52b
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2002/07/12 10:13:56 avsm Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2002/08/12 04:27:41 avsm Exp $
|
||||
|
||||
COMMENT= "server-side HTML-embedded scripting language"
|
||||
PKGNAME= php4-core-${V}
|
||||
@ -26,20 +26,29 @@ CONFIGURE_ARGS+= --with-apxs=/usr/sbin/apxs \
|
||||
|
||||
MODULES= gettext iconv
|
||||
|
||||
# some variables to substitute
|
||||
SUBST_VARS= PHP_CONFIG_FILE
|
||||
PHP_VERSION= ${V}
|
||||
|
||||
.for i in TRUEPREFIX PHP_CONFIG_FILE MODULES_DIR PHP_VERSION
|
||||
PHPXS_SUBST+= -e 's,${i},${${i}},'
|
||||
.endfor
|
||||
|
||||
pre-fake:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/${MODULES_SUBDIR}
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA} ${WRKBUILD}/.libs/libphp4.so ${PREFIX}/lib/libphp4.so
|
||||
${INSTALL_DATA} ${WRKBUILD}/.libs/libphp4.so ${PREFIX}/${MODULES_SUBDIR}
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/php4
|
||||
${INSTALL_PROGRAM} ${WRKBUILD}/sapi/cli/php ${PREFIX}/bin
|
||||
.for i in dist recommended
|
||||
@sed 's,MODULES_DIR,${MODULES_DIR},' \
|
||||
<${WRKSRC}/php.ini-dist \
|
||||
>${PREFIX}/share/doc/php4/php.ini-dist
|
||||
@sed 's,MODULES_DIR,${MODULES_DIR},' \
|
||||
<${WRKSRC}/php.ini-recommended \
|
||||
>${PREFIX}/share/doc/php4/php.ini-recommended
|
||||
@sed 's,y0y0y0,${TRUEPREFIX},' \
|
||||
<${FILESDIR}/php4-enable >${PREFIX}/sbin/php4-enable
|
||||
@chown ${BINOWN}:${BINGRP} ${PREFIX}/sbin/php4-enable
|
||||
@chmod ${BINMODE} ${PREFIX}/sbin/php4-enable
|
||||
<${WRKSRC}/php.ini-${i} \
|
||||
>${PREFIX}/share/doc/php4/php.ini-${i}
|
||||
.endfor
|
||||
@sed ${PHPXS_SUBST} <${FILESDIR}/phpxs >${PREFIX}/sbin/phpxs
|
||||
@chown ${BINOWN}:${BINGRP} ${PREFIX}/sbin/phpxs
|
||||
@chmod ${BINMODE} ${PREFIX}/sbin/phpxs
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
LIB_DEPENDS+= recode.0::converters/recode
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: php4-enable,v 1.1.1.1 2002/06/24 19:23:41 avsm Exp $
|
||||
|
||||
MODULE=y0y0y0/lib/libphp4.so
|
||||
INI=y0y0y0/share/doc/php4
|
||||
|
||||
if [ ! -f ${MODULE} ]; then
|
||||
echo "can't find php4 module (${MODULE})"
|
||||
exit 1
|
||||
else
|
||||
echo "enabling php4 module..."
|
||||
/usr/sbin/apxs -i -a -n php4 ${MODULE}
|
||||
echo "note: sample configuration files can be found in ${INI}"
|
||||
fi
|
97
www/php4/core/files/phpxs
Executable file
97
www/php4/core/files/phpxs
Executable file
@ -0,0 +1,97 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
|
||||
# variables substituted during package build time
|
||||
php_version=PHP_VERSION
|
||||
php_module_path=MODULES_DIR
|
||||
php_cfg=PHP_CONFIG_FILE
|
||||
php_example=TRUEPREFIX/share/doc/php4
|
||||
php_module=${php_module_path}/libphp4.so
|
||||
|
||||
showusage() {
|
||||
echo
|
||||
echo "Usage: $0 -a [ -c <location of php.ini> ] <module>"
|
||||
echo " $0 -r [ -c <location of php.ini> ] <module>"
|
||||
echo " $0 -s"
|
||||
exit 2
|
||||
}
|
||||
|
||||
set -- `getopt sarc: $*`
|
||||
if test $? != 0 ; then
|
||||
showusage;
|
||||
fi
|
||||
|
||||
add=0; remove=0;
|
||||
for i; do
|
||||
case "$i"
|
||||
in
|
||||
-s)
|
||||
setup=1; shift;;
|
||||
-a)
|
||||
add=1; shift;;
|
||||
-r)
|
||||
remove=1; shift;;
|
||||
-c)
|
||||
php_cfg=$2; shift; shift;;
|
||||
--)
|
||||
shift; break;;
|
||||
esac
|
||||
done
|
||||
|
||||
module=$1
|
||||
|
||||
if [ $setup ]; then
|
||||
if [ ! -f ${php_module} ]; then
|
||||
echo "Unable to locate PHP4 module at ${php_module}"
|
||||
exit;
|
||||
fi
|
||||
|
||||
/usr/sbin/apxs -i -a -n php4 ${php_module}
|
||||
echo
|
||||
echo "You should copy the sample configuration files from"
|
||||
echo "${php_example} to ${php_cfg}"
|
||||
exit;
|
||||
fi
|
||||
|
||||
if [ ! -r $php_cfg ]; then
|
||||
echo "PHP config file $php_cfg could not be found."
|
||||
showusage;
|
||||
fi
|
||||
|
||||
if [ ! $module ]; then
|
||||
echo 'Specify a PHP extension module to activate or deactivate.'
|
||||
showusage;
|
||||
fi
|
||||
|
||||
if [ `expr $add + $remove` -gt 1 ]; then
|
||||
echo 'Cannot specify -a and -r at the same time.'
|
||||
showusage
|
||||
fi
|
||||
|
||||
if [ `expr $add + $remove` -eq 0 ]; then
|
||||
echo 'Must specify either -a or -r action.'
|
||||
showusage
|
||||
fi
|
||||
|
||||
# regexp to match an extension entry in the config file
|
||||
extmatch='^\;?[[:space:]]{0,2}extension[[:space:]]*=[[:space:]]*'${module}.so
|
||||
|
||||
if [ $add -gt 0 ]; then
|
||||
if [ ! -r ${php_module_path}/${module}.so ]; then
|
||||
echo "Module ${module}.so was not found on your system in ${php_module_path}"
|
||||
echo "Try installing package php4-${module}-${php_version} from your package collection"
|
||||
exit;
|
||||
fi
|
||||
if [ `grep -E "${extmatch}" $php_cfg | wc -l` -gt 0 ]; then
|
||||
echo "Activating extension : $module";
|
||||
/usr/bin/perl -pi -e "s/${extmatch}/extension=${module}.so/" $php_cfg
|
||||
else
|
||||
echo "Adding extension : $module";
|
||||
echo "extension=${module}.so" >> $php_cfg;
|
||||
fi
|
||||
elif [ $remove -gt 0 ]; then
|
||||
echo "Disabling extension: $module"
|
||||
/usr/bin/perl -pi -e "s/${extmatch}/\;extension=${module}.so/" $php_cfg;
|
||||
fi
|
@ -1,52 +1,7 @@
|
||||
$OpenBSD: patch-ltmain_sh,v 1.1.1.1 2002/06/24 19:23:41 avsm Exp $
|
||||
--- ltmain.sh.orig Sat Dec 8 19:40:14 2001
|
||||
+++ ltmain.sh Mon Dec 17 18:47:05 2001
|
||||
@@ -1031,12 +1031,34 @@ compiler."
|
||||
# These systems don't actually have a C library (as such)
|
||||
test "X$arg" = "X-lc" && continue
|
||||
;;
|
||||
+ *-*-openbsd*)
|
||||
+ # Do not include libc due to us having libc/libc_r.
|
||||
+ continue
|
||||
+ ;;
|
||||
+ esac
|
||||
+ elif test "$arg" = "-lc_r"; then
|
||||
+ case "$host" in
|
||||
+ *-*-openbsd*)
|
||||
+ # Do not include libc_r directly, use -pthread flag.
|
||||
+ continue
|
||||
+ ;;
|
||||
esac
|
||||
fi
|
||||
deplibs="$deplibs $arg"
|
||||
continue
|
||||
;;
|
||||
|
||||
+ -pthread)
|
||||
+ case $host in
|
||||
+ *-*-openbsd*)
|
||||
+ deplibs="$deplibs $arg"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ continue
|
||||
+ ;;
|
||||
+ esac
|
||||
+ ;;
|
||||
+
|
||||
-module)
|
||||
module=yes
|
||||
continue
|
||||
@@ -2401,6 +2423,9 @@ compiler."
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
|
||||
# these systems don't actually have a c library (as such)!
|
||||
;;
|
||||
+ *-*-openbsd*)
|
||||
+ # Do not include libc due to us having libc/libc_r.
|
||||
+ ;;
|
||||
*-*-rhapsody* | *-*-darwin1.[012])
|
||||
# Rhapsody C library is in the System framework
|
||||
deplibs="$deplibs -framework System"
|
||||
@@ -4412,40 +4437,6 @@ relink_command=\"$relink_command\""
|
||||
$OpenBSD: patch-ltmain_sh,v 1.2 2002/08/12 04:27:41 avsm Exp $
|
||||
--- ltmain.sh.orig Thu Aug 8 03:07:04 2002
|
||||
+++ ltmain.sh Thu Aug 8 03:07:34 2002
|
||||
@@ -4412,40 +4412,6 @@ relink_command=\"$relink_command\""
|
||||
# Exit here if they wanted silent mode.
|
||||
test "$show" = ":" && exit 0
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-php_ini-dist,v 1.3 2002/07/09 19:38:06 avsm Exp $
|
||||
$OpenBSD: patch-php_ini-dist,v 1.4 2002/08/12 04:27:41 avsm Exp $
|
||||
--- php.ini-dist.orig Mon Apr 8 02:15:16 2002
|
||||
+++ php.ini-dist Tue Jul 9 20:35:34 2002
|
||||
+++ php.ini-dist Tue Aug 6 20:58:26 2002
|
||||
@@ -356,9 +356,6 @@ default_mimetype = "text/html"
|
||||
; UNIX: "/path1:/path2"
|
||||
;include_path = ".:/php/includes"
|
||||
@ -20,7 +20,7 @@ $OpenBSD: patch-php_ini-dist,v 1.3 2002/07/09 19:38:06 avsm Exp $
|
||||
|
||||
; Whether or not to enable the dl() function. The dl() function does NOT work
|
||||
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
|
||||
@@ -410,7 +407,7 @@ upload_max_filesize = 2M
|
||||
@@ -410,85 +407,11 @@ upload_max_filesize = 2M
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
|
||||
@ -29,23 +29,29 @@ $OpenBSD: patch-php_ini-dist,v 1.3 2002/07/09 19:38:06 avsm Exp $
|
||||
|
||||
; Define the anonymous ftp password (your email address)
|
||||
;from="john@doe.com"
|
||||
@@ -425,11 +422,7 @@ allow_url_fopen = On
|
||||
;
|
||||
; extension=modulename.extension
|
||||
;
|
||||
|
||||
-
|
||||
-;;;;;;;;;;;;;;;;;;;;;;
|
||||
-; Dynamic Extensions ;
|
||||
-;;;;;;;;;;;;;;;;;;;;;;
|
||||
-;
|
||||
-; If you wish to have an extension loaded automatically, use the following
|
||||
-; syntax:
|
||||
-;
|
||||
-; extension=modulename.extension
|
||||
-;
|
||||
-; For example, on Windows:
|
||||
-;
|
||||
-; extension=msql.dll
|
||||
-;
|
||||
-; ... or under UNIX:
|
||||
+; For example under UNIX:
|
||||
;
|
||||
; extension=msql.so
|
||||
;
|
||||
@@ -437,57 +430,27 @@ allow_url_fopen = On
|
||||
; needs to go here. Specify the location of the extension with the
|
||||
; extension_dir directive above.
|
||||
|
||||
-;
|
||||
-; extension=msql.so
|
||||
-;
|
||||
-; Note that it should be the name of the module only; no directory information
|
||||
-; needs to go here. Specify the location of the extension with the
|
||||
-; extension_dir directive above.
|
||||
-
|
||||
-
|
||||
-;Windows Extensions
|
||||
-;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
|
||||
@ -97,6 +103,46 @@ $OpenBSD: patch-php_ini-dist,v 1.3 2002/07/09 19:38:06 avsm Exp $
|
||||
-;extension=php_yaz.dll
|
||||
-;extension=php_zlib.dll
|
||||
-
|
||||
-
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
; Module Settings ;
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
@@ -500,11 +423,6 @@ allow_url_fopen = On
|
||||
define_syslog_variables = Off
|
||||
|
||||
[mail function]
|
||||
-; For Win32 only.
|
||||
-SMTP = localhost
|
||||
-
|
||||
-; For Win32 only.
|
||||
-sendmail_from = me@localhost.com
|
||||
|
||||
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
|
||||
;sendmail_path =
|
||||
@@ -877,6 +795,41 @@ sockets.use_system_read = On
|
||||
;fbsql.max_results = 128
|
||||
;fbsql.batchSize = 1000
|
||||
|
||||
-; Local Variables:
|
||||
-; tab-width: 4
|
||||
-; End:
|
||||
+;;;;;;;;;;;;;;;;;;;;;;
|
||||
+; Dynamic Extensions ;
|
||||
+;;;;;;;;;;;;;;;;;;;;;;
|
||||
+;
|
||||
+; If you wish to have an extension loaded automatically, use the following
|
||||
+; syntax:
|
||||
+;
|
||||
+; extension=modulename.extension
|
||||
+;
|
||||
+; For example under UNIX:
|
||||
+;
|
||||
+; extension=msql.so
|
||||
+;
|
||||
+; Note that it should be the name of the module only; no directory information
|
||||
+; needs to go here. Specify the location of the extension with the
|
||||
+; extension_dir directive above.
|
||||
+
|
||||
+;extension=bz2.so
|
||||
+;extension=curl.so
|
||||
+;extension=dba.so
|
||||
@ -118,18 +164,3 @@ $OpenBSD: patch-php_ini-dist,v 1.3 2002/07/09 19:38:06 avsm Exp $
|
||||
+;extension=sybase_ct.so
|
||||
+;extension=xml.so
|
||||
+;extension=xslt.so
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
; Module Settings ;
|
||||
@@ -500,11 +463,6 @@ allow_url_fopen = On
|
||||
define_syslog_variables = Off
|
||||
|
||||
[mail function]
|
||||
-; For Win32 only.
|
||||
-SMTP = localhost
|
||||
-
|
||||
-; For Win32 only.
|
||||
-sendmail_from = me@localhost.com
|
||||
|
||||
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
|
||||
;sendmail_path =
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-php_ini-recommended,v 1.3 2002/07/09 19:38:06 avsm Exp $
|
||||
$OpenBSD: patch-php_ini-recommended,v 1.4 2002/08/12 04:27:41 avsm Exp $
|
||||
--- php.ini-recommended.orig Wed Apr 24 02:51:50 2002
|
||||
+++ php.ini-recommended Tue Jul 9 20:35:14 2002
|
||||
+++ php.ini-recommended Tue Aug 6 20:57:43 2002
|
||||
@@ -361,9 +361,6 @@ default_mimetype = "text/html"
|
||||
; UNIX: "/path1:/path2"
|
||||
;include_path = ".:/php/includes"
|
||||
@ -20,7 +20,7 @@ $OpenBSD: patch-php_ini-recommended,v 1.3 2002/07/09 19:38:06 avsm Exp $
|
||||
|
||||
; Whether or not to enable the dl() function. The dl() function does NOT work
|
||||
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
|
||||
@@ -417,7 +414,7 @@ upload_max_filesize = 2M
|
||||
@@ -417,85 +414,11 @@ upload_max_filesize = 2M
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
|
||||
@ -29,23 +29,29 @@ $OpenBSD: patch-php_ini-recommended,v 1.3 2002/07/09 19:38:06 avsm Exp $
|
||||
|
||||
; Define the anonymous ftp password (your email address)
|
||||
;from="john@doe.com"
|
||||
@@ -432,11 +429,7 @@ allow_url_fopen = On
|
||||
;
|
||||
; extension=modulename.extension
|
||||
;
|
||||
|
||||
-
|
||||
-;;;;;;;;;;;;;;;;;;;;;;
|
||||
-; Dynamic Extensions ;
|
||||
-;;;;;;;;;;;;;;;;;;;;;;
|
||||
-;
|
||||
-; If you wish to have an extension loaded automatically, use the following
|
||||
-; syntax:
|
||||
-;
|
||||
-; extension=modulename.extension
|
||||
-;
|
||||
-; For example, on Windows:
|
||||
-;
|
||||
-; extension=msql.dll
|
||||
-;
|
||||
-; ... or under UNIX:
|
||||
+; For example under UNIX:
|
||||
;
|
||||
; extension=msql.so
|
||||
;
|
||||
@@ -444,57 +437,27 @@ allow_url_fopen = On
|
||||
; needs to go here. Specify the location of the extension with the
|
||||
; extension_dir directive above.
|
||||
|
||||
-;
|
||||
-; extension=msql.so
|
||||
-;
|
||||
-; Note that it should be the name of the module only; no directory information
|
||||
-; needs to go here. Specify the location of the extension with the
|
||||
-; extension_dir directive above.
|
||||
-
|
||||
-
|
||||
-;Windows Extensions
|
||||
-;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
|
||||
@ -97,6 +103,46 @@ $OpenBSD: patch-php_ini-recommended,v 1.3 2002/07/09 19:38:06 avsm Exp $
|
||||
-;extension=php_yaz.dll
|
||||
-;extension=php_zlib.dll
|
||||
-
|
||||
-
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
; Module Settings ;
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
@@ -507,11 +430,6 @@ allow_url_fopen = On
|
||||
define_syslog_variables = Off
|
||||
|
||||
[mail function]
|
||||
-; For Win32 only.
|
||||
-SMTP = localhost
|
||||
-
|
||||
-; For Win32 only.
|
||||
-sendmail_from = me@localhost.com
|
||||
|
||||
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
|
||||
;sendmail_path =
|
||||
@@ -884,6 +802,41 @@ sockets.use_system_read = On
|
||||
;fbsql.max_results = 128
|
||||
;fbsql.batchSize = 1000
|
||||
|
||||
-; Local Variables:
|
||||
-; tab-width: 4
|
||||
-; End:
|
||||
+;;;;;;;;;;;;;;;;;;;;;;
|
||||
+; Dynamic Extensions ;
|
||||
+;;;;;;;;;;;;;;;;;;;;;;
|
||||
+;
|
||||
+; If you wish to have an extension loaded automatically, use the following
|
||||
+; syntax:
|
||||
+;
|
||||
+; extension=modulename.extension
|
||||
+;
|
||||
+; For example under UNIX:
|
||||
+;
|
||||
+; extension=msql.so
|
||||
+;
|
||||
+; Note that it should be the name of the module only; no directory information
|
||||
+; needs to go here. Specify the location of the extension with the
|
||||
+; extension_dir directive above.
|
||||
+
|
||||
+;extension=bz2.so
|
||||
+;extension=curl.so
|
||||
+;extension=dba.so
|
||||
@ -118,18 +164,3 @@ $OpenBSD: patch-php_ini-recommended,v 1.3 2002/07/09 19:38:06 avsm Exp $
|
||||
+;extension=sybase_ct.so
|
||||
+;extension=xml.so
|
||||
+;extension=xslt.so
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
; Module Settings ;
|
||||
@@ -507,11 +470,6 @@ allow_url_fopen = On
|
||||
define_syslog_variables = Off
|
||||
|
||||
[mail function]
|
||||
-; For Win32 only.
|
||||
-SMTP = localhost
|
||||
-
|
||||
-; For Win32 only.
|
||||
-sendmail_from = me@localhost.com
|
||||
|
||||
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
|
||||
;sendmail_path =
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: INSTALL,v 1.2 2002/06/26 21:32:56 avsm Exp $
|
||||
# $OpenBSD: INSTALL,v 1.3 2002/08/12 04:27:41 avsm Exp $
|
||||
#
|
||||
# php4 installation
|
||||
|
||||
@ -17,7 +17,7 @@ do_notice()
|
||||
echo "| To finish the install, you need to enable the php4"
|
||||
echo "| module using the following command"
|
||||
echo "|"
|
||||
echo "| $PREFIX/sbin/php4-enable"
|
||||
echo "| $PREFIX/sbin/phpxs -s"
|
||||
echo "|"
|
||||
echo "| To actually enable parsing of PHP scripts, you also"
|
||||
echo "| need to manually add the following to your "
|
||||
@ -25,7 +25,7 @@ do_notice()
|
||||
echo "|"
|
||||
echo "| AddType application/x-httpd-php .php"
|
||||
echo "|"
|
||||
echo "| Copy the config file below into /var/www/conf/php.ini"
|
||||
echo "| Copy the config file below into ${PHP_CONFIG_FILE}"
|
||||
echo "| ${PREFIX}/share/doc/php4/php.ini-dist"
|
||||
echo "+---------------"
|
||||
echo
|
||||
|
@ -1,8 +1,8 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2002/06/24 19:23:41 avsm Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2002/08/12 04:27:41 avsm Exp $
|
||||
@pkgcfl php3-*
|
||||
bin/php
|
||||
lib/libphp4.so
|
||||
sbin/php4-enable
|
||||
lib/php/modules/libphp4.so
|
||||
sbin/phpxs
|
||||
share/doc/php4/php.ini-dist
|
||||
share/doc/php4/php.ini-recommended
|
||||
@dirrm share/doc/php4
|
||||
|
Loading…
x
Reference in New Issue
Block a user