public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/
@ 2016-06-28 18:06 Patrice Clement
  0 siblings, 0 replies; 9+ messages in thread
From: Patrice Clement @ 2016-06-28 18:06 UTC (permalink / raw
  To: gentoo-commits

commit:     856366c5b4b00916caa4263b9970d29d0b9838e8
Author:     Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Sat Jun  4 17:51:57 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Jun 28 17:38:17 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=856366c5

media-video/aegisub: verbump to 3.2.2_p20160518

Major revamp of the ebuild and the patchset:
- EAPI=6;
- add testing support;
- remove ffmpeg USE and depend on ffmpegsource unconditionally
  (otherwise aegisub can only open blank 'videos' without any video);
- cleanup dependencies;
- update the patchset (all changes were submitted upstream);
- update LICENSE.

Package-Manager: portage-2.3.0_rc1

Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 media-video/aegisub/Manifest                       |   1 +
 media-video/aegisub/aegisub-3.2.2_p20160518.ebuild | 138 +++++++++++++++++++++
 ...b-3.2.2_p20160518-fix-system-luajit-build.patch | 121 ++++++++++++++++++
 ...ub-3.2.2_p20160518-respect-compiler-flags.patch |  53 ++++++++
 ...isub-3.2.2_p20160518-support-system-gtest.patch |  75 +++++++++++
 5 files changed, 388 insertions(+)

diff --git a/media-video/aegisub/Manifest b/media-video/aegisub/Manifest
index d977b38..2db679d 100644
--- a/media-video/aegisub/Manifest
+++ b/media-video/aegisub/Manifest
@@ -1,2 +1,3 @@
 DIST aegisub-3.2.2.tar.xz 5252052 SHA256 c55e33945b82d8513c02ea6e782f0d72c726adcd3707e95b8c0022f6151e6885 SHA512 54f825e52f238fef8d5cc31c37436e21355aee27883347f905271e5d2a8ff2a77e1b67d5aef38b0f8468bd0bad851fe944e02de27ec96310b902fbe5b1086722 WHIRLPOOL fe948edbb01f11385e14d1912b73942605df18325fcd95f4284a3c2edb73778d90d73038ac4a062e211fd56879590040e3c558fe1e361ec9fe2eee6a5c016448
 DIST aegisub-3.2.2_p20160306.tar.gz 7436713 SHA256 1b70f67c3b3d6ecce482bc1f4beb1ceffd4c523aa060556658e403ea98fcc58c SHA512 815775b64b1ad5cd09eda6106561a8a0d4dc129d4c2e08e057eab881289526a7b67bab2f4d2f48748ef2015ea21f2839ed8f84d168bf9127c62c9a35caa1abd5 WHIRLPOOL caaa6b1d69c7e4d1da4abfd0382d263585c5216d9ed5e63f515d8bce98b2e0dad2848552f3f097a8db9e39dad5d2c00d3b752f0407490d0d2c777aaa8fc6dc38
+DIST aegisub-3.2.2_p20160518.tar.gz 7438734 SHA256 744318ce8be1afb21fbd6b0ce6d407a6f42c442db0df10c7cf89692a5bc8ca31 SHA512 8d8775ba0a12735a9756b9abfd65c89519dae4e21afcaedbd18985d1c1021975b1ae909b3bef1121b707c626e1711d56f1823f3b4746eab49e8386536a5e84e6 WHIRLPOOL 0d46799009c72cac1d6df89f4ffe5110d904e671175380e20605683b6a2f3ccdd46855cf98ebac8f0088c7a928b82547557afc8214b2fce85aed759aa5e9e4ab

diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518.ebuild
new file mode 100644
index 0000000..8610144
--- /dev/null
+++ b/media-video/aegisub/aegisub-3.2.2_p20160518.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+WX_GTK_VER=3.0
+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"
+COMMIT_ID="b118fe7e7a5c37540e2f0aa75af105e272bad234"
+
+inherit autotools fdo-mime flag-o-matic gnome2-utils l10n wxwidgets vcs-snapshot
+
+DESCRIPTION="Advanced subtitle editor"
+HOMEPAGE="http://www.aegisub.org/ https://github.com/Aegisub/Aegisub"
+SRC_URI="https://github.com/Aegisub/Aegisub/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug +fftw openal oss portaudio pulseaudio spell test +uchardet"
+
+# aegisub bundles luabins (https://github.com/agladysh/luabins).
+# Unfortunately, luabins upstream is practically dead since 2010.
+# Thus unbundling luabins isn't worth the effort.
+RDEPEND="
+	x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,debug?]
+	dev-lang/luajit:2[lua52compat]
+	dev-libs/boost:=[icu,nls,threads]
+	dev-libs/icu:=
+	media-libs/ffmpegsource:=
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/libass:=[fontconfig]
+	sys-libs/zlib
+	virtual/libiconv
+	virtual/opengl
+	alsa? ( media-libs/alsa-lib )
+	fftw? ( >=sci-libs/fftw-3.3:= )
+	openal? ( media-libs/openal )
+	portaudio? ( =media-libs/portaudio-19* )
+	pulseaudio? ( media-sound/pulseaudio )
+	spell? ( app-text/hunspell )
+	uchardet? ( dev-libs/uchardet )
+"
+DEPEND="${RDEPEND}
+	dev-util/intltool
+	sys-devel/gettext
+	virtual/pkgconfig
+	oss? ( virtual/os-headers )
+	test? (
+		~dev-cpp/gtest-1.7.0
+		dev-lua/busted
+		dev-lua/luarocks
+	)
+"
+
+REQUIRED_USE="|| ( alsa openal oss portaudio pulseaudio )"
+
+PATCHES=(
+	"${FILESDIR}/${PV}/${P}-fix-system-luajit-build.patch"
+	"${FILESDIR}/${PV}/${P}-respect-compiler-flags.patch"
+	"${FILESDIR}/${PV}/${P}-support-system-gtest.patch"
+)
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11; then
+		die "Your compiler lacks C++11 support. Use GCC>=4.7.0 or Clang>=3.3."
+	fi
+}
+
+src_prepare() {
+	default_src_prepare
+
+	# Remove tests that require unavailable uuid Lua module.
+	rm automation/tests/modules/lfs.moon || die
+
+	remove_locale() {
+		rm "po/${1}.po" || die
+	}
+
+	l10n_find_plocales_changes 'po' '' '.po'
+	l10n_for_each_disabled_locale_do remove_locale
+
+	# See http://devel.aegisub.org/ticket/1914
+	config_rpath_update "${S}"/config.rpath
+
+	eautoreconf
+
+	cat <<- EOF > build/git_version.h || die
+		#define BUILD_GIT_VERSION_NUMBER 8897
+		#define BUILD_GIT_VERSION_STRING "${PV}"
+		#define TAGGED_RELEASE 0
+	EOF
+}
+
+src_configure() {
+	# Prevent access violations from OpenAL detection. See Gentoo bug 508184.
+	use openal && export agi_cv_with_openal="yes"
+
+	local myeconfargs=(
+		--disable-update-checker
+		--with-ffms2
+		--with-system-luajit
+		$(use_enable debug)
+		$(use_with alsa)
+		$(use_with fftw fftw3)
+		$(use_with openal)
+		$(use_with oss)
+		$(use_with portaudio)
+		$(use_with pulseaudio libpulse)
+		$(use_with spell hunspell)
+		$(use_with uchardet)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	emake WITH_SYSTEM_GTEST=$(usex test)
+}
+
+src_test() {
+	emake test-automation
+	emake test-libaegisub
+}
+
+pkg_preinst() {
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	fdo-mime_desktop_database_update
+	gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+	fdo-mime_desktop_database_update
+	gnome2_icon_cache_update
+}

diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-system-luajit-build.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-system-luajit-build.patch
new file mode 100644
index 0000000..42b57e5
--- /dev/null
+++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-system-luajit-build.patch
@@ -0,0 +1,121 @@
+See http://devel.aegisub.org/ticket/1904
+and http://devel.aegisub.org/ticket/1913
+and http://devel.aegisub.org/ticket/1922
+
+diff --git a/Makefile.inc.in b/Makefile.inc.in
+index d8b3f4a..52e4cf6 100644
+--- a/Makefile.inc.in
++++ b/Makefile.inc.in
+@@ -9,6 +9,7 @@ HAVE_OPENAL     = @with_openal@
+ HAVE_OSS        = @with_oss@
+ HAVE_PORTAUDIO  = @with_portaudio@
+ HAVE_UCHARDET   = @with_uchardet@
++SYSTEM_LUAJIT   = @with_system_luajit@
+
+ ##############
+ # BUILD OUTPUT
+diff --git a/automation/Makefile b/automation/Makefile
+index 5483dbd..1231aab 100644
+--- a/automation/Makefile
++++ b/automation/Makefile
+@@ -12,10 +12,16 @@ DATA_AUTOMATION_INSTALLED = $(addprefix $(DESTDIR)$(P_DATA)/automation/, $(DATA_
+ $(DESTDIR)$(P_DATA)/automation/%: $(d)%
+ 	$(MKDIR_INSTALL)
+
+-aegisub-lua_OBJ := $(d)tests/aegisub.o $(TOP)lib/libaegisub.a $(TOP)lib/libluabins.a $(LIBS_LUA)
++aegisub-lua_OBJ := $(d)tests/aegisub.o $(TOP)lib/libaegisub.a $(TOP)lib/libluabins.a
+ aegisub-lua_CPPFLAGS := $(CPPFLAGS_BOOST) $(CFLAGS_LUA) -I$(TOP)libaegisub/include -I$(TOP)src $(CXXFLAGS_WX)
+ aegisub-lua_LIBS := $(LIBS_WX) $(LIBS_BOOST) $(LIBS_ICU) $(LIBS_PTHREAD)
+
++ifeq (no, $(SYSTEM_LUAJIT))
++aegisub-lua_OBJ += $(LIBS_LUA)
++else
++aegisub-lua_LIBS += $(LIBS_LUA)
++endif
++
+ PROGRAM += $(d)aegisub-lua
+
+ test-automation: $(PROGRAM)
+diff --git a/configure.ac b/configure.ac
+index 1649efc..81b1413 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -429,13 +429,15 @@ AS_IF([test $with_system_luajit = no],
+       [AC_SUBST([LUAJIT_CFLAGS], ['-I$(TOP)vendor/luajit/include'])
+        AC_SUBST([LUAJIT_LIBS], ['$(TOP)vendor/luajit/src/libluajit.a'])])
+
++AC_SUBST(with_system_luajit)
++
+ # We also need a Lua binary to run part of the build system
+ # Which version doesn't matter as the scripts are portable between them
+-AC_CHECK_PROGS([LUA], [lua luajit lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1])
++AC_PATH_PROGS([LUA], [luajit lua lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1])
+
+ # If the user doesn't have an installed copy of Lua, just use the one built
+ # as part of building LuaJIT
+-AS_IF([test -z $LUA], [LUA="$srcdir/vendor/luajit/src/host/minilua"])
++AS_IF([test -z $LUA], [LUA='$(TOP)vendor/luajit/src/host/minilua'])
+
+ ######################################################
+ # Debugging support
+diff --git a/header.mk b/header.mk
+index 613b38f..a9ce1d7 100644
+--- a/header.mk
++++ b/header.mk
+@@ -13,7 +13,10 @@ subdirs := \
+ 	tests \
+ 	tools \
+ 	vendor/luabins \
+-	vendor/luajit
++
++ifeq (no, $(SYSTEM_LUAJIT))
++subdirs += vendor/luajit
++endif
+
+ subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs)))
+
+diff --git a/src/Makefile b/src/Makefile
+index 0ee6c84..1a6f015 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -6,7 +6,7 @@ src_CPPFLAGS := -I$(d) -I.. -I$(d)include -I$(TOP)libaegisub/include -I$(TOP)bui
+ 	$(CFLAGS_PTHREAD) $(CFLAGS_FFTW3) $(CFLAGS_ICU) $(CPPFLAGS_BOOST)
+ src_CXXFLAGS := $(CXXFLAGS_WX)
+ src_LIBS := $(LIBS_GL) $(LIBS_PTHREAD) $(LIBS_WX) $(LIBS_FREETYPE) \
+-	$(LIBS_LIBASS) $(LIBS_FONTCONFIG) $(LIBS_FFTW3)  $(LIBS_BOOST) $(LIBS_ICU)
++	$(LIBS_LIBASS) $(LIBS_FONTCONFIG) $(LIBS_FFTW3) $(LIBS_BOOST) $(LIBS_ICU)
+ src_PCH := $(d)agi_pre.h
+ src_INSTALLNAME := $(AEGISUB_COMMAND)
+
+@@ -111,11 +111,16 @@ src_OBJ := \
+ 	$(d)video_provider_yuv4mpeg.o \
+ 	$(d)video_slider.o \
+ 	$(d)visual_feature.o \
+-	$(LIBS_LUA) \
+ 	$(TOP)lib/libaegisub.a \
+ 	$(TOP)lib/libluabins.a \
+ 	$(TOP)lib/libresrc.a \
+
++ifeq (no, $(SYSTEM_LUAJIT))
++src_OBJ += $(LIBS_LUA)
++else
++src_LIBS += $(LIBS_LUA)
++endif
++
+ ifeq (yes, $(BUILD_DARWIN))
+ src_OBJ += $(d)font_file_lister_coretext.o
+ src_OBJ += $(subst .mm,.o,$(wildcard $(d)osx/*.mm))
+diff --git a/tools/Makefile b/tools/Makefile
+index de6166a..e3d108a 100644
+--- a/tools/Makefile
++++ b/tools/Makefile
+@@ -12,6 +12,8 @@ repack-thes-dict_CPPFLAGS := -I$(TOP) -I$(TOP)libaegisub/include $(CFLAGS_ICU)
+
+ PROGRAM += $(d)repack-thes-dict
+
+-$(TOP)tools/respack.lua: $(shell command -v "$(BIN_LUA)")
++ifeq (no, $(SYSTEM_LUAJIT))
++$(TOP)tools/respack.lua: $(BIN_LUA)
++endif
+
+ include $(TOP)Makefile.target

diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-respect-compiler-flags.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-respect-compiler-flags.patch
new file mode 100644
index 0000000..90e57f1
--- /dev/null
+++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-respect-compiler-flags.patch
@@ -0,0 +1,53 @@
+See http://devel.aegisub.org/ticket/1899
+and http://devel.aegisub.org/ticket/1900
+
+diff --git a/configure.ac b/configure.ac
+index 1649efc..2f4470b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -133,20 +133,17 @@ AS_IF([test x$build_darwin != xyes], [
+ AC_ARG_ENABLE(compiler-flags, AS_HELP_STRING([--disable-compiler-flags],[Disable *all* additional compiler flags. [no]]))
+
+ AS_IF([test x$enable_compiler_flags != xno], [
+-  CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter -std=gnu99 -pipe -g"
+-  CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -pipe -g"
++  CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter"
++  CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing"
++  AC_C_FLAG([-std=gnu99])
+   AC_CXX_FLAG([-std=c++11])
+-  AC_CXX_FLAG([-Wno-c++11-narrowing])
+   AC_C_FLAG([-Wno-unused-local-typedefs])
+   AC_CXX_FLAG([-Wno-unused-local-typedefs])
+
+   # -O* messes with debugging.
+   AS_IF([test x$enable_debug = xyes], [
+-    CFLAGS="$CFLAGS -O0"
+-    CXXFLAGS="$CXXFLAGS -O0"
+-  ], [
+-    CFLAGS="$CFLAGS -O3"
+-    CXXFLAGS="$CXXFLAGS -O3"
++    CFLAGS="$CFLAGS -O0 -g"
++    CXXFLAGS="$CXXFLAGS -O0 -g"
+   ])
+ ])
+
+diff --git a/src/Makefile b/src/Makefile
+index 0ee6c84..cad213b 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -188,14 +188,13 @@ endif
+ #####################
+ # SOURCE-LEVEL CFLAGS
+ #####################
+-$(d)MatroskaParser.o_FLAGS              := -Wno-sometimes-uninitialized
+ $(d)audio_player.o_FLAGS                := $(CFLAGS_ALSA) $(CFLAGS_PORTAUDIO) $(CFLAGS_LIBPULSE) $(CFLAGS_OPENAL)
+ $(d)audio_provider_factory.o_FLAGS      := $(CFLAGS_FFMS2)
+ $(d)auto4_base.o_FLAGS                  := $(CFLAGS_FREETYPE)
+ $(d)charset_detect.o_FLAGS              := -D_X86_
+ $(d)font_file_lister_fontconfig.o_FLAGS := $(CFLAGS_FONTCONFIG)
+ $(d)subtitles_provider.o_FLAGS          := $(CFLAGS_LIBASS)
+-$(d)subtitles_provider_libass.o_FLAGS   := $(CFLAGS_LIBASS) -Wno-c++11-narrowing
++$(d)subtitles_provider_libass.o_FLAGS   := $(CFLAGS_LIBASS)
+ $(d)text_file_reader.o_FLAGS            := -D_X86_
+ $(d)video_provider_manager.o_FLAGS      := $(CFLAGS_FFMS2)
+ $(d)auto4_lua.o_FLAGS                   := $(CFLAGS_LUA)

diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-support-system-gtest.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-support-system-gtest.patch
new file mode 100644
index 0000000..8209ac5
--- /dev/null
+++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-support-system-gtest.patch
@@ -0,0 +1,75 @@
+commit 83f868ea8decbbe97891631fe142e84c883ee33d
+Author: Ilya Tumaykin <itumaykin@gmail.com>
+Date:   Wed Jun 1 20:00:37 2016 +0300
+
+Allow to build and run tests with a system copy of gtest (googletest)
+
+Also add LIBS_UCHARDET to the mix only when uchardet is requested.
+
+Closes #1923
+
+Bug: http://devel.aegisub.org/ticket/1923
+---
+
+diff --git a/tests/Makefile b/tests/Makefile
+index 8c30c1d..c5bf049 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -1,24 +1,45 @@
+ include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
+
++WITH_SYSTEM_GTEST ?= no
++
++ifeq (no, $(WITH_SYSTEM_GTEST))
+ GTEST_ROOT ?= $(TOP)vendor/googletest
+ GTEST_FILE := ${GTEST_ROOT}/src/gtest-all
++GTEST_CPPFLAGS := -I$(GTEST_ROOT) -I$(GTEST_ROOT)/include
++GTEST_CXXFLAGS := $(CFLAGS_PTHREAD)
++GTEST_LIBS := $(LIBS_PTHREAD)
++else
++GTEST_CPPFLAGS := $(shell gtest-config --cppflags)
++GTEST_CXXFLAGS := $(shell gtest-config --cxxflags)
++GTEST_LIBS := $(shell gtest-config --libs)
++endif
+
+ run_PCH := $(d)support/tests_pre.h
+ run_CPPFLAGS := -I$(TOP)libaegisub/include -I$(TOP) -I$(d)support \
+-	-I$(GTEST_ROOT) -I$(GTEST_ROOT)/include $(CPPFLAGS_BOOST) $(CFLAGS_LUA)
+-run_CXXFLAGS := -Wno-unused-value -Wno-sign-compare
+-run_LIBS := $(LIBS_BOOST) $(LIBS_ICU) $(LIBS_UCHARDET) $(LIBS_PTHREAD)
++	$(CPPFLAGS_BOOST) $(CFLAGS_ICU) $(CFLAGS_LUA) $(GTEST_CPPFLAGS)
++run_CXXFLAGS := -Wno-unused-value -Wno-sign-compare $(GTEST_CXXFLAGS)
++run_LIBS := $(LIBS_BOOST) $(LIBS_ICU) $(GTEST_LIBS)
+ run_OBJ := \
+ 	$(subst .cpp,.o,$(wildcard $(d)tests/*.cpp)) \
+ 	$(d)support/main.o \
+ 	$(d)support/util.o \
+-	$(TOP)lib/libaegisub.a \
+-	$(GTEST_FILE).o
++	$(TOP)lib/libaegisub.a
+
++ifeq (yes, $(HAVE_UCHARDET))
++run_LIBS += $(LIBS_UCHARDET)
++endif
++
++ifeq (no, $(WITH_SYSTEM_GTEST))
++run_OBJ += $(GTEST_FILE).o
+ # This bit of goofiness is to make it only try to build the tests if google
+ # test can be found and silently skip it if not, by using $(wildcard) to check
+ # for file existence
+ PROGRAM += $(subst $(GTEST_FILE).cc,$(d)run,$(wildcard $(GTEST_FILE).cc))
++test: $(subst $(GTEST_FILE).cc,test-libaegisub,$(wildcard $(GTEST_FILE).cc))
++else
++PROGRAM += $(d)run
++test: test-libaegisub
++endif
+
+ ifeq (yes, $(BUILD_DARWIN))
+ run_LIBS += -framework ApplicationServices -framework Foundation
+@@ -31,6 +52,4 @@ gtest_filter ?= *
+ test-libaegisub: $(d)run $(d)data
+ 	cd $(TOP)tests; ./run --gtest_filter="$(gtest_filter)"
+
+-test: $(subst $(GTEST_FILE).cc,test-libaegisub,$(wildcard $(GTEST_FILE).cc))
+-
+ include $(TOP)Makefile.target


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/
@ 2018-09-19  1:02 Nick Sarnie
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Sarnie @ 2018-09-19  1:02 UTC (permalink / raw
  To: gentoo-commits

commit:     56b064a177b418c5ebbe4238fac125664311f187
Author:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 19 00:59:33 2018 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Wed Sep 19 00:59:33 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56b064a1

media-video/aegisub: Fix build against ICU 62

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 .../aegisub/aegisub-3.2.2_p20160518-r2.ebuild      |  4 +-
 .../aegisub-3.2.2_p20160518-fix-icu62-build.patch  | 59 ++++++++++++++++++++++
 2 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild
index 34d509212ba..d5b623eb234 100644
--- a/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild
+++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -59,6 +59,8 @@ PATCHES=(
 	"${FILESDIR}/${PV}/${P}-respect-compiler-flags.patch"
 	"${FILESDIR}/${PV}/${P}-support-system-gtest.patch"
 	"${FILESDIR}/${PV}/${P}-fix-icu59-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-icu62-build.patch"
+
 )
 
 aegisub_check_compiler() {

diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-icu62-build.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-icu62-build.patch
new file mode 100644
index 00000000000..47508951e45
--- /dev/null
+++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-icu62-build.patch
@@ -0,0 +1,59 @@
+From d4461f65be5aa440506bd23e90e71aaf8f0ebada Mon Sep 17 00:00:00 2001
+From: sidneys <sidneys.github.io@outlook.com>
+Date: Sat, 31 Mar 2018 02:57:19 +0200
+Subject: [PATCH] fix(updated-macos-build): prefix icu method calls
+ (icu::BreakIterator, icu::Locale, icu::UnicodeString)
+
+---
+ libaegisub/common/character_count.cpp | 6 +++---
+ src/utils.cpp                         | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/libaegisub/common/character_count.cpp b/libaegisub/common/character_count.cpp
+index 0b8c70b31..1276f74fb 100644
+--- a/libaegisub/common/character_count.cpp
++++ b/libaegisub/common/character_count.cpp
+@@ -36,7 +36,7 @@ icu::BreakIterator& get_break_iterator(const char *ptr, size_t len) {
+ 	static std::once_flag token;
+ 	std::call_once(token, [&] {
+ 		UErrorCode status = U_ZERO_ERROR;
+-		bi.reset(BreakIterator::createCharacterInstance(Locale::getDefault(), status));
++		bi.reset(icu::BreakIterator::createCharacterInstance(icu::Locale::getDefault(), status));
+ 		if (U_FAILURE(status)) throw agi::InternalError("Failed to create character iterator");
+ 	});
+ 
+@@ -58,7 +58,7 @@ size_t count_in_range(Iterator begin, Iterator end, int mask) {
+ 
+ 	size_t count = 0;
+ 	auto pos = character_bi.first();
+-	for (auto end = character_bi.next(); end != BreakIterator::DONE; pos = end, end = character_bi.next()) {
++	for (auto end = character_bi.next(); end != icu::BreakIterator::DONE; pos = end, end = character_bi.next()) {
+ 		if (!mask)
+ 			++count;
+ 		else {
+@@ -143,7 +143,7 @@ size_t IndexOfCharacter(std::string const& str, size_t n) {
+ 	auto& bi = get_break_iterator(&str[0], str.size());
+ 
+ 	for (auto pos = bi.first(), end = bi.next(); ; --n, pos = end, end = bi.next()) {
+-		if (end == BreakIterator::DONE)
++		if (end == icu::BreakIterator::DONE)
+ 			return str.size();
+ 		if (n == 0)
+ 			return pos;
+diff --git a/src/utils.cpp b/src/utils.cpp
+index 876c4c011..2416aa7a2 100644
+--- a/src/utils.cpp
++++ b/src/utils.cpp
+@@ -270,9 +270,9 @@ agi::fs::path SaveFileSelector(wxString const& message, std::string const& optio
+ }
+ 
+ wxString LocalizedLanguageName(wxString const& lang) {
+-	Locale iculoc(lang.c_str());
++	icu::Locale iculoc(lang.c_str());
+ 	if (!iculoc.isBogus()) {
+-		UnicodeString ustr;
++		icu::UnicodeString ustr;
+ 		iculoc.getDisplayName(iculoc, ustr);
+ #ifdef _MSC_VER
+ 		return wxString(ustr.getBuffer());
+


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/
@ 2019-06-09 19:36 Nick Sarnie
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Sarnie @ 2019-06-09 19:36 UTC (permalink / raw
  To: gentoo-commits

commit:     9e3ec79f3e89bc1a83dd03bc95cf2f6f5361105a
Author:     Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Sun Jun  9 17:23:47 2019 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Sun Jun  9 19:36:04 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e3ec79f

media-video/aegisub: Enable testing with >=dev-cpp/gtest-1.8.1

Updates the gtest dependency. Tests build, run, and pass without issue.

Closes: https://github.com/gentoo/gentoo/pull/12230

Package-Manager: Portage-2.3.67, Repoman-2.3.13
Signed-off-by: Peter Levine <plevine457 <AT> gmail.com>
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild             | 4 ++--
 .../aegisub-3.2.2_p20160518-support-system-gtest.patch            | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild
index d5b623eb234..bef93fffa85 100644
--- a/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild
+++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -46,7 +46,7 @@ DEPEND="${RDEPEND}
 	sys-devel/gettext
 	virtual/pkgconfig
 	test? (
-		~dev-cpp/gtest-1.7.0
+		>=dev-cpp/gtest-1.8.1
 		dev-lua/busted
 		dev-lua/luarocks
 	)

diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-support-system-gtest.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-support-system-gtest.patch
index 8209ac5ec7c..7e3fac2acd8 100644
--- a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-support-system-gtest.patch
+++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-support-system-gtest.patch
@@ -24,13 +24,13 @@ index 8c30c1d..c5bf049 100644
  GTEST_ROOT ?= $(TOP)vendor/googletest
  GTEST_FILE := ${GTEST_ROOT}/src/gtest-all
 +GTEST_CPPFLAGS := -I$(GTEST_ROOT) -I$(GTEST_ROOT)/include
-+GTEST_CXXFLAGS := $(CFLAGS_PTHREAD)
 +GTEST_LIBS := $(LIBS_PTHREAD)
 +else
-+GTEST_CPPFLAGS := $(shell gtest-config --cppflags)
-+GTEST_CXXFLAGS := $(shell gtest-config --cxxflags)
-+GTEST_LIBS := $(shell gtest-config --libs)
++GTEST_CPPFLAGS := $(shell pkg-config --cflags-only-I gtest)
++GTEST_LIBS := $(shell pkg-config --libs gtest)
 +endif
++
++GTEST_CXXFLAGS := $(CFLAGS_PTHREAD)
 
  run_PCH := $(d)support/tests_pre.h
  run_CPPFLAGS := -I$(TOP)libaegisub/include -I$(TOP) -I$(d)support \


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/
@ 2019-07-12  1:43 Nick Sarnie
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Sarnie @ 2019-07-12  1:43 UTC (permalink / raw
  To: gentoo-commits

commit:     01c90376343b3883da48f42accbbf0a6de4193e2
Author:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 12 01:36:13 2019 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Fri Jul 12 01:43:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01c90376

media-video/aegisub: Fix build against boost 1.70.0

Patch from: Damien Thébault <damien.thebault <AT> gmail.com>

Fixes: https://bugs.gentoo.org/689196

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 ...99.ebuild => aegisub-3.2.2_p20160518-r3.ebuild} | 47 +++++++++++++----
 media-video/aegisub/aegisub-9999.ebuild            |  1 +
 ...egisub-3.2.2_p20160518-fix-boost170-build.patch | 61 ++++++++++++++++++++++
 3 files changed, 99 insertions(+), 10 deletions(-)

diff --git a/media-video/aegisub/aegisub-9999.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r3.ebuild
similarity index 67%
copy from media-video/aegisub/aegisub-9999.ebuild
copy to media-video/aegisub/aegisub-3.2.2_p20160518-r3.ebuild
index fcbfb2a2dc8..69d4b3f6f5e 100644
--- a/media-video/aegisub/aegisub-9999.ebuild
+++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r3.ebuild
@@ -5,20 +5,18 @@ EAPI=6
 
 WX_GTK_VER=3.0
 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"
+COMMIT_ID="b118fe7e7a5c37540e2f0aa75af105e272bad234"
 
-inherit autotools gnome2-utils l10n wxwidgets xdg-utils git-r3
+inherit autotools flag-o-matic gnome2-utils l10n wxwidgets xdg-utils vcs-snapshot
 
 DESCRIPTION="Advanced subtitle editor"
 HOMEPAGE="http://www.aegisub.org/ https://github.com/Aegisub/Aegisub"
-EGIT_REPO_URI="https://github.com/${PN^}/${PN^}.git"
-# Submodules are used to pull bundled libraries.
-EGIT_SUBMODULES=()
+SRC_URI="https://github.com/Aegisub/Aegisub/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
 
 LICENSE="BSD MIT"
 SLOT="0"
-KEYWORDS=""
-IUSE="+alsa debug +fftw openal oss portaudio pulseaudio spell +uchardet"
-RESTRICT="test"
+KEYWORDS="~amd64 ~x86"
+IUSE="+alsa debug +fftw openal oss portaudio pulseaudio spell test +uchardet"
 
 # aegisub bundles luabins (https://github.com/agladysh/luabins).
 # Unfortunately, luabins upstream is practically dead since 2010.
@@ -47,15 +45,38 @@ DEPEND="${RDEPEND}
 	dev-util/intltool
 	sys-devel/gettext
 	virtual/pkgconfig
+	test? (
+		>=dev-cpp/gtest-1.8.1
+		dev-lua/busted
+		dev-lua/luarocks
+	)
 "
 
 REQUIRED_USE="|| ( alsa openal oss portaudio pulseaudio )"
 
 PATCHES=(
-	"${FILESDIR}/3.2.2_p20160518/${PN}-3.2.2_p20160518-fix-system-luajit-build.patch"
-	"${FILESDIR}/3.2.2_p20160518/${PN}-3.2.2_p20160518-respect-compiler-flags.patch"
+	"${FILESDIR}/${PV}/${P}-fix-system-luajit-build.patch"
+	"${FILESDIR}/${PV}/${P}-respect-compiler-flags.patch"
+	"${FILESDIR}/${PV}/${P}-support-system-gtest.patch"
+	"${FILESDIR}/${PV}/${P}-fix-icu59-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-icu62-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-boost170-build.patch"
 )
 
+aegisub_check_compiler() {
+	if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11; then
+		die "Your compiler lacks C++11 support. Use GCC>=4.7.0 or Clang>=3.3."
+	fi
+}
+
+pkg_pretend() {
+	aegisub_check_compiler
+}
+
+pkg_setup() {
+	aegisub_check_compiler
+}
+
 src_prepare() {
 	default_src_prepare
 
@@ -73,6 +94,12 @@ src_prepare() {
 	config_rpath_update "${S}"/config.rpath
 
 	eautoreconf
+
+	cat <<- EOF > build/git_version.h || die
+		#define BUILD_GIT_VERSION_NUMBER 8897
+		#define BUILD_GIT_VERSION_STRING "${PV}"
+		#define TAGGED_RELEASE 0
+	EOF
 }
 
 src_configure() {
@@ -98,7 +125,7 @@ src_configure() {
 }
 
 src_compile() {
-	emake
+	emake WITH_SYSTEM_GTEST=$(usex test)
 }
 
 src_test() {

diff --git a/media-video/aegisub/aegisub-9999.ebuild b/media-video/aegisub/aegisub-9999.ebuild
index fcbfb2a2dc8..7377cdca67a 100644
--- a/media-video/aegisub/aegisub-9999.ebuild
+++ b/media-video/aegisub/aegisub-9999.ebuild
@@ -54,6 +54,7 @@ REQUIRED_USE="|| ( alsa openal oss portaudio pulseaudio )"
 PATCHES=(
 	"${FILESDIR}/3.2.2_p20160518/${PN}-3.2.2_p20160518-fix-system-luajit-build.patch"
 	"${FILESDIR}/3.2.2_p20160518/${PN}-3.2.2_p20160518-respect-compiler-flags.patch"
+        "${FILESDIR}/3.2.2_p20160518/${PN}-3.2.2_p20160518-fix-boost170-build.patch"
 )
 
 src_prepare() {

diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-boost170-build.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-boost170-build.patch
new file mode 100644
index 00000000000..30473e4828d
--- /dev/null
+++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-boost170-build.patch
@@ -0,0 +1,61 @@
+diff a/src/colour_button.cpp b/src/colour_button.cpp
+--- a/src/colour_button.cpp
++++ b/src/colour_button.cpp
+@@ -18,7 +18,11 @@
+ 
+ #include "dialogs.h"
+ 
++#if BOOST_VERSION >= 106900
++#include <boost/gil.hpp>
++#else
+ #include <boost/gil/gil_all.hpp>
++#endif
+ 
+ AGI_DEFINE_EVENT(EVT_COLOR, agi::Color);
+ 
+diff a/src/subtitles_provider_libass.cpp b/src/subtitles_provider_libass.cpp
+--- a/src/subtitles_provider_libass.cpp
++++ b/src/subtitles_provider_libass.cpp
+@@ -46,7 +46,11 @@
+ #include <libaegisub/util.h>
+ 
+ #include <atomic>
++#if BOOST_VERSION >= 106900
++#include <boost/gil.hpp>
++#else
+ #include <boost/gil/gil_all.hpp>
++#endif
+ #include <memory>
+ #include <mutex>
+ 
+diff a/src/video_frame.cpp b/src/video_frame.cpp
+--- a/src/video_frame.cpp
++++ b/src/video_frame.cpp
+@@ -16,7 +16,11 @@
+ 
+ #include "video_frame.h"
+ 
++#if BOOST_VERSION >= 106900
++#include <boost/gil.hpp>
++#else
+ #include <boost/gil/gil_all.hpp>
++#endif
+ #include <wx/image.h>
+ 
+ namespace {
+diff a/src/video_provider_dummy.cpp b/src/video_provider_dummy.cpp
+--- a/src/video_provider_dummy.cpp
++++ b/src/video_provider_dummy.cpp
+@@ -45,7 +45,11 @@
+ #include <boost/algorithm/string/predicate.hpp>
+ #include <boost/filesystem/path.hpp>
+ #include <libaegisub/format.h>
++#if BOOST_VERSION >= 106900
++#include <boost/gil.hpp>
++#else
+ #include <boost/gil/gil_all.hpp>
++#endif
+ 
+ DummyVideoProvider::DummyVideoProvider(double fps, int frames, int width, int height, agi::Color colour, bool pattern)
+ : framecount(frames)
+


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/
@ 2020-03-23 22:24 Nick Sarnie
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Sarnie @ 2020-03-23 22:24 UTC (permalink / raw
  To: gentoo-commits

commit:     c017bfe2f324f573dd2e604f75bb6899585489fe
Author:     Christophe Lermytte <gentoo <AT> lermytte <DOT> be>
AuthorDate: Sat Mar 21 18:51:14 2020 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Mon Mar 23 22:23:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c017bfe2

media-video/aegisub: revbump for patching Makefile to work with make-4.3

upstream pull reqeust: https://github.com/Aegisub/Aegisub/pull/174

Package-Manager: Portage-2.3.94, Repoman-2.3.21
Bug: https://bugs.gentoo.org/713120
X-Thanks: Petr Zima <zima <AT> matfyz.cz>
Signed-off-by: Christophe Lermytte <gentoo <AT> lermytte.be>
Closes: https://github.com/gentoo/gentoo/pull/15045
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 .../aegisub/aegisub-3.2.2_p20160518-r4.ebuild      | 150 +++++++++++++++++++++
 ...-3.2.2_p20160518-fix-makefile-for-make4.3.patch |  21 +++
 2 files changed, 171 insertions(+)

diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518-r4.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r4.ebuild
new file mode 100644
index 00000000000..9707aa452f8
--- /dev/null
+++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r4.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+WX_GTK_VER=3.0
+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"
+COMMIT_ID="b118fe7e7a5c37540e2f0aa75af105e272bad234"
+
+inherit autotools flag-o-matic gnome2-utils l10n wxwidgets xdg-utils vcs-snapshot
+
+DESCRIPTION="Advanced subtitle editor"
+HOMEPAGE="http://www.aegisub.org/ https://github.com/Aegisub/Aegisub"
+SRC_URI="https://github.com/Aegisub/Aegisub/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+alsa debug +fftw openal oss portaudio pulseaudio spell test +uchardet"
+RESTRICT="!test? ( test )"
+
+# aegisub bundles luabins (https://github.com/agladysh/luabins).
+# Unfortunately, luabins upstream is practically dead since 2010.
+# Thus unbundling luabins isn't worth the effort.
+RDEPEND="
+	x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,debug?]
+	dev-lang/luajit:2[lua52compat]
+	dev-libs/boost:=[icu,nls,threads]
+	dev-libs/icu:=
+	media-libs/ffmpegsource:=
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/libass:=[fontconfig]
+	sys-libs/zlib
+	virtual/libiconv
+	virtual/opengl
+	alsa? ( media-libs/alsa-lib )
+	fftw? ( >=sci-libs/fftw-3.3:= )
+	openal? ( media-libs/openal )
+	portaudio? ( =media-libs/portaudio-19* )
+	pulseaudio? ( media-sound/pulseaudio )
+	spell? ( app-text/hunspell:= )
+	uchardet? ( app-i18n/uchardet )
+"
+DEPEND="${RDEPEND}
+	dev-util/intltool
+	sys-devel/gettext
+	virtual/pkgconfig
+	test? (
+		>=dev-cpp/gtest-1.8.1
+		dev-lua/busted
+		dev-lua/luarocks
+	)
+"
+
+REQUIRED_USE="|| ( alsa openal oss portaudio pulseaudio )"
+
+PATCHES=(
+	"${FILESDIR}/${PV}/${P}-fix-system-luajit-build.patch"
+	"${FILESDIR}/${PV}/${P}-respect-compiler-flags.patch"
+	"${FILESDIR}/${PV}/${P}-support-system-gtest.patch"
+	"${FILESDIR}/${PV}/${P}-fix-icu59-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-icu62-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-boost170-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-makefile-for-make4.3.patch"
+)
+
+aegisub_check_compiler() {
+	if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11; then
+		die "Your compiler lacks C++11 support. Use GCC>=4.7.0 or Clang>=3.3."
+	fi
+}
+
+pkg_pretend() {
+	aegisub_check_compiler
+}
+
+pkg_setup() {
+	aegisub_check_compiler
+}
+
+src_prepare() {
+	default_src_prepare
+
+	# Remove tests that require unavailable uuid Lua module.
+	rm automation/tests/modules/lfs.moon || die
+
+	remove_locale() {
+		rm "po/${1}.po" || die
+	}
+
+	l10n_find_plocales_changes 'po' '' '.po'
+	l10n_for_each_disabled_locale_do remove_locale
+
+	# See http://devel.aegisub.org/ticket/1914
+	config_rpath_update "${S}"/config.rpath
+
+	eautoreconf
+
+	cat <<- EOF > build/git_version.h || die
+		#define BUILD_GIT_VERSION_NUMBER 8897
+		#define BUILD_GIT_VERSION_STRING "${PV}"
+		#define TAGGED_RELEASE 0
+	EOF
+}
+
+src_configure() {
+	# Prevent access violations from OpenAL detection. See Gentoo bug 508184.
+	use openal && export agi_cv_with_openal="yes"
+
+	setup-wxwidgets
+	local myeconfargs=(
+		--disable-update-checker
+		--with-ffms2
+		--with-system-luajit
+		$(use_enable debug)
+		$(use_with alsa)
+		$(use_with fftw fftw3)
+		$(use_with openal)
+		$(use_with oss)
+		$(use_with portaudio)
+		$(use_with pulseaudio libpulse)
+		$(use_with spell hunspell)
+		$(use_with uchardet)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	emake WITH_SYSTEM_GTEST=$(usex test)
+}
+
+src_test() {
+	emake test-automation
+	emake test-libaegisub
+}
+
+pkg_preinst() {
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	gnome2_icon_cache_update
+	xdg_desktop_database_update
+}
+
+pkg_postrm() {
+	gnome2_icon_cache_update
+	xdg_desktop_database_update
+}

diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-makefile-for-make4.3.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-makefile-for-make4.3.patch
new file mode 100644
index 00000000000..8f94c5a10d5
--- /dev/null
+++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-makefile-for-make4.3.patch
@@ -0,0 +1,21 @@
+commit f4cc905c69ca69c68cb95674cefce4abc37ce046
+Author: wangqr <wangqr@wangqr.tk>
+Date:   Mon Feb 17 14:42:07 2020 +0800
+
+    Use target name without directory in $*_OBJ macro
+    
+    Fix Aegisub/Aegisub#171
+
+diff --git a/Makefile.target b/Makefile.target
+index 516ef3c24..5c4c5d259 100644
+--- a/Makefile.target
++++ b/Makefile.target
+@@ -112,7 +112,7 @@ POST_FLAGS = $($@_FLAGS) -c -o $@ $<
+ # Libraries contain all object files they depend on (but they may depend on other files)
+ # Not using libtool on OS X because it has an unsilenceable warning about a
+ # compatibility issue with BSD 4.3 (wtf)
+-lib%.a: $$($$*_OBJ)
++lib%.a: $$($$(*F)_OBJ)
+ 	@$(BIN_MKDIR_P) $(dir $@)
+ 	$(BIN_AR) cru $@ $(filter %.o,$^)
+ 	$(BIN_RANLIB) $@


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/
@ 2021-01-11  0:24 Nick Sarnie
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Sarnie @ 2021-01-11  0:24 UTC (permalink / raw
  To: gentoo-commits

commit:     816dd08c61d368ee4f3e82a3bccde83a86bf9de6
Author:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 11 00:22:15 2021 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Mon Jan 11 00:23:43 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=816dd08c

media-video/aegisub: Fix build with dash

Closes: https://bugs.gentoo.org/764881
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 .../aegisub/aegisub-3.2.2_p20160518-r101.ebuild    | 158 +++++++++++++++++++++
 ...g-positional-parameters-to-source-builtin.patch |  47 ++++++
 2 files changed, 205 insertions(+)

diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518-r101.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r101.ebuild
new file mode 100644
index 00000000000..4f54947828c
--- /dev/null
+++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r101.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( luajit )
+LUA_REQ_USE="lua52compat"
+
+WX_GTK_VER=3.0
+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"
+COMMIT_ID="b118fe7e7a5c37540e2f0aa75af105e272bad234"
+
+inherit autotools flag-o-matic l10n lua-single wxwidgets xdg-utils vcs-snapshot
+
+DESCRIPTION="Advanced subtitle editor"
+HOMEPAGE="http://www.aegisub.org/ https://github.com/Aegisub/Aegisub"
+SRC_URI="https://github.com/Aegisub/Aegisub/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+alsa debug +fftw openal oss portaudio pulseaudio spell test +uchardet"
+RESTRICT="!test? ( test )"
+
+# aegisub bundles luabins (https://github.com/agladysh/luabins).
+# Unfortunately, luabins upstream is practically dead since 2010.
+# Thus unbundling luabins isn't worth the effort.
+RDEPEND="${LUA_DEPS}
+	x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,debug?]
+	dev-libs/boost:=[icu,nls,threads]
+	dev-libs/icu:=
+	media-libs/ffmpegsource:=
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/libass:=[fontconfig]
+	sys-libs/zlib
+	virtual/libiconv
+	virtual/opengl
+	alsa? ( media-libs/alsa-lib )
+	fftw? ( >=sci-libs/fftw-3.3:= )
+	openal? ( media-libs/openal )
+	portaudio? ( =media-libs/portaudio-19* )
+	pulseaudio? ( media-sound/pulseaudio )
+	spell? ( app-text/hunspell:= )
+	uchardet? ( app-i18n/uchardet )
+"
+DEPEND="${RDEPEND}"
+# luarocks is only used as a command-line tool so there is no need to enforce
+# LUA_SINGLE_USEDEP on it. On the other hand, this means we must use version
+# bounds in order to make sure we use a version migrated to Lua eclasses.
+BDEPEND="dev-util/intltool
+	sys-devel/gettext
+	virtual/pkgconfig
+	test? (
+		${RDEPEND}
+		>=dev-cpp/gtest-1.8.1
+		>=dev-lua/luarocks-3.4.0-r100
+		$(lua_gen_cond_dep '
+			dev-lua/busted[${LUA_USEDEP}]
+		')
+	)
+"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}
+	|| ( alsa openal oss portaudio pulseaudio )"
+
+PATCHES=(
+	"${FILESDIR}/${PV}/${P}-fix-system-luajit-build.patch"
+	"${FILESDIR}/${PV}/${P}-respect-compiler-flags.patch"
+	"${FILESDIR}/${PV}/${P}-support-system-gtest.patch"
+	"${FILESDIR}/${PV}/${P}-fix-icu59-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-icu62-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-boost170-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-makefile-for-make4.3.patch"
+	"${FILESDIR}/${PV}/${P}-tests_luarocks_lua_version.patch"
+	"${FILESDIR}/${PV}/${P}-avoid-conveying-positional-parameters-to-source-builtin.patch"
+)
+
+aegisub_check_compiler() {
+	if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11; then
+		die "Your compiler lacks C++11 support. Use GCC>=4.7.0 or Clang>=3.3."
+	fi
+}
+
+pkg_pretend() {
+	aegisub_check_compiler
+}
+
+pkg_setup() {
+	aegisub_check_compiler
+	lua-single_pkg_setup
+}
+
+src_prepare() {
+	default_src_prepare
+
+	# Remove tests that require unavailable uuid Lua module.
+	rm automation/tests/modules/lfs.moon || die
+
+	remove_locale() {
+		rm "po/${1}.po" || die
+	}
+
+	l10n_find_plocales_changes 'po' '' '.po'
+	l10n_for_each_disabled_locale_do remove_locale
+
+	# See http://devel.aegisub.org/ticket/1914
+	config_rpath_update "${S}"/config.rpath
+
+	eautoreconf
+
+	cat <<- EOF > build/git_version.h || die
+		#define BUILD_GIT_VERSION_NUMBER 8897
+		#define BUILD_GIT_VERSION_STRING "${PV}"
+		#define TAGGED_RELEASE 0
+	EOF
+}
+
+src_configure() {
+	# Prevent access violations from OpenAL detection. See Gentoo bug 508184.
+	use openal && export agi_cv_with_openal="yes"
+
+	setup-wxwidgets
+	local myeconfargs=(
+		--disable-update-checker
+		--with-ffms2
+		--with-system-luajit
+		$(use_enable debug)
+		$(use_with alsa)
+		$(use_with fftw fftw3)
+		$(use_with openal)
+		$(use_with oss)
+		$(use_with portaudio)
+		$(use_with pulseaudio libpulse)
+		$(use_with spell hunspell)
+		$(use_with uchardet)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	emake WITH_SYSTEM_GTEST=$(usex test)
+}
+
+src_test() {
+	emake test-automation
+	emake test-libaegisub
+}
+
+pkg_postinst() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}
+
+pkg_postrm() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}

diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-avoid-conveying-positional-parameters-to-source-builtin.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-avoid-conveying-positional-parameters-to-source-builtin.patch
new file mode 100644
index 00000000000..bc0a669fda6
--- /dev/null
+++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-avoid-conveying-positional-parameters-to-source-builtin.patch
@@ -0,0 +1,47 @@
+commit c663944bb4a9040e49811037fc3984d2d15764be
+Author: Kerin Millar <kfm@plushkava.net>
+Date:   Sun Jan 10 22:52:26 2021 +0000
+
+    Don't convey positional parameters to the . builtin
+    
+    To do so is a bashism; POSIX makes no provision for it. Fortunately, there
+    is no need to begin with. The srcdir variable is already defined at the
+    point that build/version.sh is sourced from the configure script and, thus,
+    does not need to be passed.
+    
+    As version.sh is only ever sourced, that would be a valid fix in and as of
+    itself. However, because version.sh has the executable bit set, there is an
+    implication that the original author may have intended for it to be so; for
+    testing purposes, perhaps. So as to continue to support this potential use
+    case, have the script retain the ability to assign the value of $1 to
+    srcdir, provided that srcdir is empty and provided that at least one
+    positional parameter was specified.
+    
+    Signed-off-by: Kerin Millar <kfm@plushkava.net>
+    Closes: https://bugs.gentoo.org/764881
+
+diff --git a/build/version.sh b/build/version.sh
+index 8cea0a3f3..614c74615 100755
+--- a/build/version.sh
++++ b/build/version.sh
+@@ -1,4 +1,6 @@
+-srcdir="$1"
++if [ -z "$srcdir" ] && [ $# -gt 0 ]; then
++  srcdir=$1
++fi
+ 
+ # If no git repo try to read from the existing git_version.h, for building from tarballs
+ if ! test -d "${srcdir}/.git"; then
+diff --git a/configure.ac b/configure.ac
+index 1d8c93067..d50541f40 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -117,7 +117,7 @@ PKG_PROG_PKG_CONFIG([pkgconfig_required_version])
+ # Developers only
+ #################
+ AC_MSG_CHECKING([for version])
+-. $srcdir/build/version.sh "$srcdir"
++. $srcdir/build/version.sh
+ AC_MSG_RESULT([$BUILD_GIT_VERSION_STRING $VERSION_SOURCE])
+ 
+ AC_MSG_CHECKING([for build date])


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/
@ 2022-03-05 14:32 Nick Sarnie
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Sarnie @ 2022-03-05 14:32 UTC (permalink / raw
  To: gentoo-commits

commit:     f943cce85e79f7cf011979d40a17444aa68e0450
Author:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  5 14:31:27 2022 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Sat Mar  5 14:31:27 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f943cce8

media-video/aegisub: Fix build

Closes: https://bugs.gentoo.org/834086
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 .../aegisub/aegisub-3.2.2_p20160518-r103.ebuild    | 159 +++++++++++++++++++++
 ...sub-3.2.2_p20160518-luaL_Reg-not-luaL_reg.patch |  35 +++++
 2 files changed, 194 insertions(+)

diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518-r103.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r103.ebuild
new file mode 100644
index 000000000000..0ac1ff04d08e
--- /dev/null
+++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r103.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( luajit )
+LUA_REQ_USE="lua52compat"
+
+WX_GTK_VER=3.0
+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"
+COMMIT_ID="b118fe7e7a5c37540e2f0aa75af105e272bad234"
+
+inherit autotools flag-o-matic lua-single plocale wxwidgets xdg-utils vcs-snapshot
+
+DESCRIPTION="Advanced subtitle editor"
+HOMEPAGE="http://www.aegisub.org/ https://github.com/Aegisub/Aegisub"
+SRC_URI="https://github.com/Aegisub/Aegisub/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+alsa debug +fftw openal oss portaudio pulseaudio spell test +uchardet"
+RESTRICT="!test? ( test )"
+
+# aegisub bundles luabins (https://github.com/agladysh/luabins).
+# Unfortunately, luabins upstream is practically dead since 2010.
+# Thus unbundling luabins isn't worth the effort.
+RDEPEND="${LUA_DEPS}
+	x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,debug?]
+	dev-libs/boost:=[icu,nls,threads(+)]
+	dev-libs/icu:=
+	media-libs/ffmpegsource:=
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/libass:=[fontconfig]
+	sys-libs/zlib
+	virtual/libiconv
+	virtual/opengl
+	alsa? ( media-libs/alsa-lib )
+	fftw? ( >=sci-libs/fftw-3.3:= )
+	openal? ( media-libs/openal )
+	portaudio? ( =media-libs/portaudio-19* )
+	pulseaudio? ( media-sound/pulseaudio )
+	spell? ( app-text/hunspell:= )
+	uchardet? ( app-i18n/uchardet )
+"
+DEPEND="${RDEPEND}"
+# luarocks is only used as a command-line tool so there is no need to enforce
+# LUA_SINGLE_USEDEP on it. On the other hand, this means we must use version
+# bounds in order to make sure we use a version migrated to Lua eclasses.
+BDEPEND="dev-util/intltool
+	sys-devel/gettext
+	virtual/pkgconfig
+	test? (
+		${RDEPEND}
+		>=dev-cpp/gtest-1.8.1
+		>=dev-lua/luarocks-3.4.0-r100
+		$(lua_gen_cond_dep '
+			dev-lua/busted[${LUA_USEDEP}]
+		')
+	)
+"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}
+	|| ( alsa openal oss portaudio pulseaudio )"
+
+PATCHES=(
+	"${FILESDIR}/${PV}/${P}-fix-system-luajit-build.patch"
+	"${FILESDIR}/${PV}/${P}-respect-compiler-flags.patch"
+	"${FILESDIR}/${PV}/${P}-support-system-gtest.patch"
+	"${FILESDIR}/${PV}/${P}-fix-icu59-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-icu62-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-boost170-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-makefile-for-make4.3.patch"
+	"${FILESDIR}/${PV}/${P}-tests_luarocks_lua_version.patch"
+	"${FILESDIR}/${PV}/${P}-avoid-conveying-positional-parameters-to-source-builtin.patch"
+	"${FILESDIR}/${PV}/${P}-luaL_Reg-not-luaL_reg.patch"
+)
+
+aegisub_check_compiler() {
+	if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11; then
+		die "Your compiler lacks C++11 support. Use GCC>=4.7.0 or Clang>=3.3."
+	fi
+}
+
+pkg_pretend() {
+	aegisub_check_compiler
+}
+
+pkg_setup() {
+	aegisub_check_compiler
+	lua-single_pkg_setup
+}
+
+src_prepare() {
+	default_src_prepare
+
+	# Remove tests that require unavailable uuid Lua module.
+	rm automation/tests/modules/lfs.moon || die
+
+	remove_locale() {
+		rm "po/${1}.po" || die
+	}
+
+	plocale_find_changes 'po' '' '.po'
+	plocale_for_each_disabled_locale remove_locale
+
+	# See http://devel.aegisub.org/ticket/1914
+	config_rpath_update "${S}"/config.rpath
+
+	eautoreconf
+
+	cat <<- EOF > build/git_version.h || die
+		#define BUILD_GIT_VERSION_NUMBER 8897
+		#define BUILD_GIT_VERSION_STRING "${PV}"
+		#define TAGGED_RELEASE 0
+	EOF
+}
+
+src_configure() {
+	# Prevent access violations from OpenAL detection. See Gentoo bug 508184.
+	use openal && export agi_cv_with_openal="yes"
+
+	setup-wxwidgets
+	local myeconfargs=(
+		--disable-update-checker
+		--with-ffms2
+		--with-system-luajit
+		$(use_enable debug)
+		$(use_with alsa)
+		$(use_with fftw fftw3)
+		$(use_with openal)
+		$(use_with oss)
+		$(use_with portaudio)
+		$(use_with pulseaudio libpulse)
+		$(use_with spell hunspell)
+		$(use_with uchardet)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	emake WITH_SYSTEM_GTEST=$(usex test)
+}
+
+src_test() {
+	emake test-automation
+	emake test-libaegisub
+}
+
+pkg_postinst() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}
+
+pkg_postrm() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}

diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-luaL_Reg-not-luaL_reg.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-luaL_Reg-not-luaL_reg.patch
new file mode 100644
index 000000000000..1704630ea53f
--- /dev/null
+++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-luaL_Reg-not-luaL_reg.patch
@@ -0,0 +1,35 @@
+diff --git a/libaegisub/lua/modules/lpeg.c b/libaegisub/lua/modules/lpeg.c
+index 8d67335ab..5261c2061 100644
+--- a/libaegisub/lua/modules/lpeg.c
++++ b/libaegisub/lua/modules/lpeg.c
+@@ -2334,7 +2334,7 @@ static int matchl (lua_State *L) {
+ }
+ 
+ 
+-static struct luaL_reg pattreg[] = {
++static struct luaL_Reg pattreg[] = {
+   {"match", matchl},
+   {"print", printpat_l},
+   {"locale", locale_l},
+@@ -2360,7 +2360,7 @@ static struct luaL_reg pattreg[] = {
+ };
+ 
+ 
+-static struct luaL_reg metapattreg[] = {
++static struct luaL_Reg metapattreg[] = {
+   {"__add", union_l},
+   {"__pow", star_l},
+   {"__sub", diff_l},
+diff --git a/vendor/luabins/src/luabins.c b/vendor/luabins/src/luabins.c
+index 60668213f..35b177629 100644
+--- a/vendor/luabins/src/luabins.c
++++ b/vendor/luabins/src/luabins.c
+@@ -54,7 +54,7 @@ static int l_load(lua_State * L)
+ }
+ 
+ /* luabins Lua module API */
+-static const struct luaL_reg R[] =
++static const struct luaL_Reg R[] =
+ {
+   { "save", l_save },
+   { "load", l_load },


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/
@ 2022-08-29  8:21 Joonas Niilola
  0 siblings, 0 replies; 9+ messages in thread
From: Joonas Niilola @ 2022-08-29  8:21 UTC (permalink / raw
  To: gentoo-commits

commit:     e99944422426ce41f27c3d53e4364dd05e7896f1
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 29 08:18:47 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Aug 29 08:18:47 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9994442

media-video/aegisub: revbump to fix compatibility with ffmpegsource

Closes: https://bugs.gentoo.org/867298
Closes: https://bugs.gentoo.org/857765
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ....ebuild => aegisub-3.2.2_p20160518-r104.ebuild} |   3 +-
 ...3.2.2_p20160518-ffmpegsource-2.40-compat2.patch | 106 +++++++++++++++++++++
 2 files changed, 108 insertions(+), 1 deletion(-)

diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518-r103.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r104.ebuild
similarity index 98%
rename from media-video/aegisub/aegisub-3.2.2_p20160518-r103.ebuild
rename to media-video/aegisub/aegisub-3.2.2_p20160518-r104.ebuild
index a9c7d950a82c..cbf5e1a06090 100644
--- a/media-video/aegisub/aegisub-3.2.2_p20160518-r103.ebuild
+++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r104.ebuild
@@ -29,7 +29,7 @@ RDEPEND="${LUA_DEPS}
 	x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,debug?]
 	dev-libs/boost:=[icu,nls,threads(+)]
 	dev-libs/icu:=
-	~media-libs/ffmpegsource-2.23:=
+	media-libs/ffmpegsource
 	media-libs/fontconfig
 	media-libs/freetype
 	media-libs/libass:=[fontconfig]
@@ -75,6 +75,7 @@ PATCHES=(
 	"${FILESDIR}/${PV}/${P}-tests_luarocks_lua_version.patch"
 	"${FILESDIR}/${PV}/${P}-avoid-conveying-positional-parameters-to-source-builtin.patch"
 	"${FILESDIR}/${PV}/${P}-luaL_Reg-not-luaL_reg.patch"
+	"${FILESDIR}/${PV}/${P}-ffmpegsource-2.40-compat2.patch"
 )
 
 aegisub_check_compiler() {

diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-ffmpegsource-2.40-compat2.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-ffmpegsource-2.40-compat2.patch
new file mode 100644
index 000000000000..17dc3f2dbabc
--- /dev/null
+++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-ffmpegsource-2.40-compat2.patch
@@ -0,0 +1,106 @@
+commit 89c4e8d34ab77c3322f097b91fd9de22cbea7a37
+Author: Thomas Goyne <plorkyeran@aegisub.org>
+Date:   Wed Nov 21 16:41:05 2018 -0800
+
+    Update ffmpeg and ffms2
+
+diff --git a/src/video_provider_ffmpegsource.cpp b/src/video_provider_ffmpegsource.cpp
+index 8bd68fbbf..f4ed6a2f2 100644
+--- a/src/video_provider_ffmpegsource.cpp
++++ b/src/video_provider_ffmpegsource.cpp
+@@ -44,6 +44,23 @@
+ #include <libaegisub/make_unique.h>
+ 
+ namespace {
++typedef enum AGI_ColorSpaces {
++	AGI_CS_RGB = 0,
++	AGI_CS_BT709 = 1,
++	AGI_CS_UNSPECIFIED = 2,
++	AGI_CS_FCC = 4,
++	AGI_CS_BT470BG = 5,
++	AGI_CS_SMPTE170M = 6,
++	AGI_CS_SMPTE240M = 7,
++	AGI_CS_YCOCG = 8,
++	AGI_CS_BT2020_NCL = 9,
++	AGI_CS_BT2020_CL = 10,
++	AGI_CS_SMPTE2085 = 11,
++	AGI_CS_CHROMATICITY_DERIVED_NCL = 12,
++	AGI_CS_CHROMATICITY_DERIVED_CL = 13,
++	AGI_CS_ICTCP = 14
++} AGI_ColorSpaces;
++
+ /// @class FFmpegSourceVideoProvider
+ /// @brief Implements video loading through the FFMS library.
+ class FFmpegSourceVideoProvider final : public VideoProvider, FFmpegSourceProvider {
+@@ -78,7 +95,7 @@ public:
+ 		if (matrix == RealColorSpace)
+ 			FFMS_SetInputFormatV(VideoSource, CS, CR, FFMS_GetPixFmt(""), nullptr);
+ 		else if (matrix == "TV.601")
+-			FFMS_SetInputFormatV(VideoSource, FFMS_CS_BT470BG, CR, FFMS_GetPixFmt(""), nullptr);
++			FFMS_SetInputFormatV(VideoSource, AGI_CS_BT470BG, CR, FFMS_GetPixFmt(""), nullptr);
+ 		else
+ 			return;
+ 		ColorSpace = matrix;
+@@ -103,16 +120,16 @@ std::string colormatrix_description(int cs, int cr) {
+ 	std::string str = cr == FFMS_CR_JPEG ? "PC" : "TV";
+ 
+ 	switch (cs) {
+-		case FFMS_CS_RGB:
++		case AGI_CS_RGB:
+ 			return "None";
+-		case FFMS_CS_BT709:
++		case AGI_CS_BT709:
+ 			return str + ".709";
+-		case FFMS_CS_FCC:
++		case AGI_CS_FCC:
+ 			return str + ".FCC";
+-		case FFMS_CS_BT470BG:
+-		case FFMS_CS_SMPTE170M:
++		case AGI_CS_BT470BG:
++		case AGI_CS_SMPTE170M:
+ 			return str + ".601";
+-		case FFMS_CS_SMPTE240M:
++		case AGI_CS_SMPTE240M:
+ 			return str + ".240M";
+ 		default:
+ 			throw VideoOpenError("Unknown video color space");
+@@ -206,8 +223,10 @@ void FFmpegSourceVideoProvider::LoadVideo(agi::fs::path const& filename, std::st
+ 
+ 	// set thread count
+ 	int Threads = OPT_GET("Provider/Video/FFmpegSource/Decoding Threads")->GetInt();
++#if FFMS_VERSION < ((2 << 24) | (30 << 16) | (0 << 8) | 0)
+ 	if (FFMS_GetVersion() < ((2 << 24) | (17 << 16) | (2 << 8) | 1) && FFMS_GetSourceType(Index) == FFMS_SOURCE_LAVF)
+ 		Threads = 1;
++#endif
+ 
+ 	// set seekmode
+ 	// TODO: give this its own option?
+@@ -235,18 +254,22 @@ void FFmpegSourceVideoProvider::LoadVideo(agi::fs::path const& filename, std::st
+ 	else
+ 		DAR = double(Width) / Height;
+ 
+-	CS = TempFrame->ColorSpace;
++	int VideoCS = CS = TempFrame->ColorSpace;
+ 	CR = TempFrame->ColorRange;
+ 
+-	if (CS == FFMS_CS_UNSPECIFIED)
+-		CS = Width > 1024 || Height >= 600 ? FFMS_CS_BT709 : FFMS_CS_BT470BG;
++	if (CS == AGI_CS_UNSPECIFIED)
++		CS = Width > 1024 || Height >= 600 ? AGI_CS_BT709 : AGI_CS_BT470BG;
+ 	RealColorSpace = ColorSpace = colormatrix_description(CS, CR);
+ 
+ #if FFMS_VERSION >= ((2 << 24) | (17 << 16) | (1 << 8) | 0)
+-	if (CS != FFMS_CS_RGB && CS != FFMS_CS_BT470BG && ColorSpace != colormatrix && (colormatrix == "TV.601" || OPT_GET("Video/Force BT.601")->GetBool())) {
+-		if (FFMS_SetInputFormatV(VideoSource, FFMS_CS_BT470BG, CR, FFMS_GetPixFmt(""), &ErrInfo))
++	if (CS != AGI_CS_RGB && CS != AGI_CS_BT470BG && ColorSpace != colormatrix && (colormatrix == "TV.601" || OPT_GET("Video/Force BT.601")->GetBool())) {
++		CS = AGI_CS_BT470BG;
++		ColorSpace = colormatrix_description(AGI_CS_BT470BG, CR);
++	}
++
++	if (CS != VideoCS) {
++		if (FFMS_SetInputFormatV(VideoSource, CS, CR, FFMS_GetPixFmt(""), &ErrInfo))
+ 			throw VideoOpenError(std::string("Failed to set input format: ") + ErrInfo.Buffer);
+-		ColorSpace = colormatrix_description(FFMS_CS_BT470BG, CR);
+ 	}
+ #endif
+ 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/
@ 2022-12-23  0:05 Nick Sarnie
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Sarnie @ 2022-12-23  0:05 UTC (permalink / raw
  To: gentoo-commits

commit:     c42bd08f89e86a4e78ba5fa8b5acdb1c20ecf201
Author:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 23 00:03:48 2022 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Fri Dec 23 00:05:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c42bd08f

media-video/aegisub: Fix boost 1.8.1 build

Closes: https://bugs.gentoo.org/887053

Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 .../aegisub/aegisub-3.2.2_p20160518-r105.ebuild    | 161 +++++++++++++++++++++
 ...gisub-3.2.2_p20160518-fix-boost-181-build.patch |  56 +++++++
 2 files changed, 217 insertions(+)

diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518-r105.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r105.ebuild
new file mode 100644
index 000000000000..f9b435cd6a74
--- /dev/null
+++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r105.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( luajit )
+LUA_REQ_USE="lua52compat"
+
+WX_GTK_VER=3.0
+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"
+COMMIT_ID="b118fe7e7a5c37540e2f0aa75af105e272bad234"
+
+inherit autotools flag-o-matic lua-single plocale wxwidgets xdg-utils vcs-snapshot
+
+DESCRIPTION="Advanced subtitle editor"
+HOMEPAGE="http://www.aegisub.org/ https://github.com/Aegisub/Aegisub"
+SRC_URI="https://github.com/Aegisub/Aegisub/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+alsa debug +fftw openal oss portaudio pulseaudio spell test +uchardet"
+RESTRICT="test"
+
+# aegisub bundles luabins (https://github.com/agladysh/luabins).
+# Unfortunately, luabins upstream is practically dead since 2010.
+# Thus unbundling luabins isn't worth the effort.
+RDEPEND="${LUA_DEPS}
+	x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,debug?]
+	dev-libs/boost:=[icu,nls]
+	dev-libs/icu:=
+	media-libs/ffmpegsource:=
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/libass:=[fontconfig]
+	sys-libs/zlib
+	virtual/libiconv
+	virtual/opengl
+	alsa? ( media-libs/alsa-lib )
+	fftw? ( >=sci-libs/fftw-3.3:= )
+	openal? ( media-libs/openal )
+	portaudio? ( =media-libs/portaudio-19* )
+	pulseaudio? ( media-sound/pulseaudio )
+	spell? ( app-text/hunspell:= )
+	uchardet? ( app-i18n/uchardet )
+"
+DEPEND="${RDEPEND}"
+# luarocks is only used as a command-line tool so there is no need to enforce
+# LUA_SINGLE_USEDEP on it. On the other hand, this means we must use version
+# bounds in order to make sure we use a version migrated to Lua eclasses.
+BDEPEND="dev-util/intltool
+	sys-devel/gettext
+	virtual/pkgconfig
+	test? (
+		${RDEPEND}
+		>=dev-cpp/gtest-1.8.1
+		>=dev-lua/luarocks-3.4.0-r100
+		$(lua_gen_cond_dep '
+			dev-lua/busted[${LUA_USEDEP}]
+		')
+	)
+"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}
+	|| ( alsa openal oss portaudio pulseaudio )"
+
+PATCHES=(
+	"${FILESDIR}/${PV}/${P}-fix-system-luajit-build.patch"
+	"${FILESDIR}/${PV}/${P}-respect-compiler-flags.patch"
+	"${FILESDIR}/${PV}/${P}-support-system-gtest.patch"
+	"${FILESDIR}/${PV}/${P}-fix-icu59-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-icu62-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-boost170-build.patch"
+	"${FILESDIR}/${PV}/${P}-fix-makefile-for-make4.3.patch"
+	"${FILESDIR}/${PV}/${P}-tests_luarocks_lua_version.patch"
+	"${FILESDIR}/${PV}/${P}-avoid-conveying-positional-parameters-to-source-builtin.patch"
+	"${FILESDIR}/${PV}/${P}-luaL_Reg-not-luaL_reg.patch"
+	"${FILESDIR}/${PV}/${P}-ffmpegsource-2.40-compat2.patch"
+	"${FILESDIR}/${PV}/${P}-fix-boost-181-build.patch"
+)
+
+aegisub_check_compiler() {
+	if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11; then
+		die "Your compiler lacks C++11 support. Use GCC>=4.7.0 or Clang>=3.3."
+	fi
+}
+
+pkg_pretend() {
+	aegisub_check_compiler
+}
+
+pkg_setup() {
+	aegisub_check_compiler
+	lua-single_pkg_setup
+}
+
+src_prepare() {
+	default_src_prepare
+
+	# Remove tests that require unavailable uuid Lua module.
+	rm automation/tests/modules/lfs.moon || die
+
+	remove_locale() {
+		rm "po/${1}.po" || die
+	}
+
+	plocale_find_changes 'po' '' '.po'
+	plocale_for_each_disabled_locale remove_locale
+
+	# See http://devel.aegisub.org/ticket/1914
+	config_rpath_update "${S}"/config.rpath
+
+	eautoreconf
+
+	cat <<- EOF > build/git_version.h || die
+		#define BUILD_GIT_VERSION_NUMBER 8897
+		#define BUILD_GIT_VERSION_STRING "${PV}"
+		#define TAGGED_RELEASE 0
+	EOF
+}
+
+src_configure() {
+	# Prevent access violations from OpenAL detection. See Gentoo bug 508184.
+	use openal && export agi_cv_with_openal="yes"
+
+	setup-wxwidgets
+	local myeconfargs=(
+		--disable-update-checker
+		--with-ffms2
+		--with-system-luajit
+		$(use_enable debug)
+		$(use_with alsa)
+		$(use_with fftw fftw3)
+		$(use_with openal)
+		$(use_with oss)
+		$(use_with portaudio)
+		$(use_with pulseaudio libpulse)
+		$(use_with spell hunspell)
+		$(use_with uchardet)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	emake WITH_SYSTEM_GTEST=$(usex test)
+}
+
+src_test() {
+	emake test-automation
+	emake test-libaegisub
+}
+
+pkg_postinst() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}
+
+pkg_postrm() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}

diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-boost-181-build.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-boost-181-build.patch
new file mode 100644
index 000000000000..ac264bc70676
--- /dev/null
+++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-boost-181-build.patch
@@ -0,0 +1,56 @@
+diff --git a/libaegisub/include/libaegisub/lua/utils.h b/libaegisub/include/libaegisub/lua/utils.h
+index c5a65d6e4..f4921d582 100644
+--- a/libaegisub/include/libaegisub/lua/utils.h
++++ b/libaegisub/include/libaegisub/lua/utils.h
+@@ -87,7 +87,10 @@ int exception_wrapper(lua_State *L) {
+ 
+ template<typename T>
+ void set_field(lua_State *L, const char *name, T value) {
+-	push_value(L, value);
++	if constexpr(std::is_convertible<T, std::string>::value)
++            push_value(L, static_cast<std::string>(value));
++	else
++            push_value(L, value);
+ 	lua_setfield(L, -2, name);
+ }
+ 
+diff --git a/src/auto4_lua.cpp b/src/auto4_lua.cpp
+index 245689679..6d479b2c3 100644
+--- a/src/auto4_lua.cpp
++++ b/src/auto4_lua.cpp
+@@ -115,7 +115,8 @@ namespace {
+ 	int get_translation(lua_State *L)
+ 	{
+ 		wxString str(check_wxstring(L, 1));
+-		push_value(L, _(str).utf8_str());
++		const char* val = static_cast<const char*>( _(str).utf8_str());
++		push_value(L, val);
+ 		return 1;
+ 	}
+ 
+diff --git a/src/command/video.cpp b/src/command/video.cpp
+index fb2bcb0ba..77e3e9ca7 100644
+--- a/src/command/video.cpp
++++ b/src/command/video.cpp
+@@ -475,7 +475,7 @@ static void save_snapshot(agi::Context *c, bool raw) {
+ 		// If where ever that is isn't defined, we can't save there
+ 		if ((basepath == "\\") || (basepath == "/")) {
+ 			// So save to the current user's home dir instead
+-			basepath = wxGetHomeDir().c_str();
++			basepath = static_cast<const char*>(wxGetHomeDir().c_str());
+ 		}
+ 	}
+ 	// Actual fixed (possibly relative) path, decode it
+diff --git a/src/dialog_attachments.cpp b/src/dialog_attachments.cpp
+index 38ff53027..e30339f81 100644
+--- a/src/dialog_attachments.cpp
++++ b/src/dialog_attachments.cpp
+@@ -161,7 +161,7 @@ void DialogAttachments::OnExtract(wxCommandEvent &) {
+ 
+ 	// Multiple or single?
+ 	if (listView->GetNextSelected(i) != -1)
+-		path = wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())).c_str();
++		path = static_cast<const char*>(wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())).c_str());
+ 	else {
+ 		path = SaveFileSelector(
+ 			_("Select the path to save the file to:"),


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-23  0:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-12  1:43 [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/ Nick Sarnie
  -- strict thread matches above, loose matches on Subject: below --
2022-12-23  0:05 Nick Sarnie
2022-08-29  8:21 Joonas Niilola
2022-03-05 14:32 Nick Sarnie
2021-01-11  0:24 Nick Sarnie
2020-03-23 22:24 Nick Sarnie
2019-06-09 19:36 Nick Sarnie
2018-09-19  1:02 Nick Sarnie
2016-06-28 18:06 Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox