Port of libmpg123 1.25.10

Real time MPEG 1.0/2.0/2.5 audio decoder for layers 1,2 and 3.

http://www.mpg123.de/

Ref #101
This commit is contained in:
Emery Hemingway
2018-03-24 11:34:34 +01:00
committed by Norman Feske
parent 94396aa7d5
commit 1b3cb0f0d6
14 changed files with 264 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
MPG123_PORT_DIR := $(call select_from_ports,mpg123)
MPG123_SRC_DIR = $(MPG123_PORT_DIR)/src/lib/mpg123/src/libmpg123
MPG123_INC_DIR = $(MPG123_PORT_DIR)/include
INC_DIR += $(MPG123_INC_DIR)

20
lib/mk/libmpg123.inc Normal file
View File

@@ -0,0 +1,20 @@
SHARED_LIB = 1
LIBS += libc
include $(REP_DIR)/lib/import/import-libmpg123.mk
vpath %.c $(MPG123_SRC_DIR)
vpath %.c $(MPG123_SRC_DIR)/../compat
vpath %.S $(MPG123_SRC_DIR)
INC_DIR += $(MPG123_SRC_DIR)
INC_DIR += $(MPG123_SRC_DIR)/..
INC_DIR += $(MPG123_SRC_DIR)/../compat
INC_DIR += $(REP_DIR)/src/lib/mpg123
CC_DEF += -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT
CC_DEF += -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math
SRC_C += frame.c tabinit.c libmpg123.c synth.c dither.c stringbuf.c readers.c icy2utf8.c layer1.c ntom.c dct64.c optimize.c equalizer.c layer2.c layer3.c lfs_alias.c icy.c format.c parse.c synth_8bit.c id3.c synth_real.c synth_s32.c index.c feature.c
SRC_C += compat.c compat_str.c

View File

@@ -0,0 +1 @@
$(error libmpg123 not available for ARM, see $(REP_DIR)/lib/mk/spec/x86_64/libmpg123.mk)

View File

