soxr: bump version.

This commit is contained in:
Jerome Duval
2019-09-27 19:48:34 +02:00
parent a0f4460f06
commit aa1fb07f60
3 changed files with 25 additions and 102 deletions

View File

@@ -1,99 +0,0 @@
From c592f1dd795750f36ade845fcd6dcea8d5eaf126 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Sun, 21 Dec 2014 17:28:56 +0000
Subject: Use stdbool.h and stdint.h if they are present
Fixes building on some exotic platforms like Haiku. Plus it's more
correct any way.
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a24952..b638184 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,7 +106,9 @@ if (WITH_AVFFT)
endif ()
check_function_exists (lrint HAVE_LRINT)
-check_include_files (fenv.h HAVE_FENV_H)
+check_include_files (fenv.h HAVE_FENV_H)
+check_include_files (stdbool.h HAVE_STDBOOL_H)
+check_include_files (stdint.h HAVE_STDINT_H)
test_big_endian (WORDS_BIGENDIAN)
macro (make_exist)
diff --git a/examples/examples-common.h b/examples/examples-common.h
index 585fac3..1474cb5 100644
--- a/examples/examples-common.h
+++ b/examples/examples-common.h
@@ -12,6 +12,8 @@
#include <stdlib.h>
#include <string.h>
+#include "../soxr-config.h"
+
#ifdef _WIN32
/* Work-around for broken file-I/O on MS-Windows: */
#include <io.h>
@@ -25,18 +27,6 @@
#define USE_STD_STDIO
#endif
-#undef int16_t
-#define int16_t short
-
-#undef int32_t
-#if LONG_MAX > 2147483647L
- #define int32_t int
-#elif LONG_MAX < 2147483647L
- #error this programme requires that 'long int' has at least 32-bits
-#else
- #define int32_t long
-#endif
-
#undef min
#undef max
#define min(x,y) ((x)<(y)?(x):(y))
diff --git a/soxr-config.h.in b/soxr-config.h.in
index 227bcfd..d93987b 100644
--- a/soxr-config.h.in
+++ b/soxr-config.h.in
@@ -10,17 +10,23 @@
#define HAVE_SIMD @HAVE_SIMD@
#define HAVE_FENV_H @HAVE_FENV_H@
#define HAVE_LRINT @HAVE_LRINT@
+#define HAVE_STDBOOL_H @HAVE_STDBOOL_H@
+#define HAVE_STDINT_H @HAVE_STDINT_H@
#define WORDS_BIGENDIAN @WORDS_BIGENDIAN@
-#include <limits.h>
-
+#if !HAVE_STDBOOL_H
#undef bool
#undef false
#undef true
#define bool int
#define false 0
#define true 1
+#else /* HAVE_STDBOOL_H */
+#include <stdbool.h>
+#endif
+#if !HAVE_STDINT_H
+#include <limits.h>
#undef int16_t
#undef int32_t
#undef int64_t
@@ -42,5 +48,7 @@
#endif
#define uint32_t unsigned int32_t
#define uint64_t unsigned int64_t
-
+#else /* HAVE_STDINT_H */
+#include <stdint.h>
+#endif
#endif
--
1.8.3.4

View File

@@ -0,0 +1,22 @@
From ed8a9a331a78358b931626468716df1cfa1da847 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 27 Sep 2019 19:42:33 +0200
Subject: remove non-gcc2 warnings.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ee48f6c..77bb2d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -153,7 +153,7 @@ test_big_endian (HAVE_BIGENDIAN)
# Compiler configuration:
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
- set (PROJECT_CXX_FLAGS "${PROJECT_CXX_FLAGS} -Wconversion -Wall -Wextra \
+ set (PROJECT_CXX_FLAGS "${PROJECT_CXX_FLAGS} -Wconversion -Wall \
-pedantic -Wundef -Wpointer-arith -Wno-long-long")
if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
set (PROJECT_CXX_FLAGS "${PROJECT_CXX_FLAGS} -Wno-keyword-macro")
--
2.23.0

View File

@@ -7,7 +7,7 @@ COPYRIGHT="2007-2013 Rob Sykes"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="http://downloads.sourceforge.net/project/soxr/soxr-$portVersion-Source.tar.xz"
CHECKSUM_SHA256="54e6f434f1c491388cd92f0e3c47f1ade082cc24327bdc43762f7d1eefe0c275"
CHECKSUM_SHA256="b111c15fdc8c029989330ff559184198c161100a59312f5dc19ddeb9b5a15889"
SOURCE_DIR="soxr-$portVersion-Source"
PATCHES="soxr-$portVersion.patchset"
@@ -16,7 +16,7 @@ SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
soxr${secondaryArchSuffix} = $portVersion
lib:libsoxr$secondaryArchSuffix = 0.1.1 compat >= 0
lib:libsoxr$secondaryArchSuffix = 0.1.2 compat >= 0
lib:libsoxr_lsr$secondaryArchSuffix = 0.1.9 compat >= 0
"
REQUIRES="
@@ -30,7 +30,7 @@ fi
PROVIDES_devel="
soxr${secondaryArchSuffix}_devel = $portVersion
devel:libsoxr$secondaryArchSuffix = 0.1.1 compat >= 0
devel:libsoxr$secondaryArchSuffix = 0.1.2 compat >= 0
devel:libsoxr_lsr$secondaryArchSuffix = 0.1.9 compat >= 0
"
REQUIRES_devel="