[med-svn] [Git][med-team/g2][master] 7 commits: d/clean: new: cleanup leftover build artifacts.

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Sat Dec 30 18:42:01 GMT 2023



Étienne Mollier pushed to branch master at Debian Med / g2


Commits:
0e5b5b4b by Étienne Mollier at 2023-12-30T18:04:56+01:00
d/clean: new: cleanup leftover build artifacts.

- - - - -
644f3e24 by Étienne Mollier at 2023-12-30T18:06:05+01:00
d/rules: remove now unneeded dh_auto_clean override.

- - - - -
4dfbaa9b by Étienne Mollier at 2023-12-30T18:06:05+01:00
d/rules: preserve autoreconfigured files.

Closes: #1044956

- - - - -
8faab0bf by Étienne Mollier at 2023-12-30T18:12:13+01:00
d/control: declare compliance to standards version 4.6.2.

- - - - -
0f92354a by Étienne Mollier at 2023-12-30T18:36:27+01:00
d/rules: inject CPPFLAGS.

This fixes latent failure to fortify library functions.

- - - - -
0dfc64ae by Étienne Mollier at 2023-12-30T19:39:08+01:00
typo.patch: new: fix typos caught by lintian.

- - - - -
cd5bb6f1 by Étienne Mollier at 2023-12-30T19:41:23+01:00
ready to upload to unstable.

- - - - -


6 changed files:

