Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/
Date: Wed, 04 Jan 2017 10:15:49
Message-Id: 1483524859.5d91a8ec6e301561d4ac84de993bf4fa12cc4d0d.soap@gentoo
1 commit: 5d91a8ec6e301561d4ac84de993bf4fa12cc4d0d
2 Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
3 AuthorDate: Fri Dec 30 14:07:05 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 4 10:14:19 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d91a8ec
7
8 media-video/aegisub: port 3.2.2_p20160518 to xdg-utils eclass
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 .../aegisub/aegisub-3.2.2_p20160518-r1.ebuild | 147 +++++++++++++++++++++
13 1 file changed, 147 insertions(+)
14
15 diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518-r1.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r1.ebuild
16 new file mode 100644
17 index 00000000..44dcfc9
18 --- /dev/null
19 +++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r1.ebuild
20 @@ -0,0 +1,147 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=6
26 +
27 +WX_GTK_VER=3.0
28 +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 sr_RS@latin uk_UA vi zh_CN zh_TW"
29 +COMMIT_ID="b118fe7e7a5c37540e2f0aa75af105e272bad234"
30 +
31 +inherit autotools flag-o-matic gnome2-utils l10n wxwidgets xdg-utils vcs-snapshot
32 +
33 +DESCRIPTION="Advanced subtitle editor"
34 +HOMEPAGE="http://www.aegisub.org/ https://github.com/Aegisub/Aegisub"
35 +SRC_URI="https://github.com/Aegisub/Aegisub/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
36 +
37 +LICENSE="BSD MIT"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~x86"
40 +IUSE="alsa debug +fftw openal oss portaudio pulseaudio spell test +uchardet"
41 +
42 +# aegisub bundles luabins (https://github.com/agladysh/luabins).
43 +# Unfortunately, luabins upstream is practically dead since 2010.
44 +# Thus unbundling luabins isn't worth the effort.
45 +RDEPEND="
46 + x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,debug?]
47 + dev-lang/luajit:2[lua52compat]
48 + dev-libs/boost:=[icu,nls,threads]
49 + dev-libs/icu:=
50 + media-libs/ffmpegsource:=
51 + media-libs/fontconfig
52 + media-libs/freetype
53 + media-libs/libass:=[fontconfig]
54 + sys-libs/zlib
55 + virtual/libiconv
56 + virtual/opengl
57 + alsa? ( media-libs/alsa-lib )
58 + fftw? ( >=sci-libs/fftw-3.3:= )
59 + openal? ( media-libs/openal )
60 + portaudio? ( =media-libs/portaudio-19* )
61 + pulseaudio? ( media-sound/pulseaudio )
62 + spell? ( app-text/hunspell )
63 + uchardet? ( dev-libs/uchardet )
64 +"
65 +DEPEND="${RDEPEND}
66 + dev-util/intltool
67 + sys-devel/gettext
68 + virtual/pkgconfig
69 + oss? ( virtual/os-headers )
70 + test? (
71 + ~dev-cpp/gtest-1.7.0
72 + dev-lua/busted
73 + dev-lua/luarocks
74 + )
75 +"
76 +
77 +REQUIRED_USE="|| ( alsa openal oss portaudio pulseaudio )"
78 +
79 +PATCHES=(
80 + "${FILESDIR}/${PV}/${P}-fix-system-luajit-build.patch"
81 + "${FILESDIR}/${PV}/${P}-respect-compiler-flags.patch"
82 + "${FILESDIR}/${PV}/${P}-support-system-gtest.patch"
83 +)
84 +
85 +aegisub_check_compiler() {
86 + if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11; then
87 + die "Your compiler lacks C++11 support. Use GCC>=4.7.0 or Clang>=3.3."
88 + fi
89 +}
90 +
91 +pkg_pretend() {
92 + aegisub_check_compiler
93 +}
94 +
95 +pkg_setup() {
96 + aegisub_check_compiler
97 +}
98 +
99 +src_prepare() {
100 + default_src_prepare
101 +
102 + # Remove tests that require unavailable uuid Lua module.
103 + rm automation/tests/modules/lfs.moon || die
104 +
105 + remove_locale() {
106 + rm "po/${1}.po" || die
107 + }
108 +
109 + l10n_find_plocales_changes 'po' '' '.po'
110 + l10n_for_each_disabled_locale_do remove_locale
111 +
112 + # See http://devel.aegisub.org/ticket/1914
113 + config_rpath_update "${S}"/config.rpath
114 +
115 + eautoreconf
116 +
117 + cat <<- EOF > build/git_version.h || die
118 + #define BUILD_GIT_VERSION_NUMBER 8897
119 + #define BUILD_GIT_VERSION_STRING "${PV}"
120 + #define TAGGED_RELEASE 0
121 + EOF
122 +}
123 +
124 +src_configure() {
125 + # Prevent access violations from OpenAL detection. See Gentoo bug 508184.
126 + use openal && export agi_cv_with_openal="yes"
127 +
128 + setup-wxwidgets
129 + local myeconfargs=(
130 + --disable-update-checker
131 + --with-ffms2
132 + --with-system-luajit
133 + $(use_enable debug)
134 + $(use_with alsa)
135 + $(use_with fftw fftw3)
136 + $(use_with openal)
137 + $(use_with oss)
138 + $(use_with portaudio)
139 + $(use_with pulseaudio libpulse)
140 + $(use_with spell hunspell)
141 + $(use_with uchardet)
142 + )
143 + econf "${myeconfargs[@]}"
144 +}
145 +
146 +src_compile() {
147 + emake WITH_SYSTEM_GTEST=$(usex test)
148 +}
149 +
150 +src_test() {
151 + emake test-automation
152 + emake test-libaegisub
153 +}
154 +
155 +pkg_preinst() {
156 + gnome2_icon_savelist
157 +}
158 +
159 +pkg_postinst() {
160 + gnome2_icon_cache_update
161 + xdg_desktop_database_update
162 +}
163 +
164 +pkg_postrm() {
165 + gnome2_icon_cache_update
166 + xdg_desktop_database_update
167 +}