Your message dated Tue, 05 Jan 2021 13:07:10 +0000
with message-id <[email protected]>
and subject line Bug#893633: fixed in tuxpuck 0.8.2-10
has caused the Debian Bug report #893633,
regarding tuxpuck FTCBFS: fails to find freetype, but actually more complex
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
893633: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893633
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: tuxpuck
Version: 0.8.2-8
Tags: patch
User: [email protected]
Usertags: rebootstrap

tuxpuck fails to cross build from source. The failure looks innocent
initially, it fails finding freetype.pc. Simple enough, use the right
pkg-config, but then it runs the damn thing.

Thus I noticed that the utils folder actually only contains build tools.
It's not meant to be build with a cross compiler. So rename CC to
CC_FOR_BUILD (to avoid dh_auto_build replacing it with a cross
compiler). Only thing is: We now need libsdl1.2-dev for both the build
architecture and the host architecture. That doesn't work, because
libsdl1.2-dev is not Multi-Arch: same and cannot be (due to sdl-config).
So I figured that the utils don't actually need sdl. All they use sdl
for is declaring integer types with particular widths and signedness.
That can easily be converted to using <inttypes.h> removing the need for
libsdl1.2-dev (for the build architecture). The freetype depdency is
only needed for the build architecture (thus annotate with :native) and
then it also finds freetype.pc. So with all these changes, tuxpuck
actually cross builds. The patch is a bit bigger, but I hope you can
still take it.

