mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
271 lines
7.9 KiB
Plaintext
271 lines
7.9 KiB
Plaintext
From 7a4df1a5ad033e8c6cd500689473aaf74873076f Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
|
Date: Sat, 13 Sep 2014 17:52:12 +0200
|
|
Subject: Haiku and gcc2 fixes.
|
|
|
|
|
|
diff --git a/mpc2sv8/CMakeLists.txt b/mpc2sv8/CMakeLists.txt
|
|
index eea0df0..694a391 100755
|
|
--- a/mpc2sv8/CMakeLists.txt
|
|
+++ b/mpc2sv8/CMakeLists.txt
|
|
@@ -24,10 +24,6 @@ if(WIN32)
|
|
target_link_libraries(mpc2sv8 winmm)
|
|
endif(WIN32)
|
|
|
|
-if(NOT MSVC)
|
|
-target_link_libraries(mpc2sv8 m)
|
|
-endif(NOT MSVC)
|
|
-
|
|
if(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
|
|
target_link_libraries(mpc2sv8 ossaudio)
|
|
endif(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
|
|
diff --git a/mpcchap/CMakeLists.txt b/mpcchap/CMakeLists.txt
|
|
index 743d5b6..7b379d5 100755
|
|
--- a/mpcchap/CMakeLists.txt
|
|
+++ b/mpcchap/CMakeLists.txt
|
|
@@ -23,8 +23,4 @@ endif(SHARED)
|
|
target_link_libraries(mpcchap mpcenc_static)
|
|
target_link_libraries(mpcchap ${CUEFILE_LIBRARY})
|
|
|
|
-if(NOT MSVC)
|
|
-target_link_libraries(mpcchap m)
|
|
-endif(NOT MSVC)
|
|
-
|
|
install(TARGETS mpcchap RUNTIME DESTINATION bin)
|
|
diff --git a/mpccut/CMakeLists.txt b/mpccut/CMakeLists.txt
|
|
index 7d15ce2..1c35147 100755
|
|
--- a/mpccut/CMakeLists.txt
|
|
+++ b/mpccut/CMakeLists.txt
|
|
@@ -20,8 +20,4 @@ endif(SHARED)
|
|
|
|
target_link_libraries(mpccut mpcenc_static)
|
|
|
|
-if(NOT MSVC)
|
|
-target_link_libraries(mpccut m)
|
|
-endif(NOT MSVC)
|
|
-
|
|
install(TARGETS mpccut RUNTIME DESTINATION bin)
|
|
diff --git a/mpcdec/CMakeLists.txt b/mpcdec/CMakeLists.txt
|
|
index da3123f..404711c 100755
|
|
--- a/mpcdec/CMakeLists.txt
|
|
+++ b/mpcdec/CMakeLists.txt
|
|
@@ -12,10 +12,6 @@ endif(MSVC)
|
|
|
|
add_executable(mpcdec_cmd mpcdec.c)
|
|
|
|
-if(NOT MSVC)
|
|
-target_link_libraries(mpcdec_cmd m)
|
|
-endif(NOT MSVC)
|
|
-
|
|
target_link_libraries(mpcdec_cmd wavformat_static)
|
|
|
|
if(SHARED)
|
|
diff --git a/mpcenc/CMakeLists.txt b/mpcenc/CMakeLists.txt
|
|
index f16824a..d3321b8 100755
|
|
--- a/mpcenc/CMakeLists.txt
|
|
+++ b/mpcenc/CMakeLists.txt
|
|
@@ -18,10 +18,6 @@ if(WIN32)
|
|
target_link_libraries(mpcenc winmm)
|
|
endif(WIN32)
|
|
|
|
-if(NOT MSVC)
|
|
-target_link_libraries(mpcenc m)
|
|
-endif(NOT MSVC)
|
|
-
|
|
if(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
|
|
target_link_libraries(mpcenc ossaudio)
|
|
endif(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
|
|
diff --git a/mpcenc/keyboard.c b/mpcenc/keyboard.c
|
|
index 6522b97..a8c81b1 100755
|
|
--- a/mpcenc/keyboard.c
|
|
+++ b/mpcenc/keyboard.c
|
|
@@ -17,6 +17,7 @@
|
|
*/
|
|
|
|
#include "mpcenc.h"
|
|
+#include <sys/time.h>
|
|
|
|
#if defined _WIN32 || defined __TURBOC__
|
|
|
|
diff --git a/mpcgain/CMakeLists.txt b/mpcgain/CMakeLists.txt
|
|
index 5445faf..1c125de 100755
|
|
--- a/mpcgain/CMakeLists.txt
|
|
+++ b/mpcgain/CMakeLists.txt
|
|
@@ -25,8 +25,4 @@ else(SHARED)
|
|
target_link_libraries(mpcgain mpcdec_static)
|
|
endif(SHARED)
|
|
|
|
-if(NOT MSVC)
|
|
-target_link_libraries(mpcgain m)
|
|
-endif(NOT MSVC)
|
|
-
|
|
install(TARGETS mpcgain RUNTIME DESTINATION bin)
|
|
diff --git a/mpcgain/mpcgain.c b/mpcgain/mpcgain.c
|
|
index d367fff..eb804f1 100755
|
|
--- a/mpcgain/mpcgain.c
|
|
+++ b/mpcgain/mpcgain.c
|
|
@@ -77,8 +77,8 @@ static mpc_inline MPC_SAMPLE_FORMAT max_abs(MPC_SAMPLE_FORMAT a, MPC_SAMPLE_FORM
|
|
|
|
static MPC_SAMPLE_FORMAT analyze_get_max(MPC_SAMPLE_FORMAT * sample_buffer, int sample_nb)
|
|
{
|
|
- Float_t left_samples[MPC_FRAME_LENGTH * sizeof(Float_t)];
|
|
- Float_t right_samples[MPC_FRAME_LENGTH * sizeof(Float_t)];
|
|
+ float_t left_samples[MPC_FRAME_LENGTH * sizeof(float_t)];
|
|
+ float_t right_samples[MPC_FRAME_LENGTH * sizeof(float_t)];
|
|
MPC_SAMPLE_FORMAT max = 0;
|
|
int i;
|
|
|
|
diff --git a/wavcmp/wavcmp.c b/wavcmp/wavcmp.c
|
|
index 702a352..f4b61b6 100755
|
|
--- a/wavcmp/wavcmp.c
|
|
+++ b/wavcmp/wavcmp.c
|
|
@@ -45,6 +45,7 @@ main(int argc, char **argv)
|
|
int is_wav_output;
|
|
int err;
|
|
int total_samples, total_diff;
|
|
+ t_wav_input_file_callback wavi_fc;
|
|
|
|
if(4 < argc && argc < 3)
|
|
{
|
|
@@ -52,7 +53,6 @@ main(int argc, char **argv)
|
|
return 0;
|
|
}
|
|
|
|
- t_wav_input_file_callback wavi_fc;
|
|
memset(&wav_in_1, 0, sizeof wav_in_1);
|
|
wavi_fc.m_read = wav_read;
|
|
wavi_fc.m_user_data = fopen(argv[1], "rb");
|
|
@@ -102,6 +102,7 @@ main(int argc, char **argv)
|
|
{
|
|
short sample_buff[2][512];
|
|
unsigned int samples[2];
|
|
+ int i = 0;
|
|
|
|
samples[0] = waveformat_input_process_int16(& wav_in_1, sample_buff[0], 512);
|
|
samples[1] = waveformat_input_process_int16(& wav_in_2, sample_buff[1], 512);
|
|
@@ -109,7 +110,6 @@ main(int argc, char **argv)
|
|
if (samples[0] != samples[1] || samples[0] == 0)
|
|
break;
|
|
|
|
- int i = 0;
|
|
for( ; i < samples[0]; i++) {
|
|
sample_buff[0][i] -= sample_buff[1][i];
|
|
if (sample_buff[0][i]) {
|
|
--
|
|
2.45.2
|
|
|
|
|
|
From 3f6e6454df8448ab1dd8009e4d21043d0beca1dc Mon Sep 17 00:00:00 2001
|
|
From: begasus <begasus@gmail.com>
|
|
Date: Mon, 3 Apr 2023 15:56:54 +0200
|
|
Subject: Fix installation paths
|
|
|
|
|
|
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
|
|
index 074461d..56ceb45 100755
|
|
--- a/include/CMakeLists.txt
|
|
+++ b/include/CMakeLists.txt
|
|
@@ -1 +1 @@
|
|
-INSTALL(DIRECTORY mpc DESTINATION include)
|
|
+INSTALL(DIRECTORY mpc DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
diff --git a/libmpcdec/CMakeLists.txt b/libmpcdec/CMakeLists.txt
|
|
old mode 100755
|
|
new mode 100644
|
|
index 0bc5b62..eaed254
|
|
--- a/libmpcdec/CMakeLists.txt
|
|
+++ b/libmpcdec/CMakeLists.txt
|
|
@@ -1,7 +1,9 @@
|
|
include_directories(${libmpc_SOURCE_DIR}/include)
|
|
if(SHARED)
|
|
add_library(mpcdec SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
|
|
+ INSTALL(TARGETS mpcdec DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
else(SHARED)
|
|
add_library(mpcdec_static STATIC huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
|
|
+ INSTALL(TARGETS mpcdec_static DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
endif(SHARED)
|
|
|
|
--
|
|
2.45.2
|
|
|
|
|
|
From 9839538b9c449351a12c4105e1ba941216a3cbc8 Mon Sep 17 00:00:00 2001
|
|
From: Begasus <begasus@gmail.com>
|
|
Date: Fri, 12 Jul 2024 18:33:55 +0200
|
|
Subject: applying patch musepack-tools-465-fno-common.patch
|
|
|
|
|
|
diff --git a/libmpcdec/requant.h b/libmpcdec/requant.h
|
|
index eb3124d..c95101f 100755
|
|
--- a/libmpcdec/requant.h
|
|
+++ b/libmpcdec/requant.h
|
|
@@ -47,9 +47,9 @@ extern "C" {
|
|
|
|
|
|
/* C O N S T A N T S */
|
|
-const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
|
|
-const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
|
|
-const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
|
|
+extern const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
|
|
+extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
|
|
+extern const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
|
|
|
|
#define Cc (__Cc + 1)
|
|
#define Dc (__Dc + 1)
|
|
--
|
|
2.45.2
|
|
|
|
|
|
From 60b2e2c4503cda7ae8c07fcdf68365de1d1dfe87 Mon Sep 17 00:00:00 2001
|
|
From: Schrijvers Luc <begasus@gmail.com>
|
|
Date: Fri, 12 Jul 2024 18:35:39 +0200
|
|
Subject: Fix crash, provided by waddlesplash
|
|
|
|
Co-authored-by: Augustin Cavalier <waddlesplash@gmail.com>
|
|
|
|
diff --git a/common/fastmath.c b/common/fastmath.c
|
|
old mode 100755
|
|
new mode 100644
|
|
index 2a23a59..d29d1cf
|
|
--- a/common/fastmath.c
|
|
+++ b/common/fastmath.c
|
|
@@ -21,11 +21,10 @@
|
|
|
|
#ifdef FAST_MATH
|
|
|
|
-const float tabatan2 [ 2*TABSTEP+1] [2];
|
|
-const float tabcos [26*TABSTEP+1] [2];
|
|
-const float tabsqrt_ex [256];
|
|
-const float tabsqrt_m [ TABSTEP+1] [2];
|
|
-
|
|
+float tabatan2 [ 2*TABSTEP+1] [2];
|
|
+float tabcos [26*TABSTEP+1] [2];
|
|
+float tabsqrt_ex [256];
|
|
+float tabsqrt_m [ TABSTEP+1] [2];
|
|
|
|
void Init_FastMath ( void )
|
|
{
|
|
diff --git a/include/mpc/mpcmath.h b/include/mpc/mpcmath.h
|
|
old mode 100755
|
|
new mode 100644
|
|
index 3b42a45..8a2a376
|
|
--- a/include/mpc/mpcmath.h
|
|
+++ b/include/mpc/mpcmath.h
|
|
@@ -87,10 +87,10 @@ static mpc_inline mpc_int32_t mpc_lrintf(float fVal)
|
|
# define IFLOORF(x) my_ifloor ((float)(x))
|
|
|
|
void Init_FastMath ( void );
|
|
-extern const float tabatan2 [] [2];
|
|
-extern const float tabcos [] [2];
|
|
-extern const float tabsqrt_ex [];
|
|
-extern const float tabsqrt_m [] [2];
|
|
+extern float tabatan2 [ 2*TABSTEP+1] [2];
|
|
+extern float tabcos [26*TABSTEP+1] [2];
|
|
+extern float tabsqrt_ex [256];
|
|
+extern float tabsqrt_m [ TABSTEP+1] [2];
|
|
|
|
static mpc_inline float my_atan2 ( float x, float y )
|
|
{
|
|
--
|
|
2.45.2
|
|
|