From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7C4FB1581F3 for ; Sun, 1 Dec 2024 08:37:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CE31CE0801; Sun, 1 Dec 2024 08:37:51 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9040EE0801 for ; Sun, 1 Dec 2024 08:37:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BBB04342F9C for ; Sun, 1 Dec 2024 08:37:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 54F4FD81 for ; Sun, 1 Dec 2024 08:37:49 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1733042193.3ca573c730559e095047180c04dc4f45dcaf758f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/gmt/files/, sci-geosciences/gmt/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-geosciences/gmt/files/gmt-6.4.0-mergesort.patch sci-geosciences/gmt/gmt-6.4.0-r1.ebuild sci-geosciences/gmt/gmt-6.4.0.ebuild X-VCS-Directories: sci-geosciences/gmt/files/ sci-geosciences/gmt/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 3ca573c730559e095047180c04dc4f45dcaf758f X-VCS-Branch: master Date: Sun, 1 Dec 2024 08:37:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 26155cec-a287-4f91-8ce5-756e3a656d26 X-Archives-Hash: c96efa0865fb0fe25f40b1366e795e54 commit: 3ca573c730559e095047180c04dc4f45dcaf758f Author: Mario Haustein hrz tu-chemnitz de> AuthorDate: Sat Nov 30 16:08:04 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Dec 1 08:36:33 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ca573c7 sci-geosciences/gmt: fix implicit function declaration [sam: Revbump for modern C fix.] Closes: https://bugs.gentoo.org/945480 Signed-off-by: Mario Haustein hrz.tu-chemnitz.de> Closes: https://github.com/gentoo/gentoo/pull/39531 Signed-off-by: Sam James gentoo.org> .../gmt/files/gmt-6.4.0-mergesort.patch | 57 ++++++++++++++++++++++ .../gmt/{gmt-6.4.0.ebuild => gmt-6.4.0-r1.ebuild} | 6 ++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/sci-geosciences/gmt/files/gmt-6.4.0-mergesort.patch b/sci-geosciences/gmt/files/gmt-6.4.0-mergesort.patch new file mode 100644 index 000000000000..55a31f29e44b --- /dev/null +++ b/sci-geosciences/gmt/files/gmt-6.4.0-mergesort.patch @@ -0,0 +1,57 @@ +From a898ed6598541a70976a44ece58f5f358a80e1bc Mon Sep 17 00:00:00 2001 +From: Paul Wessel +Date: Mon, 24 Apr 2023 14:41:35 +0200 +Subject: [PATCH] Ensure mergesort is declared if needed +Upstream: https://github.com/GenericMappingTools/gmt/pull/7411 +Bug: https://bugs.gentoo.org/945480 + +See #7410 for background. Here I implement it a bit differently. The mergesort function is used both in a module (gmtspatial) as well as by some gmt_*.c libraries, hence if it is not part of the standard libraries we declare it in gmt_prototypes.h so it is set for both modules and libs. +--- a/src/gmt_init.c ++++ b/src/gmt_init.c +@@ -167,6 +167,10 @@ + # include + #endif + ++#ifndef HAVE_MERGESORT ++#include "mergesort.c" ++#endif ++ + /* These are used in gmtinit_init_custom_annot and gmtinit_decode_tinfo only */ + #define GMT_ITEM_ANNOT 0 + #define GMT_ITEM_INTVAL 1 +--- a/src/gmt_prototypes.h ++++ b/src/gmt_prototypes.h +@@ -39,6 +39,15 @@ EXTERN_MSC void gmt_grd_dump (struct GMT_GRID_HEADER *header, gmt_grdfloat *grid + EXTERN_MSC char * gmt_strdup (struct GMT_CTRL *GMT, const char *s); + #endif + ++#ifdef __APPLE__ ++/* macOX has it built in, so ensure we define this flag */ ++#define HAVE_MERGESORT ++#endif ++ ++#ifndef HAVE_MERGESORT ++EXTERN_MSC int mergesort (void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *)); ++#endif ++ + /* gmt_nc.c: */ + + EXTERN_MSC bool gmt_nc_is_cube (struct GMTAPI_CTRL *API, char *file); +--- a/src/gmtspatial.c ++++ b/src/gmtspatial.c +@@ -165,15 +165,6 @@ struct GMTSPATIAL_PAIR { + uint64_t pos; + }; + +-#ifdef __APPLE__ +-/* macOX has it built in, so ensure we define this flag */ +-#define HAVE_MERGESORT +-#endif +- +-#ifndef HAVE_MERGESORT +-#include "mergesort.c" +-#endif +- + static void *New_Ctrl (struct GMT_CTRL *GMT) { /* Allocate and initialize a new control structure */ + struct GMTSPATIAL_CTRL *C; + diff --git a/sci-geosciences/gmt/gmt-6.4.0.ebuild b/sci-geosciences/gmt/gmt-6.4.0-r1.ebuild similarity index 96% rename from sci-geosciences/gmt/gmt-6.4.0.ebuild rename to sci-geosciences/gmt/gmt-6.4.0-r1.ebuild index ab7b61b5eb63..7f7d94e82835 100644 --- a/sci-geosciences/gmt/gmt-6.4.0.ebuild +++ b/sci-geosciences/gmt/gmt-6.4.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -34,6 +34,10 @@ RDEPEND="${DEPEND} sci-geosciences/gshhg-gmt " +PATCHES=( + "${FILESDIR}/${P}-mergesort.patch" +) + src_prepare() { cmake_src_prepare # Rename man pages to avoid a name conflict with gmt5