File juce.spec of Package juce
#
# spec file for package juce
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: JUCE
Version: 5.4.7
Release: 1
Summary: The JUCE cross-platform C++ framework https://juce.com
License: ISC and GPL-3.0-only and BSD-3-Clause and Apache-2.0
Group: Productivity/Multimedia/Sound/Utilities
URL: https://github.com/WeAreROLI/JUCE/
Source0: %{name}-%{version}.tar.gz
Source1: juce_VSTInterface.h
Source2: juce-5.4.7-LV2_juce_audio_plugin_client.tar.gz
Source3: Projucer.desktop
Source4: Projucer.png
Source5: AudioPluginHost.desktop
Source6: AudioPluginHost.png
Patch3: 03-APVTS-Fixed-some-threading-issues.patch
Patch4: 04-Check-input-output-devices-names-01.patch
Patch5: 05-Check-input-output-devices-names-02.patch
Patch6: 06-Updated-platform-implementations-to-be-multi-monitor-aware.patch
Patch7: 07-Fixed-a-dangling-pointer-deletion-when-moving-PopupMenu-submenus.patch
Patch8: 08-fix-array-include-for-gcc12.patch
Patch9: juce-5.4.4-debian_system_modules.patch
Patch10: juce-5.4.7-lxvst.patch
Patch11: juce-5.4.4-LV2-audioprocessor.patch
#Patch99: 99-default-sans-font.patch
BuildRequires: gcc-c++
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(webkit2gtk-4.0)
BuildRequires: pkgconfig(gtk+-x11-3.0)
BuildRequires: libjack-devel
BuildRequires: libcurl-devel
BuildRequires: ladspa-devel
BuildRequires: xorg-x11-server
Requires: alsa
%description
JUCE is an open-source cross-platform C++ application framework used for rapidly developing high quality desktop and mobile applications, including VST, AU (and AUv3), RTAS and AAX audio plug-ins.
JUCE can be easily integrated with existing projects or can be used as a project generation tool via the Projucer, which supports exporting projects for Xcode (macOS and iOS), Visual Studio, Android Studio,
Code::Blocks, CLion and Linux Makefiles as well as containing a source code editor and live-coding engine which can be used for rapid prototyping.
%package Projucer
Summary: Projucer IDE from JUCE project
Group: Development/Tools/Other
%description Projucer
The Projucer is a convenient application that allows you to develop, manage and deploy cross-platform applications in conjunction with your preferred IDE
%package devel
Summary: JUCE modules sources from JUCE project
Group: Development/Libraries/C and C++
%description devel
JUCE is an open-source cross-platform C++ application framework used for rapidly developing high quality desktop and mobile applications, including VST, AU (and AUv3), RTAS and AAX audio plug-ins.
JUCE can be easily integrated with existing projects or can be used as a project generation tool via the Projucer, which supports exporting projects for Xcode (macOS and iOS), Visual Studio, Android Studio,
Code::Blocks, CLion and Linux Makefiles as well as containing a source code editor and live-coding engine which can be used for rapid prototyping.
%package AudioPluginHost
Summary: AudioPluginHost from JUCE project
Group: Productivity/Multimedia/Sound/Midi
%description AudioPluginHost
The AudioPluginHost is a simple VST/LADSPA host made in JUCE Framework.
%prep
%setup -q
cp %{SOURCE1} modules/juce_audio_processors/format_types/
tar xf %{SOURCE2} -C modules/
%autopatch -p1
%build
sed -i -e 's/JUCER_ENABLE_GPL_MODE 0/JUCER_ENABLE_GPL_MODE 1/' "extras/Projucer/JuceLibraryCode/AppConfig.h"
sed -i -e 's/JUCE_PLUGINHOST_VST3="1"/JUCE_JACK="1"\ JUCE_PLUGINHOST_VST="1"/' extras/AudioPluginHost/AudioPluginHost.jucer
%define _lto_cflags %{nil}
%define X_display ":98"
cd extras/Projucer/Builds/LinuxMakefile
CONFIG=Release make %{?_smp_mflags}
cd %{_builddir}/%{name}-%{version}
#############################################
### Launch a virtual framebuffer X server ###
#############################################
export DISPLAY=%{X_display}
Xvfb %{X_display} >& Xvfb.log &
trap "kill $! || true" EXIT
sleep 10
extras/Projucer/Builds/LinuxMakefile/build/Projucer --resave extras/AudioPluginHost/AudioPluginHost.jucer
cd extras/AudioPluginHost/Builds/LinuxMakefile
CONFIG=Release make %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{_bindir}
install extras/Projucer/Builds/LinuxMakefile/build/Projucer %{buildroot}%{_bindir}
install extras/AudioPluginHost/Builds/LinuxMakefile/build/AudioPluginHost %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/juce/modules
cp -r modules/* %{buildroot}%{_datadir}/juce/modules/
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/pixmaps
cp %{SOURCE3} %{buildroot}%{_datadir}/applications/
cp %{SOURCE4} %{buildroot}%{_datadir}/pixmaps
cp %{SOURCE5} %{buildroot}%{_datadir}/applications/
cp %{SOURCE6} %{buildroot}%{_datadir}/pixmaps
find %{buildroot}%{_datadir}/juce/modules/ -type f -executable -exec chmod -x '{}' \;
%files Projucer
%{_bindir}/Projucer
%{_datadir}/applications/Projucer.desktop
%{_datadir}/pixmaps/Projucer.png
%files AudioPluginHost
%{_bindir}/AudioPluginHost
%{_datadir}/applications/AudioPluginHost.desktop
%{_datadir}/pixmaps/AudioPluginHost.png
%files devel
%dir %{_datadir}/juce/
%dir %{_datadir}/juce/modules/
%{_datadir}/juce/modules/*
%changelog