From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IDhiE76A9WFRFAEAgWs5BA (envelope-from ) for ; Sat, 29 Jan 2022 19:00:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wDX6D76A9WEnLAAAauVa8A (envelope-from ) for ; Sat, 29 Jan 2022 19:00:30 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id ADA202B6FA for ; Sat, 29 Jan 2022 19:00:29 +0100 (CET) Received: from localhost ([::1]:60716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDs1U-0000EV-Pm for larch@yhetil.org; Sat, 29 Jan 2022 13:00:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDs14-0000CP-SV for bug-guix@gnu.org; Sat, 29 Jan 2022 13:00:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDs14-0005Gk-J0 for bug-guix@gnu.org; Sat, 29 Jan 2022 13:00:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDs14-00014b-IT for bug-guix@gnu.org; Sat, 29 Jan 2022 13:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#53591: [PATCH] gnu: audacity: Add fallback to locate ffmpeg via pkg-config. References: In-Reply-To: Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Jan 2022 18:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53591 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 53591@debbugs.gnu.org Received: via spool by 53591-submit@debbugs.gnu.org id=B53591.16434791594040 (code B ref 53591); Sat, 29 Jan 2022 18:00:02 +0000 Received: (at 53591) by debbugs.gnu.org; 29 Jan 2022 17:59:19 +0000 Received: from localhost ([127.0.0.1]:34745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDs0M-000136-Nr for submit@debbugs.gnu.org; Sat, 29 Jan 2022 12:59:19 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:47095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDs0L-00012t-5m for 53591@debbugs.gnu.org; Sat, 29 Jan 2022 12:59:17 -0500 Received: by mail-ed1-f68.google.com with SMTP id m11so17269102edi.13 for <53591@debbugs.gnu.org>; Sat, 29 Jan 2022 09:59:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:to:cc:content-transfer-encoding:message-id :mime-version; bh=4C2DzHGwBWbfd46W9/Sj6ByzZWFzikVv2IPisthVNek=; b=ZHFbiiXvsPXFDCaYNjYb5DINMoO/G0crp9J6te/v+eQYoqb5Sk2CW0U/kBnvJl3wL0 5iL/gdgdJHrlgK+dwV2bIKG8HsgBP05QQJo2swql1daYXqtqa1lMcnNrJn7Op4IPjeET kc2/V07DaW1KOzKmQ2/SkTsqXqf2EP7VBI9iQcYo3CvOvhyrZq/RxlQzmZzdaboKJgb6 7hNgj/nemaOG3757gkshDm3D0zdXTQTWeriMgGAC2NtD1G+6Ufw0jgsh16GgDoRcuFIg 9r5QlF861eK+oBTX5tHI9eg4WcdTI2Xbs1q0/MechIoq8Zx2nOOjeJRcVSLy7mskTh7V GymA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:to:cc :content-transfer-encoding:message-id:mime-version; bh=4C2DzHGwBWbfd46W9/Sj6ByzZWFzikVv2IPisthVNek=; b=XYUfihoWBg+SFK736Rkg29aS8THw1bmpf7zATk+csJ30oIoD9k239Ba/jdrO376X9g B3zGFnVIDeCj4zA1zgsu4KPSKR28GnSZRQYSkOwYMTG9/FqG+EU8dXeZE6f57MZc6k21 di/Fadr+py9fWxyO/NeYGXq6NtNOq5b6SYYkNfuXpL3plykIAilr28A+8LGkivHez+bP AqIhUK5Px/h2R0ukDt4Mk2sNQflxkNwPx3uGSa+87WidmLubuTvxxjDTOp74SIAgKZeJ 7vAwyk9T8Vc5Pa6UobJSpEIitIPxCXIsEMVJ6Ph9+/vIM5EaN7h1YCabhOP9+jqLcTlc KynA== X-Gm-Message-State: AOAM532Eij0uGPMVjy894upYcAFj5Eth6MJwXRQ2AXq26ZmXU6CPzieb X2+Rkv3u5NFvt9UHWlWSOek4iuyvNWk= X-Google-Smtp-Source: ABdhPJyxidDXRJs7zZkI9Q63i0n9v8MJPLanolSsizwvIEhdW1OBNyCdN1B8eFdfxPYLlciz4c21zw== X-Received: by 2002:a05:6402:1c95:: with SMTP id cy21mr13603282edb.170.1643479151010; Sat, 29 Jan 2022 09:59:11 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id i16sm11396913eja.8.2022.01.29.09.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Jan 2022 09:59:10 -0800 (PST) From: Liliana Marie Prikler Date: Sat, 29 Jan 2022 18:54:54 +0100 Content-Transfer-Encoding: 7bit Message-ID: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643479230; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4C2DzHGwBWbfd46W9/Sj6ByzZWFzikVv2IPisthVNek=; b=SbZQ+hdE4BpQvdIN+hAk87mW29OFR40lNVrwIDOBRnZ5n7kRcvX3iBKrsVdymNIolgblGI MM6jVyjEwdyzJeWd1gMOafGi0xAlsYgKO9aESID/1ommX/yQuMgKTDpkVr36MBU/pnd0j5 5EstcLT5+qQU83e7vkbEQMW/UP1A21tSvOwbd42fVR+LKpFhxV4Jk+yq9tI/D6U38UpvAQ 8SBJycXUFlxtaIzddRNuvcCsR1TTjWGRM1PAWqZT9sF3Hdyp8kDES4Bg0jGnho0xAeVRzM doqVkX9r7YL1uKrH9pR7y6iX5Z7Kjzp2N5eHzu3FvuU8KdwNRJiQyJfHgho/LA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643479230; a=rsa-sha256; cv=none; b=OAzcOinpq3jkQaE34rj5szfXNRJgLLi1rh2NWHtQDDk/YlY59rrx/OQlAU7p4dGv2o3tZo X8fpY0YH/sGcbduZpeUbhBXqx8OjSUDCOkiUo/d6zE66BHXmWC+figTsuAINgyPqX3Irpk YFoQoN1n8ZulHMbogdFVSL0/Ucrh7lCfCRCvuriZc3oNdkGuw069bpAHVfzrj/1pavtUy7 4mDzS8iolx3LKuNuHm/getZ3wfrhj6prmMQWuXxALamhLfnnyoOYO++xBpauTTSIwre6cN +l0VUnzP7CCPm30YEjoeXiN0yO3iy4y+WV7GzVDIy6XupMVpaFuJNu94qQzZ/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ZHFbiiXv; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ZHFbiiXv; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: ADA202B6FA X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: ceNDZzi4vrV4 * gnu/packages/patches/audacity-ffmpeg-fallback.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it here. * gnu/packages/audio.scm (audacity)[patches]: Use it here. [inputs]: Add back ffmpeg. --- gnu/local.mk | 1 + gnu/packages/audio.scm | 2 + .../patches/audacity-ffmpeg-fallback.patch | 61 +++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 gnu/packages/patches/audacity-ffmpeg-fallback.patch diff --git a/gnu/local.mk b/gnu/local.mk index 96e6cb08f4..898e8e92e3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -859,6 +859,7 @@ dist_patch_DATA = \ %D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch \ %D%/packages/patches/ath9k-htc-firmware-objcopy.patch \ %D%/packages/patches/atlas-gfortran-compat.patch \ + %D%/packages/patches/audacity-ffmpeg-fallback.patch \ %D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \ %D%/packages/patches/audiofile-fix-sign-conversion.patch \ %D%/packages/patches/audiofile-CVE-2015-7747.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index feccf662b0..22dd88ef0c 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -738,6 +738,7 @@ (define-public audacity (sha256 (base32 "189agx11361k9j958s6q5bngnnfx0rwaf0dwbjxy6fwvsb1wv3px")) + (patches (search-patches "audacity-ffmpeg-fallback.patch")) (modules '((guix build utils))) (snippet ;; Remove bundled libraries. @@ -768,6 +769,7 @@ (define-public audacity lame linux-libre-headers flac + ffmpeg libid3tag libjpeg-turbo libmad diff --git a/gnu/packages/patches/audacity-ffmpeg-fallback.patch b/gnu/packages/patches/audacity-ffmpeg-fallback.patch new file mode 100644 index 0000000000..9e88973241 --- /dev/null +++ b/gnu/packages/patches/audacity-ffmpeg-fallback.patch @@ -0,0 +1,61 @@ +From 3c20057d0cbbbed453a692d4dd4589d865808024 Mon Sep 17 00:00:00 2001 +From: Liliana Marie Prikler +Date: Sat, 29 Jan 2022 10:44:44 +0100 +Subject: [PATCH] Add pkg-config fallback for locating ffmpeg. + +--- + libraries/lib-ffmpeg-support/CMakeLists.txt | 8 ++++++++ + libraries/lib-ffmpeg-support/FFmpegFunctions.cpp | 12 ++++++++++++ + 2 files changed, 20 insertions(+) + +diff --git a/libraries/lib-ffmpeg-support/CMakeLists.txt b/libraries/lib-ffmpeg-support/CMakeLists.txt +index 8c5f06d7c..00810e4d0 100644 +--- a/libraries/lib-ffmpeg-support/CMakeLists.txt ++++ b/libraries/lib-ffmpeg-support/CMakeLists.txt +@@ -1,5 +1,7 @@ + + if (${_OPT}use_ffmpeg) ++ pkg_check_modules(FFMPEG libavcodec libavformat libavutil) ++ + set( SOURCES + FFmpegTypes.h + +@@ -100,6 +102,12 @@ if (${_OPT}use_ffmpeg) + list(APPEND DEFINITIONS PRIVATE _DARWIN_C_SOURCE ) + endif() + ++ if (FFMPEG_FOUND) ++ pkg_get_variable(LIBAVCODEC_LIBDIR libavcodec libdir) ++ list(APPEND DEFINITIONS PRIVATE ++ "-DFFMPEG_PC_LIBDIR=L\"${LIBAVCODEC_LIBDIR}\"") ++ endif() ++ + audacity_library( lib-ffmpeg-support "${SOURCES}" "${LIBRARIES}" + "${DEFINITIONS}" "" + ) +diff --git a/libraries/lib-ffmpeg-support/FFmpegFunctions.cpp b/libraries/lib-ffmpeg-support/FFmpegFunctions.cpp +index 66d085a0b..4eeb4aed3 100644 +--- a/libraries/lib-ffmpeg-support/FFmpegFunctions.cpp ++++ b/libraries/lib-ffmpeg-support/FFmpegFunctions.cpp +@@ -238,6 +238,18 @@ struct FFmpegFunctions::Private final + if (library->IsLoaded()) + return library; + ++#if defined(FFMPEG_PC_LIBDIR) ++ { ++ static const wxString libdir{FFMPEG_PC_LIBDIR}; ++ const wxString fullName = wxFileName(libdir, libraryName).GetFullPath(); ++ ++ auto library = std::make_shared(fullName); ++ ++ if (library->IsLoaded()) ++ return library; ++ } ++#endif ++ + // Loading has failed. + // wxLogSysError doesn't report errors correctly on *NIX + #if defined(_WIN32) +-- +2.34.0 + -- 2.34.0