Skip to content

Commit

Permalink
package/sox: fix patch fuzz
Browse files Browse the repository at this point in the history
Commit 8f88a64 "support/scripts/apply-patches.sh: set the maximum
fuzz factor to 0" reduced the fuzz factor.

Due to this change, sox fails to build with output:

    Applying 0001-uclibc.patch using patch:
    patching file src/formats.c
    Hunk #1 FAILED at 409.
    Hunk #2 succeeded at 477 (offset 60 lines).
    1 out of 2 hunks FAILED -- saving rejects to file src/formats.c.rej

This commit refreshes the package patch on the current package version.
Note 1: the failing patch 0001 was regenerated with "git format-patch".
Since the patch file 0001 name changed in the regeneration, the
".checkpackageignore" entry is also updated accordingly.
Note 2: patch 0002 did not require any update.

Fixes:
http://autobuild.buildroot.org/results/1bc396386aa3321fe48101caf9635ae41feb057b

Signed-off-by: Julien Olivain <[email protected]>
Signed-off-by: Yann E. MORIN <[email protected]>
  • Loading branch information
jolivain authored and yann-morin-1998 committed Jun 30, 2024
1 parent ddd7910 commit e336a03
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .checkpackageignore
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ package/softether/0008-librt.patch lib_patch.Upstream
package/softether/0009-uclibc-ai-addrconfig.patch lib_patch.Upstream
package/solarus/0001-cmake-remove-Werror.patch lib_patch.Upstream
package/solarus/0002-Add-a-basic-FindOpenGLES2.cmake.patch lib_patch.Sob lib_patch.Upstream
package/sox/0001-uclibc.patch lib_patch.Upstream
package/sox/0001-Make-SoX-support-uclibc-based-toolchains.patch lib_patch.Upstream
package/sox/0002-configure.ac-put-back-disable-stack-protector.patch lib_patch.Upstream
package/sox/0003-configure.ac-fix-static-linking-with-id3tag.patch lib_patch.Upstream
package/sox/0004-configure.ac-fix-static-linking-with-magic.patch lib_patch.Upstream
Expand Down
40 changes: 40 additions & 0 deletions package/sox/0001-Make-SoX-support-uclibc-based-toolchains.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 5d51acafe9c38fb05939b4d2d6a9dcde12476458 Mon Sep 17 00:00:00 2001
From: Gustavo Zacarias <[email protected]>
Date: Sat, 29 Jun 2024 12:28:54 +0200
Subject: [PATCH] Make SoX support uclibc-based toolchains

From:
http://sourceforge.net/p/sox/bugs/179/

Signed-off-by: Gustavo Zacarias <[email protected]>
[Julien: rebased patch on package git version 7524160,
and regenerated with git format-patch]
Signed-off-by: Julien Olivain <[email protected]>
---
src/formats.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/formats.c b/src/formats.c
index 3fcf4382..9fc001bd 100644
--- a/src/formats.c
+++ b/src/formats.c
@@ -466,7 +466,7 @@ static void UNUSED rewind_pipe(FILE * fp)
#if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__
fp->_p -= PIPE_AUTO_DETECT_SIZE;
fp->_r += PIPE_AUTO_DETECT_SIZE;
-#elif defined __GLIBC__
+#elif defined __GLIBC__ && ! defined __UCLIBC__
fp->_IO_read_ptr = fp->_IO_read_base;
#elif defined _MSC_VER && _MSC_VER >= 1900
#define NO_REWIND_PIPE
@@ -477,7 +477,6 @@ static void UNUSED rewind_pipe(FILE * fp)
/* To fix this #error, either simply remove the #error line and live without
* file-type detection with pipes, or add support for your compiler in the
* lines above. Test with cat monkey.wav | ./sox --info - */
- #error FIX NEEDED HERE
#define NO_REWIND_PIPE
(void)fp;
#endif
--
2.45.2