- debian/changelog
- + debian/clean
- debian/control
- debian/patches/series
- + debian/patches/typo.patch
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,16 @@
+g2 (0.72-12) unstable; urgency=medium
+
+  * Team upload.
+  * d/clean: new: cleanup leftover build artifacts.
+  * d/rules: remove now unneeded dh_auto_clean override.
+  * d/rules: preserve autoreconfigured files. (Closes: #1044956)
+  * d/control: declare compliance to standards version 4.6.2.
+  * d/rules: inject CPPFLAGS.
+    This fixes latent failure to fortify library functions.
+  * typo.patch: new: fix typos caught by lintian.
+
+ -- Étienne Mollier <emollier at debian.org>  Sat, 30 Dec 2023 19:39:27 +0100
+
 g2 (0.72-11) unstable; urgency=medium
 
   * Fix watch file


=====================================
debian/clean
=====================================
@@ -0,0 +1,2 @@
+lib*.a
+lib*.so*


=====================================
debian/control
=====================================
@@ -10,7 +10,7 @@ Build-Depends: debhelper-compat (= 13),
                libgd-dev,
                perl-xs-dev,
                xutils-dev
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/med-team/g2
 Vcs-Git: https://salsa.debian.org/med-team/g2.git
 Homepage: https://github.com/danielrmeyer/g2/


=====================================
debian/patches/series
=====================================
@@ -5,3 +5,4 @@ do_not_remove_files_from_orig_source.diff
 fix_pod2man_errors.diff
 fix_linker_libs.diff
 hardening.patch
+typo.patch


=====================================
debian/patches/typo.patch
=====================================
@@ -0,0 +1,48 @@
+Description: fix typos caught by lintian.
+Author: Étienne Mollier <emollier at debian.org>
+Forwarded: no
+Last-Update: 2023-12-30
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- g2.orig/src/X11/g2_X11.c
++++ g2/src/X11/g2_X11.c
+@@ -221,7 +221,7 @@
+ 	    fputs("g2(OpenXX): bitmap file invalid\n",stderr);
+ 	    break;
+ 	  case BitmapNoMemory:
+-	    fputs("g2(OpenXX): no enough memeory for bitmap\n",stderr);
++	    fputs("g2(OpenXX): no enough memory for bitmap\n",stderr);
+ 	    break;
+ 	}
+     } else {					  /* no icon data avail. */
+--- g2.orig/README
++++ g2/README
+@@ -40,7 +40,7 @@
+ written in Ansi-C. This library provides a comprehensive set of
+ functions for simultaneous generation of graphical output on different
+ types of devices. Presently, following devices are currently supported
+-by g2: X11, gd (PNG, JPEG), PostScript (xfig and Win32 are in developement).
++by g2: X11, gd (PNG, JPEG), PostScript (xfig and Win32 are in development).
+ One major feature of the g2_library is the concept of virtual devices. An
+ arbitrary number of physical devices (such as PNG, or X11) can be
+ grouped to create a so-called virtual device. Commands sent to such a
+--- g2.orig/TODO
++++ g2/TODO
+@@ -4,5 +4,5 @@
+ - finish xfig support
+ - test (and add) Fortran interface on more platforms
+ - new devices (e.g. PNG, JPG, etc.)
+-- documentation for developement of new devices
++- documentation for development of new devices
+ 
+--- g2.orig/g2_perl/G2.pm
++++ g2/g2_perl/G2.pm
+@@ -74,7 +74,7 @@
+ This library provides a comprehensive set of functions for
+ simultaneous generation of graphical output on different types of devices.
+ Presently, following devices are currently supported by g2: X11, PNG,
+-PostScript (xfig is in developement).
++PostScript (xfig is in development).
+ One major feature of the g2_library is the concept of virtual devices. An
+ arbitrary number of physical devices (such as PNG, or X11) can be grouped to
+ create a so-called virtual device. Commands sent to such a virtual devices


=====================================
debian/rules
=====================================
@@ -26,16 +26,29 @@ rversion:=$(shell head -n 1 CHANGES | \
 major:=$(shell head -n 1 CHANGES | \
  awk '{if (match($$0,/^[0-9]+/)) print substr($$0,RSTART,RLENGTH)}')
 
-override_dh_auto_clean:
-	dh_auto_clean
-	rm -f libg*.a lib*.so.0
+# Locate autogenerated files that may need preservation.
+infiles:=$(shell \
+	find $(CURDIR) -name '*.in' \
+	| sed 's/\.in//' \
+	| xargs -I'{}' sh -c 'test ! -e {} || echo {}' \
+)
+
+execute_before_dh_autoreconf:
+	# Preserve files that will be regenerated from .in files.
+	set -e $(foreach infile,$(infiles),; cp -v $(infile) $(infile).orig)
 
 override_dh_auto_build:
 	$(MAKE) depend
-	$(MAKE) libg2.a DEBCFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
+	$(MAKE) libg2.a DEBCFLAGS="$(CPPFLAGS) $(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 	# clean up and build the shared lib
 	-rm -f src/*.o src/*/*.o
-	$(MAKE) PICFLAG="-fPIC" RVERSION=$(rversion) MVERSION=$(major) DEBCFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" shared
+	$(MAKE) \
+		PICFLAG="-fPIC" \
+		RVERSION=$(rversion) \
+		MVERSION=$(major) \
+		DEBCFLAGS="$(CPPFLAGS) $(CFLAGS)" \
+		LDFLAGS="$(LDFLAGS)" \
+		shared
 	dh_auto_configure --sourcedirectory=g2_perl -- LIBS="-L$(CURDIR) -lg2"
 	$(MAKE) -C ./g2_perl LD_RUN_PATH=""
 
@@ -43,3 +56,10 @@ override_dh_auto_install:
 	$(MAKE) RVERSION=$(rversion) MVERSION=$(major) install prefix=$(CURDIR)/debian/libg2-dev
 	mv $(CURDIR)/debian/$(pkgdev)/usr/lib/lib*.so.0* $(CURDIR)/debian/$(pkglib)/usr/lib
 	$(MAKE) -C ./g2_perl install DESTDIR=$(CURDIR)/debian/libg2$(major)-perl
+
+execute_after_dh_auto_clean:
+	# Restore files that were erased by previous autoreconfiguration.
+	set -e $(foreach infile,$(infiles), \
+		; test ! -e $(infile).orig \
+		|| mv -v $(infile).orig $(infile) \
+	)



View it on GitLab: https://salsa.debian.org/med-team/g2/-/compare/0ce94e5a6147df995da542da088d36bdef6514f4...cd5bb6f1dbbcd2334bfe616d72da2980cf99916e

-- 
View it on GitLab: https://salsa.debian.org/med-team/g2/-/compare/0ce94e5a6147df995da542da088d36bdef6514f4...cd5bb6f1dbbcd2334bfe616d72da2980cf99916e
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231230/49ceee78/attachment-0001.htm>


More information about the debian-med-commit mailing list