1 |
commit: 3f0f37a8631c9ed6b863bbfe3ac13d57eafb145b |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 27 23:15:44 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 27 23:16:24 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f0f37a8 |
7 |
|
8 |
media-sound/moc: Use pkgconfig to detect sys-libs/ncurses flags |
9 |
|
10 |
Gentoo-Bug: 521860 |
11 |
* EAPI=6 |
12 |
* Remove .la files unconditionally |
13 |
|
14 |
Package-Manager: portage-2.2.27 |
15 |
|
16 |
.../moc-2.6_alpha1-fix-ncurses-underlinking.patch | 180 +++++++++++++++++++++ |
17 |
media-sound/moc/moc-2.6_alpha1-r1.ebuild | 90 +++++++++++ |
18 |
2 files changed, 270 insertions(+) |
19 |
|
20 |
diff --git a/media-sound/moc/files/moc-2.6_alpha1-fix-ncurses-underlinking.patch b/media-sound/moc/files/moc-2.6_alpha1-fix-ncurses-underlinking.patch |
21 |
new file mode 100644 |
22 |
index 0000000..a5715ba |
23 |
--- /dev/null |
24 |
+++ b/media-sound/moc/files/moc-2.6_alpha1-fix-ncurses-underlinking.patch |
25 |
@@ -0,0 +1,180 @@ |
26 |
+Fix missing ncurses underlinking issue caused by broken detection mechanisms. |
27 |
+https://bugs.gentoo.org/show_bug.cgi?id=521860 |
28 |
+ |
29 |
+--- moc-2.6-alpha1/configure.ac |
30 |
++++ moc-2.6-alpha1/configure.ac |
31 |
+@@ -340,17 +340,13 @@ |
32 |
+ [Define if we have __attribute__ extension])]) |
33 |
+ |
34 |
+ dnl ncurses |
35 |
+-MP_WITH_CURSES |
36 |
+-if test -z "$CURSES_LIB" |
37 |
+-then |
38 |
+- AC_MSG_ERROR([You need curses/ncurses library and header files.]) |
39 |
+-else |
40 |
+- AC_CHECK_LIB([$CURSES_LIB], [set_escdelay], |
41 |
+- AC_DEFINE([HAVE_SET_ESCDELAY], 1, [Define if you have set_escdelay.]), |
42 |
+- [AC_CHECK_FUNC([setenv], , |
43 |
+- AC_MSG_ERROR([Required function setenv not found.]))]) |
44 |
+- EXTRA_LIBS="$EXTRA_LIBS -l$CURSES_LIB" |
45 |
+-fi |
46 |
++AC_ARG_WITH([ncursesw], |
47 |
++ AS_HELP_STRING([--without-ncursesw], [Don't use ncursesw (UTF-8 support)])) |
48 |
++AS_IF([test "x$with_ncursesw" != "xno"], |
49 |
++ [PKG_CHECK_MODULES([CURSES],[ncursesw]) |
50 |
++ AC_DEFINE([HAVE_NCURSESW], [1], [Define if you have ncursesw])], |
51 |
++ [PKG_CHECK_MODULES([CURSES],[ncurses]) |
52 |
++ AC_DEFINE([HAVE_CURSES], [1], [Define if you have curses])]) |
53 |
+ |
54 |
+ dnl popt |
55 |
+ AC_CHECK_LIB([popt], [poptGetContext], [true], [POPT_MISSING="yes"]) |
56 |
+--- moc-2.6-alpha1/interface_elements.c |
57 |
++++ moc-2.6-alpha1/interface_elements.c |
58 |
+@@ -37,11 +37,10 @@ |
59 |
+ # define _XOPEN_SOURCE_EXTENDED /* for wget_wch() */ |
60 |
+ #endif |
61 |
+ |
62 |
+-#ifdef HAVE_NCURSESW_H |
63 |
++#ifdef HAVE_NCURSESW |
64 |
+ # include <ncursesw/curses.h> |
65 |
+-#elif HAVE_NCURSES_H |
66 |
+ # include <ncurses.h> |
67 |
+-#elif HAVE_CURSES_H |
68 |
++#elif HAVE_CURSES |
69 |
+ # include <curses.h> |
70 |
+ #endif |
71 |
+ |
72 |
+--- moc-2.6-alpha1/interface_elements.h |
73 |
++++ moc-2.6-alpha1/interface_elements.h |
74 |
+@@ -1,11 +1,10 @@ |
75 |
+ #ifndef INTERFACE_ELEMENTS_H |
76 |
+ #define INTERFACE_ELEMENTS_H |
77 |
+ |
78 |
+-#ifdef HAVE_NCURSESW_H |
79 |
++#ifdef HAVE_NCURSESW |
80 |
+ # include <ncursesw/curses.h> |
81 |
+-#elif HAVE_NCURSES_H |
82 |
+ # include <ncurses.h> |
83 |
+-#elif HAVE_CURSES_H |
84 |
++#elif HAVE_CURSES |
85 |
+ # include <curses.h> |
86 |
+ #endif |
87 |
+ |
88 |
+--- moc-2.6-alpha1/keys.c |
89 |
++++ moc-2.6-alpha1/keys.c |
90 |
+@@ -17,11 +17,10 @@ |
91 |
+ #include <strings.h> |
92 |
+ #include <assert.h> |
93 |
+ |
94 |
+-#ifdef HAVE_NCURSESW_H |
95 |
++#ifdef HAVE_NCURSESW |
96 |
+ # include <ncursesw/curses.h> |
97 |
+-#elif HAVE_NCURSES_H |
98 |
+ # include <ncurses.h> |
99 |
+-#elif HAVE_CURSES_H |
100 |
++#elif HAVE_CURSES |
101 |
+ # include <curses.h> |
102 |
+ #endif |
103 |
+ |
104 |
+--- moc-2.6-alpha1/Makefile.am |
105 |
++++ moc-2.6-alpha1/Makefile.am |
106 |
+@@ -2,6 +2,7 @@ |
107 |
+ SUBDIRS = themes decoder_plugins |
108 |
+ AM_CPPFLAGS = -DSYSTEM_THEMES_DIR=\"$(pkgdatadir)/themes\" \ |
109 |
+ -DPLUGIN_DIR=\"$(plugindir)/$(DECODER_PLUGIN_DIR)\" |
110 |
++AM_CFLAGS = @CURSES_CFLAGS@ |
111 |
+ |
112 |
+ bin_PROGRAMS = mocp |
113 |
+ mocp_SOURCES = log.c \ |
114 |
+@@ -81,7 +82,7 @@ |
115 |
+ jack.c \ |
116 |
+ jack.h |
117 |
+ man_MANS = mocp.1 |
118 |
+-mocp_LDADD = @EXTRA_OBJS@ -lltdl |
119 |
++mocp_LDADD = @EXTRA_OBJS@ -lltdl @CURSES_LIBS@ |
120 |
+ mocp_DEPENDENCIES = @EXTRA_OBJS@ |
121 |
+ mocp_LDFLAGS = @EXTRA_LIBS@ $(RCC_LIBS) -export-dynamic |
122 |
+ EXTRA_DIST = README_equalizer mocp.1 THANKS keymap.example Doxyfile \ |
123 |
+--- moc-2.6-alpha1/menu.c |
124 |
++++ moc-2.6-alpha1/menu.c |
125 |
+@@ -17,11 +17,10 @@ |
126 |
+ #include <stdlib.h> |
127 |
+ #include <string.h> |
128 |
+ |
129 |
+-#ifdef HAVE_NCURSESW_H |
130 |
++#ifdef HAVE_NCURSESW |
131 |
+ # include <ncursesw/curses.h> |
132 |
+-#elif HAVE_NCURSES_H |
133 |
+ # include <ncurses.h> |
134 |
+-#elif HAVE_CURSES_H |
135 |
++#elif HAVE_CURSES |
136 |
+ # include <curses.h> |
137 |
+ #endif |
138 |
+ |
139 |
+--- moc-2.6-alpha1/menu.h |
140 |
++++ moc-2.6-alpha1/menu.h |
141 |
+@@ -1,11 +1,10 @@ |
142 |
+ #ifndef MENU_H |
143 |
+ #define MENU_H |
144 |
+ |
145 |
+-#ifdef HAVE_NCURSESW_H |
146 |
++#ifdef HAVE_NCURSESW |
147 |
+ # include <ncursesw/curses.h> |
148 |
+-#elif HAVE_NCURSES_H |
149 |
+ # include <ncurses.h> |
150 |
+-#elif HAVE_CURSES_H |
151 |
++#elif HAVE_CURSES |
152 |
+ # include <curses.h> |
153 |
+ #endif |
154 |
+ |
155 |
+--- moc-2.6-alpha1/themes.c |
156 |
++++ moc-2.6-alpha1/themes.c |
157 |
+@@ -13,11 +13,10 @@ |
158 |
+ # include "config.h" |
159 |
+ #endif |
160 |
+ |
161 |
+-#ifdef HAVE_NCURSESW_H |
162 |
++#ifdef HAVE_NCURSESW |
163 |
+ # include <ncursesw/curses.h> |
164 |
+-#elif HAVE_NCURSES_H |
165 |
+ # include <ncurses.h> |
166 |
+-#elif HAVE_CURSES_H |
167 |
++#elif HAVE_CURSES |
168 |
+ # include <curses.h> |
169 |
+ #endif |
170 |
+ |
171 |
+--- moc-2.6-alpha1/utf8.c |
172 |
++++ moc-2.6-alpha1/utf8.c |
173 |
+@@ -30,13 +30,13 @@ |
174 |
+ # include <langinfo.h> |
175 |
+ #endif |
176 |
+ |
177 |
+-#ifdef HAVE_NCURSESW_H |
178 |
++#ifdef HAVE_NCURSESW |
179 |
+ # include <ncursesw/curses.h> |
180 |
+-#elif HAVE_NCURSES_H |
181 |
+ # include <ncurses.h> |
182 |
+-#else |
183 |
++#elif HAVE_CURSES |
184 |
+ # include <curses.h> |
185 |
+ #endif |
186 |
++ |
187 |
+ #include <assert.h> |
188 |
+ #include <string.h> |
189 |
+ #include <errno.h> |
190 |
+--- moc-2.6-alpha1/utf8.h |
191 |
++++ moc-2.6-alpha1/utf8.h |
192 |
+@@ -1,11 +1,10 @@ |
193 |
+ #ifndef UTF8_H |
194 |
+ #define UTF8_H |
195 |
+ |
196 |
+-#ifdef HAVE_NCURSESW_H |
197 |
++#ifdef HAVE_NCURSESW |
198 |
+ # include <ncursesw/curses.h> |
199 |
+-#elif HAVE_NCURSES_H |
200 |
+ # include <ncurses.h> |
201 |
+-#else |
202 |
++#elif HAVE_CURSES |
203 |
+ # include <curses.h> |
204 |
+ #endif |
205 |
+ |
206 |
|
207 |
diff --git a/media-sound/moc/moc-2.6_alpha1-r1.ebuild b/media-sound/moc/moc-2.6_alpha1-r1.ebuild |
208 |
new file mode 100644 |
209 |
index 0000000..a5b24cd |
210 |
--- /dev/null |
211 |
+++ b/media-sound/moc/moc-2.6_alpha1-r1.ebuild |
212 |
@@ -0,0 +1,90 @@ |
213 |
+# Copyright 1999-2016 Gentoo Foundation |
214 |
+# Distributed under the terms of the GNU General Public License v2 |
215 |
+# $Id$ |
216 |
+ |
217 |
+EAPI=6 |
218 |
+ |
219 |
+inherit autotools eutils versionator |
220 |
+ |
221 |
+MY_PV="$(replace_version_separator 2 -)" |
222 |
+DESCRIPTION="Music On Console - ncurses interface for playing audio files" |
223 |
+HOMEPAGE="http://moc.daper.net" |
224 |
+SRC_URI="http://ftp.daper.net/pub/soft/moc/unstable/${PN}-${MY_PV}.tar.xz" |
225 |
+ |
226 |
+LICENSE="GPL-2" |
227 |
+SLOT="0" |
228 |
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" |
229 |
+IUSE="aac alsa +cache curl debug ffmpeg flac jack libsamplerate mad +magic modplug musepack |
230 |
+ oss sid sndfile speex timidity tremor +unicode vorbis wavpack" |
231 |
+ |
232 |
+RDEPEND=">=dev-libs/libltdl-2:0 |
233 |
+ sys-libs/ncurses:0=[unicode?] |
234 |
+ aac? ( media-libs/faad2 ) |
235 |
+ alsa? ( media-libs/alsa-lib ) |
236 |
+ cache? ( >=sys-libs/db-4:* ) |
237 |
+ curl? ( net-misc/curl ) |
238 |
+ ffmpeg? ( virtual/ffmpeg ) |
239 |
+ flac? ( media-libs/flac ) |
240 |
+ jack? ( media-sound/jack-audio-connection-kit ) |
241 |
+ libsamplerate? ( media-libs/libsamplerate ) |
242 |
+ mad? ( media-libs/libmad sys-libs/zlib media-libs/libid3tag ) |
243 |
+ magic? ( sys-apps/file ) |
244 |
+ modplug? ( media-libs/libmodplug ) |
245 |
+ musepack? ( media-sound/musepack-tools media-libs/taglib ) |
246 |
+ sid? ( >=media-libs/libsidplay-2 ) |
247 |
+ sndfile? ( media-libs/libsndfile ) |
248 |
+ speex? ( media-libs/speex ) |
249 |
+ timidity? ( media-libs/libtimidity media-sound/timidity++ ) |
250 |
+ vorbis? ( |
251 |
+ media-libs/libogg |
252 |
+ tremor? ( media-libs/tremor ) |
253 |
+ !tremor? ( media-libs/libvorbis ) |
254 |
+ ) |
255 |
+ wavpack? ( media-sound/wavpack )" |
256 |
+DEPEND="${RDEPEND} |
257 |
+ app-arch/xz-utils |
258 |
+ virtual/pkgconfig" |
259 |
+PATCHES=( |
260 |
+ "${FILESDIR}/${P}-fix-ncurses-underlinking.patch" |
261 |
+) |
262 |
+S="${WORKDIR}/${PN}-${MY_PV}" |
263 |
+ |
264 |
+src_prepare() { |
265 |
+ mv configure.{in,ac} || die |
266 |
+ default |
267 |
+ eautoreconf |
268 |
+} |
269 |
+ |
270 |
+src_configure() { |
271 |
+ local myconf=( |
272 |
+ --without-rcc |
273 |
+ $(use_enable debug) |
274 |
+ $(use_enable cache) |
275 |
+ $(use_with oss) |
276 |
+ $(use_with alsa) |
277 |
+ $(use_with jack) |
278 |
+ $(use_with magic) |
279 |
+ $(use_with unicode ncursesw) |
280 |
+ $(use_with libsamplerate samplerate) |
281 |
+ $(use_with aac) |
282 |
+ $(use_with ffmpeg) |
283 |
+ $(use_with flac) |
284 |
+ $(use_with modplug) |
285 |
+ $(use_with mad mp3) |
286 |
+ $(use_with musepack) |
287 |
+ $(use_with sid sidplay2) |
288 |
+ $(use_with sndfile) |
289 |
+ $(use_with speex) |
290 |
+ $(use_with timidity) |
291 |
+ $(use_with vorbis vorbis $(usex tremor tremor "")) |
292 |
+ $(use_with wavpack) |
293 |
+ $(use_with curl) |
294 |
+ ) |
295 |
+ |
296 |
+ econf "${myconf[@]}" |
297 |
+} |
298 |
+ |
299 |
+src_install() { |
300 |
+ default |
301 |
+ prune_libtool_files --all |
302 |
+} |