Hi,
I've fixed the bug. I plan to do NMU to fix this bug.
I'll wait for 10 days if no one says no.
And I'll upload it to delay/10 queue.
The attachment is the debdiff and build log.
Yours,
Paul
diff -Nru gramophone2-0.8.13a/debian/changelog
gramophone2-0.8.13a/debian/changelog
--- gramophone2-0.8.13a/debian/changelog2022-12-13 05:48:33.0
+0800
+++ gramophone2-0.8.13a/debian/changelog2024-04-01 05:23:29.0
+0800
@@ -1,3 +1,14 @@
+gramophone2 (0.8.13a-3.3) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Fix FTBFS caused by -Werror=implicit-function-declaration
+(Closes: #1066674)
+- Add debian/patches/fix-ftbfs-implicit-function-declaration.patch
+- Update debian/patches/clang_FTBFS.patch
+- Update debian/patches/GRAMophone.y.diff
+
+ -- Ying-Chun Liu (PaulLiu) Mon, 01 Apr 2024 05:23:29
+0800
+
gramophone2 (0.8.13a-3.2) unstable; urgency=low
[ Ying-Chun Liu (PaulLiu) ]
diff -Nru gramophone2-0.8.13a/debian/patches/clang_FTBFS.patch
gramophone2-0.8.13a/debian/patches/clang_FTBFS.patch
--- gramophone2-0.8.13a/debian/patches/clang_FTBFS.patch2022-12-13
05:48:33.0 +0800
+++ gramophone2-0.8.13a/debian/patches/clang_FTBFS.patch2024-04-01
05:23:29.0 +0800
@@ -1,9 +1,29 @@
Description: fix FTBFS with clang [-Wreturn-type]
Author: Nicolas Sévelin-Radiguet
Last-Update: 2014-09-06
a/midifile.c
-+++ b/midifile.c
-@@ -156,7 +156,7 @@
+Index: gramophone2-0.8.13a/midifile.c
+===
+--- gramophone2-0.8.13a.orig/midifile.c
gramophone2-0.8.13a/midifile.c
+@@ -78,6 +78,17 @@ static int read16bit();
+ static int to16bit();
+ static char *msg();
+
++int mferror(char *);
++int readheader();
++int readtrack();
++int chanmessage(int, int, int);
++int msginit();
++int msgadd(int);
++int metaevent(int);
++int sysex();
++int msgleng();
++int badbyte(int);
++
+ /*
+ * Write multi-length bytes to MIDI format files
+ */
+@@ -156,7 +167,7 @@ readheader() /* read a header chunk */
int format, ntrks, division;
if ( readmt("MThd") == EOF )
diff -Nru
gramophone2-0.8.13a/debian/patches/fix-ftbfs-implicit-function-declaration.patch
gramophone2-0.8.13a/debian/patches/fix-ftbfs-implicit-function-declaration.patch
---
gramophone2-0.8.13a/debian/patches/fix-ftbfs-implicit-function-declaration.patch
1970-01-01 08:00:00.0 +0800
+++
gramophone2-0.8.13a/debian/patches/fix-ftbfs-implicit-function-declaration.patch
2024-04-01 05:23:29.0 +0800
@@ -0,0 +1,84 @@
+Description: Fix FTBFS caused by -Werror=implicit-function-declaration
+ In dpkg 1.22.6, it enabled -Werror=implicit-function-declaration.
+ Thus we need to make sure every function has its definition.
+Bug-Debian: http://bugs.debian.org/1066674
+Author: Ying-Chun Liu (PaulLiu)
+Last-Update: 2024-04-01
+Index: gramophone2-0.8.13a/midifile.h
+===
+--- gramophone2-0.8.13a.orig/midifile.h
gramophone2-0.8.13a/midifile.h
+@@ -32,6 +32,11 @@ extern int (*Mf_writetempotrack)();
+ float mf_ticks2sec();
+ unsigned long mf_sec2ticks();
+ void mfwrite();
++int mf_write_midi_event(unsigned long, unsigned int, unsigned int, unsigned
char *, unsigned long);
++int mf_write_meta_event(unsigned long, unsigned char, unsigned char *,
unsigned long);
++void mf_write_tempo(unsigned long);
++int eputc(unsigned char);
++int biggermsg();
+
+ /* MIDI status commands most significant bit is 1 */
+ #define note_off 0x80
+Index: gramophone2-0.8.13a/global.h
+===
+--- gramophone2-0.8.13a.orig/global.h
gramophone2-0.8.13a/global.h
+@@ -181,3 +181,33 @@ typedef struct macro_data {
+ } macro;
+
+ macro macros[NUM_MACRO];
++
++void usageError(void);
++unsigned int hash(char *v, unsigned char sentinel);
++void initGRAMophone(void);
++void init_local_flag(void);
++void init_player(void);
++int grammyvm();
++void print_local_params(unsigned char i);
++void print_composition_info();
++void print_global_params();
++void sntx_err(unsigned int error, char *msg);
++void dhInsert(pnote_var noteVar, char *text, unsigned char sentinel, unsigned
char created_by_body);
++pnote_var dhSearch(char *v, unsigned char sentinel);
++char *dhSearch2(char *v);
++void code_update(unsigned int cc, unsigned int _goto);
++void gen_code(unsigned int op, unsigned int op1);
++void gen_code2(unsigned int op);
++void gen_code3(unsigned int op, unsigned type, unsigned op1);
++void gen_code4(unsigned int op, unsigned op1, unsigned op2, unsigned type);
++void gen_note_code(unsigned int op, unsigned int note, unsigned int type1,
++ unsigned int op1, unsigned int type2, unsigned int op2,
++ unsigned int type3, unsigned int op3, unsigned int type4,
++ unsigned int op4);
++void gen_exp1_code(unsigned int op, unsigned int