PHP link sqlite to sqlite3 package

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

PHP link sqlite to sqlite3 package

Martijn van Duren-7
Hello ports@,

Currently sqlite in PHP builds its own sqlite and links it internally.  
This library is quite out of date (3.8.10.2 for 5.6 and 3.14.2 for 7.0).

I would like to link PHP to our sqlite3 package, so that it can be kept
up to date. This is assumed to also be what happens with most Linux
packages[0].

The motivation to split pdo_sqlite/sqlite3 into a separate package is
for two reasons:
1) All other databases have their own package, so it's more consistent.
2) Keeping the extensions in the SAPI would add another dependency on
the PHP-main package.

Of course I can change the patch to just link to the sqlite package
if this is not enough motivation to split them up.

If we split them up the packages that at least have sqlite calls in
them are, but might be in optional code-paths:
icinga/web2
zabbix-agent
chive
nextcloud
owncloud
piwik

I'm not 100% sure if I handled the PLIST-main correctly, but the
sqlite3.h file can be removed anyway, since it's not used anymore.

Also, I noticed a type-O in the pdo_pgsql description, so I changed
it while here.

Comments?

martijn@

[0] https://marc.info/?l=php-internals&m=150031503332312&w=2

Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/lang/php/Makefile.inc,v
retrieving revision 1.104
diff -u -p -r1.104 Makefile.inc
--- Makefile.inc 23 May 2018 06:51:14 -0000 1.104
+++ Makefile.inc 24 May 2018 10:44:31 -0000
@@ -67,8 +67,6 @@ CONFIGURE_ARGS+= --enable-shared \
  --with-pic \
  --with-pear=${LOCALBASE}/share/php-${PV} \
  --with-config-file-scan-dir=${SYSCONFDIR}/php-${PV} \
- --with-pdo-sqlite \
- --with-sqlite3 \
  --program-suffix=-${PV} \
  --with-readline
 
@@ -237,11 +235,18 @@ WANTLIB-pdo_mysql= crypto m pthread ssl
 
 # pdo-pgsql
 PHP_EXTENSIONS+= -pdo_pgsql
-COMMENT-pdo_pgsql= PDO database access extensions for php
+COMMENT-pdo_pgsql= PDO pgsql database access extensions for php
 CONFIGURE_ARGS+=        --with-pdo-pgsql=shared,${LOCALBASE}
 LIB_DEPENDS-pdo_pgsql= databases/postgresql
 WANTLIB-pdo_pgsql= pq>=2 pthread
 
+# pdo-sqlite
+PHP_EXTENSIONS+= -pdo_sqlite
+COMMENT-pdo_sqlite= PDO sqlite3 database access extensions for php
+CONFIGURE_ARGS+=        --with-pdo-sqlite=shared,${LOCALBASE}
+LIB_DEPENDS-pdo_sqlite= databases/sqlite3
+WANTLIB-pdo_sqlite= sqlite3 pthread
+
 # pgsql
 PHP_EXTENSIONS+= -pgsql
 COMMENT-pgsql= pgsql database access extensions for php
@@ -276,6 +281,13 @@ COMMENT-snmp= snmp protocol extensions
 CONFIGURE_ARGS+= --with-snmp=shared,${LOCALBASE}
 LIB_DEPENDS-snmp= net/net-snmp
 WANTLIB-snmp= crypto m netsnmp>=6.2 pthread
+
+# sqlite3
+PHP_EXTENSIONS+= -sqlite3
+COMMENT-sqlite3= sqlite3 database access extension for php
+CONFIGURE_ARGS+= --with-sqlite3=shared,${LOCALBASE}
+LIB_DEPENDS-sqlite3= databases/sqlite3
+WANTLIB-sqlite3= sqlite3 pthread
 
 # pdo-dblib
 PHP_EXTENSIONS+= -pdo_dblib
Index: 5.6/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/5.6/Makefile,v
retrieving revision 1.64
diff -u -p -r1.64 Makefile
--- 5.6/Makefile 23 May 2018 06:51:14 -0000 1.64
+++ 5.6/Makefile 24 May 2018 10:44:31 -0000
@@ -5,7 +5,7 @@ BROKEN-alpha= pcre_jit_compile.c:65:2: e
 PV= 5.6
 V= ${PV}.35
 REVISION= 1
-REVISION-main= 2
+REVISION-main= 3
 
 MASTER_SITES0= https://download.suhosin.org/
 
Index: 5.6/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/php/5.6/pkg/PLIST-main,v
retrieving revision 1.11
diff -u -p -r1.11 PLIST-main
--- 5.6/pkg/PLIST-main 23 May 2018 06:51:14 -0000 1.11
+++ 5.6/pkg/PLIST-main 24 May 2018 10:44:31 -0000
@@ -5,9 +5,7 @@
 @conflict php-fpm->=5.6,<5.7
 @conflict php5-core->=5.2
 @conflict php5-core-fastcgi->=5.2
-@conflict php5-pdo_sqlite->=5.2
 @pkgpath lang/php/5.4
