mpg123-1.31.0

This commit is contained in:
Ozkan Sezer
2022-10-28 22:39:00 +03:00
parent b26727f0be
commit cd6cf37dee
53 changed files with 1275 additions and 1229 deletions

View File

@@ -11,15 +11,7 @@ sources); as the team lacks resource to test everything. But in any case,
the ports can provide a good starting point on the respective platform, to get
it to work with minimal fuzz.
- cmake: CMake build to get started on non-Unix-like platforms
- Delphi: mpg123_.pas
Unit for linking against libmpg123 (Win32, DLL).
...by Arthur Pires <arthurprs@gmail.com>
- cmake: CMake build to get started on non-Unix-like platforms, especially
for just libmpg123 on Windows
- Sony PSP: Sony_PSP/; building libmpg123 for the PSP (used for the MODO player).
...by Bastian Pflieger <wb@illogical.de>
- Xcode contains the project file for building and using libmpg123 with
Xcode for Mac and iOS (arm and simulator builds). Please add the
ports/Xcode folder to the header search path of your project so that
Xcode can find the right mpg123.h and config.h. Then drag the mpg123
Xcode project into your own project. Finally in your build target, build
phases, add mpg123-ios or mpg123-mac to the libraries to link.

View File

@@ -0,0 +1,7 @@
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR "i686")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -m32" CACHE STRING "asm flags")

View File

@@ -8,20 +8,25 @@ include(CheckSymbolExists)
include(CMakeDependentOption)
include(TestBigEndian)
check_include_file("arpa/inet.h" HAVE_ARPA_INET_H)
check_include_file("dirent.h" HAVE_DIRENT_H)
check_include_file("dlfcn.h" HAVE_DLFCN_H)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
check_include_file("langinfo.h" HAVE_LANGINFO_H)
check_include_file("limits.h" HAVE_LIMITS_H)
check_include_file("locale.h" HAVE_LOCALE_H)
check_include_file("netdb.h" HAVE_NETDB_H)
check_include_file("netinet/in.h" HAVE_NETINET_IN_H)
check_include_file("sched.h" HAVE_SCHED_H)
check_include_file("signal.h" HAVE_SIGNAL_H)
check_include_file("stdio.h" HAVE_STDIO_H)
check_include_file("stdint.h" HAVE_STDINT_H)
check_include_file("stdlib.h" HAVE_STDLIB_H)
check_include_file("string.h" HAVE_STRING_H)
check_include_file("strings.h" HAVE_STRINGS_H)
check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H)
check_include_file("sys/ipc.h" HAVE_SYS_IPC_H)
check_include_file("sys/param.h" HAVE_SYS_PARAM_H)
check_include_file("sys/resource.h" HAVE_SYS_RESOURCE_H)
check_include_file("sys/select.h" HAVE_SYS_SELECT_H)
check_include_file("sys/shm.h" HAVE_SYS_SHM_H)
@@ -46,6 +51,8 @@ check_function_exists(mkfifo HAVE_MKFIFO)
check_function_exists(mmap HAVE_MMAP)
check_function_exists(nl_langinfo HAVE_NL_LANGINFO)
check_function_exists(random HAVE_RANDOM)
check_function_exists(setenv HAVE_SETENV)
check_function_exists(unsetenv HAVE_UNSETENV)
check_function_exists(setlocale HAVE_SETLOCALE)
check_function_exists(setpriority HAVE_SETPRIORITY)
check_function_exists(shmget HAVE_SHMGET)
@@ -173,6 +180,10 @@ if(WIN32)
set(HAVE_MKFIFO ON)
endif()
if(HAVE_NETDB_H AND HAVE_SYS_PARAM_H AND HAVE_SYS_SOCKET_H AND HAVE_NETINET_IN_H AND HAVE_ARPA_INET_H)
set(HAVE_NETWORK ON)
endif()
if(NO_MESSAGES)
set(NO_WARNING ON)
set(NO_ERRORMSG ON)
@@ -313,6 +324,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -pedantic")
endif()
endif()
cmake_dependent_option(NETWORK "network support (http streams / webradio)" ON "HAVE_NETWORK" OFF)
option(NEWOLD_WRITE_SAMPLE "enable new/old WRITE_SAMPLE macro for non-accurate 16 bit output, faster on certain CPUs (default on on x86-32)" OFF)
cmake_dependent_option(NO_BUFFER "enable audio buffer code (default uses system whitelist... proper checks later)" OFF "HAVE_MMAP OR HAVE_SYS_IPC_H AND HAVE_SYS_SHM_H AND HAVE_SHMGET AND HAVE_SHMAT AND HAVE_SHMDT AND HAVE_SHMCTL" ON)
option(NO_DOWNSAMPLE "no downsampled decoding" OFF)
@@ -342,7 +354,6 @@ option(SYN123_NO_CASES "include special cases for likely parameter values (chann
cmake_dependent_option(USE_MODULES "dynamically loadable output modules" ON "BUILD_SHARED_LIBS;HAVE_WIN_DL OR HAVE_UNIX_DL" OFF)
option(USE_NEW_HUFFTABLE "use new huffman decoding scheme by Taihei (faster on modern CPUs at least, so on by default)" ON)
configure_file(config.cmake.h.in config.h)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/"
@@ -370,7 +381,7 @@ if(UNIX)
if(BUILD_PROGRAMS)
if(HAVE_FORK AND HAVE_EXECVP)
if(HAVE_FORK AND HAVE_EXECVP AND NETWORK)
set(NET123 ON)
set(NET123_EXEC ON)
endif()
@@ -449,3 +460,5 @@ if(UNIX)
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/")
endif()
endif()
configure_file(config.cmake.h.in config.h)

View File

@@ -43,6 +43,7 @@
#cmakedefine HAVE_STDLIB_H 1
#cmakedefine HAVE_STRERROR 1
#cmakedefine HAVE_STRING_H 1
#cmakedefine HAVE_STRINGS_H 1
#cmakedefine HAVE_SYS_IOCTL_H 1
#cmakedefine HAVE_SYS_RESOURCE_H 1
#cmakedefine HAVE_SYS_SELECT_H 1
@@ -69,9 +70,13 @@
#define LFS_ALIAS_BITS @LFS_ALIAS_BITS@
#define LT_MODULE_EXT "@CMAKE_SHARED_MODULE_SUFFIX@"
// Define if network support is enabled.
#cmakedefine NETWORK 1
// Define for new-style network code.
#cmakedefine NET123 1
#cmakedefine
#cmakedefine NET123_EXEC 1
#cmakedefine NET123_WINHTTP 1
#cmakedefine NET123_WININET 1
// Define to disable downsampled decoding.
#cmakedefine NO_DOWNSAMPLE 1

View File

@@ -214,6 +214,9 @@ endif()
set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME mpg123)
target_compile_definitions(${TARGET} PRIVATE
$<$<BOOL:$<TARGET_PROPERTY:POSITION_INDEPENDENT_CODE>>:PIC>)
target_compile_definitions(${TARGET} PRIVATE
${PLATFORM_DEFINITIONS}
$<$<BOOL:${HAVE_FPU}>:REAL_IS_FLOAT>