From sime@logos.hr  Mon Sep 26 07:52:39 2005
Return-Path: <sime@logos.hr>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id ACD8816A41F;
	Mon, 26 Sep 2005 07:52:39 +0000 (GMT)
	(envelope-from sime@logos.hr)
Received: from mail.logos.hr (gates.logos.hr [213.149.47.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3658643D4C;
	Mon, 26 Sep 2005 07:52:39 +0000 (GMT)
	(envelope-from sime@logos.hr)
Received: from localhost (localhost.logos.hr [127.0.0.1])
	by mail.logos.hr (Postfix) with ESMTP id 588BE26D068;
	Mon, 26 Sep 2005 09:52:38 +0200 (CEST)
Received: from mail.logos.hr ([127.0.0.1])
 by localhost (mail.logos.hr [127.0.0.1]) (amavisd-new, port 10024) with LMTP
 id 89017-02-7; Mon, 26 Sep 2005 09:52:15 +0200 (CEST)
Received: by mail.logos.hr (Postfix, from userid 34062)
	id 936DE26D04A; Mon, 26 Sep 2005 09:52:15 +0200 (CEST)
Message-Id: <20050926075215.936DE26D04A@mail.logos.hr>
Date: Mon, 26 Sep 2005 09:52:15 +0200 (CEST)
From: Simun Mikecin <numisemis@yahoo.com>
Reply-To: Simun Mikecin <numisemis@yahoo.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ale@freebsd.org
Subject: [new] databases/php5-oci8: Oracle OCI8 shared extension for PHP 5
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         86580
>Category:       ports
>Synopsis:       [new port] databases/php5-oci8: Oracle OCI8 shared extension for PHP 5
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 26 08:00:28 GMT 2005
>Closed-Date:    Tue Jul 11 13:28:23 GMT 2006
>Last-Modified:  Tue Jul 11 13:28:23 GMT 2006
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: garga 
Responsible-Changed-When: Tue Sep 27 12:30:28 GMT 2005 
Responsible-Changed-Why:  
Over to lang/php5 maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86580 

From: Oles Hnatkevych <gnut@gw.alfabank.kiev.ua>
To: bug-followup@FreeBSD.org, numisemis@yahoo.com
Cc:  
Subject: Re: ports/86580: [new port] databases/php5-oci8: Oracle OCI8 shared extension for PHP 5
Date: Wed, 30 Nov 2005 20:33:52 +0200

 On FreeBSD 6.0 box the trick with merging libclntsh.a and libpthread.a
 works, and PHP successfully connected to Oracle server and did a
 SELECT, but on FreeBSD 4.11 the trick with libc_r.a it did not work, apache
 1.3.34 crashed to coredump in my case. I tried it with devel/ngpt
 port on FreeBSD 4.11 too, it did not compile.
 

From: Simun Mikecin <numisemis@yahoo.com>
To: Oles Hnatkevych <gnut@gw.alfabank.kiev.ua>, bug-followup@freebsd.org
Cc:  
Subject: Re: ports/86580: [new port] databases/php5-oci8: Oracle OCI8 shared extension for PHP 5
Date: Wed, 30 Nov 2005 11:27:21 -0800 (PST)

 It could be marked as not working on FreeBSD<5.0 with
 something like:
 .if ${OSVERSION} < 500000
 IGNORE= "does not compile on FreeBSD 4.x"
 .endif
 
 
 
 	
 		
 __________________________________ 
 Yahoo! Mail - PC Magazine Editors' Choice 2005 
 http://mail.yahoo.com
Responsible-Changed-From-To: ale->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Jul 1 06:42:56 UTC 2006 
Responsible-Changed-Why:  
Reassign to pool.  The assignee has had this PR for some time, and did not 
respond to email asking about its status. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86580 
State-Changed-From-To: open->closed 
State-Changed-By: garga 
State-Changed-When: Tue Jul 11 13:28:22 UTC 2006 
State-Changed-Why:  
New port added. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86580 
>Unformatted:
