Source: wmnet Version: 1.06-1 Tags: patch Severity: important User: [email protected] Usertags: rebootstrap Control: block 873764 by -1
We want to remove xmkmf from Debian (see #873764). wmnet is a package that uses xmkmf. Once we remove xmkmf, this bug will become release critical. The attached patch implements a minimal build system inside debian/rules to avoid using xmkmf. I verified that it produces an identical package on amd64 up to build path and build ids using reproducible builds. Using xmkmf happens to break cross building. Helmut
diff --minimal -Nru wmnet-1.06/debian/changelog wmnet-1.06/debian/changelog --- wmnet-1.06/debian/changelog 2012-03-11 13:25:08.000000000 +0100 +++ wmnet-1.06/debian/changelog 2018-05-26 10:07:48.000000000 +0200 @@ -1,3 +1,10 @@ +wmnet (1.06-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Stop using xmkmf. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Sat, 26 May 2018 10:07:48 +0200 + wmnet (1.06-1) unstable; urgency=low * New upstream version diff --minimal -Nru wmnet-1.06/debian/control wmnet-1.06/debian/control --- wmnet-1.06/debian/control 2012-03-03 21:26:30.000000000 +0100 +++ wmnet-1.06/debian/control 2018-05-26 10:07:48.000000000 +0200 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Martin Lazar <[email protected]> Standards-Version: 3.9.3 -Build-Depends: debhelper (>= 5), libx11-dev, libxext-dev, xutils-dev +Build-Depends: debhelper (>= 5), libx11-dev, libxext-dev Homepage: http://www.katharineosborne.com/wmnet/ Package: wmnet diff --minimal -Nru wmnet-1.06/debian/rules wmnet-1.06/debian/rules --- wmnet-1.06/debian/rules 2012-03-03 21:13:23.000000000 +0100 +++ wmnet-1.06/debian/rules 2018-05-26 10:07:48.000000000 +0200 @@ -3,15 +3,37 @@ # based on the sample debian/rules file for GNU hello by Ian Jackson. # Handmodified by P. Frauenfelder for debhelper support, 5 Sept 1998 +include /usr/share/dpkg/architecture.mk +-include /usr/share/dpkg/buildtools.mk +CFLAGS = -Wall -g -O2 -fno-strict-aliasing -DFUNCPROTO=15 -DNARROWPROTO +ifeq ($(DEB_HOST_ARCH_OS),linux) +CFLAGS += -Dlinux -Dlinux_libc6 +else +CFLAGS += -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE +endif +ifeq ($(DEB_HOST_ARCH_BITS),32) +CFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +endif +ifeq ($(DEB_HOST_ARCH_CPU),i386) +CFLAGS += -D__i386__ +endif +ifeq ($(DEB_HOST_ARCH_CPU),amd64) +CFLAGS += -D__amd64__ +endif + +%.o:%.c + $(CC) $(CFLAGS) -c $< -o $@ +drivers.o:drivers.c config.h +wmnet.o:wmnet.c wmnet.h +wmnet:wmnet.o drivers.o + $(CC) $(CFLAGS) $^ -o $@ -lXext -lX11 -lm + build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp -build-stamp: +build-stamp:wmnet dh_testdir - xmkmf - make - touch build-stamp clean: @@ -19,10 +41,7 @@ dh_testroot rm -f build-stamp - xmkmf - make clean - - rm Makefile + rm -f Makefile wment wmnet.o drivers.o dh_clean @@ -32,7 +51,7 @@ dh_clean -k dh_installdirs - make install DESTDIR=$(CURDIR)/debian/wmnet + install -m755 wmnet $(CURDIR)/debian/wmnet/usr/bin/wmnet binary-indep: build install # There are no architecture-independent files to be uploaded

