Browse code

Build perl-DBD-SQLite with system sqlite.

Change-Id: Ic7107eb43bce1cd01e445f9909a2d057efde2bee
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5199
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

Xiaolin Li authored on 2018/05/25 13:23:15
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,13 @@
0
+diff --git a/Makefile.PL b/Makefile.PL
1
+index 9cb81f6..cabed21 100644
2
+--- a/Makefile.PL
3
+@@ -129,7 +129,7 @@ SCOPE: {
4
+ # a system sqlite is also sophisticated enough to have a patching system
5
+ # that can change the if ( 0 ) to if ( 1 )
6
+ my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc);
7
+-if ( 0 ) {
8
++if ( 1 ) {
9
+ 	require File::Spec;
10
+ 	if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
11
+ 		$sqlite_base =~ /=(.*)/;
... ...
@@ -2,7 +2,7 @@
2 2
 Summary:        SQLite DBI Driver
3 3
 Name:           perl-DBD-SQLite
4 4
 Version:        1.50
5
-Release:        3%{?dist}
5
+Release:        4%{?dist}
6 6
 Group:          Development/Libraries
7 7
 License:        (GPL+ or Artistic) and Public Domain
8 8
 URL:            http://search.cpan.org/dist/DBD-SQLite/
... ...
@@ -10,6 +10,7 @@ Source0:        http://search.cpan.org/CPAN/authors/id/I/IS/ISHIGAKI/DBD-SQLite-
10 10
 %define sha1    DBD-SQLite=49463e8cf40deb91db8ce36cd8a5d8ccb9cb28c7
11 11
 Vendor:         VMware, Inc.
12 12
 Distribution:   Photon
13
+Patch0:         enable_sqlite_location.patch
13 14
 BuildRequires:  sqlite-autoconf >= 3.22.0
14 15
 BuildRequires:  perl
15 16
 BuildRequires:  perl-DBI
... ...
@@ -25,9 +26,10 @@ libraries.
25 25
 
26 26
 %prep
27 27
 %setup -q -n DBD-SQLite-%{version}
28
+%patch0 -p1
28 29
 
29 30
 %build
30
-CFLAGS="%{optflags}" perl Makefile.PL INSTALLDIRS=vendor
31
+CFLAGS="%{optflags}" perl Makefile.PL SQLITE_LOCATION=/usr INSTALLDIRS=vendor
31 32
 make %{?_smp_mflags} OPTIMIZE="%{optflags}"
32 33
 
33 34
 %install
... ...
@@ -45,6 +47,8 @@ make test
45 45
 %{_mandir}/man3/*
46 46
 
47 47
 %changelog
48
+*   Thu May 24 2018 Xiaolin Li <xiaolinl@vmware.com> 1.50-4
49
+-   Build perl-DBD-SQLite with system sqlite.
48 50
 *   Tue Feb 20 2018 Xiaolin Li <xiaolinl@vmware.com> 1.50-3
49 51
 -   Build perl-DBD-SQLite with sqlite-autoconf-3.22.0.
50 52
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.50-2