From a2780b32b23829b1bfb1a245cc9cc44d59c207da Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Feb 22 2021 23:35:39 +0000 Subject: New upstream release 0.17.1 - Switch to CMake build system - Add AppData and updated desktop file from https://github.com/monocasual/giada/pull/358 - Add virtual Provides, and update License field, for bundled dependencies - Update summary and description from upstream - Build Giada with tests and run them --- diff --git a/.gitignore b/.gitignore index 8715bdf..f1cbca4 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /giada-0.16.3.1-src.tar.gz /giada-0.16.4-src.tar.gz /giada-0.17.0-src.tar.gz +/giada-0.17.1-src.tar.gz diff --git a/com.giadamusic.Giada.appdata.xml b/com.giadamusic.Giada.appdata.xml new file mode 100644 index 0000000..48f362a --- /dev/null +++ b/com.giadamusic.Giada.appdata.xml @@ -0,0 +1,46 @@ + + + + com.giadamusic.Giada + CC0 + GPL-2.0+ + Giada + Your hardcore loop machine + +

+ Giada is an open source, minimalistic and hardcore music + production tool. Designed for DJs, live performers and electronic + musicians. +

+
+ + com.giadamusic.Giada.desktop + + + + https://www.giadamusic.com/images/screenshots/giada-loop-machine-screenshot-03-large-project.png + + A fairly large project with samples and MIDI events + + + + https://www.giadamusic.com/images/screenshots/giada-loop-machine-screenshot-17-midi-action-editor.png + + New Action Editor for MIDI events + + + + https://www.giadamusic.com/images/screenshots/giada-loop-machine-screenshot-01-sample-editor.png + + Chopping samples in the advanced Sample Editor + + + giadaloopmachine_AT_gmail.com + https://www.giadamusic.com/ + https://www.giadamusic.com/forum + https://github.com/monocasual/giada/issues + + + + +
diff --git a/com.giadamusic.Giada.desktop b/com.giadamusic.Giada.desktop new file mode 100644 index 0000000..766bdfb --- /dev/null +++ b/com.giadamusic.Giada.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Giada +Name[es]=Giada +GenericName=Drum machine and loop sequencer +GenericName[es]=Caja de ritmos y secuenciador de loops +Exec=giada %f +Terminal=false +Icon=giada-logo +Categories=Music;AudioVideo;Audio;Midi;X-Digital_Processing;X-Jack;X-MIDI; +Keywords=Giada; \ No newline at end of file diff --git a/giada-0.17.1-find-external-dependencies.patch b/giada-0.17.1-find-external-dependencies.patch new file mode 100644 index 0000000..3db033c --- /dev/null +++ b/giada-0.17.1-find-external-dependencies.patch @@ -0,0 +1,59 @@ +diff -Naur giada-0.17.1-src-original/CMakeLists.txt giada-0.17.1-src/CMakeLists.txt +--- giada-0.17.1-src-original/CMakeLists.txt 2021-02-01 12:41:42.000000000 -0500 ++++ giada-0.17.1-src/CMakeLists.txt 2021-02-22 11:19:35.817894245 -0500 +@@ -250,12 +250,25 @@ + find_package(Threads REQUIRED) + list(APPEND LIBRARIES ${Threads_LIBRARY}) + ++# pkg-config/pkgconf, required to find some external dependencies on some ++# platforms ++find_package(PkgConfig) ++ + # RtMidi + + find_package(RtMidi CONFIG) + if (RtMidi_FOUND) + list(APPEND LIBRARIES RtMidi::rtmidi) +-else() ++ message("RtMidi library found in " ${RtMidi_DIR}) ++elseif (PkgConfig_FOUND) ++ pkg_check_modules(RtMidi IMPORTED_TARGET rtmidi) ++ if (RtMidi_FOUND) ++ list(APPEND LIBRARIES PkgConfig::RtMidi) ++ message("RtMidi library found") ++ endif() ++endif() ++ ++if (NOT RtMidi_FOUND) + # Fallback to find_library mode (in case rtmidi is too old). + find_library(LIBRARY_RTMIDI NAMES rtmidi) + list(APPEND LIBRARIES ${LIBRARY_RTMIDI}) +@@ -269,10 +282,9 @@ + + find_path(LIBRARY_RTMIDI_INCLUDE_DIR RtMidi.h PATH_SUFFIXES rtmidi) + list(APPEND INCLUDE_DIRS ${LIBRARY_RTMIDI_INCLUDE_DIR}) ++ message("RtMidi library found in " ${RtMidi_DIR}) + endif() + +-message("RtMidi library found in " ${RtMidi_DIR}) +- + # FLTK + + set(FLTK_SKIP_FLUID TRUE) # Don't search for FLTK's fluid +@@ -287,7 +299,15 @@ + if (SndFile_FOUND) + list(APPEND LIBRARIES SndFile::sndfile) + message("Libsndfile library found in " ${SndFile_DIR}) +-else() ++elseif(PkgConfig_FOUND) ++ pkg_check_modules(SndFile IMPORTED_TARGET sndfile) ++ if (SndFile_FOUND) ++ list(APPEND LIBRARIES PkgConfig::SndFile) ++ message("Libsndfile library found") ++ endif() ++endif() ++ ++if (NOT SndFile_FOUND) + # Fallback to find_library mode (in case libsndfile is too old). + find_library(LIBRARY_SNDFILE NAMES sndfile libsndfile libsndfile-1) + diff --git a/giada-0.17.1-fix-install-path.patch b/giada-0.17.1-fix-install-path.patch new file mode 100644 index 0000000..b3de28b --- /dev/null +++ b/giada-0.17.1-fix-install-path.patch @@ -0,0 +1,12 @@ +diff -Naur giada-0.17.1-src-original/CMakeLists.txt giada-0.17.1-src/CMakeLists.txt +--- giada-0.17.1-src-original/CMakeLists.txt 2021-02-01 12:41:42.000000000 -0500 ++++ giada-0.17.1-src/CMakeLists.txt 2021-02-20 13:29:48.152058634 -0500 +@@ -500,7 +500,7 @@ + # Install rules + # ------------------------------------------------------------------------------ + +-install(TARGETS giada DESTINATION ${CMAKE_INSTALL_PREFIX}) ++install(TARGETS giada DESTINATION bin) + + # ------------------------------------------------------------------------------ + # Extra diff --git a/giada-0.17.1-suppress-format-security.patch b/giada-0.17.1-suppress-format-security.patch new file mode 100644 index 0000000..5a000de --- /dev/null +++ b/giada-0.17.1-suppress-format-security.patch @@ -0,0 +1,20 @@ +diff -Naur giada-0.17.1-src-original/src/utils/log.h giada-0.17.1-src/src/utils/log.h +--- giada-0.17.1-src-original/src/utils/log.h 2021-02-01 12:41:42.000000000 -0500 ++++ giada-0.17.1-src/src/utils/log.h 2021-02-19 15:59:03.741888609 -0500 +@@ -84,6 +84,8 @@ + + if (mode == LOG_MODE_FILE && stat == true) { + // Replace any std::string in the arguments by its C-string ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wformat-security" + std::fprintf(f, format, string_to_c_str(std::forward(args))...); + #ifdef _WIN32 + fflush(f); +@@ -91,6 +93,7 @@ + } + else + std::printf(format, string_to_c_str(std::forward(args))...); ++#pragma GCC diagnostic pop + } + } // giada::u::log + diff --git a/giada.desktop b/giada.desktop deleted file mode 100644 index d4e864a..0000000 --- a/giada.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Giada -Name[es]=Giada -GenericName=Drum machine and loop sequencer -GenericName[es]=Caja de ritmos y sequenciador de loops -Icon=giada -Type=Application -Exec=giada -Terminal=false -Categories=AudioVideo;Audio;X-Digital_Processing;X-Jack;X-MIDI;Midi; diff --git a/giada.spec b/giada.spec index 55d5ed0..94af237 100644 --- a/giada.spec +++ b/giada.spec @@ -1,71 +1,282 @@ +%bcond_without tests Name: giada -Version: 0.17.0 -Release: 2%{?dist} -Summary: An audio looping machine - -License: GPLv3+ +Version: 0.17.1 +Release: 1%{?dist} +Summary: Your hardcore loop machine + +# The entire source is GPLv3+, except: +# - src/deps/json is (MIT and CC0), where the overall license is MIT and the +# bundled copy of Hedley is CC0 +# - src/deps/juce is GPLv3, except: +# * src/deps/juce/modules/juce_audio_basics is ISC, except: +# > juce_GenericInterpolator.h, juce_Interpolators.cpp, +# juce_Interpolators.h, and juce_WindowedSincInterpolator.cpp in +# src/deps/juce/modules/juce_audio_basics/utilities are still GPLv3 +# * src/deps/juce/modules/juce_audio_devices is ISC, except: +# > src/deps/juce/modules/juce_audio_devices/native/oboe/ is ASL 2.0 +# * src/deps/juce/modules/juce_audio_formats/codecs/flac is BSD +# * src/deps/juce/modules/juce_audio_formats/codecs/oggvorbis is BSD +# * src/deps/juce/modules/juce_audio_plugin_client/AUResources.r, +# src/deps/juce/modules/juce_audio_plugin_client/AU/AUResources.r, and +# src/deps/juce/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/ +# are MIT +# * src/deps/juce/modules/juce_audio_processors/format_types/VST3_SDK/base/, +# src/deps/juce/modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/, +# and +# src/deps/juce/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivsttestplugprovider.h +# are BSD +# * src/deps/juce/modules/juce_blocks_basics/ is ISC +# * src/deps/juce/modules/juce_box2d/box2d/ is zlib +# * src/deps/juce/modules/juce_core/ is ISC, except: +# > src/deps/juce/modules/juce_core/zip/zlib is zlib +# * src/deps/juce/modules/juce_events/ is ISC +# * src/deps/juce/modules/juce_graphics/image_formats/jpglib is IJG +# * src/deps/juce/modules/juce_graphics/image_formats/pnglib is zlib +# - src/deps/rtaudio is MIT, except: +# * src/deps/rtaudio/include/soundcard.h is BSD +# - src/deps/vst3sdk is GPLv3, except: +# * src/deps/vst3sdk/base/, src/deps/vst3sdk/public.sdk/, and +# src/deps/vst3sdk/pluginterfaces/vst/ivsttestplugprovider.h are BSD +# +# The following sources, which would otherwise contribute to the License field, +# are removed in prep: (none yet) +License: GPLv3+ and MIT and CC0 and GPLv3 and ISC and ASL 2.0 and BSD and zlib and IJG URL: https://www.giadamusic.com Source0: %{url}/data/%{name}-%{version}-src.tar.gz -# submitted upstream https://github.com/monocasual/giada/issues/5 -Source1: giada.desktop +# https://github.com/monocasual/giada/pull/358 +Source1: https://raw.githubusercontent.com/monocasual/giada/ff1ba651301a2419d6a2b7680ea8432f8e440a74/extras/com.giadamusic.Giada.desktop +# https://github.com/monocasual/giada/pull/358 +Source2: https://raw.githubusercontent.com/monocasual/giada/ff1ba651301a2419d6a2b7680ea8432f8e440a74/extras/com.giadamusic.Giada.appdata.xml + +# We need to use pkg-config/pkgconf to find rtaudio and libsndfile. +# https://github.com/monocasual/giada/issues/451 +Patch1: %{name}-0.17.1-find-external-dependencies.patch +# This is a C++ logging wrapper that passes its format string parameter through +# to std::fprintf, which inherently means the format string cannot be a +# literal. We use GCC pragmas to suppress the warning in just this one spot. +Patch2: %{name}-0.17.1-suppress-format-security.patch +# Binary should be installed as /usr/bin/giada, not /usr/giada; reported +# upstream with patch at https://github.com/monocasual/giada/issues/450. +Patch3: %{name}-0.17.1-fix-install-path.patch -BuildRequires: gcc-c++ -BuildRequires: libsndfile-devel -BuildRequires: alsa-lib-devel -BuildRequires: fltk-fluid -BuildRequires: fltk-devel BuildRequires: desktop-file-utils -BuildRequires: icoutils -BuildRequires: jansson-devel -BuildRequires: rtaudio-devel -BuildRequires: rtmidi-devel -BuildRequires: libXpm-devel -BuildRequires: libXext-devel -BuildRequires: jack-audio-connection-kit-devel -BuildRequires: pulseaudio-libs-devel -BuildRequires: libsamplerate-devel -BuildRequires: libXcursor-devel -BuildRequires: libXinerama-devel -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool -BuildRequires: make +# For AppData file validation +BuildRequires: libappstream-glib + +BuildRequires: gcc-c++ +BuildRequires: cmake +# It is our choice whether to use the make backend or the ninja backend. +BuildRequires: ninja-build + +BuildRequires: pkgconfig(rtmidi) + +BuildRequires: cmake(FLTK) + +BuildRequires: pkgconfig(sndfile) +BuildRequires: pkgconfig(samplerate) + +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xcursor) +BuildRequires: pkgconfig(xfixes) +BuildRequires: pkgconfig(xft) +BuildRequires: pkgconfig(xinerama) +BuildRequires: pkgconfig(xpm) +BuildRequires: pkgconfig(xrandr) +BuildRequires: pkgconfig(xrender) + +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(libpulse-simple) +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(jack) +BuildRequires: pkgconfig(freetype2) + +%if %{with tests} +BuildRequires: cmake(Catch2) +# Support graphical tests in non-graphical environment +BuildRequires: xorg-x11-server-Xvfb +%endif + +# For /usr/share/icons/hicolor/*/apps +Requires: hicolor-icon-theme + +# ============================================================================ +# “JSON for Modern C++”, https://github.com/nlohmann/json +# +# The version comes from the initial comment header, and from “#define +# NLOHMANN_JSON_VERSION_MAJOR”, “#define NLOHMANN_JSON_VERSION_MINOR”, and +# “#define NLOHMANN_JSON_VERSION_PATCH”, in +# src/deps/json/single_include/nlohmann/json.hpp for version +# +# See https://github.com/nlohmann/json/issues/2651, where support for +# unbundling Hedley was requested. +Provides: bundled(nlohmann-json) = 3.9.1 +# That, in turn, bundles “Hedley”, https://nemequ.github.io/hedley +# +# The version comes from “#define JSON_HEDLEY_VERSION” in +# src/deps/json/single_include/nlohmann/json.hpp. +Provides: bundled(hedley) = 13 +# ============================================================================ + +# ============================================================================ +# “JUCE”, https://juce.com/ +# +# The version comes from ChangeLog. That, in turn, bundles a lot of libraries, +# listed below. +# +# See https://github.com/juce-framework/JUCE/issues/860, where support for +# unbundling these was requested. +Provides: bundled(juce) = 6.0.4 +# “Oboe”, https://github.com/google/oboe +# +# The version comes from +# src/deps/juce/modules/juce_audio_devices/native/oboe/readme.md. +Provides: bundled(oboe) = 1.4.2 +# libogg +# +# The version is unclear. +Provides: bundled(libogg) +# libvorbis +# +# The version comes from the name of the subdirectory of +# src/deps/juce/modules/juce_audio_formats/codecs/oggvorbis/ +Provides: bundled(libvorbis) = 1.3.7 +# libFLAC +# +# The version is unclear (only the API version is in the source code) +Provides: bundled(flac) +# Core Audio Utility Classes +# +# The version comes from the header of any arbitrary file in +# src/deps/juce/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/. +Provides: bundled(core-audio-utility-classes) = 1.1 +# VST3 SDK +# +# The version comes from “#define kVstVersionString” in +# src/deps/juce/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vsttypes.h. +Provides: bundled(vst3-sdk) = 3.6.13 +# Box2D +# +# The version comes from “b2Version b2_version” in +# src/deps/juce/modules/juce_box2d/box2d/Common/b2Settings.cpp. +Provides: bundled(Box2D) = 2.2.1 +# zlib +# +# The version comes from “#define ZLIB_VERSION” in +# src/deps/juce/modules/juce_core/zip/zlib/zlib.h. +Provides: bundled(zlib) = 1.2.3 +# “The Independent JPEG Group's JPEG software” +# +# The version comes from “#define JPEG_LIB_VERSION”, and the following comment, +# in src/deps/juce/modules/juce_graphics/image_formats/jpglib/jpeglib.h. +Provides: bundled(libjpeg) = 6b +# libpng +# +# The version comes from the header comment of +# src/deps/juce/modules/juce_graphics/image_formats/pnglib/png.h. +Provides: bundled(libpng) = 1.6.37 +# ============================================================================ + +# ============================================================================ +# rtaudio (https://github.com/thestk/rtaudio) +# +# The version comes from “#define RTAUDIO_VERSION” in +# src/deps/rtaudio/RtAudio.h. +Provides: bundled(rtaudio) = 5.1.0 +# ============================================================================ + +# ============================================================================ +# VST3 SDK +# +# In addition to the copy bundled with the bundled JUCE, there is a second +# bundled copy, where the version comes from “#define kVstVersionString” in +# src/deps/vst3sdk/pluginterfaces/vst/vsttypes.h. +Provides: bundled(vst3-sdk) = 3.7.0 +# ============================================================================ + + +# Consistent behavior on F32 +%undefine __cmake_in_source_build %description -giada is an audio looper for ALSA/JACK using the FLTK toolit. -Load or record up to 32 samples, choose to play them in single mode -(drum machine) or loop mode (sequencer) and start the show with your computer -keyboard as a controller. Giada aims to be a compact and portable virtual -device for Linux for production use and live sets. +Giada is an open source, minimalistic and hardcore music production tool. +Designed for DJs, live performers and electronic musicians. + + %prep -%setup -q -n %{name}-%{version}-src +%autosetup -n %{name}-%{version}-src -p1 -# convert icon -icotool -x src/ext/giada.ico +# At least on Fedora, this keeps CMake from expecting the static FLTK library. +# It is not clear whether this is an FLTK bug (upstream or Fedora), or a Giada +# bug, so we have not attempted to report it to any upstream. +sed -r -i 's/(FLTK)[[:blank:]]+CONFIG/\1/' CMakeLists.txt -# fix build issue -sed -i 's|%f|%.3f|' src/gui/elems/mainWindow/mainTimer.cpp %build -./autogen.sh -%configure --prefix=%{_prefix} --target=linux --enable-system-catch -%make_build +# VST2 does not work: +# In file included from ../src/deps/juce/modules/juce_audio_processors/juce_audio_processors.cpp:149: +# ../src/deps/juce/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp:49:10: fatal error: pluginterfaces/vst2.x/aeffect.h: No such file or directory +# 49 | #include +# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +%cmake \ + -DWITH_VST2:BOOL=OFF \ + -DWITH_VST3:BOOL=ON \ + -DWITH_TESTS:BOOL=%{?with_tests:ON}%{?!with_tests:OFF} \ + -GNinja +%cmake_build + %install -%make_install -desktop-file-install --dir=%{buildroot}%{_datadir}/applications %SOURCE1 -install -D -m 644 giada_1_48x48x32.png %{buildroot}%{_datadir}/pixmaps/giada.png +%cmake_install +# https://github.com/monocasual/giada/pull/358 +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} +# https://github.com/monocasual/giada/pull/358 +install -m 0644 -p -D -t %{buildroot}%{_metainfodir} %{SOURCE2} +install -m 0644 -p -D -t %{buildroot}%{_datadir}/icons/hicolor/128x128/apps \ + extras/%{name}-logo.png + + +%check +# Validate the installed AppData file. Fedora guidelines require validate-relax +# to pass (but not validate-strict), and do require validation at build time. +appstream-util validate-relax --nonet \ + %{buildroot}%{_metainfodir}/com.giadamusic.Giada.appdata.xml + +%if %{with tests} +xvfb-run -a %{buildroot}%{_bindir}/giada --run-tests +%endif + +find %{_vpath_builddir} -type f +find %{buildroot} -type f + %files %license COPYING %doc ChangeLog README.md + %{_bindir}/%{name} -%{_datadir}/applications/%{name}.desktop -%{_datadir}/pixmaps/%{name}.png + +# https://github.com/monocasual/giada/pull/358 +%{_metainfodir}/com.giadamusic.Giada.appdata.xml +# https://github.com/monocasual/giada/pull/358 +%{_datadir}/applications/com.giadamusic.Giada.desktop +# https://github.com/monocasual/giada/pull/358 +%{_datadir}/icons/hicolor/128x128/apps/%{name}-logo.png + %changelog +* Mon Feb 22 2021 Benjamin A. Beasley - 0.17.1-2 +- New upstream release 0.17.1 +- Switch to CMake build system +- Add AppData and updated desktop file from + https://github.com/monocasual/giada/pull/358 +- Add virtual Provides, and update License field, for bundled dependencies +- Update summary and description from upstream +- Build Giada with tests, and run them at build time + * Tue Jan 26 2021 Fedora Release Engineering - 0.17.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 68f45db..82ffc5c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (giada-0.17.0-src.tar.gz) = 1a94da20d0901315b05adc225aa3f21e83abaa27157b810bfcf9d55fa2fa77ebaea8305aa20e37851a21797f9a986dde38e76cdb70a0ef3ffdf3a6e0d82b32c6 +SHA512 (giada-0.17.1-src.tar.gz) = 5e4c0f0c1a2dddbee54d2b026a7bf8aaec48f91d93939bde3c760dee2aa4b25b651b232095b15c5337f76df1155987bfa6d08a4d7196d6773fd89c95269cb530