From patchwork Thu Feb 22 16:10:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 60892 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 F393927BBE2; Thu, 22 Feb 2024 16:17:50 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 337C627BBE9 for ; Thu, 22 Feb 2024 16:17:49 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdBl2-0003nA-BY; Thu, 22 Feb 2024 11:17:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdBkd-0003S3-Fi for guix-patches@gnu.org; Thu, 22 Feb 2024 11:16:48 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdBkc-0004cg-52 for guix-patches@gnu.org; Thu, 22 Feb 2024 11:16:46 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdBkz-0003Ut-1T for guix-patches@gnu.org; Thu, 22 Feb 2024 11:17:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68813] [core-updates PATCH 13/20] gnu: gd: Update to 2.3.3. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Feb 2024 16:17:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68813 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68813@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 68813-submit@debbugs.gnu.org id=B68813.170861860313263 (code B ref 68813); Thu, 22 Feb 2024 16:17:08 +0000 Received: (at 68813) by debbugs.gnu.org; 22 Feb 2024 16:16:43 +0000 Received: from localhost ([127.0.0.1]:38621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdBkX-0003Rn-Vj for submit@debbugs.gnu.org; Thu, 22 Feb 2024 11:16:43 -0500 Received: from mail-qv1-f52.google.com ([209.85.219.52]:45429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdBkE-0003P3-S9 for 68813@debbugs.gnu.org; Thu, 22 Feb 2024 11:16:24 -0500 Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-68f51ba7043so35433836d6.3 for <68813@debbugs.gnu.org>; Thu, 22 Feb 2024 08:15:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708618494; x=1709223294; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=i7T1dpEiyBCPrgGwgBvGxMOvU4j50Cmi9bPIIAIzU18=; b=miWa1jPk8a1q+FjP+ti4wSr1vDgEZwd/bLjMyw8m55nLp1w1jRCGc3hCN+Jz8Npd+U mopLtHaEpvLKzHYg59if0M2zPWIZ5MMS0jGfN9nHAGG/dPX9r3Cs4sBA1UR3qNI0Zcf8 bOXapHZ5rAa5Ta7M/GCYSvW0hdHq5SemAHqrK2TklEWKKRxUtrEnqA3l1w0Zz7VraLcS fykWAW8vjj76kXjbMIGchSJNtPviVGAtF3Bnbj819H0+mfcasnLNqE4ke3FPw4Zwqu/Z AuChr9NdIeNX33+n9tOazaahD/iyTGx0J4PTMyrA7Gn/aKcgLDu4G/oYb3qFwI2Pd2aH 8nVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708618494; x=1709223294; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i7T1dpEiyBCPrgGwgBvGxMOvU4j50Cmi9bPIIAIzU18=; b=V3gLAg3Tx2A1LAZVOh6UZbhdRnykK0XO6JLhe246ilgexRWnFJjk5+qddeyqGTp/SQ TPWtmGEZwR5T3yVAhSIytIjP7hGS34lEcmY4UqncSkT3MpAF2XF8TPV8EAh7S2/46Hp2 o0qHgnIAgnTePcAlWPYvBjO3f9LsYSiBHFHiore04CxhgS5I/pJWpvTXe9jtfyd1FjWQ UryI8MEeSL3jjK6EiyCSpaonpYtTk7s0dsswaJbgJaJ44kb1daBSS5+/SFT6f+I4zM8V smLO9qI2oqcEjZuGfwMNyr38+0pJ3sKv80gV8Mfc65WqdDiaumHF8OJ8VXfkaQ7BOs1B rh5g== X-Gm-Message-State: AOJu0YxY/qaxYw/m0YGuZnoXYoP319agaaKph7p1lHCC9JOso/+Iq0SU S5Z8G75pRUC3yvx1d20uU9pMyC8vjYylE/ambLNdfeonh5x4OU53UhmUFUW2 X-Google-Smtp-Source: AGHT+IFsv+kwEqxdWzHIOi9zXN7q+jKXQUWHbOCVMLaDfPEIH4rx/h4mYwRp+L3JaYTOjrwKoCufnw== X-Received: by 2002:a05:6214:5086:b0:68f:4ff6:5fee with SMTP id kk6-20020a056214508600b0068f4ff65feemr14943836qvb.45.1708618493587; Thu, 22 Feb 2024 08:14:53 -0800 (PST) Received: from localhost.localdomain (dsl-155-144.b2b2c.ca. [66.158.155.144]) by smtp.gmail.com with ESMTPSA id od5-20020a0562142f0500b0068fa74cfa79sm2078437qvb.117.2024.02.22.08.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 08:14:53 -0800 (PST) From: Maxim Cournoyer Date: Thu, 22 Feb 2024 11:10:12 -0500 Message-ID: <9fbceb8f7b95fe102ced8ff3793008759bacaad8.1708618218.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gd.scm (gd): Update to 2.3.3. [source]: Remove obsolete gd-Revert-fix-303-gdlib.pc.patch patch. [arguments] Use gexps. : Remove disable-failing-test phase. Add remove-libtool-archives phase. * gnu/packages/patches/gd-Revert-fix-303-gdlib.pc.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. Change-Id: I8cddf29d123ca0b66cc0540666c875039e753482 --- gnu/local.mk | 1 - gnu/packages/gd.scm | 57 +++--- .../patches/gd-Revert-fix-303-gdlib.pc.patch | 179 ------------------ 3 files changed, 28 insertions(+), 209 deletions(-) delete mode 100644 gnu/packages/patches/gd-Revert-fix-303-gdlib.pc.patch diff --git a/gnu/local.mk b/gnu/local.mk index c072d5af85..94b4620c02 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1294,7 +1294,6 @@ dist_patch_DATA = \ %D%/packages/patches/gcolor3-update-libportal-usage.patch \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-brect-bounds.patch \ - %D%/packages/patches/gd-Revert-fix-303-gdlib.pc.patch \ %D%/packages/patches/gdm-default-session.patch \ %D%/packages/patches/gdm-elogind-support.patch \ %D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch \ diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm index 149b82468c..21ad1579ec 100644 --- a/gnu/packages/gd.scm +++ b/gnu/packages/gd.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2017, 2021 Efraim Flashner ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice +;;; Copyright © 2024 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -43,38 +44,36 @@ (define-public gd ;; Note: With libgd.org now pointing to github.com, genuine old ;; tarballs are no longer available. Notably, versions 2.0.x are ;; missing. - (version "2.3.2") + (version "2.3.3") (source (origin - (method url-fetch) - (uri (string-append - "https://github.com/libgd/libgd/releases/download/gd-" - version "/libgd-" version ".tar.xz")) - (sha256 - (base32 - "1yypywkh8vphcy4qqpf51kxpb0a3r7rjqk3fc61rpn70hiq092j7")) - (patches - (search-patches "gd-fix-tests-on-i686.patch" - "gd-brect-bounds.patch" - ;; Drop when - ;; https://github.com/libgd/libgd/issues/691 - ;; is solved. - "gd-Revert-fix-303-gdlib.pc.patch")))) + (method url-fetch) + (uri (string-append + "https://github.com/libgd/libgd/releases/download/gd-" + version "/libgd-" version ".tar.xz")) + (sha256 + (base32 + "0qas3q9xz3wgw06dm2fj0i189rain6n60z1vyq50d5h7wbn25s1z")) + (patches + (search-patches "gd-fix-tests-on-i686.patch" + "gd-brect-bounds.patch")))) (build-system gnu-build-system) (arguments - ;; As recommended by github.com/libgd/libgd/issues/278 to fix rounding - ;; issues on aarch64 and other architectures. - `(#:make-flags '("CFLAGS=-ffp-contract=off") - #:configure-flags '("--disable-static") - #:phases - (modify-phases %standard-phases - ;; This test is known to fail on most architectures: - ;; https://github.com/libgd/libgd/issues/359 - ;; TODO Replace this substitution with an upstream bug fix. - (add-after 'unpack 'disable-failing-test - (lambda _ - (substitute* "tests/gdimagegrayscale/basic.c" - (("return gdNumFailures\\(\\)") - "return 0"))))))) + ;; As recommended by github.com/libgd/libgd/issues/278 to fix rounding + ;; issues on aarch64 and other architectures. + (list #:make-flags #~(list "CFLAGS=-ffp-contract=off") + #:configure-flags #~(list "--disable-static") + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'remove-libtool-archives + ;; Libtool archives lists the whole transitive dependencies, + ;; which is unnecessary unless producing static archives and + ;; leads to overlinking, e.g. causing the configure script of + ;; texlive-bin to fail due to looking for a transitive jpeg + ;; library. + (lambda _ + (for-each delete-file + (find-files (string-append #$output "/lib") + "\\.la$"))))))) (native-inputs (list pkg-config)) (inputs diff --git a/gnu/packages/patches/gd-Revert-fix-303-gdlib.pc.patch b/gnu/packages/patches/gd-Revert-fix-303-gdlib.pc.patch deleted file mode 100644 index 6329b129d3..0000000000 --- a/gnu/packages/patches/gd-Revert-fix-303-gdlib.pc.patch +++ /dev/null @@ -1,179 +0,0 @@ -From 9b31dfda73ee2d1b56b3f0dcfd3246c2faa592fe Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?L=C3=A9o=20Le=20Bouter?= -Date: Sun, 28 Mar 2021 19:47:25 +0200 -Subject: [PATCH] Revert "fix #303: gdlib.pc: use Requires instead of Libs - (#537)" - -This reverts commit 28ecfe77c817aff8ce56422d3e4e8533a281bc76. ---- - CMakeLists.txt | 12 ------------ - config/gdlib.pc.cmake | 4 +--- - config/gdlib.pc.in | 4 +--- - configure.ac | 11 +---------- - src/CMakeLists.txt | 6 ------ - 5 files changed, 3 insertions(+), 34 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 57cd95d..6bd0c73 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,8 +53,6 @@ SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - "Single Directory for all static libraries." - ) - --SET(PKG_REQUIRES_PRIVATES "") -- - if (USE_EXT_GD) - message("Using GD at: ${USE_EXT_GD}") - INCLUDE_DIRECTORIES(BEFORE ${GD_INCLUDE_DIR}) -@@ -170,13 +168,11 @@ else (USE_EXT_GD) - INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS}) - SET(HAVE_FT2BUILD_H 1) - SET(HAVE_LIBFREETYPE 1) -- LIST(APPEND PKG_REQUIRES_PRIVATES freetype2) - ENDIF(FREETYPE_FOUND) - - IF(ZLIB_FOUND) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) - SET(HAVE_LIBZ 1) -- LIST(APPEND PKG_REQUIRES_PRIVATES zlib) - ENDIF(ZLIB_FOUND) - - IF(WEBP_FOUND) -@@ -192,7 +188,6 @@ else (USE_EXT_GD) - IF(PNG_FOUND) - INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR}) - SET(HAVE_LIBPNG 1) -- LIST(APPEND PKG_REQUIRES_PRIVATES libpng) - ENDIF(PNG_FOUND) - - IF(ICONV_FOUND) -@@ -209,25 +204,21 @@ else (USE_EXT_GD) - IF(XPM_FOUND) - INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) - SET(HAVE_LIBXPM 1) -- LIST(APPEND PKG_REQUIRES_PRIVATES xpm) - ENDIF(XPM_FOUND) - - IF(JPEG_FOUND) - INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR}) - SET(HAVE_LIBJPEG 1) -- LIST(APPEND PKG_REQUIRES_PRIVATES libjpeg) - ENDIF(JPEG_FOUND) - - IF(TIFF_FOUND) - INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) - SET(HAVE_LIBTIFF 1) -- LIST(APPEND PKG_REQUIRES_PRIVATES libtiff-4) - ENDIF(TIFF_FOUND) - - IF(FONTCONFIG_FOUND) - INCLUDE_DIRECTORIES(${FONTCONFIG_INCLUDE_DIR}) - SET(HAVE_LIBFONTCONFIG 1) -- LIST(APPEND PKG_REQUIRES_PRIVATES fontconfig) - ELSE (FONTCONFIG_FOUND) - SET(FONTCONFIG_LIBRARY "") - SET(FONTCONFIG_INCLUDE_DIR "") -@@ -236,11 +227,8 @@ else (USE_EXT_GD) - - IF(RAQM_FOUND) - INCLUDE_DIRECTORIES(${RAQM_INCLUDE_DIR}) -- SET(HAVE_RAQM 1) -- LIST(APPEND PKG_REQUIRES_PRIVAES raqm) - ENDIF(RAQM_FOUND) - -- string(REPLACE ";" ", " PKG_REQUIRES_PRIVATES "${PKG_REQUIRES_PRIVATES}") - SET(HAVE_CONFIG_H 1) - - ADD_DEFINITIONS(-DHAVE_CONFIG_H) -diff --git a/config/gdlib.pc.cmake b/config/gdlib.pc.cmake -index 5fc8af4..d1a0dda 100644 ---- a/config/gdlib.pc.cmake -+++ b/config/gdlib.pc.cmake -@@ -6,8 +6,6 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ - Name: gd - Description: GD graphics library - Version: @GDLIB_VERSION@ --Requires: --Requires.private: @PKG_REQUIRES_PRIVATES@ - Cflags: -I${includedir} --Libs.private: @LIBS_PRIVATES@ -+Libs.private: @LIBGD_DEP_LIBS@ - Libs: -L${libdir} -lgd -diff --git a/config/gdlib.pc.in b/config/gdlib.pc.in -index d6bc375..b980a60 100644 ---- a/config/gdlib.pc.in -+++ b/config/gdlib.pc.in -@@ -6,8 +6,6 @@ includedir=@includedir@ - Name: gd - Description: GD graphics library - Version: @VERSION@ --Requires: --Requires.private: @PKG_REQUIRES_PRIVATES@ - Cflags: -I${includedir} --Libs.private: @LIBS_PRIVATES@ @LIBICONV@ -+Libs.private: @LIBS@ @LIBICONV@ - Libs: -L${libdir} -lgd -diff --git a/configure.ac b/configure.ac -index 535db68..329c99c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -33,9 +33,6 @@ AC_SUBST(GDLIB_LT_CURRENT) - AC_SUBST(GDLIB_LT_REVISION) - AC_SUBST(GDLIB_LT_AGE) - --AC_SUBST(LIBS_PRIVATES) --AC_SUBST(PKG_REQUIRES_PRIVATES) -- - AM_INIT_AUTOMAKE([1.11 foreign dist-xz -Wall -Werror subdir-objects]) - AC_CONFIG_HEADERS([src/config.h:src/config.hin]) - -@@ -133,7 +130,6 @@ m4_define([GD_LIB_CHECK], [dnl - AC_MSG_RESULT([$gd_with_lib]) - - gd_found_lib=no -- gd_require_pkg_name="" - if test "$gd_with_lib" != "no"; then - save_CPPFLAGS=$CPPFLAGS - save_LDFLAGS=$LDFLAGS -@@ -165,11 +161,6 @@ m4_define([GD_LIB_CHECK], [dnl - $1][_CFLAGS="$gd_lib_cflags $][$1][_CFLAGS" - AS_VAR_APPEND([LIBS], [" $][$1][_LIBS"]) - AS_VAR_APPEND([CPPFLAGS], [" $][$1][_CFLAGS"]) -- if test -z "$gd_require_pkg_name"; then -- AS_VAR_APPEND([LIBS_PRIVATES], [" $][$1][_LIBS"]) -- else -- AS_VAR_APPEND([PKG_REQUIRES_PRIVATES], [" $gd_require_pkg_name"]) -- fi - elif test "$gd_with_lib" = "yes"; then - AC_MSG_ERROR([$3 requested but not found]) - else -@@ -189,7 +180,7 @@ dnl $4 - pkg-config module to look for - dnl $5 - fallback test for the feature - m4_define([GD_LIB_PKG_CHECK], [dnl - GD_LIB_CHECK([$1], [$2], [$3], [dnl -- PKG_CHECK_MODULES([$1], [$4], [gd_found_lib=yes gd_require_pkg_name="$4"], [$5]) -+ PKG_CHECK_MODULES([$1], [$4], [gd_found_lib=yes], [$5]) - ]) - ]) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 509c422..49adbd6 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -142,12 +142,6 @@ if (BUILD_STATIC_LIBS) - target_link_libraries(${GD_LIB_STATIC} ${LIBGD_DEP_LIBS}) - endif() - --SET(LIBS_PRIVATES -- ${ICONV_LIBRARIES} -- ${LIQ_LIBRARIES} -- ${WEBP_LIBRARIES} --) -- - set(GD_PROGRAMS gdcmpgif) - - if (PNG_FOUND) --- -2.31.1 -