media-video/aegisub: add dependency-control

This commit is contained in:
odrling 2020-06-10 17:50:58 +02:00
parent a24b54cd26
commit 22600e159c
7 changed files with 1205 additions and 2 deletions

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE
pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>gentoo-overlay@mva.name</email>
<description>If you have any issues, please contact me via
e-mail, jabber (mva@), or IRC (FreeNode, RusNet,
OFTC)</description>
<name>Vadim A. Misbakh-Soloviov</name>
</maintainer>
<longdescription>Long description of the
package</longdescription>
<use>
</use>
</pkgmetadata>

View File

@ -0,0 +1,53 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
VCS="git"
GITHUB_A="leafo"
inherit lua
DESCRIPTION="A programmer friendly language that compiles into Lua."
HOMEPAGE="https://github.com/leafo/moonscript"
LICENSE="MIT"
SLOT="0"
KEYWORDS=""
IUSE="+doc +inotify"
RDEPEND="
|| (
dev-lua/lpeg
dev-lua/lulpeg[lpeg_replace]
)
dev-lua/luafilesystem
dev-lua/argparse
inotify? ( dev-lua/linotify )
"
DEPEND="${RDEPEND}"
DOCS=(docs/. README.md)
each_lua_compile() {
local lua="$(lua_get_implementation)"
${lua} bin/moonc moon/ moonscript/
}
all_lua_compile() {
local lua="$(lua_get_implementation)"
echo "#!/usr/bin/env lua" > bin/moon
${lua} bin/moonc -p bin/moon.moon >> bin/moon
echo "-- vim: set filetype=lua:" >> bin/moon
${lua} bin/moonc -p bin/splat.moon >> bin/splat
}
each_lua_install() {
dolua moon{,script}{,.lua}
}
all_lua_install() {
dobin bin/{moon,moonc,splat}
}

1024
eclass/lua.eclass Normal file

File diff suppressed because it is too large Load Diff

60
eclass/patches.eclass Normal file
View File

