Source: gettext
Version: 0.21-4
Severity: important
Tags: patch

Hi,
Currently gettext Build-Depends on dh-elpa (which Depends on emacs) and
default-jdk, so architectures that lack one or more of emacs and openjdk
are unable to build gettext (whilst there is now a nojava build profile,
that does not help autobuilding where all builds are done without any
build profiles). I have attached a patch which (a) moves dh-elpa to
Build-Depends-Indep as it's only needed for gettext-el (b) adds
architecture restriction lists to the java build dependencies based on
the list of supported architectures in the latest openjdk. Please
consider applying and uploading this soon, since after the libcroco3
removal gettext is no longer installable on many ports architectures and
is not able to be rebuilt due to the issues addressed in this patch.

Thanks,
Jess
diff -Nru gettext-0.21/debian/changelog gettext-0.21/debian/changelog
--- gettext-0.21/debian/changelog       2021-02-02 21:35:00.000000000 +0000
+++ gettext-0.21/debian/changelog       2021-02-04 02:38:53.000000000 +0000
@@ -1,3 +1,13 @@
+gettext (0.21-4+jrtc27.1) UNRELEASED; urgency=medium
+
+  * Move dh-elpa build dependency to Build-Depends-Indep and adjust
+    debian/rules to only pass --with elpa when available.
+  * Restrict default-jdk and maven-repo-helper build dependencies to
+    architectures that support Java, and adjust debian/rules,
+    debian/gettext.install and debian/not-installed appropriately.
+
+ -- Jessica Clarke <[email protected]>  Thu, 04 Feb 2021 02:38:53 +0000
+
 gettext (0.21-4) unstable; urgency=medium
 
   * Drop versioned build-dependency on g++ as it holds in stable.
diff -Nru gettext-0.21/debian/control gettext-0.21/debian/control
--- gettext-0.21/debian/control 2021-02-02 20:00:00.000000000 +0000
+++ gettext-0.21/debian/control 2021-02-04 02:38:53.000000000 +0000
@@ -3,7 +3,19 @@
 Priority: optional
 Maintainer: Santiago Vila <[email protected]>
 Standards-Version: 4.5.1
-Build-Depends: debhelper-compat (= 13), dh-exec (>= 0.13), dh-elpa, bison, 
file, help2man, xz-utils, default-jdk <!nojava>, maven-repo-helper <!nojava>, 
libunistring-dev, libxml2-dev, groff
+Build-Depends:
+ debhelper-compat (= 13),
+ dh-exec (>= 0.13),
+ bison,
+ file,
+ help2man,
+ xz-utils,
+ default-jdk [alpha amd64 arm64 armel armhf i386 ia64 m68k mips mips64 
mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390x sh4 sparc sparc64 x32] 
<!nojava>,
+ maven-repo-helper [alpha amd64 arm64 armel armhf i386 ia64 m68k mips mips64 
mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390x sh4 sparc sparc64 x32] 
<!nojava>,
+ libunistring-dev,
+ libxml2-dev,
+ groff
+Build-Depends-Indep: dh-elpa
 Homepage: https://www.gnu.org/software/gettext/
 Rules-Requires-Root: no
 
diff -Nru gettext-0.21/debian/gettext.install 
gettext-0.21/debian/gettext.install
--- gettext-0.21/debian/gettext.install 2021-02-02 20:00:00.000000000 +0000
+++ gettext-0.21/debian/gettext.install 2021-02-04 02:38:53.000000000 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/dh-exec --with-scripts=filter-build-profiles
+#! /usr/bin/dh-exec --with-scripts=filter-arch,filter-build-profiles
 
 usr/bin/gettextize
 usr/bin/msgattrib
@@ -34,8 +34,8 @@
 usr/share/gettext/config.rpath
 usr/share/gettext/gettext.h
 usr/share/gettext/msgunfmt.tcl
-<!nojava> usr/share/gettext/gettext.jar usr/share/java
-<!nojava> usr/share/gettext/javaversion.class
+[alpha amd64 arm64 armel armhf i386 ia64 m68k mips mips64 mips64el mipsel 
powerpc powerpcspe ppc64 ppc64el s390x sh4 sparc sparc64 x32] <!nojava> 
usr/share/gettext/gettext.jar usr/share/java
+[alpha amd64 arm64 armel armhf i386 ia64 m68k mips mips64 mips64el mipsel 
powerpc powerpcspe ppc64 ppc64el s390x sh4 sparc sparc64 x32] <!nojava> 
usr/share/gettext/javaversion.class
 
 usr/share/gettext/po/
 usr/share/gettext/projects/
diff -Nru gettext-0.21/debian/not-installed gettext-0.21/debian/not-installed
--- gettext-0.21/debian/not-installed   2021-02-02 20:00:00.000000000 +0000
+++ gettext-0.21/debian/not-installed   2021-02-04 02:38:53.000000000 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/dh-exec --with-scripts=filter-build-profiles
+#! /usr/bin/dh-exec --with-scripts=filter-arch,filter-build-profiles
 
 # .la files are to be discarded per policy x.y.z;
 # .so files will be regenerated at install time
@@ -22,5 +22,5 @@
 usr/share/gettext/libintl.jar
 
 # not installed under nojava profile
-<nojava> usr/share/gettext/gettext.jar
-<nojava> usr/share/gettext/javaversion.class
+[!alpha !amd64 !arm64 !armel !armhf !i386 !ia64 !m68k !mips !mips64 !mips64el 
!mipsel !powerpc !powerpcspe !ppc64 !ppc64el !s390x !sh4 !sparc !sparc64 !x32] 
<nojava> usr/share/gettext/gettext.jar
+[!alpha !amd64 !arm64 !armel !armhf !i386 !ia64 !m68k !mips !mips64 !mips64el 
!mipsel !powerpc !powerpcspe !ppc64 !ppc64el !s390x !sh4 !sparc !sparc64 !x32] 
<nojava> usr/share/gettext/javaversion.class
diff -Nru gettext-0.21/debian/rules gettext-0.21/debian/rules
--- gettext-0.21/debian/rules   2021-02-02 20:00:00.000000000 +0000
+++ gettext-0.21/debian/rules   2021-02-04 02:38:53.000000000 +0000
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 %:
-       dh $@ --with elpa $(WITH_MAVEN)
+       dh $@ $(WITH_ELPA) $(WITH_MAVEN)
 
 
 #
@@ -13,9 +13,15 @@
   --disable-rpath \
   --without-emacs
 
+ifneq (,$(filter elpa,$(shell dh -l)))
+  WITH_ELPA = --with elpa
+endif
+
+ifneq (,$(filter maven-repo-helper,$(shell dh -l)))
 ifeq (,$(filter nojava,$(DEB_BUILD_PROFILES)))
   WITH_MAVEN = --with maven-repo-helper
 endif
+endif
 
 # On emulated m68k and sh4 targets, OpenMP can cause lockups,
 # we therefore disable it for the time being.

Reply via email to