From patchwork Mon Sep 7 12:15:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 23937 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 3D46127BBE8; Mon, 7 Sep 2020 13:17:09 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 DADAF27BBE7 for ; Mon, 7 Sep 2020 13:17:08 +0100 (BST) Received: from localhost ([::1]:32930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFG55-0004rY-W6 for patchwork@mira.cbaines.net; Mon, 07 Sep 2020 08:17:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFG50-0004q0-Mn for guix-patches@gnu.org; Mon, 07 Sep 2020 08:17:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFG50-0008PC-Cl for guix-patches@gnu.org; Mon, 07 Sep 2020 08:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kFG50-0006a5-7O for guix-patches@gnu.org; Mon, 07 Sep 2020 08:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43204] [PATCH] gnu: taglib: Propagate zlib. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Sep 2020 12:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43204 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Pierre Langlois Cc: mike@rohleder.de, 43204@debbugs.gnu.org Received: via spool by 43204-submit@debbugs.gnu.org id=B43204.159948096625226 (code B ref 43204); Mon, 07 Sep 2020 12:17:02 +0000 Received: (at 43204) by debbugs.gnu.org; 7 Sep 2020 12:16:06 +0000 Received: from localhost ([127.0.0.1]:48315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFG3z-0006YD-Pb for submit@debbugs.gnu.org; Mon, 07 Sep 2020 08:16:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFG3u-0006Xt-Hn for 43204@debbugs.gnu.org; Mon, 07 Sep 2020 08:15:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41512) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFG3o-0008Fb-3M; Mon, 07 Sep 2020 08:15:48 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=43964 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kFG3n-0000nc-Lg; Mon, 07 Sep 2020 08:15:47 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= References: <20200904153824.27164-1-mike@rohleder.de> <87363xmsfx.fsf@gmx.com> <87wo18piv4.fsf@gmx.com> Date: Mon, 07 Sep 2020 14:15:41 +0200 In-Reply-To: <87wo18piv4.fsf@gmx.com> (Pierre Langlois's message of "Sat, 05 Sep 2020 12:23:43 +0100") Message-ID: <875z8pkck2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 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 Hi! Pierre Langlois skribis: > Actually, thinking about this a little more, I'm not sure I understand > upstream decision to propagate -lz. The commit fixes [0] which indicates > it's so that taglib can be linked statically, but then that means if > we're dynamically linking, the application will also dynamically link > with zlib when it doesn't need to (at least not directly). And in guix > we only build shared libs for taglib so we're never statically linking > it AFAIK. > > So, here I'm a bit torn here, should we just follow what upstream is > indicating? Even it doesn't look right to me, but I might be wrong! Or, > should we revert the change that propagates -lz? I had the following patch that I intended to push, to avoid propagation. WDYT? Ludo’. commit d8124a707602980556fd33c7dbf9f7483fe1d0df Author: Ludovic Courtès Date: Mon Sep 7 09:56:08 2020 +0200 gnu: taglib: 'taglib-config --libs' shows -L flag for zlib. Fixes compilation of emacs-emms-print-metadata. * gnu/packages/mp3.scm (taglib)[arguments]: Add #:phases. diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm index 7ee009df74..a7574f0cf9 100644 --- a/gnu/packages/mp3.scm +++ b/gnu/packages/mp3.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Andreas Enge -;;; Copyright © 2014, 2015, 2017 Ludovic Courtès +;;; Copyright © 2014, 2015, 2017, 2020 Ludovic Courtès ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2017 Thomas Danckaert @@ -174,7 +174,18 @@ a highly stable and efficient implementation.") (build-system cmake-build-system) (arguments '(#:tests? #f ; Tests are not ran with BUILD_SHARED_LIBS on. - #:configure-flags (list "-DBUILD_SHARED_LIBS=ON"))) + #:configure-flags (list "-DBUILD_SHARED_LIBS=ON") + #:phases (modify-phases %standard-phases + (add-before 'configure 'adjust-zlib-ldflags + (lambda* (#:key inputs #:allow-other-keys) + ;; Make sure users of 'taglib-config --libs' get the -L + ;; flag for zlib. + (substitute* "CMakeLists.txt" + (("set\\(ZLIB_LIBRARIES_FLAGS -lz\\)") + (string-append "set(ZLIB_LIBRARIES_FLAGS -L" + (assoc-ref inputs "zlib") + " -lz)"))) + #t))))) (inputs `(("zlib" ,zlib))) (home-page "https://taglib.org") (synopsis "Library to access audio file meta-data")