Date: Mon, 26 Sep 2005 09:52:15 +0200 (CEST) From: Simun Mikecin <numisemis@yahoo.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: ale@FreeBSD.org Subject: ports/86580: [new] databases/php5-oci8: Oracle OCI8 shared extension for PHP 5 Message-ID: <20050926075215.936DE26D04A@mail.logos.hr> Resent-Message-ID: <200509260800.j8Q80SGM099108@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 86580 >Category: ports >Synopsis: [new] databases/php5-oci8: Oracle OCI8 shared extension for PHP 5 >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Sep 26 08:00:28 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Simun Mikecin >Release: FreeBSD 6.0-BETA5 i386 >Organization: >Environment: System: FreeBSD data.home.hr 6.0-BETA5 FreeBSD 6.0-BETA5 #0: Fri Sep 23 21:13:44 CEST 2005 root@data.home.hr:/var/obj/usr/src.6/sys/DATA i386 >Description: This port adds support for OCI8 PHP shared extension. It replaces the old Oracle shared extension which is obsolete and will be dropped (moved to PECL) in PHP 5.1. This patch also corrects dependency for the Oracle shared extension (added Oracle client in RUN_DEPENDS). If someone finds it useful, the same could be done for PHP 4. Makefile.ext script expects to find /usr/lib/libpthread.a. If FreeBSD 4.x support is needed it should be replaced with /usr/lib/libc_r.a. >How-To-Repeat: >Fix: diff -urN ports.orig/databases/php5-oci8/Makefile ports/databases/php5-oci8/Makefile --- ports.orig/databases/php5-oci8/Makefile Thu Jan 1 01:00:00 1970 +++ ports/databases/php5-oci8/Makefile Sun Sep 25 09:05:41 2005 @@ -0,0 +1,14 @@ +# New ports collection makefile for: php5-oci8 +# Date created: 24 Sep 2004 +# Whom: Simun Mikecin <numisemis@yahoo.com> +# +# $FreeBSD: ports/databases/php5-oci8/Makefile$ +# + +CATEGORIES= databases + +MASTERDIR= ${.CURDIR}/../../lang/php5 + +PKGNAMESUFFIX= -oci8 + +.include "${MASTERDIR}/Makefile" diff -urN ports.orig/databases/php5-oci8/files/patch-config.m4 ports/databases/php5-oci8/files/patch-config.m4 --- ports.orig/databases/php5-oci8/files/patch-config.m4 Thu Jan 1 01:00:00 1970 +++ ports/databases/php5-oci8/files/patch-config.m4 Sun Sep 25 09:05:41 2005 @@ -0,0 +1,12 @@ +--- config.m4.orig Fri Feb 25 12:32:01 2005 ++++ config.m4 Sat Sep 24 19:38:49 2005 +@@ -123,8 +123,7 @@ + ;; + + 8.1) +- PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD) +- PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD) ++ PHP_ADD_LIBRARY_WITH_PATH(oci8, ., OCI8_SHARED_LIBADD) + + dnl + dnl OCI_ATTR_STATEMENT is not available in all 8.1.x versions diff -urN ports.orig/lang/php5/Makefile.ext ports/lang/php5/Makefile.ext --- ports.orig/lang/php5/Makefile.ext Tue Aug 23 10:16:35 2005 +++ ports/lang/php5/Makefile.ext Sun Sep 25 09:10:58 2005 @@ -236,9 +236,19 @@ USE_OPENSSL= yes .endif +.if ${PHP_MODNAME} == "oci8" +BUILD_DEPENDS+= ${LOCALBASE}/oracle8-client/lib/libclntsh.a:${PORTSDIR}/databases/oracle8-client + +RUN_DEPENDS+= ${BUILD_DEPENDS} + +CONFIGURE_ARGS+=--with-oci8=${LOCALBASE}/oracle8-client +.endif + .if ${PHP_MODNAME} == "oracle" BUILD_DEPENDS+= ${LOCALBASE}/oracle7/lib/libcore3.a:${PORTSDIR}/databases/oracle7-client +RUN_DEPENDS+= ${BUILD_DEPENDS} + CONFIGURE_ARGS+=--with-oracle=${LOCALBASE}/oracle7 .endif @@ -459,6 +469,15 @@ .if ${PHP_MODNAME} == "openssl" post-extract: @${MV} ${WRKSRC}/config0.m4 ${WRKSRC}/config.m4 +.endif + +.if ${PHP_MODNAME} == "oci8" +pre-configure: + @cd ${WRKSRC}; \ + for lib in ${LOCALBASE}/oracle8-client/lib/libclntsh /usr/lib/libpthread; do \ + /usr/bin/ar x $${lib}.a; \ + done; \ + /usr/bin/ar rcs liboci8.a *.o .endif .if ${PHP_MODNAME} == "oracle" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050926075215.936DE26D04A>