File aegisub.spec of Package aegisub-arch1t3chts

#
# spec file for package aegisub
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%define gtest_ver 1.8.1
%define luajit_ver 2.1
%define _vpath_builddir mesonbuild
Name:           aegisub
Version:        20240227.arch1t3chts.e2e3906
Release:        0
Summary:        Subtitle editor
License:        BSD-3-Clause
Group:          Productivity/Multimedia/Video/Editors and Convertors
URL:            http://www.aegisub.net/
Source0:        %{name}-%{version}.tar.xz
Source1:        luajit-%{luajit_ver}.tar.xz
Source2:        https://github.com/google/googletest/archive/release-%{gtest_ver}.zip#/gtest-%{gtest_ver}.zip
Source3:        https://wrapdb.mesonbuild.com/v1/projects/gtest/%{gtest_ver}/1/get_zip#/gtest-%{gtest_ver}-1-wrap.zip
Source4:        avisynth-3.7.3.tar.xz
Source5:        vapoursynth-R59.tar.xz
Source6:        bestsource-0~git.ba1249c.tar.xz 

BuildRequires:  c++_compiler
BuildRequires:  extra-cmake-modules
BuildRequires:  git-core
BuildRequires:  intltool
BuildRequires:  libboost_container-devel
BuildRequires:  libboost_filesystem-devel
BuildRequires:  libboost_locale-devel
BuildRequires:  libboost_regex-devel
BuildRequires:  libboost_thread-devel
BuildRequires:  meson
BuildRequires:  pkgconfig >= 0.20
BuildRequires:  readline-devel
BuildRequires:  wxGTK3-devel >= 3.0
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(ffms2)
BuildRequires:  pkgconfig(fftw3) >= 3.3
BuildRequires:  pkgconfig(fontconfig) >= 2.4
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(hunspell) >= 1.2.0
BuildRequires:  pkgconfig(libass)
BuildRequires:  pkgconfig(libpulse) >= 0.5
BuildRequires:  pkgconfig(luajit)
BuildRequires:  pkgconfig(openal)
BuildRequires:  pkgconfig(portaudio-2.0)
BuildRequires:  pkgconfig(uchardet)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(jansson)
Provides:       bundled(AviSynth)
Provides:       bundled(BestSource)
Provides:       bundled(VapourSynth)

%description
Aegisub is an advanced subtitle editor.

Aegisub natively works with the Advanced SubStation Alpha format
(aptly abbreviated ASS) which allows for many advanced effects in
the subtitles, apart from just basic timed text.

%prep
%setup -q
mkdir -p subprojects/luajit
tar -xf %{SOURCE1} --strip-components 1 -C subprojects/luajit
cp -a subprojects/packagefiles/luajit/* subprojects/luajit
mkdir subprojects/packagecache
cp %{SOURCE2} %{SOURCE3} subprojects/packagecache
mkdir -p subprojects/avisynth
tar -xf %{SOURCE4} --strip-components 1 -C subprojects/avisynth
mkdir -p subprojects/vapoursynth
tar -xf %{SOURCE5} --strip-components 1 -C subprojects/vapoursynth
cp -a subprojects/packagefiles/vapoursynth/* subprojects/vapoursynth
mkdir -p subprojects/bestsource
tar -xf %{SOURCE6} --strip-components 1 -C subprojects/bestsource
cp -a subprojects/packagefiles/bestsource/* subprojects/bestsource

%build
%meson \
    -Davisynth=enabled \
    -Dbestsource=enabled \
    -Dvapoursynth=enabled
%meson_build

%install
%meson_install
%find_lang aegisub

%check
%meson_test

%files -f aegisub.lang
%license LICENCE
%{_bindir}/aegisub
%{_datadir}/aegisub/
%{_datadir}/applications/aegisub.desktop
%{_datadir}/icons/hicolor/*/apps/aegisub.*
%{_datadir}/metainfo/aegisub.appdata.xml

%changelog
openSUSE Build Service is sponsored by