[mpg123] Upgrade to 1.28.0 (#18403)

* [mpg123] Upgrade to 1.28.0

* [libopenmpt] Upgrade to 2017-01-28-cf2390140-2

* [mpg123] Disable UWP port

* Fix libmpg123 UWP build

* Fix libout123 UWP build

* Fix libsyn123 UWP build

* Update ports/libopenmpt/CMakeLists.txt

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/libopenmpt/CMakeLists.txt

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* [libopenmpt] Update libopenmpt.json

* [mpg123] Separate UWP patches

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
This commit is contained in:
evpobr 2021-07-01 01:06:48 +05:00 committed by GitHub
parent d2717c38db
commit 5edbbf1a70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 401 additions and 140 deletions

View File

@ -11,21 +11,11 @@ endif()
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
find_path(MPG123_INCLUDE_DIR NAMES mpg123.h) find_package(MPG123 REQUIRED)
find_library(MPG123_LIBRARY NAMES mpg123 libmpg123) find_package(Vorbis REQUIRED)
find_package(FLAC REQUIRED)
find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) find_package(portaudio REQUIRED)
find_path(OGG_INCLUDE_DIR ogg/ogg.h)
find_library(OGG_LIBRARY NAMES ogg)
find_library(VORBIS_LIBRARY NAMES vorbis)
find_library(VORBISFILE_LIBRARY NAMES vorbisfile)
find_path(FLAC_INCLUDE_DIR FLAC/all.h)
find_library(FLAC_LIBRARY NAMES FLAC flac)
find_path(PORTAUDIO_INCLUDE_DIR NAMES portaudio.h)
find_library(PORTAUDIO_LIBRARY NAMES portaudio)
set( set(
lib_headers lib_headers
@ -52,11 +42,6 @@ include_directories(
sounddsp sounddsp
soundlib soundlib
openmpt123 openmpt123
${MPG123_INCLUDE_DIR}
${VORBIS_INCLUDE_DIR}
${OGG_INCLUDE_DIR}
${FLAC_INCLUDE_DIR}
${PORTAUDIO_INCLUDE_DIR}
) )
set( set(
@ -242,28 +227,27 @@ endif()
target_link_libraries( target_link_libraries(
libopenmpt libopenmpt
PRIVATE PRIVATE
${OGG_LIBRARY} MPG123::libmpg123
${MPG123_LIBRARY} Vorbis::vorbisfile
${VORBISFILE_LIBRARY} FLAC::FLAC
${VORBIS_LIBRARY}
${VORBISFILE_LIBRARY}
ZLIB::ZLIB ZLIB::ZLIB
) )
if(BUILD_SHARED_LIBS)
set(PORTAUDIO_TARGET portaudio)
else()
set(PORTAUDIO_TARGET portaudio_static)
endif()
target_link_libraries( target_link_libraries(
openmpt123 openmpt123
PRIVATE PRIVATE
libopenmpt libopenmpt
${OGG_LIBRARY}
${MPG123_LIBRARY}
${VORBISFILE_LIBRARY}
${VORBIS_LIBRARY}
${VORBISFILE_LIBRARY}
${FLAC_LIBRARY}
${PORTAUDIO_LIBRARY}
Winmm Winmm
ZLIB::ZLIB ZLIB::ZLIB
${PORTAUDIO_TARGET}
) )
install( install(
TARGETS libopenmpt TARGETS libopenmpt
RUNTIME DESTINATION bin RUNTIME DESTINATION bin

View File

@ -1,7 +1,7 @@
{ {
"name": "libopenmpt", "name": "libopenmpt",
"version-string": "2017-01-28-cf2390140", "version-string": "2017-01-28-cf2390140",
"port-version": 1, "port-version": 2,
"description": "a library to render tracker music", "description": "a library to render tracker music",
"homepage": "https://github.com/OpenMPT/openmpt", "homepage": "https://github.com/OpenMPT/openmpt",
"supports": "!uwp", "supports": "!uwp",

View File

@ -0,0 +1,13 @@
diff --git a/ports/cmake/cmake/CheckCPUArch.cmake b/ports/cmake/cmake/CheckCPUArch.cmake
index 84dab8a..925aa09 100644
--- a/ports/cmake/cmake/CheckCPUArch.cmake
+++ b/ports/cmake/cmake/CheckCPUArch.cmake
@@ -2,7 +2,7 @@ macro(_CHECK_CPU_ARCH ARCH ARCH_DEFINES VARIABLE)
if(NOT DEFINED HAVE_${VARIABLE})
message(STATUS "Check CPU architecture is ${ARCH}")
set(CHECK_CPU_ARCH_DEFINES ${ARCH_DEFINES})
- configure_file(${PROJECT_SOURCE_DIR}/CheckCPUArch.c.in ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c @ONLY)
+ configure_file(${PROJECT_SOURCE_DIR}/cmake/CheckCPUArch.c.in ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c @ONLY)
try_compile(HAVE_${VARIABLE} "${PROJECT_BINARY_DIR}"
"${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c")
if(HAVE_${VARIABLE})

View File

@ -1,37 +0,0 @@
diff --git a/src/libmpg123/mangle.h b/src/libmpg123/mangle.h
index e37386a..b474e7f 100644
--- a/src/libmpg123/mangle.h
+++ b/src/libmpg123/mangle.h
@@ -85,6 +85,10 @@
#define ASM_VALUE(a) MANGLE_MACROCAT($,a)
#endif
+#if defined(_WIN32) && !defined(_WIN64)
+#define OPT_X86
+#endif
+
/* Enable position-independent code for certain platforms. */
#if defined(OPT_X86)
@@ -130,7 +134,7 @@ Lpic_base: \
/* Dummies for everyone else. */
#define LOCAL_VAR(a) a
#define GLOBAL_VAR ASM_NAME
-#define GLOBAL_VAR_PTR(a) .err Cannot use indirect addressing in non-PIC object.
+#define GLOBAL_VAR_PTR(a) // #error Cannot use indirect addressing in non-PIC object.
#define FUNC ASM_NAME
#define EXTERNAL_FUNC ASM_NAME
#define GET_GOT
diff --git a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
index f2bc362..07e81cd 100644
--- a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
+++ b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
@@ -1194,7 +1194,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_
</Command>
</PreLinkEvent>
<Lib>
- <AdditionalDependencies>Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(IntDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<Verbose>true</Verbose>
</Lib>

View File

@ -0,0 +1,21 @@
diff --git a/ports/cmake/src/CMakeLists.txt b/ports/cmake/src/CMakeLists.txt
index b843152..b8ff89b 100644
--- a/ports/cmake/src/CMakeLists.txt
+++ b/ports/cmake/src/CMakeLists.txt
@@ -39,8 +39,6 @@ check_include_file("termios.h" HAVE_TERMIOS)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_include_file("windows.h" HAVE_WINDOWS_H)
-check_symbol_exists(strerror "string.h" HAVE_STRERROR)
-
function(check_m)
set(CMAKE_REQUIRED_LIBRARIES m)
check_function_exists(sin HAVE_M)
@@ -59,6 +57,7 @@ check_function_exists(shmget HAVE_SHMGET)
check_function_exists(shmat HAVE_SHMAT)
check_function_exists(shmdt HAVE_SHMDT)
check_function_exists(shmctl HAVE_SHMCTL)
+check_function_exists(strerror HAVE_STRERROR)
search_libs(gethostbyname GETHOSTBYNAME_LIB nsl socket network)
search_libs(socket SOCKET_LIB socket)

View File

@ -0,0 +1,266 @@
diff --git a/ports/cmake/CMakeLists.txt b/ports/cmake/CMakeLists.txt
index b5008da..8e6309a 100644
--- a/ports/cmake/CMakeLists.txt
+++ b/ports/cmake/CMakeLists.txt
@@ -5,6 +5,13 @@ read_api_version(MPG123_VERSION API_VERSION OUTAPI_VERSION SYNAPI_VERSION)
project(mpg123 VERSION ${MPG123_VERSION} LANGUAGES C ASM)
+option(BUILD_LIBOUT123 "build libout123" ON)
+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ message(WARNING "Output module is not implemented for '${CMAKE_SYSTEM_NAME}' platform.")
+ message(WARNING "To prevent build errors 'BUILD_LIBOUT123' option is set to OFF.")
+ set(BUILD_LIBOUT123 OFF)
+endif()
+
include(cmake/search_libs.cmake)
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
@@ -34,17 +41,28 @@ set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}")
set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../libmpg123.pc.in" libmpg123.pc @ONLY)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../libout123.pc.in" libout123.pc @ONLY)
+if(BUILD_LIBOUT123)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../libout123.pc.in" libout123.pc @ONLY)
+endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../libsyn123.pc.in" libsyn123.pc @ONLY)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/libmpg123.pc"
- "${CMAKE_CURRENT_BINARY_DIR}/libout123.pc"
"${CMAKE_CURRENT_BINARY_DIR}/libsyn123.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
install(
FILES
"${CMAKE_CURRENT_SOURCE_DIR}/../../man1/mpg123.1"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../man1/out123.1"
DESTINATION "${CMAKE_INSTALL_MANDIR}")
+
+if(BUILD_LIBOUT123)
+ install(
+ FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/libout123.pc"
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+ install(
+ FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../man1/out123.1"
+ DESTINATION "${CMAKE_INSTALL_MANDIR}")
+endif()
diff --git a/ports/cmake/src/CMakeLists.txt b/ports/cmake/src/CMakeLists.txt
index b843152..3945c7e 100644
--- a/ports/cmake/src/CMakeLists.txt
+++ b/ports/cmake/src/CMakeLists.txt
@@ -194,112 +194,114 @@ endif()
# Modules
-if(CHECK_MODULES)
- list(FIND CHECK_MODULES alsa ALSA_REQUIRED)
- list(FIND CHECK_MODULES coreaudio COREAUDIO_REQUIRED)
- list(FIND CHECK_MODULES pulse PULSE_REQUIRED)
- list(FIND CHECK_MODULES jack JACK_REQUIRED)
- list(FIND CHECK_MODULES tinyalsa TINYALSA_REQUIRED)
- list(FIND CHECK_MODULES win32 WIN32_REQUIRED)
- list(FIND CHECK_MODULES win32_wasapi WIN32_WASAPI_REQUIRED)
- set(MODULE_NOT_FOUND_MESSAGE "module required but couldn't be found")
-endif()
-
-if(NOT CHECK_MODULES OR NOT ALSA_REQUIRED EQUAL -1)
- find_package(ALSA)
- if(TARGET ALSA::ALSA)
- list(APPEND OUTPUT_MODULES alsa)
- elseif(CHECK_MODULES AND NOT ALSA_REQUIRED EQUAL -1)
- message(FATAL_ERROR "alsa ${MODULE_NOT_FOUND_MESSAGE}")
+if(BUILD_LIBOUT123)
+ if(CHECK_MODULES)
+ list(FIND CHECK_MODULES alsa ALSA_REQUIRED)
+ list(FIND CHECK_MODULES coreaudio COREAUDIO_REQUIRED)
+ list(FIND CHECK_MODULES pulse PULSE_REQUIRED)
+ list(FIND CHECK_MODULES jack JACK_REQUIRED)
+ list(FIND CHECK_MODULES tinyalsa TINYALSA_REQUIRED)
+ list(FIND CHECK_MODULES win32 WIN32_REQUIRED)
+ list(FIND CHECK_MODULES win32_wasapi WIN32_WASAPI_REQUIRED)
+ set(MODULE_NOT_FOUND_MESSAGE "module required but couldn't be found")
endif()
-endif()
-if(NOT CHECK_MODULES OR NOT COREAUDIO_REQUIRED EQUAL -1)
- if(APPLE)
- find_library(AUDIO_TOOLBOX AudioToolbox)
- list(APPEND OUTPUT_MODULES coreaudio)
- elseif(CHECK_MODULES AND NOT COREAUDIO_REQUIRED EQUAL -1)
- message(FATAL_ERROR "coreaudio ${MODULE_NOT_FOUND_MESSAGE}")
+ if(NOT CHECK_MODULES OR NOT ALSA_REQUIRED EQUAL -1)
+ find_package(ALSA)
+ if(TARGET ALSA::ALSA)
+ list(APPEND OUTPUT_MODULES alsa)
+ elseif(CHECK_MODULES AND NOT ALSA_REQUIRED EQUAL -1)
+ message(FATAL_ERROR "alsa ${MODULE_NOT_FOUND_MESSAGE}")
+ endif()
endif()
-endif()
-find_package(PkgConfig)
-if(PKG_CONFIG_FOUND)
- if(NOT CHECK_MODULES OR NOT PULSE_REQUIRED EQUAL -1)
- pkg_search_module(PULSE libpulse-simple)
- if(PULSE_FOUND)
- list(APPEND OUTPUT_MODULES pulse)
- elseif(CHECK_MODULES AND NOT PULSE_REQUIRED EQUAL -1)
- message(FATAL_ERROR "pulse ${MODULE_NOT_FOUND_MESSAGE}")
+ if(NOT CHECK_MODULES OR NOT COREAUDIO_REQUIRED EQUAL -1)
+ if(APPLE)
+ find_library(AUDIO_TOOLBOX AudioToolbox)
+ list(APPEND OUTPUT_MODULES coreaudio)
+ elseif(CHECK_MODULES AND NOT COREAUDIO_REQUIRED EQUAL -1)
+ message(FATAL_ERROR "coreaudio ${MODULE_NOT_FOUND_MESSAGE}")
endif()
endif()
- if(NOT CHECK_MODULES OR NOT JACK_REQUIRED EQUAL -1)
- pkg_search_module(JACK jack)
- if(JACK_FOUND)
- list(APPEND OUTPUT_MODULES jack)
- elseif(CHECK_MODULES AND NOT JACK_REQUIRED EQUAL -1)
- message(FATAL_ERROR "jack ${MODULE_NOT_FOUND_MESSAGE}")
+ find_package(PkgConfig)
+ if(PKG_CONFIG_FOUND)
+ if(NOT CHECK_MODULES OR NOT PULSE_REQUIRED EQUAL -1)
+ pkg_search_module(PULSE libpulse-simple)
+ if(PULSE_FOUND)
+ list(APPEND OUTPUT_MODULES pulse)
+ elseif(CHECK_MODULES AND NOT PULSE_REQUIRED EQUAL -1)
+ message(FATAL_ERROR "pulse ${MODULE_NOT_FOUND_MESSAGE}")
+ endif()
+ endif()
+
+ if(NOT CHECK_MODULES OR NOT JACK_REQUIRED EQUAL -1)
+ pkg_search_module(JACK jack)
+ if(JACK_FOUND)
+ list(APPEND OUTPUT_MODULES jack)
+ elseif(CHECK_MODULES AND NOT JACK_REQUIRED EQUAL -1)
+ message(FATAL_ERROR "jack ${MODULE_NOT_FOUND_MESSAGE}")
+ endif()
endif()
- endif()
- if(NOT CHECK_MODULES OR NOT TINYALSA_REQUIRED EQUAL -1)
- pkg_search_module(TINYALSA tinyalsa)
- if(TINYALSA_FOUND)
- list(APPEND OUTPUT_MODULES tinyalsa)
- elseif(CHECK_MODULES AND NOT TINYALSA_REQUIRED EQUAL -1)
- message(FATAL_ERROR "tinyalsa ${MODULE_NOT_FOUND_MESSAGE}")
+ if(NOT CHECK_MODULES OR NOT TINYALSA_REQUIRED EQUAL -1)
+ pkg_search_module(TINYALSA tinyalsa)
+ if(TINYALSA_FOUND)
+ list(APPEND OUTPUT_MODULES tinyalsa)
+ elseif(CHECK_MODULES AND NOT TINYALSA_REQUIRED EQUAL -1)
+ message(FATAL_ERROR "tinyalsa ${MODULE_NOT_FOUND_MESSAGE}")
+ endif()
endif()
endif()
-endif()
-if(NOT CHECK_MODULES OR NOT WIN32_REQUIRED EQUAL -1)
- if(HAVE_WINDOWS_H)
- set(WIN32_LIBRARIES winmm)
- list(APPEND OUTPUT_MODULES win32)
- elseif(CHECK_MODULES AND NOT WIN32_REQUIRED EQUAL -1)
- message(FATAL_ERROR "win32 ${MODULE_NOT_FOUND_MESSAGE}")
+ if(NOT CHECK_MODULES OR NOT WIN32_REQUIRED EQUAL -1)
+ if(HAVE_WINDOWS_H)
+ set(WIN32_LIBRARIES winmm)
+ list(APPEND OUTPUT_MODULES win32)
+ elseif(CHECK_MODULES AND NOT WIN32_REQUIRED EQUAL -1)
+ message(FATAL_ERROR "win32 ${MODULE_NOT_FOUND_MESSAGE}")
+ endif()
endif()
-endif()
-if(NOT CHECK_MODULES OR NOT WIN32_WASAPI_REQUIRED EQUAL -1)
- set(WASAPI_INCLUDES "initguid.h" "audioclient.h" "mmdeviceapi.h" "avrt.h")
- check_include_files("${WASAPI_INCLUDES}" HAVE_WASAPI)
- if(HAVE_WASAPI)
- set(WIN32_WASAPI_LIBRARIES ole32 avrt)
- list(APPEND OUTPUT_MODULES win32_wasapi)
- elseif(CHECK_MODULES AND NOT WIN32_WASAPI_REQUIRED EQUAL -1)
- message(FATAL_ERROR "win32_wasapi ${MODULE_NOT_FOUND_MESSAGE}")
+ if(NOT CHECK_MODULES OR NOT WIN32_WASAPI_REQUIRED EQUAL -1)
+ set(WASAPI_INCLUDES "initguid.h" "audioclient.h" "mmdeviceapi.h" "avrt.h")
+ check_include_files("${WASAPI_INCLUDES}" HAVE_WASAPI)
+ if(HAVE_WASAPI)
+ set(WIN32_WASAPI_LIBRARIES ole32 avrt)
+ list(APPEND OUTPUT_MODULES win32_wasapi)
+ elseif(CHECK_MODULES AND NOT WIN32_WASAPI_REQUIRED EQUAL -1)
+ message(FATAL_ERROR "win32_wasapi ${MODULE_NOT_FOUND_MESSAGE}")
+ endif()
endif()
-endif()
-if(CHECK_MODULES)
- list(REMOVE_AT CHECK_MODULES
- ${ALSA_REQUIRED}
- ${COREAUDIO_REQUIRED}
- ${PULSE_REQUIRED}
- ${JACK_REQUIRED}
- ${TINYALSA_REQUIRED}
- ${WIN32_REQUIRED}
- ${WIN32_WASAPI_REQUIRED})
- list(LENGTH CHECK_MODULES CHECK_MODULES_LENGTH)
- if(NOT CHECK_MODULES_LENGTH EQUAL 0)
- message(FATAL_ERROR "Dunno how to find modules: ${CHECK_MODULES}")
+ if(CHECK_MODULES)
+ list(REMOVE_AT CHECK_MODULES
+ ${ALSA_REQUIRED}
+ ${COREAUDIO_REQUIRED}
+ ${PULSE_REQUIRED}
+ ${JACK_REQUIRED}
+ ${TINYALSA_REQUIRED}
+ ${WIN32_REQUIRED}
+ ${WIN32_WASAPI_REQUIRED})
+ list(LENGTH CHECK_MODULES CHECK_MODULES_LENGTH)
+ if(NOT CHECK_MODULES_LENGTH EQUAL 0)
+ message(FATAL_ERROR "Dunno how to find modules: ${CHECK_MODULES}")
+ endif()
endif()
-endif()
-if(NOT OUTPUT_MODULES)
- set(DEFAULT_OUTPUT_MODULE dummy)
- set(DEFAULT_OUTPUT_MODULES ${DEFAULT_OUTPUT_MODULE})
-else()
- list(GET OUTPUT_MODULES 0 _DEFAULT_OUTPUT_MODULE)
- set(DEFAULT_OUTPUT_MODULE ${_DEFAULT_OUTPUT_MODULE} CACHE STRING "Default output module")
- if(BUILD_SHARED_LIBS)
- string(REPLACE ";" "," DEFAULT_OUTPUT_MODULES "${OUTPUT_MODULES}")
- else()
+ if(NOT OUTPUT_MODULES)
+ set(DEFAULT_OUTPUT_MODULE dummy)
set(DEFAULT_OUTPUT_MODULES ${DEFAULT_OUTPUT_MODULE})
+ else()
+ list(GET OUTPUT_MODULES 0 _DEFAULT_OUTPUT_MODULE)
+ set(DEFAULT_OUTPUT_MODULE ${_DEFAULT_OUTPUT_MODULE} CACHE STRING "Default output module")
+ if(BUILD_SHARED_LIBS)
+ string(REPLACE ";" "," DEFAULT_OUTPUT_MODULES "${OUTPUT_MODULES}")
+ else()
+ set(DEFAULT_OUTPUT_MODULES ${DEFAULT_OUTPUT_MODULE})
+ endif()
+ set_property(CACHE DEFAULT_OUTPUT_MODULE PROPERTY STRINGS ${OUTPUT_MODULES})
endif()
- set_property(CACHE DEFAULT_OUTPUT_MODULE PROPERTY STRINGS ${OUTPUT_MODULES})
endif()
option(ACCURATE_ROUNDING "use rounding instead of fast truncation for integer output, where possible" ON)
@@ -362,7 +364,9 @@ add_compile_options(
add_subdirectory("compat")
add_subdirectory("libmpg123")
-add_subdirectory("libout123")
+if(BUILD_LIBOUT123)
+ add_subdirectory("libout123")
+endif()
add_subdirectory("libsyn123")
if(UNIX)

View File

@ -0,0 +1,52 @@
diff --git a/src/libmpg123/sample.h b/src/libmpg123/sample.h
index 4d244fe..ed3ef86 100644
--- a/src/libmpg123/sample.h
+++ b/src/libmpg123/sample.h
@@ -171,7 +171,7 @@ static inline int16_t ftoi16(float x)
( (u >= 2147483648UL) \
? (int32_t)((uint32_t)u - (uint32_t)2147483648UL) \
: ((u == 0) \
- ? (int32_t)-2147483648UL \
+ ? -(int32_t)2147483648UL \
: -(int32_t)((uint32_t)2147483648UL - u) ) \
)
diff --git a/src/libsyn123/resample.c b/src/libsyn123/resample.c
index b92f7f2..3552ffa 100644
--- a/src/libsyn123/resample.c
+++ b/src/libsyn123/resample.c
@@ -2005,7 +2005,7 @@ syn123_resample_intotal_64(long inrate, long outrate, int64_t outs)
// First offset is -inrate.
// You may want to work it out for yourself. Or trust me;-)
int err;
- uint64_t vtot = muloffdiv64(outs, vinrate, -vinrate, voutrate, &err, NULL);
+ uint64_t vtot = muloffdiv64(outs, vinrate, -(int64_t)vinrate, voutrate, &err, NULL);
if(err)
return SYN123_OVERFLOW;
if(vtot == UINT64_MAX)
diff --git a/src/libsyn123/sampleconv.c b/src/libsyn123/sampleconv.c
index 6e8fb3f..7179957 100644
--- a/src/libsyn123/sampleconv.c
+++ b/src/libsyn123/sampleconv.c
@@ -21,6 +21,8 @@
#include "syn123_int.h"
#include "sample.h"
#include "debug.h"
+// Avoid conflict with pragmas in isnan() and friends.
+#undef warning
/* Conversions between native byte order encodings. */
diff --git a/src/libsyn123/volume.c b/src/libsyn123/volume.c
index de018a2..a80851d 100644
--- a/src/libsyn123/volume.c
+++ b/src/libsyn123/volume.c
@@ -12,6 +12,8 @@
#define NO_SMAX
#include "syn123_int.h"
#include "debug.h"
+// Avoid conflict with pragmas in isnan() and friends.
+#undef warning
static const double db_min = -SYN123_DB_LIMIT;
static const double db_max = SYN123_DB_LIMIT;

View File

@ -1,26 +1,13 @@
set(MPG123_VERSION 1.26.5) set(MPG123_VERSION 1.28.0)
set(MPG123_HASH 0c2b3174c834e4bd459a3324b825d9bf9341a3486c0af815773b00cb007578cb718522ac4e983c7ad7e3bb5df9fdd342a03cb51345c41f68971145196ac04b7a) set(MPG123_HASH 4e333ee4f3bbebcfff280cf286265e969a8da93b9043d03c0189e22cd40918b07bf12181bd06141d4479c78bc0d0ed472e0d3bb61b2fdb96fe9f7cd48f9a6b77)
#architecture detection set(PATCHES "")
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") if(VCPKG_TARGET_IS_UWP)
set(MPG123_ARCH Win32) set(PATCHES
set(MPG123_CONFIGURATION _x86) 0002-fix-libmpg123-uwp-build.patch
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") 0003-fix-libout123-uwp-build.patch
set(MPG123_ARCH x64) 0004-fix-libsyn123-uwp-build.patch
set(MPG123_CONFIGURATION _x86) )
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(MPG123_ARCH ARM)
set(MPG123_CONFIGURATION _Generic)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(MPG123_ARCH ARM64)
set(MPG123_CONFIGURATION _Generic)
else()
message(FATAL_ERROR "unsupported architecture")
endif()
#linking
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(MPG123_CONFIGURATION_SUFFIX _Dll)
endif() endif()
vcpkg_from_sourceforge( vcpkg_from_sourceforge(
@ -30,60 +17,25 @@ vcpkg_from_sourceforge(
FILENAME "mpg123-${MPG123_VERSION}.tar.bz2" FILENAME "mpg123-${MPG123_VERSION}.tar.bz2"
SHA512 ${MPG123_HASH} SHA512 ${MPG123_HASH}
PATCHES PATCHES
0001-fix-x86-build.patch 0001-fix-checkcpuarch-path.patch
${PATCHES}
) )
include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake) include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake)
yasm_tool_helper(APPEND_TO_PATH) yasm_tool_helper(APPEND_TO_PATH)
macro(read_api_version) if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
file(READ "${SOURCE_PATH}/configure.ac" configure_ac)
string(REGEX MATCH "API_VERSION=([0-9]+)" result ${configure_ac})
set(API_VERSION ${CMAKE_MATCH_1})
endmacro()
if(VCPKG_TARGET_IS_UWP) vcpkg_configure_cmake(
vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH}/ports/cmake
SOURCE_PATH ${SOURCE_PATH} OPTIONS -DUSE_MODULES=OFF
PROJECT_SUBPATH ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj
OPTIONS /p:UseEnv=True
PLATFORM ${MPG123_ARCH}
RELEASE_CONFIGURATION Release_uwp
DEBUG_CONFIGURATION Debug_uwp
) )
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
vcpkg_fixup_pkgconfig()
file(INSTALL file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
${SOURCE_PATH}/ports/MSVC++/mpg123.h file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
${SOURCE_PATH}/src/libmpg123/fmt123.h
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)
read_api_version()
configure_file(
${SOURCE_PATH}/src/libmpg123/mpg123.h.in
${CURRENT_PACKAGES_DIR}/include/mpg123.h.in @ONLY
)
elseif(VCPKG_TARGET_IS_WINDOWS)
vcpkg_install_msbuild(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
OPTIONS /p:UseEnv=True
RELEASE_CONFIGURATION Release${MPG123_CONFIGURATION}${MPG123_CONFIGURATION_SUFFIX}
DEBUG_CONFIGURATION Debug${MPG123_CONFIGURATION}${MPG123_CONFIGURATION_SUFFIX}
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/mpg123.h
${SOURCE_PATH}/src/libmpg123/fmt123.h
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)
read_api_version()
configure_file(
${SOURCE_PATH}/src/libmpg123/mpg123.h.in
${CURRENT_PACKAGES_DIR}/include/mpg123.h.in @ONLY
)
elseif(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX) elseif(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX)
set(MPG123_OPTIONS set(MPG123_OPTIONS

View File

@ -1,6 +1,6 @@
{ {
"name": "mpg123", "name": "mpg123",
"version": "1.26.5", "version": "1.28.0",
"description": "mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3).", "description": "mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3).",
"homepage": "https://sourceforge.net/projects/mpg123/", "homepage": "https://sourceforge.net/projects/mpg123/",
"dependencies": [ "dependencies": [

View File

@ -3406,7 +3406,7 @@
}, },
"libopenmpt": { "libopenmpt": {
"baseline": "2017-01-28-cf2390140", "baseline": "2017-01-28-cf2390140",
"port-version": 1 "port-version": 2
}, },
"libopusenc": { "libopusenc": {
"baseline": "0.2.1", "baseline": "0.2.1",
@ -4137,7 +4137,7 @@
"port-version": 0 "port-version": 0
}, },
"mpg123": { "mpg123": {
"baseline": "1.26.5", "baseline": "1.28.0",
"port-version": 0 "port-version": 0
}, },
"mpi": { "mpi": {

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "465b2d6e597952e0ef962af05dce08769dba11e7",
"version-string": "2017-01-28-cf2390140",
"port-version": 2
},
{ {
"git-tree": "a6579258d2dab9e661a439e241ff20f2427b918e", "git-tree": "a6579258d2dab9e661a439e241ff20f2427b918e",
"version-string": "2017-01-28-cf2390140", "version-string": "2017-01-28-cf2390140",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "b34c661c7e28355ade113c330d1c3b93a77a4e13",
"version": "1.28.0",
"port-version": 0
},
{ {
"git-tree": "6e185d93bd44a85eda8d650c24df2f96da710d56", "git-tree": "6e185d93bd44a85eda8d650c24df2f96da710d56",
"version": "1.26.5", "version": "1.26.5",