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-sound/lame/, media-sound/lame/files/
Date: Sun, 02 Aug 2020 17:23:54
Message-Id: 1596389021.2dcd31f9e1b275bd6f8c126ee11f58da07a81ad5.polynomial-c@gentoo
1 commit: 2dcd31f9e1b275bd6f8c126ee11f58da07a81ad5
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 2 17:23:03 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 2 17:23:41 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dcd31f9
7
8 media-sound/lame: Revbump to add a pkgconfig file
9
10 Bug: https://bugs.gentoo.org/735168
11 Package-Manager: Portage-3.0.1, Repoman-2.3.23
12 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
13
14 media-sound/lame/files/lame-3.100-pkgconfig.patch | 45 +++++++++++++
15 media-sound/lame/lame-3.100-r3.ebuild | 82 +++++++++++++++++++++++
16 2 files changed, 127 insertions(+)
17
18 diff --git a/media-sound/lame/files/lame-3.100-pkgconfig.patch b/media-sound/lame/files/lame-3.100-pkgconfig.patch
19 new file mode 100644
20 index 00000000000..9cb52153e85
21 --- /dev/null
22 +++ b/media-sound/lame/files/lame-3.100-pkgconfig.patch
23 @@ -0,0 +1,45 @@
24 +Based on a Debian patch:
25 +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829327
26 +
27 +--- lame-3.100/configure.in
28 ++++ lame-3.100/configure.in
29 +@@ -1240,6 +1240,7 @@
30 +
31 + AC_CONFIG_FILES([Makefile \
32 + libmp3lame/Makefile \
33 ++ libmp3lame/lame.pc \
34 + libmp3lame/i386/Makefile \
35 + libmp3lame/vector/Makefile \
36 + frontend/Makefile \
37 +--- lame-3.100/libmp3lame/Makefile.am
38 ++++ lame-3.100/libmp3lame/Makefile.am
39 +@@ -31,6 +31,7 @@
40 +
41 + EXTRA_DIST = \
42 + lame.rc \
43 ++ lame.pc.in \
44 + vbrquantize.h \
45 + logoe.ico
46 +
47 +@@ -100,3 +101,8 @@
48 + #$(OBJECTS): libtool
49 + #libtool: $(LIBTOOL_DEPS)
50 + # $(SHELL) $(top_builddir)/config.status --recheck
51 ++
52 ++pkgconfigdir = $(libdir)/pkgconfig
53 ++pkgconfig_DATA = lame.pc
54 ++
55 ++DISTCLEANFILES = $(pkgconfig_DATA)
56 +--- lame-3.100/libmp3lame/lame.pc.in
57 ++++ lame-3.100/libmp3lame/lame.pc.in
58 +@@ -0,0 +1,10 @@
59 ++prefix=@prefix@
60 ++exec_prefix=@exec_prefix@
61 ++libdir=@libdir@
62 ++includedir=@includedir@
63 ++
64 ++Name: @PACKAGE_NAME@
65 ++Description: MP3 encoding library
66 ++Version: @PACKAGE_VERSION@
67 ++Libs: -L${libdir} -lmp3lame
68 ++Cflags: -I${includedir}/lame
69
70 diff --git a/media-sound/lame/lame-3.100-r3.ebuild b/media-sound/lame/lame-3.100-r3.ebuild
71 new file mode 100644
72 index 00000000000..c9d3e9ec876
73 --- /dev/null
74 +++ b/media-sound/lame/lame-3.100-r3.ebuild
75 @@ -0,0 +1,82 @@
76 +# Copyright 1999-2020 Gentoo Authors
77 +# Distributed under the terms of the GNU General Public License v2
78 +
79 +EAPI=7
80 +inherit autotools multilib-minimal
81 +
82 +DESCRIPTION="LAME Ain't an MP3 Encoder"
83 +HOMEPAGE="http://lame.sourceforge.net/"
84 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
85 +
86 +LICENSE="LGPL-2.1"
87 +SLOT="0"
88 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
89 +IUSE="debug cpu_flags_x86_mmx +frontend mp3rtp sndfile static-libs"
90 +
91 +# These deps are without MULTILIB_USEDEP and are correct since we only build
92 +# libmp3lame for multilib and these deps apply to the lame frontend executable.
93 +RDEPEND="
94 + frontend? (
95 + >=sys-libs/ncurses-5.7-r7:0=
96 + sndfile? ( >=media-libs/libsndfile-1.0.2 )
97 + )
98 +"
99 +DEPEND="${RDEPEND}"
100 +BDEPEND="
101 + sys-devel/gettext
102 + virtual/pkgconfig
103 + cpu_flags_x86_mmx? ( dev-lang/nasm )
104 +"
105 +
106 +PATCHES=(
107 + "${FILESDIR}"/${PN}-3.96-ccc.patch
108 + "${FILESDIR}"/${PN}-3.98-gtk-path.patch
109 + "${FILESDIR}"/${PN}-3.99.5-tinfo.patch
110 + "${FILESDIR}"/${PN}-3.99.5-msse.patch
111 + "${FILESDIR}"/${PN}-3.100-symbols.patch #662752
112 + "${FILESDIR}"/${PN}-3.100-pkgconfig.patch #735168
113 +)
114 +
115 +src_prepare() {
116 + default
117 +
118 + mkdir libmp3lame/i386/.libs || die #workaround parallel build with nasm
119 +
120 + sed -i -e '/define sp/s/+/ + /g' libmp3lame/i386/nasm.h || die
121 +
122 + use cpu_flags_x86_mmx || sed -i -e '/AC_PATH_PROG/s:nasm:dIsAbLe&:' configure.in #361879
123 +
124 + mv configure.{in,ac} || die
125 + AT_M4DIR=. eautoreconf
126 +}
127 +
128 +multilib_src_configure() {
129 + # Only build the frontend for the default ABI.
130 + local myconf=(
131 + --disable-mp3x
132 + --enable-dynamic-frontends
133 + $(multilib_native_use_enable frontend)
134 + $(multilib_native_use_enable mp3rtp)
135 + $(multilib_native_usex sndfile '--with-fileio=sndfile' '')
136 + $(use_enable debug debug norm)
137 + $(use_enable static-libs static)
138 + $(usex cpu_flags_x86_mmx '--enable-nasm' '') #361879
139 + )
140 +
141 + ECONF_SOURCE="${S}" econf "${myconf[@]}"
142 +}
143 +
144 +multilib_src_install() {
145 + emake \
146 + DESTDIR="${D}" \
147 + pkghtmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
148 + install
149 +}
150 +
151 +multilib_src_install_all() {
152 + dodoc API ChangeLog HACKING README STYLEGUIDE TODO USAGE
153 + docinto html
154 + dodoc misc/lameGUI.html Dll/LameDLLInterface.htm
155 +
156 + find "${ED}" -name '*.la' -type f -delete || die
157 +}