Bug#1003760: vdr-plugin-xineliboutput FTCBFS: builds for the build architecture
Helmut Grohne
helmut at subdivi.de
Sat Jan 15 05:53:52 GMT 2022
Source: vdr-plugin-xineliboutput
Version: 2.2.0+git20211212-2
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs
vdr-plugin-xineliboutput fails to cross build from source for a number
of reasons. It has a hand-written configure script that doesn't accept
the standard autotools flags at all. Instead, one is supposed to pass
build tools via flags like --cc=$(CC). Unfortunately, this isn't being
done. Worse, it doesn't cover all the relevant tools and it has no
provisions to select the host architecture pkg-config. Finally, it runs
a tool mpg2c during build. This tool must not be built with the cross
toolchain. The attached patch fixes all of these aspects and makes
vdr-plugin-xineliboutput cross buildable. Please consider applying it.
Helmut
-------------- next part --------------
diff --minimal -Nru vdr-plugin-xineliboutput-2.2.0+git20211212/debian/changelog vdr-plugin-xineliboutput-2.2.0+git20211212/debian/changelog
--- vdr-plugin-xineliboutput-2.2.0+git20211212/debian/changelog
+++ vdr-plugin-xineliboutput-2.2.0+git20211212/debian/changelog
@@ -1,3 +1,13 @@
+vdr-plugin-xineliboutput (2.2.0+git20211212-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (Closes: #-1)
+ + Add --pkg-config flag to configure.
+ + Pass all build tools to configure.
+ + Build mpg2c.c with the build architecture compiler.
+
+ -- Helmut Grohne <helmut at subdivi.de> Thu, 15 Jan 2022 06:20:04 +0100
+
vdr-plugin-xineliboutput (2.2.0+git20211212-2) unstable; urgency=medium
[ Tobias Grimm ]
diff --minimal -Nru vdr-plugin-xineliboutput-2.2.0+git20211212/debian/patches/cross.patch vdr-plugin-xineliboutput-2.2.0+git20211212/debian/patches/cross.patch
--- vdr-plugin-xineliboutput-2.2.0+git20211212/debian/patches/cross.patch
+++ vdr-plugin-xineliboutput-2.2.0+git20211212/debian/patches/cross.patch
@@ -0,0 +1,71 @@
+--- vdr-plugin-xineliboutput-2.2.0+git20211212.orig/configure
++++ vdr-plugin-xineliboutput-2.2.0+git20211212/configure
+@@ -189,9 +189,9 @@
+ if $PKG_CONFIG --exists $libname; then
+ if $PKG_CONFIG --libs $libname >/dev/null; then
+ add_flags LIBS_$subsys \
+- `pkg-config --libs-only-L $libname` \
+- `pkg-config --libs-only-l $libname`
+- add_flags CFLAGS_$subsys `pkg-config --cflags-only-I $libname`
++ `$PKG_CONFIG --libs-only-L $libname` \
++ `$PKG_CONFIG --libs-only-l $libname`
++ add_flags CFLAGS_$subsys `$PKG_CONFIG --cflags-only-I $libname`
+ log "yes"
+ return 0
+ fi
+@@ -312,6 +312,7 @@
+ echo " --disable-pkgconfig do not use pkg-config"
+ echo " --cc=CC select C compiler"
+ echo " --cxx=CXX select C++ compiler"
++ echo " --pkg-config=PKG-CONFIG select the pkg-config executable"
+ echo " --add-cflags=FLAGS add compiler flags"
+ }
+
+@@ -334,6 +335,10 @@
+ CXX=$optval
+ logdbg "C++ compiler: $CXX"
+ ;;
++ --pkg-config=?*)
++ PKG_CONFIG=$optval
++ logdbg "pkg-config: $PKG_CONFIG"
++ ;;
+ --add-cflags=?*)
+ CFLAGS="$CFLAGS $optval"
+ logdbg "CFLAGS: $CFLAGS"
+@@ -517,6 +522,7 @@
+ # cc/ld flags
+ echo "CC = $CC">>$makefile
+ echo "CXX = $CXX">>$makefile
++echo "PKG_CONFIG = $PKG_CONFIG">>$makefile
+ echo "CFLAGS_XINE += $CFLAGS_XINE">>$makefile
+ echo "CFLAGS_VDR += $CFLAGS_VDR">>$makefile
+ echo "CFLAGS_X11 += $CFLAGS_X11">>$makefile
+--- vdr-plugin-xineliboutput-2.2.0+git20211212.orig/Makefile
++++ vdr-plugin-xineliboutput-2.2.0+git20211212/Makefile
+@@ -45,6 +45,8 @@
+
+ CXX ?= g++
+ CC ?= gcc
++PKG_CONFIG ?= pkg-config
++CC_FOR_BUILD ?= gcc
+ OPTFLAGS ?=
+
+ ifeq ($(ARCH_APPLE_DARWIN), yes)
+@@ -63,7 +65,7 @@
+ ###
+
+ # Use package data if installed...otherwise assume we're under the VDR source directory:
+-PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:../../.." pkg-config --variable=$(1) vdr))
++PKGCFG = $(if $(VDRDIR),$(shell $(PKG_CONFIG) --variable=$(1) $(VDRDIR)/vdr.pc),$(shell $(PKG_CONFIG) --variable=$(1) vdr))
+ BINDIR = $(call PKGCFG,bindir)
+ LIBDIR = $(call PKGCFG,libdir)
+ LOCDIR = $(call PKGCFG,locdir)
+@@ -296,7 +298,7 @@
+
+ mpg2c: mpg2c.c
+ @echo CCLD $@
+- $(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) mpg2c.c -o $@
++ $(Q)$(CC_FOR_BUILD) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) mpg2c.c -o $@
+
+ # data
+ black_720x576.c: mpg2c black_720x576.mpg
diff --minimal -Nru vdr-plugin-xineliboutput-2.2.0+git20211212/debian/patches/series vdr-plugin-xineliboutput-2.2.0+git20211212/debian/patches/series
--- vdr-plugin-xineliboutput-2.2.0+git20211212/debian/patches/series
+++ vdr-plugin-xineliboutput-2.2.0+git20211212/debian/patches/series
@@ -1,2 +1,3 @@
disable-po-update.patch
cppflags.patch
+cross.patch
diff --minimal -Nru vdr-plugin-xineliboutput-2.2.0+git20211212/debian/rules vdr-plugin-xineliboutput-2.2.0+git20211212/debian/rules
--- vdr-plugin-xineliboutput-2.2.0+git20211212/debian/rules
+++ vdr-plugin-xineliboutput-2.2.0+git20211212/debian/rules
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+include /usr/share/dpkg/buildtools.mk
+
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
@@ -11,7 +13,7 @@
dh $@ --with vdrplugin
override_dh_auto_configure:
- ./configure --disable-dbus-glib-1
+ ./configure --disable-dbus-glib-1 '--cc=$(CC)' '--cxx=$(CXX)' '--pkg-config=$(PKG_CONFIG)'
override_dh_auto_build:
dh_auto_build -- all $(MAKE_OPTIONS)
More information about the pkg-vdr-dvb-devel
mailing list