[pkg-db-commits] [db5.3] 01/06: Imported Debian patch 5.3.21-2

Ondrej Sury ondrej at alioth.debian.org
Mon Oct 28 09:52:12 UTC 2013


This is an automated email from the git hooks/post-receive script.

ondrej pushed a commit to annotated tag debian/5.3.28-1
in repository db5.3.

commit c29fbfa6898d6b7ead5a182d64a7649ca877d308
Author: Dmitrijs Ledkovs <xnox at debian.org>
Date:   Thu Aug 15 14:21:00 2013 +0100

    Imported Debian patch 5.3.21-2
---
 debian/build_signature_amd64.txt       |    1 +
 debian/changelog                       |   21 ++++++++++
 debian/control                         |    7 +++-
 debian/patches/007-link-sql-libs.patch |   15 +++++++
 debian/patches/series                  |    1 +
 debian/rules                           |   72 +++++++++++++++++++++++++-------
 6 files changed, 100 insertions(+), 17 deletions(-)

diff --git a/debian/build_signature_amd64.txt b/debian/build_signature_amd64.txt
new file mode 100644
index 0000000..3c5ce87
--- /dev/null
+++ b/debian/build_signature_amd64.txt
@@ -0,0 +1 @@
+7e5b311c
diff --git a/debian/changelog b/debian/changelog
index 1cb487c..0f1f208 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,24 @@
+db5.3 (5.3.21-2) unstable; urgency=low
+
+  * Add myself to uploaders.
+  * Use /usr/share/dpkg/architecture.mk
+
+  Apply changes from Ubuntu packaging:
+  * debian/patches/link-sql-libs: Add new patch to fix FTBFS due to
+    missing -ldl link on libdb_sql-5.1.
+  * Search for tcl in the multiarch location, conditionally.
+  * Enable historic dbm interface. Thanks Wookey. (LP: #1126392)
+  * Cross building fixes (LP: #1105368):
+    - do not run tests when crossbuilding, when nocheck is enabled or stage1.
+    - do not check db_signature in stage1 build.
+    - comment that tcl:native is needed for cross-builds.
+  * Really clean the build directory.
+  * Use the autotools-dev dh addon, so that we update all the
+    config.guess/config.sub copies rather than just the one in dist/.
+  * Introduce a stage1 build to skip the java and the tcl bindings.
+
+ -- Dmitrijs Ledkovs <xnox at debian.org>  Thu, 15 Aug 2013 14:21:00 +0100
+
 db5.3 (5.3.21-1) unstable; urgency=low
 
   * Imported Upstream version 5.3.21
diff --git a/debian/control b/debian/control
index 69a5f4d..fc83a63 100644
--- a/debian/control
+++ b/debian/control
@@ -2,9 +2,14 @@ Source: db5.3
 Section: libs
 Priority: standard
 Maintainer: Debian Berkeley DB Group <pkg-db-devel at lists.alioth.debian.org>
-Uploaders: Ondřej Surý <ondrej at debian.org>
+Uploaders: Ondřej Surý <ondrej at debian.org>, Dmitrijs Ledkovs <xnox at debian.org>
 Standards-Version: 3.9.3
+# For cross building one also needs tcl8.4:native (ie. such that it
+# can be executed to pre-process sqlite3 components).
+# For DEB_STAGE=stage1 build tcl-dev, javahelper, default-jdk,
+# gcj-native-helper can be dropped
 Build-Depends: debhelper (>= 9),
+	       autotools-dev (>= 20100122.1),
 	       tcl-dev,
 	       procps [!hurd-i386],
 	       javahelper,
diff --git a/debian/patches/007-link-sql-libs.patch b/debian/patches/007-link-sql-libs.patch
new file mode 100644
index 0000000..72bb5be
--- /dev/null
+++ b/debian/patches/007-link-sql-libs.patch
@@ -0,0 +1,15 @@
+Description: Link libdb_sql-5.3 with the right libraries.
+Author: Iain Lane <iain.lane at canonical.com>
+Bug-Upstream: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712262
+
+--- db5.3-5.3.21.orig/dist/Makefile.in
++++ db5.3-5.3.21/dist/Makefile.in
+@@ -897,7 +897,7 @@ $(libsql_version): $(SQL_OBJS)
+ 
+ # Shared SQL library.
+ $(libsqlso_target): $(SQL_OBJS)
+-	$(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(SQL_OBJS) $(LIBCSO_LIBS)
++	$(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(SQL_OBJS) $(LIBCSO_LIBS) @SQL_LIBS@
+ 	$(RM) $(libsql)
+ 	$(LN) -s .libs/$(libsql_version) $(libsql)
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 7ec5b4c..2204c13 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 004-tclsleep.patch
 005-pg_crypt_size.patch
 006-mutex_alignment.patch
+007-link-sql-libs.patch
diff --git a/debian/rules b/debian/rules
index 60a2d49..dcc525f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,15 +10,7 @@ export DH_VERBOSE=1
 
 export DH_ALWAYS_EXCLUDE=.arch-ids
 
-DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-DEB_BUILD_GNU_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
-DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
-DEB_HOST_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+include /usr/share/dpkg/architecture.mk
 
 # Don't try to build this file if missing
 /usr/share/gcj/debian_defaults /usr/share/javahelper/java-vars.mk:
@@ -32,15 +24,23 @@ GCJ_BROKEN_ARCHS = ia64 sparc mips sh4
 GCJ_NATIVE_ARCHS = $(filter-out $(GCJ_BROKEN_ARCHS), $(gcj_native_archs))
 
 ENABLE_JAVA=no
-ENABLE_GJ=no
+ENABLE_GCJ=no
 
 ifeq (,$(filter $(DEB_HOST_ARCH), $(JAVA_BROKEN_ARCHS)))
-ENABLE_JAVA=yes
+  ENABLE_JAVA=yes
 ifneq (,$(filter $(DEB_HOST_ARCH), $(GCJ_NATIVE_ARCHS)))
-ENABLE_GCJ=yes
+  ENABLE_GCJ=yes
 endif
 endif
 
+ifeq ($(DEB_STAGE),stage1)
+  ENABLE_JAVA=no
+  ENABLE_GCJ=no
+  ENABLE_TCL=no
+else
+  ENABLE_TCL=yes
+endif
+
 CONFIGURE_SWITCHES =    --prefix=/usr \
 			--mandir=\$${prefix}/share/man \
 			--localstatedir=/var \
@@ -50,9 +50,35 @@ CONFIGURE_SWITCHES =    --prefix=/usr \
 			--enable-compat185 \
 			--enable-sql \
 			--enable-stl \
-			--enable-tcl \
-			--enable-dbm \
-			--with-tcl=/usr/lib
+			--enable-dbm
+
+ifeq ($(ENABLE_TCL),yes)
+  ENABLE_TESTS=yes
+  CONFIGURE_SWITCHES += --enable-tcl
+ifneq (,$(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/tcl*))
+  CONFIGURE_SWITCHES += --with-tcl=/usr/lib/$(DEB_HOST_MULTIARCH)
+else
+  CONFIGURE_SWITCHES += --with-tcl=/usr/lib
+endif
+else
+  ENABLE_TESTS=no
+  CONFIGURE_SWITCHES += --disable-tcl
+  DH_OPTIONS += -Nlibdb5.1-tcl
+endif
+
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+  ENABLE_TESTS=no
+endif
+
+ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+  ENABLE_TESTS=no
+endif
+
+ifeq ($(ENABLE_TESTS),yes)
+  CONFIGURE_SWITCHES += --enable-test
+else
+  CONFIGURE_SWITCHES += --disable-test
+endif
 
 ifeq (zx86_64-linux-gnuz,z$(DEB_HOST_GNU_TYPE)z)
 CONFIGURE_SWITCHES += --with-mutex=POSIX/pthreads/library
@@ -76,6 +102,11 @@ ifeq (no,$(ENABLE_GCJ))
 DH_OPTIONS += -Nlibdb5.3-java-gcj
 endif
 
+ifeq (no,$(ENABLE_SQL))
+DH_OPTIONS += -Nlibdb5.1-sql
+  CONFIGURE_SWITCHES += --disable-sql
+endif
+
 
 BROKEN_CPUS = zs390z
 VERY_BROKEN_CPUS = zm68kz zhppaz
@@ -93,7 +124,7 @@ version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
 version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')
 
 %:
-	dh $@ $(DH_PLUGINS)
+	dh $@ --with=autotools-dev $(DH_PLUGINS)
 
 override_dh_auto_configure:
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
@@ -139,6 +170,8 @@ override_dh_auto_install:
 	rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libdb.a
 	ln -s libdb-$(bdbversion).a $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libdb.a
 
+# only works for the native build
+ifeq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
 # Compare built-in signature and fail build if it is different
 	cc -o$(CURDIR)/debian/db_signature \
 	   -I$(CURDIR)/debian/tmp/usr/include \
@@ -149,11 +182,14 @@ override_dh_auto_install:
 
 	echo -n "Berkeley DB signature is:"; $(CURDIR)/debian/db_signature
 
+ifneq ($(DEB_STAGE),stage1)
 	if [ -f $(CURDIR)/debian/saved_signature_$(DEB_HOST_ARCH).txt ]; then \
 	    cmp $(CURDIR)/debian/saved_signature_$(DEB_HOST_ARCH).txt         \
 	        $(CURDIR)/debian/build_signature_$(DEB_HOST_ARCH).txt         \
 	    || ( echo "Region environment signatures differ."; exit 1; );     \
 	fi
+endif
+endif
 
 	mv $(CURDIR)/debian/tmp/usr/bin/dbsql $(CURDIR)/debian/tmp/usr/bin/db_sql
 	rm -f $(CURDIR)/debian/tmp/usr/bin/sqlite3
@@ -164,7 +200,9 @@ override_dh_auto_install:
 
 override_dh_install:
 	dh_install -a -Xusr/doc --list-missing
+ifeq ($(ENABLE_TCL),yes)
 	tcltk-depends
+endif
 
 override_dh_installdocs:
 	dh_installdocs -pdb5.3-doc
@@ -174,6 +212,8 @@ override_dh_strip:
 	dh_strip -s --dbg-package=libdb5.3-dbg
 
 override_dh_clean:
+	rm -rf build
+	rm -f $(CURDIR)/debian/db_signature
 	DH_OPTIONS="" dh_clean
 
 override_jh_installlibs:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-db/db5.3.git



More information about the pkg-db-commits mailing list