summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2016-03-08 10:15:55 +0800
committerIan Delaney <idella4@gentoo.org>2016-03-08 10:15:55 +0800
commit18c354a9dbe99a11c36c6ba5a784014394a4eaa9 (patch)
tree058b2b1adc1a2057b7c16da41110dc63396ff965
parentMerge remote-tracking branch 'remotes/sbraz/syncthing' (diff)
parentmedia-video/aegisub: add missing libass subslot operator to 3.0.4 (diff)
downloadgentoo-18c354a9.tar.gz
gentoo-18c354a9.tar.bz2
gentoo-18c354a9.zip
Merge remote-tracking branch 'remotes/Coacher/aegisub-update-live'
Pull request: https://github.com/gentoo/gentoo/pull/1004
-rw-r--r--media-video/aegisub/Manifest1
-rw-r--r--media-video/aegisub/aegisub-3.0.4-r1.ebuild6
-rw-r--r--media-video/aegisub/aegisub-3.2.2_p20160306.ebuild (renamed from media-video/aegisub/aegisub-3.2.2-r1.ebuild)35
-rw-r--r--media-video/aegisub/aegisub-9999.ebuild22
-rw-r--r--media-video/aegisub/files/aegisub-3.0.4-fix-install-with-empty-LINGUAS.patch6
-rw-r--r--media-video/aegisub/files/aegisub-3.2.2_p20160306-fix-luajit-unbundling.patch127
-rw-r--r--media-video/aegisub/files/aegisub-3.2.2_p20160306-respect-user-compiler-flags.patch (renamed from media-video/aegisub/files/aegisub-3.2.2-r1-respect-user-compiler-flags.patch)10
-rw-r--r--media-video/aegisub/files/aegisub-9999-add-missing-pthread-flags.patch44
-rw-r--r--media-video/aegisub/files/aegisub-9999-unbundle-luajit.patch153
9 files changed, 167 insertions, 237 deletions
diff --git a/media-video/aegisub/Manifest b/media-video/aegisub/Manifest
index e696d2ddb43e..958989199ad3 100644
--- a/media-video/aegisub/Manifest
+++ b/media-video/aegisub/Manifest
@@ -1,2 +1,3 @@
DIST aegisub-3.0.4.tar.xz 4155728 SHA256 7d5d8b94da02278b3327f24dd546c0c897c4b369bd2da9e094dc60371422019a SHA512 2917195a61d16578a83ce0b69006dd0269c086c6eff2f622c47d9880697e4e531a7c0c0232c187f9023635c9d3857a1d6a0cee4f6251e49d22e2b625ac5dda7f WHIRLPOOL 60bd3e0374a60f6af62fe450488e8c68e18957283fff59d704f40e192da624bdf90d68c3cea41122e5b9ca440d218c3bd6d9d8091ed5226a2e9d1b9fdc2ce689
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
diff --git a/media-video/aegisub/aegisub-3.0.4-r1.ebuild b/media-video/aegisub/aegisub-3.0.4-r1.ebuild
index 93bc4fef317b..572569ee9a45 100644
--- a/media-video/aegisub/aegisub-3.0.4-r1.ebuild
+++ b/media-video/aegisub/aegisub-3.0.4-r1.ebuild
@@ -24,7 +24,7 @@ KEYWORDS="~amd64 ~x86"
IUSE="alsa debug +ffmpeg +fftw +libass lua openal oss portaudio pulseaudio spell"
# configure.ac specifies minimal versions for some of the dependencies below.
-# However, most of these minimal versions date back to 2006-2010 yy.
+# However, most of these minimal versions date back to 2006-2012 yy.
# Such version specifiers are meaningless nowadays, so they are omitted.
RDEPEND="
>=x11-libs/wxGTK-2.9.3:${WX_GTK_VER}[X,opengl,debug?]
@@ -38,10 +38,10 @@ RDEPEND="
portaudio? ( =media-libs/portaudio-19* )
pulseaudio? ( media-sound/pulseaudio )
- ffmpeg? ( >=media-libs/ffmpegsource-2.16:= )
+ ffmpeg? ( media-libs/ffmpegsource:= )
fftw? ( >=sci-libs/fftw-3.3:= )
- libass? ( media-libs/libass[fontconfig] )
+ libass? ( media-libs/libass:=[fontconfig] )
lua? ( =dev-lang/lua-5.1*:= )
spell? ( app-text/hunspell )
"
diff --git a/media-video/aegisub/aegisub-3.2.2-r1.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160306.ebuild
index 79bc20d66c93..1c21ae6afbd0 100644
--- a/media-video/aegisub/aegisub-3.2.2-r1.ebuild
+++ b/media-video/aegisub/aegisub-3.2.2_p20160306.ebuild
@@ -8,44 +8,43 @@ AUTOTOOLS_AUTORECONF=1
AUTOTOOLS_IN_SOURCE_BUILD=1
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"
WX_GTK_VER="3.0"
+COMMIT_ID="26fea0e123246b4f122beb54559c8dcd82925071"
-inherit autotools-utils fdo-mime flag-o-matic gnome2-utils l10n wxwidgets
+inherit autotools-utils fdo-mime flag-o-matic gnome2-utils l10n wxwidgets vcs-snapshot
DESCRIPTION="Advanced subtitle editor"
HOMEPAGE="http://www.aegisub.org/"
-SRC_URI="
- http://ftp.aegisub.org/pub/releases/${P}.tar.xz
- ftp://ftp.aegisub.org/pub/releases/${P}.tar.xz
-"
+SRC_URI="https://github.com/Aegisub/Aegisub/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="alsa debug +ffmpeg +fftw openal oss portaudio pulseaudio spell"
+IUSE="alsa debug +ffmpeg +fftw openal oss portaudio pulseaudio spell +uchardet"
# configure.ac specifies minimal versions for some of the dependencies below.
-# However, most of these minimal versions date back to 2006-2010 yy.
+# However, most of these minimal versions date back to 2006-2012 yy.
# Such version specifiers are meaningless nowadays, so they are omitted.
RDEPEND="
- >=dev-lang/luajit-2.0.3:2[lua52compat]
- >=dev-libs/boost-1.50.0:=[icu,nls,threads]
- >=dev-libs/icu-4.8.1.1:=
- >=x11-libs/wxGTK-3.0.0:${WX_GTK_VER}[X,opengl,debug?]
+ dev-lang/luajit:2[lua52compat]
+ dev-libs/boost:=[icu,nls,threads]
+ dev-libs/icu:=
media-libs/fontconfig
media-libs/freetype
- media-libs/libass[fontconfig]
+ media-libs/libass:=[fontconfig]
virtual/libiconv
virtual/opengl
+ x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,debug?]
alsa? ( media-libs/alsa-lib )
openal? ( media-libs/openal )
portaudio? ( =media-libs/portaudio-19* )
pulseaudio? ( media-sound/pulseaudio )
- ffmpeg? ( >=media-libs/ffmpegsource-2.16:= )
+ ffmpeg? ( media-libs/ffmpegsource:= )
fftw? ( >=sci-libs/fftw-3.3:= )
spell? ( app-text/hunspell )
+ uchardet? ( dev-libs/uchardet )
"
DEPEND="${RDEPEND}
oss? ( virtual/os-headers )
@@ -57,14 +56,12 @@ REQUIRED_USE="
|| ( alsa openal oss portaudio pulseaudio )
"
-# aegisub also bundles luabins (https://github.com/agladysh/luabins).
+# aegisub bundles luabins (https://github.com/agladysh/luabins).
# Unfortunately, luabins upstream is dead since 2011.
# Thus unbundling luabins is not worth the effort.
PATCHES=(
- "${FILESDIR}/${P}-fix-lua-regexp.patch"
- "${FILESDIR}/${P}-unbundle-luajit.patch"
- "${FILESDIR}/${P}-add-missing-pthread-flags.patch"
- "${FILESDIR}/${PF}-respect-user-compiler-flags.patch"
+ "${FILESDIR}/${P}-fix-luajit-unbundling.patch"
+ "${FILESDIR}/${P}-respect-user-compiler-flags.patch"
)
pkg_pretend() {
@@ -91,6 +88,7 @@ src_configure() {
use openal && export agi_cv_with_openal="yes"
local myeconfargs=(
--disable-update-checker
+ --with-system-luajit
$(use_enable debug)
$(use_with alsa)
$(use_with ffmpeg ffms2)
@@ -100,6 +98,7 @@ src_configure() {
$(use_with portaudio)
$(use_with pulseaudio libpulse)
$(use_with spell hunspell)
+ $(use_with uchardet)
)
autotools-utils_src_configure
}
diff --git a/media-video/aegisub/aegisub-9999.ebuild b/media-video/aegisub/aegisub-9999.ebuild
index 8c24de933892..a356fa809e98 100644
--- a/media-video/aegisub/aegisub-9999.ebuild
+++ b/media-video/aegisub/aegisub-9999.ebuild
@@ -21,25 +21,25 @@ KEYWORDS=""
IUSE="alsa debug +ffmpeg +fftw openal oss portaudio pulseaudio spell +uchardet"
# configure.ac specifies minimal versions for some of the dependencies below.
-# However, most of these minimal versions date back to 2006-2010 yy.
+# However, most of these minimal versions date back to 2006-2012 yy.
# Such version specifiers are meaningless nowadays, so they are omitted.
RDEPEND="
- >=dev-lang/luajit-2.0.4:2[lua52compat]
- >=dev-libs/boost-1.50.0:=[icu,nls,threads]
- >=dev-libs/icu-4.8.1.1:=
- >=x11-libs/wxGTK-3.0.0:${WX_GTK_VER}[X,opengl,debug?]
+ dev-lang/luajit:2[lua52compat]
+ dev-libs/boost:=[icu,nls,threads]
+ dev-libs/icu:=
media-libs/fontconfig
media-libs/freetype
- media-libs/libass[fontconfig]
+ media-libs/libass:=[fontconfig]
virtual/libiconv
virtual/opengl
+ x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,debug?]
alsa? ( media-libs/alsa-lib )
openal? ( media-libs/openal )
portaudio? ( =media-libs/portaudio-19* )
pulseaudio? ( media-sound/pulseaudio )
- ffmpeg? ( >=media-libs/ffmpegsource-2.16:= )
+ ffmpeg? ( media-libs/ffmpegsource:= )
fftw? ( >=sci-libs/fftw-3.3:= )
spell? ( app-text/hunspell )
@@ -55,13 +55,12 @@ REQUIRED_USE="
|| ( alsa openal oss portaudio pulseaudio )
"
-# aegisub also bundles luabins (https://github.com/agladysh/luabins).
+# aegisub bundles luabins (https://github.com/agladysh/luabins).
# Unfortunately, luabins upstream is dead since 2011.
# Thus unbundling luabins is not worth the effort.
PATCHES=(
- "${FILESDIR}/${P}-unbundle-luajit.patch"
- "${FILESDIR}/${P}-add-missing-pthread-flags.patch"
- "${FILESDIR}/${PN}-3.2.2-r1-respect-user-compiler-flags.patch"
+ "${FILESDIR}/${PN}-3.2.2_p20160306-fix-luajit-unbundling.patch"
+ "${FILESDIR}/${PN}-3.2.2_p20160306-respect-user-compiler-flags.patch"
)
pkg_pretend() {
@@ -88,6 +87,7 @@ src_configure() {
use openal && export agi_cv_with_openal="yes"
local myeconfargs=(
--disable-update-checker
+ --with-system-luajit
$(use_enable debug)
$(use_with alsa)
$(use_with ffmpeg ffms2)
diff --git a/media-video/aegisub/files/aegisub-3.0.4-fix-install-with-empty-LINGUAS.patch b/media-video/aegisub/files/aegisub-3.0.4-fix-install-with-empty-LINGUAS.patch
index 3eda0da81bb0..0bd1b5d7d7a3 100644
--- a/media-video/aegisub/files/aegisub-3.0.4-fix-install-with-empty-LINGUAS.patch
+++ b/media-video/aegisub/files/aegisub-3.0.4-fix-install-with-empty-LINGUAS.patch
@@ -1,6 +1,6 @@
-Upstream always installs all available localization files. We workaround it by
-sed'ing out unneeded languages from PO variable in aegisub/po/Makefile file.
-This can lead to an empty PO definition and in this case install target fails.
+Upstream always installs all available localization files. We workaround this
+by sed'ing out the unused languages from PO variable in `aegisub/po/Makefile'.
+This can result in an empty PO definition, in which case install target fails.
Thus a simple guard is introduced to prevent this fail.
diff --git a/aegisub/po/Makefile b/aegisub/po/Makefile
diff --git a/media-video/aegisub/files/aegisub-3.2.2_p20160306-fix-luajit-unbundling.patch b/media-video/aegisub/files/aegisub-3.2.2_p20160306-fix-luajit-unbundling.patch
new file mode 100644
index 000000000000..a3649c729e3f
--- /dev/null
+++ b/media-video/aegisub/files/aegisub-3.2.2_p20160306-fix-luajit-unbundling.patch
@@ -0,0 +1,127 @@
+From 11bd157747ebb855d56d2bc59952a1093cfd9ddc Mon Sep 17 00:00:00 2001
+From: Ilya Tumaykin <itumaykin@gmail.com>
+Date: Mon, 7 Mar 2016 11:21:10 +0300
+Subject: Properly separate bundled and system luajit builds
+
+Build bundled luajit bits only when using bundled luajit.
+Properly set up linker flags when using system luajit.
+
+Closes #1904.
+
+Bug: http://devel.aegisub.org/ticket/1904
+---
+ Makefile.inc.in | 1 +
+ automation/Makefile | 8 +++++++-
+ configure.ac | 2 ++
+ header.mk | 5 ++++-
+ src/Makefile | 9 +++++++--
+ tools/Makefile | 2 ++
+ 6 files changed, 23 insertions(+), 4 deletions(-)
+
+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..7ebe9d8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -429,6 +429,8 @@ 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])
+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..e17eaa2 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
+
++ifeq (no, $(SYSTEM_LUAJIT))
+ $(TOP)tools/respack.lua: $(shell command -v "$(BIN_LUA)")
++endif
+
+ include $(TOP)Makefile.target
diff --git a/media-video/aegisub/files/aegisub-3.2.2-r1-respect-user-compiler-flags.patch b/media-video/aegisub/files/aegisub-3.2.2_p20160306-respect-user-compiler-flags.patch
index 517898303e53..4cd4790e3f0a 100644
--- a/media-video/aegisub/files/aegisub-3.2.2-r1-respect-user-compiler-flags.patch
+++ b/media-video/aegisub/files/aegisub-3.2.2_p20160306-respect-user-compiler-flags.patch
@@ -2,10 +2,10 @@ http://devel.aegisub.org/ticket/1899
http://devel.aegisub.org/ticket/1900
diff --git a/configure.ac b/configure.ac
-index be657b0..de8184f 100644
+index 1649efc..2f4470b 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -139,20 +139,17 @@ CC="$PTHREAD_CC"
+@@ -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], [
@@ -32,10 +32,10 @@ index be657b0..de8184f 100644
])
diff --git a/src/Makefile b/src/Makefile
-index 60d7101..1f7b2bc 100644
+index 0ee6c84..cad213b 100644
--- a/src/Makefile
+++ b/src/Makefile
-@@ -182,14 +182,13 @@ endif
+@@ -188,14 +188,13 @@ endif
#####################
# SOURCE-LEVEL CFLAGS
#####################
@@ -50,4 +50,4 @@ index 60d7101..1f7b2bc 100644
+$(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 := -I$(TOP)vendor/luajit/include
+ $(d)auto4_lua.o_FLAGS := $(CFLAGS_LUA)
diff --git a/media-video/aegisub/files/aegisub-9999-add-missing-pthread-flags.patch b/media-video/aegisub/files/aegisub-9999-add-missing-pthread-flags.patch
deleted file mode 100644
index 9f41ee5adbd7..000000000000
--- a/media-video/aegisub/files/aegisub-9999-add-missing-pthread-flags.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-http://devel.aegisub.org/ticket/1902
-http://devel.aegisub.org/ticket/1903
-http://devel.aegisub.org/ticket/1911
-
-diff --git a/Makefile.inc.in b/Makefile.inc.in
-index 5a52d25..86f93d1 100644
---- a/Makefile.inc.in
-+++ b/Makefile.inc.in
-@@ -100,7 +100,7 @@ LIBS_LIBPULSE = @LIBPULSE_LIBS@
- LIBS_LUA = $(TOP)vendor/luajit/src/libluajit.a
- LIBS_OPENAL = @OPENAL_LIBS@
- LIBS_PORTAUDIO = @PORTAUDIO_LIBS@
--LIBS_PTHREAD = @PTHREAD_LIBS@
-+LIBS_PTHREAD = @PTHREAD_LIBS@ -lpthread
- LIBS_UCHARDET = @UCHARDET_LIBS@
-
- ifeq (yes, $(BUILD_DARWIN))
-diff --git a/libaegisub/Makefile b/libaegisub/Makefile
-index b021523..77a18ec 100644
---- a/libaegisub/Makefile
-+++ b/libaegisub/Makefile
-@@ -44,7 +44,8 @@ aegisub_OBJ += $(d)common/dispatch.o
- endif
-
- aegisub_PCH := $(d)lagi_pre.h
--aegisub_CPPFLAGS := -I$(d)include -I$(TOP) $(CPPFLAGS_BOOST) $(CFLAGS_LUA)
-+aegisub_CPPFLAGS := -I$(d)include -I$(TOP) \
-+ $(CFLAGS_PTHREAD) $(CPPFLAGS_BOOST) $(CFLAGS_LUA)
-
- $(d)common/charset.o_FLAGS := $(CFLAGS_UCHARDET)
- $(d)common/charset_conv.o_FLAGS := $(CFLAGS_ICONV)
-diff --git a/tools/Makefile b/tools/Makefile
-index cbf985a..d9f64b8 100644
---- a/tools/Makefile
-+++ b/tools/Makefile
-@@ -7,7 +7,7 @@ PROGRAM += $(d)osx-bundle-restart-helper
- endif
-
- repack-thes-dict_OBJ := $(d)repack-thes-dict.o $(TOP)lib/libaegisub.a
--repack-thes-dict_LIBS := $(LIBS_BOOST) $(LIBS_ICU) $(PTHREAD_LIBS)
-+repack-thes-dict_LIBS := $(LIBS_BOOST) $(LIBS_ICU) $(LIBS_PTHREAD)
- repack-thes-dict_CPPFLAGS := -I$(TOP) -I$(TOP)libaegisub/include $(CFLAGS_ICU)
-
- PROGRAM += $(d)repack-thes-dict
diff --git a/media-video/aegisub/files/aegisub-9999-unbundle-luajit.patch b/media-video/aegisub/files/aegisub-9999-unbundle-luajit.patch
deleted file mode 100644
index c7e3e949325c..000000000000
--- a/media-video/aegisub/files/aegisub-9999-unbundle-luajit.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-http://devel.aegisub.org/ticket/1904
-
-diff --git a/Makefile.inc.in b/Makefile.inc.in
-index 5a52d25..6cd16f1 100644
---- a/Makefile.inc.in
-+++ b/Makefile.inc.in
-@@ -79,7 +79,7 @@ CFLAGS_ICONV = @ICONV_CFLAGS@
- CFLAGS_ICU = @ICU_I18N_CFLAGS@
- CFLAGS_LIBASS = @LIBASS_CFLAGS@
- CFLAGS_LIBPULSE = @LIBPULSE_CFLAGS@
--CFLAGS_LUA = -I$(TOP)vendor/luajit/include
-+CFLAGS_LUA = @LUAJIT_CFLAGS@
- CFLAGS_OPENAL = @OPENAL_CFLAGS@
- CFLAGS_OSS = @OSS_CFLAGS@
- CFLAGS_PORTAUDIO = @PORTAUDIO_CFLAGS@
-@@ -97,16 +97,12 @@ LIBS_ICONV = @ICONV_LIBS@
- LIBS_ICU = @ICU_UC_LIBS@ @ICU_I18N_LIBS@
- LIBS_LIBASS = @LIBASS_LIBS@
- LIBS_LIBPULSE = @LIBPULSE_LIBS@
--LIBS_LUA = $(TOP)vendor/luajit/src/libluajit.a
-+LIBS_LUA = @LUAJIT_LIBS@
- LIBS_OPENAL = @OPENAL_LIBS@
- LIBS_PORTAUDIO = @PORTAUDIO_LIBS@
- LIBS_PTHREAD = @PTHREAD_LIBS@
- LIBS_UCHARDET = @UCHARDET_LIBS@
-
--ifeq (yes, $(BUILD_DARWIN))
--LIBS_LUA = $(TOP)vendor/luajit/src/libluajit-aegisub.so
--endif
--
- FONTCONFIG_CONF_DIR = @FONTCONFIG_CONF_DIR@
-
- #####################
-diff --git a/automation/Makefile b/automation/Makefile
-index d5425b7..121aae7 100644
---- a/automation/Makefile
-+++ b/automation/Makefile
-@@ -12,9 +12,9 @@ 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)
-+aegisub-lua_LIBS := $(LIBS_WX) $(LIBS_BOOST) $(LIBS_ICU) $(LIBS_LUA)
-
- PROGRAM += $(d)aegisub-lua
-
-diff --git a/configure.ac b/configure.ac
-index 7492568..2c77fcf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -16,6 +16,8 @@ m4_define([libpulse_required_version], [0.5])
- m4_define([pkgconfig_required_version], [0.20])
- m4_define([portaudio_required_version], [19])
- m4_define([wx_required_version], [3.0.0])
-+# Same version as the bundled one
-+m4_define([luajit_required_version], [2.0.4])
-
- #######
- # Setup
-@@ -209,6 +211,7 @@ AS_IF([test x$build_darwin != xyes], [
- ])
-
- PKG_CHECK_MODULES(LIBASS, libass >= libass_required_version)
-+PKG_CHECK_MODULES(LUAJIT, luajit >= luajit_required_version)
-
- AX_BOOST_BASE([boost_required_version])
- AX_BOOST_LIB(chrono, BOOST_CHRONO_LIB, [chrono.hpp], [boost::chrono::system_clock::time_point time])
-diff --git a/header.mk b/header.mk
-index 613b38f..873d4ce 100644
---- a/header.mk
-+++ b/header.mk
-@@ -13,7 +13,6 @@ subdirs := \
- tests \
- tools \
- vendor/luabins \
-- vendor/luajit
-
- subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs)))
-
-diff --git a/src/Makefile b/src/Makefile
-index 1fb983c..1fb0acb 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -6,7 +6,8 @@ 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) $(LIBS_LUA)
- src_PCH := $(d)agi_pre.h
- src_INSTALLNAME := $(AEGISUB_COMMAND)
-
-@@ -111,7 +112,6 @@ 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 \
-@@ -198,10 +198,10 @@ $(d)subtitles_provider.o_FLAGS := $(CFLAGS_LIBASS)
- $(d)subtitles_provider_libass.o_FLAGS := $(CFLAGS_LIBASS) -Wno-c++11-narrowing
- $(d)text_file_reader.o_FLAGS := -D_X86_
- $(d)video_provider_manager.o_FLAGS := $(CFLAGS_FFMS2)
--$(d)auto4_lua.o_FLAGS := -I$(TOP)vendor/luajit/include
--$(d)auto4_lua_assfile.o_FLAGS := -I$(TOP)vendor/luajit/include
--$(d)auto4_lua_dialog.o_FLAGS := -I$(TOP)vendor/luajit/include
--$(d)auto4_lua_progresssink.o_FLAGS := -I$(TOP)vendor/luajit/include
-+$(d)auto4_lua.o_FLAGS := $(CFLAGS_LUA)
-+$(d)auto4_lua_assfile.o_FLAGS := $(CFLAGS_LUA)
-+$(d)auto4_lua_dialog.o_FLAGS := $(CFLAGS_LUA)
-+$(d)auto4_lua_progresssink.o_FLAGS := $(CFLAGS_LUA)
-
- $(src_OBJ): $(d)libresrc/bitmap.h $(d)libresrc/default_config.h
-
-diff --git a/src/libresrc/Makefile b/src/libresrc/Makefile
-index 6441856..0562eb1 100644
---- a/src/libresrc/Makefile
-+++ b/src/libresrc/Makefile
-@@ -10,7 +10,7 @@ resrc_OBJ := \
-
- $(resrc_OBJ): $(d)default_config.h $(d)bitmap.h $(d)default_config.cpp $(d)bitmap.cpp
-
--RESPACK := cd $(TOP)src/libresrc; $(TOP)vendor/luajit/src/host/minilua $(TOP)tools/respack.lua
-+RESPACK := cd $(TOP)src/libresrc; luajit $(TOP)tools/respack.lua
-
- $(d)bitmap.cpp: $(d)bitmap.h
- $(d)default_config.cpp: $(d)default_config.h
-diff --git a/tools/Makefile b/tools/Makefile
-index cbf985a..da1d3ef 100644
---- a/tools/Makefile
-+++ b/tools/Makefile
-@@ -12,6 +12,4 @@ repack-thes-dict_CPPFLAGS := -I$(TOP) -I$(TOP)libaegisub/include $(CFLAGS_ICU)
-
- PROGRAM += $(d)repack-thes-dict
-
--$(TOP)tools/respack.lua: $(TOP)vendor/luajit/src/host/minilua
--
- include $(TOP)Makefile.target
-diff --git a/tools/respack.lua b/tools/respack.lua
-index 1281ac2..35630a2 100755
---- a/tools/respack.lua
-+++ b/tools/respack.lua
-@@ -1,4 +1,4 @@
--#!../vendor/luajit/src/host/minilua
-+#!/usr/bin/env luajit
- -- Copyright (c) 2014, Thomas Goyne <plorkyeran@aegisub.org>
- --
- -- Permission to use, copy, modify, and distribute this software for any