Gentoo Archives: gentoo-commits

From: Ian Delaney <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/, media-video/aegisub/files/
Date: Tue, 03 Nov 2015 09:43:00
Message-Id: 1446454562.d7a9183983102c049cd410692cb8f7e8c7073f79.idella4@gentoo
1 commit: d7a9183983102c049cd410692cb8f7e8c7073f79
2 Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
3 AuthorDate: Mon Nov 2 08:34:10 2015 +0000
4 Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 2 08:56:02 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7a91839
7
8 media-video/aegisub: version bump to 3.2.2
9
10 Inherited from Nikoli.
11 List of changes compared to Nikoli ebuilds:
12 - respect user compiler flags
13 - do not enable debug flags for regular builds
14 - omit unneeded ancient version numbers in deps
15 - unbundle luajit
16 - fix minor lua issues
17 - check for C++11 compiler support
18 - remove virtual/glu dep as it was only needed for crashreporter,
19 which was never finished and ultimately was removed upstream
20 - avoid nls USE as build system expects config.rpath file being
21 available regardless of the value of nls configure option
22
23 Gentoo-Bug: 536244
24 Gentoo-Bug: 508120
25
26 media-video/aegisub/Manifest | 1 +
27 media-video/aegisub/aegisub-3.2.2.ebuild | 115 ++++++++++++++++++
28 .../files/aegisub-3.2.2-fix-lua-regexp.patch | 13 ++
29 ...aegisub-3.2.2-respect-user-compiler-flags.patch | 30 +++++
30 .../files/aegisub-3.2.2-unbundle-luajit.patch | 134 +++++++++++++++++++++
31 5 files changed, 293 insertions(+)
32
33 diff --git a/media-video/aegisub/Manifest b/media-video/aegisub/Manifest
34 index 1db550c..a493a82 100644
35 --- a/media-video/aegisub/Manifest
36 +++ b/media-video/aegisub/Manifest
37 @@ -1,3 +1,4 @@
38 DIST aegisub-2.1.9.tar.xz 1670496 SHA256 e0591c96183f7713bb14f9d357a2e12bdd3478e4d0a8fad77f14f87a4fc22db7 SHA512 bdb02e3d29db2b7ed165eaf1d541515c15f22199bb209d517089e2c35289b7fc22f6159589004c7f8667a57d26eb7ab6211f9d85ca4bbcd076c5856ac10a3d4f WHIRLPOOL 4ac402e067ff0d863042a8f314c1e55154bacfcc13103772e7c4036b7d927f687b2172003eb51e35469f7af2b640e20f224ff1fa5be83f729eacfaac89c73144
39 DIST aegisub-3.1.2.tar.xz 4126244 SHA256 36ebfd05cc642b050da1e91ce2d2082b317a37bdfab109e191f861170d7cff86 SHA512 d15e16f9f98c01447b72cde1998c915a2bfc1aa918a4380b54303de8e88ef881f46c3896ab9dc5eddaf4f1376f0908abd8427dbf6af395e6e0b3969ddca402ab WHIRLPOOL fa7afa1a3e736a410d686bc14d173518267e4b1570a468d9871334f06af821040fe7f40d6ba3b1bece9350a70dd43613c4aedfe8480629a283c9a16a2f54ab6d
40 DIST aegisub-3.1.3.tar.xz 4215196 SHA256 efea5bc2bc5e0651ada4f65cfdd8af1b422a15f87933710d11287bf51e2b5e58 SHA512 c406925623e7b8425df47d1cd31ef77d536861335d25c626ecb916ef091341a8156879430f094ffa1d27490a65f79e2edb84593609d589834f3411b2c2841297 WHIRLPOOL 12e40c2ce78e1659046d093d7d34b68b7ceda2744c36be0e15a71a379cc3ced4fb8cde2c364bbd3b7efa803f78229794d5d417c601ae140d79e0c0a9a2711fb0
41 +DIST aegisub-3.2.2.tar.xz 5252052 SHA256 c55e33945b82d8513c02ea6e782f0d72c726adcd3707e95b8c0022f6151e6885 SHA512 54f825e52f238fef8d5cc31c37436e21355aee27883347f905271e5d2a8ff2a77e1b67d5aef38b0f8468bd0bad851fe944e02de27ec96310b902fbe5b1086722 WHIRLPOOL fe948edbb01f11385e14d1912b73942605df18325fcd95f4284a3c2edb73778d90d73038ac4a062e211fd56879590040e3c558fe1e361ec9fe2eee6a5c016448
42
43 diff --git a/media-video/aegisub/aegisub-3.2.2.ebuild b/media-video/aegisub/aegisub-3.2.2.ebuild
44 new file mode 100644
45 index 0000000..e6f23ec
46 --- /dev/null
47 +++ b/media-video/aegisub/aegisub-3.2.2.ebuild
48 @@ -0,0 +1,115 @@
49 +# Copyright 1999-2015 Gentoo Foundation
50 +# Distributed under the terms of the GNU General Public License v2
51 +# $Id$
52 +
53 +EAPI=5
54 +
55 +AUTOTOOLS_AUTORECONF=1
56 +AUTOTOOLS_IN_SOURCE_BUILD=1
57 +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"
58 +WX_GTK_VER="3.0"
59 +
60 +inherit autotools-utils fdo-mime gnome2-utils l10n toolchain-funcs wxwidgets
61 +
62 +DESCRIPTION="Advanced subtitle editor"
63 +HOMEPAGE="http://www.aegisub.org/"
64 +SRC_URI="http://ftp.aegisub.org/pub/releases/${P}.tar.xz"
65 +
66 +LICENSE="BSD"
67 +SLOT="0"
68 +KEYWORDS="~amd64 ~x86"
69 +IUSE="alsa debug +ffmpeg +fftw openal oss portaudio pulseaudio spell"
70 +
71 +# configure.ac specifies minimal versions for some of the dependencies below.
72 +# However, most of these minimal versions date back to 2006-2010 yy.
73 +# Such version specifiers are meaningless nowadays, so they are omitted.
74 +RDEPEND="
75 + >=dev-lang/luajit-2.0.3:2=
76 + >=dev-libs/boost-1.50.0:=[icu,nls,threads]
77 + >=dev-libs/icu-4.8.1.1:=
78 + >=x11-libs/wxGTK-3.0.0:${WX_GTK_VER}[X,opengl,debug?]
79 + media-libs/fontconfig
80 + media-libs/freetype
81 + media-libs/libass[fontconfig]
82 + virtual/libiconv
83 + virtual/opengl
84 +
85 + alsa? ( media-libs/alsa-lib )
86 + openal? ( media-libs/openal )
87 + portaudio? ( =media-libs/portaudio-19* )
88 + pulseaudio? ( media-sound/pulseaudio )
89 +
90 + ffmpeg? ( >=media-libs/ffmpegsource-2.16:= )
91 + fftw? ( >=sci-libs/fftw-3.3:= )
92 +
93 + spell? ( app-text/hunspell )
94 +"
95 +DEPEND="${RDEPEND}
96 + oss? ( virtual/os-headers )
97 + dev-util/intltool
98 + sys-devel/gettext
99 + virtual/pkgconfig
100 +"
101 +REQUIRED_USE="
102 + || ( alsa openal oss portaudio pulseaudio )
103 +"
104 +
105 +# aegisub also bundles luabins (https://github.com/agladysh/luabins).
106 +# Unfortunately, luabins upstream is dead since 2011.
107 +# Thus unbundling luabins is not worth the effort.
108 +PATCHES=(
109 + "${FILESDIR}/${P}-fix-lua-regexp.patch"
110 + "${FILESDIR}/${P}-unbundle-luajit.patch"
111 + "${FILESDIR}/${P}-respect-user-compiler-flags.patch"
112 +)
113 +
114 +pkg_pretend() {
115 + if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11; then
116 + die "Your compiler lacks C++11 support. Use GCC>=4.7.0 or Clang>=3.3."
117 + fi
118 +}
119 +
120 +src_prepare() {
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 + l10n_for_each_disabled_locale_do remove_locale
129 +
130 + autotools-utils_src_prepare
131 +}
132 +
133 +src_configure() {
134 + # Prevent sandbox violation from OpenAL detection. Gentoo bug #508184.
135 + use openal && export agi_cv_with_openal="yes"
136 + local myeconfargs=(
137 + --disable-update-checker
138 + $(use_enable debug)
139 + $(use_with alsa)
140 + $(use_with ffmpeg ffms2)
141 + $(use_with fftw fftw3)
142 + $(use_with openal)
143 + $(use_with oss)
144 + $(use_with portaudio)
145 + $(use_with pulseaudio libpulse)
146 + $(use_with spell hunspell)
147 + )
148 + autotools-utils_src_configure
149 +}
150 +
151 +pkg_preinst() {
152 + gnome2_icon_savelist
153 +}
154 +
155 +pkg_postinst() {
156 + fdo-mime_desktop_database_update
157 + gnome2_icon_cache_update
158 +}
159 +
160 +pkg_postrm() {
161 + fdo-mime_desktop_database_update
162 + gnome2_icon_cache_update
163 +}
164
165 diff --git a/media-video/aegisub/files/aegisub-3.2.2-fix-lua-regexp.patch b/media-video/aegisub/files/aegisub-3.2.2-fix-lua-regexp.patch
166 new file mode 100644
167 index 0000000..a05ed2d
168 --- /dev/null
169 +++ b/media-video/aegisub/files/aegisub-3.2.2-fix-lua-regexp.patch
170 @@ -0,0 +1,13 @@
171 +diff --git a/tools/respack.lua b/tools/respack.lua
172 +index 85955d1..1281ac2 100755
173 +--- a/tools/respack.lua
174 ++++ b/tools/respack.lua
175 +@@ -44,7 +44,7 @@ out_cpp:write('#include "libresrc.h"\n')
176 + for line in manifest:lines() do
177 + if line:find('.') then
178 + local file = try_open(path..line, 'rb')
179 +- local id = line:gsub('^.*/', ''):gsub('\.[a-z]+$', '')
180 ++ local id = line:gsub('^.*/', ''):gsub('%.[a-z]+$', '')
181 + out_cpp:write("const unsigned char " .. id .. "[] = {")
182 +
183 + local len = 0
184
185 diff --git a/media-video/aegisub/files/aegisub-3.2.2-respect-user-compiler-flags.patch b/media-video/aegisub/files/aegisub-3.2.2-respect-user-compiler-flags.patch
186 new file mode 100644
187 index 0000000..caecf82
188 --- /dev/null
189 +++ b/media-video/aegisub/files/aegisub-3.2.2-respect-user-compiler-flags.patch
190 @@ -0,0 +1,30 @@
191 +diff --git a/configure.ac b/configure.ac
192 +index be657b0..fca48e0 100644
193 +--- a/configure.ac
194 ++++ b/configure.ac
195 +@@ -139,20 +139,17 @@ CC="$PTHREAD_CC"
196 + AC_ARG_ENABLE(compiler-flags, AS_HELP_STRING([--disable-compiler-flags],[Disable *all* additional compiler flags. [no]]))
197 +
198 + AS_IF([test x$enable_compiler_flags != xno], [
199 +- CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter -std=gnu99 -pipe -g"
200 +- CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -pipe -g"
201 ++ CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter"
202 ++ CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter"
203 ++ AC_C_FLAG([-std=gnu99])
204 + AC_CXX_FLAG([-std=c++11])
205 +- AC_CXX_FLAG([-Wno-c++11-narrowing])
206 + AC_C_FLAG([-Wno-unused-local-typedefs])
207 + AC_CXX_FLAG([-Wno-unused-local-typedefs])
208 +
209 + # -O* messes with debugging.
210 + AS_IF([test x$enable_debug = xyes], [
211 +- CFLAGS="$CFLAGS -O0"
212 +- CXXFLAGS="$CXXFLAGS -O0"
213 +- ], [
214 +- CFLAGS="$CFLAGS -O3"
215 +- CXXFLAGS="$CXXFLAGS -O3"
216 ++ CFLAGS="$CFLAGS -O0 -g"
217 ++ CXXFLAGS="$CXXFLAGS -O0 -g"
218 + ])
219 + ])
220 +
221
222 diff --git a/media-video/aegisub/files/aegisub-3.2.2-unbundle-luajit.patch b/media-video/aegisub/files/aegisub-3.2.2-unbundle-luajit.patch
223 new file mode 100644
224 index 0000000..de09072
225 --- /dev/null
226 +++ b/media-video/aegisub/files/aegisub-3.2.2-unbundle-luajit.patch
227 @@ -0,0 +1,134 @@
228 +diff --git a/Makefile.inc.in b/Makefile.inc.in
229 +index c93b9dc..ae018c3 100644
230 +--- a/Makefile.inc.in
231 ++++ b/Makefile.inc.in
232 +@@ -78,7 +78,7 @@ CFLAGS_ICONV = @ICONV_CFLAGS@
233 + CFLAGS_ICU = @ICU_I18N_CFLAGS@
234 + CFLAGS_LIBASS = @LIBASS_CFLAGS@
235 + CFLAGS_LIBPULSE = @LIBPULSE_CFLAGS@
236 +-CFLAGS_LUA = -I$(TOP)vendor/luajit/include
237 ++CFLAGS_LUA = @LUAJIT_CFLAGS@
238 + CFLAGS_OPENAL = @OPENAL_CFLAGS@
239 + CFLAGS_OSS = @OSS_CFLAGS@
240 + CFLAGS_PORTAUDIO = @PORTAUDIO_CFLAGS@
241 +@@ -96,15 +96,11 @@ LIBS_ICONV = @ICONV_LIBS@
242 + LIBS_ICU = @ICU_UC_LIBS@ @ICU_I18N_LIBS@
243 + LIBS_LIBASS = @LIBASS_LIBS@
244 + LIBS_LIBPULSE = @LIBPULSE_LIBS@
245 +-LIBS_LUA = $(TOP)vendor/luajit/src/libluajit.a
246 ++LIBS_LUA = @LUAJIT_LIBS@
247 + LIBS_OPENAL = @OPENAL_LIBS@
248 + LIBS_PORTAUDIO = @PORTAUDIO_LIBS@
249 + LIBS_PTHREAD = @PTHREAD_LIBS@
250 +
251 +-ifeq (yes, $(BUILD_DARWIN))
252 +-LIBS_LUA = $(TOP)vendor/luajit/src/libluajit-aegisub.so
253 +-endif
254 +-
255 + FONTCONFIG_CONF_DIR = @FONTCONFIG_CONF_DIR@
256 +
257 + #####################
258 +diff --git a/configure.ac b/configure.ac
259 +index be657b0..de586d5 100644
260 +--- a/configure.ac
261 ++++ b/configure.ac
262 +@@ -16,6 +16,8 @@ m4_define([libpulse_required_version], [0.5])
263 + m4_define([pkgconfig_required_version], [0.20])
264 + m4_define([portaudio_required_version], [19])
265 + m4_define([wx_required_version], [3.0.0])
266 ++# Same version as the bundled one
267 ++m4_define([luajit_required_version], [2.0.3])
268 +
269 + #######
270 + # Setup
271 +@@ -205,6 +207,7 @@ AC_SUBST(GL_LIBS)
272 + PKG_CHECK_MODULES(FREETYPE, freetype2 >= freetype_required_version)
273 + PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version)
274 + PKG_CHECK_MODULES(LIBASS, libass >= libass_required_version)
275 ++PKG_CHECK_MODULES(LUAJIT, luajit >= luajit_required_version)
276 +
277 + FONTCONFIG_CONF_DIR=$($PKG_CONFIG --variable=confdir fontconfig)
278 + AC_SUBST(FONTCONFIG_CONF_DIR)
279 +diff --git a/header.mk b/header.mk
280 +index 61c8ba1..050472d 100644
281 +--- a/header.mk
282 ++++ b/header.mk
283 +@@ -13,7 +13,6 @@ subdirs := \
284 + tests \
285 + tools \
286 + vendor/luabins \
287 +- vendor/luajit \
288 + vendor/universalchardet
289 +
290 + subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs)))
291 +diff --git a/src/Makefile b/src/Makefile
292 +index 60d7101..757bdc6 100644
293 +--- a/src/Makefile
294 ++++ b/src/Makefile
295 +@@ -6,7 +6,8 @@ src_CPPFLAGS := -I$(d) -I.. -I$(d)include -I$(TOP)libaegisub/include -I$(TOP)bui
296 + $(CFLAGS_PTHREAD) $(CFLAGS_FFTW3) $(CFLAGS_ICU)
297 + src_CXXFLAGS := $(CXXFLAGS_WX)
298 + src_LIBS := $(LIBS_GL) $(LIBS_PTHREAD) $(LIBS_WX) $(LIBS_FREETYPE) \
299 +- $(LIBS_LIBASS) $(LIBS_FONTCONFIG) $(LIBS_FFTW3) $(LIBS_BOOST) $(LIBS_ICU)
300 ++ $(LIBS_LIBASS) $(LIBS_FONTCONFIG) $(LIBS_FFTW3) $(LIBS_BOOST) $(LIBS_ICU) \
301 ++ $(LIBS_LUA)
302 + src_PCH := $(d)agi_pre.h
303 + src_INSTALLNAME := $(AEGISUB_COMMAND)
304 +
305 +@@ -112,7 +113,6 @@ src_OBJ := \
306 + $(d)video_provider_yuv4mpeg.o \
307 + $(d)video_slider.o \
308 + $(d)visual_feature.o \
309 +- $(LIBS_LUA) \
310 + $(TOP)lib/libaegisub.a \
311 + $(TOP)lib/libluabins.a \
312 + $(TOP)lib/libresrc.a \
313 +@@ -192,10 +192,10 @@ $(d)subtitles_provider.o_FLAGS := $(CFLAGS_LIBASS)
314 + $(d)subtitles_provider_libass.o_FLAGS := $(CFLAGS_LIBASS) -Wno-c++11-narrowing
315 + $(d)text_file_reader.o_FLAGS := -D_X86_
316 + $(d)video_provider_manager.o_FLAGS := $(CFLAGS_FFMS2)
317 +-$(d)auto4_lua.o_FLAGS := -I$(TOP)vendor/luajit/include
318 +-$(d)auto4_lua_assfile.o_FLAGS := -I$(TOP)vendor/luajit/include
319 +-$(d)auto4_lua_dialog.o_FLAGS := -I$(TOP)vendor/luajit/include
320 +-$(d)auto4_lua_progresssink.o_FLAGS := -I$(TOP)vendor/luajit/include
321 ++$(d)auto4_lua.o_FLAGS := $(CFLAGS_LUA)
322 ++$(d)auto4_lua_assfile.o_FLAGS := $(CFLAGS_LUA)
323 ++$(d)auto4_lua_dialog.o_FLAGS := $(CFLAGS_LUA)
324 ++$(d)auto4_lua_progresssink.o_FLAGS := $(CFLAGS_LUA)
325 +
326 + $(src_OBJ): $(d)libresrc/bitmap.h $(d)libresrc/default_config.h
327 +
328 +diff --git a/src/libresrc/Makefile b/src/libresrc/Makefile
329 +index 6441856..0562eb1 100644
330 +--- a/src/libresrc/Makefile
331 ++++ b/src/libresrc/Makefile
332 +@@ -10,7 +10,7 @@ resrc_OBJ := \
333 +
334 + $(resrc_OBJ): $(d)default_config.h $(d)bitmap.h $(d)default_config.cpp $(d)bitmap.cpp
335 +
336 +-RESPACK := cd $(TOP)src/libresrc; $(TOP)vendor/luajit/src/host/minilua $(TOP)tools/respack.lua
337 ++RESPACK := cd $(TOP)src/libresrc; luajit $(TOP)tools/respack.lua
338 +
339 + $(d)bitmap.cpp: $(d)bitmap.h
340 + $(d)default_config.cpp: $(d)default_config.h
341 +diff --git a/tools/Makefile b/tools/Makefile
342 +index 81bcef3..0834ac2 100644
343 +--- a/tools/Makefile
344 ++++ b/tools/Makefile
345 +@@ -12,6 +12,4 @@ repack-thes-dict_CPPFLAGS := -I$(TOP) -I$(TOP)libaegisub/include $(CFLAGS_ICU)
346 +
347 + PROGRAM += $(d)repack-thes-dict
348 +
349 +-$(TOP)tools/respack.lua: $(TOP)vendor/luajit/src/host/minilua
350 +-
351 + include $(TOP)Makefile.target
352 +diff --git a/tools/respack.lua b/tools/respack.lua
353 +index 85955d1..11af2f4 100755
354 +--- a/tools/respack.lua
355 ++++ b/tools/respack.lua
356 +@@ -1,4 +1,4 @@
357 +-#!../vendor/luajit/src/host/minilua
358 ++#!/usr/bin/env luajit
359 + -- Copyright (c) 2014, Thomas Goyne <plorkyeran@×××××××.org>
360 + --
361 + -- Permission to use, copy, modify, and distribute this software for any