diff --git a/include/ogg/config_types.h b/include/ogg/config_types.h new file mode 100644 index 0000000..4b00047 --- /dev/null +++ b/include/ogg/config_types.h @@ -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 +#endif +#if INCLUDE_STDINT_H +# include +#endif +#if INCLUDE_SYS_TYPES_H +# include +#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 diff --git a/lib/import/import-libFLAC.mk b/lib/import/import-libFLAC.mk new file mode 100644 index 0000000..a79c276 --- /dev/null +++ b/lib/import/import-libFLAC.mk @@ -0,0 +1,3 @@ +FLAC_PORT_DIR := $(call select_from_ports,flac) + +INC_DIR += $(FLAC_PORT_DIR)/include diff --git a/lib/import/import-libogg.mk b/lib/import/import-libogg.mk new file mode 100644 index 0000000..db9f4b6 --- /dev/null +++ b/lib/import/import-libogg.mk @@ -0,0 +1,2 @@ +LIBOGG_PORT_DIR := $(call select_from_ports,libogg) +INC_DIR += $(LIBOGG_PORT_DIR)/include diff --git a/lib/import/import-libvorbis.mk b/lib/import/import-libvorbis.mk new file mode 100644 index 0000000..8494f40 --- /dev/null +++ b/lib/import/import-libvorbis.mk @@ -0,0 +1,2 @@ +LIBVORBIS_PORT_DIR := $(call select_from_ports,libvorbis) +INC_DIR += $(LIBVORBIS_PORT_DIR)/include diff --git a/lib/mk/libFLAC.mk b/lib/mk/libFLAC.mk new file mode 100644 index 0000000..57c16f7 --- /dev/null +++ b/lib/mk/libFLAC.mk @@ -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) + diff --git a/lib/mk/libogg.mk b/lib/mk/libogg.mk new file mode 100644 index 0000000..70b3afa --- /dev/null +++ b/lib/mk/libogg.mk @@ -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 diff --git a/lib/mk/libvorbis.mk b/lib/mk/libvorbis.mk new file mode 100644 index 0000000..98e85f0 --- /dev/null +++ b/lib/mk/libvorbis.mk @@ -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 diff --git a/ports/flac.hash b/ports/flac.hash new file mode 100644 index 0000000..b6a8928 --- /dev/null +++ b/ports/flac.hash @@ -0,0 +1 @@ +f8f110544e8b8be4d96cca156292d7719fa9baf1 diff --git a/ports/flac.port b/ports/flac.port new file mode 100644 index 0000000..414d46f --- /dev/null +++ b/ports/flac.port @@ -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) diff --git a/ports/libogg.hash b/ports/libogg.hash new file mode 100644 index 0000000..b87ff4d --- /dev/null +++ b/ports/libogg.hash @@ -0,0 +1 @@ +99b7247b4569173f8dc2847bbbb83289f023cfc4 diff --git a/ports/libogg.port b/ports/libogg.port new file mode 100644 index 0000000..757507d --- /dev/null +++ b/ports/libogg.port @@ -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 diff --git a/ports/libvorbis.hash b/ports/libvorbis.hash new file mode 100644 index 0000000..6ac001e --- /dev/null +++ b/ports/libvorbis.hash @@ -0,0 +1 @@ +9354f741ddf0b93b54018effcd97bbe075cc0c50 diff --git a/ports/libvorbis.port b/ports/libvorbis.port new file mode 100644 index 0000000..453e636 --- /dev/null +++ b/ports/libvorbis.port @@ -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)