Package carla: Specfile

%define _unpackaged_files_terminate_build 1

# XXX: has to deal with this in an ideal world.
# The following Python modules are autogenerated by Qt UIC.
%filter_from_requires '/^python3\(ui_/d'
# The following Python modules are seemingly autoprovided by Carla.
%filter_from_requires '/^python3\(modtools/d'

Name: carla
Version: 2.5.7
Release: alt2

Summary: A featureful audio plugin host

License: GPL-2.0-or-later
Group: Sound

Source: %name-%version.tar

BuildRequires: rpm-build-python3
BuildRequires: make gcc-c++
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(jack)
BuildRequires:  pkgconfig(sndfile)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  python3(PyQt5.pyrcc)
BuildRequires:  pkgconfig(fluidsynth)
BuildRequires:  pkgconfig(fftw3)
BuildRequires:  pkgconfig(mxml)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(liblo)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  libmagic-devel
BuildRequires:  python3(magic)

Carla is an audio plugin host, with support for many audio drivers and plugin
formats. It has some nice features like automation of parameters via MIDI CC
and full OSC control. Currently supports LADSPA, DSSI, LV2, VST2/3 and AU
plugin formats, as well as GIG, SF2 and SFZ sounds banks.

%package vst
Summary: Carla VST plugins
Group: Sound

%description vst
This package contains the Carla VST plugins, including Rack and Patchbay.

%package -n lv2-carla
Summary: Carla LV2 plugin
Group: Sound

%description -n lv2-carla
This package contains the Carla LV2 plugin.

%package devel
Summary: Development files for carla
Group: Development/C

%description devel
This package includes development files for libcarla.

%ifarch %e2k
%add_optflags -mno-sse
echo > source/modules/ysfx/sources/eel2-gas/sources/asm-nseel-x64-sse.S

rm -rf data/{macos,windows}

sed -E -i '/^PREFIX[[:space:]]+/s|^.*$|PREFIX := %_prefix # set by ALT spec|' Makefile

# Make python components use system python3.
find . -type f \( -name "*.py" \) -exec sed -i "s|#!/usr/bin/env python3|#!%__python3|g" {} \;
sed -i "s|#!/usr/bin/env python3|#!%__python3|g" source/frontend/{carla,carla-control,carla-jack-multi,carla-jack-single,carla-patchbay,carla-rack}
# This file is marked /usr/bin/env python for some reason.
sed -i "s|#!/usr/bin/env python|#!%__python3|g" source/frontend/widgets/

make features # log build configuration
%make_build PREFIX="%_prefix" LIBDIR="%_libdir" \

%makeinstall_std PREFIX="%_prefix" LIBDIR="%_libdir"



%files vst

%files -n lv2-carla

%files devel

* Thu Dec 07 2023 Michael Shigorin <> 2.5.7-alt2
- E2K: fix build (ilyakurdyukov@).

* Mon Nov 27 2023 Arseny Maslennikov <> 2.5.7-alt1
- 2.5.4 -> 2.5.7.

* Fri Jun 23 2023 Arseny Maslennikov <> 2.5.4-alt1
- 2.4.3 -> 2.5.4.

* Sun May 15 2022 Arseny Maslennikov <> 2.4.3-alt1
- Initial build for ALT Sisyphus.