New package: Aegisub-3.2.2
This commit is contained in:
parent
ffa21cf5dc
commit
7304673b5a
57
srcpkgs/Aegisub/patches/fix-icu-62-build.patch
Normal file
57
srcpkgs/Aegisub/patches/fix-icu-62-build.patch
Normal file
@ -0,0 +1,57 @@
|
||||
Upstream: Yes
|
||||
Author: sidneys <sidneys.github.io@outlook.com>
|
||||
Reason: fix build w/ ICU >= 60
|
||||
--- libaegisub/common/character_count.cpp
|
||||
+++ 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;
|
||||
--- src/utils.cpp
|
||||
+++ 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());
|
||||
--- src/utils.cpp
|
||||
+++ src/utils.cpp
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <map>
|
||||
#include <unicode/locid.h>
|
||||
+#include <unicode/unistr.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/stdpaths.h>
|
||||
|
@ -0,0 +1,68 @@
|
||||
Subject: vendor/luajit is removed in the Debian package
|
||||
Author: Sebastian Reichel <sre@debian.org>
|
||||
Forwarded: not-needed
|
||||
Last-Update: 2014-08-06
|
||||
Upstream: Yes
|
||||
Reason: Use system luajit
|
||||
|
||||
--- header.mk
|
||||
+++ header.mk
|
||||
@@ -13,7 +13,6 @@
|
||||
tests \
|
||||
tools \
|
||||
vendor/luabins \
|
||||
- vendor/luajit \
|
||||
vendor/universalchardet
|
||||
|
||||
subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs)))
|
||||
--- Makefile.inc.in
|
||||
+++ Makefile.inc.in
|
||||
@@ -78,7 +78,7 @@
|
||||
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@
|
||||
@@ -96,7 +96,7 @@
|
||||
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@
|
||||
--- tools/Makefile
|
||||
+++ tools/Makefile
|
||||
@@ -12,6 +12,4 @@
|
||||
|
||||
PROGRAM += $(d)repack-thes-dict
|
||||
|
||||
-$(TOP)tools/respack.lua: $(TOP)vendor/luajit/src/host/minilua
|
||||
-
|
||||
include $(TOP)Makefile.target
|
||||
--- tools/respack.lua
|
||||
+++ tools/respack.lua
|
||||
@@ -44,7 +44,7 @@ out_cpp:write('#include "libresrc.h"\n')
|
||||
for line in manifest:lines() do
|
||||
if line:find('.') then
|
||||
local file = try_open(path..line, 'rb')
|
||||
- local id = line:gsub('^.*/', ''):gsub('\.[a-z]+$', '')
|
||||
+ local id = line:gsub('^.*/', ''):gsub('%.[a-z]+$', '')
|
||||
out_cpp:write("const unsigned char " .. id .. "[] = {")
|
||||
|
||||
local len = 0
|
||||
--- src/libresrc/Makefile
|
||||
+++ src/libresrc/Makefile
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
$(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; $(TOP)tools/respack.lua
|
||||
|
||||
$(d)bitmap.cpp: $(d)bitmap.h
|
||||
$(d)default_config.cpp: $(d)default_config.h
|
43
srcpkgs/Aegisub/patches/system-luajit.patch
Normal file
43
srcpkgs/Aegisub/patches/system-luajit.patch
Normal file
@ -0,0 +1,43 @@
|
||||
Source: Upstream
|
||||
Upstream: Yes
|
||||
Reason: Use system luajit
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index be657b0..2c03951 100644
|
||||
--- configure.ac
|
||||
+++ configure.ac
|
||||
@@ -376,6 +376,34 @@ AGI_OPT_PKG(ffms2, [build without ffms2 A/V provider [auto]], [Enable FFMS2 supp
|
||||
AGI_OPT_PKG(fftw3, [build without fftw support [auto]], [Enable fftw support])
|
||||
AGI_OPT_PKG(hunspell, [build without hunspell spell-checking [auto]], [Enable Hunspell support])
|
||||
|
||||
+########
|
||||
+# LuaJIT
|
||||
+########
|
||||
+system_luajit="bundled"
|
||||
+AC_ARG_WITH(system-luajit, AS_HELP_STRING([--without-system-luajit], [Use built-in LuaJIT [auto]]))
|
||||
+# Check if it's available at all
|
||||
+AS_IF([test x$with_system_luajit = xno], [],
|
||||
+ [PKG_CHECK_MODULES(LUAJIT, luajit >= 2.0.0, [], [
|
||||
+ AS_IF([test x$with_system_luajit = xyes],
|
||||
+ [AC_MSG_FAILURE([--with-sytem-luajit was specified, but luajit could not be found])])
|
||||
+ with_system_luajit="no"])])
|
||||
+
|
||||
+with_system_luajit="yes"
|
||||
+system_luajit="system"
|
||||
+
|
||||
+
|
||||
+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'])])
|
||||
+
|
||||
+# 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])
|
||||
+
|
||||
+# 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"])
|
||||
+
|
||||
######################################################
|
||||
# Debugging support
|
||||
######################################################
|
||||
|
47
srcpkgs/Aegisub/template
Normal file
47
srcpkgs/Aegisub/template
Normal file
@ -0,0 +1,47 @@
|
||||
# Template file for 'Aegisub'
|
||||
pkgname=Aegisub
|
||||
version=3.2.2
|
||||
revision=1
|
||||
build_style=gnu-configure
|
||||
configure_args="--disable-update-checker --with-alsa --with-ffms2
|
||||
$(vopt_with fftw fftw3) $(vopt_with openal) $(vopt_with portaudio)"
|
||||
hostmakedepends="automake gettext-devel intltool libtool pkg-config"
|
||||
makedepends="alsa-lib-devel boost-devel libcurl-devel fontconfig-devel
|
||||
freetype-devel hunspell-devel icu-devel libass-devel libffms2-devel LuaJIT-devel
|
||||
MesaLib-devel wxWidgets-devel $(vopt_if fftw fftw-devel)
|
||||
$(vopt_if openal libopenal-devel) $(vopt_if portaudio portaudio-devel)"
|
||||
short_desc="Tool for creating and modifying subtitles"
|
||||
maintainer="Rasmus Thomsen <rasmus.thomsen@protonmail.com>"
|
||||
license="BSD-3-Clause, MIT"
|
||||
homepage="http://www.aegisub.org"
|
||||
distfiles="https://github.com/Aegisub/Aegisub/archive/v${version}.tar.gz"
|
||||
checksum=62757dd491455268a240f983b59734a801cc2e899039a7493deeaf5e24a61dcd
|
||||
|
||||
build_options="fftw openal portaudio"
|
||||
build_options_default="fftw"
|
||||
|
||||
desc_option_fftw="Enable support for rendering of audio waveforms/spectrum"
|
||||
desc_option_openal="Enable support for openal"
|
||||
desc_option_portaudio="Enable support for portaudio"
|
||||
|
||||
LDFLAGS+=" -pthread"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv7l) broken="error: invalid conversion from 'const char**' to 'char**' [-fpermissive]"
|
||||
esac
|
||||
|
||||
post_extract() {
|
||||
# Fix shebang to use system luajit instead of vendored minilua
|
||||
sed -e \
|
||||
"s:../vendor/luajit/src/host/minilua:/usr/bin/luajit:" \
|
||||
-i tools/respack.lua
|
||||
}
|
||||
|
||||
pre_configure() {
|
||||
autoreconf -fi
|
||||
}
|
||||
|
||||
do_install() {
|
||||
make DESTDIR=$DESTDIR install
|
||||
vlicense LICENCE
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user