26 changes: 0 additions & 26 deletions package/sox/0001-uclibc.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 8df3a56cfb104c84d4701562ae2e3c9dc4686798 Mon Sep 17 00:00:00 2001
From 06e5cc069dbdfa060c3d9e75a798ec121ecc9349 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <[email protected]>
Date: Sat, 6 Feb 2021 11:08:45 +0100
Subject: [PATCH] configure.ac: fix static linking with id3tag
Expand All @@ -23,17 +23,19 @@ util.c:(.text+0x240): undefined reference to `uncompress'
Fixes:
- http://autobuild.buildroot.org/results/73efdacf237e3d567fa66f3b3f68e624f5e35bc7

Signed-off-by: Julien Olivain <[email protected]>
[Julien: rebased patch on package git version 7524160]
Signed-off-by: Fabrice Fontaine <[email protected]>
[Upstream status: https://sourceforge.net/p/sox/patches/123]
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 39306398..896714f5 100644
index a1665467..8f47a978 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ dnl Various libraries
@@ -88,7 +88,7 @@ dnl Various libraries
SOX_WITH_LIB([magic], [magic.h], [magic], [magic_open])
SOX_CHECK_LIB([ZLIB], [zlib.h], [z], [uncompress])
SOX_WITH_LIB([png], [png.h], [png], [png_set_rows], [], [], [], [$ZLIB_LIBS])
Expand All @@ -43,5 +45,5 @@ index 39306398..896714f5 100644

dnl Optional formats
--
2.29.2
2.45.2

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 4630e574e6c0269b94fd910e7c72b8ad1ee62ce7 Mon Sep 17 00:00:00 2001
From 76b78cb89cf8fc36b4ced568f3b34f778df53411 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <[email protected]>
Date: Wed, 3 Mar 2021 16:48:57 +0100
Subject: [PATCH] configure.ac: fix static linking with magic
Expand All @@ -24,17 +24,19 @@ compress.c:(.text+0x1d0): undefined reference to `inflateInit_'
Fixes:
- http://autobuild.buildroot.org/results/d96f27cd96926060046e2e1115777f5bceda3741

Signed-off-by: Julien Olivain <[email protected]>
[Julien: rebased patch on package git version 7524160]
Signed-off-by: Fabrice Fontaine <[email protected]>
[Upstream status: not sent yet (waiting for feedback on third patch)]
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 896714f5..8ae3202c 100644
index 8f47a978..20454ed5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,7 +80,7 @@ SOX_REPORT([other], [LADSPA effect plugins], [$HAVE_LADSPA])
@@ -85,7 +85,7 @@ SOX_REPORT([other], [LADSPA effect plugins], [$HAVE_LADSPA])

dnl Various libraries

Expand All @@ -44,5 +46,5 @@ index 896714f5..8ae3202c 100644
SOX_WITH_LIB([png], [png.h], [png], [png_set_rows], [], [], [], [$ZLIB_LIBS])
SOX_WITH_LIB([id3tag], [id3tag.h], [id3tag], [id3_file_open], [], [], [], [$ZLIB_LIBS])
--
2.30.1
2.45.2

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 06109c84ab6930265287049c4bf9405e7ebc4986 Mon Sep 17 00:00:00 2001
From 7a2e270989037663e740487a8248db1227697c92 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <[email protected]>
Date: Wed, 4 Aug 2021 10:27:16 +0200
Subject: [PATCH] configure.ac: fix static linking with sndfile
Expand All @@ -20,17 +20,19 @@ flac.c:(.text+0xfc): undefined reference to `FLAC__StreamDecoderErrorStatusStrin
Fixes:
- http://autobuild.buildroot.org/results/4bc58ed68b29642876bb02710d0cd4f31540de86

Signed-off-by: Julien Olivain <[email protected]>
[Julien: rebased patch on package git version 7524160]
Signed-off-by: Fabrice Fontaine <[email protected]>
[Upstream status: not sent yet (waiting for feedback on third patch)]
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 8ae3202c..26510769 100644
index 20454ed5..4330360b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,7 +117,7 @@ SOX_FMT_REQ([mp3], [MAD LAME TWOLAME])
@@ -122,7 +122,7 @@ SOX_FMT_REQ([mp3], [MAD LAME TWOLAME])
SOX_FMT_PKG([oggvorbis], [ogg vorbis vorbisenc vorbisfile])
SOX_FMT_PKG([opus], [opusfile])

Expand All @@ -40,5 +42,5 @@ index 8ae3202c..26510769 100644

SOX_FMT_LIB([wavpack], [wavpack/wavpack.h], [wavpack], [WavpackGetSampleRate])
--
2.30.2
2.45.2

0 comments on commit e336a03

Please sign in to comment.