Commit ad3539b6 authored by Ed Reel's avatar Ed Reel Committed by GitHub

Add shotcut package and jack1 dependency (#4666)

parent 6d4f8583
require 'package'
class Jack1 < Package
description 'JACK (JACK Audio Connection Kit) refers to an API that provides a basic infrastructure for audio applications to communicate with each other and with audio hardware.'
homepage 'https://jackaudio.org/'
version 'b04083'
compatibility 'all'
source_url 'https://github.com/jackaudio/jack1/archive/b04083761496410a52126cdbcd35c557ee82f2e5.tar.gz'
source_sha256 '376f2cd292ec285e53dbd5fe30a151d8a45dd7be5034a5b05dbb7e8a4735d7b1'
binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/jack1-b04083-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/jack1-b04083-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/jack1-b04083-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/jack1-b04083-chromeos-x86_64.tar.xz',
})
binary_sha256 ({
aarch64: 'a14ae812ae5d89c0ca4a3922d7706fdc3ef1c5f2898a230aebd84246a2988464',
armv7l: 'a14ae812ae5d89c0ca4a3922d7706fdc3ef1c5f2898a230aebd84246a2988464',
i686: '475b1a17382257853fe753b27f3a7cfd6fd0d53bbf1b3a8f6d0cb0cdf7edff32',
x86_64: 'e212d48b752a9d3e73ba430e5c1275ca8208f9bd2452f1b1024f4198f163e623',
})
depends_on 'alsa_plugins'
def self.build
system 'git clone git@github.com:jackaudio/jack1.git'
Dir.chdir 'jack1' do
system "git checkout #{version}"
system 'git submodule init'
system 'git submodule update'
system './autogen.sh'
system "./configure #{CREW_OPTIONS}"
system 'make'
end
end
def self.install
Dir.chdir 'jack1' do
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
end
end
end
require 'package'
class Shotcut < Package
description 'Shotcut is a free, open source, cross-platform video editor.'
homepage 'https://www.shotcut.org/'
version '20.11.25'
compatibility 'x86_64'
case ARCH
when 'x86_64'
source_url 'https://github.com/mltframework/shotcut/releases/download/v20.11.25/shotcut-linux-x86_64-201125.txz'
source_sha256 'fa45d26a1e1e6af82e4f600a7a98b020e1af14f9c176595567aacbb3c9f21093'
depends_on 'gtk3'
depends_on 'jack1'
depends_on 'ffmpeg'
depends_on 'sommelier'
end
binary_url ({
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/shotcut-20.11.25-chromeos-x86_64.tar.xz',
})
binary_sha256 ({
x86_64: 'c252f03d9b50f5533d86640734d2327ee6e364df79d3505e890da587d1b32efc',
})
def self.build
system "cat << 'EOF' > shotcut
#!/bin/sh
# Set up environment
# Run this instead of trying to run bin/shotcut. It runs shotcut with the correct environment.
CURRENT_DIR=\$(readlink -f \"\$0\")
INSTALL_DIR=#{CREW_PREFIX}/share/shotcut
export LD_LIBRARY_PATH=\"\$INSTALL_DIR/lib\":\$LD_LIBRARY_PATH
export MLT_REPOSITORY=\"\$INSTALL_DIR/lib/mlt\"
export MLT_DATA=\"\$INSTALL_DIR/share/mlt\"
export MLT_PROFILES_PATH=\"\$INSTALL_DIR/share/mlt/profiles\"
export MLT_MOVIT_PATH=\"\$INSTALL_DIR/share/movit\"
export FREI0R_PATH=\"\$INSTALL_DIR/lib/frei0r-1\"
# Temporarily ignore user and default path because csladspa bug is crashing with
# LADSPA_PATH set, and Shotcut only needs the supplied SWH plugins.
# export LADSPA_PATH=\"\$LADSPA_PATH:/usr/local/lib/ladspa:/usr/lib/ladspa:/usr/lib64/ladspa:\$INSTALL_DIR/lib/ladspa\"
export LADSPA_PATH=\"\$INSTALL_DIR/lib/ladspa\"
export LIBVA_DRIVERS_PATH=\"\$INSTALL_DIR/lib/va\"
cd \"\$INSTALL_DIR\"
export QT_PLUGIN_PATH=\"lib/qt5\"
export QML2_IMPORT_PATH=\"lib/qml\"
bin/shotcut \"\$@\"
EOF"
end
def self.install
Dir.chdir 'Shotcut.app' do
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/shotcut"
FileUtils.mv 'bin', "#{CREW_DEST_PREFIX}/share/shotcut"
FileUtils.mv 'lib', "#{CREW_DEST_PREFIX}/share/shotcut"
FileUtils.mv 'share', "#{CREW_DEST_PREFIX}/share/shotcut"
end
system "install -Dm755 shotcut #{CREW_DEST_PREFIX}/bin/shotcut"
system "install -Dm644 Shotcut.desktop #{CREW_DEST_PREFIX}/share/applications/Shotcut.desktop"
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment