public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/flac/, media-libs/flac/files/
@ 2021-01-16 12:14 Miroslav Šulc
  0 siblings, 0 replies; 4+ messages in thread
From: Miroslav Šulc @ 2021-01-16 12:14 UTC (permalink / raw
  To: gentoo-commits

commit:     843116182c8038fb70225fa0b3b50c6008b5fef3
Author:     Till Schäfer <till2.schaefer <AT> uni-dortmund <DOT> de>
AuthorDate: Fri Jan 15 09:25:53 2021 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Sat Jan 16 12:08:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84311618

media-libs/flac: fix zero prefix md5sum check

Bug: https://bugs.gentoo.org/719792
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Till Schäfer <till2.schaefer <AT> uni-dortmund.de>
Closes: https://github.com/gentoo/gentoo/pull/19064
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 ...ac-1.3.3-fix-zero-first-byte-md5sum-check.patch | 13 +++++
 media-libs/flac/flac-1.3.3-r1.ebuild               | 61 ++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/media-libs/flac/files/flac-1.3.3-fix-zero-first-byte-md5sum-check.patch b/media-libs/flac/files/flac-1.3.3-fix-zero-first-byte-md5sum-check.patch
new file mode 100644
index 00000000000..bcad809374e
--- /dev/null
+++ b/media-libs/flac/files/flac-1.3.3-fix-zero-first-byte-md5sum-check.patch
@@ -0,0 +1,13 @@
+diff --git a/src/flac/decode.c b/src/flac/decode.c
+index c26d3f60..bd3f6524 100644
+--- a/src/flac/decode.c
++++ b/src/flac/decode.c
+@@ -1307,7 +1307,7 @@ void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMet
+ 	if(metadata->type == FLAC__METADATA_TYPE_STREAMINFO) {
+ 		FLAC__uint64 skip, until;
+ 		decoder_session->got_stream_info = true;
+-		decoder_session->has_md5sum = memcmp(metadata->data.stream_info.md5sum, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16);
++		decoder_session->has_md5sum = memcmp(metadata->data.stream_info.md5sum, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) != 0;
+ 		decoder_session->bps = metadata->data.stream_info.bits_per_sample;
+ 		decoder_session->channels = metadata->data.stream_info.channels;
+ 		decoder_session->sample_rate = metadata->data.stream_info.sample_rate;

diff --git a/media-libs/flac/flac-1.3.3-r1.ebuild b/media-libs/flac/flac-1.3.3-r1.ebuild
new file mode 100644
index 00000000000..de296da512f
--- /dev/null
+++ b/media-libs/flac/flac-1.3.3-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib-minimal
+
+DESCRIPTION="free lossless audio encoder and decoder"
+HOMEPAGE="https://xiph.org/flac/"
+SRC_URI="https://downloads.xiph.org/releases/${PN}/${P}.tar.xz"
+
+LICENSE="BSD FDL-1.2 GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="+cxx debug ogg cpu_flags_ppc_altivec cpu_flags_ppc_vsx cpu_flags_x86_sse static-libs"
+
+RDEPEND="ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+	abi_x86_32? ( dev-lang/nasm )
+"
+BDEPEND="
+	app-arch/xz-utils
+	virtual/pkgconfig
+	!elibc_uclibc? ( sys-devel/gettext )
+"
+
+PATCHES=( "${FILESDIR}/flac-1.3.3-fix-zero-first-byte-md5sum-check.patch" )
+
+multilib_src_configure() {
+	local myeconfargs=(
+		--disable-doxygen-docs
+		--disable-examples
+		--disable-xmms-plugin
+		$([[ ${CHOST} == *-darwin* ]] && echo "--disable-asm-optimizations")
+		$(use_enable cpu_flags_ppc_altivec altivec)
+		$(use_enable cpu_flags_ppc_vsx vsx)
+		$(use_enable cpu_flags_x86_sse sse)
+		$(use_enable cxx cpplibs)
+		$(use_enable debug)
+		$(use_enable ogg)
+		$(use_enable static-libs static)
+
+		# cross-compile fix (bug #521446)
+		# no effect if ogg support is disabled
+		--with-ogg
+	)
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+	if [[ ${UID} != 0 ]]; then
+		emake -j1 check
+	else
+		ewarn "Tests will fail if ran as root, skipping."
+	fi
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	find "${ED}" -type f -name '*.la' -delete || die
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/flac/, media-libs/flac/files/
@ 2022-11-23  3:35 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-11-23  3:35 UTC (permalink / raw
  To: gentoo-commits

commit:     29d5b7044e17aaa0a3a3691f4d86c64458d27869
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 23 03:33:59 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 23 03:34:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29d5b704

media-libs/flac: fix -Wstrict-prototypes in configure

We may well have people proactively trying to use it and it's cheap to fix & build.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../flac-1.4.2-macro-wstrict-prototypes.patch      | 31 ++++++++++++++++++++++
 .../{flac-1.4.2.ebuild => flac-1.4.2-r1.ebuild}    |  4 +++
 2 files changed, 35 insertions(+)

diff --git a/media-libs/flac/files/flac-1.4.2-macro-wstrict-prototypes.patch b/media-libs/flac/files/flac-1.4.2-macro-wstrict-prototypes.patch
new file mode 100644
index 000000000000..d836f6aa2206
--- /dev/null
+++ b/media-libs/flac/files/flac-1.4.2-macro-wstrict-prototypes.patch
@@ -0,0 +1,31 @@
+https://github.com/xiph/flac/pull/521
+
+From afd9e9006d2c18d184db098bec0a0618cb4f0283 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 23 Nov 2022 03:31:30 +0000
+Subject: [PATCH] libFLAC.m4, libFLAC++.m4: fix -Wstrict-prototypes
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/src/libFLAC++/libFLAC++.m4
++++ b/src/libFLAC++/libFLAC++.m4
+@@ -57,7 +57,7 @@ dnl
+ #include <string.h>
+ #include <FLAC++/decoder.h>
+ 
+-int main ()
++int main (void)
+ {
+   system("touch conf.libFLAC++test");
+   return 0;
+--- a/src/libFLAC/libFLAC.m4
++++ b/src/libFLAC/libFLAC.m4
+@@ -58,7 +58,7 @@ dnl
+ #include <string.h>
+ #include <FLAC/format.h>
+ 
+-int main ()
++int main (void)
+ {
+   system("touch conf.libFLACtest");
+   return 0;
+

diff --git a/media-libs/flac/flac-1.4.2.ebuild b/media-libs/flac/flac-1.4.2-r1.ebuild
similarity index 96%
rename from media-libs/flac/flac-1.4.2.ebuild
rename to media-libs/flac/flac-1.4.2-r1.ebuild
index 7f778649fd96..df75f0e6829f 100644
--- a/media-libs/flac/flac-1.4.2.ebuild
+++ b/media-libs/flac/flac-1.4.2-r1.ebuild
@@ -28,6 +28,10 @@ BDEPEND="
 	virtual/pkgconfig
 	abi_x86_32? ( dev-lang/nasm )"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.4.2-macro-wstrict-prototypes.patch
+)
+
 multilib_src_configure() {
 	local myeconfargs=(
 		--disable-doxygen-docs


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/flac/, media-libs/flac/files/
@ 2017-04-12 11:10 Tim Harder
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Harder @ 2017-04-12 11:10 UTC (permalink / raw
  To: gentoo-commits

commit:     abe3db8a5db4cc1a9c0a5d3a3f6355e84500ae76
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 12 10:52:34 2017 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Wed Apr 12 10:52:34 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abe3db8a

media-libs/flac: remove old

 media-libs/flac/Manifest                           |  1 -
 media-libs/flac/files/flac-1.3.0-asneeded.patch    | 21 -------
 .../flac/files/flac-1.3.0-dontbuild-examples.patch | 30 ---------
 media-libs/flac/files/flac-1.3.1-cflags.patch      | 23 -------
 media-libs/flac/files/flac-1.3.1-x32.patch         | 69 ---------------------
 media-libs/flac/flac-1.3.1-r1.ebuild               | 72 ----------------------
 6 files changed, 216 deletions(-)

diff --git a/media-libs/flac/Manifest b/media-libs/flac/Manifest
index defc4e68875..5ba1fd2ccd1 100644
--- a/media-libs/flac/Manifest
+++ b/media-libs/flac/Manifest
@@ -1,2 +1 @@
-DIST flac-1.3.1.tar.xz 941848 SHA256 4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c SHA512 923cd0ffe2155636febf2b4633791bc83370d57080461b97ebb69ea21a4b1be7c0ff376c7fc8ca3979af4714e761112114a24b49ff6c80228b58b929db6e96d5 WHIRLPOOL abda096c0c1392499a613cc99c917cd519a20936bb98390a466c971ee981385a0e249e80f0bdac27b1eb6566a3392c1a4cb6ff9a6695952f16127a0b290fa5d4
 DIST flac-1.3.2.tar.xz 776192 SHA256 91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f SHA512 63910e8ebbe508316d446ffc9eb6d02efbd5f47d29d2ea7864da9371843c8e671854db6e89ba043fe08aef1845b8ece70db80f1cce853f591ca30d56ef7c3a15 WHIRLPOOL 158a3dbb621aab556388a7e46f0b760934011ae9f20d4921927d1c62fee9be0434294b3afcf93db355704c24822cfcfc24dc2d4b2b32ef13447633671e20fe7c

diff --git a/media-libs/flac/files/flac-1.3.0-asneeded.patch b/media-libs/flac/files/flac-1.3.0-asneeded.patch
deleted file mode 100644
index a38b3202500..00000000000
--- a/media-libs/flac/files/flac-1.3.0-asneeded.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- flac-1.3.0/src/flac/Makefile.am
-+++ flac-1.3.0/src/flac/Makefile.am
-@@ -51,7 +51,7 @@
- 	$(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
- 	$(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \
- 	$(top_builddir)/src/libFLAC/libFLAC.la \
--	@LIBICONV@ \
-+	@LTLIBICONV@ \
- 	-lm
- 
- CLEANFILES = flac.exe
---- flac-1.3.0/src/metaflac/Makefile.am
-+++ flac-1.3.0/src/metaflac/Makefile.am
-@@ -48,6 +48,6 @@
- 	$(top_builddir)/src/share/getopt/libgetopt.la \
- 	$(top_builddir)/src/share/utf8/libutf8.la \
- 	$(top_builddir)/src/libFLAC/libFLAC.la \
--	@LIBICONV@
-+	@LTLIBICONV@
- 
- CLEANFILES = metaflac.exe

diff --git a/media-libs/flac/files/flac-1.3.0-dontbuild-examples.patch b/media-libs/flac/files/flac-1.3.0-dontbuild-examples.patch
deleted file mode 100644
index 5c25dd588f2..00000000000
--- a/media-libs/flac/files/flac-1.3.0-dontbuild-examples.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- flac-1.3.0/configure.ac
-+++ flac-1.3.0/configure.ac
-@@ -319,6 +319,12 @@
- fi
- AC_SUBST(OGG_PACKAGE)
- 
-+dnl Build examples?
-+AC_ARG_ENABLE(examples,
-+       AS_HELP_STRING([--disable-examples], [Don't build examples during make]),,
-+       enable_examples="yes")
-+AM_CONDITIONAL(EXAMPLES, [test "$enable_examples" = "yes"])
-+
- dnl check for i18n(internationalization); these are from libiconv/gettext
- AM_ICONV
- AM_LANGINFO_CODESET
---- flac-1.3.0/Makefile.am
-+++ flac-1.3.0/Makefile.am
-@@ -31,7 +31,11 @@
- 
- ACLOCAL_AMFLAGS = -I m4
- 
--SUBDIRS = doc include m4 man src examples test build objs
-+SUBDIRS = doc include m4 man src test build objs
-+
-+if EXAMPLES
-+SUBDIRS += examples
-+endif
- 
- EXTRA_DIST = \
- 	COPYING.FDL \

diff --git a/media-libs/flac/files/flac-1.3.1-cflags.patch b/media-libs/flac/files/flac-1.3.1-cflags.patch
deleted file mode 100644
index 758e7b31c13..00000000000
--- a/media-libs/flac/files/flac-1.3.1-cflags.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- flac-1.3.1/configure.ac
-+++ flac-1.3.1/configure.ac
-@@ -348,12 +348,8 @@
- 
- if test "x$debug" = xtrue; then
- 	CPPFLAGS="-DDEBUG $CPPFLAGS"
--	CFLAGS=$(echo "$CFLAGS" | sed 's/-g//')
--	CFLAGS="-g $CFLAGS"
- else
- 	CPPFLAGS="-DNDEBUG $CPPFLAGS"
--	CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g//')
--	CFLAGS="-O3 -funroll-loops $CFLAGS"
- fi
- 
- XIPH_GCC_VERSION
-@@ -363,7 +359,6 @@
- 	CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
- 
- 	XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
--	XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
- 
- 	AC_LANG_PUSH([C++])
- 	XIPH_ADD_CXXFLAGS([-Weffc++])

diff --git a/media-libs/flac/files/flac-1.3.1-x32.patch b/media-libs/flac/files/flac-1.3.1-x32.patch
deleted file mode 100644
index 2dc2d3b6cc2..00000000000
--- a/media-libs/flac/files/flac-1.3.1-x32.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-https://bugs.gentoo.org/574984
-
-fix from upstream
-
-From 7566d3d4c11c16801e1c98093c4db33589451c17 Mon Sep 17 00:00:00 2001
-From: Erik de Castro Lopo <erikd@mega-nerd.com>
-Date: Wed, 11 Mar 2015 20:51:42 +1100
-Subject: [PATCH] configure.ac : Tweak for x32 architecture.
-
-The x32 architecture uses and ILP32 (32 bit ints, longs and pointers)
-on an x86_64 CPU. Since the CPU is x86_64 we need to set FLAC__CPU_X86_64
-even though the pointer size is 32 bits.
-
-Patch-from: Stuart Shelton
-Closes: https://sourceforge.net/p/flac/bugs/427/
----
- configure.ac | 37 ++++++++++++++++++++++++-------------
- 1 file changed, 24 insertions(+), 13 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 3b1c037e80f5..2dcc6987a03d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -105,19 +105,30 @@ AC_CHECK_SIZEOF(void*,1)
- asm_optimisation=no
- case "$host_cpu" in
- 	x86_64)
--		if test $ac_cv_sizeof_voidp = 4 ; then
--			# This must be a 32 bit user space running on 64 bit kernel so treat
--			# this as ia32.
--			cpu_ia32=true
--			AC_DEFINE(FLAC__CPU_IA32)
--			AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386])
--		else
--			# x86_64 user space and kernel.
--			cpu_x86_64=true
--			AC_DEFINE(FLAC__CPU_X86_64)
--			AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
--			fi
--		asm_optimisation=$asm_opt
-+		case "$host" in
-+			*gnux32)
-+				# x32 user space and 64 bit kernel.
-+				cpu_x86_64=true
-+				AC_DEFINE(FLAC__CPU_X86_64)
-+				AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
-+				asm_optimisation=$asm_opt
-+				;;
-+			*)
-+				if test $ac_cv_sizeof_voidp = 4 ; then
-+					# This must be a 32 bit user space running on 64 bit kernel so treat
-+					# this as ia32.
-+					cpu_ia32=true
-+					AC_DEFINE(FLAC__CPU_IA32)
-+					AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386])
-+			else
-+					# x86_64 user space and kernel.
-+					cpu_x86_64=true
-+					AC_DEFINE(FLAC__CPU_X86_64)
-+					AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
-+				fi
-+				asm_optimisation=$asm_opt
-+				;;
-+		esac
- 		;;
- 	i*86)
- 		cpu_ia32=true
--- 
-2.9.0

diff --git a/media-libs/flac/flac-1.3.1-r1.ebuild b/media-libs/flac/flac-1.3.1-r1.ebuild
deleted file mode 100644
index bfe28b5564d..00000000000
--- a/media-libs/flac/flac-1.3.1-r1.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-AUTOTOOLS_AUTORECONF=1
-AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
-
-inherit autotools-multilib
-
-DESCRIPTION="free lossless audio encoder and decoder"
-HOMEPAGE="http://flac.sourceforge.net"
-SRC_URI="http://downloads.xiph.org/releases/${PN}/${P}.tar.xz"
-
-LICENSE="BSD FDL-1.2 GPL-2 LGPL-2.1"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="altivec +cxx debug ogg cpu_flags_x86_sse static-libs"
-
-RDEPEND="ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-soundlibs-20130224-r1
-		!app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
-	)"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	abi_x86_32? ( dev-lang/nasm )
-	!elibc_uclibc? ( sys-devel/gettext )
-	virtual/pkgconfig"
-
-src_prepare() {
-	local PATCHES=(
-		"${FILESDIR}"/${P}-cflags.patch
-		"${FILESDIR}"/${PN}-1.3.0-asneeded.patch
-		"${FILESDIR}"/${PN}-1.3.0-dontbuild-tests.patch
-		"${FILESDIR}"/${PN}-1.3.0-dontbuild-examples.patch
-		"${FILESDIR}"/${PN}-1.3.1-x32.patch #574984
-	)
-
-	AT_M4DIR="m4" autotools-multilib_src_prepare
-}
-
-src_configure() {
-	local myeconfargs=(
-		$(use_enable debug)
-		$(use_enable cpu_flags_x86_sse sse)
-		$(use_enable altivec)
-		--disable-doxygen-docs
-		--disable-xmms-plugin
-		$(use_enable cxx cpplibs)
-		$(use_enable ogg)
-		--disable-examples
-		$([[ ${CHOST} == *-darwin* ]] && echo "--disable-asm-optimizations")
-
-		# cross-compile fix (bug #521446)
-		# no effect if ogg support is disabled
-		--with-ogg
-	)
-	autotools-multilib_src_configure
-}
-
-src_test() {
-	if [[ ${UID} != 0 ]]; then
-		autotools-multilib_src_test -j1
-	else
-		ewarn "Tests will fail if ran as root, skipping."
-	fi
-}
-
-src_install() {
-	autotools-multilib_src_install \
-		docdir="${EPREFIX}"/usr/share/doc/${PF}/html
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/flac/, media-libs/flac/files/
@ 2017-01-02 10:28 Lars Wendler
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Wendler @ 2017-01-02 10:28 UTC (permalink / raw
  To: gentoo-commits

commit:     32d9af62ee97eb977b752b5f507a6cda897de5a2
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  2 10:08:20 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Jan  2 10:27:50 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32d9af62

media-libs/flac: Bump to version 1.3.2

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 media-libs/flac/Manifest                           |  1 +
 media-libs/flac/files/flac-1.3.2-asneeded.patch    | 21 ++++++
 media-libs/flac/files/flac-1.3.2-cflags.patch      | 26 ++++++++
 .../flac/files/flac-1.3.2-dontbuild-examples.patch | 30 +++++++++
 media-libs/flac/flac-1.3.2.ebuild                  | 74 ++++++++++++++++++++++
 5 files changed, 152 insertions(+)

diff --git a/media-libs/flac/Manifest b/media-libs/flac/Manifest
index 50c1c0a..3487a9e 100644
--- a/media-libs/flac/Manifest
+++ b/media-libs/flac/Manifest
@@ -1 +1,2 @@
 DIST flac-1.3.1.tar.xz 941848 SHA256 4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c SHA512 923cd0ffe2155636febf2b4633791bc83370d57080461b97ebb69ea21a4b1be7c0ff376c7fc8ca3979af4714e761112114a24b49ff6c80228b58b929db6e96d5 WHIRLPOOL abda096c0c1392499a613cc99c917cd519a20936bb98390a466c971ee981385a0e249e80f0bdac27b1eb6566a3392c1a4cb6ff9a6695952f16127a0b290fa5d4
+DIST flac-1.3.2.tar.xz 776016 SHA256 e48764f0761beb791a69590f12826fe8cf302c42db2879849c5d10bc7c85db66 SHA512 b6dfc7e31dc1fad434ff751a9f4748354de242af94d56c93254245ddb740ffa19e56f32100c3723b601ba345156e927d61a80722126cc75ebe55092179427cac WHIRLPOOL 3ba4be7f7dc91691f48e3d09ff92f79af8c7915e2f472f41802cc6f1686ab12bb91364c8119c10d85b6e5c5d706989dfcb4c95cb19f75fe4196c206502c76605

diff --git a/media-libs/flac/files/flac-1.3.2-asneeded.patch b/media-libs/flac/files/flac-1.3.2-asneeded.patch
new file mode 100644
index 00000000..e4a4af7
--- /dev/null
+++ b/media-libs/flac/files/flac-1.3.2-asneeded.patch
@@ -0,0 +1,21 @@
+--- flac-1.3.2/src/flac/Makefile.am
++++ flac-1.3.2/src/flac/Makefile.am
+@@ -60,7 +60,7 @@
+ 	$(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \
+ 	$(top_builddir)/src/libFLAC/libFLAC.la \
+ 	$(win_utf8_lib) \
+-	@LIBICONV@ \
++	@LTLIBICONV@ \
+ 	-lm
+ 
+ CLEANFILES = flac.exe
+--- flac-1.3.2/src/metaflac/Makefile.am
++++ flac-1.3.2/src/metaflac/Makefile.am
+@@ -55,6 +55,6 @@
+ 	$(top_builddir)/src/share/utf8/libutf8.la \
+ 	$(top_builddir)/src/libFLAC/libFLAC.la \
+ 	$(win_utf8_lib) \
+-	@LIBICONV@
++	@LTLIBICONV@
+ 
+ CLEANFILES = metaflac.exe

diff --git a/media-libs/flac/files/flac-1.3.2-cflags.patch b/media-libs/flac/files/flac-1.3.2-cflags.patch
new file mode 100644
index 00000000..fd1334d
--- /dev/null
+++ b/media-libs/flac/files/flac-1.3.2-cflags.patch
@@ -0,0 +1,26 @@
+--- flac-1.3.2/configure.ac
++++ flac-1.3.2/configure.ac
+@@ -384,14 +384,7 @@
+ AH_TEMPLATE(FLAC__HAS_NASM, [define if you are compiling for x86 and have the NASM assembler])
+ fi
+ 
+-if test "x$debug" = xtrue; then
+-	CPPFLAGS="-DDEBUG $CPPFLAGS"
+-	CFLAGS="-g $CFLAGS"
+-else
+-	CPPFLAGS="-DNDEBUG $CPPFLAGS"
+-	CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//')
+-	CFLAGS="-O3 -funroll-loops $CFLAGS"
+-fi
++CPPFLAGS="-DDEBUG $CPPFLAGS"
+ 
+ XIPH_GCC_VERSION
+ 
+@@ -400,7 +393,6 @@
+ 	CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
+ 
+ 	XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
+-	XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
+ 
+ 	AC_LANG_PUSH([C++])
+ 	XIPH_ADD_CXXFLAGS([-Weffc++])

diff --git a/media-libs/flac/files/flac-1.3.2-dontbuild-examples.patch b/media-libs/flac/files/flac-1.3.2-dontbuild-examples.patch
new file mode 100644
index 00000000..c710993
--- /dev/null
+++ b/media-libs/flac/files/flac-1.3.2-dontbuild-examples.patch
@@ -0,0 +1,30 @@
+--- flac-1.3.2/configure.ac
++++ flac-1.3.2/configure.ac
+@@ -359,6 +359,12 @@
+ AC_SUBST(FLAC__HAS_OGG)
+ AC_SUBST(OGG_PACKAGE)
+ 
++dnl Build examples?
++AC_ARG_ENABLE(examples,
++	AS_HELP_STRING([--disable-examples], [Don't build examples during make]),,
++	enable_examples="yes")
++AM_CONDITIONAL(EXAMPLES, [test "$enable_examples" = "yes"])
++
+ dnl check for i18n(internationalization); these are from libiconv/gettext
+ AM_ICONV
+ AM_LANGINFO_CODESET
+--- flac-1.3.2/Makefile.am
++++ flac-1.3.2/Makefile.am
+@@ -31,7 +31,11 @@
+ 
+ ACLOCAL_AMFLAGS = -I m4
+ 
+-SUBDIRS = doc include m4 man src examples test build objs microbench
++SUBDIRS = doc include m4 man src test build objs microbench
++
++if EXAMPLES
++SUBDIRS += examples
++endif
+ 
+ EXTRA_DIST = \
+ 	COPYING.FDL \

diff --git a/media-libs/flac/flac-1.3.2.ebuild b/media-libs/flac/flac-1.3.2.ebuild
new file mode 100644
index 00000000..0e8a510
--- /dev/null
+++ b/media-libs/flac/flac-1.3.2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="free lossless audio encoder and decoder"
+HOMEPAGE="http://flac.sourceforge.net"
+SRC_URI="http://downloads.xiph.org/releases/${PN}/${P}.tar.xz"
+
+LICENSE="BSD FDL-1.2 GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="altivec +cxx debug ogg cpu_flags_x86_sse static-libs"
+
+RDEPEND="ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
+	abi_x86_32? (
+		!<=app-emulation/emul-linux-x86-soundlibs-20130224-r1
+		!app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+	)"
+DEPEND="${RDEPEND}
+	app-arch/xz-utils
+	abi_x86_32? ( dev-lang/nasm )
+	!elibc_uclibc? ( sys-devel/gettext )
+	virtual/pkgconfig"
+
+src_prepare() {
+	local PATCHES=(
+		"${FILESDIR}"/${PN}-1.3.2-cflags.patch
+		"${FILESDIR}"/${PN}-1.3.2-asneeded.patch
+		"${FILESDIR}"/${PN}-1.3.0-dontbuild-tests.patch
+		"${FILESDIR}"/${PN}-1.3.2-dontbuild-examples.patch
+	)
+
+	default
+
+	eautoreconf
+}
+
+multilib_src_configure() {
+	local myeconfargs=(
+		--docdir="${EPREFIX}"/usr/share/doc/${PF}/html
+		--disable-doxygen-docs
+		--disable-examples
+		--disable-xmms-plugin
+		$([[ ${CHOST} == *-darwin* ]] && echo "--disable-asm-optimizations")
+		$(use_enable altivec)
+		$(use_enable cpu_flags_x86_sse sse)
+		$(use_enable cxx cpplibs)
+		$(use_enable debug)
+		$(use_enable ogg)
+
+		# cross-compile fix (bug #521446)
+		# no effect if ogg support is disabled
+		--with-ogg
+	)
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+	if [[ ${UID} != 0 ]]; then
+		emake -j1 check
+	else
+		ewarn "Tests will fail if ran as root, skipping."
+	fi
+}
+
+multilib_src_install_all() {
+	if ! use static-libs ; then
+		find "${ED}" \( -name "*.la" -o -name "*.a" \) -delete || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-23  3:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-16 12:14 [gentoo-commits] repo/gentoo:master commit in: media-libs/flac/, media-libs/flac/files/ Miroslav Šulc
  -- strict thread matches above, loose matches on Subject: below --
2022-11-23  3:35 Sam James
2017-04-12 11:10 Tim Harder
2017-01-02 10:28 Lars Wendler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox