Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED (Part?)]PHP support for oci8-instant-client dropped?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
leonik375
n00b
n00b


Joined: 19 Jul 2016
Posts: 10

PostPosted: Wed Jan 29, 2025 12:40 pm    Post subject: [SOLVED (Part?)]PHP support for oci8-instant-client dropped? Reply with quote

Looks like PHP packages in current tree doesn't have oci8-instant-client USE flag, how to enable PHP oracleDB support?

Last edited by leonik375 on Wed Jan 29, 2025 2:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 2000

PostPosted: Wed Jan 29, 2025 1:39 pm    Post subject: Reply with quote

PHP 8.2 series still has the oci8-instant-client USE flag. It has a masked use on all arches except x86. This can be to be accepted via /etc/portage/profile/use.mask as "-oci8-instant-client"

However, this is going away as PHP upstream has moved support to PECL.
AFAICT, there is not dev-php/pecl-oci8 ebuilds yet which will have this continue to work.
I can whip one up, but cannot test it
Back to top
View user's profile Send private message
leonik375
n00b
n00b


Joined: 19 Jul 2016
Posts: 10

PostPosted: Wed Jan 29, 2025 2:22 pm    Post subject: Reply with quote

grknight wrote:

However, this is going away as PHP upstream has moved support to PECL.


so looks like fastest approach is to use userspace PECL?
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1859
Location: Germany

PostPosted: Wed Jan 29, 2025 2:39 pm    Post subject: Reply with quote

leonik375 wrote:
grknight wrote:

However, this is going away as PHP upstream has moved support to PECL.


so looks like fastest approach is to use userspace PECL?

yes
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
leonik375
n00b
n00b


Joined: 19 Jul 2016
Posts: 10

PostPosted: Wed Jan 29, 2025 2:48 pm    Post subject: Reply with quote

Ending up with local ebuild for pecl-oci8
php-ext-pecl-r3 eclass made this task very easy
Thanks for the help

dev-php/pecl-oci8-3.4.0.ebuild:
Code:

EAPI="8"

PHP_EXT_NAME="oci8"
PHP_EXT_PECL_PKG="oci8"
PHP_EXT_INI="yes"
PHP_EXT_ZENDEXT="no"
PHP_INI_NAME="50-oci8"

USE_PHP="php8-2 php8-3"

inherit php-ext-pecl-r3

DESCRIPTION="Extended HTTP Support for PHP"
LICENSE="BSD-2 MIT"
SLOT="8"
KEYWORDS="amd64 x86"

COMMON_DEPEND=""
DEPEND="
        php_targets_php8-2? ( ${COMMON_DEPEND} dev-lang/php:8.2[session(-),iconv(-)] )
        php_targets_php8-3? ( ${COMMON_DEPEND} dev-lang/php:8.3[session(-),iconv(-)] )"

RDEPEND="${DEPEND}"

PHP_EXT_ECONF_ARGS=( --with-oci8 )

src_prepare() {
        php-ext-source-r3_src_prepare
}
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 2000

PostPosted: Wed Jan 29, 2025 3:02 pm    Post subject: Reply with quote

leonik375 wrote:
dev-php/pecl-oci8-3.4.0.ebuild:
Code:

EAPI="8"

PHP_EXT_NAME="oci8"
PHP_EXT_PECL_PKG="oci8"
PHP_EXT_INI="yes"
PHP_EXT_ZENDEXT="no"
PHP_INI_NAME="50-oci8"

USE_PHP="php8-2 php8-3"

inherit php-ext-pecl-r3

DESCRIPTION="Extended HTTP Support for PHP"
LICENSE="BSD-2 MIT"
SLOT="8"
KEYWORDS="amd64 x86"

COMMON_DEPEND=""
DEPEND="
        php_targets_php8-2? ( ${COMMON_DEPEND} dev-lang/php:8.2[session(-),iconv(-)] )
        php_targets_php8-3? ( ${COMMON_DEPEND} dev-lang/php:8.3[session(-),iconv(-)] )"

RDEPEND="${DEPEND}"

PHP_EXT_ECONF_ARGS=( --with-oci8 )

src_prepare() {
        php-ext-source-r3_src_prepare
}

It's easy to see where you copied this from. You should be able to drop the COMMON_DEPEND and DEPEND for this as written and add:
Code:
DEPEND="dev-db/oracle-instantclient:="

Above the inherit, I would also suggest adding:
Code:
PHP_EXT_NEEDED_USE="-oci8-instant-client(-)"
as a safety measure.
Also change the description while you are at it :)
Back to top
View user's profile Send private message
leonik375
n00b
n00b


Joined: 19 Jul 2016
Posts: 10

PostPosted: Wed Jan 29, 2025 3:45 pm    Post subject: Reply with quote

grknight wrote:
Also change the description while you are at it :)


Ouch!
Thanks for the tips
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum