Merge lp:~peter-pearse/ubuntu/natty/db4.8/prop001 into lp:ubuntu/natty/db4.8

Proposed by Peter Pearse
Status: Merged
Merged at revision: 7
Proposed branch: lp:~peter-pearse/ubuntu/natty/db4.8/prop001
Merge into: lp:ubuntu/natty/db4.8
Diff against target: 130 lines (+44/-13)
2 files modified
debian/changelog (+16/-0)
debian/rules (+28/-13)
To merge this branch: bzr merge lp:~peter-pearse/ubuntu/natty/db4.8/prop001
Reviewer Review Type Date Requested Status
Steve Langasek Pending
Review via email: mp+47993@code.launchpad.net

This proposal supersedes a proposal from 2011-01-27.

Description of the change

debian/rules changed:
- Test for java native bindings needs to test DEB_HOST_*, not DEB_BUILD_* against the lists.
- objcopy & strip need to be target host tools.
- Need to pass correct tools to configure.

Note: some packages had to be cross black-listed in xdeb.cfg.

libdb4.8-java
libdb4.8-java-dev
libdb4.8-java-gcj

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote : Posted in a previous version of this proposal

+ CONFIGURE_VARS = CC=$(DEB_HOST_GNU_TYPE)-gcc CXX=$(DEB_HOST_GNU_TYPE)-g++ CFLAGS="$(CFLAGS)" CPPFLAGS="-I/usr/$(DEB_HOST_GNU_TYPE)/usr/include/tcl8.5"

This path looks wrong. Shouldn't this be CPPFLAGS="-I/usr/$(DEB_HOST_GNU_TYPE)/include/tcl8.5"? Does something need to be fixed in the tcl8.5 crossing so that this installs to the right place?

Everything else looks spot-on!

review: Needs Fixing
Revision history for this message
Steve Langasek (vorlon) wrote : Posted in a previous version of this proposal

(oh, please also fix debian/changelog to point to natty, not maverick)

Revision history for this message
Steve Langasek (vorlon) wrote : Posted in a previous version of this proposal

crossing tcl8.5-dev, I see headers installed to /usr/arm-linux-gnueabi/include/tcl8.5/, so I'm pretty sure this just needs fixed here in the db4.8 patch.

Revision history for this message
Peter Pearse (peter-pearse) wrote : Posted in a previous version of this proposal

CPPFLAGS corrected, distribution changed to natty.
Re-proposed.

Revision history for this message
Steve Langasek (vorlon) wrote : Posted in a previous version of this proposal

found one more instance of DEB_BUILD that needed to be corrected to DEB_HOST; and the --with-tcl arg also needed to be corrected to point to the cross-build directory. Your changes were correct if insufficient, so I'll merge these; please have a look at the result in lp:ubuntu/db4.8 afterwards to see the further changes I've made.

review: Approve
7. By Steve Langasek

