[arch-commits] Commit in perl-dbd-sqlite/trunk (PKGBUILD libsqlite.patch)

Florian Pritz bluewind at archlinux.org
Wed Dec 19 19:15:18 UTC 2018


    Date: Wednesday, December 19, 2018 @ 19:15:18
  Author: bluewind
Revision: 342562

upgpkg: perl-dbd-sqlite 1.60-2

Compile against system libsqlite.so

Added:
  perl-dbd-sqlite/trunk/libsqlite.patch
Modified:
  perl-dbd-sqlite/trunk/PKGBUILD

-----------------+
 PKGBUILD        |   24 ++++++++++++++++++++----
 libsqlite.patch |   11 +++++++++++
 2 files changed, 31 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-12-19 16:44:42 UTC (rev 342561)
+++ PKGBUILD	2018-12-19 19:15:18 UTC (rev 342562)
@@ -2,18 +2,34 @@
 
 pkgname=perl-dbd-sqlite
 pkgver=1.60
-pkgrel=1
+pkgrel=2
 pkgdesc="Self-contained RDBMS in a DBI driver"
 arch=('x86_64')
 url="http://search.cpan.org/dist/DBD-SQLite"
 license=('GPL' 'PerlArtistic')
 depends=('perl-dbi' 'sqlite')
-source=("https://www.cpan.org/authors/id/I/IS/ISHIGAKI/DBD-SQLite-$pkgver.tar.gz")
-sha512sums=('b5fd203898815ada13ec04477fa0ad90ec2f53761d9b1ed7cce7d06a674e31d3810e745658aea150a3a58fc18adb889e5e50e795e8575318ab4cc757c1ff1c9e')
+source=("https://www.cpan.org/authors/id/I/IS/ISHIGAKI/DBD-SQLite-$pkgver.tar.gz"
+        libsqlite.patch)
+sha512sums=('b5fd203898815ada13ec04477fa0ad90ec2f53761d9b1ed7cce7d06a674e31d3810e745658aea150a3a58fc18adb889e5e50e795e8575318ab4cc757c1ff1c9e'
+            'cf492402f9127c40130c052a6b3f78e86abc0342385130be386aa12e23b1166f20deac50eee1dcc1e43598ba5785d0a218f2cb0a6bb7f5dd7f7c0fc3220bd2bb')
 
+prepare() {
+  cd DBD-SQLite-$pkgver
+
+  # Ensure that we can never ever build this. If the perl module links against
+  # the system lib this won't matter, if it does not, it will fail during
+  # make test.
+  rm sqlite3.c
+
+  # Makefile asks us to patch this to allow to link with system sqlite...
+  patch -i "$srcdir/libsqlite.patch"
+}
+
 build() {
   cd DBD-SQLite-$pkgver
-  perl Makefile.PL INSTALLDIRS=vendor
+
+  # USE_LOCAL_SQLITE=0 disables use of the bundled sqlite
+  perl Makefile.PL INSTALLDIRS=vendor USE_LOCAL_SQLITE=0
   make
 }
 

Added: libsqlite.patch
===================================================================
--- libsqlite.patch	                        (rev 0)
+++ libsqlite.patch	2018-12-19 19:15:18 UTC (rev 342562)
@@ -0,0 +1,11 @@
+--- Makefile.PL.orig	2018-12-19 20:08:13.433144871 +0100
++++ Makefile.PL	2018-12-19 20:07:37.546242667 +0100
+@@ -129,7 +129,7 @@
+ # a system sqlite is also sophisticated enough to have a patching system
+ # that can change the if ( 0 ) to if ( 1 )
+ my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc);
+-if ( 0 ) {
++if ( 1 ) {
+ 	require File::Spec;
+ 	if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
+ 		$sqlite_base =~ /=(.*)/;



More information about the arch-commits mailing list