--- Begin Message ---
Source: ruby1.8
Version: 1.8.7.358-8
Severity: normal
Tags: patch
Dear Maintainer,
We plan to add multiarch capabilities to the Debian Tcl/Tk packages before
jessie release. The changed packages are in experimental already, so everyone
can play with them.
Unfortunately, current ruby1.8 FTBFS with new Tcl/Tk packages. It can't
correctly process /usr/lib/tclConfig.sh and /usr/lib/tkConfig.sh. In fact it
parses them, but in experimental they don't contain anything useful, they just
source real ones from /usr/lib/<triplet>/tcl<version>/tclConfig.sh and similar
for Tk (see [1] for build log).
After pointing Ruby to the correct files another problem arose: for some
reason it tried to link Tcl library statically. I don't fully understand why,
but I've changed the logic if choosing static build in extconf.rb and after
that build became fine.
Attached is a patch which fixes the build against new multiarchified Tcl/Tk
but breaks the build against the old one.
[1]
http://sgolovan.nes.ru/debian-tcltk/build-failures/ruby1.8_1.8.7.358-8.dsc.log.gz
-- System Information:
Debian Release: 7.1
APT prefers proposed-updates
APT policy: (500, 'proposed-updates'), (500, 'stable'), (100, 'unstable'),
(1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru ruby1.8-1.8.7.358/debian/changelog ruby1.8-1.8.7.358/debian/changelog
--- ruby1.8-1.8.7.358/debian/changelog 2013-09-11 06:10:11.000000000 +0400
+++ ruby1.8-1.8.7.358/debian/changelog 2013-10-01 15:15:05.000000000 +0400
@@ -1,3 +1,12 @@
+ruby1.8 (1.8.7.358-8.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Fixed FTBFS due to multiarcifying Tcl/Tk (Ruby configure script doesn't
+ source tclConfig.sh and tkConfig.sh, but parses them, and their old
+ location is unusable for that).
+
+ -- Sergei Golovan <[email protected]> Tue, 01 Oct 2013 15:15:03 +0400
+
ruby1.8 (1.8.7.358-8) unstable; urgency=low
* This is hopefully the last upload ever of ruby1.8
diff -Nru ruby1.8-1.8.7.358/debian/control ruby1.8-1.8.7.358/debian/control
--- ruby1.8-1.8.7.358/debian/control 2013-09-11 06:09:50.000000000 +0400
+++ ruby1.8-1.8.7.358/debian/control 2013-10-01 15:11:29.000000000 +0400
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: akira yamada <[email protected]>
Uploaders: Daigo Moriwaki <[email protected]>, Lucas Nussbaum <[email protected]>, Antonio Terceiro <[email protected]>
-Build-Depends: cdbs (>= 0.4.106), debhelper (>= 5), autotools-dev, autoconf, m4, quilt (>= 0.40), patch, bison, binutils (>= 2.14.90.0.7), libgdbm-dev, libncurses5-dev, libreadline-gplv2-dev, tcl-dev, tk-dev, zlib1g-dev, libssl-dev (>= 0.9.6b), file, coreutils (>= 7.5), gcc-4.6
+Build-Depends: cdbs (>= 0.4.106), debhelper (>= 5), autotools-dev, autoconf, m4, quilt (>= 0.40), patch, bison, binutils (>= 2.14.90.0.7), libgdbm-dev, libncurses5-dev, libreadline-gplv2-dev, tcl-dev, tk-dev, zlib1g-dev, libssl-dev (>= 0.9.6b), file, coreutils (>= 7.5), gcc-4.6, dpkg-dev (>= 1.16.0)
Standards-Version: 3.9.2
Homepage: http://www.ruby-lang.org/
Vcs-Git: git://git.debian.org/collab-maint/ruby1.8.git
diff -Nru ruby1.8-1.8.7.358/debian/patches/series ruby1.8-1.8.7.358/debian/patches/series
--- ruby1.8-1.8.7.358/debian/patches/series 2013-08-07 15:49:22.000000000 +0400
+++ ruby1.8-1.8.7.358/debian/patches/series 2013-10-01 16:13:01.000000000 +0400
@@ -16,3 +16,4 @@
CVE-2012-4481.patch
CVE-2013-1821.patch
CVE-2013-4073.patch
+tcltk-shared-build.patch
diff -Nru ruby1.8-1.8.7.358/debian/patches/tcltk-shared-build.patch ruby1.8-1.8.7.358/debian/patches/tcltk-shared-build.patch
--- ruby1.8-1.8.7.358/debian/patches/tcltk-shared-build.patch 1970-01-01 03:00:00.000000000 +0300
+++ ruby1.8-1.8.7.358/debian/patches/tcltk-shared-build.patch 2013-10-01 16:03:57.000000000 +0400
@@ -0,0 +1,24 @@
+--- a/ext/tk/extconf.rb
++++ b/ext/tk/extconf.rb
+@@ -601,8 +601,8 @@
+ $INCFLAGS = incflags.dup << " " << tclconf["TCL_INCLUDE_SPEC"]
+ #puts "check #{file} #{$1} #{tclfunc} #{tcldir}"
+ #find_library($1, tclfunc, tcldir)
+- if (tclconf && tclconf["TCL_SHARED_BUILD"] == "0") ||
+- (ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) || ext == "a"
++ if (tclconf && tclconf["TCL_SHARED_BUILD"] == "0") &&
++ ((ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) || ext == "a")
+ # static link
+ tcllibs = $libs + " -DSTATIC_BUILD " + file.quote
+
+@@ -644,8 +644,8 @@
+ begin
+ #puts "check #{file} #{$1} #{tkfunc} #{tkdir}"
+ # find_library($1, tkfunc, tkdir)
+- if (tkconf && tkconf["TCL_SHARED_BUILD"] == "0") ||
+- (ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) || ext == "a"
++ if (tkconf && tkconf["TK_SHARED_BUILD"] == "0") &&
++ ((ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) || ext == "a")
+ # static link
+ tklibs = " -DSTATIC_BUILD " + file.quote
+
diff -Nru ruby1.8-1.8.7.358/debian/rules ruby1.8-1.8.7.358/debian/rules
--- ruby1.8-1.8.7.358/debian/rules 2013-08-07 15:49:22.000000000 +0400
+++ ruby1.8-1.8.7.358/debian/rules 2013-10-01 16:12:22.000000000 +0400
@@ -1,7 +1,6 @@
#!/usr/bin/make -f
ruby_ver = 1.8
-tcltk_ver = 8.4
arch_name = $(subst linux-gnu,linux-,$(patsubst %linux-gnu,%linux,$(DEB_BUILD_GNU_TYPE)))
ruby_libdir = usr/lib/ruby/$(ruby_ver)
@@ -9,6 +8,8 @@
bin_dir = usr/bin
man_dir = usr/share/man/man1
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
el_etc = etc/emacs/site-start.d
examples_dir = $(CURDIR)/debian/ruby$(ruby_ver)-examples/usr/share/doc/ruby$(ruby_ver)-examples/examples
@@ -52,9 +53,8 @@
DEB_CONFIGURE_USER_FLAGS += --with-sitedir='/usr/local/lib/site_ruby'
DEB_CONFIGURE_USER_FLAGS += --with-default-kcode=none
DEB_CONFIGURE_USER_FLAGS += --with-dbm-type=gdbm_compat
-DEB_CONFIGURE_USER_FLAGS += --with-tklib=tk$(tcltk_ver)
-DEB_CONFIGURE_USER_FLAGS += --with-tcllib=tcl$(tcltk_ver)
-DEB_CONFIGURE_USER_FLAGS += --with-tcl-include=/usr/include/tcl$(tcltk_ver)
+DEB_CONFIGURE_USER_FLAGS += --with-tclConfig-dir=/usr/lib/$(DEB_HOST_MULTIARCH)
+DEB_CONFIGURE_USER_FLAGS += --with-tkConfig-dir=/usr/lib/$(DEB_HOST_MULTIARCH)
DEB_CONFIGURE_USER_FLAGS += --with-bundled-sha1
DEB_CONFIGURE_USER_FLAGS += --with-bundled-md5
DEB_CONFIGURE_USER_FLAGS += --with-bundled-rmd160
--- End Message ---