Compare commits

...

1 Commits

Author SHA1 Message Date
Alexandros Theodotou 162052d4c4
add zplugins (osx) 3 years ago
  1. 11
      osx-brew/installer.sh.in
  2. 4
      osx-brew/make_zip.sh.in
  3. 41
      osx-brew/meson.build
  4. 31
      osx-brew/zplugins.rb.in
  5. 1
      osx-brew/zrythm.rb.in

11
osx-brew/installer.sh.in

@ -21,6 +21,7 @@ set -e @@ -21,6 +21,7 @@ set -e
zrythm_ver="@ZRYTHM_PKG_VERSION@"
carla_ver="@CARLA_BOTTLE_VER@"
zplugins_ver="@ZPLUGINS_VER@"
show_error () {
echo "$1" >&2
@ -57,7 +58,8 @@ fi @@ -57,7 +58,8 @@ fi
if [ $proceed -ne 0 ]; then
echo "Unpacking..."
tar xf bin/carla-git*.catalina.bottle.tar.gz -C /usr/local/Cellar
brew unlink carla-git || true
tar xf bin/zplugins*.catalina.bottle.tar.gz -C /usr/local/Cellar
brew unlink zplugins || true
brew unlink zrythm || true
brew unlink zrythm-trial || true
@ -67,12 +69,17 @@ if [ $proceed -ne 0 ]; then @@ -67,12 +69,17 @@ if [ $proceed -ne 0 ]; then
brew unlink carla-git && \
brew link --overwrite carla-git && \
brew switch carla-git $carla_ver
brew switch zplugins $zplugins_ver || true
brew unlink zplugins && \
brew link --overwrite zplugins && \
brew switch zplugins $zplugins_ver
# install deps
echo "Installing deps..."
carla_deps="$(brew info carla-git | grep Required | sed -e "s/Required: //" | sed -e "s/, / /g")"
zplugins_deps="$(brew info zplugins | grep Required | sed -e "s/Required: //" | sed -e "s/, / /g")"
brew upgrade
brew install $carla_deps || true
brew install $carla_deps $zplugins_deps || true
# fix paths
echo "Fixing paths..."

4
osx-brew/make_zip.sh.in

@ -7,7 +7,8 @@ zrythm_formula_file=$2 @@ -7,7 +7,8 @@ zrythm_formula_file=$2
carla_bottle_file=$3
installer_sh_file=$4
readme_file=$5
private_dir=$6
zplugins_bottle_file=$6
private_dir=$7
dash_trial="@DASH_TRIAL@"
@ -24,6 +25,7 @@ mkdir -p $inner_dir/src @@ -24,6 +25,7 @@ mkdir -p $inner_dir/src
cp $installer_sh_file $inner_dir/installer.sh
cp $readme_file $inner_dir/README
cp $carla_bottle_file $inner_dir/bin/carla-git.catalina.bottle.tar.gz
cp $zplugins_bottle_file $inner_dir/bin/zplugins.catalina.bottle.tar.gz
cp $zrythm_formula_file $inner_dir/formulae/
cp -r /tmp/breeze-dark $inner_dir/icons/
pushd $private_dir

41
osx-brew/meson.build

@ -19,7 +19,10 @@ osx_brew_conf = configuration_data () @@ -19,7 +19,10 @@ osx_brew_conf = configuration_data ()
osx_brew_conf.merge_from (global_conf)
carla_bottle_ver = '0.1.2'
carla_bottle_filename = 'carla-git--' + carla_bottle_ver + '.catalina.bottle.tar.gz'
zplugins_bottle_filename = 'zplugins--' + zplugins_ver + '.catalina.bottle.tar.gz'
zrythm_bottle_filename = 'zrythm' + dash_trial + '--' + zrythm_pkg_ver + '.catalina.bottle.tar.gz'
osx_brew_conf.set (
'ZPLUGINS_BOTTLE_FILENAME', zplugins_bottle_filename)
osx_brew_conf.set (
'ZRYTHM_BOTTLE_FILENAME', zrythm_bottle_filename)
osx_brew_conf.set (
@ -32,6 +35,12 @@ carla_brew_src_sum = run_command ( @@ -32,6 +35,12 @@ carla_brew_src_sum = run_command (
' | awk \'{print $1;}\'').stdout (). strip ()
osx_brew_conf.set (
'CARLA_BREW_SHA256', carla_brew_src_sum)
zplugins_brew_src_sum = run_command (
bash, '-c', 'openssl sha256 -r ' +
zplugins_src_tarball.full_path () +
' | awk \'{print $1;}\'').stdout (). strip ()
osx_brew_conf.set (
'ZPLUGINS_BREW_SHA256', zplugins_brew_src_sum)
zrythm_brew_src_sum = run_command (
bash, '-c', 'openssl sha256 -r ' +
orig_zrythm_src_tarball.full_path () +
@ -84,6 +93,11 @@ carla_formula = configure_file ( @@ -84,6 +93,11 @@ carla_formula = configure_file (
input: 'carla-git.rb.in',
configuration: osx_brew_conf,
)
zplugins_formula = configure_file (
output: 'zplugins.rb',
input: 'zplugins.rb.in',
configuration: osx_brew_conf,
)
zrythm_formula = configure_file (
output: 'zrythm' + dash_trial + '.rb',
input: 'zrythm.rb.in',
@ -104,19 +118,35 @@ carla_bottle = custom_target ( @@ -104,19 +118,35 @@ carla_bottle = custom_target (
],
install: false,
)
zplugins_bottle = custom_target (
'osx-zplugins-bottle',
output: zplugins_bottle_filename,
input: [
make_bottle_sh, zplugins_formula,
zplugins_src_tarball,
],
command: [
make_bottle_sh, '@OUTPUT@',
'@INPUT1@', '@PRIVATE_DIR@',
'@INPUT2@',
],
install: false,
)
zrythm_bottle = custom_target (
'osx-zrythm-bottle',
output: zrythm_bottle_filename,
input: [
make_bottle_sh, zrythm_formula,
carla_bottle, orig_zrythm_src_tarball,
orig_zrythm_src_tarball,
],
command: [
make_bottle_sh, '@OUTPUT@',
'@INPUT1@', '@PRIVATE_DIR@',
'@INPUT3@',
'@INPUT2@',
],
depends: make_breeze_icons,
depends: [
make_breeze_icons, carla_bottle, zplugins_bottle,
]
install: false,
)
@ -126,13 +156,14 @@ installer_zip = custom_target ( @@ -126,13 +156,14 @@ installer_zip = custom_target (
input: [
make_zip_sh, zrythm_formula,
carla_bottle, installer_sh,
readme, zrythm_bottle,
readme, zplugins_bottle,
],
command: [
make_zip_sh, '@OUTPUT@',
'@INPUT1@', '@INPUT2@', '@INPUT3@', '@INPUT4@',
'@PRIVATE_DIR@',
'@INPUT5@', '@PRIVATE_DIR@',
],
depends: [ zrythm_bottle, ]
install: true,
install_dir: get_option ('prefix'),
)

31
osx-brew/zplugins.rb.in

@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
class ZPlugins < Formula
desc "Zrythm plugin collection"
homepage "https://www.zrythm.org"
url "@ZPLUGINS_TARBALL_URL@"
sha256 "@ZPLUGINS_BREW_SHA256@"
version "@ZPLUGINS_VER@"
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "guile"
depends_on "fftw"
depends_on "libsamplerate"
depends_on "lilv"
depends_on "librsvg"
depends_on "rubberband"
depends_on "jack"
def install
mkdir "build" do
system "meson",
"--prefix=#{prefix}", "--libdir=#{lib}",
"--buildtype=debug", "-Dextra_debug_info=true",
"-Dlv2dir=lib/zrythm/lib/lv2",
"-Dtests=false",
".."
system "ninja", "-v"
system "ninja", "install", "-v"
end
end
end

1
osx-brew/zrythm.rb.in

@ -27,6 +27,7 @@ class Zrythm@DASH_TRIAL@ < Formula @@ -27,6 +27,7 @@ class Zrythm@DASH_TRIAL@ < Formula
depends_on "carla-git"
depends_on "jack"
depends_on "qjackctl"
depends_on "zplugins"
def install
mkdir "build" do

Loading…
Cancel
Save