summaryrefslogtreecommitdiff
path: root/media-video/aegisub/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-23 22:30:19 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-23 22:30:19 +0000
commit2d37d4dc50650d8de650e8a476233f57d972cdf6 (patch)
treee90121d54377e3cc5a76e4028035962ba97c44d5 /media-video/aegisub/files
parent191f9d51469a31970723ed9eb0aee70ffe63094e (diff)
gentoo auto-resync : 23:11:2023 - 22:30:19
Diffstat (limited to 'media-video/aegisub/files')
-rw-r--r--media-video/aegisub/files/3.3.3/aegisub-3.3.3-support-system-gtest.patch89
-rw-r--r--media-video/aegisub/files/aegisub-9999-git.patch61
2 files changed, 89 insertions, 61 deletions
diff --git a/media-video/aegisub/files/3.3.3/aegisub-3.3.3-support-system-gtest.patch b/media-video/aegisub/files/3.3.3/aegisub-3.3.3-support-system-gtest.patch
new file mode 100644
index 000000000000..ac7834e541d8
--- /dev/null
+++ b/media-video/aegisub/files/3.3.3/aegisub-3.3.3-support-system-gtest.patch
@@ -0,0 +1,89 @@
+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
diff --git a/media-video/aegisub/files/aegisub-9999-git.patch b/media-video/aegisub/files/aegisub-9999-git.patch
deleted file mode 100644
index a5883336757b..000000000000
--- a/media-video/aegisub/files/aegisub-9999-git.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-diff --git a/Makefile.target b/Makefile.target
-index 516ef3c24..65de0e767 100644
---- a/Makefile.target
-+++ b/Makefile.target
-@@ -79,13 +79,13 @@ endif
- all: $(LIB_TARGETS)
-
- clean:
-- $(BIN_RM) -f $(OBJ) $(CLEANFILES) $(LIB_TARGETS)
-+ $(BIN_RM) -f -- $(OBJ) $(CLEANFILES) $(LIB_TARGETS)
-
- distclean: clean
-- $(BIN_RM) -rf $(DISTCLEANFILES) $(DEP)
-+ $(BIN_RM) -rf -- $(DISTCLEANFILES) $(DEP)
-
- depclean: clean
-- $(BIN_RM) -rf $(DEP)
-+ $(BIN_RM) -rf -- $(DEP)
-
- install:
-
-diff --git a/header.mk b/header.mk
-index 613b38ff1..2c238e125 100644
---- a/header.mk
-+++ b/header.mk
-@@ -5,15 +5,13 @@ TOP := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))/
- include $(TOP)Makefile.inc
-
- subdirs := \
-- automation \
- libaegisub \
- packages/desktop \
- po \
- src \
- tests \
-- tools \
- vendor/luabins \
-- vendor/luajit
-+ tools
-
- subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs)))
-
-diff --git a/m4macros/ac_agi.m4 b/m4macros/ac_agi.m4
-index e45a54767..1bd0120ed 100644
---- a/m4macros/ac_agi.m4
-+++ b/m4macros/ac_agi.m4
-@@ -20,12 +20,14 @@ AC_DEFUN([AC_AGI_LINK],[
- aegisub_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $4"
- LIBS="$LIBS $5"
-+ AC_LANG_PUSH(C++)
- AC_CHECK_HEADER([$3], [agi_cv_header="yes"], [agi_cv_header="no"])
- AS_IF([test "x$agi_cv_header" = xyes],
- [AC_CACHE_CHECK(
- [whether $1 works], [agi_cv_with_$2],
- [AC_LINK_IFELSE([AC_LANG_SOURCE([$6])], [eval agi_cv_with_$2="yes"], [eval agi_cv_with_$2="no"])])]
- [eval agi_cv_with_$2="no"])
-+ AC_LANG_POP(C++)
- CPPFLAGS="$aegisub_save_CPPFLAGS"
- LIBS="$aegisub_save_LIBS"
- ])