You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
164 lines
5.3 KiB
164 lines
5.3 KiB
# Copyright (C) 2020-2021 Alexandros Theodotou <alex at zrythm dot org> |
|
# |
|
# This file is part of Zrythm |
|
# |
|
# Zrythm is free software: you can redistribute it and/or modify |
|
# it under the terms of the GNU Affero General Public License as published by |
|
# the Free Software Foundation, either version 3 of the License, or |
|
# (at your option) any later version. |
|
# |
|
# Zrythm is distributed in the hope that it will be useful, |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
# GNU Affero General Public License for more details. |
|
# |
|
# You should have received a copy of the GNU Affero General Public License |
|
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>. |
|
# |
|
# Maintainer: Alexandros Theodotou <alex at zrythm dot org> |
|
_realname=zrythm@DASH_TRIAL@ |
|
_zplugins_ver=@ZPLUGINS_VER@ |
|
_zrythm_builddir="build-zrythm-${MINGW_CHOST}" |
|
_zplugins_builddir="build-zplugins-${MINGW_CHOST}" |
|
pkgbase=mingw-w64-${_realname} |
|
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" |
|
pkgver=@ZRYTHM_PKG_VERSION@ |
|
pkgrel=2 |
|
arch=('any') |
|
pkgdesc='a highly automated and intuitive digital audio workstation (mingw-w64)' |
|
depends=("${MINGW_PACKAGE_PREFIX}-gtk4" |
|
"${MINGW_PACKAGE_PREFIX}-boost" |
|
"${MINGW_PACKAGE_PREFIX}-libadwaita" |
|
"${MINGW_PACKAGE_PREFIX}-libpanel" |
|
"${MINGW_PACKAGE_PREFIX}-cantarell-fonts" |
|
"${MINGW_PACKAGE_PREFIX}-curl-winssl" |
|
"${MINGW_PACKAGE_PREFIX}-rubberband" |
|
"${MINGW_PACKAGE_PREFIX}-libsndfile" |
|
"${MINGW_PACKAGE_PREFIX}-libsamplerate" |
|
"${MINGW_PACKAGE_PREFIX}-lilv" |
|
"${MINGW_PACKAGE_PREFIX}-jack2" |
|
"${MINGW_PACKAGE_PREFIX}-gtksourceview5" |
|
"${MINGW_PACKAGE_PREFIX}-graphviz" |
|
"${MINGW_PACKAGE_PREFIX}-dlfcn" |
|
"${MINGW_PACKAGE_PREFIX}-fftw" |
|
"${MINGW_PACKAGE_PREFIX}-pango" |
|
"${MINGW_PACKAGE_PREFIX}-pcre2" |
|
"${MINGW_PACKAGE_PREFIX}-zstd" |
|
"${MINGW_PACKAGE_PREFIX}-libyaml" |
|
"${MINGW_PACKAGE_PREFIX}-vamp-plugin-sdk" |
|
"${MINGW_PACKAGE_PREFIX}-json-glib" |
|
"${MINGW_PACKAGE_PREFIX}-xxhash") |
|
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" |
|
"${MINGW_PACKAGE_PREFIX}-gettext" |
|
"${MINGW_PACKAGE_PREFIX}-cmake" |
|
"guile" |
|
"${MINGW_PACKAGE_PREFIX}-iconv" |
|
"${MINGW_PACKAGE_PREFIX}-pkg-config" |
|
"${MINGW_PACKAGE_PREFIX}-python3") |
|
options=('!strip' '!staticlibs') |
|
license=("AGPL3") |
|
url="https://www.zrythm.org" |
|
#install=${_realname}-${CARCH}.install |
|
source=("zrythm-$pkgver.tar.gz" "zplugins-$_zplugins_ver.tar.gz") |
|
sha256sums=('SKIP' 'SKIP') |
|
|
|
prepare() { |
|
pushd "${srcdir}"/zrythm-${pkgver} |
|
sed -i -e "s|\['benchmarks/dsp', true\]|#|g" tests/meson.build |
|
popd |
|
} |
|
|
|
build() { |
|
[[ -d "$_zrythm_builddir" ]] && rm -rf "$_zrythm_builddir" |
|
[[ -d "$_zplugins_builddir" ]] && rm -rf "$_zplugins_builddir" |
|
|
|
# build zrythm |
|
mkdir -p $_zrythm_builddir |
|
pushd $_zrythm_builddir |
|
|
|
# replace non-ASCII characters in TRANSLATORS |
|
iconv -c -f utf-8 -t ascii//TRANSLIT ${srcdir}/zrythm-${pkgver}/TRANSLATORS > TRANSLATORS2 || true |
|
rm ${srcdir}/zrythm-${pkgver}/TRANSLATORS |
|
mv TRANSLATORS2 ${srcdir}/zrythm-${pkgver}/TRANSLATORS |
|
sed -i -e 's|"|'\''|g' ${srcdir}/zrythm-${pkgver}/TRANSLATORS |
|
|
|
echo "using prefix ${MINGW_PREFIX}" |
|
MSYS2_ARG_CONV_EXCL="--prefix=;--buildtype=" \ |
|
${MINGW_PREFIX}/bin/meson \ |
|
--prefix=${MINGW_PREFIX} \ |
|
-Dsdl=disabled \ |
|
-Drtaudio=enabled \ |
|
-Drtmidi=enabled \ |
|
-Dlsp_dsp=enabled \ |
|
-Dstatic_deps=false \ |
|
-Dstatic_lsp_dsp=true \ |
|
-Djack=enabled \ |
|
-Dguile=disabled \ |
|
-Dfallback_version=@ZRYTHM_PKG_SEMVER_VERSION@ \ |
|
-Dcheck_updates=true \ |
|
-Dmanpage=false \ |
|
-Dtrial_ver=@TRIAL_TRUE_FALSE@ \ |
|
-Dvamp_static=true \ |
|
-Dinstaller_ver=true -Dcarla=enabled \ |
|
-Dcarla_binaries_dir_32bit='/mingw32/lib/carla' \ |
|
-Ddebug=true \ |
|
-Doptimization=2 \ |
|
-Dextra_debug_info=true \ |
|
-Db_lto=false \ |
|
-Dtests=false \ |
|
-Dcarla_use_cv32_patchbay_variant=true \ |
|
-Dforce_fallback_for=rtmidi,rtaudio \ |
|
"../zrythm-${pkgver}" |
|
|
|
${MINGW_PREFIX}/bin/ninja -d explain -v |
|
cp ${MINGW_PREFIX}/lib/carla/libcarla_host-plugin.dll ./src/ |
|
popd |
|
|
|
# build zplugins |
|
echo "building zplugins..." |
|
mkdir -p "$_zplugins_builddir" |
|
pushd "$_zplugins_builddir" |
|
ls -l |
|
mv ../zplugins ../zplugins-${_zplugins_ver} |
|
MSYS2_ARG_CONV_EXCL="--prefix=" \ |
|
${MINGW_PREFIX}/bin/meson \ |
|
--prefix=${MINGW_PREFIX} \ |
|
-Dplugins=Chordz,Chorus,EQ,LFO,LimiterSP,PhaserSP,PitchSP,Saturator,Saw \ |
|
--buildtype=release \ |
|
"../zplugins-${_zplugins_ver}" |
|
meson compile |
|
popd |
|
} |
|
|
|
check() { |
|
set -x |
|
pushd $_zrythm_builddir |
|
echo "running tests" |
|
ninja test || cat meson-logs/testlog.txt |
|
echo "running --version" |
|
src/zrythm.exe --version > test.txt 2>&1 || cat test.txt |
|
src/zrythm.exe --version |
|
popd |
|
|
|
pushd "$_zplugins_builddir" |
|
ninja test |
|
popd |
|
set +x |
|
} |
|
|
|
package() { |
|
pushd "$_zrythm_builddir" |
|
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/meson install \ |
|
--skip-subprojects |
|
install -Dm644 "${srcdir}/zrythm-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/zrythm/COPYING" |
|
popd |
|
|
|
pushd "$_zplugins_builddir" |
|
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/meson install \ |
|
--skip-subprojects |
|
popd |
|
|
|
# reclaim space |
|
rm -rf "$_zrythm_builddir" |
|
rm -rf "$_zplugins_builddir" |
|
}
|
|
|