aboutsummaryrefslogtreecommitdiff
path: root/audio/flac
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2008-04-07 20:37:23 +0000
committerChristian Weisgerber <naddy@FreeBSD.org>2008-04-07 20:37:23 +0000
commitfc6f8996911202c6df18b1ee15a9cb205ba4ea49 (patch)
tree539cb57de0e25c0fcfd062eb36d849e1f96fdb90 /audio/flac
parente736f59941a3e760ba36b76c2472497f04a3d7da (diff)
downloadports-fc6f8996911202c6df18b1ee15a9cb205ba4ea49.tar.gz
ports-fc6f8996911202c6df18b1ee15a9cb205ba4ea49.zip
Notes
Diffstat (limited to 'audio/flac')
-rw-r--r--audio/flac/Makefile36
-rw-r--r--audio/flac/distinfo9
-rw-r--r--audio/flac/files/patch-Makefile.in16
-rw-r--r--audio/flac/files/patch-configure17
-rw-r--r--audio/flac/files/patch-doc_Makefile.in14
-rw-r--r--audio/flac/files/patch-doc_html_Makefile.in35
-rw-r--r--audio/flac/files/patch-doc_html_images_Makefile.in14
-rw-r--r--audio/flac/files/patch-doc_html_ru_Makefile.in14
-rw-r--r--audio/flac/files/patch-man_flac.113
-rw-r--r--audio/flac/files/patch-src_libFLAC++_metadata.cpp66
-rw-r--r--audio/flac/files/patch-src_libFLAC_Makefile.in16
-rw-r--r--audio/flac/files/patch-src_libFLAC_bitbuffer.c31
-rw-r--r--audio/flac/files/patch-src_libFLAC_cpu.c32
-rw-r--r--audio/flac/files/patch-src_libFLAC_file__decoder.c22
-rw-r--r--audio/flac/files/patch-src_libFLAC_file__encoder.c22
-rw-r--r--audio/flac/files/patch-src_libFLAC_format.c25
-rw-r--r--audio/flac/files/patch-src_libFLAC_include_private_md5.h14
-rw-r--r--audio/flac/files/patch-src_libFLAC_md5.c35
-rw-r--r--audio/flac/files/patch-src_libFLAC_memory.c76
-rw-r--r--audio/flac/files/patch-src_libFLAC_metadata__iterators.c67
-rw-r--r--audio/flac/files/patch-src_libFLAC_metadata__object.c176
-rw-r--r--audio/flac/files/patch-src_libFLAC_stream__decoder.c121
-rw-r--r--audio/flac/files/patch-src_libFLAC_stream__encoder.c22
-rw-r--r--audio/flac/files/patch-src_libOggFLAC_file__decoder.c22
-rw-r--r--audio/flac/files/patch-src_libOggFLAC_file__encoder.c22
-rw-r--r--audio/flac/files/patch-src_libOggFLAC_ogg__helper.c31
-rw-r--r--audio/flac/files/patch-src_metaflac_operations.c24
-rw-r--r--audio/flac/files/patch-src_metaflac_options.c66
-rw-r--r--audio/flac/files/patch-src_metaflac_utils.c22
-rw-r--r--audio/flac/files/patch-src_plugin__common_charset.c25
-rw-r--r--audio/flac/files/patch-src_plugin__common_tags.c59
-rw-r--r--audio/flac/files/patch-src_share_utf8_charset.c22
-rw-r--r--audio/flac/files/patch-src_share_utf8_iconvert.c49
-rw-r--r--audio/flac/files/patch-src_share_utf8_utf8.c72
-rw-r--r--audio/flac/pkg-descr4
-rw-r--r--audio/flac/pkg-plist256
36 files changed, 171 insertions, 1396 deletions
diff --git a/audio/flac/Makefile b/audio/flac/Makefile
index 7031a4a532bc..d8ffb4ddb1e3 100644
--- a/audio/flac/Makefile
+++ b/audio/flac/Makefile
@@ -6,14 +6,10 @@
#
PORTNAME= flac
-PORTVERSION= 1.1.2
-PORTREVISION= 2
+PORTVERSION= 1.2.1
CATEGORIES= audio
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:sf/} \
- ${MASTER_SITE_LOCAL:S/$/:local/}
-MASTER_SITE_SUBDIR= ${PORTNAME}/:sf naddy/:local
-DISTFILES= ${EXTRACT_ONLY}:sf flac-alloc.h:local
-EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= naddy@FreeBSD.org
COMMENT= Free lossless audio codec
@@ -26,14 +22,17 @@ GNU_CONFIGURE= yes
CONFIGURE_TARGET= --target=${ARCH}-unknown-freebsd${OSREL}
CONFIGURE_ARGS= --enable-sse \
--with-libiconv-prefix="${LOCALBASE}" \
- --with-ogg="${LOCALBASE}"
-CONFIGURE_ENV= CPPFLAGS="-I${WRKSRC}/include" \
- ac_cv_path_XMMS_CONFIG=no
+ --with-ogg="${LOCALBASE}" \
+ --disable-thorough-tests \
+ --disable-xmms-plugin
+CONFIGURE_ENV= CPPFLAGS="-I${WRKSRC}/include"
+MAKE_ARGS= pkgconfigdir="${PREFIX}/libdata/pkgconfig"
+MAKE_ENV= MAKEOBJDIR=/nonexistent # ignore ${WRKSRC}/obj
.if defined(NOPORTDOCS)
-MAKE_ENV= DOC=""
+MAKE_ENV+= DOC=""
.else
-MAKE_ENV= DOC=doc
+MAKE_ENV+= DOC=doc
.endif
USE_LDCONFIG= yes
@@ -42,20 +41,17 @@ MAN1= flac.1 metaflac.1
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386"
-BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
+BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
.endif
-post-extract:
- @${CP} ${DISTDIR}/flac-alloc.h ${WRKSRC}/include/share/alloc.h
-
-# "obj" is magic to our make(1)
-post-configure:
- @${RM} -rf ${WRKSRC}/obj
+pre-patch:
+ @${REINPLACE_CMD} 's:^docdir = $$(datadir)/doc/$$(PACKAGE)-$$(VERSION):docdir = $$(datadir)/doc/$$(PACKAGE):' \
+ `find ${WRKSRC}/doc -name Makefile.in`
post-build:
${REINPLACE_CMD} 's:%%PREFIX%%:${PREFIX}:' ${WRKSRC}/man/flac.1
test: build
- @cd ${WRKSRC}; ${MAKE} check
+ @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} check
.include <bsd.port.post.mk>
diff --git a/audio/flac/distinfo b/audio/flac/distinfo
index 0928ac572faf..63088d9fe7b5 100644
--- a/audio/flac/distinfo
+++ b/audio/flac/distinfo
@@ -1,6 +1,3 @@
-MD5 (flac-1.1.2.tar.gz) = 2bfc127cdda02834d0491ab531a20960
-SHA256 (flac-1.1.2.tar.gz) = ce4f7d11b3c04a7368c916ca4abc284dd0c0256f461dfb7f07df1ab445e7a5c0
-SIZE (flac-1.1.2.tar.gz) = 1516235
-MD5 (flac-alloc.h) = 08891390039e2aee9bd4335f784467db
-SHA256 (flac-alloc.h) = da40afc663e5b3fe6dccd1a0f1c218b7ec02d3699d72b41d6978696896d7df98
-SIZE (flac-alloc.h) = 5697
+MD5 (flac-1.2.1.tar.gz) = 153c8b15a54da428d1f0fadc756c22c7
+SHA256 (flac-1.2.1.tar.gz) = 9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf
+SIZE (flac-1.2.1.tar.gz) = 2009217
diff --git a/audio/flac/files/patch-Makefile.in b/audio/flac/files/patch-Makefile.in
index b0a73cdc9a22..14dd79539ad5 100644
--- a/audio/flac/files/patch-Makefile.in
+++ b/audio/flac/files/patch-Makefile.in
@@ -3,12 +3,12 @@ $FreeBSD$
--- Makefile.in.orig
+++ Makefile.in
-@@ -258,7 +258,7 @@
- sharedstatedir = @sharedstatedir@
- sysconfdir = @sysconfdir@
- target_alias = @target_alias@
--SUBDIRS = doc include man src test build flac.pbproj obj
-+SUBDIRS = $(DOC) include man src test build flac.pbproj
+@@ -234,7 +234,7 @@
+
+ AUTOMAKE_OPTIONS = foreign 1.7
+
+-SUBDIRS = doc include m4 man src examples test build obj
++SUBDIRS = $(DOC) include m4 man src test build
+
DISTCLEANFILES = libtool-disable-static
- EXTRA_DIST = \
- COPYING.FDL \
+
diff --git a/audio/flac/files/patch-configure b/audio/flac/files/patch-configure
index e335f4533ff4..75fe5afb534a 100644
--- a/audio/flac/files/patch-configure
+++ b/audio/flac/files/patch-configure
@@ -3,15 +3,12 @@ $FreeBSD$
--- configure.orig
+++ configure
-@@ -10541,9 +10541,9 @@
- if test x$debug = xtrue; then
- OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -g -O0 -DDEBUG"
- else
-- OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -O2 -DNDEBUG"
-+ OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -DNDEBUG"
- if test x$GCC = xyes; then
-- OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -O3 -fomit-frame-pointer -funroll-loops -finline-functions -Wall -W -Winline -DFLaC__INLINE=__inline__"
-+ OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -Wall -W -DFLaC__INLINE=__inline__"
+@@ -23490,7 +23490,7 @@
+ CPPFLAGS="-DNDEBUG $CPPFLAGS"
+ if test "x$GCC" = xyes; then
+ CPPFLAGS="-DFLaC__INLINE=__inline__ $CPPFLAGS"
+- CFLAGS="-O3 -funroll-loops -finline-functions -Wall -W -Winline $CFLAGS"
++ CFLAGS="-Wall -W $CFLAGS"
fi
fi
- CFLAGS="$OUR_CFLAGS_HEAD $CFLAGS"
+
diff --git a/audio/flac/files/patch-doc_Makefile.in b/audio/flac/files/patch-doc_Makefile.in
deleted file mode 100644
index 7d82b0fba502..000000000000
--- a/audio/flac/files/patch-doc_Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- doc/Makefile.in.orig
-+++ doc/Makefile.in
-@@ -236,7 +236,7 @@
- target_alias = @target_alias@
- AUTOMAKE_OPTIONS = foreign
- SUBDIRS = . html
--docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
-+docdir = $(datadir)/doc/$(PACKAGE)
- doc_DATA = \
- FLAC.tag
-
diff --git a/audio/flac/files/patch-doc_html_Makefile.in b/audio/flac/files/patch-doc_html_Makefile.in
deleted file mode 100644
index b63d9e76e82d..000000000000
--- a/audio/flac/files/patch-doc_html_Makefile.in
+++ /dev/null
@@ -1,35 +0,0 @@
-
-$FreeBSD$
-
---- doc/html/Makefile.in.orig
-+++ doc/html/Makefile.in
-@@ -236,7 +236,7 @@
- target_alias = @target_alias@
- AUTOMAKE_OPTIONS = foreign
- SUBDIRS = ru images
--docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/html
-+docdir = $(datadir)/doc/$(PACKAGE)/html
- doc_DATA = \
- changelog.html \
- comparison.html \
-@@ -577,13 +577,13 @@
-
- # The install targets don't copy whole directories so we have to
- # handle 'api/' specially:
--@FLaC__HAS_DOXYGEN_TRUE@install-data-local:
--@FLaC__HAS_DOXYGEN_TRUE@ $(mkinstalldirs) $(DESTDIR)$(docdir)/api
--@FLaC__HAS_DOXYGEN_TRUE@ (cd api && $(INSTALL_DATA) * $(DESTDIR)$(docdir)/api)
--@FLaC__HAS_DOXYGEN_TRUE@uninstall-local:
--@FLaC__HAS_DOXYGEN_TRUE@ rm -rf $(DESTDIR)$(docdir)/api
--@FLaC__HAS_DOXYGEN_TRUE@maintainer-clean-local:
--@FLaC__HAS_DOXYGEN_TRUE@ rm -rf api
-+install-data-local:
-+ $(mkinstalldirs) $(DESTDIR)$(docdir)/api
-+ (cd api && $(INSTALL_DATA) * $(DESTDIR)$(docdir)/api)
-+uninstall-local:
-+ rm -rf $(DESTDIR)$(docdir)/api
-+maintainer-clean-local:
-+ rm -rf api
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
- .NOEXPORT:
diff --git a/audio/flac/files/patch-doc_html_images_Makefile.in b/audio/flac/files/patch-doc_html_images_Makefile.in
deleted file mode 100644
index e0eef34182bc..000000000000
--- a/audio/flac/files/patch-doc_html_images_Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- doc/html/images/Makefile.in.orig
-+++ doc/html/images/Makefile.in
-@@ -226,7 +226,7 @@
- sysconfdir = @sysconfdir@
- target_alias = @target_alias@
- AUTOMAKE_OPTIONS = foreign
--docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/html/images
-+docdir = $(datadir)/doc/$(PACKAGE)/html/images
- doc_DATA = \
- 1x1.gif \
- cafebug.gif \
diff --git a/audio/flac/files/patch-doc_html_ru_Makefile.in b/audio/flac/files/patch-doc_html_ru_Makefile.in
deleted file mode 100644
index 7843a0cc5469..000000000000
--- a/audio/flac/files/patch-doc_html_ru_Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- doc/html/ru/Makefile.in.orig
-+++ doc/html/ru/Makefile.in
-@@ -226,7 +226,7 @@
- sysconfdir = @sysconfdir@
- target_alias = @target_alias@
- AUTOMAKE_OPTIONS = foreign
--docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/html/ru
-+docdir = $(datadir)/doc/$(PACKAGE)/html/ru
- doc_DATA = \
- authors.html \
- comparison.html \
diff --git a/audio/flac/files/patch-man_flac.1 b/audio/flac/files/patch-man_flac.1
index 58bb5ceaabb0..48102d8cd528 100644
--- a/audio/flac/files/patch-man_flac.1
+++ b/audio/flac/files/patch-man_flac.1
@@ -3,13 +3,12 @@ $FreeBSD$
--- man/flac.1.orig
+++ man/flac.1
-@@ -397,8 +397,7 @@
+@@ -325,7 +325,7 @@
.PP
- The programs are documented fully by HTML format
- documentation, available in
--\fI/usr/share/doc/flac/html\fR on
--Debian GNU/Linux systems.
-+\fI%%PREFIX%%/share/doc/flac/html\fR.
+ metaflac(1).
+ .PP
+-The programs are documented fully by HTML format documentation, available in \fI/usr/share/doc/flac/html\fR on Debian GNU/Linux systems.
++The programs are documented fully by HTML format documentation, available in \fI%%PREFIX%%/share/doc/flac/html\fR.
.SH "AUTHOR"
.PP
- This manual page was written by Matt Zimmerman <mdz@debian.org> for
+ This manual page was written by Matt Zimmerman <mdz@debian.org> for the Debian GNU/Linux system (but may be used by others).
diff --git a/audio/flac/files/patch-src_libFLAC++_metadata.cpp b/audio/flac/files/patch-src_libFLAC++_metadata.cpp
deleted file mode 100644
index 3bd2644ee2cc..000000000000
--- a/audio/flac/files/patch-src_libFLAC++_metadata.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC++/metadata.cpp.orig
-+++ src/libFLAC++/metadata.cpp
-@@ -33,6 +33,7 @@
- #include "FLAC/assert.h"
- #include <stdlib.h> // for malloc(), free()
- #include <string.h> // for memcpy() etc.
-+#include "share/alloc.h"
-
- #ifdef _MSC_VER
- // warning C4800: 'int' : forcing to bool 'true' or 'false' (performance warning)
-@@ -568,7 +569,7 @@
-
- clear_entry();
-
-- if(0 == (entry_.entry = (FLAC__byte*)malloc(field_length+1))) {
-+ if(0 == (entry_.entry = (FLAC__byte*)safe_malloc_add_2op_(field_length, /*+*/1))) {
- is_valid_ = false;
- }
- else {
-@@ -617,7 +618,7 @@
-
- clear_field_value();
-
-- if(0 == (field_value_ = (char *)malloc(field_value_length+1))) {
-+ if(0 == (field_value_ = (char *)safe_malloc_add_2op_(field_value_length, /*+*/1))) {
- is_valid_ = false;
- }
- else {
-@@ -707,7 +708,7 @@
- {
- clear_entry();
-
-- if(0 == (entry_.entry = (FLAC__byte*)malloc(field_name_length_ + 1 + field_value_length_ + 1))) {
-+ if(0 == (entry_.entry = (FLAC__byte*)safe_malloc_add_4op_(field_name_length_, /*+*/1, /*+*/field_value_length_, /*+*/1))) {
- is_valid_ = false;
- }
- else {
-@@ -733,7 +734,7 @@
- p = (const char *)entry_.entry + entry_.length;
-
- field_name_length_ = p - (const char *)entry_.entry;
-- if(0 == (field_name_ = (char *)malloc(field_name_length_ + 1))) { // +1 for the trailing \0
-+ if(0 == (field_name_ = (char *)safe_malloc_add_2op_(field_name_length_, /*+*/1))) { // +1 for the trailing \0
- is_valid_ = false;
- return;
- }
-@@ -742,14 +743,14 @@
-
- if(entry_.length - field_name_length_ == 0) {
- field_value_length_ = 0;
-- if(0 == (field_value_ = (char *)malloc(0))) {
-+ if(0 == (field_value_ = (char *)safe_malloc_(0))) {
- is_valid_ = false;
- return;
- }
- }
- else {
- field_value_length_ = entry_.length - field_name_length_ - 1;
-- if(0 == (field_value_ = (char *)malloc(field_value_length_ + 1))) { // +1 for the trailing \0
-+ if(0 == (field_value_ = (char *)safe_malloc_add_2op_(field_value_length_, /*+*/1))) { // +1 for the trailing \0
- is_valid_ = false;
- return;
- }
diff --git a/audio/flac/files/patch-src_libFLAC_Makefile.in b/audio/flac/files/patch-src_libFLAC_Makefile.in
index d517bf48b1a0..83d8e416ea8c 100644
--- a/audio/flac/files/patch-src_libFLAC_Makefile.in
+++ b/audio/flac/files/patch-src_libFLAC_Makefile.in
@@ -3,11 +3,11 @@ $FreeBSD$
--- src/libFLAC/Makefile.in.orig
+++ src/libFLAC/Makefile.in
-@@ -304,7 +304,6 @@
- @FLaC__CPU_IA32_TRUE@@FLaC__HAS_NASM_TRUE@@FLaC__NO_ASM_FALSE@libFLAC_la_LIBADD = ia32/libFLAC-asm.la
- @FLaC__CPU_PPC_TRUE@@FLaC__HAS_AS__TEMPORARILY_DISABLED_FALSE@@FLaC__HAS_GAS__TEMPORARILY_DISABLED_TRUE@@FLaC__NO_ASM_FALSE@libFLAC_la_LIBADD = ppc/gas/libFLAC-asm.la
- @FLaC__CPU_PPC_TRUE@@FLaC__HAS_AS__TEMPORARILY_DISABLED_TRUE@@FLaC__NO_ASM_FALSE@libFLAC_la_LIBADD = ppc/as/libFLAC-asm.la
--@FLaC__CPU_PPC_TRUE@@FLaC__NO_ASM_FALSE@LOCAL_EXTRA_LDFLAGS = "-Wl,-read_only_relocs,warning"
- SUBDIRS = $(ARCH_SUBDIRS) include .
- m4datadir = $(datadir)/aclocal
- m4data_DATA = libFLAC.m4
+@@ -249,7 +249,6 @@
+ @FLaC__CPU_IA32_TRUE@@FLaC__HAS_NASM_TRUE@@FLaC__NO_ASM_FALSE@LOCAL_EXTRA_LIBADD = ia32/libFLAC-asm.la
+ @FLaC__CPU_PPC_TRUE@@FLaC__HAS_AS__TEMPORARILY_DISABLED_TRUE@@FLaC__NO_ASM_FALSE@LOCAL_EXTRA_LIBADD = ppc/as/libFLAC-asm.la
+ @FLaC__CPU_PPC_TRUE@@FLaC__HAS_AS__TEMPORARILY_DISABLED_FALSE@@FLaC__HAS_GAS__TEMPORARILY_DISABLED_TRUE@@FLaC__NO_ASM_FALSE@LOCAL_EXTRA_LIBADD = ppc/gas/libFLAC-asm.la
+-@FLaC__CPU_PPC_TRUE@@FLaC__HAS_AS__TEMPORARILY_DISABLED_TRUE@@FLaC__NO_ASM_FALSE@LOCAL_EXTRA_LDFLAGS = "-Wl,-read_only_relocs,warning"
+ @FLaC__CPU_PPC_TRUE@@FLaC__HAS_AS__TEMPORARILY_DISABLED_FALSE@@FLaC__HAS_GAS__TEMPORARILY_DISABLED_TRUE@@FLaC__NO_ASM_FALSE@LOCAL_EXTRA_LDFLAGS = ""
+
+ libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@
diff --git a/audio/flac/files/patch-src_libFLAC_bitbuffer.c b/audio/flac/files/patch-src_libFLAC_bitbuffer.c
deleted file mode 100644
index 6efff9b42108..000000000000
--- a/audio/flac/files/patch-src_libFLAC_bitbuffer.c
+++ /dev/null
@@ -1,31 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/bitbuffer.c.orig
-+++ src/libFLAC/bitbuffer.c
-@@ -35,6 +35,7 @@
- #include "private/bitmath.h"
- #include "private/crc.h"
- #include "FLAC/assert.h"
-+#include "share/alloc.h"
-
- /*
- * Along the way you will see two versions of some functions, selected
-@@ -193,7 +194,7 @@
- if(bb->capacity == new_capacity)
- return true;
-
-- new_buffer = (FLAC__blurb*)calloc(new_capacity, sizeof(FLAC__blurb));
-+ new_buffer = (FLAC__blurb*)safe_calloc_(new_capacity, sizeof(FLAC__blurb));
- if(new_buffer == 0)
- return false;
- memcpy(new_buffer, bb->buffer, sizeof(FLAC__blurb)*min(bb->blurbs+(bb->bits?1:0), new_capacity));
-@@ -425,7 +426,7 @@
- {
- if(bb->buffer == 0) {
- bb->capacity = FLAC__BITBUFFER_DEFAULT_CAPACITY;
-- bb->buffer = (FLAC__blurb*)calloc(bb->capacity, sizeof(FLAC__blurb));
-+ bb->buffer = (FLAC__blurb*)safe_calloc_(bb->capacity, sizeof(FLAC__blurb));
- if(bb->buffer == 0)
- return false;
- }
diff --git a/audio/flac/files/patch-src_libFLAC_cpu.c b/audio/flac/files/patch-src_libFLAC_cpu.c
deleted file mode 100644
index adc10c2ec480..000000000000
--- a/audio/flac/files/patch-src_libFLAC_cpu.c
+++ /dev/null
@@ -1,32 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/cpu.c.orig
-+++ src/libFLAC/cpu.c
-@@ -37,6 +37,11 @@
- #include <config.h>
- #endif
-
-+#ifdef __FreeBSD__
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#endif
-+
- #if defined FLAC__CPU_PPC
- #if !defined FLAC__NO_ASM
- #if defined FLAC__SYS_DARWIN
-@@ -95,6 +100,14 @@
-
- #ifndef FLAC__SSE_OS
- info->data.ia32.fxsr = info->data.ia32.sse = info->data.ia32.sse2 = false;
-+#elif defined(__FreeBSD__)
-+ /* on FreeBSD we can double-check via sysctl whether the OS supports SSE */
-+ {
-+ int sse;
-+ size_t len = sizeof(sse);
-+ if (sysctlbyname("hw.instruction_sse", &sse, &len, NULL, 0) || !sse)
-+ info->data.ia32.fxsr = info->data.ia32.sse = info->data.ia32.sse2 = false;
-+ }
- #endif
-
- #ifdef FLAC__USE_3DNOW
diff --git a/audio/flac/files/patch-src_libFLAC_file__decoder.c b/audio/flac/files/patch-src_libFLAC_file__decoder.c
deleted file mode 100644
index 88138d4b04d1..000000000000
--- a/audio/flac/files/patch-src_libFLAC_file__decoder.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/file_decoder.c.orig
-+++ src/libFLAC/file_decoder.c
-@@ -43,6 +43,7 @@
- #include "FLAC/assert.h"
- #include "protected/file_decoder.h"
- #include "protected/seekable_stream_decoder.h"
-+#include "share/alloc.h"
-
- /***********************************************************************
- *
-@@ -248,7 +249,7 @@
- decoder->private_->filename = 0;
- }
- if(0 != strcmp(value, "-")) {
-- if(0 == (decoder->private_->filename = (char*)malloc(strlen(value)+1))) {
-+ if(0 == (decoder->private_->filename = (char*)safe_malloc_add_2op_(strlen(value), /*+*/1))) {
- decoder->protected_->state = FLAC__FILE_DECODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
diff --git a/audio/flac/files/patch-src_libFLAC_file__encoder.c b/audio/flac/files/patch-src_libFLAC_file__encoder.c
deleted file mode 100644
index 824fc0081f26..000000000000
--- a/audio/flac/files/patch-src_libFLAC_file__encoder.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/file_encoder.c.orig
-+++ src/libFLAC/file_encoder.c
-@@ -34,6 +34,7 @@
- #include <string.h> /* for strlen(), strcpy() */
- #include "FLAC/assert.h"
- #include "protected/file_encoder.h"
-+#include "share/alloc.h"
-
- #ifdef max
- #undef max
-@@ -436,7 +437,7 @@
- free(encoder->private_->filename);
- encoder->private_->filename = 0;
- }
-- if(0 == (encoder->private_->filename = (char*)malloc(strlen(value)+1))) {
-+ if(0 == (encoder->private_->filename = (char*)safe_malloc_add_2op_(strlen(value), /*+*/1))) {
- encoder->protected_->state = FLAC__FILE_ENCODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
diff --git a/audio/flac/files/patch-src_libFLAC_format.c b/audio/flac/files/patch-src_libFLAC_format.c
deleted file mode 100644
index bbd71f468ad0..000000000000
--- a/audio/flac/files/patch-src_libFLAC_format.c
+++ /dev/null
@@ -1,25 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/format.c.orig
-+++ src/libFLAC/format.c
-@@ -38,6 +38,7 @@
- #ifdef HAVE_CONFIG_H
- #include <config.h>
- #endif
-+#include "share/alloc.h"
-
- #ifdef min
- #undef min
-@@ -463,9 +464,9 @@
- FLAC__ASSERT(object->capacity_by_order > 0 || (0 == object->parameters && 0 == object->raw_bits));
-
- if(object->capacity_by_order < max_partition_order) {
-- if(0 == (object->parameters = (unsigned*)realloc(object->parameters, sizeof(unsigned)*(1 << max_partition_order))))
-+ if(0 == (object->parameters = (unsigned*)safe_realloc_mul_2op_(object->parameters, sizeof(unsigned), /*times*/(1 << max_partition_order))))
- return false;
-- if(0 == (object->raw_bits = (unsigned*)realloc(object->raw_bits, sizeof(unsigned)*(1 << max_partition_order))))
-+ if(0 == (object->raw_bits = (unsigned*)safe_realloc_mul_2op_(object->raw_bits, sizeof(unsigned), /*times*/(1 << max_partition_order))))
- return false;
- object->capacity_by_order = max_partition_order;
- }
diff --git a/audio/flac/files/patch-src_libFLAC_include_private_md5.h b/audio/flac/files/patch-src_libFLAC_include_private_md5.h
deleted file mode 100644
index 5570635a4646..000000000000
--- a/audio/flac/files/patch-src_libFLAC_include_private_md5.h
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/include/private/md5.h.orig
-+++ src/libFLAC/include/private/md5.h
-@@ -41,7 +41,7 @@
- FLAC__uint32 bytes[2];
- FLAC__uint32 in[16];
- FLAC__byte *internal_buf;
-- unsigned capacity;
-+ size_t capacity;
- };
-
- FLAC_API void FLAC__MD5Init(struct FLAC__MD5Context *context);
diff --git a/audio/flac/files/patch-src_libFLAC_md5.c b/audio/flac/files/patch-src_libFLAC_md5.c
deleted file mode 100644
index db1cf692435a..000000000000
--- a/audio/flac/files/patch-src_libFLAC_md5.c
+++ /dev/null
@@ -1,35 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/md5.c.orig
-+++ src/libFLAC/md5.c
-@@ -31,6 +31,7 @@
- #ifdef HAVE_CONFIG_H
- #include <config.h>
- #endif
-+#include "share/alloc.h"
-
- #ifndef FLaC__INLINE
- #define FLaC__INLINE
-@@ -230,13 +231,19 @@
- unsigned channel, sample, a_byte;
- FLAC__int32 a_word;
- FLAC__byte *buf_;
-- const unsigned bytes_needed = channels * samples * bytes_per_sample;
-+ const size_t bytes_needed = (size_t)channels * (size_t)samples * (size_t)bytes_per_sample;
-+
-+ /* overflow check */
-+ if((size_t)channels > SIZE_MAX / (size_t)bytes_per_sample)
-+ return false;
-+ if((size_t)channels * (size_t)bytes_per_sample > SIZE_MAX / (size_t)samples)
-+ return false;
-
- if(ctx->capacity < bytes_needed) {
- FLAC__byte *tmp = (FLAC__byte*)realloc(ctx->internal_buf, bytes_needed);
- if(0 == tmp) {
- free(ctx->internal_buf);
-- if(0 == (ctx->internal_buf = (FLAC__byte*)malloc(bytes_needed)))
-+ if(0 == (ctx->internal_buf = (FLAC__byte*)safe_malloc_(bytes_needed)))
- return false;
- }
- ctx->internal_buf = tmp;
diff --git a/audio/flac/files/patch-src_libFLAC_memory.c b/audio/flac/files/patch-src_libFLAC_memory.c
deleted file mode 100644
index 6b0cf93481a9..000000000000
--- a/audio/flac/files/patch-src_libFLAC_memory.c
+++ /dev/null
@@ -1,76 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/memory.c.orig
-+++ src/libFLAC/memory.c
-@@ -35,6 +35,7 @@
- #ifdef HAVE_CONFIG_H
- #include <config.h>
- #endif
-+#include "share/alloc.h"
-
- void *FLAC__memory_alloc_aligned(size_t bytes, void **aligned_address)
- {
-@@ -44,10 +45,10 @@
-
- #ifdef FLAC__ALIGN_MALLOC_DATA
- /* align on 32-byte (256-bit) boundary */
-- x = malloc(bytes+31);
-+ x = safe_malloc_add_2op_(bytes, /*+*/31);
- *aligned_address = (void*)(((unsigned)x + 31) & -32);
- #else
-- x = malloc(bytes);
-+ x = safe_malloc_(bytes);
- *aligned_address = x;
- #endif
- return x;
-@@ -66,6 +67,9 @@
- FLAC__ASSERT(0 != aligned_pointer);
- FLAC__ASSERT(unaligned_pointer != aligned_pointer);
-
-+ if((size_t)elements > SIZE_MAX / sizeof(*pu)) /* overflow check */
-+ return false;
-+
- pu = (FLAC__int32*)FLAC__memory_alloc_aligned(sizeof(FLAC__int32) * elements, &u.pv);
- if(0 == pu) {
- return false;
-@@ -92,6 +96,9 @@
- FLAC__ASSERT(0 != aligned_pointer);
- FLAC__ASSERT(unaligned_pointer != aligned_pointer);
-
-+ if((size_t)elements > SIZE_MAX / sizeof(*pu)) /* overflow check */
-+ return false;
-+
- pu = (FLAC__uint32*)FLAC__memory_alloc_aligned(sizeof(FLAC__uint32) * elements, &u.pv);
- if(0 == pu) {
- return false;
-@@ -118,6 +125,9 @@
- FLAC__ASSERT(0 != aligned_pointer);
- FLAC__ASSERT(unaligned_pointer != aligned_pointer);
-
-+ if((size_t)elements > SIZE_MAX / sizeof(*pu)) /* overflow check */
-+ return false;
-+
- pu = (FLAC__uint64*)FLAC__memory_alloc_aligned(sizeof(FLAC__uint64) * elements, &u.pv);
- if(0 == pu) {
- return false;
-@@ -144,6 +154,9 @@
- FLAC__ASSERT(0 != aligned_pointer);
- FLAC__ASSERT(unaligned_pointer != aligned_pointer);
-
-+ if((size_t)elements > SIZE_MAX / sizeof(*pu)) /* overflow check */
-+ return false;
-+
- pu = (unsigned*)FLAC__memory_alloc_aligned(sizeof(unsigned) * elements, &u.pv);
- if(0 == pu) {
- return false;
-@@ -171,6 +184,9 @@
- FLAC__ASSERT(0 != unaligned_pointer);
- FLAC__ASSERT(0 != aligned_pointer);
- FLAC__ASSERT(unaligned_pointer != aligned_pointer);
-+
-+ if((size_t)elements > SIZE_MAX / sizeof(*pu)) /* overflow check */
-+ return false;
-
- pu = (FLAC__real*)FLAC__memory_alloc_aligned(sizeof(FLAC__real) * elements, &u.pv);
- if(0 == pu) {
diff --git a/audio/flac/files/patch-src_libFLAC_metadata__iterators.c b/audio/flac/files/patch-src_libFLAC_metadata__iterators.c
deleted file mode 100644
index 6266b3c07e35..000000000000
--- a/audio/flac/files/patch-src_libFLAC_metadata__iterators.c
+++ /dev/null
@@ -1,67 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/metadata_iterators.c.orig
-+++ src/libFLAC/metadata_iterators.c
-@@ -48,6 +48,7 @@
-
- #include "FLAC/assert.h"
- #include "FLAC/file_decoder.h"
-+#include "share/alloc.h"
-
- #ifdef max
- #undef max
-@@ -1928,7 +1929,7 @@
- block->data = 0;
- }
- else {
-- if(0 == (block->data = (FLAC__byte*)malloc(block_length)))
-+ if(0 == (block->data = (FLAC__byte*)safe_malloc_(block_length)))
- return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR;
-
- if(read_cb(block->data, 1, block_length, handle) != block_length)
-@@ -1949,7 +1950,7 @@
-
- if(block->num_points == 0)
- block->points = 0;
-- else if(0 == (block->points = (FLAC__StreamMetadata_SeekPoint*)malloc(block->num_points * sizeof(FLAC__StreamMetadata_SeekPoint))))
-+ else if(0 == (block->points = (FLAC__StreamMetadata_SeekPoint*)safe_malloc_mul_2op_(block->num_points, /*times*/ sizeof(FLAC__StreamMetadata_SeekPoint))))
- return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR;
-
- for(i = 0; i < block->num_points; i++) {
-@@ -1982,7 +1983,7 @@
- entry->entry = 0;
- }
- else {
-- if(0 == (entry->entry = (FLAC__byte*)malloc(entry->length+1)))
-+ if(0 == (entry->entry = (FLAC__byte*)safe_malloc_add_2op_(entry->length, /*+*/1)))
- return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR;
-
- if(read_cb(entry->entry, 1, entry->length, handle) != entry->length)
-@@ -2145,7 +2146,7 @@
- block->data = 0;
- }
- else {
-- if(0 == (block->data = (FLAC__byte*)malloc(block_length)))
-+ if(0 == (block->data = (FLAC__byte*)safe_malloc_(block_length)))
- return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR;
-
- if(read_cb(block->data, 1, block_length, handle) != block_length)
-@@ -2812,7 +2813,7 @@
- {
- static const char *tempfile_suffix = ".metadata_edit";
- if(0 == tempfile_path_prefix) {
-- if(0 == (*tempfilename = (char*)malloc(strlen(filename) + strlen(tempfile_suffix) + 1))) {
-+ if(0 == (*tempfilename = (char*)safe_malloc_add_3op_(strlen(filename), /*+*/strlen(tempfile_suffix), /*+*/1))) {
- *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR;
- return false;
- }
-@@ -2826,7 +2827,7 @@
- else
- p++;
-
-- if(0 == (*tempfilename = (char*)malloc(strlen(tempfile_path_prefix) + 1 + strlen(p) + strlen(tempfile_suffix) + 1))) {
-+ if(0 == (*tempfilename = (char*)safe_malloc_add_4op_(strlen(tempfile_path_prefix), /*+*/strlen(p), /*+*/strlen(tempfile_suffix), /*+*/2))) {
- *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR;
- return false;
- }
diff --git a/audio/flac/files/patch-src_libFLAC_metadata__object.c b/audio/flac/files/patch-src_libFLAC_metadata__object.c
deleted file mode 100644
index c488976fe6bb..000000000000
--- a/audio/flac/files/patch-src_libFLAC_metadata__object.c
+++ /dev/null
@@ -1,176 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/metadata_object.c.orig
-+++ src/libFLAC/metadata_object.c
-@@ -35,6 +35,7 @@
- #include "private/metadata.h"
-
- #include "FLAC/assert.h"
-+#include "share/alloc.h"
-
-
- /****************************************************************************
-@@ -47,7 +48,7 @@
- {
- if(bytes > 0 && 0 != from) {
- FLAC__byte *x;
-- if(0 == (x = (FLAC__byte*)malloc(bytes)))
-+ if(0 == (x = (FLAC__byte*)safe_malloc_(bytes)))
- return false;
- memcpy(x, from, bytes);
- *to = x;
-@@ -62,7 +63,7 @@
-
- static FLAC__bool ensure_null_terminated_(FLAC__byte **entry, unsigned length)
- {
-- FLAC__byte *x = (FLAC__byte*)realloc(*entry, length+1);
-+ FLAC__byte *x = (FLAC__byte*)safe_realloc_add_2op_(*entry, length, /*+*/1);
- if(0 != x) {
- x[length] = '\0';
- *entry = x;
-@@ -82,7 +83,7 @@
- else {
- FLAC__byte *x;
- FLAC__ASSERT(from->length > 0);
-- if(0 == (x = (FLAC__byte*)malloc(from->length+1)))
-+ if(0 == (x = (FLAC__byte*)safe_malloc_add_2op_(from->length, /*+*/1)))
- return false;
- memcpy(x, from->entry, from->length);
- x[from->length] = '\0';
-@@ -100,7 +101,7 @@
- else {
- FLAC__StreamMetadata_CueSheet_Index *x;
- FLAC__ASSERT(from->num_indices > 0);
-- if(0 == (x = (FLAC__StreamMetadata_CueSheet_Index*)malloc(from->num_indices * sizeof(FLAC__StreamMetadata_CueSheet_Index))))
-+ if(0 == (x = (FLAC__StreamMetadata_CueSheet_Index*)safe_malloc_mul_2op_(from->num_indices, /*times*/sizeof(FLAC__StreamMetadata_CueSheet_Index))))
- return false;
- memcpy(x, from->indices, from->num_indices * sizeof(FLAC__StreamMetadata_CueSheet_Index));
- to->indices = x;
-@@ -122,7 +123,7 @@
-
- FLAC__ASSERT(num_points > 0);
-
-- object_array = (FLAC__StreamMetadata_SeekPoint*)malloc(num_points * sizeof(FLAC__StreamMetadata_SeekPoint));
-+ object_array = (FLAC__StreamMetadata_SeekPoint*)safe_malloc_mul_2op_(num_points, /*times*/sizeof(FLAC__StreamMetadata_SeekPoint));
-
- if(0 != object_array) {
- unsigned i;
-@@ -155,7 +156,7 @@
- {
- FLAC__ASSERT(num_comments > 0);
-
-- return (FLAC__StreamMetadata_VorbisComment_Entry*)calloc(num_comments, sizeof(FLAC__StreamMetadata_VorbisComment_Entry));
-+ return (FLAC__StreamMetadata_VorbisComment_Entry*)safe_calloc_(num_comments, sizeof(FLAC__StreamMetadata_VorbisComment_Entry));
- }
-
- static void vorbiscomment_entry_array_delete_(FLAC__StreamMetadata_VorbisComment_Entry *object_array, unsigned num_comments)
-@@ -294,14 +295,14 @@
- {
- FLAC__ASSERT(num_indices > 0);
-
-- return (FLAC__StreamMetadata_CueSheet_Index*)calloc(num_indices, sizeof(FLAC__StreamMetadata_CueSheet_Index));
-+ return (FLAC__StreamMetadata_CueSheet_Index*)safe_calloc_(num_indices, sizeof(FLAC__StreamMetadata_CueSheet_Index));
- }
-
- static FLAC__StreamMetadata_CueSheet_Track *cuesheet_track_array_new_(unsigned num_tracks)
- {
- FLAC__ASSERT(num_tracks > 0);
-
-- return (FLAC__StreamMetadata_CueSheet_Track*)calloc(num_tracks, sizeof(FLAC__StreamMetadata_CueSheet_Track));
-+ return (FLAC__StreamMetadata_CueSheet_Track*)safe_calloc_(num_tracks, sizeof(FLAC__StreamMetadata_CueSheet_Track));
- }
-
- static void cuesheet_track_array_delete_(FLAC__StreamMetadata_CueSheet_Track *object_array, unsigned num_tracks)
-@@ -462,6 +463,10 @@
- break;
- case FLAC__METADATA_TYPE_SEEKTABLE:
- to->data.seek_table.num_points = object->data.seek_table.num_points;
-+ if(to->data.seek_table.num_points > SIZE_MAX / sizeof(FLAC__StreamMetadata_SeekPoint)) { /* overflow check */
-+ FLAC__metadata_object_delete(to);
-+ return 0;
-+ }
- if(!copy_bytes_((FLAC__byte**)&to->data.seek_table.points, (FLAC__byte*)object->data.seek_table.points, object->data.seek_table.num_points * sizeof(FLAC__StreamMetadata_SeekPoint))) {
- FLAC__metadata_object_delete(to);
- return 0;
-@@ -788,8 +793,12 @@
- return false;
- }
- else {
-- const unsigned old_size = object->data.seek_table.num_points * sizeof(FLAC__StreamMetadata_SeekPoint);
-- const unsigned new_size = new_num_points * sizeof(FLAC__StreamMetadata_SeekPoint);
-+ const size_t old_size = object->data.seek_table.num_points * sizeof(FLAC__StreamMetadata_SeekPoint);
-+ const size_t new_size = new_num_points * sizeof(FLAC__StreamMetadata_SeekPoint);
-+
-+ /* overflow check */
-+ if((size_t)new_num_points > SIZE_MAX / sizeof(FLAC__StreamMetadata_SeekPoint))
-+ return false;
-
- FLAC__ASSERT(object->data.seek_table.num_points > 0);
-
-@@ -982,8 +991,12 @@
- return false;
- }
- else {
-- const unsigned old_size = object->data.vorbis_comment.num_comments * sizeof(FLAC__StreamMetadata_VorbisComment_Entry);
-- const unsigned new_size = new_num_comments * sizeof(FLAC__StreamMetadata_VorbisComment_Entry);
-+ const size_t old_size = object->data.vorbis_comment.num_comments * sizeof(FLAC__StreamMetadata_VorbisComment_Entry);
-+ const size_t new_size = new_num_comments * sizeof(FLAC__StreamMetadata_VorbisComment_Entry);
-+
-+ /* overflow check */
-+ if((size_t)new_num_comments > SIZE_MAX / sizeof(FLAC__StreamMetadata_VorbisComment_Entry))
-+ return false;
-
- FLAC__ASSERT(object->data.vorbis_comment.num_comments > 0);
-
-@@ -1131,7 +1144,7 @@
- const size_t nn = strlen(field_name);
- const size_t nv = strlen(field_value);
- entry->length = nn + 1 /*=*/ + nv;
-- if(0 == (entry->entry = (FLAC__byte*)malloc(entry->length+1)))
-+ if(0 == (entry->entry = (FLAC__byte*)safe_malloc_add_2op_(entry->length, /*+*/1)))
- return false;
- memcpy(entry->entry, field_name, nn);
- entry->entry[nn] = '=';
-@@ -1158,9 +1171,9 @@
- FLAC__ASSERT(0 != eq);
- if(0 == eq)
- return false; /* double protection */
-- if(0 == (*field_name = (char*)malloc(nn+1)))
-+ if(0 == (*field_name = (char*)safe_malloc_add_2op_(nn, /*+*/1)))
- return false;
-- if(0 == (*field_value = (char*)malloc(nv+1))) {
-+ if(0 == (*field_value = (char*)safe_malloc_add_2op_(nv, /*+*/1))) {
- free(*field_name);
- return false;
- }
-@@ -1290,8 +1303,12 @@
- return false;
- }
- else {
-- const unsigned old_size = track->num_indices * sizeof(FLAC__StreamMetadata_CueSheet_Index);
-- const unsigned new_size = new_num_indices * sizeof(FLAC__StreamMetadata_CueSheet_Index);
-+ const size_t old_size = track->num_indices * sizeof(FLAC__StreamMetadata_CueSheet_Index);
-+ const size_t new_size = new_num_indices * sizeof(FLAC__StreamMetadata_CueSheet_Index);
-+
-+ /* overflow check */
-+ if((size_t)new_num_indices > SIZE_MAX / sizeof(FLAC__StreamMetadata_CueSheet_Index))
-+ return false;
-
- FLAC__ASSERT(track->num_indices > 0);
-
-@@ -1374,8 +1391,12 @@
- return false;
- }
- else {
-- const unsigned old_size = object->data.cue_sheet.num_tracks * sizeof(FLAC__StreamMetadata_CueSheet_Track);
-- const unsigned new_size = new_num_tracks * sizeof(FLAC__StreamMetadata_CueSheet_Track);
-+ const size_t old_size = object->data.cue_sheet.num_tracks * sizeof(FLAC__StreamMetadata_CueSheet_Track);
-+ const size_t new_size = new_num_tracks * sizeof(FLAC__StreamMetadata_CueSheet_Track);
-+
-+ /* overflow check */
-+ if((size_t)new_num_tracks > SIZE_MAX / sizeof(FLAC__StreamMetadata_CueSheet_Track))
-+ return false;
-
- FLAC__ASSERT(object->data.cue_sheet.num_tracks > 0);
-
diff --git a/audio/flac/files/patch-src_libFLAC_stream__decoder.c b/audio/flac/files/patch-src_libFLAC_stream__decoder.c
deleted file mode 100644
index dfbfa72fb5bb..000000000000
--- a/audio/flac/files/patch-src_libFLAC_stream__decoder.c
+++ /dev/null
@@ -1,121 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/stream_decoder.c.orig
-+++ src/libFLAC/stream_decoder.c
-@@ -46,6 +46,7 @@
- #ifdef HAVE_CONFIG_H
- #include <config.h>
- #endif
-+#include "share/alloc.h"
-
- #ifdef max
- #undef max
-@@ -214,7 +215,7 @@
- }
-
- decoder->private_->metadata_filter_ids_capacity = 16;
-- if(0 == (decoder->private_->metadata_filter_ids = (FLAC__byte*)malloc((FLAC__STREAM_METADATA_APPLICATION_ID_LEN/8) * decoder->private_->metadata_filter_ids_capacity))) {
-+ if(0 == (decoder->private_->metadata_filter_ids = (FLAC__byte*)safe_malloc_mul_2op_((FLAC__STREAM_METADATA_APPLICATION_ID_LEN/8), /*times*/decoder->private_->metadata_filter_ids_capacity))) {
- FLAC__bitbuffer_delete(decoder->private_->input);
- free(decoder->private_);
- free(decoder->protected_);
-@@ -455,7 +456,7 @@
- FLAC__ASSERT(0 != decoder->private_->metadata_filter_ids);
-
- if(decoder->private_->metadata_filter_ids_count == decoder->private_->metadata_filter_ids_capacity) {
-- if(0 == (decoder->private_->metadata_filter_ids = (FLAC__byte*)realloc(decoder->private_->metadata_filter_ids, decoder->private_->metadata_filter_ids_capacity * 2)))
-+ if(0 == (decoder->private_->metadata_filter_ids = (FLAC__byte*)safe_realloc_mul_2op_(decoder->private_->metadata_filter_ids, decoder->private_->metadata_filter_ids_capacity, /*times*/2)))
- return decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
- decoder->private_->metadata_filter_ids_capacity *= 2;
- }
-@@ -512,7 +513,7 @@
- FLAC__ASSERT(0 != decoder->private_->metadata_filter_ids);
-
- if(decoder->private_->metadata_filter_ids_count == decoder->private_->metadata_filter_ids_capacity) {
-- if(0 == (decoder->private_->metadata_filter_ids = (FLAC__byte*)realloc(decoder->private_->metadata_filter_ids, decoder->private_->metadata_filter_ids_capacity * 2)))
-+ if(0 == (decoder->private_->metadata_filter_ids = (FLAC__byte*)safe_realloc_mul_2op_(decoder->private_->metadata_filter_ids, decoder->private_->metadata_filter_ids_capacity, /*times*/2)))
- return decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
- decoder->private_->metadata_filter_ids_capacity *= 2;
- }
-@@ -804,7 +805,7 @@
- * (at negative indices) for alignment purposes; we use 4
- * to keep the data well-aligned.
- */
-- tmp = (FLAC__int32*)malloc(sizeof(FLAC__int32)*(size+4));
-+ tmp = (FLAC__int32*)safe_malloc_mul_2op_(sizeof(FLAC__int32), /*times*/(size+4));
- if(tmp == 0) {
- decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
- return false;
-@@ -967,7 +968,7 @@
- case FLAC__METADATA_TYPE_APPLICATION:
- /* remember, we read the ID already */
- if(real_length > 0) {
-- if(0 == (block.data.application.data = (FLAC__byte*)malloc(real_length))) {
-+ if(0 == (block.data.application.data = (FLAC__byte*)safe_malloc_(real_length))) {
- decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
-@@ -991,7 +992,7 @@
- break;
- default:
- if(real_length > 0) {
-- if(0 == (block.data.unknown.data = (FLAC__byte*)malloc(real_length))) {
-+ if(0 == (block.data.unknown.data = (FLAC__byte*)safe_malloc_(real_length))) {
- decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
-@@ -1132,7 +1133,7 @@
- decoder->private_->seek_table.data.seek_table.num_points = length / FLAC__STREAM_METADATA_SEEKPOINT_LENGTH;
-
- /* use realloc since we may pass through here several times (e.g. after seeking) */
-- if(0 == (decoder->private_->seek_table.data.seek_table.points = (FLAC__StreamMetadata_SeekPoint*)realloc(decoder->private_->seek_table.data.seek_table.points, decoder->private_->seek_table.data.seek_table.num_points * sizeof(FLAC__StreamMetadata_SeekPoint)))) {
-+ if(0 == (decoder->private_->seek_table.data.seek_table.points = (FLAC__StreamMetadata_SeekPoint*)safe_realloc_mul_2op_(decoder->private_->seek_table.data.seek_table.points, decoder->private_->seek_table.data.seek_table.num_points, /*times*/sizeof(FLAC__StreamMetadata_SeekPoint)))) {
- decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
-@@ -1171,7 +1172,7 @@
- if(!FLAC__bitbuffer_read_raw_uint32_little_endian(decoder->private_->input, &obj->vendor_string.length, read_callback_, decoder))
- return false; /* the read_callback_ sets the state for us */
- if(obj->vendor_string.length > 0) {
-- if(0 == (obj->vendor_string.entry = (FLAC__byte*)malloc(obj->vendor_string.length+1))) {
-+ if(0 == (obj->vendor_string.entry = (FLAC__byte*)safe_malloc_add_2op_(obj->vendor_string.length, /*+*/1))) {
- decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
-@@ -1189,7 +1190,7 @@
-
- /* read comments */
- if(obj->num_comments > 0) {
-- if(0 == (obj->comments = (FLAC__StreamMetadata_VorbisComment_Entry*)malloc(obj->num_comments * sizeof(FLAC__StreamMetadata_VorbisComment_Entry)))) {
-+ if(0 == (obj->comments = (FLAC__StreamMetadata_VorbisComment_Entry*)safe_malloc_mul_2op_(obj->num_comments, /*times*/sizeof(FLAC__StreamMetadata_VorbisComment_Entry)))) {
- decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
-@@ -1198,7 +1199,7 @@
- if(!FLAC__bitbuffer_read_raw_uint32_little_endian(decoder->private_->input, &obj->comments[i].length, read_callback_, decoder))
- return false; /* the read_callback_ sets the state for us */
- if(obj->comments[i].length > 0) {
-- if(0 == (obj->comments[i].entry = (FLAC__byte*)malloc(obj->comments[i].length+1))) {
-+ if(0 == (obj->comments[i].entry = (FLAC__byte*)safe_malloc_add_2op_(obj->comments[i].length, /*+*/1))) {
- decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
-@@ -1244,7 +1245,7 @@
- obj->num_tracks = x;
-
- if(obj->num_tracks > 0) {
-- if(0 == (obj->tracks = (FLAC__StreamMetadata_CueSheet_Track*)calloc(obj->num_tracks, sizeof(FLAC__StreamMetadata_CueSheet_Track)))) {
-+ if(0 == (obj->tracks = (FLAC__StreamMetadata_CueSheet_Track*)safe_calloc_(obj->num_tracks, sizeof(FLAC__StreamMetadata_CueSheet_Track)))) {
- decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
-@@ -1277,7 +1278,7 @@
- track->num_indices = (FLAC__byte)x;
-
- if(track->num_indices > 0) {
-- if(0 == (track->indices = (FLAC__StreamMetadata_CueSheet_Index*)calloc(track->num_indices, sizeof(FLAC__StreamMetadata_CueSheet_Index)))) {
-+ if(0 == (track->indices = (FLAC__StreamMetadata_CueSheet_Index*)safe_calloc_(track->num_indices, sizeof(FLAC__StreamMetadata_CueSheet_Index)))) {
- decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
diff --git a/audio/flac/files/patch-src_libFLAC_stream__encoder.c b/audio/flac/files/patch-src_libFLAC_stream__encoder.c
deleted file mode 100644
index 2bbfd294dafd..000000000000
--- a/audio/flac/files/patch-src_libFLAC_stream__encoder.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-$FreeBSD$
-
---- src/libFLAC/stream_encoder.c.orig
-+++ src/libFLAC/stream_encoder.c
-@@ -50,6 +50,7 @@
- #ifdef HAVE_CONFIG_H
- #include <config.h>
- #endif
-+#include "share/alloc.h"
-
- #ifdef min
- #undef min
-@@ -836,7 +837,7 @@
- */
- encoder->private_->verify.input_fifo.size = encoder->protected_->blocksize;
- for(i = 0; i < encoder->protected_->channels; i++) {
-- if(0 == (encoder->private_->verify.input_fifo.data[i] = (FLAC__int32*)malloc(sizeof(FLAC__int32) * encoder->private_->verify.input_fifo.size)))
-+ if(0 == (encoder->private_->verify.input_fifo.data[i] = (FLAC__int32*)safe_malloc_mul_2op_(sizeof(FLAC__int32), /*times*/encoder->private_->verify.input_fifo.size)))
- return encoder->protected_->state = FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR;
- }
- encoder->private_->verify.input_fifo.tail = 0;
diff --git a/audio/flac/files/patch-src_libOggFLAC_file__decoder.c b/audio/flac/files/patch-src_libOggFLAC_file__decoder.c
deleted file mode 100644
index 213336bb84a6..000000000000
--- a/audio/flac/files/patch-src_libOggFLAC_file__decoder.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-$FreeBSD$
-
---- src/libOggFLAC/file_decoder.c.orig
-+++ src/libOggFLAC/file_decoder.c
-@@ -43,6 +43,7 @@
- #include "FLAC/assert.h"
- #include "protected/file_decoder.h"
- #include "protected/seekable_stream_decoder.h"
-+#include "share/alloc.h"
-
- /***********************************************************************
- *
-@@ -248,7 +249,7 @@
- decoder->private_->filename = 0;
- }
- if(0 != strcmp(value, "-")) {
-- if(0 == (decoder->private_->filename = (char*)malloc(strlen(value)+1))) {
-+ if(0 == (decoder->private_->filename = (char*)safe_malloc_add_2op_(strlen(value), /*+*/1))) {
- decoder->protected_->state = OggFLAC__FILE_DECODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
diff --git a/audio/flac/files/patch-src_libOggFLAC_file__encoder.c b/audio/flac/files/patch-src_libOggFLAC_file__encoder.c
deleted file mode 100644
index 3c035a88109b..000000000000
--- a/audio/flac/files/patch-src_libOggFLAC_file__encoder.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-$FreeBSD$
-
---- src/libOggFLAC/file_encoder.c.orig
-+++ src/libOggFLAC/file_encoder.c
-@@ -35,6 +35,7 @@
- #include "FLAC/assert.h"
- #include "OggFLAC/seekable_stream_encoder.h"
- #include "protected/file_encoder.h"
-+#include "share/alloc.h"
-
- #ifdef max
- #undef max
-@@ -450,7 +451,7 @@
- free(encoder->private_->filename);
- encoder->private_->filename = 0;
- }
-- if(0 == (encoder->private_->filename = (char*)malloc(strlen(value)+1))) {
-+ if(0 == (encoder->private_->filename = (char*)safe_malloc_add_2op_(strlen(value), /*+*/1))) {
- encoder->protected_->state = OggFLAC__FILE_ENCODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
diff --git a/audio/flac/files/patch-src_libOggFLAC_ogg__helper.c b/audio/flac/files/patch-src_libOggFLAC_ogg__helper.c
deleted file mode 100644
index d843825582b2..000000000000
--- a/audio/flac/files/patch-src_libOggFLAC_ogg__helper.c
+++ /dev/null
@@ -1,31 +0,0 @@
-
-$FreeBSD$
-
---- src/libOggFLAC/ogg_helper.c.orig
-+++ src/libOggFLAC/ogg_helper.c
-@@ -34,6 +34,7 @@
- #include "FLAC/assert.h"
- #include "private/ogg_helper.h"
- #include "protected/seekable_stream_encoder.h"
-+#include "share/alloc.h"
-
-
- static FLAC__bool full_read_(OggFLAC__SeekableStreamEncoder *encoder, FLAC__byte *buffer, unsigned bytes, OggFLAC__SeekableStreamEncoderReadCallback read_callback, void *client_data)
-@@ -102,7 +103,7 @@
- }
-
- /* allocate space for the page header */
-- if(0 == (page->header = (unsigned char *)malloc(OGG_MAX_HEADER_LEN))) {
-+ if(0 == (page->header = (unsigned char *)safe_malloc_(OGG_MAX_HEADER_LEN))) {
- encoder->protected_->state = OggFLAC__SEEKABLE_STREAM_ENCODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
-@@ -144,7 +145,7 @@
- }
-
- /* allocate space for the page body */
-- if(0 == (page->body = (unsigned char *)malloc(page->body_len))) {
-+ if(0 == (page->body = (unsigned char *)safe_malloc_(page->body_len))) {
- encoder->protected_->state = OggFLAC__SEEKABLE_STREAM_ENCODER_MEMORY_ALLOCATION_ERROR;
- return false;
- }
diff --git a/audio/flac/files/patch-src_metaflac_operations.c b/audio/flac/files/patch-src_metaflac_operations.c
deleted file mode 100644
index 4bc7e111e987..000000000000
--- a/audio/flac/files/patch-src_metaflac_operations.c
+++ /dev/null
@@ -1,24 +0,0 @@
-
-$FreeBSD$
-
---- src/metaflac/operations.c.orig
-+++ src/metaflac/operations.c
-@@ -21,6 +21,7 @@
- #include "utils.h"
- #include "FLAC/assert.h"
- #include "FLAC/metadata.h"
-+#include "share/alloc.h"
- #include "share/grabbag.h"
- #include <stdio.h>
- #include <stdlib.h>
-@@ -430,8 +431,8 @@
- }
-
- if(
-- 0 == (title_gains = (float*)malloc(sizeof(float) * num_files)) ||
-- 0 == (title_peaks = (float*)malloc(sizeof(float) * num_files))
-+ 0 == (title_gains = (float*)safe_malloc_mul_2op_(sizeof(float), /*times*/num_files)) ||
-+ 0 == (title_peaks = (float*)safe_malloc_mul_2op_(sizeof(float), /*times*/num_files))
- )
- die("out of memory allocating space for title gains/peaks");
-
diff --git a/audio/flac/files/patch-src_metaflac_options.c b/audio/flac/files/patch-src_metaflac_options.c
deleted file mode 100644
index 5777d634331b..000000000000
--- a/audio/flac/files/patch-src_metaflac_options.c
+++ /dev/null
@@ -1,66 +0,0 @@
-
-$FreeBSD$
-
---- src/metaflac/options.c.orig
-+++ src/metaflac/options.c
-@@ -20,6 +20,7 @@
- #include "usage.h"
- #include "utils.h"
- #include "FLAC/assert.h"
-+#include "share/alloc.h"
- #include <ctype.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -183,7 +184,7 @@
-
- if(options->num_files > 0) {
- unsigned i = 0;
-- if(0 == (options->filenames = (char**)malloc(sizeof(char*) * options->num_files)))
-+ if(0 == (options->filenames = (char**)safe_malloc_mul_2op_(sizeof(char*), /*times*/options->num_files)))
- die("out of memory allocating space for file names list");
- while(share__optind < argc)
- options->filenames[i++] = local_strdup(argv[share__optind++]);
-@@ -661,8 +662,10 @@
- }
- if(options->ops.capacity <= options->ops.num_operations) {
- unsigned original_capacity = options->ops.capacity;
-- options->ops.capacity *= 4;
-- if(0 == (options->ops.operations = (Operation*)realloc(options->ops.operations, sizeof(Operation) * options->ops.capacity)))
-+ if(options->ops.capacity > SIZE_MAX / 2) /* overflow check */
-+ die("out of memory allocating space for option list");
-+ options->ops.capacity *= 2;
-+ if(0 == (options->ops.operations = (Operation*)safe_realloc_mul_2op_(options->ops.operations, sizeof(Operation), /*times*/options->ops.capacity)))
- die("out of memory allocating space for option list");
- memset(options->ops.operations + original_capacity, 0, sizeof(Operation) * (options->ops.capacity - original_capacity));
- }
-@@ -680,8 +683,10 @@
- }
- if(options->args.capacity <= options->args.num_arguments) {
- unsigned original_capacity = options->args.capacity;
-- options->args.capacity *= 4;
-- if(0 == (options->args.arguments = (Argument*)realloc(options->args.arguments, sizeof(Argument) * options->args.capacity)))
-+ if(options->args.capacity > SIZE_MAX / 2) /* overflow check */
-+ die("out of memory allocating space for option list");
-+ options->args.capacity *= 2;
-+ if(0 == (options->args.arguments = (Argument*)safe_realloc_mul_2op_(options->args.arguments, sizeof(Argument), /*times*/options->args.capacity)))
- die("out of memory allocating space for option list");
- memset(options->args.arguments + original_capacity, 0, sizeof(Argument) * (options->args.capacity - original_capacity));
- }
-@@ -897,7 +902,7 @@
-
- /* make space */
- FLAC__ASSERT(out->num_entries > 0);
-- if(0 == (out->entries = (unsigned*)malloc(sizeof(unsigned) * out->num_entries)))
-+ if(0 == (out->entries = (unsigned*)safe_malloc_mul_2op_(sizeof(unsigned), /*times*/out->num_entries)))
- die("out of memory allocating space for option list");
-
- /* load 'em up */
-@@ -936,7 +941,7 @@
-
- /* make space */
- FLAC__ASSERT(out->num_entries > 0);
-- if(0 == (out->entries = (Argument_BlockTypeEntry*)malloc(sizeof(Argument_BlockTypeEntry) * out->num_entries)))
-+ if(0 == (out->entries = (Argument_BlockTypeEntry*)safe_malloc_mul_2op_(sizeof(Argument_BlockTypeEntry), /*times*/out->num_entries)))
- die("out of memory allocating space for option list");
-
- /* load 'em up */
diff --git a/audio/flac/files/patch-src_metaflac_utils.c b/audio/flac/files/patch-src_metaflac_utils.c
deleted file mode 100644
index eab7b132ff03..000000000000
--- a/audio/flac/files/patch-src_metaflac_utils.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-$FreeBSD$
-
---- src/metaflac/utils.c.orig
-+++ src/metaflac/utils.c
-@@ -18,6 +18,7 @@
-
- #include "utils.h"
- #include "FLAC/assert.h"
-+#include "share/alloc.h"
- #include "share/utf8.h"
- #include <ctype.h>
- #include <stdarg.h>
-@@ -64,7 +65,7 @@
- if(nsource == 0)
- return;
-
-- *dest = (char*)realloc(*dest, ndest + nsource + 1);
-+ *dest = (char*)safe_realloc_add_3op_(*dest, ndest, /*+*/nsource, /*+*/1);
- if(0 == *dest)
- die("out of memory growing string");
- strcpy((*dest)+ndest, source);
diff --git a/audio/flac/files/patch-src_plugin__common_charset.c b/audio/flac/files/patch-src_plugin__common_charset.c
deleted file mode 100644
index ec73bd8e3042..000000000000
--- a/audio/flac/files/patch-src_plugin__common_charset.c
+++ /dev/null
@@ -1,25 +0,0 @@
-
-$FreeBSD$
-
---- src/plugin_common/charset.c.orig
-+++ src/plugin_common/charset.c
-@@ -83,6 +83,8 @@
- /* Due to a GLIBC bug, round outbuf_size up to a multiple of 4 */
- /* + 1 for nul in case len == 1 */
- outsize = ((length + 3) & ~3) + 1;
-+ if(outsize < length) /* overflow check */
-+ return NULL;
- out = (char*)malloc(outsize);
- outleft = outsize - 1;
- outptr = out;
-@@ -95,6 +97,10 @@
- {
- case E2BIG:
- used = outptr - out;
-+ if((outsize - 1) * 2 + 1 <= outsize) { /* overflow check */
-+ free(out);
-+ return NULL;
-+ }
- outsize = (outsize - 1) * 2 + 1;
- out = realloc(out, outsize);
- outptr = out + used;
diff --git a/audio/flac/files/patch-src_plugin__common_tags.c b/audio/flac/files/patch-src_plugin__common_tags.c
deleted file mode 100644
index 1439821d2f77..000000000000
--- a/audio/flac/files/patch-src_plugin__common_tags.c
+++ /dev/null
@@ -1,59 +0,0 @@
-
-$FreeBSD$
-
---- src/plugin_common/tags.c.orig
-+++ src/plugin_common/tags.c
-@@ -23,6 +23,7 @@
- #include "tags.h"
- #include "FLAC/assert.h"
- #include "FLAC/metadata.h"
-+#include "share/alloc.h"
-
-
- static __inline unsigned local__wide_strlen(const FLAC__uint16 *s)
-@@ -82,7 +83,7 @@
- }
-
- /* allocate */
-- out = (FLAC__uint16*)malloc(chars * sizeof(FLAC__uint16));
-+ out = (FLAC__uint16*)safe_malloc_mul_2op_(chars, /*times*/sizeof(FLAC__uint16));
- if (0 == out) {
- FLAC__ASSERT(0);
- return 0;
-@@ -130,19 +131,23 @@
- static char *local__convert_ucs2_to_utf8(const FLAC__uint16 *src, unsigned length)
- {
- char *out;
-- unsigned len = 0;
-+ unsigned len = 0, n;
-
- FLAC__ASSERT(0 != src);
-
- /* calculate length */
- {
- unsigned i;
-- for (i = 0; i < length; i++)
-- len += local__ucs2len(src[i]);
-+ for (i = 0; i < length; i++) {
-+ n += local__ucs2len(src[i]);
-+ if(len + n < len) /* overflow check */
-+ return 0;
-+ len += n;
-+ }
- }
-
- /* allocate */
-- out = (char*)malloc(len * sizeof(char));
-+ out = (char*)safe_malloc_mul_2op_(len, /*times*/sizeof(char));
- if (0 == out)
- return 0;
-
-@@ -265,7 +270,7 @@
- const size_t value_len = strlen(value);
- const size_t separator_len = strlen(separator);
- FLAC__byte *new_entry;
-- if(0 == (new_entry = (FLAC__byte*)realloc(entry->entry, entry->length + value_len + separator_len + 1)))
-+ if(0 == (new_entry = (FLAC__byte*)safe_realloc_add_4op_(entry->entry, entry->length, /*+*/value_len, /*+*/separator_len, /*+*/1)))
- return false;
- memcpy(new_entry+entry->length, separator, separator_len);
- entry->length += separator_len;
diff --git a/audio/flac/files/patch-src_share_utf8_charset.c b/audio/flac/files/patch-src_share_utf8_charset.c
deleted file mode 100644
index 109f3c8afafb..000000000000
--- a/audio/flac/files/patch-src_share_utf8_charset.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-$FreeBSD$
-
---- src/share/utf8/charset.c.orig
-+++ src/share/utf8/charset.c
-@@ -35,6 +35,7 @@
-
- #include <stdlib.h>
-
-+#include "share/alloc.h"
- #include "charset.h"
-
- #include "charmaps.h"
-@@ -492,7 +493,7 @@
- if (!charset1 || !charset2 )
- return -1;
-
-- tobuf = (char *)malloc(fromlen * charset2->max + 1);
-+ tobuf = (char *)safe_malloc_mul2add_(fromlen, /*times*/charset2->max, /*+*/1);
- if (!tobuf)
- return -2;
-
diff --git a/audio/flac/files/patch-src_share_utf8_iconvert.c b/audio/flac/files/patch-src_share_utf8_iconvert.c
deleted file mode 100644
index 755f1eaabd39..000000000000
--- a/audio/flac/files/patch-src_share_utf8_iconvert.c
+++ /dev/null
@@ -1,49 +0,0 @@
-
-$FreeBSD$
-
---- src/share/utf8/iconvert.c.orig
-+++ src/share/utf8/iconvert.c
-@@ -27,6 +27,7 @@
- #include <iconv.h>
- #include <stdlib.h>
- #include <string.h>
-+#include "share/alloc.h"
-
- /*
- * Convert data from one encoding to another. Return:
-@@ -79,7 +80,7 @@
- * This is deliberately not a config option as people often
- * change their iconv library without rebuilding applications.
- */
-- tocode1 = (char *)malloc(strlen(tocode) + 11);
-+ tocode1 = (char *)safe_malloc_add_2op_(strlen(tocode), /*+*/11);
- if (!tocode1)
- goto fail;
-
-@@ -117,6 +118,8 @@
- break;
- if (obl < 6) {
- /* Enlarge the buffer */
-+ if(utflen*2 < utflen) /* overflow check */
-+ goto fail;
- utflen *= 2;
- newbuf = (char *)realloc(utfbuf, utflen);
- if (!newbuf)
-@@ -143,7 +146,7 @@
- iconv_close(cd1);
- return ret;
- }
-- newbuf = (char *)realloc(utfbuf, (ob - utfbuf) + 1);
-+ newbuf = (char *)safe_realloc_add_2op_(utfbuf, (ob - utfbuf), /*+*/1);
- if (!newbuf)
- goto fail;
- ob = (ob - utfbuf) + newbuf;
-@@ -194,7 +197,7 @@
- outlen += ob - tbuf;
-
- /* Convert from UTF-8 for real */
-- outbuf = (char *)malloc(outlen + 1);
-+ outbuf = (char *)safe_malloc_add_2op_(outlen, /*+*/1);
- if (!outbuf)
- goto fail;
- ib = utfbuf;
diff --git a/audio/flac/files/patch-src_share_utf8_utf8.c b/audio/flac/files/patch-src_share_utf8_utf8.c
deleted file mode 100644
index ecb45334861a..000000000000
--- a/audio/flac/files/patch-src_share_utf8_utf8.c
+++ /dev/null
@@ -1,72 +0,0 @@
-
-$FreeBSD$
-
---- src/share/utf8/utf8.c.orig
-+++ src/share/utf8/utf8.c
-@@ -28,6 +28,7 @@
- #include <config.h>
- #endif
-
-+#include "share/alloc.h"
- #include "utf8.h"
- #include "charset.h"
-
-@@ -57,10 +58,13 @@
- } else {
- size += 3;
- }
-+ if(size+n < size) /* overflow check */
-+ return NULL;
-+ size += n;
- c = unicode[index++];
- }
-
-- out = malloc(size + 1);
-+ out = safe_malloc_add_2op_(size, /*+*/1);
- if (out == NULL)
- return NULL;
- index = 0;
-@@ -101,11 +105,15 @@
- } else {
- index += 1;
- }
-+ if(size + 1 == 0) /* overflow check */
-+ return NULL;
- size += 1;
- c = utf8[index++];
- }
-
-- out = malloc((size + 1) * sizeof(wchar_t));
-+ if(size + 1 == 0) /* overflow check */
-+ return NULL;
-+ out = safe_malloc_mul_2op_((size + 1), /*times*/sizeof(wchar_t));
- if (out == NULL)
- return NULL;
- index = 0;
-@@ -147,7 +155,7 @@
- return -1;
- }
-
-- unicode = calloc(wchars + 1, sizeof(unsigned short));
-+ unicode = safe_calloc_(wchars + 1, sizeof(unsigned short));
- if(unicode == NULL)
- {
- fprintf(stderr, "Out of memory processing string to UTF8\n");
-@@ -197,7 +205,7 @@
- return -1;
- }
-
-- *to = calloc(chars + 1, sizeof(unsigned char));
-+ *to = safe_calloc_(chars + 1, sizeof(unsigned char));
- if(*to == NULL)
- {
- fprintf(stderr, "Out of memory processing string to local charset\n");
-@@ -285,7 +293,7 @@
- if (ret != -1)
- return ret;
-
-- s = malloc(fromlen + 1);
-+ s = safe_malloc_add_2op_(fromlen, /*+*/1);
- if (!s)
- return -1;
- strcpy(s, from);
diff --git a/audio/flac/pkg-descr b/audio/flac/pkg-descr
index 84ebeba47487..4bb4f57e88f1 100644
--- a/audio/flac/pkg-descr
+++ b/audio/flac/pkg-descr
@@ -2,10 +2,8 @@ FLAC is an Open Source lossless audio codec.
FLAC is comprised of
* libFLAC, a library which implements reference encoders and
- decoders, and a metadata interface
+ decoders for native FLAC and Ogg FLAC, and a metadata interface
* libFLAC++, a C++ object wrapper library around libFLAC
-* libOggFLAC and libOggFLAC++, which provide encoders and
- decoders for FLAC streams in an Ogg container
* flac, a command-line program for encoding and decoding files
* metaflac, a command-line program for viewing and editing FLAC
metadata
diff --git a/audio/flac/pkg-plist b/audio/flac/pkg-plist
index c332ab9d659d..60dea510fef6 100644
--- a/audio/flac/pkg-plist
+++ b/audio/flac/pkg-plist
@@ -10,218 +10,161 @@ include/FLAC/all.h
include/FLAC/assert.h
include/FLAC/callback.h
include/FLAC/export.h
-include/FLAC/file_decoder.h
-include/FLAC/file_encoder.h
include/FLAC/format.h
include/FLAC/metadata.h
include/FLAC/ordinals.h
-include/FLAC/seekable_stream_decoder.h
-include/FLAC/seekable_stream_encoder.h
include/FLAC/stream_decoder.h
include/FLAC/stream_encoder.h
-include/OggFLAC++/all.h
-include/OggFLAC++/decoder.h
-include/OggFLAC++/encoder.h
-include/OggFLAC++/export.h
-include/OggFLAC/all.h
-include/OggFLAC/export.h
-include/OggFLAC/file_decoder.h
-include/OggFLAC/file_encoder.h
-include/OggFLAC/seekable_stream_decoder.h
-include/OggFLAC/seekable_stream_encoder.h
-include/OggFLAC/stream_decoder.h
-include/OggFLAC/stream_encoder.h
lib/libFLAC++.a
lib/libFLAC++.la
lib/libFLAC++.so
-lib/libFLAC++.so.5
+lib/libFLAC++.so.8
lib/libFLAC.a
lib/libFLAC.la
lib/libFLAC.so
-lib/libFLAC.so.7
-lib/libOggFLAC++.a
-lib/libOggFLAC++.la
-lib/libOggFLAC++.so
-lib/libOggFLAC++.so.2
-lib/libOggFLAC.a
-lib/libOggFLAC.la
-lib/libOggFLAC.so
-lib/libOggFLAC.so.3
+lib/libFLAC.so.10
+libdata/pkgconfig/flac++.pc
+libdata/pkgconfig/flac.pc
share/aclocal/libFLAC++.m4
share/aclocal/libFLAC.m4
-share/aclocal/libOggFLAC++.m4
-share/aclocal/libOggFLAC.m4
%%PORTDOCS%%%%DOCSDIR%%/FLAC.tag
+%%PORTDOCS%%%%DOCSDIR%%/html/api/+_2all_8h-source.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/+_2export_8h-source.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/+_2export_8h.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/+_2metadata_8h-source.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/+_2metadata_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC++_2all_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC++_2decoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC++_2decoder_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC++_2encoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC++_2encoder_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC++_2export_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC_2all_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC_2export_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC_2file__encoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC_2file__encoder_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC_2seekable__stream__encoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC_2seekable__stream__encoder_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC_2stream__decoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC_2stream__decoder_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC_2stream__encoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/FLAC_2stream__encoder_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC++_2all_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC++_2decoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC++_2decoder_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC++_2encoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC++_2encoder_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC++_2export_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC_2all_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC_2export_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC_2file__encoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC_2file__encoder_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC_2seekable__stream__encoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC_2seekable__stream__encoder_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC_2stream__decoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC_2stream__decoder_8h.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC_2stream__encoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/OggFLAC_2stream__encoder_8h.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/all_8h-source.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/annotated.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/assert_8h-source.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/callback_8h-source.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/callback_8h.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Decoder_1_1File-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Decoder_1_1File.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Decoder_1_1SeekableStream-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Decoder_1_1SeekableStream.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Decoder_1_1File.png
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Decoder_1_1Stream-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Decoder_1_1Stream.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Decoder_1_1Stream.png
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Decoder_1_1Stream_1_1State-members.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Decoder_1_1Stream_1_1State.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Encoder_1_1File-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Encoder_1_1File.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Encoder_1_1SeekableStream-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Encoder_1_1SeekableStream.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Encoder_1_1File.png
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Encoder_1_1Stream-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Encoder_1_1Stream.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Encoder_1_1Stream.png
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Encoder_1_1Stream_1_1State-members.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Encoder_1_1Stream_1_1State.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Application-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Application.gif
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Application.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Application.png
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Chain-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Chain.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Chain_1_1Status-members.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Chain_1_1Status.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1CueSheet-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1CueSheet.gif
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1CueSheet.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1CueSheet.png
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1CueSheet_1_1Track-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1CueSheet_1_1Track.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Iterator-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Iterator.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Padding-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Padding.gif
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Padding.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Padding.png
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Picture-members.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Picture.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Picture.png
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Prototype-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Prototype.gif
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Prototype.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Prototype.png
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1SeekTable-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1SeekTable.gif
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1SeekTable.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1SeekTable.png
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1SimpleIterator-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1SimpleIterator.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1SimpleIterator_1_1Status-members.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1SimpleIterator_1_1Status.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1StreamInfo-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1StreamInfo.gif
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1StreamInfo.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1StreamInfo.png
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Unknown-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Unknown.gif
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Unknown.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1Unknown.png
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1VorbisComment-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1VorbisComment.gif
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1VorbisComment.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1VorbisComment.png
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1VorbisComment_1_1Entry-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classFLAC_1_1Metadata_1_1VorbisComment_1_1Entry.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Decoder_1_1File-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Decoder_1_1File.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Decoder_1_1SeekableStream-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Decoder_1_1SeekableStream.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Decoder_1_1Stream-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Decoder_1_1Stream.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Encoder_1_1File-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Encoder_1_1File.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Encoder_1_1SeekableStream-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Encoder_1_1SeekableStream.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Encoder_1_1Stream-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/classOggFLAC_1_1Encoder_1_1Stream.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/classes.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/decoder_8h-source.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/decoder_8h.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/dir_000000.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/dir_000001.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/dir_000002.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/dirs.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/doxygen.css
-%%PORTDOCS%%%%DOCSDIR%%/html/api/doxygen.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/api/file__decoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/file__decoder_8h.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/doxygen.png
+%%PORTDOCS%%%%DOCSDIR%%/html/api/encoder_8h-source.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/encoder_8h.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/export_8h-source.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/export_8h.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/files.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/format_8h-source.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/format_8h.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/functions.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/functions_func.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/functions_vars.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/globals.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/globals_0x66.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/globals_0x67.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/globals_defs.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/globals_enum.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/globals_eval.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/globals_func.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/globals_type.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/globals_vars.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__callbacks.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__decoder.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__encoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__file__decoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__file__encoder.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__export.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__format.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__metadata.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__metadata__level0.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__metadata__level1.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__metadata__level2.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__metadata__object.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__seekable__stream__decoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__seekable__stream__encoder.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__stream__decoder.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flac__stream__encoder.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__decoder.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__encoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__file__decoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__file__encoder.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__export.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__metadata.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__metadata__level0.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__metadata__level1.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__metadata__level2.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__metadata__object.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__seekable__stream__decoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__seekable__stream__encoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__stream__decoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__flacpp__stream__encoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflac.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflac__decoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflac__encoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflac__file__encoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflac__seekable__stream__encoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflac__stream__decoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflac__stream__encoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflacpp.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflacpp__decoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflacpp__encoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflacpp__file__decoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflacpp__file__encoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflacpp__seekable__stream__decoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflacpp__seekable__stream__encoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflacpp__stream__decoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/group__oggflacpp__stream__encoder.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/group__porting.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/group__porting__1__1__2__to__1__1__3.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/group__porting__1__1__3__to__1__1__4.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/group__porting__1__1__4__to__1__2__0.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/hierarchy.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/index.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/metadata_8h-source.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/metadata_8h.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/modules.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/ordinals_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/seekable__stream__decoder_8h-source.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/seekable__stream__decoder_8h.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/stream__decoder_8h-source.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/stream__decoder_8h.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/stream__encoder_8h-source.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/stream__encoder_8h.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____EntropyCodingMethod-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____EntropyCodingMethod.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____EntropyCodingMethod__PartitionedRice-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____EntropyCodingMethod__PartitionedRice.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____EntropyCodingMethod__PartitionedRiceContents-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____EntropyCodingMethod__PartitionedRiceContents.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____FileDecoder-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____FileDecoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____FileEncoder-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____FileEncoder.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____Frame-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____Frame.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____FrameFooter-members.html
@@ -230,10 +173,6 @@ share/aclocal/libOggFLAC.m4
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____FrameHeader.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____IOCallbacks-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____IOCallbacks.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____SeekableStreamDecoder-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____SeekableStreamDecoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____SeekableStreamEncoder-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____SeekableStreamEncoder.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____StreamDecoder-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____StreamDecoder.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____StreamEncoder-members.html
@@ -250,6 +189,8 @@ share/aclocal/libOggFLAC.m4
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____StreamMetadata__CueSheet__Track.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____StreamMetadata__Padding-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____StreamMetadata__Padding.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____StreamMetadata__Picture-members.html
+%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____StreamMetadata__Picture.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____StreamMetadata__SeekPoint-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____StreamMetadata__SeekPoint.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____StreamMetadata__SeekTable-members.html
@@ -272,30 +213,78 @@ share/aclocal/libOggFLAC.m4
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____Subframe__LPC.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____Subframe__Verbatim-members.html
%%PORTDOCS%%%%DOCSDIR%%/html/api/structFLAC____Subframe__Verbatim.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structOggFLAC____FileEncoder-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structOggFLAC____FileEncoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structOggFLAC____SeekableStreamEncoder-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structOggFLAC____SeekableStreamEncoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structOggFLAC____StreamDecoder-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structOggFLAC____StreamDecoder.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structOggFLAC____StreamEncoder-members.html
-%%PORTDOCS%%%%DOCSDIR%%/html/api/structOggFLAC____StreamEncoder.html
%%PORTDOCS%%%%DOCSDIR%%/html/changelog.html
%%PORTDOCS%%%%DOCSDIR%%/html/comparison.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__chopin_prelude_24.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__dream_theater_600.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__eddie_warner_titus.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__fanfare_de_l_eventail_de_jeanne.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__gloria_estefan_conga.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__hand_in_my_pocket.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__l_sub_raga_sivapriya.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__laetatus_sum.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__mummified_in_barbed_wire.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__prokofiev_pcon3_3.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__ravel_sq4_4.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__scarlatti_k42.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__tool_forty_six_and_2.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison__white_room.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison_all_cpudectime.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison_all_cpuenctime.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison_all_procdectime.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison_all_procenctime.html
+%%PORTDOCS%%%%DOCSDIR%%/html/comparison_all_ratio.html
%%PORTDOCS%%%%DOCSDIR%%/html/developers.html
%%PORTDOCS%%%%DOCSDIR%%/html/documentation.html
+%%PORTDOCS%%%%DOCSDIR%%/html/documentation_bugs.html
+%%PORTDOCS%%%%DOCSDIR%%/html/documentation_example_code.html
+%%PORTDOCS%%%%DOCSDIR%%/html/documentation_format_overview.html
+%%PORTDOCS%%%%DOCSDIR%%/html/documentation_tasks.html
+%%PORTDOCS%%%%DOCSDIR%%/html/documentation_tools.html
+%%PORTDOCS%%%%DOCSDIR%%/html/documentation_tools_flac.html
+%%PORTDOCS%%%%DOCSDIR%%/html/documentation_tools_metaflac.html
+%%PORTDOCS%%%%DOCSDIR%%/html/documentation_tools_plugins.html
%%PORTDOCS%%%%DOCSDIR%%/html/download.html
%%PORTDOCS%%%%DOCSDIR%%/html/faq.html
%%PORTDOCS%%%%DOCSDIR%%/html/favicon.ico
%%PORTDOCS%%%%DOCSDIR%%/html/features.html
+%%PORTDOCS%%%%DOCSDIR%%/html/flac.css
%%PORTDOCS%%%%DOCSDIR%%/html/format.html
-%%PORTDOCS%%%%DOCSDIR%%/html/goals.html
%%PORTDOCS%%%%DOCSDIR%%/html/id.html
%%PORTDOCS%%%%DOCSDIR%%/html/images/1x1.gif
%%PORTDOCS%%%%DOCSDIR%%/html/images/cafebug.gif
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/Blackbird_Front_low3_325x87.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/MS300frontsmall_270x108.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/MediaBox_Frt_170x325.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/SB_Hero_Black_325x182.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/Sooloos-ControlOne_325x328.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/Z500_front_325x94.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/a2_01_325x252.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/arcus_325x135.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/bmp-1430_325x241.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/cs505_front_lrg_325x113.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/enus_3-4lft-hires_product_eva8000_325x127.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/escient_ProductLine_325x163.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/hifidelio_bl_front_Z_RGB_325x163.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/i-station-mini-dx_325x237.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/iwod-g10_325x257.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/knc_hr-2800_325x209.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/mediaready_prodmain_MRMCa_325x232.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/meizu_m6_325x206.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/musica_artwork_325x90.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/neodigits_x5000_325x124.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/onda-vx737_325x240.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/request_n_front_325x103.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/rio_karma_279x254.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/sonos_family_RGB_325x200.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/teclast-tl29_325x244.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/transporter_hero_grey_325x208.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/tvix-4000_325x204.jpg
+%%PORTDOCS%%%%DOCSDIR%%/html/images/hw/vibez_nofm_combi_black_b_325x220.jpg
%%PORTDOCS%%%%DOCSDIR%%/html/images/logo100.gif
%%PORTDOCS%%%%DOCSDIR%%/html/images/logo130.gif
%%PORTDOCS%%%%DOCSDIR%%/html/index.html
+%%PORTDOCS%%%%DOCSDIR%%/html/itunes.html
%%PORTDOCS%%%%DOCSDIR%%/html/license.html
%%PORTDOCS%%%%DOCSDIR%%/html/links.html
%%PORTDOCS%%%%DOCSDIR%%/html/news.html
@@ -313,11 +302,10 @@ share/aclocal/libOggFLAC.m4
%%PORTDOCS%%%%DOCSDIR%%/html/ru/links.html
%%PORTDOCS%%%%DOCSDIR%%/html/ru/news.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/ru
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/images/hw
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/images
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/api
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrm include/OggFLAC++
-@dirrm include/OggFLAC
@dirrm include/FLAC++
@dirrm include/FLAC