[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#893064: gettext: Please complete support for DEB_BUILD_PROFILES="nojava"



Source: gettext
Version: 0.19.8.1-4
Severity: wishlist
Tags: patch
User: debian-riscv@lists.debian.org
Usertags: riscv64

Hi Santiago!

When bootstrapping the riscv64 architecture we stumbled upon gettext for a
moment, because no Java SDK is available yet.

I found that the support to avoid compiling using Java dependencies was almost
there by using the "stage1" profile, and it allowed us to progress.

Still, I think that it could use some improvements to gain full support, so I
propose to include the changes in the patch attached, that are only a couple of
small but important things:

- annotating the Build-Depends in d/control with profiles

  dpkg-buildpackage and other tools know how to ignore them when building using
  these profiles, so this makes possible to not have to force to build without
  those dependencies installed (-d option in dpkg-buildpackage)

- change the name from "stage1", which is deprecated, to "nojava"

  https://wiki.debian.org/BuildProfileSpec#Registered_profile_names

  As the URL above explains, "stage1" is deprecated, and by using "nojava" one
  can use a single global profile name for many packages, when one doesn't have
  (or doesn't want to use) a Java SDK to build support.


I hope that you find it useful and worth enough to include it :)


Cheers.
--
Manuel A. Fernandez Montecelo <mafm@debian.org>
>From 6649d4117ce3a64ce550d702a93a8d9c5fdc48ed Mon Sep 17 00:00:00 2001
From: "Manuel A. Fernandez Montecelo" <manuel.montezelo@gmail.com>
Date: Fri, 16 Mar 2018 02:13:59 +0100
Subject: [PATCH] Add support for DEB_BUILD_PROFILES="nojava", replace "stage1"

---
 debian/changelog | 13 +++++++++++++
 debian/control   |  2 +-
 debian/rules     |  4 ++--
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 84b6bb2..36ebc77 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+gettext (0.19.8.1-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add support for DEB_BUILD_PROFILES="nojava", replace "stage1"
+    (Closes: #-1)
+    - Replace "stage1" with "nojava" in d/rules, since "stage1" is only
+      about Java support and deprecated, and "nojava" is one of the standard
+      profiles
+    - Annotate Java-related build-dependencies in d/control to avoid them
+      when using the new profile
+
+ -- Manuel A. Fernandez Montecelo <mafm@debian.org>  Fri, 16 Mar 2018 01:50:02 +0100
+
 gettext (0.19.8.1-4) unstable; urgency=medium
 
   * Avoid extraneous NUL bytes in .mo files. Closes: #872869.
diff --git a/debian/control b/debian/control
index 79744b4..d4e4dbc 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: devel
 Priority: optional
 Maintainer: Santiago Vila <sanvila@debian.org>
 Standards-Version: 3.9.6
-Build-Depends: g++ (>= 4:7), debhelper (>= 9), fastjar, default-jdk, file, libncurses5-dev, libxml2-dev, libglib2.0-dev, libcroco3-dev, xz-utils, libunistring-dev
+Build-Depends: g++ (>= 4:7), debhelper (>= 9), fastjar <!nojava>, default-jdk <!nojava>, file, libncurses5-dev, libxml2-dev, libglib2.0-dev, libcroco3-dev, xz-utils, libunistring-dev
 Homepage: http://www.gnu.org/software/gettext/
 
 Package: gettext-base
diff --git a/debian/rules b/debian/rules
index d78afb6..2036bd1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -115,7 +115,7 @@ gettext-base: build
 	fi
 	find debian/$@/usr/share/locale | grep gettext-tools | xargs rm
 ifeq (,$(findstring %$(DEB_HOST_ARCH)%,$(NOJAVA_ARCHS)))
-ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
+ifeq ($(filter nojava,$(DEB_BUILD_PROFILES)),)
 	install -d debian/$@/usr/share/java
 	cp -p debian/tmp/usr/share/gettext/libintl.jar \
 		debian/$@/usr/share/java
@@ -134,7 +134,7 @@ gettext: build
 	cp -a debian/tmp/usr/share/gettext* debian/$@/usr/share
 	rm -f debian/$@/usr/share/gettext/libintl.jar
 ifeq (,$(findstring %$(DEB_HOST_ARCH)%,$(NOJAVA_ARCHS)))
-ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
+ifeq ($(filter nojava,$(DEB_BUILD_PROFILES)),)
 	mv debian/$@/usr/share/gettext/gettext.jar debian/$@/usr/share/java
 endif
 endif
-- 
2.16.2


Reply to: