ports/53017: [Maintainer Update] Add Oracle extension to PHP
Alex Dupre
sysadmin at alexdupre.com
Sat Jun 7 14:10:07 UTC 2003
>Number: 53017
>Category: ports
>Synopsis: [Maintainer Update] Add Oracle extension to PHP
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sat Jun 07 07:10:04 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Alex Dupre
>Release: FreeBSD 4.8-ALEXDUPRE i386
>Organization:
>Environment:
System: FreeBSD 4.8-ALEXDUPRE i386
>Description:
Add Oracle support into PHP4.
Patch inspired from PR 52615 (that can be closed).
While I'm here, add a missing RUN_DEPENDS for cracklib.
>How-To-Repeat:
>Fix:
--- php4.diff begins here ---
diff -ruN php4.orig/Makefile php4/Makefile
--- php4.orig/Makefile Sat Jun 7 14:08:02 2003
+++ php4/Makefile Sat Jun 7 15:17:14 2003
@@ -105,10 +105,10 @@
ALL_OPTIONS= BCMATH BZIP2 CALENDAR CRACK CTYPE CURL DBASE DBX DOMXML \
DOMXSLT EXIF FILEPRO FTP GD GDBM GETTEXT GMP HYPERWAVE ICONV \
IMAP INTERBASE MBSTRING MCAL MCVE MCRYPT MHASH MIME MING MYSQL \
- NCURSES OPENLDAP OPENSSL PCNTL PCRE PDFLIB POSIX POSTGRESQL \
- PSPELL READLINE RECODE SESSION SHMOP SNMP SOCKETS SYBASEDB \
- SYBASECT SYSVSEM SYSVSHM TOKENIZER UNIXODBC WDDX XML XMLRPC \
- XSLT YAZ YP ZIP ZLIB
+ NCURSES OPENLDAP OPENSSL ORACLE PCNTL PCRE PDFLIB POSIX \
+ POSTGRESQL PSPELL READLINE RECODE SESSION SHMOP SNMP SOCKETS \
+ SYBASEDB SYBASECT SYSVSEM SYSVSHM TOKENIZER UNIXODBC WDDX XML \
+ XMLRPC XSLT YAZ YP ZIP ZLIB
.for opt in ${ALL_OPTIONS}
.if defined(WITH_${opt}) || defined(WITHOUT_${opt})
@@ -224,6 +224,7 @@
.if defined(WITH_CRACK)
BUILD_DEPENDS+= ${LOCALBASE}/lib/libcrack.a:${PORTSDIR}/security/cracklib
+RUN_DEPENDS+= ${LOCALBASE}/lib/libcrack.a:${PORTSDIR}/security/cracklib
CONFIGURE_ARGS+=--with-crack=${LOCALBASE}
.endif
@@ -394,6 +395,12 @@
.if defined(WITH_OPENSSL)
CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE}
+.endif
+
+.if defined(WITH_ORACLE)
+BUILD_DEPENDS+= ${LOCALBASE}/oracle7/lib/libcore3.a:${PORTSDIR}/databases/oracle7-client
+RUN_DEPENDS+= ${LOCALBASE}/oracle7/lib/libcore3.a:${PORTSDIR}/databases/oracle7-client
+CONFIGURE_ARGS+=--with-oracle=${LOCALBASE}/oracle7
.endif
.if defined(WITH_PCNTL)
diff -ruN php4.orig/files/patch-configure php4/files/patch-configure
--- php4.orig/files/patch-configure Sat Jun 7 14:08:02 2003
+++ php4/files/patch-configure Sat Jun 7 15:38:29 2003
@@ -1,6 +1,120 @@
---- configure.orig Thu May 1 23:30:59 2003
-+++ configure Fri May 2 15:59:58 2003
-@@ -70925,29 +70925,6 @@
+--- configure.orig Wed May 28 14:36:29 2003
++++ configure Sat Jun 7 15:37:45 2003
+@@ -54106,8 +54106,8 @@
+
+ echo $ac_n "checking Oracle version""... $ac_c" 1>&6
+ echo "configure:54109: checking Oracle version" >&5
+- if test -s "$ORACLE_DIR/orainst/unix.rgs"; then
+- ORACLE_VERSION=`grep '"ocommon"' $ORACLE_DIR/orainst/unix.rgs | sed 's/ */:/g' | cut -d: -f 6 | cut -c 2-4`
++ if test -s "$ORACLE_DIR/ocommon/install/partial.prd"; then
++ ORACLE_VERSION=`grep '"ocommon"' $ORACLE_DIR/ocommon/install/partial.prd | sed 's/ */:/g' | cut -d: -f 6 | cut -c 2-4`
+ test -z "$ORACLE_VERSION" && ORACLE_VERSION=7.3
+ elif test -f $ORACLE_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then
+ ORACLE_VERSION=9.0
+@@ -56370,6 +56370,102 @@
+
+
+ if test "$ext_shared" = "yes"; then
++ ORACLE_SHARED_LIBADD="-lwrap $ORACLE_SHARED_LIBADD"
++ if test -n "$ORACLE_DIR/lib"; then
++
++ if test "$ORACLE_DIR/lib" != "/usr/lib"; then
++
++ if test -z "$ORACLE_DIR/lib" || echo "$ORACLE_DIR/lib" | grep '^/' >/dev/null ; then
++ ai_p=$ORACLE_DIR/lib
++ else
++
++ ep_dir="`echo $ORACLE_DIR/lib|sed 's%/*[^/][^/]*/*$%%'`"
++
++ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
++ ai_p="$ep_realdir/`basename \"$ORACLE_DIR/lib\"`"
++ fi
++
++
++ if test "$ext_shared" = "yes"; then
++ ORACLE_SHARED_LIBADD="$ld_runpath_switch$ai_p -L$ai_p $ORACLE_SHARED_LIBADD"
++ else
++
++
++
++ unique=`echo $ai_p|sed 's/[^a-zA-Z0-9]/_/g'`
++
++ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
++ if test -n "$unique" && test "`eval $cmd`" = "" ; then
++ eval "LIBPATH$unique=set"
++
++ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
++ LDFLAGS="$LDFLAGS -L$ai_p"
++ PHP_RPATHS="$PHP_RPATHS $ai_p"
++
++ fi
++
++
++ fi
++
++ fi
++
++ fi
++ else
++
++
++ if test -n "$ORACLE_DIR/lib"; then
++
++ if test "$ORACLE_DIR/lib" != "/usr/lib"; then
++
++ if test -z "$ORACLE_DIR/lib" || echo "$ORACLE_DIR/lib" | grep '^/' >/dev/null ; then
++ ai_p=$ORACLE_DIR/lib
++ else
++
++ ep_dir="`echo $ORACLE_DIR/lib|sed 's%/*[^/][^/]*/*$%%'`"
++
++ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
++ ai_p="$ep_realdir/`basename \"$ORACLE_DIR/lib\"`"
++ fi
++
++
++
++
++
++ unique=`echo $ai_p|sed 's/[^a-zA-Z0-9]/_/g'`
++
++ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
++ if test -n "$unique" && test "`eval $cmd`" = "" ; then
++ eval "LIBPATH$unique=set"
++
++ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
++ LDFLAGS="$LDFLAGS -L$ai_p"
++ PHP_RPATHS="$PHP_RPATHS $ai_p"
++
++ fi
++
++
++
++ fi
++
++ fi
++
++
++ case wrap in
++ c|c_r|pthread*) ;;
++ *)
++ LIBS="-lwrap $LIBS"
++ ;;
++ esac
++
++
++
++
++ fi
++
++
++
++
++ if test "$ext_shared" = "yes"; then
+ ORACLE_SHARED_LIBADD="-lnlsrtl3 $ORACLE_SHARED_LIBADD"
+ if test -n "$ORACLE_DIR/lib"; then
+
+@@ -70911,29 +71007,6 @@
else
@@ -30,7 +144,7 @@
case ct in
c|c_r|pthread*) ;;
*)
-@@ -70971,52 +70948,7 @@
+@@ -70957,52 +71030,7 @@
@@ -84,7 +198,7 @@
save_old_LDFLAGS=$LDFLAGS
-@@ -71086,37 +71018,6 @@
+@@ -71072,37 +71100,6 @@
@@ -122,7 +236,7 @@
fi
-@@ -84050,10 +83951,7 @@
+@@ -84033,10 +84030,7 @@
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
diff -ruN php4.orig/scripts/configure.php php4/scripts/configure.php
--- php4.orig/scripts/configure.php Sat Jun 7 14:08:02 2003
+++ php4/scripts/configure.php Sat Jun 7 15:17:30 2003
@@ -50,6 +50,7 @@
NCURSES "ncurses support (CLI only)" ${WITH_NCURSES:-OFF} \
OPENLDAP "OpenLDAP support" ${WITH_OPENLDAP:-OFF} \
OPENSSL "OpenSSL support" ${WITH_OPENSSL:-OFF} \
+ORACLE "Oracle support" ${WITH_ORACLE:-OFF} \
PCNTL "pcntl support (CLI only)" ${WITH_PCNTL:-OFF} \
PCRE "Perl Compatible Regular Expression support" ${WITH_PCRE:-OFF} \
PDFLIB "PDFlib support" ${WITH_PDFLIB:-OFF} \
diff -ruN php4.orig/scripts/php_options php4/scripts/php_options
--- php4.orig/scripts/php_options Sat Jun 7 14:08:02 2003
+++ php4/scripts/php_options Sat Jun 7 15:17:23 2003
@@ -30,6 +30,7 @@
WITH_NCURSES=OFF
WITH_OPENLDAP=OFF
WITH_OPENSSL=OFF
+WITH_ORACLE=OFF
WITH_PCNTL=OFF
WITH_PCRE=ON
WITH_PDFLIB=OFF
--- php4.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list