View previous topic :: View next topic |
Author |
Message |
leonik375 n00b
Joined: 19 Jul 2016 Posts: 10
|
Posted: Wed Jan 29, 2025 12:40 pm Post subject: [SOLVED (Part?)]PHP support for oci8-instant-client dropped? |
|
|
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 |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1999
|
Posted: Wed Jan 29, 2025 1:39 pm Post subject: |
|
|
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 |
|
|
leonik375 n00b
Joined: 19 Jul 2016 Posts: 10
|
Posted: Wed Jan 29, 2025 2:22 pm Post subject: |
|
|
so looks like fastest approach is to use userspace PECL? |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1858 Location: Germany
|
|
Back to top |
|
|
leonik375 n00b
Joined: 19 Jul 2016 Posts: 10
|
Posted: Wed Jan 29, 2025 2:48 pm Post subject: |
|
|
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 |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1999
|
Posted: Wed Jan 29, 2025 3:02 pm Post subject: |
|
|
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 |
|
|
leonik375 n00b
Joined: 19 Jul 2016 Posts: 10
|
Posted: Wed Jan 29, 2025 3:45 pm Post subject: |
|
|
grknight wrote: | Also change the description while you are at it |
Ouch!
Thanks for the tips |
|
Back to top |
|
|
|