@@ -0,0 +1,5 @@
include $(REP_DIR)/lib/mk/libmpg123.inc
CC_DEF += -DOPT_X86_64
SRC_S += $(notdir $(wildcard $(MPG123_SRC_DIR)/*x86_64*.S))

115
lib/symbols/libmpg123 Normal file
View File

@@ -0,0 +1,115 @@
mpg123_add_string T
mpg123_add_substring T
mpg123_chomp_string T
mpg123_clip T
mpg123_close T
mpg123_copy_string T
mpg123_current_decoder T
mpg123_decode T
mpg123_decode_frame T
mpg123_decode_frame_64 T
mpg123_decoder T
mpg123_decoders T
mpg123_delete T
mpg123_delete_pars T
mpg123_enc_from_id3 T
mpg123_encodings T
mpg123_encsize T
mpg123_eq T
mpg123_errcode T
mpg123_exit T
mpg123_feature T
mpg123_feed T
mpg123_feedseek T
mpg123_feedseek_64 T
mpg123_fmt T
mpg123_fmt_all T
mpg123_fmt_none T
mpg123_fmt_support T
mpg123_format T
mpg123_format_all T
mpg123_format_none T
mpg123_format_support T
mpg123_framebyframe_decode T
mpg123_framebyframe_decode_64 T
mpg123_framebyframe_next T
mpg123_framedata T
mpg123_framelength T
mpg123_framelength_64 T
mpg123_framepos T
mpg123_framepos_64 T
mpg123_free_string T
mpg123_geteq T
mpg123_getformat T
mpg123_getformat2 T
mpg123_getpar T
mpg123_getparam T
mpg123_getstate T
mpg123_getvolume T
mpg123_grow_string T
mpg123_icy T
mpg123_icy2utf8 T
mpg123_id3 T
mpg123_index T
mpg123_index_64 T
mpg123_info T
mpg123_init T
mpg123_init_string T
mpg123_length T
mpg123_length_64 T
mpg123_meta_check T
mpg123_meta_free T
mpg123_new T
mpg123_new_pars T
mpg123_noise T
mpg123_open T
mpg123_open_64 T
mpg123_open_fd T
mpg123_open_fd_64 T
mpg123_open_feed T
mpg123_open_handle T
mpg123_open_handle_64 T
mpg123_outblock T
mpg123_par T
mpg123_param T
mpg123_parnew T
mpg123_plain_strerror T
mpg123_position T
mpg123_position_64 T
mpg123_rates T
mpg123_read T
mpg123_replace_buffer T
mpg123_replace_reader T
mpg123_replace_reader_64 T
mpg123_replace_reader_handle T
mpg123_replace_reader_handle_64 T
mpg123_reset_eq T
mpg123_resize_string T
mpg123_safe_buffer T
mpg123_scan T
mpg123_seek T
mpg123_seek_64 T
mpg123_seek_frame T
mpg123_seek_frame_64 T
mpg123_set_filesize T
mpg123_set_filesize_64 T
mpg123_set_index T
mpg123_set_index_64 T
mpg123_set_string T
mpg123_set_substring T
mpg123_spf T
mpg123_store_utf8 T
mpg123_strerror T
mpg123_strlen T
mpg123_supported_decoders T
mpg123_tell T
mpg123_tell_64 T
mpg123_tell_stream T
mpg123_tell_stream_64 T
mpg123_tellframe T
mpg123_tellframe_64 T
mpg123_timeframe T
mpg123_timeframe_64 T
mpg123_tpf T
mpg123_volume T
mpg123_volume_change T

1
ports/mpg123.hash Normal file
View File

@@ -0,0 +1 @@
30616c6ac21c64772570a301590d91c5df1af6b8

25
ports/mpg123.port Normal file
View File

@@ -0,0 +1,25 @@
LICENSE := LGPLv2.1
VERSION := 1.25.10
DOWNLOADS := mpg123.archive
API_VERSION := 44 # found in configure.ac
URL(mpg123) := http://downloads.sourceforge.net/project/mpg123/mpg123/$(VERSION)/mpg123-$(VERSION).tar.bz2
SHA(mpg123) := 604784ddbcfe282bffdc595d1d45c677c7cf381f
DIR(mpg123) := src/lib/mpg123
DIRS := include
DIR_CONTENT(include) = src/lib/mpg123/src/libmpg123/fmt123.h
default: include/mpg123.h
include/mpg123.h: src/lib/mpg123/src/libmpg123/mpg123.h.in
@$(MSG_GENERATE)$(notdir $@)
$(VERBOSE)mkdir -p $(dir $@)
$(VERBOSE)sed \
-e 's/@API_VERSION@/$(API_VERSION)/' \
-e '/@.*@/d' \
$< > $@
src/lib/mpg123/src/libmpg123/mpg123.h.in: $(DOWNLOADS)
src/lib/mpg123/src/config.h.in: $(DOWNLOADS)

View File

@@ -0,0 +1,17 @@
#
# libmpg123 has an API version number that this package
# should be pegged to, see MPG123_API_VERSION in mpg123.h
#
content: include lib/symbols/libmpg123 LICENSE
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/mpg123)
include:
cp -r $(PORT_DIR)/$@ $@
lib/symbols/libmpg123:
$(mirror_from_rep_dir)
LICENSE:
cp $(PORT_DIR)/src/lib/mpg123/COPYING $@

View File

@@ -0,0 +1 @@
44 61e4133d67189adcb75b868de5f3ad7381fbe68d

View File

@@ -0,0 +1 @@
libmpg123

View File

@@ -0,0 +1,23 @@
MIRROR_FROM_REP_DIR = \
src/lib/mpg123/config.h \
lib/import/import-libmpg123.mk \
lib/mk/libmpg123.inc \
lib/mk/spec/x86_64/libmpg123.mk \
lib/mk/spec/arm/libmpg123.mk \
content: $(MIRROR_FROM_REP_DIR)
$(MIRROR_FROM_REP_DIR):
$(mirror_from_rep_dir)
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/mpg123)
content: src/lib/mpg123/target.mk LICENSE
src/lib/mpg123/target.mk:
mkdir -p src/lib/mpg123
cp -r $(PORT_DIR)/src/lib/mpg123/* src/lib/mpg123
echo "LIBS = libmpg123" > $@
LICENSE:
cp $(PORT_DIR)/src/lib/mpg123/COPYING $@

View File

@@ -0,0 +1 @@
2018-03-24 44b1460890c468d2aca6be56caf0faf075df29d4

View File

@@ -0,0 +1,2 @@
base
libc

48
src/lib/mpg123/config.h Normal file
View File

@@ -0,0 +1,48 @@
#define ASMALIGN_BALIGN 1
#define CCALIGN 1
#define DYNAMIC_BUILD 1
#define FRAME_INDEX 1
#define GAPLESS 1
#define HAVE_ATOLL 1
#define HAVE_DIRENT_H 1
#define HAVE_DLCLOSE 1
#define HAVE_DLFCN_H 1
#define HAVE_DLOPEN 1
#define HAVE_DLSYM 1
#define HAVE_GETPAGESIZE 1
#define HAVE_GETUID 1
#define HAVE_INTTYPES_H 1
#define HAVE_LIBM 1
#define HAVE_LIMITS_H 1
#define HAVE_MEMORY_H 1
#define HAVE_RANDOM 1
#define HAVE_STDINT_H 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRERROR 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_RESOURCE_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_SIGNAL_H 1
#define HAVE_SYS_SOUNDCARD_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_TERMIOS 1
#define HAVE_UNISTD_H 1
#define IEEE_FLOAT 1
#define INDEX_SIZE 1000
#define LFS_ALIAS_BITS 64
#define SIZEOF_INT32_T 4
#define SIZEOF_LONG 8
#define SIZEOF_OFF_T 8
#define SIZEOF_SIZE_T 8
#define SIZEOF_SSIZE_T 8
#define STDC_HEADERS 1
#define USE_MODULES 1
#define USE_NEW_HUFFTABLE 1
#define lfs_alias_t off_t