1 |
commit: b662bea84ad0a98537120e7c026d7bacda471200 |
2 |
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Nov 2 17:53:05 2015 +0000 |
4 |
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 2 17:53:05 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b662bea8 |
7 |
|
8 |
media-video/aegisub: update live ebuild |
9 |
|
10 |
Sync live ebuild with the latest versioned one aka 3.2.2. |
11 |
|
12 |
media-video/aegisub/aegisub-9999.ebuild | 91 ++++++++------ |
13 |
.../aegisub-9999-respect-user-compiler-flags.patch | 50 ++++++++ |
14 |
.../files/aegisub-9999-unbundle-luajit.patch | 134 +++++++++++++++++++++ |
15 |
3 files changed, 238 insertions(+), 37 deletions(-) |
16 |
|
17 |
diff --git a/media-video/aegisub/aegisub-9999.ebuild b/media-video/aegisub/aegisub-9999.ebuild |
18 |
index fb5c7ea..c678b5f 100644 |
19 |
--- a/media-video/aegisub/aegisub-9999.ebuild |
20 |
+++ b/media-video/aegisub/aegisub-9999.ebuild |
21 |
@@ -1,84 +1,101 @@ |
22 |
-# Copyright 1999-2014 Gentoo Foundation |
23 |
+# Copyright 1999-2015 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
# $Id$ |
26 |
|
27 |
-EAPI="5" |
28 |
+EAPI=5 |
29 |
|
30 |
-AUTOTOOLS_AUTORECONF="1" |
31 |
-AUTOTOOLS_IN_SOURCE_BUILD="1" |
32 |
+AUTOTOOLS_AUTORECONF=1 |
33 |
+AUTOTOOLS_IN_SOURCE_BUILD=1 |
34 |
+PLOCALES="ar bg ca cs da de el es eu fa fi fr_FR gl hu id it ja ko nl pl pt_BR pt_PT ru sr_RS@latin sr_RS uk_UA vi zh_CN zh_TW" |
35 |
WX_GTK_VER="3.0" |
36 |
-PLOCALES="ar bg ca cs da de el es eu fa fi fr_FR gl hu id it ja ko nl pl pt_BR pt_PT ru sr_RS@latin sr_RS vi zh_CN zh_TW" |
37 |
-inherit autotools-utils wxwidgets l10n fdo-mime gnome2-utils git-2 |
38 |
+ |
39 |
+inherit autotools-utils fdo-mime gnome2-utils l10n toolchain-funcs wxwidgets git-2 |
40 |
|
41 |
DESCRIPTION="Advanced subtitle editor" |
42 |
HOMEPAGE="http://www.aegisub.org/" |
43 |
-EGIT_REPO_URI="https://github.com/Aegisub/Aegisub.git" |
44 |
+EGIT_REPO_URI="git://github.com/Aegisub/Aegisub.git" |
45 |
|
46 |
LICENSE="BSD" |
47 |
SLOT="0" |
48 |
KEYWORDS="" |
49 |
IUSE="alsa debug +ffmpeg +fftw openal oss portaudio pulseaudio spell" |
50 |
|
51 |
-REQUIRED_USE=" |
52 |
- || ( alsa openal oss portaudio pulseaudio ) |
53 |
-" |
54 |
- |
55 |
+# configure.ac specifies minimal versions for some of the dependencies below. |
56 |
+# However, most of these minimal versions date back to 2006-2010 yy. |
57 |
+# Such version specifiers are meaningless nowadays, so they are omitted. |
58 |
RDEPEND=" |
59 |
+ >=dev-lang/luajit-2.0.4:2= |
60 |
+ >=dev-libs/boost-1.50.0:=[icu,nls,threads] |
61 |
+ >=dev-libs/icu-4.8.1.1:= |
62 |
>=x11-libs/wxGTK-3.0.0:${WX_GTK_VER}[X,opengl,debug?] |
63 |
- virtual/opengl |
64 |
- virtual/glu |
65 |
- >=media-libs/libass-0.10.0[fontconfig] |
66 |
+ media-libs/fontconfig |
67 |
+ media-libs/freetype |
68 |
+ media-libs/libass[fontconfig] |
69 |
virtual/libiconv |
70 |
- >=dev-libs/boost-1.53.0:=[icu,nls,threads] |
71 |
- >=dev-libs/icu-4.8.1.1:= |
72 |
- >=media-libs/fontconfig-2.4.2 |
73 |
- >=media-libs/freetype-2.3.5:2 |
74 |
+ virtual/opengl |
75 |
|
76 |
- alsa? ( >=media-libs/alsa-lib-1.0.16 ) |
77 |
- portaudio? ( =media-libs/portaudio-19* ) |
78 |
- pulseaudio? ( >=media-sound/pulseaudio-0.9.5 ) |
79 |
+ alsa? ( media-libs/alsa-lib ) |
80 |
openal? ( media-libs/openal ) |
81 |
+ portaudio? ( =media-libs/portaudio-19* ) |
82 |
+ pulseaudio? ( media-sound/pulseaudio ) |
83 |
+ |
84 |
+ ffmpeg? ( >=media-libs/ffmpegsource-2.16:= ) |
85 |
+ fftw? ( >=sci-libs/fftw-3.3:= ) |
86 |
|
87 |
- spell? ( >=app-text/hunspell-1.2.2 ) |
88 |
- ffmpeg? ( >=media-libs/ffmpegsource-2.17:= ) |
89 |
- fftw? ( >=sci-libs/fftw-3.3 ) |
90 |
+ spell? ( app-text/hunspell ) |
91 |
" |
92 |
DEPEND="${RDEPEND} |
93 |
oss? ( virtual/os-headers ) |
94 |
- >=sys-devel/gettext-0.18 |
95 |
dev-util/intltool |
96 |
+ sys-devel/gettext |
97 |
virtual/pkgconfig |
98 |
" |
99 |
+REQUIRED_USE=" |
100 |
+ || ( alsa openal oss portaudio pulseaudio ) |
101 |
+" |
102 |
+ |
103 |
+# aegisub also bundles luabins (https://github.com/agladysh/luabins). |
104 |
+# Unfortunately, luabins upstream is dead since 2011. |
105 |
+# Thus unbundling luabins is not worth the effort. |
106 |
+PATCHES=( |
107 |
+ "${FILESDIR}/${PN}-3.2.2-fix-lua-regexp.patch" |
108 |
+ "${FILESDIR}/${P}-unbundle-luajit.patch" |
109 |
+ "${FILESDIR}/${P}-respect-user-compiler-flags.patch" |
110 |
+) |
111 |
+ |
112 |
+pkg_pretend() { |
113 |
+ if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11; then |
114 |
+ die "Your compiler lacks C++11 support. Use GCC>=4.7.0 or Clang>=3.3." |
115 |
+ fi |
116 |
+} |
117 |
|
118 |
src_prepare() { |
119 |
- my_rm_loc() { |
120 |
- sed -i -e "s:${1}\.po::" po/Makefile || die |
121 |
+ cp /usr/share/gettext/config.rpath . || die |
122 |
+ |
123 |
+ remove_locale() { |
124 |
rm "po/${1}.po" || die |
125 |
} |
126 |
|
127 |
l10n_find_plocales_changes 'po' '' '.po' |
128 |
- if [ -z "$(l10n_get_locales)" ]; then |
129 |
- sed -e 's/^\s*po\s*$//' -i Makefile || die |
130 |
- else |
131 |
- l10n_for_each_disabled_locale_do my_rm_loc |
132 |
- fi |
133 |
+ l10n_for_each_disabled_locale_do remove_locale |
134 |
|
135 |
autotools-utils_src_prepare |
136 |
} |
137 |
|
138 |
src_configure() { |
139 |
- # testing openal does not work in sandbox, bug #508184 |
140 |
+ # Prevent sandbox violation from OpenAL detection. Gentoo bug #508184. |
141 |
use openal && export agi_cv_with_openal="yes" |
142 |
local myeconfargs=( |
143 |
+ --disable-update-checker |
144 |
+ $(use_enable debug) |
145 |
$(use_with alsa) |
146 |
+ $(use_with ffmpeg ffms2) |
147 |
+ $(use_with fftw fftw3) |
148 |
+ $(use_with openal) |
149 |
$(use_with oss) |
150 |
$(use_with portaudio) |
151 |
$(use_with pulseaudio libpulse) |
152 |
- $(use_with openal) |
153 |
- $(use_with ffmpeg ffms2) |
154 |
- $(use_with fftw fftw3) |
155 |
$(use_with spell hunspell) |
156 |
- $(use_enable debug) |
157 |
) |
158 |
autotools-utils_src_configure |
159 |
} |
160 |
|
161 |
diff --git a/media-video/aegisub/files/aegisub-9999-respect-user-compiler-flags.patch b/media-video/aegisub/files/aegisub-9999-respect-user-compiler-flags.patch |
162 |
new file mode 100644 |
163 |
index 0000000..ae1f5c1 |
164 |
--- /dev/null |
165 |
+++ b/media-video/aegisub/files/aegisub-9999-respect-user-compiler-flags.patch |
166 |
@@ -0,0 +1,50 @@ |
167 |
+diff --git a/configure.ac b/configure.ac |
168 |
+index d0b5152..2609161 100644 |
169 |
+--- a/configure.ac |
170 |
++++ b/configure.ac |
171 |
+@@ -136,20 +136,17 @@ AS_IF([test x$build_darwin != xyes], [ |
172 |
+ AC_ARG_ENABLE(compiler-flags, AS_HELP_STRING([--disable-compiler-flags],[Disable *all* additional compiler flags. [no]])) |
173 |
+ |
174 |
+ AS_IF([test x$enable_compiler_flags != xno], [ |
175 |
+- CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter -std=gnu99 -pipe -g" |
176 |
+- CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -pipe -g" |
177 |
++ CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter" |
178 |
++ CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter" |
179 |
++ AC_C_FLAG([-std=gnu99]) |
180 |
+ AC_CXX_FLAG([-std=c++11]) |
181 |
+- AC_CXX_FLAG([-Wno-c++11-narrowing]) |
182 |
+ AC_C_FLAG([-Wno-unused-local-typedefs]) |
183 |
+ AC_CXX_FLAG([-Wno-unused-local-typedefs]) |
184 |
+ |
185 |
+ # -O* messes with debugging. |
186 |
+ AS_IF([test x$enable_debug = xyes], [ |
187 |
+- CFLAGS="$CFLAGS -O0" |
188 |
+- CXXFLAGS="$CXXFLAGS -O0" |
189 |
+- ], [ |
190 |
+- CFLAGS="$CFLAGS -O3" |
191 |
+- CXXFLAGS="$CXXFLAGS -O3" |
192 |
++ CFLAGS="$CFLAGS -O0 -g" |
193 |
++ CXXFLAGS="$CXXFLAGS -O0 -g" |
194 |
+ ]) |
195 |
+ ]) |
196 |
+ |
197 |
+diff --git a/src/Makefile b/src/Makefile |
198 |
+index 08f9216..e2e5602 100644 |
199 |
+--- a/src/Makefile |
200 |
++++ b/src/Makefile |
201 |
+@@ -182,14 +182,13 @@ endif |
202 |
+ ##################### |
203 |
+ # SOURCE-LEVEL CFLAGS |
204 |
+ ##################### |
205 |
+-$(d)MatroskaParser.o_FLAGS := -Wno-sometimes-uninitialized |
206 |
+ $(d)audio_player.o_FLAGS := $(CFLAGS_ALSA) $(CFLAGS_PORTAUDIO) $(CFLAGS_LIBPULSE) $(CFLAGS_OPENAL) |
207 |
+ $(d)audio_provider_factory.o_FLAGS := $(CFLAGS_FFMS2) |
208 |
+ $(d)auto4_base.o_FLAGS := $(CFLAGS_FREETYPE) |
209 |
+ $(d)charset_detect.o_FLAGS := -D_X86_ |
210 |
+ $(d)font_file_lister_fontconfig.o_FLAGS := $(CFLAGS_FONTCONFIG) |
211 |
+ $(d)subtitles_provider.o_FLAGS := $(CFLAGS_LIBASS) |
212 |
+-$(d)subtitles_provider_libass.o_FLAGS := $(CFLAGS_LIBASS) -Wno-c++11-narrowing |
213 |
++$(d)subtitles_provider_libass.o_FLAGS := $(CFLAGS_LIBASS) |
214 |
+ $(d)text_file_reader.o_FLAGS := -D_X86_ |
215 |
+ $(d)video_provider_manager.o_FLAGS := $(CFLAGS_FFMS2) |
216 |
+ $(d)auto4_lua.o_FLAGS := -I$(TOP)vendor/luajit/include |
217 |
|
218 |
diff --git a/media-video/aegisub/files/aegisub-9999-unbundle-luajit.patch b/media-video/aegisub/files/aegisub-9999-unbundle-luajit.patch |
219 |
new file mode 100644 |
220 |
index 0000000..4eea654 |
221 |
--- /dev/null |
222 |
+++ b/media-video/aegisub/files/aegisub-9999-unbundle-luajit.patch |
223 |
@@ -0,0 +1,134 @@ |
224 |
+diff --git a/Makefile.inc.in b/Makefile.inc.in |
225 |
+index d1e1da4..aa26b81 100644 |
226 |
+--- a/Makefile.inc.in |
227 |
++++ b/Makefile.inc.in |
228 |
+@@ -78,7 +78,7 @@ CFLAGS_ICONV = @ICONV_CFLAGS@ |
229 |
+ CFLAGS_ICU = @ICU_I18N_CFLAGS@ |
230 |
+ CFLAGS_LIBASS = @LIBASS_CFLAGS@ |
231 |
+ CFLAGS_LIBPULSE = @LIBPULSE_CFLAGS@ |
232 |
+-CFLAGS_LUA = -I$(TOP)vendor/luajit/include |
233 |
++CFLAGS_LUA = @LUAJIT_CFLAGS@ |
234 |
+ CFLAGS_OPENAL = @OPENAL_CFLAGS@ |
235 |
+ CFLAGS_OSS = @OSS_CFLAGS@ |
236 |
+ CFLAGS_PORTAUDIO = @PORTAUDIO_CFLAGS@ |
237 |
+@@ -96,15 +96,11 @@ LIBS_ICONV = @ICONV_LIBS@ |
238 |
+ LIBS_ICU = @ICU_UC_LIBS@ @ICU_I18N_LIBS@ |
239 |
+ LIBS_LIBASS = @LIBASS_LIBS@ |
240 |
+ LIBS_LIBPULSE = @LIBPULSE_LIBS@ |
241 |
+-LIBS_LUA = $(TOP)vendor/luajit/src/libluajit.a |
242 |
++LIBS_LUA = @LUAJIT_LIBS@ |
243 |
+ LIBS_OPENAL = @OPENAL_LIBS@ |
244 |
+ LIBS_PORTAUDIO = @PORTAUDIO_LIBS@ |
245 |
+ LIBS_PTHREAD = @PTHREAD_LIBS@ |
246 |
+ |
247 |
+-ifeq (yes, $(BUILD_DARWIN)) |
248 |
+-LIBS_LUA = $(TOP)vendor/luajit/src/libluajit-aegisub.so |
249 |
+-endif |
250 |
+- |
251 |
+ FONTCONFIG_CONF_DIR = @FONTCONFIG_CONF_DIR@ |
252 |
+ |
253 |
+ ##################### |
254 |
+diff --git a/configure.ac b/configure.ac |
255 |
+index d0b5152..ecec4de 100644 |
256 |
+--- a/configure.ac |
257 |
++++ b/configure.ac |
258 |
+@@ -16,6 +16,8 @@ m4_define([libpulse_required_version], [0.5]) |
259 |
+ m4_define([pkgconfig_required_version], [0.20]) |
260 |
+ m4_define([portaudio_required_version], [19]) |
261 |
+ m4_define([wx_required_version], [3.0.0]) |
262 |
++# Same version as the bundled one |
263 |
++m4_define([luajit_required_version], [2.0.4]) |
264 |
+ |
265 |
+ ####### |
266 |
+ # Setup |
267 |
+@@ -206,6 +208,7 @@ AC_SUBST(GL_LIBS) |
268 |
+ PKG_CHECK_MODULES(FREETYPE, freetype2 >= freetype_required_version) |
269 |
+ PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version) |
270 |
+ PKG_CHECK_MODULES(LIBASS, libass >= libass_required_version) |
271 |
++PKG_CHECK_MODULES(LUAJIT, luajit >= luajit_required_version) |
272 |
+ |
273 |
+ FONTCONFIG_CONF_DIR=$($PKG_CONFIG --variable=confdir fontconfig) |
274 |
+ AC_SUBST(FONTCONFIG_CONF_DIR) |
275 |
+diff --git a/header.mk b/header.mk |
276 |
+index 61c8ba1..050472d 100644 |
277 |
+--- a/header.mk |
278 |
++++ b/header.mk |
279 |
+@@ -13,7 +13,6 @@ subdirs := \ |
280 |
+ tests \ |
281 |
+ tools \ |
282 |
+ vendor/luabins \ |
283 |
+- vendor/luajit \ |
284 |
+ vendor/universalchardet |
285 |
+ |
286 |
+ subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs))) |
287 |
+diff --git a/src/Makefile b/src/Makefile |
288 |
+index 08f9216..bb9233b 100644 |
289 |
+--- a/src/Makefile |
290 |
++++ b/src/Makefile |
291 |
+@@ -6,7 +6,8 @@ src_CPPFLAGS := -I$(d) -I.. -I$(d)include -I$(TOP)libaegisub/include -I$(TOP)bui |
292 |
+ $(CFLAGS_PTHREAD) $(CFLAGS_FFTW3) $(CFLAGS_ICU) $(CPPFLAGS_BOOST) |
293 |
+ src_CXXFLAGS := $(CXXFLAGS_WX) |
294 |
+ src_LIBS := $(LIBS_GL) $(LIBS_PTHREAD) $(LIBS_WX) $(LIBS_FREETYPE) \ |
295 |
+- $(LIBS_LIBASS) $(LIBS_FONTCONFIG) $(LIBS_FFTW3) $(LIBS_BOOST) $(LIBS_ICU) |
296 |
++ $(LIBS_LIBASS) $(LIBS_FONTCONFIG) $(LIBS_FFTW3) $(LIBS_BOOST) $(LIBS_ICU) \ |
297 |
++ $(LIBS_LUA) |
298 |
+ src_PCH := $(d)agi_pre.h |
299 |
+ src_INSTALLNAME := $(AEGISUB_COMMAND) |
300 |
+ |
301 |
+@@ -112,7 +113,6 @@ src_OBJ := \ |
302 |
+ $(d)video_provider_yuv4mpeg.o \ |
303 |
+ $(d)video_slider.o \ |
304 |
+ $(d)visual_feature.o \ |
305 |
+- $(LIBS_LUA) \ |
306 |
+ $(TOP)lib/libaegisub.a \ |
307 |
+ $(TOP)lib/libluabins.a \ |
308 |
+ $(TOP)lib/libresrc.a \ |
309 |
+@@ -192,10 +192,10 @@ $(d)subtitles_provider.o_FLAGS := $(CFLAGS_LIBASS) |
310 |
+ $(d)subtitles_provider_libass.o_FLAGS := $(CFLAGS_LIBASS) -Wno-c++11-narrowing |
311 |
+ $(d)text_file_reader.o_FLAGS := -D_X86_ |
312 |
+ $(d)video_provider_manager.o_FLAGS := $(CFLAGS_FFMS2) |
313 |
+-$(d)auto4_lua.o_FLAGS := -I$(TOP)vendor/luajit/include |
314 |
+-$(d)auto4_lua_assfile.o_FLAGS := -I$(TOP)vendor/luajit/include |
315 |
+-$(d)auto4_lua_dialog.o_FLAGS := -I$(TOP)vendor/luajit/include |
316 |
+-$(d)auto4_lua_progresssink.o_FLAGS := -I$(TOP)vendor/luajit/include |
317 |
++$(d)auto4_lua.o_FLAGS := $(CFLAGS_LUA) |
318 |
++$(d)auto4_lua_assfile.o_FLAGS := $(CFLAGS_LUA) |
319 |
++$(d)auto4_lua_dialog.o_FLAGS := $(CFLAGS_LUA) |
320 |
++$(d)auto4_lua_progresssink.o_FLAGS := $(CFLAGS_LUA) |
321 |
+ |
322 |
+ $(src_OBJ): $(d)libresrc/bitmap.h $(d)libresrc/default_config.h |
323 |
+ |
324 |
+diff --git a/src/libresrc/Makefile b/src/libresrc/Makefile |
325 |
+index 6441856..0562eb1 100644 |
326 |
+--- a/src/libresrc/Makefile |
327 |
++++ b/src/libresrc/Makefile |
328 |
+@@ -10,7 +10,7 @@ resrc_OBJ := \ |
329 |
+ |
330 |
+ $(resrc_OBJ): $(d)default_config.h $(d)bitmap.h $(d)default_config.cpp $(d)bitmap.cpp |
331 |
+ |
332 |
+-RESPACK := cd $(TOP)src/libresrc; $(TOP)vendor/luajit/src/host/minilua $(TOP)tools/respack.lua |
333 |
++RESPACK := cd $(TOP)src/libresrc; luajit $(TOP)tools/respack.lua |
334 |
+ |
335 |
+ $(d)bitmap.cpp: $(d)bitmap.h |
336 |
+ $(d)default_config.cpp: $(d)default_config.h |
337 |
+diff --git a/tools/Makefile b/tools/Makefile |
338 |
+index d9f64b8..d56ef63 100644 |
339 |
+--- a/tools/Makefile |
340 |
++++ b/tools/Makefile |
341 |
+@@ -12,6 +12,4 @@ repack-thes-dict_CPPFLAGS := -I$(TOP) -I$(TOP)libaegisub/include $(CFLAGS_ICU) |
342 |
+ |
343 |
+ PROGRAM += $(d)repack-thes-dict |
344 |
+ |
345 |
+-$(TOP)tools/respack.lua: $(TOP)vendor/luajit/src/host/minilua |
346 |
+- |
347 |
+ include $(TOP)Makefile.target |
348 |
+diff --git a/tools/respack.lua b/tools/respack.lua |
349 |
+index 85955d1..11af2f4 100755 |
350 |
+--- a/tools/respack.lua |
351 |
++++ b/tools/respack.lua |
352 |
+@@ -1,4 +1,4 @@ |
353 |
+-#!../vendor/luajit/src/host/minilua |
354 |
++#!/usr/bin/env luajit |
355 |
+ -- Copyright (c) 2014, Thomas Goyne <plorkyeran@×××××××.org> |
356 |
+ -- |
357 |
+ -- Permission to use, copy, modify, and distribute this software for any |