[Debian-med-packaging] Bug#947990: gdcm: Doesn't build on ports without java

Samuel Thibault sthibault at debian.org
Fri Jan 3 02:20:04 GMT 2020


Source: gdcm
Version: 3.0.4-2
Severity: important
Tags: patch
User: debian-hurd at lists.debian.org
Usertags: hurd

Hello,

gdcm currently doesn't build on ports without java support. The attached
patch fix that: it disables the default-jdk and libvtk7-java build-deps
on non-java ports, they enable the lib*-java packages only on java
ports, and pass -DGDCM_WRAP_JAVA:BOOL=ON to configure only on java
ports.

Samuel

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'proposed-updates'), (500, 'oldstable-proposed-updates-debug'), (500, 'oldstable-proposed-updates'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Samuel
    if (argc > 1 && strcmp(argv[1], "-advice") == 0) {
	printf("Don't Panic!\n");
	exit(42);
    }
	-- Arnold Robbins in the LJ of February '95, describing RCS
-------------- next part --------------
--- debian/control.original	2020-01-02 12:40:16.000000000 +0000
+++ debian/control	2020-01-03 01:10:28.000000000 +0000
@@ -7,7 +7,7 @@
  Gert Wollny <gewo at debian.org> 
 Build-Depends: cmake (>= 2.8.9),
                debhelper (>= 11),
-	       default-jdk,
+	       default-jdk [!hppa !hurd-any !kfreebsd-any],
                dh-strip-nondeterminism, 
                dh-python, 
 	       python3-dev,
@@ -20,7 +20,7 @@
 	       libvtk7-dev,
 	       libcharls-dev (>= 1.1.0),
 	       libopenjp2-7-dev,
-	       libvtk7-java,
+	       libvtk7-java [!hppa !hurd-any !kfreebsd-any],
 	       libxml2-dev,
 	       libjson-c-dev,
 	       libpoppler-private-dev,
@@ -194,7 +194,7 @@
 
 Package: libgdcm-java
 Section: java
-Architecture: any
+Architecture: amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x alpha ia64 m68k powerpc ppc64 riscv64 sh4 sparc64 x32
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${java:Depends}
 Suggests: java-virtual-machine
 Description: Grassroots DICOM Java bindings
@@ -207,7 +207,7 @@
 
 Package: libvtkgdcm-java
 Section: java
-Architecture: any
+Architecture: amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x alpha ia64 m68k powerpc ppc64 riscv64 sh4 sparc64 x32
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${java:Depends}, libgdcm3.0 (= ${binary:Version})
 Suggests: libgdcm-java
 Description: Grassroots DICOM VTK Java bindings
--- debian/rules.original	2020-01-02 12:41:11.000000000 +0000
+++ debian/rules	2020-01-02 12:43:55.000000000 +0000
@@ -28,10 +28,15 @@
 export LD_LIBRARY_PATH
 
 DEFAULT_JAVA_VERSION=1.8
-ifeq ($(DEB_BUILD_ARCH),$(filter $(DEB_BUILD_ARCH),hppa hurd-i386))
-  DEFAULT_JAVA_VERSION=1.5
+ifeq ($(DEB_BUILD_ARCH),$(filter $(DEB_BUILD_ARCH),hppa hurd-i386 kfreebsd-i386 kfreebsd-amd64))
+  DEFAULT_JAVA_VERSION=
 endif 
 
+ifneq ($(DEFAULT_JAVA_VERSION),)
+CMAKE_EXTRA_FLAGS += -DGDCM_WRAP_JAVA:BOOL=ON \
+                     -DGDCM_DEFAULT_JAVA_VERSION:STRING=$(DEFAULT_JAVA_VERSION)
+endif
+
 # set JAVA path on arm, doesn't seem to find it otherwise
 ifeq ($(DEB_BUILD_ARCH),$(filter $(DEB_BUILD_ARCH),armhf armel arm64 powerpc ppc64el))
 export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-$(DEB_BUILD_ARCH)
@@ -65,8 +70,6 @@
 		-DGDCM_BUILD_SHARED_LIBS:BOOL=ON \
 		-DGDCM_WRAP_PYTHON:BOOL=ON \
 		-DGDCM_WRAP_CSHARP:BOOL=$(DEB_WRAP_CSHARP) \
-		-DGDCM_WRAP_JAVA:BOOL=ON \
-		-DGDCM_DEFAULT_JAVA_VERSION:STRING=$(DEFAULT_JAVA_VERSION) \
 		-DGDCM_WRAP_PHP:BOOL=OFF \
 		-DGDCM_USE_PVRG:BOOL=ON \
 		-DGDCM_USE_SYSTEM_PVRG:BOOL=ON \


More information about the Debian-med-packaging mailing list