mpg123-1.32.2

This commit is contained in:
Ozkan Sezer
2023-09-28 05:55:40 +03:00
parent de1a534fe6
commit 835d418436
13 changed files with 87 additions and 63 deletions

View File

@@ -1,19 +1,7 @@
DISCLAIMER: The contents of the ports directory are included for convenience,
but they usually contain files contributed by various people, not the core
mpg123 team. The stuff is not tested by us. In some cases, it's even
impossible to tell what is really inside. Use at your own risk (well, like
all Free Software, actually;-).
This directory used to contain some (contributed) works covering usage and/or
building of mpg123/libmpg123 from different programming environments. Since
they became too outdated, all but the CMake port were removed.
This directory contains some (contributed) works covering usage and/or building
of mpg123/libmpg123 from different programming environments. Note that those
may be a bit outdated (especially when a file is added/removed in libmpg123
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, especially
for just libmpg123 on Windows
There used to be other ports, last of those for the Sony PSP. There was not
much porting involved on that one, though, just a custom Makefile for building
a generic libmpg123.
The CMake build is primarily intended for platforms not well-supported by the
primary autotools-based build. It is tested occasionally, had some tuning
over time, but may get out of sync regarding possible build configurations.

View File

@@ -4,6 +4,7 @@ include(cmake/read_api_version.cmake)
read_api_version(MPG123_VERSION)
project(mpg123 VERSION ${MPG123_VERSION} LANGUAGES C ASM)
set(CMAKE_C_STANDARD 99)
option(BUILD_LIBOUT123 "build libout123 (prerequisite for included programs)" ON)
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")

View File

@@ -84,7 +84,7 @@ check_c_source_compiles(
#include <unistd.h>
#include <fcntl.h>
int fd = open(\"/foo\", O_RDONLY|O_LARGEFILE);
int main(){ return open(\"/foo\", O_RDONLY|O_LARGEFILE); }
" HAVE_O_LARGEFILE)
endif()
endif()

View File

@@ -10,4 +10,4 @@ set_target_properties(${TARGET}_dl PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_library(${TARGET}_str OBJECT
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/compat/compat_str.c")
set_target_properties(${TARGET}_dl PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(${TARGET}_str PROPERTIES POSITION_INDEPENDENT_CODE ON)

View File

@@ -181,6 +181,3 @@
#cmakedefine LFS_LARGEFILE_64 1
#cmakedefine LFS_SENSITIVE 1
#cmakedefine HAVE_O_LARGEFILE 1
#ifndef HAVE_O_LARGEFILE
#define O_LARGEFILE 0
#endif

View File

@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.12)
option(NO_FEATURE_REPORT "Disable feature report function" OFF)
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
option(WITH_SSE "x86: build with SSE support if detected. Turn OFF for older devices where autodetection is misleading." ON)
endif()
include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/")
@@ -121,6 +124,9 @@ elseif(MACHINE STREQUAL "x86")
endif()
cmake_host_system_information(RESULT HAVE_SSE QUERY HAS_SSE)
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
set(HAVE_SSE ${WITH_SSE})
endif()
if(HAVE_SSE)
set(PLATFORM_DEFINITIONS OPT_SSE)
set(PLATFORM_SOURCES
@@ -140,8 +146,6 @@ elseif(MACHINE STREQUAL "x86")
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/dct64_sse.S"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/synth_sse.S")
endif()
target_sources(${TARGET} PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/dct64_i386.c")
endif()
elseif(MACHINE STREQUAL "arm64")
set(PLATFORM_DEFINITIONS OPT_MULTI OPT_GENERIC OPT_GENERIC_DITHER OPT_NEON64)