@ -0,0 +1,60 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: patches.eclass
# @MAINTAINER:
# mva
# @AUTHOR:
# mva
# @BLURB:
# @DESCRIPTION:
# Eclass that checks for patches directories existance and auto-add them into PATCHES=()
EXPORT_FUNCTIONS src_prepare
PATCHDIR="${FILESDIR}/patches/${PV}"
[[ -z ${PATCHES[@]} ]] && PATCHES=()
patches_src_prepare() {
if [[ -d "${PATCHDIR}" ]]; then
_patchdir_not_empty() {
local has_files
local LC_ALL=POSIX
local prev_shopt=$(shopt -p nullglob)
shopt -s nullglob
local f
for f in "${1:-${PATCHDIR}}"/*; do
if [[ "${f}" == *.diff || "${f}" == *.patch ]] && [[ -f "${f}" || -L "${f}" ]]; then
has_files=1
elif [[ -d "${f}" ]]; then
# recursion
_patchdir_not_empty "${f}" && has_files=1
fi
done
${prev_shopt}
[[ -n "${has_files}" ]]; return $?
}
_patchdir_not_empty && PATCHES+=("${PATCHDIR}")
if [[ -d "${PATCHDIR}/conditional" ]]; then
pushd "${PATCHDIR}/conditional" &>/dev/null
for d in *; do
if [[ -d ${d} ]]; then
if [[ "${d##no-}" == ${d} ]]; then
(use "${d}" && _patchdir_not_empty "${d}") && PATCHES+=("${PATCHDIR}/conditional/${d}")
else
(use "${d##no-}" && _patchdir_not_empty "${d}") || PATCHES+=("${PATCHDIR}/conditional/${d}")
fi
fi
done
popd &>/dev/null
fi
fi
if declare -f cmake-utils_src_prepare &>/dev/null; then
# cmake-utils_src_prepare support (to decrease kludges in the ebuilds)
cmake-utils_src_prepare
else
default_src_prepare
fi
}

View File

@ -0,0 +1,3 @@
DIST DependencyControl-0.6.3-alpha.tar.gz 50848 BLAKE2B 2d5418cd0999ec4f6fabbf60410c7faf4422a1a47d6a563b6d4f20e5b9a537d631a6ca2f7a04db52161ce4a58ffa2fdab255d519f5223e0bf094bc86cb174f95 SHA512 3d48fe0efbddececd4d7b0d931e5a311c4fd1eefba0a6b928e3085e298b98c7803cfdd70fda294da0c316f8ac10933c3a3a9125d7624415212beda7e17d13071
DIST ffi-experiments-e8d9c915390aaa8ffa1d220f4696f4fe2ca6ae6e.tar.gz 19123 BLAKE2B 640f80080ae8630e6d3ec7205d27e7d994f08e4442d4fbb3439f2cbf5781a02128995aa9d39ac0584f33b0cd32ba68141d9695284d49035698a1d29ccc53f89f SHA512 fa8965947e01a0e8d4784a4b56241e365da26091085a78e8a34b68f3aa389c2604b996d6bc461f0027300902e2de12b956cf77d264e4dad0d65049fcf908bd64
DIST luajson-1.3.3.tar.gz 42653 BLAKE2B 2bc7310317a1279906681c2de284dc7b9d50766c0c21c606da746d0e709168e5364c3a821798f3ce423dfdd246162212525c1fee7c13cb5f0999db56d1e5e3c3 SHA512 9b507148afaf59871f97e7cf78ad35dc01497d553699d1d1a928543fad6a375aebc3852da86d51d744f10ab2ec24c7b1d7c380852da8134ae05f2f22f6f200c2

View File

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -12,13 +12,21 @@ DESCRIPTION="Advanced subtitle editor"
HOMEPAGE="http://www.aegisub.org/ https://github.com/Aegisub/Aegisub"
EGIT_REPO_URI="https://github.com/odrling/${PN^}.git"
EGIT_BRANCH="meson"
_depctrlver="0.6.3-alpha"
_ffiexpver=e8d9c915390aaa8ffa1d220f4696f4fe2ca6ae6e
_luajsonver=1.3.3
SRC_URI="dependency_control? (
https://github.com/TypesettingTools/DependencyControl/archive/v${_depctrlver}.tar.gz -> DependencyControl-${_depctrlver}.tar.gz
https://github.com/TypesettingTools/ffi-experiments/archive/${_ffiexpver}.tar.gz -> ffi-experiments-${_ffiexpver}.tar.gz
https://github.com/harningt/luajson/archive/${_luajsonver}.tar.gz -> luajson-${_luajsonver}.tar.gz
)"
# Submodules are used to pull bundled libraries.
EGIT_SUBMODULES=()
LICENSE="BSD MIT"
SLOT="0"
KEYWORDS=""
IUSE="+alsa +fonts debug +fftw openal oss portaudio pulseaudio spell +uchardet libressl"
IUSE="+alsa +fonts debug +fftw openal oss portaudio pulseaudio spell +uchardet libressl dependency_control"
RESTRICT="test"
# aegisub bundles luabins (https://github.com/agladysh/luabins).
@ -51,6 +59,7 @@ DEPEND="${RDEPEND}
dev-util/intltool
sys-devel/gettext
virtual/pkgconfig
dev-lua/moonscript
"
REQUIRED_USE="|| ( alsa openal oss portaudio pulseaudio )"
@ -58,6 +67,11 @@ REQUIRED_USE="|| ( alsa openal oss portaudio pulseaudio )"
PATCHES=(
)
src_unpack() {
default_src_unpack
git-r3_src_unpack
}
src_prepare() {
default_src_prepare
sed -i 's/(unnamed branch)/master/g' tools/version.sh
@ -71,10 +85,13 @@ src_prepare() {
l10n_find_plocales_changes 'po' '' '.po'
l10n_for_each_disabled_locale_do remove_locale
use dependency_control && sed -i 's|#!/bin/sh|#!/bin/bash|' "${WORKDIR}/ffi-experiments-${_ffiexpver}/BuildLua.sh"
}
src_configure() {
setup-wxwidgets
use dependency_control && EMESON_SOURCE="${WORKDIR}/ffi-experiments-${_ffiexpver}" BUILD_DIR="${WORKDIR}/ffi-experiments-build" meson_src_configure
local emesonargs=(
-Dalsa=$(usex alsa enabled disabled)
@ -88,9 +105,38 @@ src_configure() {
-Duchardet=$(usex uchardet enabled disabled)
-Dsystem_luajit=true
)
meson_src_configure
}
src_compile() {
use dependency_control && BUILD_DIR="${WORKDIR}/ffi-experiments-build" meson_src_compile all lua
meson_src_compile
}
src_install() {
meson_src_install
if use dependency_control; then
ffi_build="${WORKDIR}/ffi-experiments-build"
automation_dir="${ED}/usr/share/aegisub/automation"
newins "${ffi_build}/bad-mutex/libBadMutex.so" "${automation_dir}/include/BM/BadMutex/libBadMutex.so"
newins "${ffi_build}/bad-mutex/BadMutex.lua" "${automation_dir}/include/BM/BadMutex.lua"
newins "${ffi_build}/download-manager/libDownloadManager.so" "${automation_dir}/include/DM/DownloadManager/libDownloadManager.so"
newins "${ffi_build}/download-manager/DownloadManager.lua" "${automation_dir}/include/DM/DownloadManager.lua"
newins "${ffi_build}/precise-timer/PreciseTimer.lua" "${automation_dir}/include/PT/PreciseTimer.lua"
newins "${ffi_build}/precise-timer/libPreciseTimer.so" "${automation_dir}/include/PT/PreciseTimer/libPreciseTimer.so"
newins "${ffi_build}/requireffi/requireffi.lua" "${automation_dir}/include/requireffi/requireffi.lua"
newins -r "${WORKDIR}/DependencyControl-${_depctrlver}/modules" "${automation_dir}/include/l0"
newins -r "${WORKDIR}/DependencyControl-${_depctrlver}/macros" "${automation_dir}/autoload"
newins "${WORKDIR}/luajson-${_luajsonver}/lua/json.lua" "${automation_dir}/include"
newins -r "${WORKDIR}/luajson-${_luajsonver}/lua/json" "${automation_dir}/include/json"
fi
}
pkg_preinst() {
gnome2_icon_savelist
}

View File

@ -8,6 +8,7 @@
<use>
<flag name="uchardet">Enable charset discovery via <pkg>app-i18n/uchardet</pkg></flag>
<flag name="fonts">Installs Japan7 font pack</flag>
<flag name="dependency_control">Install DependencyControl</flag>
</use>
<upstream>
<bugs-to>http://devel.aegisub.org/wiki/NewTicket</bugs-to>