[med-svn] [Git][med-team/wtdbg2][master] 4 commits: d/rules: repair double source builds.

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Sat May 4 19:06:32 BST 2024



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


Commits:
2ec950cd by Étienne Mollier at 2024-05-04T19:54:11+02:00
d/rules: repair double source builds.

This involved cleaning up traces of CPU flag specific builds, in the
context of SIMDe builds.  This also involved preserving a number of
files affected by sed commands doing a wealth of changes on a number
of files.  Lists of binaries and CPU flags involved in the cleanup
process could be reused to simplify a bit the build procedure.

Closes: #1045984

- - - - -
6b3e9143 by Étienne Mollier at 2024-05-04T19:58:47+02:00
d/control: declare compliance to standards version 4.7.0.

- - - - -
cab4ea1c by Étienne Mollier at 2024-05-04T19:59:32+02:00
d/control: add myself to uploaders.

- - - - -
34f18ba8 by Étienne Mollier at 2024-05-04T20:05:29+02:00
ready to upload to unstable.

- - - - -


3 changed files:

- debian/changelog
- debian/control
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,17 @@
+wtdbg2 (2.5-10) unstable; urgency=medium
+
+  * d/rules: repair double source builds.
+    This involved cleaning up traces of CPU flag specific builds, in the
+    context of SIMDe builds.  This also involved preserving a number of
+    files affected by sed commands doing a wealth of changes on a number
+    of files.  Lists of binaries and CPU flags involved in the cleanup
+    process could be reused to simplify a bit the build procedure.
+    (Closes: #1045984)
+  * d/control: declare compliance to standards version 4.7.0.
+  * d/control: add myself to uploaders.
+
+ -- Étienne Mollier <emollier at debian.org>  Sat, 04 May 2024 19:59:44 +0200
+
 wtdbg2 (2.5-9) unstable; urgency=medium
 
   * Set  Architecture: amd64  since this seems to be the only architecture


=====================================
debian/control
=====================================
@@ -1,12 +1,13 @@
 Source: wtdbg2
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Andreas Tille <tille at debian.org>
+Uploaders: Andreas Tille <tille at debian.org>,
+           Étienne Mollier <emollier at debian.org>
 Section: science
 Priority: optional
 Build-Depends: debhelper-compat (= 13),
                zlib1g-dev,
                libsimde-dev
-Standards-Version: 4.6.1
+Standards-Version: 4.7.0
 Vcs-Browser: https://salsa.debian.org/med-team/wtdbg2
 Vcs-Git: https://salsa.debian.org/med-team/wtdbg2.git
 Homepage: https://github.com/ruanjue/wtdbg2


=====================================
debian/rules
=====================================
@@ -14,21 +14,26 @@ export LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
 
 prefix=$(CURDIR)/debian/$(DEB_SOURCE)/usr
 libexecdir=$(prefix)/lib/$(DEB_SOURCE)
+BINARIES=kbm2 wtdbg2 wtdbg-cns wtpoa-cns pgzf
+AMD64_FLAGS=avx2 avx sse4.1 ssse3 sse3 sse2
+I386_FLAGS=sse2 sse mmx
 
 %:
 	dh $@
 
 override_dh_auto_build:
-	sed -i 's/\/usr\/bin\/env perl/\/usr\/bin\/perl/' scripts/*
-	sed -i 's/memeory/memory/' *.c *.h *.md
-	sed -i 's/automaticly/automatically/' *.c
-	sed -i 's/ouput/output/' *.c
-	sed -i 's/vaule/value/' *.c
-	sed -i 's/annonymous/anonymous/' *.h
+	sed -i.dh_clean \
+		-e '1s/\/usr\/bin\/env perl/\/usr\/bin\/perl/' \
+		-e 's/memeory/memory/' \
+		-e 's/automaticly/automatically/' \
+		-e 's/ouput/output/' \
+		-e 's/vaule/value/' \
+		-e 's/annonymous/anonymous/' \
+		scripts/* *.c *.h *.md
 ifeq (amd64,$(DEB_HOST_ARCH))
 	mkdir -p $(prefix)
 	mkdir -p $(libexecdir)
-	for SIMD in avx2 avx sse4.1 ssse3 sse3 sse2 ; do \
+	for SIMD in $(AMD64_FLAGS); do \
 		export CFLAGS="$(CFLAGS) -m$${SIMD}" ; \
 		make clean ; \
 		dh_auto_build -- SFX=-$${SIMD} ; \
@@ -36,7 +41,7 @@ ifeq (amd64,$(DEB_HOST_ARCH))
 else ifeq (i386,$(DEB_HOST_ARCH))
 	mkdir -p $(prefix)
 	mkdir -p $(libexecdir)
-	for SIMD in ssse3 sse3 sse2 sse mmx; do \
+	for SIMD in $(I386_FLAGS); do \
 		export CFLAGS="$(CXXFLAGS) -m$${SIMD}" ; \
 		make clean ; \
 		dh_auto_build -- SFX=-$${SIMD} ; \
@@ -49,17 +54,17 @@ endif
 override_dh_auto_install:
 ifeq (amd64,$(DEB_HOST_ARCH))
 	dh_install -p $(DEB_SOURCE) debian/bin/simd-dispatch /usr/lib/$(DEB_SOURCE)/
-	for SIMD in avx2 avx sse4.1 ssse3 sse3 sse2 ; do \
+	for SIMD in $(AMD64_FLAGS); do \
 		export CFLAGS="$(CFLAGS) -m$${SIMD}" ; \
 		dh_auto_build -- SFX=-$${SIMD} BIN=$(libexecdir) install ; \
 	done
 	mkdir -p $(prefix)/bin
 	cd $(prefix)/bin \
-		&& for prog in kbm2 pgzf wtdbg-cns wtdbg2 wtpoa-cns ; do \
+		&& for prog in $(BINARIES); do \
 		ln -s ../lib/$(DEB_SOURCE)/simd-dispatch $${prog} ; done
 else ifeq (i386,$(DEB_HOST_ARCH))
 	dh_install -p $(DEB_SOURCE) debian/bin/simd-dispatch /usr/lib/$(DEB_SOURCE)/
-	for SIMD in sse2 sse mmx ; do \
+	for SIMD in $(I386_FLAGS); do \
 		export CFLAGS="$(CFLAGS) -m$${SIMD}" ; \
 		dh_auto_build -- SFX=-$${SIMD} BIN=$(libexecdir) install ; \
 	done
@@ -67,8 +72,30 @@ else ifeq (i386,$(DEB_HOST_ARCH))
 		install
 	mkdir -p $(prefix)/bin
 	cd $(prefix)/bin \
-		&& for prog in kbm2 pgzf wtdbg-cns wtdbg2 wtpoa-cns ; do \
+		&& for prog in $(BINARIES); do \
 		ln -s ../lib/$(DEB_SOURCE)/simd-dispatch $${prog} ; done
 else
 	make BIN=debian/$(DEB_SOURCE)/usr/bin install
 endif
+
+execute_after_dh_auto_clean:
+ifeq (amd64,$(DEB_HOST_ARCH))
+	$(RM) $(foreach binary,$(BINARIES), \
+		$(foreach flag,$(AMD64_FLAGS), \
+			$(binary)-$(flag) \
+		) \
+	) # Cleanup additional binaries built for amd64 sub architectures.
+else ifeq (i386,$(DEB_HOST_ARCH))
+	$(RM) $(foreach binary,$(BINARIES), \
+		$(foreach flag,$(I386_FLAGS), \
+			$(binary)-$(flag) \
+		) \
+	) # Cleanup additional binaries built for i386 sub architectures.
+endif
+	: $(foreach f,$(wildcard *.dh_clean scripts/*.dh_clean), \
+		&& mv -v $(f) $(f:.dh_clean=) \
+	) # Cleanup the wealth of files modified by sed for various typos.
+
+# Avoid introduction of backup files from the sed stream in binary packages.
+execute_after_dh_install:
+	find debian/ -name '*.dh_clean' -delete



View it on GitLab: https://salsa.debian.org/med-team/wtdbg2/-/compare/08b2ed186432540af8564933268c27e094acd6dc...34f18ba8e6131fb87ef87eb7b847c8c72603e0a5

-- 
View it on GitLab: https://salsa.debian.org/med-team/wtdbg2/-/compare/08b2ed186432540af8564933268c27e094acd6dc...34f18ba8e6131fb87ef87eb7b847c8c72603e0a5
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/20240504/f330a489/attachment-0001.htm>


More information about the debian-med-commit mailing list