File juce.spec of Package juce6
#
# 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: 6.1.6
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/juce-framework/JUCE/
Source0: https://github.com/juce-framework/JUCE/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: juce_VSTInterface.h
Source2: juce-6.1.5-LV2_juce_audio_plugin_client.tar.gz
Source3: Projucer.desktop
Source4: Projucer.png
Source5: AudioPluginHost.desktop
Source6: AudioPluginHost.png
Source7: lv2_ttl_generator.c
Patch0: Avoid-picking-a-bold-oblique-version-of-Bitstream-Vera-Sans.patch
Patch1: Fix-font-style-could-be-incorrectly-overwritten.patch
Patch2: Avoid-segfaulting-on-Linux-when-there-are-no-installed-fonts.patch
Patch3: StandardHeader-Include-utility-for-GCC-12-compatibility.patch
Patch4: Fix-resizing-issue-with-the-PopupMenu.patch
Patch6: Sample-Accurate-MIDI-control-VST3.patch
Patch98: Use-old-JUCE-VST2-interface.patch
Patch99: JUCE-LV2.patch
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(freetype2)
BuildRequires: Mesa-libGL-devel
BuildRequires: libXrandr-devel
BuildRequires: libXcursor-devel
BuildRequires: libjack-devel
BuildRequires: libcurl-devel
BuildRequires: ladspa-devel
%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 -n JUCE6-Projucer
Summary: Projucer IDE from the JUCE project
Group: Development/Tools/Other
Requires: fontconfig
Requires: fonts-config
Requires: bitstream-vera-fonts
%description -n JUCE6-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 -n JUCE6-AudioPluginHost
Summary: AudioPluginHost from the JUCE project
Group: Development/Tools/Other
%description -n JUCE6-AudioPluginHost
The AudioPluginHost is a simple VST/VST3/LADSPA host made in JUCE Framework.
%package -n JUCE6-devel
Summary: JUCE modules and build tools from the JUCE project
Group: Development/Libraries/C and C++
%description -n JUCE6-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 -n JUCE6-source
Summary: The sources of the JUCE project
Group: Development/Libraries/C and C++
BuildArch: noarch
%description -n JUCE6-source
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.
%prep
%setup -q
%autopatch -p1
cp %{SOURCE1} modules/juce_audio_processors/format_types/
tar xf %{SOURCE2} -C modules/
%if 0%{?suse_version} > 1500
sed -i 's/webkit2gtk-4.0/webkit2gtk-4.1/' extras/Build/CMake/JUCEUtils.cmake
sed -i 's/webkit2gtk-4.0/webkit2gtk-4.1/' extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp
%endif
%build
cmake -B cmake-build-install -DJUCE_BUILD_EXTRAS=ON -DCMAKE_INSTALL_PREFIX=%{buildroot}%{_libdir}/juce -DCMAKE_BUILD_TYPE=Release
cmake --build cmake-build-install --target all %{?_smp_mflags}
%install
cmake --build cmake-build-install --target install
mkdir -p %{buildroot}%{_bindir}
#strip cmake-build-install/extras/Projucer/Projucer_artefacts/Projucer
install cmake-build-install/extras/Projucer/Projucer_artefacts/Release/Projucer %{buildroot}%{_bindir}
install cmake-build-install/extras/AudioPluginHost/AudioPluginHost_artefacts/Release/AudioPluginHost %{buildroot}%{_bindir}
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
mkdir -p %{buildroot}%{_usrsrc}
rm -rf cmake-build-install
cp -r ../%{name}-%{version} %{buildroot}%{_usrsrc}/
mkdir -p %{buildroot}%{_usrsrc}/%{name}-%{version}/extras/Build/lv2_ttl_generator
cp %{SOURCE7} %{buildroot}%{_usrsrc}/%{name}-%{version}/extras/Build/lv2_ttl_generator/
find %{buildroot}%{_libdir}/juce/include/ -type f -executable -exec chmod -x '{}' \;
find %{buildroot}%{_usrsrc}/%{name}-%{version}/ -type f -executable -exec chmod -x '{}' \;
%fdupes -s %{buildroot}%{_usrsrc}/%{name}-%{version}/
%posttrans -n JUCE6-source
if [[ -e %{_usrsrc}/%{name} ]]; then rm %{_usrsrc}/%{name}; fi; ln -s %{_usrsrc}/%{name}-%{version} %{_usrsrc}/%{name}
%preun -n JUCE6-source
if [[ -e %{_usrsrc}/%{name} ]]; then rm %{_usrsrc}/%{name}; fi
%files -n JUCE6-Projucer
%{_bindir}/Projucer
%{_datadir}/applications/Projucer.desktop
%{_datadir}/pixmaps/Projucer.png
%files -n JUCE6-AudioPluginHost
%{_bindir}/AudioPluginHost
%{_datadir}/applications/AudioPluginHost.desktop
%{_datadir}/pixmaps/AudioPluginHost.png
%files -n JUCE6-devel
%dir %{_libdir}/juce/
%dir %{_libdir}/juce/bin
%dir %{_libdir}/juce/include
%dir %{_libdir}/juce/lib
%{_libdir}/juce/bin/*
%{_libdir}/juce/include/*
%{_libdir}/juce/lib/*
%files -n JUCE6-source
%{_usrsrc}/%{name}-%{version}
%changelog