Helmut
diff --minimal -Nru tuxpuck-0.8.2/debian/changelog 
tuxpuck-0.8.2/debian/changelog
--- tuxpuck-0.8.2/debian/changelog      2018-03-08 22:15:21.000000000 +0100
+++ tuxpuck-0.8.2/debian/changelog      2018-03-20 06:31:48.000000000 +0100
@@ -1,3 +1,13 @@
+tuxpuck (0.8.2-8.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Build the utils folder with the build architecture compiler.
+    + Remove dependency on sdl from utils/*.c.
+    + Switch the freetype dependency to the build architecture.
+
+ -- Helmut Grohne <[email protected]>  Tue, 20 Mar 2018 06:31:48 +0100
+
 tuxpuck (0.8.2-8) unstable; urgency=medium
 
   * Use compat level 11.
diff --minimal -Nru tuxpuck-0.8.2/debian/control tuxpuck-0.8.2/debian/control
--- tuxpuck-0.8.2/debian/control        2018-03-08 22:15:21.000000000 +0100
+++ tuxpuck-0.8.2/debian/control        2018-03-20 06:31:48.000000000 +0100
@@ -6,7 +6,7 @@
  Markus Koschany <[email protected]>
 Build-Depends:
  debhelper (>= 11),
- libfreetype6-dev,
+ libfreetype6-dev:native,
  libjpeg-dev,
  libpng-dev,
  libsdl1.2-dev,
diff --minimal -Nru tuxpuck-0.8.2/debian/patches/cross.patch 
tuxpuck-0.8.2/debian/patches/cross.patch
--- tuxpuck-0.8.2/debian/patches/cross.patch    1970-01-01 01:00:00.000000000 
+0100
+++ tuxpuck-0.8.2/debian/patches/cross.patch    2018-03-20 06:31:48.000000000 
+0100
@@ -0,0 +1,155 @@
+Index: tuxpuck-0.8.2/utils/Makefile
+===================================================================
+--- tuxpuck-0.8.2.orig/utils/Makefile
++++ tuxpuck-0.8.2/utils/Makefile
+@@ -1,18 +1,18 @@
+ # Makefile for TuxPuck Utils , Copyright Jacob Kroon 2001-2002
+-CC            = gcc
++CC_FOR_BUILD  = gcc
+ CFLAGS                += -g -Wall -Werror
+ #############################################################
+ 
+ all : ttf2font data2c anim
+ 
+ ttf2font : ttf2font.c
+-      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) ttf2font.c `pkg-config --cflags 
--libs freetype2` -o ttf2font
++      $(CC_FOR_BUILD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) ttf2font.c `pkg-config 
--cflags --libs freetype2` -o ttf2font
+ 
+ data2c : data2c.c
+-      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) data2c.c `sdl-config --cflags 
--libs` -o data2c
++      $(CC_FOR_BUILD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) data2c.c -o data2c
+ 
+ anim : anim.c
+-      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) anim.c `sdl-config --cflags 
--libs` -o anim
++      $(CC_FOR_BUILD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) anim.c -o anim
+ 
+ clean :
+       rm -f *~ data2c ttf2font anim
+Index: tuxpuck-0.8.2/utils/anim.c
+===================================================================
+--- tuxpuck-0.8.2.orig/utils/anim.c
++++ tuxpuck-0.8.2/utils/anim.c
+@@ -1,11 +1,10 @@
+ /* anim.c - Copyright (C) 2001-2002 Jacob Kroon, see COPYING for details */
+ 
++#include <inttypes.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+ #include <sys/stat.h>
+-#include <SDL_endian.h>
+-#include <SDL_types.h>
+ 
+ void errorc(char *msg)
+ {
+@@ -23,15 +22,15 @@
+ {
+   FILE *in = NULL;
+   struct stat theStat;
+-  Uint8 *data;
+-  Uint32 size;
++  uint8_t *data;
++  uint32_t size;
+ 
+   if ((in = fopen(filename, "rb")) == NULL)
+     errorcc("Couldn't open file, ", filename);
+   stat(filename, &theStat);
+-  data = (Uint8 *) malloc(theStat.st_size);
++  data = (uint8_t *) malloc(theStat.st_size);
+   size = theStat.st_size;
+-  fwrite(&size, sizeof(Uint32), 1, out);
++  fwrite(&size, sizeof(uint32_t), 1, out);
+   if (fread(data, theStat.st_size, 1, in) != 1)
+     errorcc("Error reading from file, ", filename);
+   fwrite(data, theStat.st_size, 1, out);
+@@ -45,8 +44,8 @@
+   char buffer1[100];
+   char buffer2[100];
+   char *ptr;
+-  Uint8 nbrOfFrames, nbrOfAnimations;
+-  Uint32 uint32;
++  uint8_t nbrOfFrames, nbrOfAnimations;
++  uint32_t uint32;
+   int j = 0, i = 0;
+ 
+   if (argc != 3)
+@@ -57,7 +56,7 @@
+     errorcc("Couldn't open file for writing: ", argv[2]);
+   if (fscanf(in, "NbrOfFrames: %d\n", &uint32) != 1)
+     errorc("Wrong number of frames!");
+-  nbrOfFrames = (Uint8) uint32;
++  nbrOfFrames = (uint8_t) uint32;
+   fwrite(&nbrOfFrames, 1, 1, out);
+   ptr = strrchr(argv[1], '/');
+   if (ptr)
+@@ -72,26 +71,26 @@
+   }
+   if (fscanf(in, "NbrOfAnimations: %d\n", &uint32) != 1)
+     errorc("Wrong number of animations!");
+-  nbrOfAnimations = (Uint8) uint32;
++  nbrOfAnimations = (uint8_t) uint32;
+   fwrite(&nbrOfAnimations, 1, 1, out);
+   for (i = 0; i < nbrOfAnimations; i++) {
+-    Uint32 n;
+-    Uint8 n2;
++    uint32_t n;
++    uint8_t n2;
+ 
+     if (fscanf(in, "%d\n", &n) != 1)
+       errorc("Couldnt read number of frames in animation!");
+-    n2 = (Uint8) n;
++    n2 = (uint8_t) n;
+     fwrite(&n2, 1, 1, out);
+     for (j = 0; j < n2; j++) {
+-      Uint32 frame;
+-      Uint32 time;
+-      Uint8 frame2;
+-      Uint16 time2;
++      uint32_t frame;
++      uint32_t time;
++      uint8_t frame2;
++      uint16_t time2;
+ 
+       if (fscanf(in, "%d %d\n", &frame, &time) != 2)
+       errorc("Error reading frames");
+-      frame2 = (Uint8) frame;
+-      time2 = (Uint16) time;
++      frame2 = (uint8_t) frame;
++      time2 = (uint16_t) time;
+       fwrite(&frame2, 1, 1, out);
+       fwrite(&time2, sizeof(time2), 1, out);
+     }
+Index: tuxpuck-0.8.2/utils/data2c.c
+===================================================================
+--- tuxpuck-0.8.2.orig/utils/data2c.c
++++ tuxpuck-0.8.2/utils/data2c.c
+@@ -1,10 +1,9 @@
+ /* data2c - Copyright (C) 2001-2002 Jacob Kroon, see COPYING for details */
+ 
++#include <inttypes.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <sys/stat.h>
+-#include <SDL_types.h>
+-#include <SDL_endian.h>
+ 
+ void errorc(char *msg)
+ {
+@@ -24,7 +23,7 @@
+   char buffer[100];
+   unsigned char ch;
+   int i = 0;
+-  Uint32 size;
++  uint32_t size;
+   struct stat theStat;
+ 
+   if (argc != 3)
+@@ -39,7 +38,7 @@
+   fprintf(out, "/* %s */\n", buffer);
+   fprintf(out, "unsigned char %s[] = {\n", argv[2]);
+   for (i = 0; i < 4; i++)
+-    fprintf(out, "%d,", ((Uint8 *) & size)[i]);
++    fprintf(out, "%d,", ((uint8_t *) & size)[i]);
+   while (fread(&ch, 1, 1, in) != 0)
+     fprintf(out, "%d,", ch);
+   fseek(out, -1, SEEK_CUR);
diff --minimal -Nru tuxpuck-0.8.2/debian/patches/series 
tuxpuck-0.8.2/debian/patches/series
--- tuxpuck-0.8.2/debian/patches/series 2018-03-08 22:15:21.000000000 +0100
+++ tuxpuck-0.8.2/debian/patches/series 2018-03-20 06:31:48.000000000 +0100
@@ -3,3 +3,4 @@
 libpng-transition.patch
 FTBFS-with-fread.patch
 clang-FTBFS.patch
+cross.patch

--- End Message ---
--- Begin Message ---
Source: tuxpuck
Source-Version: 0.8.2-10
Done: Markus Koschany <[email protected]>

We believe that the bug you reported is fixed in the latest version of
tuxpuck, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Markus Koschany <[email protected]> (supplier of updated tuxpuck package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 05 Jan 2021 13:41:13 +0100
Source: tuxpuck
Architecture: source
Version: 0.8.2-10
Distribution: unstable
Urgency: medium
Maintainer: Debian Games Team <[email protected]>
Changed-By: Markus Koschany <[email protected]>
Closes: 893633
Changes:
 tuxpuck (0.8.2-10) unstable; urgency=medium
 .
   * Fix FTCBFS:
       - Build the utils folder with the build architecture compiler.
       - Remove dependency on sdl from utils/*.c.
       - Switch the freetype dependency to the build architecture.
     Thanks to Helmut Grohne for the patch. (Closes: #893633)
Checksums-Sha1:
 5bc3bd9583d5031f02b0c2439f3d248749758041 2124 tuxpuck_0.8.2-10.dsc
 270d410998926928e9e0ca02dc3ef75f193c1aae 13884 tuxpuck_0.8.2-10.debian.tar.xz
 7cca0821685aa9c466a5193f7b37e54076259d85 9980 tuxpuck_0.8.2-10_amd64.buildinfo
Checksums-Sha256:
 134cf8b12ff3d0bf1b30b81d1961e1c044c2bd7f40334b0b53ccfda381a2a0ef 2124 
tuxpuck_0.8.2-10.dsc
 002962fb5f598ded6f79115f4f424037b0258053aad9ff9d1cdcce733d4e1165 13884 
tuxpuck_0.8.2-10.debian.tar.xz
 9391581b4933ff17f1270eb095435167e12edc239ecc437f2688b4202a1039dc 9980 
tuxpuck_0.8.2-10_amd64.buildinfo
Files:
 f41af35cc24733da307421fb21cf8284 2124 games optional tuxpuck_0.8.2-10.dsc
 a44937810b0b243b715b4c472253a4b4 13884 games optional 
tuxpuck_0.8.2-10.debian.tar.xz
 f74c48cfc80b84d88b36893a8499968e 9980 games optional 
tuxpuck_0.8.2-10_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQKjBAEBCgCNFiEErPPQiO8y7e9qGoNf2a0UuVE7UeQFAl/0X/BfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEFD
RjNEMDg4RUYzMkVERUY2QTFBODM1RkQ5QUQxNEI5NTEzQjUxRTQPHGFwb0BkZWJp
YW4ub3JnAAoJENmtFLlRO1HkewcP/2h4N0KZqFBrLAoC/OwRovJxGBKD+0TpsFZX
iMxcadvDmW/e+VBVSzPcwmSZdIS/sw4gZUgk94A1UhQWTjDOkSoKt5QP9h7ABvff
FKeDm7fErO1fNkoIWGEapj7DupCc+lY5/tjU+hvTOcwvhZzFBRmTs39CEPGfUpf5
eWMp21f/+9zANk2PTyka1DlqTGqwyCJ/BSPyj0AkdpygxHeaFYWp6ov3iJV7It34
fOZBSFLDPlU8o28Vkclrq5txf8wUPXwZfWYzTHcrltSLDyMMxJdJLGpPzQfHQZsO
QY1piSoJTXN+xNQMV1qzyhMnb3e7gDwmFwU4Clg5nrZSmam/c1uxDhOyRcXKs1zC
xQ4IRAE1D6etrbYi72RdeOgK5aQcvq0Vt371ygj5XfYBIWHzUhd+Ix7BfZ5g9oVJ
x+Rq7l1wOoFtmTVu4Gtyu4VDDMl4xnoFsIYdAgIdURDMsAXYCDBoE9uK6SKGPTlU
Jvb71Y/EXhapQdSqHbWBW5fe8B1z5AziGu+7X4vovUPXmESAXCE+2V7vIISyTT0J
UhrjhRah6YrML7d62i8bMTMFYqwYLZNangDUm40vrEcOOTJVNZu66mdyDUBHiXXM
7vZCY3hjFTlj2MldT4gHHfqN2E9iFQOfNUEjY1u5OB+pFpn1u0FAEwjZDzYIobQP
U1Q3rdfx
=Qym/
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to