Source: mhddfs Version: 0.1.39+nmu1 Tags: patch User: helm...@debian.org Usertags: rebootstrap
mhddfs fails to cross build from source, because it builds for the build architecture. The Makefile hard codes build architecture tools (gcc and pkg-config) and debian/rules fails to pass cross tools. The attached patch fixes both. Please consider applying it. Helmut
diff --minimal -Nru mhddfs-0.1.39+nmu1/Makefile mhddfs-0.1.39+nmu2/Makefile --- mhddfs-0.1.39+nmu1/Makefile 2013-05-12 15:33:06.000000000 +0200 +++ mhddfs-0.1.39+nmu2/Makefile 2019-03-03 09:37:45.000000000 +0100 @@ -22,13 +22,15 @@ TARGET = mhddfs -CFLAGS = -Wall $(shell pkg-config fuse --cflags) \ +PKG_CONFIG ?= pkg-config + +CFLAGS = -Wall $(shell $(PKG_CONFIG) fuse --cflags) \ -DFUSE_USE_VERSION=26 -MMD ifdef WITHOUT_XATTR CFLAGS += -DWITHOUT_XATTR endif -LDFLAGS = $(shell pkg-config fuse --libs) +LDFLAGS = $(shell $(PKG_CONFIG) fuse --libs) FORTAR = src COPYING LICENSE README Makefile \ README.ru.UTF-8 ChangeLog mhddfs.1 \ @@ -83,14 +85,14 @@ $(shell rpm --eval '%_rpmdir')/*/mhddfs-*$(VERSION)-$(RELEASE)* . $(TARGET): obj/obj-stamp $(OBJ) - gcc $(CFLAGS) $(OBJ) -o $@ $(LDFLAGS) + $(CC) $(CFLAGS) $(OBJ) -o $@ $(LDFLAGS) obj/obj-stamp: mkdir -p obj touch $@ obj/%.o: src/%.c - gcc $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) -c $< -o $@ clean: rm -fr obj $(TARGET) pwrite_test statvfs rename @@ -98,7 +100,7 @@ rm -fr rename-test/mnt rename: tests/rename.c - gcc -o $@ $< + $(CC) -o $@ $< release_svn_thread: @echo current version $(VERSION) @@ -113,10 +115,10 @@ screen -t vim vim Makefile src/*.[ch] README* ChangeLog mhddfs.1 pwrite_test: src/test/pwrite.c - gcc -o $@ $< + $(CC) -o $@ $< statvfs: src/test/statvfs.c - gcc -o $@ $< + $(CC) -o $@ $< images-mount: test1.img test2.img mount|grep -q `pwd`/test1 || sudo mount -o loop test1.img test1 @@ -160,7 +162,7 @@ while make test; do echo ok; echo; done ptest: - gcc -o $@ tests/plocks.c -l pthread + $(CC) -o $@ tests/plocks.c -l pthread -./$@ rm -f $@ diff --minimal -Nru mhddfs-0.1.39+nmu1/debian/changelog mhddfs-0.1.39+nmu2/debian/changelog --- mhddfs-0.1.39+nmu1/debian/changelog 2013-05-12 15:35:11.000000000 +0200 +++ mhddfs-0.1.39+nmu2/debian/changelog 2019-03-03 09:38:01.000000000 +0100 @@ -1,3 +1,12 @@ +mhddfs (0.1.39+nmu2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross tools to make. + + Makefile: Make build tools substitutable. + + -- Helmut Grohne <hel...@subdivi.de> Sun, 03 Mar 2019 09:38:01 +0100 + mhddfs (0.1.39+nmu1) unstable; urgency=low * Non-maintainer upload. diff --minimal -Nru mhddfs-0.1.39+nmu1/debian/rules mhddfs-0.1.39+nmu2/debian/rules --- mhddfs-0.1.39+nmu1/debian/rules 2013-05-12 15:33:06.000000000 +0200 +++ mhddfs-0.1.39+nmu2/debian/rules 2019-03-03 09:38:00.000000000 +0100 @@ -18,7 +18,7 @@ build-stamp: dh_testdir - make $(MHDDFS_BUILDFLAGS) + dh_auto_build -- $(MHDDFS_BUILDFLAGS) touch $@ clean: