Browse Source

fix windows pacman package build

zplugins_osx
Alexandros Theodotou 3 years ago
parent
commit
8c35bd2c5d
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 2
      meson_options.txt
  2. 122
      nixos/zrythm.nix.in
  3. 23
      scripts/make_osx_brew_bottle.sh.in
  4. 19
      scripts/make_zrythm_mingw_pkg.sh.in
  5. 10
      sources/meson.build
  6. 11
      windows-msys/PKGBUILD-w10.in
  7. 17
      windows-msys/meson.build

2
meson_options.txt

@ -37,7 +37,7 @@ option ( @@ -37,7 +37,7 @@ option (
option (
'zplugins-ver', type: 'string',
value: '0.1.3',
value: '0.1.7',
description: 'Zplugins version')
option (

122
nixos/zrythm.nix.in

@ -0,0 +1,122 @@ @@ -0,0 +1,122 @@
{ stdenv
, fetchFromGitHub
, SDL2
, alsaLib
, bash
, bash-completion
, carla
, chromaprint
, ffmpeg
, fftw
, fftwFloat
, git
, gtk3
, gtksourceview3
, guile
, help2man
, libcyaml
, libgtop
, libjack2
, libsamplerate
, libsndfile
, libxml2
, libyaml
, lilv
, meson
, ninja
, pandoc
, pcre
, pkg-config
, python3
, rtaudio
, rtmidi
, rubberband
, serd
, sord
, sratom
, texi2html
, wrapGAppsHook
, xdg_utils
}:
stdenv.mkDerivation rec {
pname = "zrythm@DASH_TRIAL@";
version = "@ZRYTHM_PKG_VERSION@";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "@ZRYTHM_GIT_VERSION@";
sha256 = "0m7i8f5y3lvkbflys0iblkl6ksw6kn2b64k6gy10yd549n8adx69";
};
nativeBuildInputs = [
audec
git
gtk3
help2man
libxml2
meson
ninja
pandoc
pkg-config
python3
python3.pkgs.sphinx
texi2html
wrapGAppsHook
];
buildInputs = [
SDL2
alsaLib
bash-completion
carla
chromaprint
ffmpeg
fftw
fftwFloat
gtksourceview3
guile
libcyaml
libgtop
libjack2
libsamplerate
libsndfile
libyaml
lilv
pcre
rtaudio
rtmidi
rubberband
serd
sord
sratom
xdg_utils
];
mesonFlags = [
"-Denable_ffmpeg=true"
"-Denable_rtmidi=true"
"-Denable_rtaudio=true"
"-Denable_sdl=true"
"-Dmanpage=true"
"-Duser_manual=true"
];
postPatch = ''
chmod +x resources/gen_gtk_resources_xml_wrap.sh # patchShebangs only works on executable files
patchShebangs resources/gen_gtk_resources_xml_wrap.sh
'';
preInstall = ''
patchShebangs meson_post_install_wrap.sh # gets created during build.
'';
meta = with stdenv.lib; {
homepage = "https://www.zrythm.org";
description = "highly automated and intuitive digital audio workstation";
maintainers = [ maintainers.magnetophon ];
platforms = platforms.linux;
license = licenses.agpl3Plus;
};
}

23
scripts/make_osx_brew_bottle.sh.in

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
#!@BASH@
set -e
out_pkg="$1"
pkgbuild=$2
zrythm_src_tarball="$3"
zrythm_src_tarball_filename="$4"
arch_pkg_filename="$5"
private_dir="$6"
rm -rf $private_dir
mkdir -p $private_dir
cp $pkgbuild $private_dir/
cp $zrythm_src_tarball $private_dir/
# build manuals
pushd $private_dir
makepkg -f
popd
cp $private_dir/*.pkg.tar.zst $out_pkg

19
scripts/make_zrythm_mingw_pkg.sh.in

@ -6,13 +6,18 @@ out_file="$1" @@ -6,13 +6,18 @@ out_file="$1"
pkgbuild="$2"
src_tarball="$3"
zplugins_tarball="$4"
private_dir="$5"
tempdir=`mktemp -d`
cp $pkgbuild $tempdir/PKGBUILD
pushd $tempdir
MINGW_INSTALLS=mingw64 makepkg-mingw -fsi --noconfirm
popd $tempdir
rm -rf $private_dir
mkdir -p $private_dir
cp $tempdir/*.pkg.tar.zst $out_file
cp $pkgbuild $private_dir/PKGBUILD
cp $src_tarball $private_dir/
cp $zplugins_tarball $private_dir/
pushd $private_dir
MINGW_INSTALLS=mingw64 makepkg-mingw -fs --noconfirm
popd
rm -rf $tempdir
cp $private_dir/*.pkg.tar.zst $out_file
pacman -U $out_file --noconfirm --overwrite='*'

10
sources/meson.build

@ -32,9 +32,13 @@ zrythm_src_tarball = custom_target ( @@ -32,9 +32,13 @@ zrythm_src_tarball = custom_target (
output: zrythm_src_tarball_filename,
input: orig_zrythm_src_tarball,
command: [
'tar', 'xf', '@INPUT@', '&&',
'mv', orig_inner_dir_name, zrythm_inner_dir_name, '&&',
'tar', 'czf', '@OUTPUT@', zrythm_inner_dir_name,
bash, '-c',
'tar xf @INPUT@ && ' +
'mv ' + orig_inner_dir_name + ' ' +
zrythm_inner_dir_name + ' && ' +
'tar czf ' +
meson.current_build_dir () / zrythm_src_tarball_filename +
' ' + zrythm_inner_dir_name,
],
install: false,
)

11
windows-msys/PKGBUILD-w10.in

@ -25,6 +25,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gtk3" @@ -25,6 +25,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gtk3"
"${MINGW_PACKAGE_PREFIX}-libyaml")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-gettext"
"${MINGW_PACKAGE_PREFIX}-cmake"
"guile"
"${MINGW_PACKAGE_PREFIX}-pkg-config"
"${MINGW_PACKAGE_PREFIX}-python3")
@ -65,13 +66,13 @@ build() { @@ -65,13 +66,13 @@ build() {
# build zplugins
cd ${srcdir}
make -C "zplugins-v$_zplugins_ver/ext/Soundpipe" || true
make CC="$MINGW_PREFIX/bin/x86_64-w64-mingw32-gcc.exe" -C "zplugins-v$_zplugins_ver/ext/Soundpipe"
mkdir -p "$_zplugins_builddir" && cd "$_zplugins_builddir"
mkdir -p "$_zplugins_builddir"
cd "$_zplugins_builddir"
ls -l
${MINGW_PREFIX}/bin/meson \
--buildtype=release \
"../zplugins-v${_zplugins_ver}"
"../zplugins-${_zplugins_ver}"
ninja
}
package() {

17
windows-msys/meson.build

@ -140,24 +140,29 @@ mingw_install_carla_bins_target = custom_target ( @@ -140,24 +140,29 @@ mingw_install_carla_bins_target = custom_target (
carla_woe32_binary_64_zip.full_path () +
' -d /mingw64/ && unzip -o ' +
carla_woe32_binary_32_zip.full_path () +
' -d /mingw64/lib/carla',
' -d /mingw64/lib/carla' +
' && touch @OUTPUT@'
],
install: false,
)
output_file = 'zrythm' + dash_trial + '.pkg.tar.zst',
output_file = 'zrythm' + dash_trial + '.pkg.tar.zst'
mingw_zrythm_pkgbuild_full_path = meson.current_build_dir () / 'PKGBUILD'
mingw_zrythm_pkg = custom_target (
'mingw-zrythm-pkg',
output: output_file,
input: [
mingw_zrythm_pkgbuild, zrythm_src_tarball,
zplugins_src_tarball,
],
command: [
bash, '-c',
meson.build_root () / 'scripts/make_zrythm_mingw_pkg.sh ' +
meson.current_build_dir () / output_file + ' ' +
mingw_zrythm_pkgbuild.full_path () + ' ' +
zrythm_src_tarball.full_path (),
mingw_zrythm_pkgbuild_full_path + ' ' +
zrythm_src_tarball.full_path () + ' ' +
zplugins_src_tarball.full_path () + ' ' +
'@PRIVATE_DIR@'
],
depends: [
mingw_install_carla_bins_target, lilv_pkg,
@ -167,6 +172,7 @@ mingw_zrythm_pkg = custom_target ( @@ -167,6 +172,7 @@ mingw_zrythm_pkg = custom_target (
install_dir: get_option ('prefix'),
)
if false
chroot_dir = '/tmp/zrythm' + dash_trial + '-chroot'
windows_chroot_target = custom_target (
'windows-chroot',
@ -206,8 +212,9 @@ windows_msys_installer = custom_target ( @@ -206,8 +212,9 @@ windows_msys_installer = custom_target (
install: true,
install_dir: get_option ('prefix'),
)
endif
run_target (
'windows-msys',
command: [ 'echo', 'done' ],
depends: windows_msys_installer)
depends: mingw_zrythm_pkg)

Loading…
Cancel
Save