Hello,

this is what I used to fix the FTBFS in ubuntu (just uploaded).
I also took the opportunity to rebuild with imagemagick 7:

--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Uploaders: Debian Junior Maintainers
<debian...@lists.debian.org>
 Build-Depends: debhelper-compat (= 13),
                gettext,
                gperf,
-              imagemagick-6.q16,
+              imagemagick-7.q16,
                libcairo2-dev,
                libfribidi-dev,
                libkf5service-bin,
diff --git a/debian/patches/1075590_ftbfs_with_GCC-14.patch b/debian/patches/1075590_ftbfs_with_GCC-14.patch
new file mode 100644
index 0000000..073f462
--- /dev/null
+++ b/debian/patches/1075590_ftbfs_with_GCC-14.patch
@@ -0,0 +1,29 @@
+Description: fix FTBFS (incompatible pointer type)
+Origin: upstream, https://sourceforge.net/p/tuxpaint/tuxpaint/ci/9d70b5837cc307e6c9fe80e6e7dcabf7750b1d45/
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1075590
+Last-Update: 2024-12-10
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+
+Index: tuxpaint-0.9.28-sdl2/src/tuxpaint.c
+===================================================================
+--- tuxpaint-0.9.28-sdl2.orig/src/tuxpaint.c
++++ tuxpaint-0.9.28-sdl2/src/tuxpaint.c
+@@ -12924,7 +12924,7 @@ static double loadinfo(const char *const
+ /**
+  * FIXME
+  */
+-static int SDLCALL NondefectiveBlit(SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)
++static int SDLCALL NondefectiveBlit(SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)
+ {
+   int dstx = 0;
+   int dsty = 0;
+@@ -12996,7 +12996,7 @@ static int SDLCALL NondefectiveBlit(SDL_
+  */
+ static void autoscale_copy_smear_free(SDL_Surface * src, SDL_Surface * dst,
+                                       int SDLCALL(*blit) (SDL_Surface * src,
+-                                                          SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect))
++                                                          const SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect))
+ {
+   SDL_Surface *src1;
+   SDL_Rect dest;
diff --git a/debian/patches/always-link-with-m.patch b/debian/patches/always-link-with-m.patch
new file mode 100644
index 0000000..286e77c
--- /dev/null
+++ b/debian/patches/always-link-with-m.patch
@@ -0,0 +1,20 @@
+Description: Fix FTBFS by making sure the math library is linked in
+Origin: upstream, https://sourceforge.net/p/tuxpaint/tuxpaint/ci/a58f1f64b5b691462b4bf766f34eaf194670afaa/
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1075590
+Last-Update: 2024-12-10
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+
+diff --git a/Makefile b/Makefile
+index f2172e9..a81eea4 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1132,7 +1132,7 @@ tuxpaint:	obj/tuxpaint.o obj/i18n.o obj/im.o obj/cursor.o obj/pixels.o \
+ 	@echo "...Linking Tux Paint..."
+ 	$(CC) $(CFLAGS) $(LDFLAGS) $(DEBUG_FLAGS) $(SDL_CFLAGS) $(FRIBIDI_CFLAGS) $(DEFS) $(ARCH_DEFS) \
+ 		-o tuxpaint $^ \
+-		$(SDL_LIBS) $(SVG_LIB) $(ARCH_LINKS)
++		$(SDL_LIBS) $(SVG_LIB) $(ARCH_LINKS) -lm
+ 	@$(RAD_CMD)
+ 	@$(RSRC_CMD)
+ 	@$(MIMESET_CMD)
diff --git a/debian/patches/series b/debian/patches/series
index 3a91068..fb8db4d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,5 @@
 add-fdo-keywords
 #fix-manpage-spelling
 fix-parallel-builds
+1075590_ftbfs_with_GCC-14.patch
+always-link-with-m.patch

Reply via email to