2011-02-17 Brian Lu <[email protected]> gnome-2-30
authorhawklu
Thu, 17 Feb 2011 05:24:07 +0000
branchgnome-2-30
changeset 21448 b189d923dca7
parent 21447 5a18b4f71940
child 21450 9704c231841a
2011-02-17 Brian Lu <[email protected]> * specs/SUNWsqlite3.spec: * base-specs/sqlite.spec: * base-specs/sqlitetcl.spec: * ext-sources/mapfile-libsqlite3: * patches/sqlite3-01-using-mapfile.diff: * patches/sqlite3tcl-01-using-LD.diff: Bump to 3.7.5
ChangeLog
base-specs/sqlite.spec
base-specs/sqlitetcl.spec
ext-sources/mapfile-libsqlite3
patches/sqlite3-01-using-mapfile.diff
patches/sqlite3tcl-01-using-LD.diff
specs/SUNWsqlite3.spec
--- a/ChangeLog	Wed Feb 16 18:26:18 2011 +0000
+++ b/ChangeLog	Thu Feb 17 05:24:07 2011 +0000
@@ -1,3 +1,13 @@
+2011-02-17  Brian Lu  <[email protected]>
+
+	* specs/SUNWsqlite3.spec:
+	* base-specs/sqlite.spec:
+	* base-specs/sqlitetcl.spec:
+	* ext-sources/mapfile-libsqlite3:
+	* patches/sqlite3-01-using-mapfile.diff:
+	* patches/sqlite3tcl-01-using-LD.diff:
+	  Bump to 3.7.5
+
 2011-02-16  Brian Cameron  <[email protected]>
 
 	* patches/libgksu-05-rbac-support.diff: Avoid running the dummy
--- a/base-specs/sqlite.spec	Wed Feb 16 18:26:18 2011 +0000
+++ b/base-specs/sqlite.spec	Thu Feb 17 05:24:07 2011 +0000
@@ -8,19 +8,20 @@
 #
 
 %define OSR 12578:1.0.2
-%define doc_version 3_7_3
+%define doc_version 3_7_5
+%define tarball_version 3070500
 
 Name:         sqlite 
 License:      public domain 
 Group:        System/Libraries
-Version:      3.7.3
+Version:      3.7.5
 Release:      1
 Distribution: Java Desktop System
 Vendor:	      www.sqlite.org
 Summary:      SQL database engine 
-Source:       http://www.sqlite.org/%{name}-%{version}.tar.gz
+Source:       http://www.sqlite.org/%{name}-autoconf-%{tarball_version}.tar.gz
 Source1:      mapfile-libsqlite3
-Source2:      http://www.sqlite.org/%{name}_docs_%{doc_version}.zip
+Source2:      http://www.sqlite.org/%{name}-doc-%{tarball_version}.zip
 Source3:      pkgIndex.tcl 
 # This is specified here since unzip is used in this spec file.
 BuildRequires: compress/unzip
@@ -52,10 +53,10 @@
 SQLite is the most widely deployed SQL database engine in the world. 
 
 %prep
-%setup -q
+%setup -q -n %{name}-autoconf-%{tarball_version}
+
 
 %patch1 -p1
-%patch2 -p1
 
 %build
 %ifos linux
