Source: swig2.0
Version: 2.0.12-1
Severity: wishlist
Tags: patch

Hi,

First of all, thanks for taking care of SWIG in Debian!

I came across it as part of my work on this year's "Bootstrappable
Debian" Google Summer of Code project.  The goal of the project is to
figure out ways to modify packages, possibly using the new build
profiles mechanism, in order to resolve circular build dependencies as
described on the http://bootstrap.debian.net/amd64/ pages.  SWIG came up
because it's present in the "Feedback Arc Set" listed there, and because
the version-specific pages linked to from
http://bootstrap.debian.net/source/swig2.0.html suggested that it might
be advisable to remove the build dependency on default-jdk, since that
would solve several dependency loops in one fell swoop.

To my great surprise, when I tried building the swig2.0 packages with
B-D: default-jdk removed and "with_java" set to something else in the
rules file, it turned out that SWIG builds just fine, and that there are
absolutely no differences, none at all, in the generated binary
packages.  As it happens, the SWIG configure script checks for Java, but
then nothing ever uses the values, nothing builds anything Java-related,
nothing even writes the values to installed files.

So what do you think about the attached trivial patch that, perhaps
temporarily, drops the Java build dependency and disables the Java
checks during the build?  Of course, if in the future SWIG decides to
actually use Java, we may have to revisit this - but for the present it
would help bootstrapping Debian on new architectures by easily removing
a build dependency loop without any adverse effects at all.

Thanks again for your work on SWIG and Debian in general!

G'luck,
Peter

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- 
Peter Pentchev  [email protected] [email protected] [email protected]
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
From 94ccf803abb3a299d1ca3181b388e65bd2b12f37 Mon Sep 17 00:00:00 2001
From: Peter Pentchev <[email protected]>
Date: Sat, 28 Jun 2014 01:55:34 +0300
Subject: [PATCH] Remove the unused default-jdk build dependency.

The SWIG build does not ever use the Java compiler that the configure
script checks for.  The checks are there, the various Makefile.in files
set the variables to the values obtained by the configure script, but
nothing ever uses them.

This fixes a circular build dependency as noted in the version-specific
pages linked to from http://bootstrap.debian.net/source/swig2.0.html
---
 debian/control | 1 -
 debian/rules   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 2e97484..3a96284 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,6 @@ Build-Depends: dpkg-dev (>= 1.16.1~),
                bison,
                debhelper (>= 7.0),
                dh-autoreconf,
-               default-jdk [!hppa !mips !mipsel !alpha !arm !hurd-i386],
                guile-2.0-dev,
                libchicken-dev [!m68k !mips !mipsel],
                libperl-dev,
diff --git a/debian/rules b/debian/rules
index 02f0d21..5f53c97 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,7 +29,7 @@ CONFIGURE_ARGS := \
 
 DEB_TARGET_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
-with_java := yes
+with_java := not used during the build at all
 no_java_archs := hppa hurd-i386 mips mipsel netbsd-i386
 ifneq ($(DEB_TARGET_ARCH),i386)
   ifeq ($(DEB_TARGET_ARCH), $(findstring $(DEB_TARGET_ARCH),$(no_java_archs)))
-- 
2.0.0

Attachment: signature.asc
Description: Digital signature

Reply via email to