ports of Xiph's Ogg, Vorbis, FLAC libraries

https://xiph.org/

Ref #47
This commit is contained in:
Emery Hemingway
2016-10-15 16:10:39 +02:00
committed by Norman Feske
parent 7459fad8a3
commit 2a7572d374
13 changed files with 158 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#ifndef __CONFIG_TYPES_H__
#define __CONFIG_TYPES_H__
/* these are filled in by configure */
#define INCLUDE_INTTYPES_H 1
#define INCLUDE_STDINT_H 1
#define INCLUDE_SYS_TYPES_H 1
#if INCLUDE_INTTYPES_H
# include <inttypes.h>
#endif
#if INCLUDE_STDINT_H
# include <stdint.h>
#endif
#if INCLUDE_SYS_TYPES_H
# include <sys/types.h>
#endif
typedef int16_t ogg_int16_t;
typedef uint16_t ogg_uint16_t;
typedef int32_t ogg_int32_t;
typedef uint32_t ogg_uint32_t;
typedef int64_t ogg_int64_t;
#endif

View File

@@ -0,0 +1,3 @@
FLAC_PORT_DIR := $(call select_from_ports,flac)
INC_DIR += $(FLAC_PORT_DIR)/include

View File

@@ -0,0 +1,2 @@
LIBOGG_PORT_DIR := $(call select_from_ports,libogg)
INC_DIR += $(LIBOGG_PORT_DIR)/include

View File

@@ -0,0 +1,2 @@
LIBVORBIS_PORT_DIR := $(call select_from_ports,libvorbis)
INC_DIR += $(LIBVORBIS_PORT_DIR)/include

48
lib/mk/libFLAC.mk Normal file
View File

@@ -0,0 +1,48 @@
include $(REP_DIR)/lib/import/import-libFLAC.mk
FLAC_SRC_DIR = $(FLAC_PORT_DIR)/src/lib/flac
LIBFLAC_SRC_DIR = $(FLAC_SRC_DIR)/src/libFLAC
LIBS += libc libogg
SHARED_LIB = yes
CC_OPT += -DHAVE_CONFIG_H
INC_DIR += \
$(LIBFLAC_SRC_DIR)/include \
$(FLAC_SRC_DIR)/include
SRC_C = \
bitmath.c \
bitreader.c \
bitwriter.c \
cpu.c \
crc.c \
fixed.c \
fixed_intrin_sse2.c \
fixed_intrin_ssse3.c \
float.c \
format.c \
lpc.c \
lpc_intrin_sse.c \
lpc_intrin_sse2.c \
lpc_intrin_sse41.c \
lpc_intrin_avx2.c \
md5.c \
memory.c \
metadata_iterators.c \
metadata_object.c \
stream_decoder.c \
stream_encoder.c \
stream_encoder_intrin_sse2.c \
stream_encoder_intrin_ssse3.c \
stream_encoder_intrin_avx2.c \
stream_encoder_framing.c \
window.c \
ogg_decoder_aspect.c \
ogg_encoder_aspect.c \
ogg_helper.c \
ogg_mapping.c
vpath %.c $(LIBFLAC_SRC_DIR)

11
lib/mk/libogg.mk Normal file
View File

@@ -0,0 +1,11 @@
include $(REP_DIR)/lib/import/import-libogg.mk
LIBOGG_SRC_DIR = $(LIBOGG_PORT_DIR)/src/lib/libogg/src
SRC_C = framing.c bitwise.c
LIBS += libc
vpath %.c $(LIBOGG_SRC_DIR)
SHARED_LIB = yes

20
lib/mk/libvorbis.mk Normal file
View File

@@ -0,0 +1,20 @@
include $(REP_DIR)/lib/import/import-libvorbis.mk
LIBVORBIS_SRC_DIR = $(LIBVORBIS_PORT_DIR)/src/lib/libvorbis/lib
INC_DIR += $(LIBVORBIS_SRC_DIR)
# filter the test programs
FILTER_OUT = barmel.c tone.c psytune.c
SRC_C = $(filter-out $(FILTER_OUT), $(notdir $(wildcard $(LIBVORBIS_SRC_DIR)/*.c)))
SRC_C += $(notdir $(wildcard $(LIBVORBIS_SRC_DIR)/books/*.c))
SRC_C += $(notdir $(wildcard $(LIBVORBIS_SRC_DIR)/modes/*.c))
LIBS = libogg libc
vpath %.c $(LIBVORBIS_SRC_DIR)
vpath %.c $(LIBVORBIS_SRC_DIR)/books
vpath %.c $(LIBVORBIS_SRC_DIR)/modes
SHARED_LIB = yes

1
ports/flac.hash Normal file
View File

@@ -0,0 +1 @@
f8f110544e8b8be4d96cca156292d7719fa9baf1

23
ports/flac.port Normal file
View File

@@ -0,0 +1,23 @@
LICENSE := BSD
VERSION := 1.3.1
DOWNLOADS := flac.archive
URL(flac) := http://downloads.xiph.org/releases/flac/flac-$(VERSION).tar.xz
SHA(flac) := 38e17439d11be26207e4af0ff50973815694b26f
DIR(flac) := src/lib/flac
DIRS := include/FLAC include/FLAC++
DIR_CONTENT(include/FLAC) := src/lib/flac/include/FLAC/*.h
DIR_CONTENT(include/FLAC++) := src/lib/flac/include/FLAC++/*.h
_dirs: src/lib/flac/include/config.h
src/lib/flac/include/config.h: src/lib/flac/config.h.in
@$(MSG_GENERATE)$@
$(VERBOSE) sed \
-e 's/#undef VERSION/#define VERSION "$(VERSION)"/'\
-e 's/#undef FLAC__HAS_OGG/#define FLAC__HAS_OGG 1/' \
-e 's/#undef HAVE_LROUND/#define HAVE_LROUND 1/' \
$< > $@
src/lib/flac/config.h.in: $(DOWNLOADS)

1
ports/libogg.hash Normal file
View File

@@ -0,0 +1 @@
99b7247b4569173f8dc2847bbbb83289f023cfc4

11
ports/libogg.port Normal file
View File

@@ -0,0 +1,11 @@
LICENSE := BSD
VERSION := 1.3.2
DOWNLOADS := libogg.archive
URL(libogg) := http://downloads.xiph.org/releases/ogg/libogg-$(VERSION).tar.xz
SHA(libogg) := 5e525ec6a4135066932935c01d2c309ea5009f8d
DIR(libogg) := src/lib/libogg
DIRS := include/ogg
DIR_CONTENT(include/ogg) := src/lib/libogg/include/ogg/ogg.h \
src/lib/libogg/include/ogg/os_types.h

1
ports/libvorbis.hash Normal file
View File

@@ -0,0 +1 @@
9354f741ddf0b93b54018effcd97bbe075cc0c50

10
ports/libvorbis.port Normal file
View File

@@ -0,0 +1,10 @@
LICENSE := BSD
VERSION := 1.3.4
DOWNLOADS := libvorbis.archive
URL(libvorbis) := http://downloads.xiph.org/releases/vorbis/libvorbis-$(VERSION).tar.xz
SHA(libvorbis) := b99724acdf3577982b3146b9430d765995ecf9e1
DIR(libvorbis) := src/lib/libvorbis
DIRS := include/vorbis
DIR_CONTENT(include/vorbis) := $(addprefix src/lib/libvorbis/include/vorbis/,codec.h vorbisenc.h vorbisfile.h)