Control: forwarded -1 https://github.com/enzo1982/smooth/pull/16

Hi Helmut,

Helmut Grohne <[email protected]> writes:

> Source: smooth
> Version: 0.9.11~git20260403.0230c0da-2
> Tags: patch
> User: [email protected]
> Usertags: ftcbfs
>
> smooth fails to cross build from source, because it builds for the build
> architecture. debhelper sees a configure script and expects it to set up
> compilers, but this configure script does not configure anything. It can
> be fully ignored. A first step is overriding the detected builsystem to
> makefile. At that point, dh_auto_build will pass cross tools to make,
> which is what this build system needs. A secondary problem is that it
> hard codes the build architecture pkg-config all over the place. Once
> making it substitutable, smooth can be cross built. Please consider
> applying the attached patch and also forward the contained cross.patch
> upstream as it is beneficial to other distributions.
>
> Helmut
>
> diff -Nru smooth-0.9.11~git20260403.0230c0da/debian/changelog 
> smooth-0.9.11~git20260403.0230c0da/debian/changelog
> --- smooth-0.9.11~git20260403.0230c0da/debian/changelog       2026-04-20 
> 02:19:55.000000000 +0200
> +++ smooth-0.9.11~git20260403.0230c0da/debian/changelog       2026-10-28 
> 14:28:01.000000000 +0100
> @@ -1,3 +1,12 @@
> +smooth (0.9.11~git20260403.0230c0da-2.1) UNRELEASED; urgency=medium
> +
> +  * Non-maintainer upload.
> +  * Fix FTCBFS: (Closes: #-1)
> +    + Use the makefile buildsystem as configure does nothing.
> +    + Make pkg-config substitutable.
> +
> + -- Helmut Grohne <[email protected]>  Wed, 28 Oct 2026 14:28:01 +0100
> +
>  smooth (0.9.11~git20260403.0230c0da-2) unstable; urgency=medium
>  
>    * Update Standards-Version to 4.7.4; no change needed
> diff -Nru smooth-0.9.11~git20260403.0230c0da/debian/patches/cross.patch 
> smooth-0.9.11~git20260403.0230c0da/debian/patches/cross.patch
> --- smooth-0.9.11~git20260403.0230c0da/debian/patches/cross.patch     
> 1970-01-01 01:00:00.000000000 +0100
> +++ smooth-0.9.11~git20260403.0230c0da/debian/patches/cross.patch     
> 2026-10-28 14:28:01.000000000 +0100
> @@ -0,0 +1,223 @@
> +--- smooth-0.9.11~git20260403.0230c0da.orig/Makefile
> ++++ smooth-0.9.11~git20260403.0230c0da/Makefile
> +@@ -154,7 +154,7 @@
> + else ifeq ($(BUILD_OSX),True)
> +     LIBS += -lcurl
> + else
> +-    LIBS += $(shell pkg-config --libs libcurl)
> ++    LIBS += $(shell $(PKG_CONFIG) --libs libcurl)
> + endif
> + 
> + ifeq ($(USE_BUNDLED_LIBFRIBIDI),True)
> +@@ -186,13 +186,13 @@
> + else ifeq ($(BUILD_HAIKU),True)
> +     LIBS += -lpng
> + else
> +-    LIBS += $(shell pkg-config --libs libpng)
> ++    LIBS += $(shell $(PKG_CONFIG) --libs libpng)
> + endif
> + 
> + ifeq ($(USE_BUNDLED_LIBWEBP),True)
> +     LIBS += $(LIBDIR)/libwebp.a
> + else
> +-    LIBS += $(shell pkg-config --libs libwebp)
> ++    LIBS += $(shell $(PKG_CONFIG) --libs libwebp)
> + endif
> + 
> + ifeq ($(USE_BUNDLED_LIBXML2),True)
> +@@ -238,11 +238,11 @@
> +     endif
> + 
> +     ifneq ($(BUILD_CAIRO),True)
> +-            LIBS += $(shell pkg-config --libs xft)
> ++            LIBS += $(shell $(PKG_CONFIG) --libs xft)
> +     endif
> + 
> +     LIBS += -lpthread
> +-    LIBS += $(shell pkg-config --libs gtk+-x11-3.0)
> ++    LIBS += $(shell $(PKG_CONFIG) --libs gtk+-x11-3.0)
> + 
> +     DLLNAME = $(LIBDIR)/libsmooth-$(VERSION)$(SHARED)
> + endif
> +--- smooth-0.9.11~git20260403.0230c0da.orig/Makefile-options
> ++++ smooth-0.9.11~git20260403.0230c0da/Makefile-options
> +@@ -175,6 +175,10 @@
> +     LD      = $(CXX)
> + endif
> + 
> ++ifndef PKG_CONFIG
> ++    PKG_CONFIG = pkg-config
> ++endif
> ++
> + LDCONFIG    = /sbin/ldconfig
> + 
> + INSTALL             = install
> +--- smooth-0.9.11~git20260403.0230c0da.orig/classes/backends/xlib/Makefile
> ++++ smooth-0.9.11~git20260403.0230c0da/classes/backends/xlib/Makefile
> +@@ -9,8 +9,8 @@
> + ifneq ($(BUILD_WIN32),True)
> + ifneq ($(BUILD_OSX),True)
> + ifneq ($(BUILD_HAIKU),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags x11)
> +-    MYCCOPTS += $(shell pkg-config --cflags gtk+-3.0)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags x11)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags gtk+-3.0)
> + endif
> + endif
> + endif
> +--- 
> smooth-0.9.11~git20260403.0230c0da.orig/classes/graphics/backends/cairo/Makefile
> ++++ 
> smooth-0.9.11~git20260403.0230c0da/classes/graphics/backends/cairo/Makefile
> +@@ -9,8 +9,8 @@
> + ifneq ($(BUILD_WIN32),True)
> + ifneq ($(BUILD_OSX),True)
> + ifneq ($(BUILD_HAIKU),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags pangocairo)
> +-    MYCCOPTS += $(shell pkg-config --cflags gdk-3.0)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags pangocairo)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags gdk-3.0)
> + endif
> + endif
> + else
> +--- 
> smooth-0.9.11~git20260403.0230c0da.orig/classes/graphics/backends/xlib/Makefile
> ++++ 
> smooth-0.9.11~git20260403.0230c0da/classes/graphics/backends/xlib/Makefile
> +@@ -9,10 +9,10 @@
> + ifneq ($(BUILD_WIN32),True)
> + ifneq ($(BUILD_OSX),True)
> + ifneq ($(BUILD_HAIKU),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags x11)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags x11)
> + 
> + ifneq ($(BUILD_CAIRO),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags xft)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags xft)
> + endif
> + endif
> + endif
> +--- 
> smooth-0.9.11~git20260403.0230c0da.orig/classes/graphics/imageloader/Makefile
> ++++ smooth-0.9.11~git20260403.0230c0da/classes/graphics/imageloader/Makefile
> +@@ -17,13 +17,13 @@
> + ifeq ($(USE_BUNDLED_LIBPNG),True)
> +     MYCCOPTS += -I"$(SRCDIR)"/$(SMOOTH_PATH)/include/support/libpng
> + else
> +-    MYCCOPTS += $(shell pkg-config --cflags libpng)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags libpng)
> + endif
> + 
> + ifeq ($(USE_BUNDLED_LIBWEBP),True)
> +     MYCCOPTS += -I"$(SRCDIR)"/$(SMOOTH_PATH)/include/support/libwebp
> + else
> +-    MYCCOPTS += $(shell pkg-config --cflags libwebp)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags libwebp)
> + endif
> + 
> + ifeq ($(BUILD_GDIPLUS),True)
> +--- 
> smooth-0.9.11~git20260403.0230c0da.orig/classes/gui/clipboard/backends/xlib/Makefile
> ++++ 
> smooth-0.9.11~git20260403.0230c0da/classes/gui/clipboard/backends/xlib/Makefile
> +@@ -9,7 +9,7 @@
> + ifneq ($(BUILD_WIN32),True)
> + ifneq ($(BUILD_OSX),True)
> + ifneq ($(BUILD_HAIKU),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags x11)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags x11)
> + endif
> + endif
> + endif
> +--- 
> smooth-0.9.11~git20260403.0230c0da.orig/classes/gui/dialogs/directory/Makefile
> ++++ smooth-0.9.11~git20260403.0230c0da/classes/gui/dialogs/directory/Makefile
> +@@ -9,7 +9,7 @@
> + ifneq ($(BUILD_WIN32),True)
> + ifneq ($(BUILD_OSX),True)
> + ifneq ($(BUILD_HAIKU),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags gtk+-x11-3.0)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags gtk+-x11-3.0)
> + endif
> + endif
> + endif
> +--- smooth-0.9.11~git20260403.0230c0da.orig/classes/gui/dialogs/file/Makefile
> ++++ smooth-0.9.11~git20260403.0230c0da/classes/gui/dialogs/file/Makefile
> +@@ -9,7 +9,7 @@
> + ifneq ($(BUILD_WIN32),True)
> + ifneq ($(BUILD_OSX),True)
> + ifneq ($(BUILD_HAIKU),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags gtk+-x11-3.0)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags gtk+-x11-3.0)
> + endif
> + endif
> + endif
> +--- 
> smooth-0.9.11~git20260403.0230c0da.orig/classes/gui/window/backends/xlib/Makefile
> ++++ 
> smooth-0.9.11~git20260403.0230c0da/classes/gui/window/backends/xlib/Makefile
> +@@ -9,7 +9,7 @@
> + ifneq ($(BUILD_WIN32),True)
> + ifneq ($(BUILD_OSX),True)
> + ifneq ($(BUILD_HAIKU),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags x11)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags x11)
> + endif
> + endif
> + endif
> +--- smooth-0.9.11~git20260403.0230c0da.orig/classes/input/Makefile
> ++++ smooth-0.9.11~git20260403.0230c0da/classes/input/Makefile
> +@@ -9,7 +9,7 @@
> + ifneq ($(BUILD_WIN32),True)
> + ifneq ($(BUILD_OSX),True)
> + ifneq ($(BUILD_HAIKU),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags x11)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags x11)
> + endif
> + endif
> + endif
> +--- 
> smooth-0.9.11~git20260403.0230c0da.orig/classes/input/backends/xlib/Makefile
> ++++ smooth-0.9.11~git20260403.0230c0da/classes/input/backends/xlib/Makefile
> +@@ -9,7 +9,7 @@
> + ifneq ($(BUILD_WIN32),True)
> + ifneq ($(BUILD_OSX),True)
> + ifneq ($(BUILD_HAIKU),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags x11)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags x11)
> + endif
> + endif
> + endif
> +--- smooth-0.9.11~git20260403.0230c0da.orig/classes/net/protocols/Makefile
> ++++ smooth-0.9.11~git20260403.0230c0da/classes/net/protocols/Makefile
> +@@ -9,7 +9,7 @@
> + ifeq ($(USE_BUNDLED_LIBCURL),True)
> +     MYCCOPTS += -I"$(SRCDIR)"/$(SMOOTH_PATH)/include/support 
> -DCURL_STATICLIB
> + else ifneq ($(BUILD_OSX),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags libcurl)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags libcurl)
> + endif
> + 
> + # Enter object files here:
> +--- smooth-0.9.11~git20260403.0230c0da.orig/classes/system/Makefile
> ++++ smooth-0.9.11~git20260403.0230c0da/classes/system/Makefile
> +@@ -9,7 +9,7 @@
> + ifneq ($(BUILD_WIN32),True)
> + ifneq ($(BUILD_OSX),True)
> + ifneq ($(BUILD_HAIKU),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags x11)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags x11)
> + endif
> + endif
> + endif
> +--- 
> smooth-0.9.11~git20260403.0230c0da.orig/classes/system/backends/xlib/Makefile
> ++++ smooth-0.9.11~git20260403.0230c0da/classes/system/backends/xlib/Makefile
> +@@ -9,7 +9,7 @@
> + ifneq ($(BUILD_WIN32),True)
> + ifneq ($(BUILD_OSX),True)
> + ifneq ($(BUILD_HAIKU),True)
> +-    MYCCOPTS += $(shell pkg-config --cflags x11)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags x11)
> + endif
> + endif
> + endif
> +--- smooth-0.9.11~git20260403.0230c0da.orig/classes/xml/Makefile
> ++++ smooth-0.9.11~git20260403.0230c0da/classes/xml/Makefile
> +@@ -11,7 +11,7 @@
> + else ifeq ($(BUILD_OSX),True)
> +     MYCCOPTS += -I$(shell xcodebuild -sdk macosx -version | grep "^Path: " 
> | head -n 1 | tail -c +7)/usr/include/libxml2
> + else
> +-    MYCCOPTS += $(shell pkg-config --cflags libxml-2.0)
> ++    MYCCOPTS += $(shell $(PKG_CONFIG) --cflags libxml-2.0)
> + endif
> + 
> + ifeq ($(USE_BUNDLED_LIBICONV),True)
> diff -Nru smooth-0.9.11~git20260403.0230c0da/debian/patches/series 
> smooth-0.9.11~git20260403.0230c0da/debian/patches/series
> --- smooth-0.9.11~git20260403.0230c0da/debian/patches/series  1970-01-01 
> 01:00:00.000000000 +0100
> +++ smooth-0.9.11~git20260403.0230c0da/debian/patches/series  2026-10-28 
> 14:28:01.000000000 +0100
> @@ -0,0 +1 @@
> +cross.patch
> diff -Nru smooth-0.9.11~git20260403.0230c0da/debian/rules 
> smooth-0.9.11~git20260403.0230c0da/debian/rules
> --- smooth-0.9.11~git20260403.0230c0da/debian/rules   2026-04-20 
> 02:19:55.000000000 +0200
> +++ smooth-0.9.11~git20260403.0230c0da/debian/rules   2026-10-28 
> 14:28:00.000000000 +0100
> @@ -24,7 +24,7 @@
>  SMOOTH_MAKE_CONFIG := $(subst $(space),$(comma),$(strip $(SMOOTH_CONFIG)))
>  
>  %:
> -     dh $@
> +     dh $@ --buildsystem=makefile
>  
>  override_dh_auto_build:
>       dh_auto_build -- prefix=/usr config="$(SMOOTH_MAKE_CONFIG)"
>

Thanks very much for preparing the patch! I have forwarded the relevant
part upstream as well. Please feel free to upload the NMU, and I'll
integrated it in Salsa.

-- 
Regards,
Xiyue Deng

Attachment: signature.asc
Description: PGP signature

Reply via email to