Merge from Peter Pearse to fix cross-building

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-11-25 12:20:41 +0000
3+++ debian/changelog 2011-01-31 13:16:54 +0000
4@@ -1,3 +1,19 @@
5+db4.8 (4.8.30-3ubuntu2) natty; urgency=low
6+
7+ * Correct CPPFLAGS for cross build
8+ * Change distribution to natty
9+
10+ -- Peter Pearse <peter.pearse@linaro.org> Mon, 31 Jan 2011 13:08:05 +0000
11+
12+db4.8 (4.8.30-3ubuntu1) maverick; urgency=low
13+
14+ * Enable both native & cross building by using DEB_HOST variables,
15+ rather than DEB_BUILD ones.
16+ * Pass correct values to configure for cross building
17+ * Use correct binutils for cross building
18+
19+ -- Peter Pearse <peter.pearse@linaro.org> Thu, 27 Jan 2011 14:00:03 +0000
20+
21 db4.8 (4.8.30-3) unstable; urgency=low
22
23 * Patch from Matthias Klose to work around newer binutils breakage on
24
25=== modified file 'debian/rules'
26--- debian/rules 2010-04-04 09:07:08 +0000
27+++ debian/rules 2011-01-31 13:16:54 +0000
28@@ -20,6 +20,7 @@
29 DEB_BUILD_GNU_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
30 DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
31 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
32+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
33 DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
34 DEB_HOST_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
35 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
36@@ -28,7 +29,12 @@
37 JAVA_UNSUPPORTED_SYSTEMS = zgnuz zknetbsd-gnuz
38 -include /usr/share/gcj/debian_defaults
39
40-CONFIGURE_VARS = CC=gcc CFLAGS="$(CFLAGS)" CPPFLAGS="-I/usr/include/tcl8.5"
41+ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
42+ CONFIGURE_VARS = CC=gcc CFLAGS="$(CFLAGS)" CPPFLAGS="-I/usr/include/tcl8.5"
43+else
44+ CONFIGURE_VARS = CC=$(DEB_HOST_GNU_TYPE)-gcc CXX=$(DEB_HOST_GNU_TYPE)-g++ CFLAGS="$(CFLAGS)" CPPFLAGS="-I/usr/$(DEB_HOST_GNU_TYPE)/include/tcl8.5"
45+endif
46+
47 CONFIGURE_SWITCHES = --prefix=/usr \
48 --mandir=\$${prefix}/share/man \
49 --localstatedir=/var \
50@@ -46,6 +52,15 @@
51 CONFIGURE_SWITCHES += --with-mutex=POSIX/pthreads/library
52 endif
53
54+ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
55+ STRIP = strip
56+ OBJCOPY = objcopy
57+else
58+ STRIP = $(DEB_HOST_GNU_TYPE)-strip
59+ OBJCOPY = $(DEB_HOST_GNU_TYPE)-objcopy
60+ CONFIGURE_SWITCHES += --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
61+endif
62+
63 ifeq (,$(findstring z$(DEB_BUILD_GNU_CPU)z,$(JAVA_UNSUPPORTED_CPUS)))
64 ifeq (,$(findstring z$(DEB_BUILD_GNU_SYSTEM)z,$(JAVA_UNSUPPORTED_SYSTEMS)))
65 JAVA_HOME = /usr/lib/jvm/default-java
66@@ -156,16 +171,16 @@
67 debian/lib$(package)-java-dev/usr/lib \
68 debian/lib$(package)-dbg/usr/lib/debug/usr/lib
69
70- objcopy --only-keep-debug debian/tmp/usr/lib/libdb-$(bdbversion).so \
71+ $(OBJCOPY) --only-keep-debug debian/tmp/usr/lib/libdb-$(bdbversion).so \
72 debian/lib$(package)-dbg/usr/lib/debug/usr/lib/libdb-$(bdbversion).so.debug
73
74 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
75- strip --remove-section=.note --remove-section=.comment \
76+ $(STRIP) --remove-section=.note --remove-section=.comment \
77 debian/tmp/usr/lib/*.so debian/tmp/usr/bin/*
78- strip --strip-debug debian/tmp/usr/lib/*.a
79+ $(STRIP) --strip-debug debian/tmp/usr/lib/*.a
80 endif
81
82- objcopy --add-gnu-debuglink=debian/lib$(package)-dbg/usr/lib/debug/usr/lib/libdb-$(bdbversion).so.debug \
83+ $(OBJCOPY) --add-gnu-debuglink=debian/lib$(package)-dbg/usr/lib/debug/usr/lib/libdb-$(bdbversion).so.debug \
84 debian/tmp/usr/lib/libdb-$(bdbversion).so
85
86 chmod 644 debian/tmp/usr/lib/*.so debian/tmp/usr/include/*.h
87@@ -175,13 +190,13 @@
88 cp -a debian/tmp/usr/bin debian/$(package)-util/usr
89 cp -a debian/tmp/usr/lib/*.so debian/tmp/usr/lib/*.a \
90 debian/tmp/usr/lib/*.la debian/lib$(package)-dev/usr/lib
91-ifeq (,$(findstring z$(DEB_BUILD_GNU_CPU)z,$(JAVA_UNSUPPORTED_CPUS)))
92-ifeq (,$(findstring z$(DEB_BUILD_GNU_SYSTEM)z,$(JAVA_UNSUPPORTED_SYSTEMS)))
93+ifeq (,$(findstring z$(DEB_HOST_GNU_CPU)z,$(JAVA_UNSUPPORTED_CPUS)))
94+ifeq (,$(findstring z$(DEB_HOST_GNU_SYSTEM)z,$(JAVA_UNSUPPORTED_SYSTEMS)))
95 cp -a debian/tmp/usr/lib/db.jar \
96 debian/lib$(package)-java/usr/share/java/lib$(package)-java-$(version).jar
97 ln -s lib$(package)-java-$(version).jar \
98 debian/lib$(package)-java/usr/share/java/lib$(package)-java.jar
99-ifneq (,$(filter $(DEB_BUILD_ARCH), $(gcj_native_archs)))
100+ifneq (,$(filter $(DEB_HOST_ARCH), $(gcj_native_archs)))
101 mkdir debian/lib$(package)-java-gcj
102 (TMPFILE=$$(mktemp --tmpdir sourcelist.XXXXXXXXXX) && \
103 find $(CURDIR) -type f ! -type l >$$TMPFILE && \
104@@ -196,8 +211,8 @@
105 mv debian/lib$(package)-dev/usr/lib/*cxx* debian/lib$(package)++-dev/usr/lib
106 mv debian/lib$(package)-dev/usr/include/*cxx* debian/lib$(package)++-dev/usr/include
107 mv debian/lib$(package)-dev/usr/lib/*tcl* debian/lib$(package)-tcl/usr/lib
108-ifeq (,$(findstring z$(DEB_BUILD_GNU_CPU)z,$(JAVA_UNSUPPORTED_CPUS)))
109-ifeq (,$(findstring z$(DEB_BUILD_GNU_SYSTEM)z,$(JAVA_UNSUPPORTED_SYSTEMS)))
110+ifeq (,$(findstring z$(DEB_HOST_GNU_CPU)z,$(JAVA_UNSUPPORTED_CPUS)))
111+ifeq (,$(findstring z$(DEB_HOST_GNU_SYSTEM)z,$(JAVA_UNSUPPORTED_SYSTEMS)))
112 mv debian/lib$(package)-dev/usr/lib/*java* debian/lib$(package)-java/usr/lib
113
114 mv debian/lib$(package)-java/usr/lib/libdb*.a \
115@@ -230,12 +245,12 @@
116 echo 'libdb $(bdbversion) lib$(package)' >debian/lib$(package)/DEBIAN/shlibs
117 echo 'libdb_cxx $(bdbversion) lib$(package)++' >debian/lib$(package)++/DEBIAN/shlibs
118 echo 'libdb_tcl $(bdbversion) lib$(package)-tcl' >debian/lib$(package)-tcl/DEBIAN/shlibs
119-ifeq (,$(findstring z$(DEB_BUILD_GNU_CPU)z,$(JAVA_UNSUPPORTED_CPUS)))
120-ifeq (,$(findstring z$(DEB_BUILD_GNU_SYSTEM)z,$(JAVA_UNSUPPORTED_SYSTEMS)))
121+ifeq (,$(findstring z$(DEB_HOST_GNU_CPU)z,$(JAVA_UNSUPPORTED_CPUS)))
122+ifeq (,$(findstring z$(DEB_HOST_GNU_SYSTEM)z,$(JAVA_UNSUPPORTED_SYSTEMS)))
123 echo 'libdb_java $(bdbversion) lib$(package)-java' >debian/lib$(package)-java/DEBIAN/shlibs
124 $(INSTALL_SCRIPT) debian/libjava.postinst debian/lib$(package)-java/DEBIAN/postinst
125
126-ifneq (,$(filter $(DEB_BUILD_ARCH), $(gcj_native_archs)))
127+ifneq (,$(filter $(DEB_HOST_ARCH), $(gcj_native_archs)))
128 $(INSTALL_SCRIPT) debian/java-gcj.postrm debian/lib$(package)-java-gcj/DEBIAN/postrm
129 $(INSTALL_SCRIPT) debian/java-gcj.postinst debian/lib$(package)-java-gcj/DEBIAN/postinst
130 endif

Subscribers

People subscribed via source and target branches

to all changes: