From patchwork Tue Oct 26 08:01:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thorsten Wilms X-Patchwork-Id: 34060 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 929D327BBE3; Tue, 26 Oct 2021 09:03:49 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B6B1127BBE1 for ; Tue, 26 Oct 2021 09:03:48 +0100 (BST) Received: from localhost ([::1]:56738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfHQw-0007CK-4x for patchwork@mira.cbaines.net; Tue, 26 Oct 2021 04:03:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfHPG-00077S-4H for guix-patches@gnu.org; Tue, 26 Oct 2021 04:02:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfHPF-0002Wk-PL for guix-patches@gnu.org; Tue, 26 Oct 2021 04:02:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mfHPF-0002kn-LW for guix-patches@gnu.org; Tue, 26 Oct 2021 04:02:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48632] [PATCH v2] gnu: Add eq10q. References: <20210524194310.13378-1-t_w_@freenet.de> In-Reply-To: <20210524194310.13378-1-t_w_@freenet.de> Resent-From: Thorsten Wilms Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Oct 2021 08:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48632 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48632@debbugs.gnu.org Cc: Thorsten Wilms Received: via spool by 48632-submit@debbugs.gnu.org id=B48632.163523531010565 (code B ref 48632); Tue, 26 Oct 2021 08:02:01 +0000 Received: (at 48632) by debbugs.gnu.org; 26 Oct 2021 08:01:50 +0000 Received: from localhost ([127.0.0.1]:44993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfHOu-0002kB-82 for submit@debbugs.gnu.org; Tue, 26 Oct 2021 04:01:49 -0400 Received: from mout1.freenet.de ([195.4.92.91]:39938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfHOr-0002jx-9m for 48632@debbugs.gnu.org; Tue, 26 Oct 2021 04:01:38 -0400 Received: from [195.4.92.119] (helo=sub0.freenet.de) by mout1.freenet.de with esmtpa (ID t_w_@01019freenet.de) (port 25) (Exim 4.92 #3) id 1mfHOo-0000rR-U6 for 48632@debbugs.gnu.org; Tue, 26 Oct 2021 10:01:34 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freenet.de; s=mjaymdexmjqk; h=Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=q3KWENHPj3A2XysLCZun0UMFc9MTI3UXdi59RqU8eV8=; b=ZpdNvIlwmZw0A4fJFG0wHAdcBp neNX19YrxX4Q8oqiYs6ruQ7ygCSp2mJN+QY3uTHd0ctpWUwRL1ZUzPZhbXHagqSdUCCVYzvQJoM8d cvN7HGDQegeUdGKjVAojSjyjOq99reAskcGOs4LvW4lOfiYWHaVrCJlQiZeoWmuLftz4lThyShL6v mVhZ1yWB540rA4mODEEd67EKDkjm9vYgMTvcE1PaM3UvjF/lp686SHLwlritI0Vh0BmcIygJGcxg4 7b8O21+pNUc1gjYMS85bf4DasAUXSTvTisYX/0HxOPn50xMNL3pD2a4hGm/8I/bOkcgk8pEXTIFVN D4Bw8J4w==; Received: from p200300e4f7124200b5ca35b4d0342189.dip0.t-ipconnect.de ([2003:e4:f712:4200:b5ca:35b4:d034:2189]:56270 helo=charly..) by sub0.freenet.de with esmtpsa (ID t_w_@01019freenet.de) (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (port 465) (Exim 4.92 #3) id 1mfHOo-0004dG-Nv; Tue, 26 Oct 2021 10:01:34 +0200 From: Thorsten Wilms Date: Tue, 26 Oct 2021 10:01:28 +0200 Message-Id: <20211026080128.6851-1-t_w_@freenet.de> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-Originated-At: 2003:e4:f712:4200:b5ca:35b4:d034:2189!56270 X-FNSign: v=2 s=533F6CD0D886B34A6925058FE17FEB91C2955180039BECA210676F725B1DDFEC X-Scan-TS: Tue, 26 Oct 2021 10:01:34 +0200 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/audio.scm (eq10q): New variable. * gnu/packages/patches/eq10q-lv2-descriptor.patch. * gnu/packages/patches/eq10q-exp10.patch. * /gnu/local.mk: Add patches. --- gnu/local.mk | 3 + gnu/packages/audio.scm | 40 +++++++++- gnu/packages/patches/eq10q-exp10.patch | 73 +++++++++++++++++++ .../patches/eq10q-lv2-descriptor.patch | 50 +++++++++++++ 4 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/eq10q-exp10.patch create mode 100644 gnu/packages/patches/eq10q-lv2-descriptor.patch diff --git a/gnu/local.mk b/gnu/local.mk index 28e8c1966a..0a5b93c937 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -45,6 +45,7 @@ # Copyright © 2021 Sharlatan Hellseher # Copyright © 2021 Dmitry Polyakov # Copyright © 2021 Andrew Tropin +# Copyright © 2021 Thorsten Wilms # # This file is part of GNU Guix. # @@ -1036,6 +1037,8 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \ %D%/packages/patches/enjarify-setup-py.patch \ %D%/packages/patches/enlightenment-fix-setuid-path.patch \ + %D%/packages/patches/eq10q-exp10.patch \ + %D%/packages/patches/eq10q-lv2-descriptor.patch \ %D%/packages/patches/erlang-man-path.patch \ %D%/packages/patches/esmtp-add-lesmtp.patch \ %D%/packages/patches/eudev-rules-directory.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index faf106fc68..157b75600e 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -15,7 +15,7 @@ ;;; Copyright © 2018 Clément Lassieur ;;; Copyright © 2018 Brett Gilio ;;; Copyright © 2018, 2019 Marius Bakke -;;; Copyright © 2018 Thorsten Wilms +;;; Copyright © 2018, 2021 Thorsten Wilms ;;; Copyright © 2018 Eric Bavier ;;; Copyright © 2018 Brendan Tildesley ;;; Copyright © 2019, 2021 Pierre Langlois @@ -5566,3 +5566,41 @@ (define-public mda-lv2 "MDA-LV2 is an LV2 port of the MDA plugins. It includes effects and a few instrument plugins.") (license license:gpl3+))) + +(define-public eq10q + (package + (name "eq10q") + (version "2.2") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/eq10q/eq10q-" + version ".tar.gz")) + (sha256 + (base32 + "16mhcav8gwkp29k9ki4dlkajlcgh1i2wvldabxb046d37dq4qzrk")) + (patches + (search-patches "eq10q-lv2-descriptor.patch" + "eq10q-exp10.patch")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; No target + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'override-target-directory + (lambda* (#:key outputs #:allow-other-keys) + (substitute* (find-files "CMakeLists.txt") + (("/usr/local")(assoc-ref outputs "out"))) + #t))))) + (inputs + `(("gtkmm" ,gtkmm-2) + ("lv2" ,lv2) + ("fftw" ,fftw))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (home-page "http://eq10q.sourceforge.net") + (synopsis "Audio plug-in pack for LV2") + (description + "EQ10Q is an audio plug-in pack for LV2. It contains equalizers with 1, 4, +6 or 10 bands, all in mono and stereo variants. Plus a noise-gate, compressor, +bass-booster and stereo-mode converters.") + (license (list license:gpl3+ license:gpl3+)))) diff --git a/gnu/packages/patches/eq10q-exp10.patch b/gnu/packages/patches/eq10q-exp10.patch new file mode 100644 index 0000000000..678009a700 --- /dev/null +++ b/gnu/packages/patches/eq10q-exp10.patch @@ -0,0 +1,73 @@ +Fix "‘pow10’ was not declared in this scope" error. +Taken from https://build.opensuse.org/package/view_file/home:geekositalia:daw/lv2-EQ10Q-plugins/lv2-EQ10Q-plugins-exp10.patch?expand=1 + +diff -rupN eq10q-2.2.org/gui/widgets/bandctl.cpp eq10q-2.2/gui/widgets/bandctl.cpp +--- eq10q-2.2.org/gui/widgets/bandctl.cpp 2016-12-11 07:07:50.000000000 -0500 ++++ eq10q-2.2/gui/widgets/bandctl.cpp 2018-03-10 16:29:14.026996405 -0500 +@@ -949,7 +949,7 @@ bool BandCtl::parseBtnString(BandCtl::Bu + if(str_k.length() > 0) + { + val_k = atof(str_k.c_str()) * 1e3; +- val *= pow10(3.0 - str.length()); ++ val *= exp10(3.0 - str.length()); + if(str.length() > 3) + { + //throw an error, imposible to match str > 3 with k +@@ -960,7 +960,7 @@ bool BandCtl::parseBtnString(BandCtl::Bu + } + if(str_d.length() > 0) + { +- val_d = atof(str_d.c_str())/ pow10((double)str_d.length()); ++ val_d = atof(str_d.c_str())/ exp10((double)str_d.length()); + } + + btn->value = val + val_k + val_d; +diff -rupN eq10q-2.2.org/gui/widgets/bodeplot.cpp eq10q-2.2/gui/widgets/bodeplot.cpp +--- eq10q-2.2.org/gui/widgets/bodeplot.cpp 2016-12-11 07:07:50.000000000 -0500 ++++ eq10q-2.2/gui/widgets/bodeplot.cpp 2018-03-10 16:27:06.222494049 -0500 +@@ -194,14 +194,14 @@ void PlotEQCurve::resetCenterSpan() + { + //Compute center and span for the full range spectrum + double sp = log10(MAX_FREQ/MIN_FREQ); +- double cn = MIN_FREQ * sqrt(pow10(sp)); ++ double cn = MIN_FREQ * sqrt(exp10(sp)); + setCenterSpan(cn, sp); + } + + void PlotEQCurve::setCenterSpan(double center, double span) + { +- m_minFreq = center / sqrt(pow10(span)); +- m_maxFreq = center * sqrt(pow10(span)); ++ m_minFreq = center / sqrt(exp10(span)); ++ m_maxFreq = center * sqrt(exp10(span)); + + //Initalize the grid + const double f_grid[GRID_VERTICAL_LINES] = {20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, +@@ -246,8 +246,8 @@ void PlotEQCurve::setCenter(double cente + { + //Limit center to the possible range according the current span + double sp = log10(m_maxFreq/m_minFreq); +- double cmin = MIN_FREQ * sqrt(pow10(sp)); +- double cmax = MAX_FREQ / sqrt(pow10(sp)); ++ double cmin = MIN_FREQ * sqrt(exp10(sp)); ++ double cmax = MAX_FREQ / sqrt(exp10(sp)); + + double cn = center; + cn = cn > cmax ? cmax : cn; +@@ -259,7 +259,7 @@ void PlotEQCurve::setSpan(double span) + { + //Limit center to the possible range according the current span + double sp_act = log10(m_maxFreq/m_minFreq); +- double cn = m_minFreq * sqrt(pow10(sp_act)); ++ double cn = m_minFreq * sqrt(exp10(sp_act)); + double smax1 = 2.0*log10(cn/MIN_FREQ); + double smax2= 2.0*log10(MAX_FREQ/cn); + double smax = smax1 < smax2 ? smax1 : smax2; +@@ -306,7 +306,7 @@ void PlotEQCurve::recomputeCenterFreq(do + double fmax = MIN_FREQ*pow((MAX_FREQ/MIN_FREQ),((local_x2 + 3.5)/((double)m_zoom_surface_ptr->get_width()))); + + double sp_act = log10(fmax/fmin); +- double cn = fmin * sqrt(pow10(sp_act)); ++ double cn = fmin * sqrt(exp10(sp_act)); + setCenter(cn); + } diff --git a/gnu/packages/patches/eq10q-lv2-descriptor.patch b/gnu/packages/patches/eq10q-lv2-descriptor.patch new file mode 100644 index 0000000000..aabd078356 --- /dev/null +++ b/gnu/packages/patches/eq10q-lv2-descriptor.patch @@ -0,0 +1,50 @@ +Replace _LV2UI_Descriptor with LV2UI_Descriptor + +diff -rupN eq10q-2.2_original/gui/bassup_ui.cpp eq10q-2.2_patched/gui/bassup_ui.cpp +--- eq10q-2.2_original/gui/bassup_ui.cpp 2016-12-11 13:07:52.000000000 +0100 ++++ eq10q-2.2_patched/gui/bassup_ui.cpp 2021-05-24 19:24:34.363536592 +0200 +@@ -38,7 +38,7 @@ using namespace std; + #define BASSUP_GUI_URI "http://eq10q.sourceforge.net/bassup/gui" + + +-static LV2UI_Handle instantiateBassUp_gui(const _LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features) ++static LV2UI_Handle instantiateBassUp_gui(const LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features) + { + #ifdef TESTING_EQ10Q + cout<<"instantiateEq10q_gui Entring... "; +diff -rupN eq10q-2.2_original/gui/dyn_ui.cpp eq10q-2.2_patched/gui/dyn_ui.cpp +--- eq10q-2.2_original/gui/dyn_ui.cpp 2016-12-11 13:07:50.000000000 +0100 ++++ eq10q-2.2_patched/gui/dyn_ui.cpp 2021-05-24 19:24:34.363536592 +0200 +@@ -37,7 +37,7 @@ This plugin is inside the Sapista Plugin + using namespace std; + #endif + +-static LV2UI_Handle instantiateDyn_gui(const _LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features) ++static LV2UI_Handle instantiateDyn_gui(const LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features) + { + #ifdef TESTING_EQ10Q + cout<<"instantiateDyn_gui Entring... "; +diff -rupN eq10q-2.2_original/gui/eq10q_ui.cpp eq10q-2.2_patched/gui/eq10q_ui.cpp +--- eq10q-2.2_original/gui/eq10q_ui.cpp 2016-12-11 13:07:50.000000000 +0100 ++++ eq10q-2.2_patched/gui/eq10q_ui.cpp 2021-05-24 19:24:34.363536592 +0200 +@@ -38,7 +38,7 @@ using namespace std; + #endif + + +-static LV2UI_Handle instantiateEq10q_gui(const _LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features) ++static LV2UI_Handle instantiateEq10q_gui(const LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features) + { + #ifdef TESTING_EQ10Q + cout<<"instantiateEq10q_gui Entring... "; +diff -rupN eq10q-2.2_original/gui/midside_ui.cpp eq10q-2.2_patched/gui/midside_ui.cpp +--- eq10q-2.2_original/gui/midside_ui.cpp 2016-12-11 13:07:53.000000000 +0100 ++++ eq10q-2.2_patched/gui/midside_ui.cpp 2021-05-24 19:24:34.367536562 +0200 +@@ -37,7 +37,7 @@ This plugin is inside the Sapista Plugin + using namespace std; + #endif + +-static LV2UI_Handle instantiateMidSide_gui(const _LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features) ++static LV2UI_Handle instantiateMidSide_gui(const LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features) + { + #ifdef TESTING_EQ10Q + cout<<"instantiateEq10q_gui Entring... ";