-@pkgpath lang/php/5.4,-pdo_sqlite
 @pkgpath lang/php/5.6,-fpm
 @pkgpath lang/php/5.6,-main,ap2
 @extraunexec rm -f ${SYSCONFDIR}/php-${PV}/php-${PV}.sample/*
@@ -281,9 +279,6 @@ share/php-${PV}/include/ext/spl/spl_func
 share/php-${PV}/include/ext/spl/spl_heap.h
 share/php-${PV}/include/ext/spl/spl_iterators.h
 share/php-${PV}/include/ext/spl/spl_observer.h
-share/php-${PV}/include/ext/sqlite3/
-share/php-${PV}/include/ext/sqlite3/libsqlite/
-share/php-${PV}/include/ext/sqlite3/libsqlite/sqlite3.h
 share/php-${PV}/include/ext/standard/
 share/php-${PV}/include/ext/standard/base64.h
 share/php-${PV}/include/ext/standard/basic_functions.h
Index: 5.6/pkg/PLIST-pdo_sqlite
===================================================================
RCS file: 5.6/pkg/PLIST-pdo_sqlite
diff -N 5.6/pkg/PLIST-pdo_sqlite
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ 5.6/pkg/PLIST-pdo_sqlite 24 May 2018 10:44:31 -0000
@@ -0,0 +1,7 @@
+@comment $OpenBSD$
+@option no-default-conflict
+@option is-branch
+@conflict php-pdo_sqlite->=5.6,<5.7
+lib/php-${PV}/modules/pdo_sqlite.so
+share/examples/php-${PV}/pdo_sqlite.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/pdo_sqlite.ini
Index: 5.6/pkg/PLIST-sqlite3
===================================================================
RCS file: 5.6/pkg/PLIST-sqlite3
diff -N 5.6/pkg/PLIST-sqlite3
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ 5.6/pkg/PLIST-sqlite3 24 May 2018 10:44:31 -0000
@@ -0,0 +1,7 @@
+@comment $OpenBSD$
+@option no-default-conflict
+@option is-branch
+@conflict php-sqlite3->=5.6,<5.7
+lib/php-${PV}/modules/sqlite3.so
+share/examples/php-${PV}/sqlite3.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/sqlite3.ini
Index: 7.0/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/7.0/Makefile,v
retrieving revision 1.47
diff -u -p -r1.47 Makefile
--- 7.0/Makefile 23 May 2018 06:51:14 -0000 1.47
+++ 7.0/Makefile 24 May 2018 10:44:31 -0000
@@ -5,7 +5,7 @@ BROKEN-sparc64= SIGBUS during phar gener
 PV= 7.0
 V= ${PV}.29
 REVISION= 1
-REVISION-main= 2
+REVISION-main= 3
 
 BUILD_DEPENDS+= devel/bison
 
Index: 7.0/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/php/7.0/pkg/PLIST-main,v
retrieving revision 1.7
diff -u -p -r1.7 PLIST-main
--- 7.0/pkg/PLIST-main 23 May 2018 06:51:14 -0000 1.7
+++ 7.0/pkg/PLIST-main 24 May 2018 10:44:31 -0000
@@ -5,9 +5,7 @@
 @conflict php-fpm->=7.0,<7.1
 @conflict php5-core->=5.2
 @conflict php5-core-fastcgi->=5.2
-@conflict php5-pdo_sqlite->=5.2
 @pkgpath lang/php/5.4
-@pkgpath lang/php/5.4,-pdo_sqlite
 @pkgpath lang/php/7.0,-fpm
 @extraunexec rm -f ${SYSCONFDIR}/php-${PV}/php-${PV}.sample/*
 @mode 1700
@@ -278,9 +276,6 @@ share/php-${PV}/include/ext/spl/spl_func
 share/php-${PV}/include/ext/spl/spl_heap.h
 share/php-${PV}/include/ext/spl/spl_iterators.h
 share/php-${PV}/include/ext/spl/spl_observer.h
-share/php-${PV}/include/ext/sqlite3/
-share/php-${PV}/include/ext/sqlite3/libsqlite/
-share/php-${PV}/include/ext/sqlite3/libsqlite/sqlite3.h
 share/php-${PV}/include/ext/standard/
 share/php-${PV}/include/ext/standard/base64.h
 share/php-${PV}/include/ext/standard/basic_functions.h
Index: 7.0/pkg/PLIST-pdo_sqlite
===================================================================
RCS file: 7.0/pkg/PLIST-pdo_sqlite
diff -N 7.0/pkg/PLIST-pdo_sqlite
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ 7.0/pkg/PLIST-pdo_sqlite 24 May 2018 10:44:31 -0000
@@ -0,0 +1,7 @@
+@comment $OpenBSD$
+@option no-default-conflict
+@option is-branch
+@conflict php-pdo_sqlite->=7.0,<7.1
+lib/php-${PV}/modules/pdo_sqlite.so
+share/examples/php-${PV}/pdo_sqlite.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/pdo_sqlite.ini
Index: 7.0/pkg/PLIST-sqlite3
===================================================================
RCS file: 7.0/pkg/PLIST-sqlite3
diff -N 7.0/pkg/PLIST-sqlite3
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ 7.0/pkg/PLIST-sqlite3 24 May 2018 10:44:31 -0000
@@ -0,0 +1,7 @@
+@comment $OpenBSD$
+@option no-default-conflict
+@option is-branch
+@conflict php-sqlite3->=7.0,<7.1
+lib/php-${PV}/modules/sqlite3.so
+share/examples/php-${PV}/sqlite3.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/sqlite3.ini
Index: files/DESCR-pdo_sqlite
===================================================================
RCS file: files/DESCR-pdo_sqlite
diff -N files/DESCR-pdo_sqlite
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/DESCR-pdo_sqlite 24 May 2018 10:44:31 -0000
@@ -0,0 +1,2 @@
+PDO_SQLITE is a driver that implements the PHP Data Objects (PDO)
+interface to enable access to SQLite 3 databases.
Index: files/DESCR-sqlite3
===================================================================
RCS file: files/DESCR-sqlite3
diff -N files/DESCR-sqlite3
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/DESCR-sqlite3 24 May 2018 10:44:31 -0000
@@ -0,0 +1,4 @@
+This is an extension for the SQLite Embeddable SQL Database Engine.
+SQLite is a C library that implements an embeddable SQL database
+engine. Programs that link with the SQLite library can have SQL
+database access without running a separate RDBMS process.

Reply | Threaded
Open this post in threaded view
|

Re: PHP link sqlite to sqlite3 package

Stuart Henderson
On 2018/05/24 12:49, Martijn van Duren wrote:
> Hello ports@,
>
> Currently sqlite in PHP builds its own sqlite and links it internally.  
> This library is quite out of date (3.8.10.2 for 5.6 and 3.14.2 for 7.0).
>
> I would like to link PHP to our sqlite3 package, so that it can be kept
> up to date. This is assumed to also be what happens with most Linux
> packages[0].

That makes sense to me.

> The motivation to split pdo_sqlite/sqlite3 into a separate package is
> for two reasons:
> 1) All other databases have their own package, so it's more consistent.
> 2) Keeping the extensions in the SAPI would add another dependency on
> the PHP-main package.
>
> Of course I can change the patch to just link to the sqlite package
> if this is not enough motivation to split them up.
>
> If we split them up the packages that at least have sqlite calls in
> them are, but might be in optional code-paths:
> icinga/web2
> zabbix-agent
> chive
> nextcloud
> owncloud
> piwik

It's definitely more than that - I know roundcube needs pdo_sqlite or
another pdo_* - you'd need to look for things using pdo at all to find
them, rather than just looking for sqlite.

Splitting up database extensions with library deps does seem reasonable
but I'm wondering maybe we should merge the $somedatabase and
pdo_$somedatabase packages, I'm not sure there's much point in splitting
them up, and that way the total number of subpackages doesn't increase..

www/chive is removed already btw.

Reply | Threaded
Open this post in threaded view
|

Re: PHP link sqlite to sqlite3 package

Martijn van Duren-7
On 05/24/18 13:52, Stuart Henderson wrote:> It's definitely more than that - I know roundcube needs pdo_sqlite or
> another pdo_* - you'd need to look for things using pdo at all to find
> them, rather than just looking for sqlite.
>
The idea behind PDO is that the end-user can easily choose the backend
(as long as the backend supports the used SQL-dialect). The use of the
sqlite backend makes perfect sense for roundcube now, since it's
embedded in the SAPI, but if we split it off we would always install a
package that the user might not use. So I see a couple of options that
are almost all equally valid to me:
1) We track down the packages that use pdo_sqlite and add it as a
dependency, as you proposed.
2) We add it as a recommended dependency similar to what Debian's
package manager offers. But do we even support something like that?
3) We leave it open and add a $MESSAGE to the package and a note to the
readme.
4) Considering your remark about splitting up database extensions *with*
library deps: For a future patch I would like to link our mysql modules
to mysqlnd instead of libmysqlclient, because it fits better in php's
memory_limit concept, supports returning of native integers and is also
recommended[0]. That *could* be a reason to move the mysql modules back
into the SAPIs and switch those that use sqlite now to mysql. I
personally don't like this option, because it requires more
administrative overhead to setup the mariadb instance, and merging the
mysql interfaces could be interpreted as favouritism towards mysql over
the other databases, where sqlite would be because its zero setup.

> Splitting up database extensions with library deps does seem reasonable
> but I'm wondering maybe we should merge the $somedatabase and
> pdo_$somedatabase packages, I'm not sure there's much point in splitting
> them up, and that way the total number of subpackages doesn't increase..
>
On first glance that would seem reasonable to me, but it would require
a fair deal of refactoring. The current code assumes one package, one
module, one auto-generated ini. Then there's also the problem with the
fact that there's no 1 to 1 correlation between the module names:
- sqlite3 / pdo_sqlite
- mysql / mysqli /pdo_mysql
- mssql / pdo_dblib
- interbase / pdo_firebird (if we would ever enable it)

So is the reduction of the packages worth the extra complexity?

[0] http://php.net/manual/en/mysqlinfo.library.choosing.php

Reply | Threaded
Open this post in threaded view
|

Re: PHP link sqlite to sqlite3 package

Stuart Henderson
(CC robert, diff below: update to php 5.6.36/7.0.30, add pdo_sqlite,
add pdo_odbc, switch to mysqlnd, regen plists on -current, tweak DESCRs.
OK/nope/don't care? :-)

On 2018/05/25 08:33, Martijn van Duren wrote:

> On 05/24/18 13:52, Stuart Henderson wrote:> It's definitely more than that - I know roundcube needs pdo_sqlite or
> > another pdo_* - you'd need to look for things using pdo at all to find
> > them, rather than just looking for sqlite.
> >
> The idea behind PDO is that the end-user can easily choose the backend
> (as long as the backend supports the used SQL-dialect). The use of the
> sqlite backend makes perfect sense for roundcube now, since it's
> embedded in the SAPI, but if we split it off we would always install a
> package that the user might not use. So I see a couple of options that
> are almost all equally valid to me:
> 1) We track down the packages that use pdo_sqlite and add it as a
> dependency, as you proposed.
> 2) We add it as a recommended dependency similar to what Debian's
> package manager offers. But do we even support something like that?
> 3) We leave it open and add a $MESSAGE to the package and a note to the
> readme.

2 isn't possible.

3 is possible (in README usually not MESSAGE) but that's for things
which are optional, whereas it's actually required to have one of
pdo_* for at least roundcube and probably others.

There's no need for an unwanted dependency though, just specify
the alternatives, see packages-specs(7). It's a bit unwieldy so best
build it in php.port.mk, then the ports using it can include it in
RUN_DEPENDS.

> 4) Considering your remark about splitting up database extensions *with*
> library deps: For a future patch I would like to link our mysql modules
> to mysqlnd instead of libmysqlclient, because it fits better in php's
> memory_limit concept, supports returning of native integers and is also
> recommended[0]. That *could* be a reason to move the mysql modules back
> into the SAPIs and switch those that use sqlite now to mysql. I
> personally don't like this option, because it requires more
> administrative overhead to setup the mariadb instance, and merging the
> mysql interfaces could be interpreted as favouritism towards mysql over
> the other databases, where sqlite would be because its zero setup.

Or it could be interpreted as a statement of the reality that many
people writing PHP don't test their shitz with anything other than mysql :)

> > Splitting up database extensions with library deps does seem reasonable
> > but I'm wondering maybe we should merge the $somedatabase and
> > pdo_$somedatabase packages, I'm not sure there's much point in splitting
> > them up, and that way the total number of subpackages doesn't increase..
> >
> On first glance that would seem reasonable to me, but it would require
> a fair deal of refactoring. The current code assumes one package, one
> module, one auto-generated ini. Then there's also the problem with the
> fact that there's no 1 to 1 correlation between the module names:
> - sqlite3 / pdo_sqlite
> - mysql / mysqli /pdo_mysql
> - mssql / pdo_dblib
> - interbase / pdo_firebird (if we would ever enable it)
>
> So is the reduction of the packages worth the extra complexity?

Good point.

> [0] http://php.net/manual/en/mysqlinfo.library.choosing.php

Diff below, roundcube included as an example, I'm looking for any others missing ..

Index: mail/roundcubemail/Makefile
===================================================================
RCS file: /cvs/ports/mail/roundcubemail/Makefile,v
retrieving revision 1.130
diff -u -p -r1.130 Makefile
--- mail/roundcubemail/Makefile 22 May 2018 08:19:06 -0000 1.130
+++ mail/roundcubemail/Makefile 25 May 2018 11:49:02 -0000
@@ -5,7 +5,7 @@ COMMENT= imap4 webmail client
 V= 1.3.6
 DISTNAME= roundcubemail-$V
 PKGNAME= roundcubemail-${V:S/-rc/rc/}
-REVISION= 0
+REVISION= 1
 EXTRACT_SUFX= -complete.tar.gz
 
 FIX_EXTRACT_PERMISSIONS= Yes
@@ -31,7 +31,8 @@ TINSTDIR= ${TRUEPREFIX}/roundcubemail
 SUBST_VARS= INSTDIR TINSTDIR MODPHP_BIN
 
 MODULES= lang/php
-RUN_DEPENDS= lang/php/${MODPHP_VERSION},-pspell \
+RUN_DEPENDS= ${MODPHP_PDO_DEPENDS} \
+ lang/php/${MODPHP_VERSION},-pspell \
  lang/php/${MODPHP_VERSION},-zip
 
 do-configure:
Index: lang/php/Makefile.inc
===================================================================
RCS file: /cvs/ports/lang/php/Makefile.inc,v
retrieving revision 1.104
diff -u -p -r1.104 Makefile.inc
--- lang/php/Makefile.inc 23 May 2018 06:51:14 -0000 1.104
+++ lang/php/Makefile.inc 25 May 2018 11:49:03 -0000
@@ -67,8 +67,6 @@ CONFIGURE_ARGS+= --enable-shared \
  --with-pic \
  --with-pear=${LOCALBASE}/share/php-${PV} \
  --with-config-file-scan-dir=${SYSCONFDIR}/php-${PV} \
- --with-pdo-sqlite \
- --with-sqlite3 \
  --program-suffix=-${PV} \
  --with-readline
 
@@ -210,16 +208,16 @@ WANTLIB-mcrypt= mcrypt ltdl>=1 pthread
 # mysqli
 PHP_EXTENSIONS+= -mysqli
 COMMENT-mysqli= mysql database access extensions for php
-CONFIGURE_ARGS+= --with-mysqli=shared,${LOCALBASE}/bin/mysql_config
-LIB_DEPENDS-mysqli= databases/mariadb
-WANTLIB-mysqli= crypto m pthread ssl z lib/mysql/mysqlclient
+CONFIGURE_ARGS+= --with-mysqli=shared
+LIB_DEPENDS-mysqli= # empty: using PHP's mysqlnd
+WANTLIB-mysqli= pthread
 
 # odbc
 PHP_EXTENSIONS+= -odbc
 COMMENT-odbc= odbc database access extensions for php
 CONFIGURE_ARGS+=        --with-iodbc=shared,${LOCALBASE}
 LIB_DEPENDS-odbc= databases/iodbc
-WANTLIB-odbc= iodbc>=2 pthread iodbcinst
+WANTLIB-odbc= iodbc iodbcinst pthread
 
 # pcntl
 PHP_EXTENSIONS+= -pcntl
@@ -231,17 +229,31 @@ WANTLIB-pcntl= pthread
 # pdo-mysql
 PHP_EXTENSIONS+= -pdo_mysql
 COMMENT-pdo_mysql= PDO mysql database access extensions for php
-CONFIGURE_ARGS+= --with-pdo-mysql=shared,${LOCALBASE}
-LIB_DEPENDS-pdo_mysql= databases/mariadb
-WANTLIB-pdo_mysql= crypto m pthread ssl z lib/mysql/mysqlclient
+CONFIGURE_ARGS+= --with-pdo-mysql=shared
+LIB_DEPENDS-mysqli= # empty: using PHP's mysqlnd
+WANTLIB-pdo_mysql= pthread
+
+# pdo-odbc
+PHP_EXTENSIONS+= -pdo_odbc
+COMMENT-pdo_odbc= PDO database access extensions for php
+CONFIGURE_ARGS+=        --with-pdo-odbc=shared,iODBC,${LOCALBASE}
+LIB_DEPENDS-pdo_odbc= databases/iodbc
+WANTLIB-pdo_odbc= iodbc pthread
 
 # pdo-pgsql
 PHP_EXTENSIONS+= -pdo_pgsql
-COMMENT-pdo_pgsql= PDO database access extensions for php
+COMMENT-pdo_pgsql= PDO pgsql database access extensions for php
 CONFIGURE_ARGS+=        --with-pdo-pgsql=shared,${LOCALBASE}
 LIB_DEPENDS-pdo_pgsql= databases/postgresql
 WANTLIB-pdo_pgsql= pq>=2 pthread
 
+# pdo-sqlite
+PHP_EXTENSIONS+= -pdo_sqlite
+COMMENT-pdo_sqlite= PDO sqlite3 database access extensions for php
+CONFIGURE_ARGS+=        --with-pdo-sqlite=shared,${LOCALBASE}
+LIB_DEPENDS-pdo_sqlite= databases/sqlite3
+WANTLIB-pdo_sqlite= pthread sqlite3
+
 # pgsql
 PHP_EXTENSIONS+= -pgsql
 COMMENT-pgsql= pgsql database access extensions for php
@@ -276,6 +288,13 @@ COMMENT-snmp= snmp protocol extensions
 CONFIGURE_ARGS+= --with-snmp=shared,${LOCALBASE}
 LIB_DEPENDS-snmp= net/net-snmp
 WANTLIB-snmp= crypto m netsnmp>=6.2 pthread
+
+# sqlite3
+PHP_EXTENSIONS+= -sqlite3
+COMMENT-sqlite3= sqlite3 database access extension for php
+CONFIGURE_ARGS+= --with-sqlite3=shared,${LOCALBASE}
+LIB_DEPENDS-sqlite3= databases/sqlite3
+WANTLIB-sqlite3= sqlite3 pthread
 
 # pdo-dblib
 PHP_EXTENSIONS+= -pdo_dblib
Index: lang/php/php.port.mk
===================================================================
RCS file: /cvs/ports/lang/php/php.port.mk,v
retrieving revision 1.19
diff -u -p -r1.19 php.port.mk
--- lang/php/php.port.mk 22 May 2018 08:16:24 -0000 1.19
+++ lang/php/php.port.mk 25 May 2018 11:49:03 -0000
@@ -37,6 +37,14 @@ MODPHP_LIBDIR= ${LOCALBASE}/lib/php-${M
 MODPHP_CONFIGURE_ARGS= --with-php-config=${LOCALBASE}/bin/php-config-${MODPHP_VERSION}
 SUBST_VARS+= MODPHP_VERSION
 
+# build a string that can be included in RUN_DEPENDS to match suitable PDO types
+MODPHP_PDO_ALLOWED?= mysql pgsql sqlite
+MODPHP_PDO_PREF?= sqlite
+.for i in ${MODPHP_PDO_ALLOWED}
+MODPHP_PDO_DEPENDS:= ${MODPHP_PDO_DEPENDS}php-pdo_$i-${MODPHP_VSPEC}|
+.endfor
+MODPHP_PDO_DEPENDS:= ${MODPHP_PDO_DEPENDS:S/|$//}:lang/php/${MODPHP_VERSION},-pdo_${MODPHP_PDO_PREF}
+
 MODPHP_DO_PHPIZE?=
 .if !empty(MODPHP_DO_PHPIZE)
 AUTOCONF_VERSION= 2.62
Index: lang/php/5.6/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/5.6/Makefile,v
retrieving revision 1.64
diff -u -p -r1.64 Makefile
--- lang/php/5.6/Makefile 23 May 2018 06:51:14 -0000 1.64
+++ lang/php/5.6/Makefile 25 May 2018 11:49:03 -0000
@@ -3,9 +3,7 @@
 BROKEN-alpha= pcre_jit_compile.c:65:2: error: #error Unsupported architecture
 
 PV= 5.6
-V= ${PV}.35
-REVISION= 1
-REVISION-main= 2
+V= ${PV}.36
 
 MASTER_SITES0= https://download.suhosin.org/
 
@@ -28,9 +26,8 @@ pre-patch:
 # mysql
 PHP_EXTENSIONS+= -mysql
 COMMENT-mysql= mysql database access extensions for php5
-CONFIGURE_ARGS+= --with-mysql=shared,${LOCALBASE}
-LIB_DEPENDS-mysql= databases/mariadb
-WANTLIB-mysql= pthread lib/mysql/mysqlclient
+CONFIGURE_ARGS+= --with-mysql=shared
+WANTLIB-mysql= pthread
 
 # sybase-ct
 PHP_EXTENSIONS+= -sybase_ct
Index: lang/php/5.6/distinfo
===================================================================
RCS file: /cvs/ports/lang/php/5.6/distinfo,v
retrieving revision 1.30
diff -u -p -r1.30 distinfo
--- lang/php/5.6/distinfo 24 Apr 2018 15:26:58 -0000 1.30
+++ lang/php/5.6/distinfo 25 May 2018 11:49:03 -0000
@@ -1,4 +1,4 @@
-SHA256 (php-5.6.35.tar.bz2) = 7nin6coh2Oo5TQN8Ve//9HeknbrjHHdTxUcDb1vXO5I=
+SHA256 (php-5.6.36.tar.bz2) = YmoOP12KDmhqK5MPDdOgYB/j3LXkPdDow/q2MeZOFyo=
 SHA256 (suhosin-0.9.38.tar.gz) = wC12xOfOd3kQo3wYGBy2f9npDv4BB/6rPeMTG1+JvOo=
-SIZE (php-5.6.35.tar.bz2) = 15055074
+SIZE (php-5.6.36.tar.bz2) = 15057704
 SIZE (suhosin-0.9.38.tar.gz) = 122800
Index: lang/php/5.6/patches/patch-ext_openssl_config0_m4
===================================================================
RCS file: /cvs/ports/lang/php/5.6/patches/patch-ext_openssl_config0_m4,v
retrieving revision 1.2
diff -u -p -r1.2 patch-ext_openssl_config0_m4
--- lang/php/5.6/patches/patch-ext_openssl_config0_m4 25 Apr 2015 16:20:29 -0000 1.2
+++ lang/php/5.6/patches/patch-ext_openssl_config0_m4 25 May 2018 11:49:03 -0000
@@ -1,3 +1,4 @@
+$OpenBSD$
 --- ext/openssl/config0.m4.orig.port Wed Apr 15 20:05:57 2015
 +++ ext/openssl/config0.m4 Sat Apr 25 18:10:11 2015
 @@ -19,7 +19,7 @@ if test "$PHP_OPENSSL" != "no"; then
Index: lang/php/5.6/pkg/PLIST-cgi
===================================================================
RCS file: /cvs/ports/lang/php/5.6/pkg/PLIST-cgi,v
retrieving revision 1.1
diff -u -p -r1.1 PLIST-cgi
--- lang/php/5.6/pkg/PLIST-cgi 23 Feb 2018 18:51:44 -0000 1.1
+++ lang/php/5.6/pkg/PLIST-cgi 25 May 2018 11:49:03 -0000
@@ -1,7 +1,7 @@
 @comment $OpenBSD: PLIST-cgi,v 1.1 2018/02/23 18:51:44 martijn Exp $
 @option no-default-conflict
 @option is-branch
-@pkgpath lang/php/5.6,-fastcgi
 @conflict php-cgi->=5.6,<5.7
+@pkgpath lang/php/5.6,-fastcgi
 @bin bin/php-cgi-${PV}
 @man man/man1/php-cgi-${PV}.1
Index: lang/php/5.6/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/php/5.6/pkg/PLIST-main,v
retrieving revision 1.11
diff -u -p -r1.11 PLIST-main
--- lang/php/5.6/pkg/PLIST-main 23 May 2018 06:51:14 -0000 1.11
+++ lang/php/5.6/pkg/PLIST-main 25 May 2018 11:49:03 -0000
@@ -5,9 +5,7 @@
 @conflict php-fpm->=5.6,<5.7
 @conflict php5-core->=5.2
 @conflict php5-core-fastcgi->=5.2
-@conflict php5-pdo_sqlite->=5.2
 @pkgpath lang/php/5.4
-@pkgpath lang/php/5.4,-pdo_sqlite
 @pkgpath lang/php/5.6,-fpm
 @pkgpath lang/php/5.6,-main,ap2
 @extraunexec rm -f ${SYSCONFDIR}/php-${PV}/php-${PV}.sample/*
@@ -18,33 +16,33 @@
 @mode
 @owner
 @group
+bin/phar-${PV}
 @bin bin/php-${PV}
 bin/php-config-${PV}
 bin/phpize-${PV}
-bin/phar-${PV}
 lib/php-${PV}/
 lib/php-${PV}/libphp5.so
 lib/php-${PV}/modules/
 lib/php-${PV}/modules/opcache.so
+@man man/man1/phar-${PV}.1
 @man man/man1/php-${PV}.1
 @man man/man1/php-config-${PV}.1
 @man man/man1/phpize-${PV}.1
-@man man/man1/phar-${PV}.1
 @man man/man8/php-fpm-${PV}.8
 @bin sbin/php-fpm-${PV}
 share/doc/pkg-readmes/${FULLPKGNAME}
 share/examples/php-${PV}/
-@sample /var/www/conf/modules.sample/
+@sample ${MODPHP_CONFIG_PATH}/modules.sample/
 @sample ${SYSCONFDIR}/php-${PV}.sample/
 share/examples/php-${PV}/opcache.ini
 @sample ${SYSCONFDIR}/php-${PV}.sample/opcache.ini
+share/examples/php-${PV}/php-fpm.conf
+@sample ${SYSCONFDIR}/php-fpm.conf
 share/examples/php-${PV}/php.conf
-@sample /var/www/conf/modules.sample/php-${PV}.conf
+@sample ${MODPHP_CONFIG_PATH}/modules.sample/php-${PV}.conf
 share/examples/php-${PV}/php.ini-development
 share/examples/php-${PV}/php.ini-production
 @sample ${SYSCONFDIR}/php-${PV}.ini
-share/examples/php-${PV}/php-fpm.conf
-@sample ${SYSCONFDIR}/php-fpm.conf
 share/php-${PV}/
 share/php-${PV}/build/
 share/php-${PV}/build/Makefile.global
@@ -223,7 +221,7 @@ share/php-${PV}/include/ext/mbstring/oni
 share/php-${PV}/include/ext/mbstring/php_mbregex.h
 share/php-${PV}/include/ext/mbstring/php_onig_compat.h
 share/php-${PV}/include/ext/mysqli/
-share/php-${PV}/include/ext/mysqli/mysqli_libmysql.h
+share/php-${PV}/include/ext/mysqli/mysqli_mysqlnd.h
 share/php-${PV}/include/ext/mysqli/php_mysqli_structs.h
 share/php-${PV}/include/ext/mysqlnd/
 share/php-${PV}/include/ext/mysqlnd/config-win.h
@@ -281,9 +279,6 @@ share/php-${PV}/include/ext/spl/spl_func
 share/php-${PV}/include/ext/spl/spl_heap.h
 share/php-${PV}/include/ext/spl/spl_iterators.h
 share/php-${PV}/include/ext/spl/spl_observer.h
-share/php-${PV}/include/ext/sqlite3/
-share/php-${PV}/include/ext/sqlite3/libsqlite/
-share/php-${PV}/include/ext/sqlite3/libsqlite/sqlite3.h
 share/php-${PV}/include/ext/standard/
 share/php-${PV}/include/ext/standard/base64.h
 share/php-${PV}/include/ext/standard/basic_functions.h
Index: lang/php/5.6/pkg/PLIST-pdo_odbc
===================================================================
RCS file: lang/php/5.6/pkg/PLIST-pdo_odbc
diff -N lang/php/5.6/pkg/PLIST-pdo_odbc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/php/5.6/pkg/PLIST-pdo_odbc 25 May 2018 11:49:03 -0000
@@ -0,0 +1,7 @@
+@comment $OpenBSD: $
+@option no-default-conflict
+@option is-branch
+@conflict php-pdo_odbc->=5.6,<5.7
+lib/php-${PV}/modules/pdo_odbc.so
+share/examples/php-${PV}/pdo_odbc.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/pdo_odbc.ini
Index: lang/php/5.6/pkg/PLIST-pdo_sqlite
===================================================================
RCS file: lang/php/5.6/pkg/PLIST-pdo_sqlite
diff -N lang/php/5.6/pkg/PLIST-pdo_sqlite
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/php/5.6/pkg/PLIST-pdo_sqlite 25 May 2018 11:49:03 -0000
@@ -0,0 +1,7 @@
+@comment $OpenBSD: PLIST-pdo_sqlite,v$
+@option no-default-conflict
+@option is-branch
+@conflict php-pdo_sqlite->=5.6,<5.7
+lib/php-${PV}/modules/pdo_sqlite.so
+share/examples/php-${PV}/pdo_sqlite.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/pdo_sqlite.ini
Index: lang/php/5.6/pkg/PLIST-sqlite3
===================================================================
RCS file: lang/php/5.6/pkg/PLIST-sqlite3
diff -N lang/php/5.6/pkg/PLIST-sqlite3
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/php/5.6/pkg/PLIST-sqlite3 25 May 2018 11:49:03 -0000
@@ -0,0 +1,7 @@
+@comment $OpenBSD: PLIST-sqlite3,v$
+@option no-default-conflict
+@option is-branch
+@conflict php-sqlite3->=5.6,<5.7
+lib/php-${PV}/modules/sqlite3.so
+share/examples/php-${PV}/sqlite3.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/sqlite3.ini
Index: lang/php/7.0/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/7.0/Makefile,v
retrieving revision 1.47
diff -u -p -r1.47 Makefile
--- lang/php/7.0/Makefile 23 May 2018 06:51:14 -0000 1.47
+++ lang/php/7.0/Makefile 25 May 2018 11:49:03 -0000
@@ -3,9 +3,7 @@
 BROKEN-sparc64= SIGBUS during phar generation
 
 PV= 7.0
-V= ${PV}.29
-REVISION= 1
-REVISION-main= 2
+V= ${PV}.30
 
 BUILD_DEPENDS+= devel/bison
 
Index: lang/php/7.0/distinfo
===================================================================
RCS file: /cvs/ports/lang/php/7.0/distinfo,v
retrieving revision 1.22
diff -u -p -r1.22 distinfo
--- lang/php/7.0/distinfo 24 Apr 2018 15:26:32 -0000 1.22
+++ lang/php/7.0/distinfo 25 May 2018 11:49:03 -0000
@@ -1,2 +1,2 @@
-SHA256 (php-7.0.29.tar.bz2) = mJFC1cX/ehFDElT5wZlSNbrWGjNkuZyWbhHgaqENP7w=
-SIZE (php-7.0.29.tar.bz2) = 14510520
+SHA256 (php-7.0.30.tar.bz2) = IT84QAwjm4+rL29Z1vTUvUY9CnW9Tt9yPdTV/qiFC1A=
+SIZE (php-7.0.30.tar.bz2) = 14641553
Index: lang/php/7.0/pkg/PLIST-cgi
===================================================================
RCS file: /cvs/ports/lang/php/7.0/pkg/PLIST-cgi,v
retrieving revision 1.1
diff -u -p -r1.1 PLIST-cgi
--- lang/php/7.0/pkg/PLIST-cgi 23 Feb 2018 18:51:44 -0000 1.1
+++ lang/php/7.0/pkg/PLIST-cgi 25 May 2018 11:49:03 -0000
@@ -1,7 +1,7 @@
 @comment $OpenBSD: PLIST-cgi,v 1.1 2018/02/23 18:51:44 martijn Exp $
 @option no-default-conflict
 @option is-branch
-@pkgpath lang/php/7.0,-fastcgi
 @conflict php-cgi->=7.0,<7.1
+@pkgpath lang/php/7.0,-fastcgi
 @bin bin/php-cgi-${PV}
 @man man/man1/php-cgi-${PV}.1
Index: lang/php/7.0/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/php/7.0/pkg/PLIST-main,v
retrieving revision 1.7
diff -u -p -r1.7 PLIST-main
--- lang/php/7.0/pkg/PLIST-main 23 May 2018 06:51:14 -0000 1.7
+++ lang/php/7.0/pkg/PLIST-main 25 May 2018 11:49:03 -0000
@@ -5,9 +5,7 @@
 @conflict php-fpm->=7.0,<7.1
 @conflict php5-core->=5.2
 @conflict php5-core-fastcgi->=5.2
-@conflict php5-pdo_sqlite->=5.2
 @pkgpath lang/php/5.4
-@pkgpath lang/php/5.4,-pdo_sqlite
 @pkgpath lang/php/7.0,-fpm
 @extraunexec rm -f ${SYSCONFDIR}/php-${PV}/php-${PV}.sample/*
 @mode 1700
@@ -17,33 +15,33 @@
 @mode
 @owner
 @group
+bin/phar-${PV}
 @bin bin/php-${PV}
 bin/php-config-${PV}
 bin/phpize-${PV}
-bin/phar-${PV}
 lib/php-${PV}/
 lib/php-${PV}/libphp7.so
 lib/php-${PV}/modules/
 lib/php-${PV}/modules/opcache.so
+@man man/man1/phar-${PV}.1
 @man man/man1/php-${PV}.1
 @man man/man1/php-config-${PV}.1
 @man man/man1/phpize-${PV}.1
-@man man/man1/phar-${PV}.1
 @man man/man8/php-fpm-${PV}.8
 @bin sbin/php-fpm-${PV}
 share/doc/pkg-readmes/${FULLPKGNAME}
 share/examples/php-${PV}/
-@sample /var/www/conf/modules.sample/
+@sample ${MODPHP_CONFIG_PATH}/modules.sample/
 @sample ${SYSCONFDIR}/php-${PV}.sample/
 share/examples/php-${PV}/opcache.ini
 @sample ${SYSCONFDIR}/php-${PV}.sample/opcache.ini
+share/examples/php-${PV}/php-fpm.conf
+@sample ${SYSCONFDIR}/php-fpm.conf
 share/examples/php-${PV}/php.conf
-@sample /var/www/conf/modules.sample/php-${PV}.conf
+@sample ${MODPHP_CONFIG_PATH}/modules.sample/php-${PV}.conf
 share/examples/php-${PV}/php.ini-development
 share/examples/php-${PV}/php.ini-production
 @sample ${SYSCONFDIR}/php-${PV}.ini
-share/examples/php-${PV}/php-fpm.conf
-@sample ${SYSCONFDIR}/php-fpm.conf
 share/php-${PV}/
 share/php-${PV}/build/
 share/php-${PV}/build/Makefile.global
@@ -220,7 +218,7 @@ share/php-${PV}/include/ext/mbstring/oni
 share/php-${PV}/include/ext/mbstring/php_mbregex.h
 share/php-${PV}/include/ext/mbstring/php_onig_compat.h
 share/php-${PV}/include/ext/mysqli/
-share/php-${PV}/include/ext/mysqli/mysqli_libmysql.h
+share/php-${PV}/include/ext/mysqli/mysqli_mysqlnd.h
 share/php-${PV}/include/ext/mysqli/php_mysqli_structs.h
 share/php-${PV}/include/ext/mysqlnd/
 share/php-${PV}/include/ext/mysqlnd/config-win.h
@@ -278,9 +276,6 @@ share/php-${PV}/include/ext/spl/spl_func
 share/php-${PV}/include/ext/spl/spl_heap.h
 share/php-${PV}/include/ext/spl/spl_iterators.h
 share/php-${PV}/include/ext/spl/spl_observer.h
-share/php-${PV}/include/ext/sqlite3/
-share/php-${PV}/include/ext/sqlite3/libsqlite/
-share/php-${PV}/include/ext/sqlite3/libsqlite/sqlite3.h
 share/php-${PV}/include/ext/standard/
 share/php-${PV}/include/ext/standard/base64.h
 share/php-${PV}/include/ext/standard/basic_functions.h
Index: lang/php/7.0/pkg/PLIST-pdo_odbc
===================================================================
RCS file: lang/php/7.0/pkg/PLIST-pdo_odbc
diff -N lang/php/7.0/pkg/PLIST-pdo_odbc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/php/7.0/pkg/PLIST-pdo_odbc 25 May 2018 11:49:03 -0000
@@ -0,0 +1,7 @@
+@comment $OpenBSD: $
+@option no-default-conflict
+@option is-branch
+@conflict php-pdo_odbc->=7.0,<7.1
+lib/php-${PV}/modules/pdo_odbc.so
+share/examples/php-${PV}/pdo_odbc.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/pdo_odbc.ini
Index: lang/php/7.0/pkg/PLIST-pdo_sqlite
===================================================================
RCS file: lang/php/7.0/pkg/PLIST-pdo_sqlite
diff -N lang/php/7.0/pkg/PLIST-pdo_sqlite
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/php/7.0/pkg/PLIST-pdo_sqlite 25 May 2018 11:49:03 -0000
@@ -0,0 +1,7 @@
+@comment $OpenBSD: PLIST-pdo_sqlite,v$
+@option no-default-conflict
+@option is-branch
+@conflict php-pdo_sqlite->=7.0,<7.1
+lib/php-${PV}/modules/pdo_sqlite.so
+share/examples/php-${PV}/pdo_sqlite.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/pdo_sqlite.ini
Index: lang/php/7.0/pkg/PLIST-sqlite3
===================================================================
RCS file: lang/php/7.0/pkg/PLIST-sqlite3
diff -N lang/php/7.0/pkg/PLIST-sqlite3
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/php/7.0/pkg/PLIST-sqlite3 25 May 2018 11:49:03 -0000
@@ -0,0 +1,7 @@
+@comment $OpenBSD: PLIST-sqlite3,v$
+@option no-default-conflict
+@option is-branch
+@conflict php-sqlite3->=7.0,<7.1
+lib/php-${PV}/modules/sqlite3.so
+share/examples/php-${PV}/sqlite3.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/sqlite3.ini
Index: lang/php/files/DESCR-pdo_dblib
===================================================================
RCS file: /cvs/ports/lang/php/files/DESCR-pdo_dblib,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 DESCR-pdo_dblib
--- lang/php/files/DESCR-pdo_dblib 27 Jun 2010 20:28:45 -0000 1.1.1.1
+++ lang/php/files/DESCR-pdo_dblib 25 May 2018 11:49:03 -0000
@@ -1,8 +1,3 @@
-The PHP Data Objects (PDO) extension defines a lightweight,
-consistent interface for accessing databases in PHP.
-Each database driver that implements the PDO interface can
-expose database-specific features as regular extension functions.
-
 pdo_dblib is a driver that implements the PHP Data Objects (PDO)
 interface to enable access from PHP to Microsoft SQL Server and
 Sybase databases through the FreeTDS libary.
Index: lang/php/files/DESCR-pdo_mysql
===================================================================
RCS file: /cvs/ports/lang/php/files/DESCR-pdo_mysql,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 DESCR-pdo_mysql
--- lang/php/files/DESCR-pdo_mysql 27 Jun 2010 20:28:45 -0000 1.1.1.1
+++ lang/php/files/DESCR-pdo_mysql 25 May 2018 11:49:03 -0000
@@ -1,7 +1,2 @@
-The PHP Data Objects (PDO) extension defines a lightweight,
-consistent interface for accessing databases in PHP.
-Each database driver that implements the PDO interface can
-expose database-specific features as regular extension functions.
-
 pdo_mysql is a driver that implements the PHP Data Objects (PDO)
-interface to enable access from PHP to MySQL 3.x, 4.x and 5.x databases.
+interface to enable access from PHP to MySQL and MariaDB databases.
Index: lang/php/files/DESCR-pdo_odbc
===================================================================
RCS file: lang/php/files/DESCR-pdo_odbc
diff -N lang/php/files/DESCR-pdo_odbc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/php/files/DESCR-pdo_odbc 25 May 2018 11:49:03 -0000
@@ -0,0 +1,3 @@
+pdo_odbc is a driver that implements the PHP Data Objects (PDO)
+interface to enable access from PHP to various databases via their
+ODBC drivers.
Index: lang/php/files/DESCR-pdo_pgsql
===================================================================
RCS file: /cvs/ports/lang/php/files/DESCR-pdo_pgsql,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 DESCR-pdo_pgsql
--- lang/php/files/DESCR-pdo_pgsql 27 Jun 2010 20:28:45 -0000 1.1.1.1
+++ lang/php/files/DESCR-pdo_pgsql 25 May 2018 11:49:03 -0000
@@ -1,7 +1,2 @@
-The PHP Data Objects (PDO) extension defines a lightweight,
-consistent interface for accessing databases in PHP.
-Each database driver that implements the PDO interface can
-expose database-specific features as regular extension functions.
-
 pdo_pgsql is a driver that implements the PHP Data Objects (PDO)
 interface to enable access from PHP to PostgreSQL databases.
Index: lang/php/files/DESCR-pdo_sqlite
===================================================================
RCS file: lang/php/files/DESCR-pdo_sqlite
diff -N lang/php/files/DESCR-pdo_sqlite
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/php/files/DESCR-pdo_sqlite 25 May 2018 11:49:03 -0000
@@ -0,0 +1,2 @@
+pdo_sqlite is a driver that implements the PHP Data Objects (PDO)
+interface to enable access to SQLite 3 databases.
Index: lang/php/files/DESCR-sqlite3
===================================================================
RCS file: lang/php/files/DESCR-sqlite3
diff -N lang/php/files/DESCR-sqlite3
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/php/files/DESCR-sqlite3 25 May 2018 11:49:03 -0000
@@ -0,0 +1,4 @@
+This is an extension for the SQLite Embeddable SQL Database Engine.
+SQLite is a C library that implements an embeddable SQL database
+engine. Programs that link with the SQLite library can have SQL
+database access without running a separate RDBMS process.

Reply | Threaded
Open this post in threaded view
|

Re: PHP link sqlite to sqlite3 package

Robert Nagy
I think you should take over maintainership :)

ok btw

On 25/05/18 12:56 +0100, Stuart Henderson wrote:

> (CC robert, diff below: update to php 5.6.36/7.0.30, add pdo_sqlite,
> add pdo_odbc, switch to mysqlnd, regen plists on -current, tweak DESCRs.
> OK/nope/don't care? :-)
>
> On 2018/05/25 08:33, Martijn van Duren wrote:
> > On 05/24/18 13:52, Stuart Henderson wrote:> It's definitely more than that - I know roundcube needs pdo_sqlite or
> > > another pdo_* - you'd need to look for things using pdo at all to find
> > > them, rather than just looking for sqlite.
> > >
> > The idea behind PDO is that the end-user can easily choose the backend
> > (as long as the backend supports the used SQL-dialect). The use of the
> > sqlite backend makes perfect sense for roundcube now, since it's
> > embedded in the SAPI, but if we split it off we would always install a
> > package that the user might not use. So I see a couple of options that
> > are almost all equally valid to me:
> > 1) We track down the packages that use pdo_sqlite and add it as a
> > dependency, as you proposed.
> > 2) We add it as a recommended dependency similar to what Debian's
> > package manager offers. But do we even support something like that?
> > 3) We leave it open and add a $MESSAGE to the package and a note to the
> > readme.
>
> 2 isn't possible.
>
> 3 is possible (in README usually not MESSAGE) but that's for things
> which are optional, whereas it's actually required to have one of
> pdo_* for at least roundcube and probably others.
>
> There's no need for an unwanted dependency though, just specify
> the alternatives, see packages-specs(7). It's a bit unwieldy so best
> build it in php.port.mk, then the ports using it can include it in
> RUN_DEPENDS.
>
> > 4) Considering your remark about splitting up database extensions *with*
> > library deps: For a future patch I would like to link our mysql modules
> > to mysqlnd instead of libmysqlclient, because it fits better in php's
> > memory_limit concept, supports returning of native integers and is also
> > recommended[0]. That *could* be a reason to move the mysql modules back
> > into the SAPIs and switch those that use sqlite now to mysql. I
> > personally don't like this option, because it requires more
> > administrative overhead to setup the mariadb instance, and merging the
> > mysql interfaces could be interpreted as favouritism towards mysql over
> > the other databases, where sqlite would be because its zero setup.
>
> Or it could be interpreted as a statement of the reality that many
> people writing PHP don't test their shitz with anything other than mysql :)
>
> > > Splitting up database extensions with library deps does seem reasonable
> > > but I'm wondering maybe we should merge the $somedatabase and
> > > pdo_$somedatabase packages, I'm not sure there's much point in splitting
> > > them up, and that way the total number of subpackages doesn't increase..
> > >
> > On first glance that would seem reasonable to me, but it would require
> > a fair deal of refactoring. The current code assumes one package, one
> > module, one auto-generated ini. Then there's also the problem with the
> > fact that there's no 1 to 1 correlation between the module names:
> > - sqlite3 / pdo_sqlite
> > - mysql / mysqli /pdo_mysql
> > - mssql / pdo_dblib
> > - interbase / pdo_firebird (if we would ever enable it)
> >
> > So is the reduction of the packages worth the extra complexity?
>
> Good point.
>
> > [0] http://php.net/manual/en/mysqlinfo.library.choosing.php
>
> Diff below, roundcube included as an example, I'm looking for any others missing ..
>
> Index: mail/roundcubemail/Makefile
> ===================================================================
> RCS file: /cvs/ports/mail/roundcubemail/Makefile,v
> retrieving revision 1.130
> diff -u -p -r1.130 Makefile
> --- mail/roundcubemail/Makefile 22 May 2018 08:19:06 -0000 1.130
> +++ mail/roundcubemail/Makefile 25 May 2018 11:49:02 -0000
> @@ -5,7 +5,7 @@ COMMENT= imap4 webmail client
>  V= 1.3.6
>  DISTNAME= roundcubemail-$V
>  PKGNAME= roundcubemail-${V:S/-rc/rc/}
> -REVISION= 0
> +REVISION= 1
>  EXTRACT_SUFX= -complete.tar.gz
>  
>  FIX_EXTRACT_PERMISSIONS= Yes
> @@ -31,7 +31,8 @@ TINSTDIR= ${TRUEPREFIX}/roundcubemail
>  SUBST_VARS= INSTDIR TINSTDIR MODPHP_BIN
>  
>  MODULES= lang/php
> -RUN_DEPENDS= lang/php/${MODPHP_VERSION},-pspell \
> +RUN_DEPENDS= ${MODPHP_PDO_DEPENDS} \
> + lang/php/${MODPHP_VERSION},-pspell \
>   lang/php/${MODPHP_VERSION},-zip
>  
>  do-configure:
> Index: lang/php/Makefile.inc
> ===================================================================
> RCS file: /cvs/ports/lang/php/Makefile.inc,v
> retrieving revision 1.104
> diff -u -p -r1.104 Makefile.inc
> --- lang/php/Makefile.inc 23 May 2018 06:51:14 -0000 1.104
> +++ lang/php/Makefile.inc 25 May 2018 11:49:03 -0000
> @@ -67,8 +67,6 @@ CONFIGURE_ARGS+= --enable-shared \
>   --with-pic \
>   --with-pear=${LOCALBASE}/share/php-${PV} \
>   --with-config-file-scan-dir=${SYSCONFDIR}/php-${PV} \
> - --with-pdo-sqlite \
> - --with-sqlite3 \
>   --program-suffix=-${PV} \
>   --with-readline
>  
> @@ -210,16 +208,16 @@ WANTLIB-mcrypt= mcrypt ltdl>=1 pthread
>  # mysqli
>  PHP_EXTENSIONS+= -mysqli
>  COMMENT-mysqli= mysql database access extensions for php
> -CONFIGURE_ARGS+= --with-mysqli=shared,${LOCALBASE}/bin/mysql_config
> -LIB_DEPENDS-mysqli= databases/mariadb
> -WANTLIB-mysqli= crypto m pthread ssl z lib/mysql/mysqlclient
> +CONFIGURE_ARGS+= --with-mysqli=shared
> +LIB_DEPENDS-mysqli= # empty: using PHP's mysqlnd
> +WANTLIB-mysqli= pthread
>  
>  # odbc
>  PHP_EXTENSIONS+= -odbc
>  COMMENT-odbc= odbc database access extensions for php
>  CONFIGURE_ARGS+=        --with-iodbc=shared,${LOCALBASE}
>  LIB_DEPENDS-odbc= databases/iodbc
> -WANTLIB-odbc= iodbc>=2 pthread iodbcinst
> +WANTLIB-odbc= iodbc iodbcinst pthread
>  
>  # pcntl
>  PHP_EXTENSIONS+= -pcntl
> @@ -231,17 +229,31 @@ WANTLIB-pcntl= pthread
>  # pdo-mysql
>  PHP_EXTENSIONS+= -pdo_mysql
>  COMMENT-pdo_mysql= PDO mysql database access extensions for php
> -CONFIGURE_ARGS+= --with-pdo-mysql=shared,${LOCALBASE}
> -LIB_DEPENDS-pdo_mysql= databases/mariadb
> -WANTLIB-pdo_mysql= crypto m pthread ssl z lib/mysql/mysqlclient
> +CONFIGURE_ARGS+= --with-pdo-mysql=shared
> +LIB_DEPENDS-mysqli= # empty: using PHP's mysqlnd
> +WANTLIB-pdo_mysql= pthread
> +
> +# pdo-odbc
> +PHP_EXTENSIONS+= -pdo_odbc
> +COMMENT-pdo_odbc= PDO database access extensions for php
> +CONFIGURE_ARGS+=        --with-pdo-odbc=shared,iODBC,${LOCALBASE}
> +LIB_DEPENDS-pdo_odbc= databases/iodbc
> +WANTLIB-pdo_odbc= iodbc pthread
>  
>  # pdo-pgsql
>  PHP_EXTENSIONS+= -pdo_pgsql
> -COMMENT-pdo_pgsql= PDO database access extensions for php
> +COMMENT-pdo_pgsql= PDO pgsql database access extensions for php
>  CONFIGURE_ARGS+=        --with-pdo-pgsql=shared,${LOCALBASE}
>  LIB_DEPENDS-pdo_pgsql= databases/postgresql
>  WANTLIB-pdo_pgsql= pq>=2 pthread
>  
> +# pdo-sqlite
> +PHP_EXTENSIONS+= -pdo_sqlite
> +COMMENT-pdo_sqlite= PDO sqlite3 database access extensions for php
> +CONFIGURE_ARGS+=        --with-pdo-sqlite=shared,${LOCALBASE}
> +LIB_DEPENDS-pdo_sqlite= databases/sqlite3
> +WANTLIB-pdo_sqlite= pthread sqlite3
> +
>  # pgsql
>  PHP_EXTENSIONS+= -pgsql
>  COMMENT-pgsql= pgsql database access extensions for php
> @@ -276,6 +288,13 @@ COMMENT-snmp= snmp protocol extensions
>  CONFIGURE_ARGS+= --with-snmp=shared,${LOCALBASE}
>  LIB_DEPENDS-snmp= net/net-snmp
>  WANTLIB-snmp= crypto m netsnmp>=6.2 pthread
> +
> +# sqlite3
> +PHP_EXTENSIONS+= -sqlite3
> +COMMENT-sqlite3= sqlite3 database access extension for php
> +CONFIGURE_ARGS+= --with-sqlite3=shared,${LOCALBASE}
> +LIB_DEPENDS-sqlite3= databases/sqlite3
> +WANTLIB-sqlite3= sqlite3 pthread
>  
>  # pdo-dblib
>  PHP_EXTENSIONS+= -pdo_dblib
> Index: lang/php/php.port.mk
> ===================================================================
> RCS file: /cvs/ports/lang/php/php.port.mk,v
> retrieving revision 1.19
> diff -u -p -r1.19 php.port.mk
> --- lang/php/php.port.mk 22 May 2018 08:16:24 -0000 1.19
> +++ lang/php/php.port.mk 25 May 2018 11:49:03 -0000
> @@ -37,6 +37,14 @@ MODPHP_LIBDIR= ${LOCALBASE}/lib/php-${M
>  MODPHP_CONFIGURE_ARGS= --with-php-config=${LOCALBASE}/bin/php-config-${MODPHP_VERSION}
>  SUBST_VARS+= MODPHP_VERSION
>  
> +# build a string that can be included in RUN_DEPENDS to match suitable PDO types
> +MODPHP_PDO_ALLOWED?= mysql pgsql sqlite
> +MODPHP_PDO_PREF?= sqlite
> +.for i in ${MODPHP_PDO_ALLOWED}
> +MODPHP_PDO_DEPENDS:= ${MODPHP_PDO_DEPENDS}php-pdo_$i-${MODPHP_VSPEC}|
> +.endfor
> +MODPHP_PDO_DEPENDS:= ${MODPHP_PDO_DEPENDS:S/|$//}:lang/php/${MODPHP_VERSION},-pdo_${MODPHP_PDO_PREF}
> +
>  MODPHP_DO_PHPIZE?=
>  .if !empty(MODPHP_DO_PHPIZE)
>  AUTOCONF_VERSION= 2.62
> Index: lang/php/5.6/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/php/5.6/Makefile,v
> retrieving revision 1.64
> diff -u -p -r1.64 Makefile
> --- lang/php/5.6/Makefile 23 May 2018 06:51:14 -0000 1.64
> +++ lang/php/5.6/Makefile 25 May 2018 11:49:03 -0000
> @@ -3,9 +3,7 @@
>  BROKEN-alpha= pcre_jit_compile.c:65:2: error: #error Unsupported architecture
>  
>  PV= 5.6
> -V= ${PV}.35
> -REVISION= 1
> -REVISION-main= 2
> +V= ${PV}.36
>  
>  MASTER_SITES0= https://download.suhosin.org/
>  
> @@ -28,9 +26,8 @@ pre-patch:
>  # mysql
>  PHP_EXTENSIONS+= -mysql
>  COMMENT-mysql= mysql database access extensions for php5
> -CONFIGURE_ARGS+= --with-mysql=shared,${LOCALBASE}
> -LIB_DEPENDS-mysql= databases/mariadb
> -WANTLIB-mysql= pthread lib/mysql/mysqlclient
> +CONFIGURE_ARGS+= --with-mysql=shared
> +WANTLIB-mysql= pthread
>  
>  # sybase-ct
>  PHP_EXTENSIONS+= -sybase_ct
> Index: lang/php/5.6/distinfo
> ===================================================================
> RCS file: /cvs/ports/lang/php/5.6/distinfo,v
> retrieving revision 1.30
> diff -u -p -r1.30 distinfo
> --- lang/php/5.6/distinfo 24 Apr 2018 15:26:58 -0000 1.30
> +++ lang/php/5.6/distinfo 25 May 2018 11:49:03 -0000
> @@ -1,4 +1,4 @@
> -SHA256 (php-5.6.35.tar.bz2) = 7nin6coh2Oo5TQN8Ve//9HeknbrjHHdTxUcDb1vXO5I=
> +SHA256 (php-5.6.36.tar.bz2) = YmoOP12KDmhqK5MPDdOgYB/j3LXkPdDow/q2MeZOFyo=
>  SHA256 (suhosin-0.9.38.tar.gz) = wC12xOfOd3kQo3wYGBy2f9npDv4BB/6rPeMTG1+JvOo=
> -SIZE (php-5.6.35.tar.bz2) = 15055074
> +SIZE (php-5.6.36.tar.bz2) = 15057704
>  SIZE (suhosin-0.9.38.tar.gz) = 122800
> Index: lang/php/5.6/patches/patch-ext_openssl_config0_m4
> ===================================================================
> RCS file: /cvs/ports/lang/php/5.6/patches/patch-ext_openssl_config0_m4,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-ext_openssl_config0_m4
> --- lang/php/5.6/patches/patch-ext_openssl_config0_m4 25 Apr 2015 16:20:29 -0000 1.2
> +++ lang/php/5.6/patches/patch-ext_openssl_config0_m4 25 May 2018 11:49:03 -0000
> @@ -1,3 +1,4 @@
> +$OpenBSD$
>  --- ext/openssl/config0.m4.orig.port Wed Apr 15 20:05:57 2015
>  +++ ext/openssl/config0.m4 Sat Apr 25 18:10:11 2015
>  @@ -19,7 +19,7 @@ if test "$PHP_OPENSSL" != "no"; then
> Index: lang/php/5.6/pkg/PLIST-cgi
> ===================================================================
> RCS file: /cvs/ports/lang/php/5.6/pkg/PLIST-cgi,v
> retrieving revision 1.1
> diff -u -p -r1.1 PLIST-cgi
> --- lang/php/5.6/pkg/PLIST-cgi 23 Feb 2018 18:51:44 -0000 1.1
> +++ lang/php/5.6/pkg/PLIST-cgi 25 May 2018 11:49:03 -0000
> @@ -1,7 +1,7 @@
>  @comment $OpenBSD: PLIST-cgi,v 1.1 2018/02/23 18:51:44 martijn Exp $
>  @option no-default-conflict
>  @option is-branch
> -@pkgpath lang/php/5.6,-fastcgi
>  @conflict php-cgi->=5.6,<5.7
> +@pkgpath lang/php/5.6,-fastcgi
>  @bin bin/php-cgi-${PV}
>  @man man/man1/php-cgi-${PV}.1
> Index: lang/php/5.6/pkg/PLIST-main
> ===================================================================
> RCS file: /cvs/ports/lang/php/5.6/pkg/PLIST-main,v
> retrieving revision 1.11
> diff -u -p -r1.11 PLIST-main
> --- lang/php/5.6/pkg/PLIST-main 23 May 2018 06:51:14 -0000 1.11
> +++ lang/php/5.6/pkg/PLIST-main 25 May 2018 11:49:03 -0000
> @@ -5,9 +5,7 @@
>  @conflict php-fpm->=5.6,<5.7
>  @conflict php5-core->=5.2
>  @conflict php5-core-fastcgi->=5.2
> -@conflict php5-pdo_sqlite->=5.2
>  @pkgpath lang/php/5.4
> -@pkgpath lang/php/5.4,-pdo_sqlite
>  @pkgpath lang/php/5.6,-fpm
>  @pkgpath lang/php/5.6,-main,ap2
>  @extraunexec rm -f ${SYSCONFDIR}/php-${PV}/php-${PV}.sample/*
> @@ -18,33 +16,33 @@
>  @mode
>  @owner
>  @group
> +bin/phar-${PV}
>  @bin bin/php-${PV}
>  bin/php-config-${PV}
>  bin/phpize-${PV}
> -bin/phar-${PV}
>  lib/php-${PV}/
>  lib/php-${PV}/libphp5.so
>  lib/php-${PV}/modules/
>  lib/php-${PV}/modules/opcache.so
> +@man man/man1/phar-${PV}.1
>  @man man/man1/php-${PV}.1
>  @man man/man1/php-config-${PV}.1
>  @man man/man1/phpize-${PV}.1
> -@man man/man1/phar-${PV}.1
>  @man man/man8/php-fpm-${PV}.8
>  @bin sbin/php-fpm-${PV}
>  share/doc/pkg-readmes/${FULLPKGNAME}
>  share/examples/php-${PV}/
> -@sample /var/www/conf/modules.sample/
> +@sample ${MODPHP_CONFIG_PATH}/modules.sample/
>  @sample ${SYSCONFDIR}/php-${PV}.sample/
>  share/examples/php-${PV}/opcache.ini
>  @sample ${SYSCONFDIR}/php-${PV}.sample/opcache.ini
> +share/examples/php-${PV}/php-fpm.conf
> +@sample ${SYSCONFDIR}/php-fpm.conf
>  share/examples/php-${PV}/php.conf
> -@sample /var/www/conf/modules.sample/php-${PV}.conf
> +@sample ${MODPHP_CONFIG_PATH}/modules.sample/php-${PV}.conf
>  share/examples/php-${PV}/php.ini-development
>  share/examples/php-${PV}/php.ini-production
>  @sample ${SYSCONFDIR}/php-${PV}.ini
> -share/examples/php-${PV}/php-fpm.conf
> -@sample ${SYSCONFDIR}/php-fpm.conf
>  share/php-${PV}/
>  share/php-${PV}/build/
>  share/php-${PV}/build/Makefile.global
> @@ -223,7 +221,7 @@ share/php-${PV}/include/ext/mbstring/oni
>  share/php-${PV}/include/ext/mbstring/php_mbregex.h
>  share/php-${PV}/include/ext/mbstring/php_onig_compat.h
>  share/php-${PV}/include/ext/mysqli/
> -share/php-${PV}/include/ext/mysqli/mysqli_libmysql.h
> +share/php-${PV}/include/ext/mysqli/mysqli_mysqlnd.h
>  share/php-${PV}/include/ext/mysqli/php_mysqli_structs.h
>  share/php-${PV}/include/ext/mysqlnd/
>  share/php-${PV}/include/ext/mysqlnd/config-win.h
> @@ -281,9 +279,6 @@ share/php-${PV}/include/ext/spl/spl_func
>  share/php-${PV}/include/ext/spl/spl_heap.h
>  share/php-${PV}/include/ext/spl/spl_iterators.h
>  share/php-${PV}/include/ext/spl/spl_observer.h
> -share/php-${PV}/include/ext/sqlite3/
> -share/php-${PV}/include/ext/sqlite3/libsqlite/
> -share/php-${PV}/include/ext/sqlite3/libsqlite/sqlite3.h
>  share/php-${PV}/include/ext/standard/
>  share/php-${PV}/include/ext/standard/base64.h
>  share/php-${PV}/include/ext/standard/basic_functions.h
> Index: lang/php/5.6/pkg/PLIST-pdo_odbc
> ===================================================================
> RCS file: lang/php/5.6/pkg/PLIST-pdo_odbc
> diff -N lang/php/5.6/pkg/PLIST-pdo_odbc
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ lang/php/5.6/pkg/PLIST-pdo_odbc 25 May 2018 11:49:03 -0000
> @@ -0,0 +1,7 @@
> +@comment $OpenBSD: $
> +@option no-default-conflict
> +@option is-branch
> +@conflict php-pdo_odbc->=5.6,<5.7
> +lib/php-${PV}/modules/pdo_odbc.so
> +share/examples/php-${PV}/pdo_odbc.ini
> +@sample ${SYSCONFDIR}/php-${PV}.sample/pdo_odbc.ini
> Index: lang/php/5.6/pkg/PLIST-pdo_sqlite
> ===================================================================
> RCS file: lang/php/5.6/pkg/PLIST-pdo_sqlite
> diff -N lang/php/5.6/pkg/PLIST-pdo_sqlite
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ lang/php/5.6/pkg/PLIST-pdo_sqlite 25 May 2018 11:49:03 -0000
> @@ -0,0 +1,7 @@
> +@comment $OpenBSD: PLIST-pdo_sqlite,v$
> +@option no-default-conflict
> +@option is-branch
> +@conflict php-pdo_sqlite->=5.6,<5.7
> +lib/php-${PV}/modules/pdo_sqlite.so
> +share/examples/php-${PV}/pdo_sqlite.ini
> +@sample ${SYSCONFDIR}/php-${PV}.sample/pdo_sqlite.ini
> Index: lang/php/5.6/pkg/PLIST-sqlite3
> ===================================================================
> RCS file: lang/php/5.6/pkg/PLIST-sqlite3
> diff -N lang/php/5.6/pkg/PLIST-sqlite3
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ lang/php/5.6/pkg/PLIST-sqlite3 25 May 2018 11:49:03 -0000
> @@ -0,0 +1,7 @@
> +@comment $OpenBSD: PLIST-sqlite3,v$
> +@option no-default-conflict
> +@option is-branch
> +@conflict php-sqlite3->=5.6,<5.7
> +lib/php-${PV}/modules/sqlite3.so
> +share/examples/php-${PV}/sqlite3.ini
> +@sample ${SYSCONFDIR}/php-${PV}.sample/sqlite3.ini
> Index: lang/php/7.0/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/php/7.0/Makefile,v
> retrieving revision 1.47
> diff -u -p -r1.47 Makefile
> --- lang/php/7.0/Makefile 23 May 2018 06:51:14 -0000 1.47
> +++ lang/php/7.0/Makefile 25 May 2018 11:49:03 -0000
> @@ -3,9 +3,7 @@
>  BROKEN-sparc64= SIGBUS during phar generation
>  
>  PV= 7.0
> -V= ${PV}.29
> -REVISION= 1
> -REVISION-main= 2
> +V= ${PV}.30
>  
>  BUILD_DEPENDS+= devel/bison
>  
> Index: lang/php/7.0/distinfo
> ===================================================================
> RCS file: /cvs/ports/lang/php/7.0/distinfo,v
> retrieving revision 1.22
> diff -u -p -r1.22 distinfo
> --- lang/php/7.0/distinfo 24 Apr 2018 15:26:32 -0000 1.22
> +++ lang/php/7.0/distinfo 25 May 2018 11:49:03 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (php-7.0.29.tar.bz2) = mJFC1cX/ehFDElT5wZlSNbrWGjNkuZyWbhHgaqENP7w=
> -SIZE (php-7.0.29.tar.bz2) = 14510520
> +SHA256 (php-7.0.30.tar.bz2) = IT84QAwjm4+rL29Z1vTUvUY9CnW9Tt9yPdTV/qiFC1A=
> +SIZE (php-7.0.30.tar.bz2) = 14641553
> Index: lang/php/7.0/pkg/PLIST-cgi
> ===================================================================
> RCS file: /cvs/ports/lang/php/7.0/pkg/PLIST-cgi,v
> retrieving revision 1.1
> diff -u -p -r1.1 PLIST-cgi
> --- lang/php/7.0/pkg/PLIST-cgi 23 Feb 2018 18:51:44 -0000 1.1
> +++ lang/php/7.0/pkg/PLIST-cgi 25 May 2018 11:49:03 -0000
> @@ -1,7 +1,7 @@
>  @comment $OpenBSD: PLIST-cgi,v 1.1 2018/02/23 18:51:44 martijn Exp $
>  @option no-default-conflict
>  @option is-branch
> -@pkgpath lang/php/7.0,-fastcgi
>  @conflict php-cgi->=7.0,<7.1
> +@pkgpath lang/php/7.0,-fastcgi
>  @bin bin/php-cgi-${PV}
>  @man man/man1/php-cgi-${PV}.1
> Index: lang/php/7.0/pkg/PLIST-main
> ===================================================================
> RCS file: /cvs/ports/lang/php/7.0/pkg/PLIST-main,v
> retrieving revision 1.7
> diff -u -p -r1.7 PLIST-main
> --- lang/php/7.0/pkg/PLIST-main 23 May 2018 06:51:14 -0000 1.7
> +++ lang/php/7.0/pkg/PLIST-main 25 May 2018 11:49:03 -0000
> @@ -5,9 +5,7 @@
>  @conflict php-fpm->=7.0,<7.1
>  @conflict php5-core->=5.2
>  @conflict php5-core-fastcgi->=5.2
> -@conflict php5-pdo_sqlite->=5.2
>  @pkgpath lang/php/5.4
> -@pkgpath lang/php/5.4,-pdo_sqlite
>  @pkgpath lang/php/7.0,-fpm
>  @extraunexec rm -f ${SYSCONFDIR}/php-${PV}/php-${PV}.sample/*
>  @mode 1700
> @@ -17,33 +15,33 @@
>  @mode
>  @owner
>  @group
> +bin/phar-${PV}
>  @bin bin/php-${PV}
>  bin/php-config-${PV}
>  bin/phpize-${PV}
> -bin/phar-${PV}
>  lib/php-${PV}/
>  lib/php-${PV}/libphp7.so
>  lib/php-${PV}/modules/
>  lib/php-${PV}/modules/opcache.so
> +@man man/man1/phar-${PV}.1
>  @man man/man1/php-${PV}.1
>  @man man/man1/php-config-${PV}.1
>  @man man/man1/phpize-${PV}.1
> -@man man/man1/phar-${PV}.1
>  @man man/man8/php-fpm-${PV}.8
>  @bin sbin/php-fpm-${PV}
>  share/doc/pkg-readmes/${FULLPKGNAME}
>  share/examples/php-${PV}/
> -@sample /var/www/conf/modules.sample/
> +@sample ${MODPHP_CONFIG_PATH}/modules.sample/
>  @sample ${SYSCONFDIR}/php-${PV}.sample/
>  share/examples/php-${PV}/opcache.ini
>  @sample ${SYSCONFDIR}/php-${PV}.sample/opcache.ini
> +share/examples/php-${PV}/php-fpm.conf
> +@sample ${SYSCONFDIR}/php-fpm.conf
>  share/examples/php-${PV}/php.conf
> -@sample /var/www/conf/modules.sample/php-${PV}.conf
> +@sample ${MODPHP_CONFIG_PATH}/modules.sample/php-${PV}.conf
>  share/examples/php-${PV}/php.ini-development
>  share/examples/php-${PV}/php.ini-production
>  @sample ${SYSCONFDIR}/php-${PV}.ini
> -share/examples/php-${PV}/php-fpm.conf
> -@sample ${SYSCONFDIR}/php-fpm.conf
>  share/php-${PV}/
>  share/php-${PV}/build/
>  share/php-${PV}/build/Makefile.global
> @@ -220,7 +218,7 @@ share/php-${PV}/include/ext/mbstring/oni
>  share/php-${PV}/include/ext/mbstring/php_mbregex.h
>  share/php-${PV}/include/ext/mbstring/php_onig_compat.h
>  share/php-${PV}/include/ext/mysqli/
> -share/php-${PV}/include/ext/mysqli/mysqli_libmysql.h
> +share/php-${PV}/include/ext/mysqli/mysqli_mysqlnd.h
>  share/php-${PV}/include/ext/mysqli/php_mysqli_structs.h
>  share/php-${PV}/include/ext/mysqlnd/
>  share/php-${PV}/include/ext/mysqlnd/config-win.h
> @@ -278,9 +276,6 @@ share/php-${PV}/include/ext/spl/spl_func
>  share/php-${PV}/include/ext/spl/spl_heap.h
>  share/php-${PV}/include/ext/spl/spl_iterators.h
>  share/php-${PV}/include/ext/spl/spl_observer.h
> -share/php-${PV}/include/ext/sqlite3/
> -share/php-${PV}/include/ext/sqlite3/libsqlite/
> -share/php-${PV}/include/ext/sqlite3/libsqlite/sqlite3.h
>  share/php-${PV}/include/ext/standard/
>  share/php-${PV}/include/ext/standard/base64.h
>  share/php-${PV}/include/ext/standard/basic_functions.h
> Index: lang/php/7.0/pkg/PLIST-pdo_odbc
> ===================================================================
> RCS file: lang/php/7.0/pkg/PLIST-pdo_odbc
> diff -N lang/php/7.0/pkg/PLIST-pdo_odbc
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ lang/php/7.0/pkg/PLIST-pdo_odbc 25 May 2018 11:49:03 -0000
> @@ -0,0 +1,7 @@
> +@comment $OpenBSD: $
> +@option no-default-conflict
> +@option is-branch
> +@conflict php-pdo_odbc->=7.0,<7.1
> +lib/php-${PV}/modules/pdo_odbc.so
> +share/examples/php-${PV}/pdo_odbc.ini
> +@sample ${SYSCONFDIR}/php-${PV}.sample/pdo_odbc.ini
> Index: lang/php/7.0/pkg/PLIST-pdo_sqlite
> ===================================================================
> RCS file: lang/php/7.0/pkg/PLIST-pdo_sqlite
> diff -N lang/php/7.0/pkg/PLIST-pdo_sqlite
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ lang/php/7.0/pkg/PLIST-pdo_sqlite 25 May 2018 11:49:03 -0000
> @@ -0,0 +1,7 @@
> +@comment $OpenBSD: PLIST-pdo_sqlite,v$
> +@option no-default-conflict
> +@option is-branch
> +@conflict php-pdo_sqlite->=7.0,<7.1
> +lib/php-${PV}/modules/pdo_sqlite.so
> +share/examples/php-${PV}/pdo_sqlite.ini
> +@sample ${SYSCONFDIR}/php-${PV}.sample/pdo_sqlite.ini
> Index: lang/php/7.0/pkg/PLIST-sqlite3
> ===================================================================
> RCS file: lang/php/7.0/pkg/PLIST-sqlite3
> diff -N lang/php/7.0/pkg/PLIST-sqlite3
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ lang/php/7.0/pkg/PLIST-sqlite3 25 May 2018 11:49:03 -0000
> @@ -0,0 +1,7 @@
> +@comment $OpenBSD: PLIST-sqlite3,v$
> +@option no-default-conflict
> +@option is-branch
> +@conflict php-sqlite3->=7.0,<7.1
> +lib/php-${PV}/modules/sqlite3.so
> +share/examples/php-${PV}/sqlite3.ini
> +@sample ${SYSCONFDIR}/php-${PV}.sample/sqlite3.ini
> Index: lang/php/files/DESCR-pdo_dblib
> ===================================================================
> RCS file: /cvs/ports/lang/php/files/DESCR-pdo_dblib,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 DESCR-pdo_dblib
> --- lang/php/files/DESCR-pdo_dblib 27 Jun 2010 20:28:45 -0000 1.1.1.1
> +++ lang/php/files/DESCR-pdo_dblib 25 May 2018 11:49:03 -0000
> @@ -1,8 +1,3 @@
> -The PHP Data Objects (PDO) extension defines a lightweight,
> -consistent interface for accessing databases in PHP.
> -Each database driver that implements the PDO interface can
> -expose database-specific features as regular extension functions.
> -
>  pdo_dblib is a driver that implements the PHP Data Objects (PDO)
>  interface to enable access from PHP to Microsoft SQL Server and
>  Sybase databases through the FreeTDS libary.
> Index: lang/php/files/DESCR-pdo_mysql
> ===================================================================
> RCS file: /cvs/ports/lang/php/files/DESCR-pdo_mysql,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 DESCR-pdo_mysql
> --- lang/php/files/DESCR-pdo_mysql 27 Jun 2010 20:28:45 -0000 1.1.1.1
> +++ lang/php/files/DESCR-pdo_mysql 25 May 2018 11:49:03 -0000
> @@ -1,7 +1,2 @@
> -The PHP Data Objects (PDO) extension defines a lightweight,
> -consistent interface for accessing databases in PHP.
> -Each database driver that implements the PDO interface can
> -expose database-specific features as regular extension functions.
> -
>  pdo_mysql is a driver that implements the PHP Data Objects (PDO)
> -interface to enable access from PHP to MySQL 3.x, 4.x and 5.x databases.
> +interface to enable access from PHP to MySQL and MariaDB databases.
> Index: lang/php/files/DESCR-pdo_odbc
> ===================================================================
> RCS file: lang/php/files/DESCR-pdo_odbc
> diff -N lang/php/files/DESCR-pdo_odbc
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ lang/php/files/DESCR-pdo_odbc 25 May 2018 11:49:03 -0000
> @@ -0,0 +1,3 @@
> +pdo_odbc is a driver that implements the PHP Data Objects (PDO)
> +interface to enable access from PHP to various databases via their
> +ODBC drivers.
> Index: lang/php/files/DESCR-pdo_pgsql
> ===================================================================
> RCS file: /cvs/ports/lang/php/files/DESCR-pdo_pgsql,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 DESCR-pdo_pgsql
> --- lang/php/files/DESCR-pdo_pgsql 27 Jun 2010 20:28:45 -0000 1.1.1.1
> +++ lang/php/files/DESCR-pdo_pgsql 25 May 2018 11:49:03 -0000
> @@ -1,7 +1,2 @@
> -The PHP Data Objects (PDO) extension defines a lightweight,
> -consistent interface for accessing databases in PHP.
> -Each database driver that implements the PDO interface can
> -expose database-specific features as regular extension functions.
> -
>  pdo_pgsql is a driver that implements the PHP Data Objects (PDO)
>  interface to enable access from PHP to PostgreSQL databases.
> Index: lang/php/files/DESCR-pdo_sqlite
> ===================================================================
> RCS file: lang/php/files/DESCR-pdo_sqlite
> diff -N lang/php/files/DESCR-pdo_sqlite
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ lang/php/files/DESCR-pdo_sqlite 25 May 2018 11:49:03 -0000
> @@ -0,0 +1,2 @@
> +pdo_sqlite is a driver that implements the PHP Data Objects (PDO)
> +interface to enable access to SQLite 3 databases.
> Index: lang/php/files/DESCR-sqlite3
> ===================================================================
> RCS file: lang/php/files/DESCR-sqlite3
> diff -N lang/php/files/DESCR-sqlite3
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ lang/php/files/DESCR-sqlite3 25 May 2018 11:49:03 -0000
> @@ -0,0 +1,4 @@
> +This is an extension for the SQLite Embeddable SQL Database Engine.
> +SQLite is a C library that implements an embeddable SQL database
> +engine. Programs that link with the SQLite library can have SQL
> +database access without running a separate RDBMS process.
>

Reply | Threaded
Open this post in threaded view
|

Re: PHP link sqlite to sqlite3 package

Stuart Henderson
In reply to this post by Stuart Henderson
..and here are diffs for the other ports to use new infra.
It adds deps to owncloud/nextcloud which aren't currently there at
all, from what I read on their websites pdo is actually needed but
not listed as a dep.


Index: mail/roundcubemail/Makefile
===================================================================
RCS file: /cvs/ports/mail/roundcubemail/Makefile,v
retrieving revision 1.130
diff -u -p -r1.130 Makefile
--- mail/roundcubemail/Makefile 22 May 2018 08:19:06 -0000 1.130
+++ mail/roundcubemail/Makefile 25 May 2018 12:39:49 -0000
@@ -5,7 +5,7 @@ COMMENT= imap4 webmail client
 V= 1.3.6
 DISTNAME= roundcubemail-$V
 PKGNAME= roundcubemail-${V:S/-rc/rc/}
-REVISION= 0
+REVISION= 1
 EXTRACT_SUFX= -complete.tar.gz
 
 FIX_EXTRACT_PERMISSIONS= Yes
@@ -31,7 +31,8 @@ TINSTDIR= ${TRUEPREFIX}/roundcubemail
 SUBST_VARS= INSTDIR TINSTDIR MODPHP_BIN
 
 MODULES= lang/php
-RUN_DEPENDS= lang/php/${MODPHP_VERSION},-pspell \
+RUN_DEPENDS= ${MODPHP_PDO_DEPENDS} \
+ lang/php/${MODPHP_VERSION},-pspell \
  lang/php/${MODPHP_VERSION},-zip
 
 do-configure:
Index: net/icinga/web/Makefile
===================================================================
RCS file: /cvs/ports/net/icinga/web/Makefile,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile
--- net/icinga/web/Makefile 22 May 2018 08:18:08 -0000 1.37
+++ net/icinga/web/Makefile 25 May 2018 12:39:50 -0000
@@ -5,17 +5,20 @@ COMMENT = web UI for icinga
 GH_ACCOUNT = Icinga
 GH_PROJECT = icinga-web
 GH_TAGNAME = v1.14.1
-REVISION = 0
+REVISION = 1
 
 MODULES= lang/php
 
 COMMON = www/pear \
  shells/bash
 
+MODPHP_PDO_ALLOWED = mysql pgsql
+MODPHP_PDO_PREF =    mysql
+
 RUN_DEPENDS = ${COMMON_DEPENDS} \
+ ${MODPHP_PDO_DEPENDS}
  lang/php/${MODPHP_VERSION},-gd \
  lang/php/${MODPHP_VERSION},-xsl \
- php-pdo_mysql-${MODPHP_VSPEC}|php-pdo_pgsql-${MODPHP_VSPEC}:lang/php/${MODPHP_VERSION},-pdo_mysql \
  net/icinga/core \
  net/icinga/core,-ido>=1.11
 # Optional php extensions: ldap soap xmlrpc memcache
Index: net/icinga/web2/Makefile
===================================================================
RCS file: /cvs/ports/net/icinga/web2/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- net/icinga/web2/Makefile 22 May 2018 08:18:08 -0000 1.19
+++ net/icinga/web2/Makefile 25 May 2018 12:39:50 -0000
@@ -5,13 +5,16 @@ COMMENT = next-generation web UI for ici
 GH_ACCOUNT = Icinga
 GH_PROJECT = icingaweb2
 GH_TAGNAME = v2.5.3
-REVISION = 0
+REVISION = 1
 PKGNAME = icinga-web2-${GH_TAGNAME:S/v//}
 
 MODULES= lang/php
 
+MODPHP_PDO_ALLOWED = mysql pgsql
+MODPHP_PDO_PREF =    mysql
+
 RUN_DEPENDS = lang/php/${MODPHP_VERSION},-intl \
- php-pdo_mysql-${MODPHP_VSPEC}|php-pdo_pgsql-${MODPHP_VSPEC}:lang/php/${MODPHP_VERSION},-pdo_mysql
+ ${MODPHP_PDO_DEPENDS}
 
 NO_TEST = Yes
 NO_BUILD = Yes
Index: www/drupal7/core7/Makefile
===================================================================
RCS file: /cvs/ports/www/drupal7/core7/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- www/drupal7/core7/Makefile 22 May 2018 08:18:08 -0000 1.7
+++ www/drupal7/core7/Makefile 25 May 2018 12:39:50 -0000
@@ -4,11 +4,12 @@ COMMENT = powerful content management sy
 
 DISTNAME = drupal-7.59
 PKGNAME = drupal-7.59
-REVISION = 0
+REVISION = 1
 DISTFILES = ${DISTNAME}${EXTRACT_SUFX}
 
 MODULES = lang/php
-RUN_DEPENDS = lang/php/${MODPHP_VERSION},-gd
+RUN_DEPENDS = lang/php/${MODPHP_VERSION},-gd \
+ ${MODPHP_PDO_DEPENDS}
 
 do-install:
  mkdir -p ${PREFIX}/${DRUPAL_ROOT}
Index: www/drupal7/core7/pkg/README
===================================================================
RCS file: /cvs/ports/www/drupal7/core7/pkg/README,v
retrieving revision 1.1
diff -u -p -r1.1 README
--- www/drupal7/core7/pkg/README 30 Jun 2016 12:05:41 -0000 1.1
+++ www/drupal7/core7/pkg/README 25 May 2018 12:39:50 -0000
@@ -11,9 +11,8 @@ ln -sf ../modules.sample/${DRUPAL}.conf
  /var/www/conf/modules
 
 Drupal can work with a PostgreSQL, MySQL or SQLite3 database.
-Support for SQLite3 is included with the main php package; to use
-another database, the corresponding package needs to be installed:
-    php-pdo_pgsql or php-pdo_mysql
+If you don't already have the corresponding PDO package, install it:
+    php-pdo_pgsql, php-pdo_mysql or php-pdo_sqlite
 
 If you just want to try out drupal, you don't need any database server,
 an sqlite file will do just fine.
Index: www/drush/Makefile
===================================================================
RCS file: /cvs/ports/www/drush/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- www/drush/Makefile 22 May 2018 08:18:08 -0000 1.12
+++ www/drush/Makefile 25 May 2018 12:39:50 -0000
@@ -5,7 +5,7 @@ COMMENT = command line access to most of
 CATEGORIES = www devel
 
 V= 8.0.3
-REVISION= 0
+REVISION= 1
 DISTNAME= drush-$V
 EXTRACT_SUFX= -deps.tar.xz
 
@@ -20,7 +20,8 @@ MODULES= lang/php
 PERMIT_PACKAGE_CDROM= Yes
 
 NO_BUILD= Yes
-RUN_DEPENDS= archivers/gtar
+RUN_DEPENDS= archivers/gtar \
+ ${MODPHP_PDO_DEPENDS}
 SUBST_VARS= MODPHP_BIN
 
 do-install:
Index: www/nextcloud/Makefile
===================================================================
RCS file: /cvs/ports/www/nextcloud/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- www/nextcloud/Makefile 22 May 2018 08:19:06 -0000 1.14
+++ www/nextcloud/Makefile 25 May 2018 12:39:50 -0000
@@ -3,7 +3,7 @@
 COMMENT= easy and universal access to shared and/or personal files
 
 V= 13.0.2
-REVISION=              0
+REVISION= 1
 DISTNAME= nextcloud-${V}
 EXTRACT_SUFX= .tar.bz2
 
@@ -39,8 +39,11 @@ VR= ${V:R}
 MAJOR= ${VR:R}
 SUBST_VARS= INSTDIR TINSTDIR MODPHP_BIN VR MAJOR
 
+MODPHP_PDO_ALLOWED= mysql pgsql
+MODPHP_PDO_PREF= mysql
 RUN_DEPENDS= lang/php/${MODPHP_VERSION},-gd \
- lang/php/${MODPHP_VERSION},-zip
+ lang/php/${MODPHP_VERSION},-zip \
+ ${MODPHP_PDO_DEPENDS}
 
 # http user authentication
 RUN_DEPENDS += lang/php/${MODPHP_VERSION},-curl
Index: www/owncloud/Makefile
===================================================================
RCS file: /cvs/ports/www/owncloud/Makefile,v
retrieving revision 1.127
diff -u -p -r1.127 Makefile
--- www/owncloud/Makefile 24 May 2018 07:27:45 -0000 1.127
+++ www/owncloud/Makefile 25 May 2018 12:39:50 -0000
@@ -6,7 +6,7 @@ V= 10.0.8
 DISTNAME= owncloud-${V}
 EXTRACT_SUFX= .tar.bz2
 
-REVISION= 2
+REVISION= 3
 
 CATEGORIES= www
 
@@ -39,8 +39,11 @@ TINSTDIR= ${TRUEPREFIX}/owncloud
 VR= ${V:R}
 SUBST_VARS= INSTDIR TINSTDIR MODPHP_BIN VR
 
+MODPHP_PDO_ALLOWED= mysql pgsql
+MODPHP_PDO_PREF= mysql
 RUN_DEPENDS= lang/php/${MODPHP_VERSION},-gd \
- lang/php/${MODPHP_VERSION},-zip
+ lang/php/${MODPHP_VERSION},-zip \
+ ${MODPHP_PDO_DEPENDS}
 
 # http user authentication
 RUN_DEPENDS += lang/php/${MODPHP_VERSION},-curl