@@ -98,17 +99,11 @@
 make install DESTDIR=$RPM_BUILD_ROOT
 rm $RPM_BUILD_ROOT%{_libdir}/*.la
 
-#install pkgIndex.tcl
-cp %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite3 
-%ifarch amd64 sparcv9
-rm -f $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite3/%{_arch64}/pkgIndex.tcl
-%endif
-
 # install docs
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc
 cd $RPM_BUILD_ROOT%{_datadir}/doc
 unzip %{SOURCE2}
-mv %{name}-%{doc_version}-docs sqlite3 
+mv %{name}-doc-%{tarball_version} sqlite3 
 
 
 %clean
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/base-specs/sqlitetcl.spec	Thu Feb 17 05:24:07 2011 +0000
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 2010 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+%define owner hawklu 
+# bugdb: bugzilla.freedesktop.org
+#
+
+%define OSR 12578:1.0.2
+%define tarball_version 3070500
+
+Name:         sqlite-tea 
+License:      public domain 
+Group:        System/Libraries
+Version:      3.7.5
+Release:      1
+Distribution: Java Desktop System
+Vendor:	      www.sqlite.org
+Summary:      SQL database engine Tcl extension 
+Source:       http://www.sqlite.org/%{name}-%{tarball_version}.tar.gz
+
+# This is specified here since unzip is used in this spec file.
+BuildRequires: compress/unzip
+
+# owner:hawklu date:2011-01-30 type:bug bugster:7015869
+Patch1:  sqlite3tcl-01-using-LD.diff
+
+URL:          http://www.sqlite.org
+BuildRoot:    %{_tmppath}/%{name}-%{version}-build
+Docdir:       %{_defaultdocdir}
+Autoreqprov:  on
+
+%description
+SQLite is a software library that implements a self-contained, 
+serverless, zero-configuration, transactional SQL database engine. 
+SQLite is the most widely deployed SQL database engine in the world. 
+
+%prep
+%setup -q -n %{name}-%{tarball_version}
+
+%patch1 -p1
+
+%build
+%ifos linux
+if [ -x /usr/bin/getconf ]; then
+  CPUS=`getconf _NPROCESSORS_ONLN`
+fi
+%else
+  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+%endif
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+  CPUS=1
+fi
+
+export PATH=`pwd`:$PATH
+
+%if %option_with_debug
+ export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_FTS3 -DUSE_PREAD -DHAVE_USLEEP -DHAVE_FDATASYNC -DHAVE_STATVFS -I. "
+%else
+ export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_FTS3 -DUSE_PREAD -DHAVE_USLEEP -DHAVE_FDATASYNC -DHAVE_STATVFS -I. "
+%endif
+
+export LDFLAGS="%_ldflags -Bdirect"
+./configure \
+    --prefix=%{_prefix} \
+    --exec_prefix=%{_prefix} \
+    --libdir=%{_libdir}/tcl8.4/ \
+    --bindir=%{_bindir} \
+    --enable-shared  \
+    --with-tcl="/usr/lib"
+
+make -j $CPUS
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+
+%changelog
+* Mon Jan 31 2011 - [email protected]
+- initial version of the spec file.
--- a/ext-sources/mapfile-libsqlite3	Wed Feb 16 18:26:18 2011 +0000
+++ b/ext-sources/mapfile-libsqlite3	Thu Feb 17 05:24:07 2011 +0000
@@ -21,10 +21,26 @@
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"@(#)mapfile-libsqlite3	1.4	09/06/05 SMI"
+# ident "@(#)mapfile-libsqlite3 1.4     09/06/05 SMI"
 #
 # Defines the public interface to SQLite3
-#
+#                    
+sqlite_3.7.5 { 
+    global: 
+        sqlite3_blob_reopen;
+        sqlite3_compileoption_get;
+        sqlite3_compileoption_used;
+        sqlite3_create_function_v2;
+        sqlite3_log;
+        sqlite3_rtree_geometry_callback;
+        sqlite3_soft_heap_limit64;
+        sqlite3_stmt_readonly;
+        sqlite3_vsnprintf;
+        sqlite3_wal_autocheckpoint;
+        sqlite3_wal_checkpoint;
+        sqlite3_wal_hook;
+} sqlite_3.6.22;
+
 sqlite_3.6.22 {
     global: 
         sqlite3_sourceid;
--- a/patches/sqlite3-01-using-mapfile.diff	Wed Feb 16 18:26:18 2011 +0000
+++ b/patches/sqlite3-01-using-mapfile.diff	Thu Feb 17 05:24:07 2011 +0000
@@ -1,10 +1,11 @@
---- sqlite-3.6.17/Makefile.in.old	2010-01-21 17:09:24.462557000 +0800
-+++ sqlite-3.6.17/Makefile.in	2010-01-25 16:43:36.314568000 +0800
-@@ -463,6 +463,7 @@
- 
- libsqlite3.la:	$(LIBOBJ)
- 	$(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \
-+	 -Wc,-M,mapfile-libsqlite3 \
- 		${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
- 
- libtclsqlite3.la:	tclsqlite.lo libsqlite3.la
+--- sqlite-autoconf-3070500/Makefile.in.orig	2011-02-09 14:45:22.898358781 +0800
++++ sqlite-autoconf-3070500/Makefile.in	2011-02-09 14:46:24.306220296 +0800
+@@ -288,7 +288,7 @@
+ 	  rm -f "$${dir}/so_locations"; \
+ 	done
+ libsqlite3.la: $(libsqlite3_la_OBJECTS) $(libsqlite3_la_DEPENDENCIES) 
+-	$(LINK) -rpath $(libdir) $(libsqlite3_la_LDFLAGS) $(libsqlite3_la_OBJECTS) $(libsqlite3_la_LIBADD) $(LIBS)
++	$(LINK) -rpath $(libdir) $(libsqlite3_la_LDFLAGS) $(libsqlite3_la_OBJECTS) $(libsqlite3_la_LIBADD) $(LIBS) -Wl,-M,mapfile-libsqlite3
+ install-binPROGRAMS: $(bin_PROGRAMS)
+ 	@$(NORMAL_INSTALL)
+ 	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/sqlite3tcl-01-using-LD.diff	Thu Feb 17 05:24:07 2011 +0000
@@ -0,0 +1,11 @@
+--- sqlite-tea-3070400/configure.orig	2011-01-31 12:22:49.223643590 +0800
++++ sqlite-tea-3070400/configure	2011-01-31 12:22:56.056100052 +0800
+@@ -9889,7 +9889,7 @@
+ 		case $system in
+ 		    SunOS-5.[1-9][0-9]*)
+ 			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+-			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
++			SHLIB_LD='${LD} -G -z text ${LDFLAGS_DEFAULT}';;
+ 		    *)
+ 			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
+ 		esac
--- a/specs/SUNWsqlite3.spec	Wed Feb 16 18:26:18 2011 +0000
+++ b/specs/SUNWsqlite3.spec	Thu Feb 17 05:24:07 2011 +0000
@@ -8,17 +8,20 @@
 # package are under the same license as the package itself.
 #
 %define owner hawklu 
-#
 %include Solaris.inc
 
 %ifarch amd64 sparcv9
 %include arch64.inc
 %use sqlite_64= sqlite.spec
+%use sqlitetcl_64= sqlitetcl.spec
 %endif
 
 %include base.inc
 
+%define tarball_prefix 3070400 
+
 %use sqlite= sqlite.spec
+%use sqlitetcl= sqlitetcl.spec
 
 Name:                    SUNWsqlite3
 IPS_package_name:        database/sqlite-3
@@ -70,37 +73,44 @@
 mkdir %name-%version/%_arch64
 
 %sqlite_64.prep -d %name-%version/%_arch64
+%sqlitetcl_64.prep -d %name-%version/%_arch64
 %endif
 
 mkdir %name-%version/%{base_arch}
 %sqlite.prep -d %name-%version/%{base_arch}
+%sqlitetcl.prep -d %name-%version/%{base_arch}
 
 cd %{_builddir}/%name-%version
-gzcat %SOURCE0 | tar xf -
-
-%ifarch amd64 sparcv9
-cd %{_builddir}/%name-%version/%{_arch64}/sqlite-%{sqlite.version}
-%endif
+gzcat %SOURCE | tar xf -
 
 %build
 
 %ifarch amd64 sparcv9
-export TCLLIBDIR=/usr/lib/tcl8.4/sqlite3/%{_arch64}
 %sqlite_64.build -d %name-%version/%_arch64
+%sqlitetcl_64.build -d %name-%version/%_arch64
 %endif
 
-unset TCLLIBDIR
 %sqlite.build -d %name-%version/%{base_arch}
+%sqlitetcl.build -d %name-%version/%{base_arch}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %ifarch amd64 sparcv9
 %sqlite_64.install -d %name-%version/%_arch64
-rm -rf $RPM_BUILD_ROOT/%{_bindir}/%_arch64/
+%sqlitetcl_64.install -d %name-%version/%_arch64
+
+rm -f $RPM_BUILD_ROOT/%{_libdir}/%{_arch64}/tcl8.4/sqlite%{version}/pkgIndex.tcl
+
+mkdir -p $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite%{version}/%{_arch64}
+mv -f $RPM_BUILD_ROOT/usr/lib/%{_arch64}/tcl8.4/sqlite%{version}/libsqlite%{version}.so $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite%{version}/%{_arch64}
+
+rm -rf $RPM_BUILD_ROOT/%{_libdir}/%{_arch64}/tcl8.4
+rm -rf $RPM_BUILD_ROOT/%{_bindir}/%{_arch64}/
 %endif
 
 %sqlite.install -d %name-%version/%{base_arch}
+%sqlitetcl.install -d %name-%version/%{base_arch}
 
 rm -rf $RPM_BUILD_ROOT%{_mandir}
 cd %{_builddir}/%name-%version/sun-manpages
@@ -143,11 +153,7 @@
 %files -n  SUNWsqlite3tcl 
 %defattr(-,root,bin)
 %dir %attr (0755, root, bin) %{_libdir}
-%{_libdir}/tcl8.4/sqlite3/*
-%ifarch amd64 sparcv9
-#%dir %attr (0755, root, bin) %{_libdir}/tcl8.4/sqlite3/%{_arch64}
-#%{_libdir}/tcl8.4/sqlite3/%{_arch64}/*
-%endif
+%{_libdir}/tcl8.4/sqlite3.7.5/*
 
 %files -n  SUNWsqlite3docs 
 %defattr(-,root,bin)