mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-22 10:57:07 -08:00
media-video/aegisub: drop 3.3.3-r1
Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
@@ -1,2 +1 @@
|
||||
DIST aegisub-3.3.3.tar.gz 6580314 BLAKE2B b6a6b6d9a805fb1aec943f00452e5f074c050d7d8970e0fa57da54a7a3c12b86241eafafd957577625bcce395c9f909fe60a22c9d76fcf8f018a4ea03921dacf SHA512 19e44667ad8742560559387c15f6c00339194cd26e1140624c63f34c6b4da6bb0b80be0f636a2d1cd0b15f1598e0580218d648e0622635b12eeaad3a40df9abc
|
||||
DIST aegisub-3.4.2.tar.gz 6602618 BLAKE2B 38b2d2d0bb5dd4d3a7fe9e16bfe47f36120bc54d6b60dfa796906ce5699f584c350faf2e0de55879c32aa13ea87ae96d5365071082920d777d8ae4a4aea04361 SHA512 225f97a59feda2ddd7a65e967c19eb074c2f961cbdfbd5e743e4b622f8fb54ec85b679e5b9f30333965e98a19bf6b56cd54cc10417f67771c9661999483dacca
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
# Copyright 1999-2024 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.2-gtk3
|
||||
PLOCALES="ar be 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"
|
||||
|
||||
inherit autotools flag-o-matic lua-single plocale wxwidgets xdg-utils vcs-snapshot toolchain-funcs
|
||||
|
||||
DESCRIPTION="Advanced subtitle editor"
|
||||
HOMEPAGE="http://www.aegisub.org/ https://github.com/wangqr/Aegisub"
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
EGIT_REPO_URI="https://github.com/wangqr/${PN^}.git"
|
||||
# Submodules are used to pull bundled libraries.
|
||||
EGIT_SUBMODULES=()
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/wangqr/Aegisub/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="amd64 x86"
|
||||
fi
|
||||
LICENSE="BSD MIT"
|
||||
SLOT="0"
|
||||
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-libs/libpulse )
|
||||
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}/3.2.2_p20160518/${PN}-3.2.2_p20160518-fix-system-luajit-build.patch"
|
||||
"${FILESDIR}/3.3.3/${PN}-3.3.3-support-system-gtest.patch"
|
||||
"${FILESDIR}/3.2.2_p20160518/${PN}-3.2.2_p20160518-tests_luarocks_lua_version.patch"
|
||||
"${FILESDIR}/3.2.2_p20160518/${PN}-3.2.2_p20160518-fix-boost-181-build.patch"
|
||||
"${FILESDIR}/3.3.3/${PN}-3.3.3-support-icu-75.patch"
|
||||
)
|
||||
|
||||
aegisub_check_compiler() {
|
||||
if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++17; then
|
||||
die "Your compiler lacks C++17 support."
|
||||
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
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export PKG_CONFIG
|
||||
# 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)
|
||||
)
|
||||
export FORCE_GIT_VERSION="v${PV}"
|
||||
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
|
||||
}
|
||||
-56
@@ -1,56 +0,0 @@
|
||||
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:"),
|
||||
-121
@@ -1,121 +0,0 @@
|
||||
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
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
Make sure 'luarocks path' outputs the paths for the Lua ABI version
|
||||
required by aegisub, not the one used internally by luarocks.
|
||||
|
||||
--- a/automation/Makefile
|
||||
+++ b/automation/Makefile
|
||||
@@ -19,7 +19,7 @@
|
||||
PROGRAM += $(d)aegisub-lua
|
||||
|
||||
test-automation: $(PROGRAM)
|
||||
- eval `luarocks path`; cd $(TOP)automation; ./aegisub-lua tests/busted.lua -p 'moon' tests/modules
|
||||
+ eval `luarocks --lua-version 5.1 path`; cd $(TOP)automation; ./aegisub-lua tests/busted.lua -p 'moon' tests/modules
|
||||
|
||||
test: test-automation
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 5ef040ffe2fc743ecff0d744b82a24e5c9b521a8 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Sarnie <sarnex@gentoo.org>
|
||||
Date: Thu, 8 Aug 2024 17:21:31 -0400
|
||||
Subject: [PATCH] Fix build with icu 75
|
||||
|
||||
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 197d0a788..02cb56052 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -144,7 +144,7 @@ AS_IF([test x$enable_compiler_flags != xno], [
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing"
|
||||
|
||||
# For mac compiler which still stuck on c++98
|
||||
- AC_CXX_FLAG([-std=c++14])
|
||||
+ AC_CXX_FLAG([-std=c++17])
|
||||
|
||||
# -O* messes with debugging.
|
||||
AS_IF([test x$enable_debug = xyes], [
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
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/configure.ac b/configure.ac
|
||||
index 856e38993..197d0a788 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -144,7 +144,7 @@ AS_IF([test x$enable_compiler_flags != xno], [
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing"
|
||||
|
||||
# For mac compiler which still stuck on c++98
|
||||
- AC_CXX_FLAG([-std=c++11])
|
||||
+ AC_CXX_FLAG([-std=c++14])
|
||||
|
||||
# -O* messes with debugging.
|
||||
AS_IF([test x$enable_debug = xyes], [
|
||||
diff --git a/tests/Makefile b/tests/Makefile
|
||||
index 137430854..bafb59a0f 100644
|
||||
--- a/tests/Makefile
|
||||
+++ b/tests/Makefile
|
||||
@@ -1,24 +1,46 @@
|
||||
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_LIBS := $(LIBS_PTHREAD)
|
||||
+else
|
||||
+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 \
|
||||
- -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_LUA) $(GTEST_CPPFLAGS)
|
||||
+run_CXXFLAGS := -Wno-unused-value -Wno-sign-compare $(GTEST_CXXFLAGS)
|
||||
+run_LIBS := $(LIBS_BOOST) $(LIBS_ICU) $(LIBS_UCHARDET) $(LIBS_PTHREAD) $(GTEST_LIBS)
|
||||
run_OBJ := \
|
||||
$(patsubst %.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 +53,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
|
||||
Reference in New Issue
Block a user