Source: astyle Version: 3.1-2 Severity: important Tags: patch Hi,
astyle currently cannot be built on architectures that do not have Java (so default-jdk is not installable); since the Java bindings are optional, it is possible to build astyle without them on those architectures. Attached there is a patch to do this. Sadly there is no "negative architectures" in the list of architectures of a package, so the drawbacks are: - the hardcoded list of architectures without Java, for the default-jdk build dependency - the hardcoded list of architectures with Java, for the libastylej-jni package Thanks, -- Pino
--- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: astyle Section: devel Priority: optional -Build-Depends: debhelper (>= 11), default-jdk, dh-exec (>= 0.3), cmake +Build-Depends: debhelper (>= 11), default-jdk [!hppa !hurd-i386 !kfreebsd-any], dh-exec (>= 0.3), cmake Maintainer: Matteo Cypriani <m...@lm7.fr> Uploaders: Margarita Manterola <ma...@debian.org> Standards-Version: 4.1.5 @@ -45,7 +45,7 @@ Package: libastylej-jni Section: java -Architecture: any +Architecture: alpha amd64 arm64 armel armhf i386 ia64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64 x32 Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends} Description: Java JNI library for Artistic Style --- a/debian/rules +++ b/debian/rules @@ -7,12 +7,19 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk +include /usr/share/dpkg/architecture.mk # Avoid unneeded library dependencies LDFLAGS += -Wl,--as-needed +ifneq (,$(filter libastylej-jni,$(shell dh_listpackages))) + EXTRA_CONFIGURE_ARGS += -DBUILD_JAVA_LIBS=on +else + EXTRA_CONFIGURE_ARGS += -DBUILD_JAVA_LIBS=off +endif + %: dh $@ override_dh_auto_configure: - dh_auto_configure -- -DBUILD_JAVA_LIBS=on -DBUILD_SHARED_LIBS=on + dh_auto_configure -- -DBUILD_SHARED_LIBS=on $(EXTRA_CONFIGURE_ARGS)