From nobody Fri May 06 09:59:39 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DE6751AC85F5; Fri, 6 May 2022 09:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KvmJC5t6zz4gk5; Fri, 6 May 2022 09:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651831179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AgPjVpegNmOGBO+9tiaRhMiSNGYGsk6r3CNZ3GxSv3U=; b=mcHoQCR+Y9DSA96roXFc1nIrzxAkHx/vBszVDL+Hrq51LAAgT/YSMra52hUEPU7brJt2LW Ixk/rXzhI3rNDKj+rzUECPbFSQtkXUCHOjpzGFtdd/Df/Bb0hYJHWEGRu3t/zzswfIK1Pu RW094DOmqD2oQG4eVJ1L0JBOJjWerlTJqhgJjm0F9aYVQAiY/lt4l4dYcIt29AjnFiQiyl O7Rwvw2MSFSYyDJtAX9FHeI1iCb01tiEXioJSUcmdbUeFngIOxBIP3aRPRbVGBufbzcYF8 YUeJxn3YezIwRlfVJuo8eX6/Zw8kZgnmW3p9xGaVoObnNqecCg8IHi4X+HENCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6041199BC; Fri, 6 May 2022 09:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2469xdpD078401; Fri, 6 May 2022 09:59:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2469xdPt078400; Fri, 6 May 2022 09:59:39 GMT (envelope-from git) Date: Fri, 6 May 2022 09:59:39 GMT Message-Id: <202205060959.2469xdPt078400@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: 519c89efe3a9 - main - audio/libmad: Update to 0.16.0 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 519c89efe3a9ddc8f3a57d1bb4940ff355086576 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651831179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AgPjVpegNmOGBO+9tiaRhMiSNGYGsk6r3CNZ3GxSv3U=; b=M1aj80ovMhBwCbOnwoOSKNf1pok5ULne1RHq+spDk1tY02z1Ef6lzsA+woxTvQeiiq7YIG X56Vg0uG8R0sSnHtUqCabQzel3Jf7Sy/W07sbC1sfAK5HSpsLbLBAPp+HlnYSXAms2FT/B +yoZ7PloV1Sab3x2yfERuB9fASgc19FOWr5Daj6/CAC6FBwbK+Q/Co+T+hplkge6lGQFoe OxSwWXDjHm7SyX4vHqAC8Utb4nlOU0igab9cjP2On3G8NKeAkAqHRW2n0gjMWDbbDjOilO aDVqGHaAypjGflf/jtmL4RJWX8Ks56UIkSNDXpQ1ObIakR/ZM0zBhFaSFoAg8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651831179; a=rsa-sha256; cv=none; b=XAmfD4/ejenW1aQEG4k63kxfrrn2U2nB62r52kcKE0SpqyGVkR/jacBM3CJjsF1vWYo2L9 wEblcRYm7qPevFWQtR5i6gvQEDehQkSNn6zwG5q06unaeF2DTiqTTHAxPMJvXbdSMqxhIk I4IJxWvsasvtaFURE87cstwS/jBpuiys3czgUbXUSJvdWWvgZwQBZCxxTeVb45JBKB6OP5 apz1YsC8ak8v7HRnU+1vAO72q38AkCnPhMODPRXr9XpEvDrrzKVyEw+hrMzLULUJBOSNmy D3WPE4QRW7CGdaFMecNCQ3mjyk0jO9u+ysufA5SZqZqIDc2qPWCXQnivsY0ZLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=519c89efe3a9ddc8f3a57d1bb4940ff355086576 commit 519c89efe3a9ddc8f3a57d1bb4940ff355086576 Author: Daniel Engberg AuthorDate: 2022-05-06 09:47:30 +0000 Commit: Daniel Engberg CommitDate: 2022-05-06 09:59:33 +0000 audio/libmad: Update to 0.16.0 Switch to Tenacity's fork which contains patched code for all known CVEs and various build fixes. This also makes it easier to maintain as we're using an active fork. Upstream has also switched to CMake. PR: 262874 Approved by: sunpoet (maintainer timeout 4+ weeks) --- audio/libmad/Makefile | 30 +++---- audio/libmad/distinfo | 9 +- audio/libmad/files/mad.pc.in | 11 --- audio/libmad/files/patch-configure | 40 --------- audio/libmad/files/patch-layer12.c | 175 ------------------------------------- audio/libmad/files/patch-layer3.c | 17 ---- audio/libmad/pkg-plist | 10 ++- 7 files changed, 23 insertions(+), 269 deletions(-) diff --git a/audio/libmad/Makefile b/audio/libmad/Makefile index 8eec6b24bf38..9d5d6fe91a5f 100644 --- a/audio/libmad/Makefile +++ b/audio/libmad/Makefile @@ -1,35 +1,25 @@ # Created by: Sergey Akifyev PORTNAME= libmad -PORTVERSION= 0.15.1b -PORTREVISION= 7 +DISTVERSION= 0.16.0 CATEGORIES= audio -MASTER_SITES= SF/mad/${PORTNAME}/${PORTVERSION} + +PATCH_SITES= https://github.com/tenacityteam/libmad/commit/ +PATCHFILES= c2eb5e1a728c973ea3f957d4cb6e04d77f745568.patch:-p1 \ + a8ca654e3666f442805d93722290bb218b633428.patch:-p1 MAINTAINER= sunpoet@FreeBSD.org COMMENT= Libmad library (part of MAD project) LICENSE= GPLv2 -USES= cpe libtool - -CONFIGURE_ARGS= --disable-debugging --enable-sso -GNU_CONFIGURE= yes -INSTALL_TARGET= install-strip -USE_LDCONFIG= yes - -SUB_LIST= VERSION=${PORTVERSION} -SUB_FILES= mad.pc - +USES= cmake cpe pathfix CPE_VENDOR= underbit -OPTIONS_DEFINE= SPEED -SPEED_DESC= Optimize for speed over accuracy - -SPEED_CONFIGURE_ON= --enable-speed -SPEED_CONFIGURE_OFF= --enable-accuracy +USE_GITHUB= yes +GH_ACCOUNT= tenacityteam +GH_TAGNAME= 15d1ef05 -post-install: - ${INSTALL_DATA} ${WRKDIR}/mad.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/ +USE_LDCONFIG= yes .include diff --git a/audio/libmad/distinfo b/audio/libmad/distinfo index 45ba3689d2e1..72b5f612ddcc 100644 --- a/audio/libmad/distinfo +++ b/audio/libmad/distinfo @@ -1,2 +1,7 @@ -SHA256 (libmad-0.15.1b.tar.gz) = bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690 -SIZE (libmad-0.15.1b.tar.gz) = 502379 +TIMESTAMP = 1648676242 +SHA256 (tenacityteam-libmad-0.16.0-15d1ef05_GH0.tar.gz) = e380ee75784732cbf619c44df10418d652a30134f24e40b41d44b59b0a9f5579 +SIZE (tenacityteam-libmad-0.16.0-15d1ef05_GH0.tar.gz) = 213534 +SHA256 (c2eb5e1a728c973ea3f957d4cb6e04d77f745568.patch) = 6bc3b4656686801cbc526554226594361ddf97a6334eaadcb4765efd1c0ed916 +SIZE (c2eb5e1a728c973ea3f957d4cb6e04d77f745568.patch) = 972 +SHA256 (a8ca654e3666f442805d93722290bb218b633428.patch) = c15bf57d20090bd13a1749454ca987f47262136c4ae4781914062247b376a7df +SIZE (a8ca654e3666f442805d93722290bb218b633428.patch) = 814 diff --git a/audio/libmad/files/mad.pc.in b/audio/libmad/files/mad.pc.in deleted file mode 100644 index a7689a62deec..000000000000 --- a/audio/libmad/files/mad.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=%%PREFIX%% -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: mad -Description: MPEG Audio Decoder -Requires: -Version: %%VERSION%% -Libs: -L${libdir} -lmad -lm -Cflags: -I${includedir} diff --git a/audio/libmad/files/patch-configure b/audio/libmad/files/patch-configure deleted file mode 100644 index 5d5c3f1563f6..000000000000 --- a/audio/libmad/files/patch-configure +++ /dev/null @@ -1,40 +0,0 @@ ---- configure.orig 2004-02-05 09:34:07 UTC -+++ configure -@@ -19096,24 +19096,30 @@ then - esac - fi - -+ if $CC -v 2>&1 | grep clang > /dev/null; then -+ CLANG=yes -+ else -+ CLANG=no -+ fi -+ - case "$optimize" in - -O|"-O "*) - optimize="-O" -- optimize="$optimize -fforce-mem" -- optimize="$optimize -fforce-addr" -+ optimize="$optimize" -+ test $CLANG = no && optimize="$optimize -fforce-addr" - : #x optimize="$optimize -finline-functions" - : #- optimize="$optimize -fstrength-reduce" -- optimize="$optimize -fthread-jumps" -- optimize="$optimize -fcse-follow-jumps" -- optimize="$optimize -fcse-skip-blocks" -+ test $CLANG = no && optimize="$optimize -fthread-jumps" -+ test $CLANG = no && optimize="$optimize -fcse-follow-jumps" -+ test $CLANG = no && optimize="$optimize -fcse-skip-blocks" - : #x optimize="$optimize -frerun-cse-after-loop" - : #x optimize="$optimize -frerun-loop-opt" - : #x optimize="$optimize -fgcse" - optimize="$optimize -fexpensive-optimizations" -- optimize="$optimize -fregmove" -+ test $CLANG = no && optimize="$optimize -fregmove" - : #* optimize="$optimize -fdelayed-branch" - : #x optimize="$optimize -fschedule-insns" -- optimize="$optimize -fschedule-insns2" -+ test $CLANG = no && optimize="$optimize -fschedule-insns2" - : #? optimize="$optimize -ffunction-sections" - : #? optimize="$optimize -fcaller-saves" - : #> optimize="$optimize -funroll-loops" diff --git a/audio/libmad/files/patch-layer12.c b/audio/libmad/files/patch-layer12.c deleted file mode 100644 index 27e572259ff9..000000000000 --- a/audio/libmad/files/patch-layer12.c +++ /dev/null @@ -1,175 +0,0 @@ -Obtained from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508133#15 - ---- layer12.c.orig 2004-02-05 09:02:39 UTC -+++ layer12.c -@@ -134,6 +134,12 @@ int mad_layer_I(struct mad_stream *strea - for (sb = 0; sb < bound; ++sb) { - for (ch = 0; ch < nch; ++ch) { - nb = mad_bit_read(&stream->ptr, 4); -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - - if (nb == 15) { - stream->error = MAD_ERROR_BADBITALLOC; -@@ -146,6 +152,12 @@ int mad_layer_I(struct mad_stream *strea - - for (sb = bound; sb < 32; ++sb) { - nb = mad_bit_read(&stream->ptr, 4); -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - - if (nb == 15) { - stream->error = MAD_ERROR_BADBITALLOC; -@@ -162,6 +174,12 @@ int mad_layer_I(struct mad_stream *strea - for (ch = 0; ch < nch; ++ch) { - if (allocation[ch][sb]) { - scalefactor[ch][sb] = mad_bit_read(&stream->ptr, 6); -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - - # if defined(OPT_STRICT) - /* -@@ -187,6 +205,12 @@ int mad_layer_I(struct mad_stream *strea - frame->sbsample[ch][s][sb] = nb ? - mad_f_mul(I_sample(&stream->ptr, nb), - sf_table[scalefactor[ch][sb]]) : 0; -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - } - } - -@@ -195,6 +219,12 @@ int mad_layer_I(struct mad_stream *strea - mad_fixed_t sample; - - sample = I_sample(&stream->ptr, nb); -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - - for (ch = 0; ch < nch; ++ch) { - frame->sbsample[ch][s][sb] = -@@ -403,7 +433,15 @@ int mad_layer_II(struct mad_stream *stre - nbal = bitalloc_table[offsets[sb]].nbal; - - for (ch = 0; ch < nch; ++ch) -+ { - allocation[ch][sb] = mad_bit_read(&stream->ptr, nbal); -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } -+ } - } - - for (sb = bound; sb < sblimit; ++sb) { -@@ -411,6 +449,13 @@ int mad_layer_II(struct mad_stream *stre - - allocation[0][sb] = - allocation[1][sb] = mad_bit_read(&stream->ptr, nbal); -+ -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - } - - /* decode scalefactor selection info */ -@@ -419,6 +464,12 @@ int mad_layer_II(struct mad_stream *stre - for (ch = 0; ch < nch; ++ch) { - if (allocation[ch][sb]) - scfsi[ch][sb] = mad_bit_read(&stream->ptr, 2); -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - } - } - -@@ -442,6 +493,12 @@ int mad_layer_II(struct mad_stream *stre - for (ch = 0; ch < nch; ++ch) { - if (allocation[ch][sb]) { - scalefactor[ch][sb][0] = mad_bit_read(&stream->ptr, 6); -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - - switch (scfsi[ch][sb]) { - case 2: -@@ -452,11 +509,23 @@ int mad_layer_II(struct mad_stream *stre - - case 0: - scalefactor[ch][sb][1] = mad_bit_read(&stream->ptr, 6); -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - /* fall through */ - - case 1: - case 3: - scalefactor[ch][sb][2] = mad_bit_read(&stream->ptr, 6); -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - } - - if (scfsi[ch][sb] & 1) -@@ -488,6 +557,12 @@ int mad_layer_II(struct mad_stream *stre - index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; - - II_samples(&stream->ptr, &qc_table[index], samples); -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - - for (s = 0; s < 3; ++s) { - frame->sbsample[ch][3 * gr + s][sb] = -@@ -506,6 +581,12 @@ int mad_layer_II(struct mad_stream *stre - index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; - - II_samples(&stream->ptr, &qc_table[index], samples); -+ if (mad_bit_nextbyte(&stream->ptr) > stream->next_frame) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - - for (ch = 0; ch < nch; ++ch) { - for (s = 0; s < 3; ++s) { diff --git a/audio/libmad/files/patch-layer3.c b/audio/libmad/files/patch-layer3.c deleted file mode 100644 index 5f7455f5382b..000000000000 --- a/audio/libmad/files/patch-layer3.c +++ /dev/null @@ -1,17 +0,0 @@ -Obtained from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508133#15 - ---- layer3.c.orig 2004-01-23 09:41:32 UTC -+++ layer3.c -@@ -2608,6 +2608,12 @@ int mad_layer_III(struct mad_stream *str - next_md_begin = 0; - - md_len = si.main_data_begin + frame_space - next_md_begin; -+ if (md_len + MAD_BUFFER_GUARD > MAD_BUFFER_MDLEN) -+ { -+ stream->error = MAD_ERROR_LOSTSYNC; -+ stream->sync = 0; -+ return -1; -+ } - - frame_used = 0; - diff --git a/audio/libmad/pkg-plist b/audio/libmad/pkg-plist index 5df894177e6c..bd16846cadd9 100644 --- a/audio/libmad/pkg-plist +++ b/audio/libmad/pkg-plist @@ -1,6 +1,8 @@ include/mad.h -lib/libmad.a +lib/cmake/mad/madConfig.cmake +lib/cmake/mad/madConfigVersion.cmake +lib/cmake/mad/madTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/mad/madTargets.cmake lib/libmad.so -lib/libmad.so.0 -lib/libmad.so.0.2.1 -libdata/pkgconfig/mad.pc +lib/libmad.so.0.16.0 +libdata/pkgconfig/libmad.pc