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 (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0C2B1158041 for ; Tue, 19 Mar 2024 03:21:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 042C7E29AA; Tue, 19 Mar 2024 03:21:39 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 D9ABAE29AA for ; Tue, 19 Mar 2024 03:21:38 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D28843408DD for ; Tue, 19 Mar 2024 03:21:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3CD2D156D for ; Tue, 19 Mar 2024 03:21:36 +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: <1710818451.e572c88554dd14921c39809f3b780cea49ce9c56.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/libmcpp/, dev-cpp/libmcpp/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-cpp/libmcpp/files/libmcpp-2.7.2-incompatible-pointer-types.patch dev-cpp/libmcpp/files/mcpp-c99.patch dev-cpp/libmcpp/libmcpp-2.7.2_p5-r2.ebuild X-VCS-Directories: dev-cpp/libmcpp/ dev-cpp/libmcpp/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: e572c88554dd14921c39809f3b780cea49ce9c56 X-VCS-Branch: master Date: Tue, 19 Mar 2024 03:21:36 +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: 9da70370-cd0c-49e0-9e2d-c67eb76a1de2 X-Archives-Hash: 74112719f92c9fdde5a3fa8c54ba3cf1 commit: e572c88554dd14921c39809f3b780cea49ce9c56 Author: Eli Schwartz gmail com> AuthorDate: Tue Mar 19 00:31:31 2024 +0000 Commit: Sam James gentoo org> CommitDate: Tue Mar 19 03:20:51 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e572c885 dev-cpp/libmcpp: add patches to build with Modern C Closes: https://bugs.gentoo.org/919186 Signed-off-by: Eli Schwartz gmail.com> Signed-off-by: Sam James gentoo.org> .../libmcpp-2.7.2-incompatible-pointer-types.patch | 26 ++++++++++ dev-cpp/libmcpp/files/mcpp-c99.patch | 59 ++++++++++++++++++++++ dev-cpp/libmcpp/libmcpp-2.7.2_p5-r2.ebuild | 48 ++++++++++++++++++ 3 files changed, 133 insertions(+) diff --git a/dev-cpp/libmcpp/files/libmcpp-2.7.2-incompatible-pointer-types.patch b/dev-cpp/libmcpp/files/libmcpp-2.7.2-incompatible-pointer-types.patch new file mode 100644 index 000000000000..fc84009d4366 --- /dev/null +++ b/dev-cpp/libmcpp/files/libmcpp-2.7.2-incompatible-pointer-types.patch @@ -0,0 +1,26 @@ +https://github.com/jbrandwood/mcpp/commit/3b274fe8f31d61996343b17402f30408a6e447cf + +From 3b274fe8f31d61996343b17402f30408a6e447cf Mon Sep 17 00:00:00 2001 +From: John Brandwood +Date: Fri, 15 Mar 2024 15:15:53 -0400 +Subject: [PATCH] Fix build with GCC 14.x by splitting a NULL assignment into 2 + lines. + +--- + src/expand.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/expand.c b/src/expand.c +index 08f829a..ea2d2a9 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -710,7 +710,8 @@ static char * replace( + } else { + m_inf->locs.start_col = m_inf->locs.start_line = 0L; + } +- m_inf->args = m_inf->loc_args = NULL; /* Default args */ ++ m_inf->args = NULL; /* Default args */ ++ m_inf->loc_args = NULL; + for (num = 1, recurs = 0; num < m_num; num++) + if (mac_inf[ num].defp == defp) + recurs++; /* Recursively nested macro */ diff --git a/dev-cpp/libmcpp/files/mcpp-c99.patch b/dev-cpp/libmcpp/files/mcpp-c99.patch new file mode 100644 index 000000000000..e6538e7955f4 --- /dev/null +++ b/dev-cpp/libmcpp/files/mcpp-c99.patch @@ -0,0 +1,59 @@ +Florian Weimer's c99 patch from https://sourceforge.net/p/mcpp/patches/7/ + +Do not define and undefine _*_SOURCE macros. These have special +semantics to glibc. may include , and which +point the feature configuration gets frozen. Without this change, +when system.c includes , the feature macros are hard-coded +as baseline POSIX, which does not include readlink. This will lead to +compilation errors with future compilers. + +diff --git a/src/configed.H b/src/configed.H +index b4d1ebf3a6bfa280..bde16fc8db38a2c4 100644 +--- a/src/configed.H ++++ b/src/configed.H +@@ -295,20 +295,7 @@ + * ULONGMAX should be defined to the ULONG_MAX in . + */ + +-/* _POSIX_* only to get PATH_MAX */ +-#define _POSIX_ 1 +-#define _POSIX_SOURCE 1 +-#ifndef _POSIX_C_SOURCE +-#define _POSIX_C_SOURCE 1 +-#define _POSIX_C_SOURCE_defined 1 +-#endif + #include "limits.h" +-#undef _POSIX_ +-#undef _POSIX_SOURCE +-#ifdef _POSIX_C_SOURCE_defined +-#undef _POSIX_C_SOURCE +-#undef _POSIX_C_SOURCE_defined +-#endif + #define CHARBIT CHAR_BIT + #define UCHARMAX UCHAR_MAX + #define USHRTMAX USHRT_MAX +diff --git a/src/noconfig.H b/src/noconfig.H +index 6b634fe0b32ff67c..7c923c900c8865dd 100644 +--- a/src/noconfig.H ++++ b/src/noconfig.H +@@ -570,20 +570,7 @@ + #include "stdio.h" + + /* PATHMAX is the maximum length of path-list on the host system. */ +-/* _POSIX_* only to get PATH_MAX */ +-#define _POSIX_ 1 +-#define _POSIX_SOURCE 1 +-#ifndef _POSIX_C_SOURCE +-#define _POSIX_C_SOURCE 1 +-#define _POSIX_C_SOURCE_defined 1 +-#endif + #include "limits.h" +-#undef _POSIX_ +-#undef _POSIX_SOURCE +-#ifdef _POSIX_C_SOURCE_defined +-#undef _POSIX_C_SOURCE +-#undef _POSIX_C_SOURCE_defined +-#endif + #ifdef PATH_MAX + #define PATHMAX PATH_MAX /* Posix macro */ + #else diff --git a/dev-cpp/libmcpp/libmcpp-2.7.2_p5-r2.ebuild b/dev-cpp/libmcpp/libmcpp-2.7.2_p5-r2.ebuild new file mode 100644 index 000000000000..3d410d6d4019 --- /dev/null +++ b/dev-cpp/libmcpp/libmcpp-2.7.2_p5-r2.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +MY_PN=${PN/lib/} +MY_P=$(ver_cut 1-4 ${MY_PN}-${PV}) + +DESCRIPTION="A portable C++ preprocessor" +HOMEPAGE="http://mcpp.sourceforge.net" +SRC_URI="mirror://sourceforge/mcpp/${MY_P}.tar.gz" +SRC_URI+=" mirror://debian/pool/main/m/${MY_PN}/${MY_PN}_${PV/_p/-}.debian.tar.xz" +S="${WORKDIR}"/${MY_P} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc64 ~riscv ~x86 ~x86-linux ~x64-macos" + +PATCHES=( + # bug #718808 + "${WORKDIR}"/debian/patches/ + + "${FILESDIR}"/${PN}-2.7.2-fix-build-system.patch + "${FILESDIR}"/${PN}-2.7.2-fix-configure-checks.patch + "${FILESDIR}"/${PN}-2.7.2-incompatible-pointer-types.patch + "${FILESDIR}"/mcpp-c99.patch +) + +src_prepare() { + default + + # bug #778461 + sed -i 's/-lmcpp/libmcpp.la/' src/Makefile.am || die + + eautoreconf +} + +src_configure() { + econf --enable-mcpplib +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +}