Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/flac/, media-libs/flac/files/
Date: Mon, 02 Jan 2017 10:28:05
Message-Id: 1483352870.32d9af62ee97eb977b752b5f507a6cda897de5a2.polynomial-c@gentoo
1 commit: 32d9af62ee97eb977b752b5f507a6cda897de5a2
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 2 10:08:20 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 10:27:50 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32d9af62
7
8 media-libs/flac: Bump to version 1.3.2
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 media-libs/flac/Manifest | 1 +
13 media-libs/flac/files/flac-1.3.2-asneeded.patch | 21 ++++++
14 media-libs/flac/files/flac-1.3.2-cflags.patch | 26 ++++++++
15 .../flac/files/flac-1.3.2-dontbuild-examples.patch | 30 +++++++++
16 media-libs/flac/flac-1.3.2.ebuild | 74 ++++++++++++++++++++++
17 5 files changed, 152 insertions(+)
18
19 diff --git a/media-libs/flac/Manifest b/media-libs/flac/Manifest
20 index 50c1c0a..3487a9e 100644
21 --- a/media-libs/flac/Manifest
22 +++ b/media-libs/flac/Manifest
23 @@ -1 +1,2 @@
24 DIST flac-1.3.1.tar.xz 941848 SHA256 4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c SHA512 923cd0ffe2155636febf2b4633791bc83370d57080461b97ebb69ea21a4b1be7c0ff376c7fc8ca3979af4714e761112114a24b49ff6c80228b58b929db6e96d5 WHIRLPOOL abda096c0c1392499a613cc99c917cd519a20936bb98390a466c971ee981385a0e249e80f0bdac27b1eb6566a3392c1a4cb6ff9a6695952f16127a0b290fa5d4
25 +DIST flac-1.3.2.tar.xz 776016 SHA256 e48764f0761beb791a69590f12826fe8cf302c42db2879849c5d10bc7c85db66 SHA512 b6dfc7e31dc1fad434ff751a9f4748354de242af94d56c93254245ddb740ffa19e56f32100c3723b601ba345156e927d61a80722126cc75ebe55092179427cac WHIRLPOOL 3ba4be7f7dc91691f48e3d09ff92f79af8c7915e2f472f41802cc6f1686ab12bb91364c8119c10d85b6e5c5d706989dfcb4c95cb19f75fe4196c206502c76605
26
27 diff --git a/media-libs/flac/files/flac-1.3.2-asneeded.patch b/media-libs/flac/files/flac-1.3.2-asneeded.patch
28 new file mode 100644
29 index 00000000..e4a4af7
30 --- /dev/null
31 +++ b/media-libs/flac/files/flac-1.3.2-asneeded.patch
32 @@ -0,0 +1,21 @@
33 +--- flac-1.3.2/src/flac/Makefile.am
34 ++++ flac-1.3.2/src/flac/Makefile.am
35 +@@ -60,7 +60,7 @@
36 + $(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \
37 + $(top_builddir)/src/libFLAC/libFLAC.la \
38 + $(win_utf8_lib) \
39 +- @LIBICONV@ \
40 ++ @LTLIBICONV@ \
41 + -lm
42 +
43 + CLEANFILES = flac.exe
44 +--- flac-1.3.2/src/metaflac/Makefile.am
45 ++++ flac-1.3.2/src/metaflac/Makefile.am
46 +@@ -55,6 +55,6 @@
47 + $(top_builddir)/src/share/utf8/libutf8.la \
48 + $(top_builddir)/src/libFLAC/libFLAC.la \
49 + $(win_utf8_lib) \
50 +- @LIBICONV@
51 ++ @LTLIBICONV@
52 +
53 + CLEANFILES = metaflac.exe
54
55 diff --git a/media-libs/flac/files/flac-1.3.2-cflags.patch b/media-libs/flac/files/flac-1.3.2-cflags.patch
56 new file mode 100644
57 index 00000000..fd1334d
58 --- /dev/null
59 +++ b/media-libs/flac/files/flac-1.3.2-cflags.patch
60 @@ -0,0 +1,26 @@
61 +--- flac-1.3.2/configure.ac
62 ++++ flac-1.3.2/configure.ac
63 +@@ -384,14 +384,7 @@
64 + AH_TEMPLATE(FLAC__HAS_NASM, [define if you are compiling for x86 and have the NASM assembler])
65 + fi
66 +
67 +-if test "x$debug" = xtrue; then
68 +- CPPFLAGS="-DDEBUG $CPPFLAGS"
69 +- CFLAGS="-g $CFLAGS"
70 +-else
71 +- CPPFLAGS="-DNDEBUG $CPPFLAGS"
72 +- CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//')
73 +- CFLAGS="-O3 -funroll-loops $CFLAGS"
74 +-fi
75 ++CPPFLAGS="-DDEBUG $CPPFLAGS"
76 +
77 + XIPH_GCC_VERSION
78 +
79 +@@ -400,7 +393,6 @@
80 + 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
81 +
82 + XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
83 +- XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
84 +
85 + AC_LANG_PUSH([C++])
86 + XIPH_ADD_CXXFLAGS([-Weffc++])
87
88 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
89 new file mode 100644
90 index 00000000..c710993
91 --- /dev/null
92 +++ b/media-libs/flac/files/flac-1.3.2-dontbuild-examples.patch
93 @@ -0,0 +1,30 @@
94 +--- flac-1.3.2/configure.ac
95 ++++ flac-1.3.2/configure.ac
96 +@@ -359,6 +359,12 @@
97 + AC_SUBST(FLAC__HAS_OGG)
98 + AC_SUBST(OGG_PACKAGE)
99 +
100 ++dnl Build examples?
101 ++AC_ARG_ENABLE(examples,
102 ++ AS_HELP_STRING([--disable-examples], [Don't build examples during make]),,
103 ++ enable_examples="yes")
104 ++AM_CONDITIONAL(EXAMPLES, [test "$enable_examples" = "yes"])
105 ++
106 + dnl check for i18n(internationalization); these are from libiconv/gettext
107 + AM_ICONV
108 + AM_LANGINFO_CODESET
109 +--- flac-1.3.2/Makefile.am
110 ++++ flac-1.3.2/Makefile.am
111 +@@ -31,7 +31,11 @@
112 +
113 + ACLOCAL_AMFLAGS = -I m4
114 +
115 +-SUBDIRS = doc include m4 man src examples test build objs microbench
116 ++SUBDIRS = doc include m4 man src test build objs microbench
117 ++
118 ++if EXAMPLES
119 ++SUBDIRS += examples
120 ++endif
121 +
122 + EXTRA_DIST = \
123 + COPYING.FDL \
124
125 diff --git a/media-libs/flac/flac-1.3.2.ebuild b/media-libs/flac/flac-1.3.2.ebuild
126 new file mode 100644
127 index 00000000..0e8a510
128 --- /dev/null
129 +++ b/media-libs/flac/flac-1.3.2.ebuild
130 @@ -0,0 +1,74 @@
131 +# Copyright 1999-2017 Gentoo Foundation
132 +# Distributed under the terms of the GNU General Public License v2
133 +# $Id$
134 +
135 +EAPI=6
136 +
137 +inherit autotools multilib-minimal
138 +
139 +DESCRIPTION="free lossless audio encoder and decoder"
140 +HOMEPAGE="http://flac.sourceforge.net"
141 +SRC_URI="http://downloads.xiph.org/releases/${PN}/${P}.tar.xz"
142 +
143 +LICENSE="BSD FDL-1.2 GPL-2 LGPL-2.1"
144 +SLOT="0"
145 +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"
146 +IUSE="altivec +cxx debug ogg cpu_flags_x86_sse static-libs"
147 +
148 +RDEPEND="ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
149 + abi_x86_32? (
150 + !<=app-emulation/emul-linux-x86-soundlibs-20130224-r1
151 + !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
152 + )"
153 +DEPEND="${RDEPEND}
154 + app-arch/xz-utils
155 + abi_x86_32? ( dev-lang/nasm )
156 + !elibc_uclibc? ( sys-devel/gettext )
157 + virtual/pkgconfig"
158 +
159 +src_prepare() {
160 + local PATCHES=(
161 + "${FILESDIR}"/${PN}-1.3.2-cflags.patch
162 + "${FILESDIR}"/${PN}-1.3.2-asneeded.patch
163 + "${FILESDIR}"/${PN}-1.3.0-dontbuild-tests.patch
164 + "${FILESDIR}"/${PN}-1.3.2-dontbuild-examples.patch
165 + )
166 +
167 + default
168 +
169 + eautoreconf
170 +}
171 +
172 +multilib_src_configure() {
173 + local myeconfargs=(
174 + --docdir="${EPREFIX}"/usr/share/doc/${PF}/html
175 + --disable-doxygen-docs
176 + --disable-examples
177 + --disable-xmms-plugin
178 + $([[ ${CHOST} == *-darwin* ]] && echo "--disable-asm-optimizations")
179 + $(use_enable altivec)
180 + $(use_enable cpu_flags_x86_sse sse)
181 + $(use_enable cxx cpplibs)
182 + $(use_enable debug)
183 + $(use_enable ogg)
184 +
185 + # cross-compile fix (bug #521446)
186 + # no effect if ogg support is disabled
187 + --with-ogg
188 + )
189 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
190 +}
191 +
192 +multilib_src_test() {
193 + if [[ ${UID} != 0 ]]; then
194 + emake -j1 check
195 + else
196 + ewarn "Tests will fail if ran as root, skipping."
197 + fi
198 +}
199 +
200 +multilib_src_install_all() {
201 + if ! use static-libs ; then
202 + find "${ED}" \( -name "*.la" -o -name "*.a" \) -delete || die
203 + fi
204 +}