Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/libmcpp/, dev-cpp/libmcpp/files/
Date: Fri, 09 Sep 2022 09:36:41
Message-Id: 1662715893.438a88bbd14a2e2909f0d416e113383f5e0bacd1.sam@gentoo
1 commit: 438a88bbd14a2e2909f0d416e113383f5e0bacd1
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 9 09:31:33 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 9 09:31:33 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=438a88bb
7
8 dev-cpp/libmcpp: fix configure checks, EAPI 8
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 .../files/libmcpp-2.7.2-fix-configure-checks.patch | 34 ++++++++++++++++
13 dev-cpp/libmcpp/libmcpp-2.7.2_p5-r1.ebuild | 46 ++++++++++++++++++++++
14 2 files changed, 80 insertions(+)
15
16 diff --git a/dev-cpp/libmcpp/files/libmcpp-2.7.2-fix-configure-checks.patch b/dev-cpp/libmcpp/files/libmcpp-2.7.2-fix-configure-checks.patch
17 new file mode 100644
18 index 000000000000..e7bb77d6cf41
19 --- /dev/null
20 +++ b/dev-cpp/libmcpp/files/libmcpp-2.7.2-fix-configure-checks.patch
21 @@ -0,0 +1,34 @@
22 +https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-devtools/mcpp/files/0001-configure-Fix-checks-for-system-headers.patch?id=6721430ca97aa98208cc1c450e4e8c4c274ca840
23 +
24 +From c1e9f2f3d086e0df3c10a2468fd7b37fd0c5038c Mon Sep 17 00:00:00 2001
25 +From: Khem Raj <raj.khem@×××××.com>
26 +Date: Wed, 7 Sep 2022 00:02:08 -0700
27 +Subject: [PATCH] configure: Fix checks for system headers
28 +
29 +Define _DEFAULT_SOURCE in system.c so unistd.h can expose readlink API
30 +
31 +Upstream-Status: Pending
32 +
33 +Signed-off-by: Khem Raj <raj.khem@×××××.com>
34 +--- a/configure.ac
35 ++++ b/configure.ac
36 +@@ -152,7 +152,7 @@ fi
37 +
38 + dnl Checks for header files.
39 +
40 +-AC_CHECK_HEADERS( [unistd.h, stdint.h, inttypes.h])
41 ++AC_CHECK_HEADERS( [unistd.h stdint.h inttypes.h])
42 +
43 + dnl Checks for typedefs, and compiler characteristics.
44 +
45 +--- a/src/system.c
46 ++++ b/src/system.c
47 +@@ -36,6 +36,8 @@
48 + * 1. specify the constants in "configed.H" or "noconfig.H",
49 + * 2. append the system-dependent routines in this file.
50 + */
51 ++
52 ++#define _DEFAULT_SOURCE
53 + #if PREPROCESSED
54 + #include "mcpp.H"
55 + #else
56
57 diff --git a/dev-cpp/libmcpp/libmcpp-2.7.2_p5-r1.ebuild b/dev-cpp/libmcpp/libmcpp-2.7.2_p5-r1.ebuild
58 new file mode 100644
59 index 000000000000..beab5412fb93
60 --- /dev/null
61 +++ b/dev-cpp/libmcpp/libmcpp-2.7.2_p5-r1.ebuild
62 @@ -0,0 +1,46 @@
63 +# Copyright 1999-2022 Gentoo Authors
64 +# Distributed under the terms of the GNU General Public License v2
65 +
66 +EAPI=8
67 +
68 +inherit autotools
69 +
70 +MY_PN=${PN/lib/}
71 +MY_P=$(ver_cut 1-4 ${MY_PN}-${PV})
72 +
73 +DESCRIPTION="A portable C++ preprocessor"
74 +HOMEPAGE="http://mcpp.sourceforge.net"
75 +SRC_URI="mirror://sourceforge/mcpp/${MY_P}.tar.gz"
76 +SRC_URI+=" mirror://debian/pool/main/m/${MY_PN}/${MY_PN}_${PV/_p/-}.debian.tar.xz"
77 +S="${WORKDIR}"/${MY_P}
78 +
79 +LICENSE="BSD"
80 +SLOT="0"
81 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc64 ~riscv ~x86 ~x86-linux ~x64-macos"
82 +
83 +PATCHES=(
84 + # bug #718808
85 + "${WORKDIR}"/debian/patches/
86 +
87 + "${FILESDIR}"/${PN}-2.7.2-fix-build-system.patch
88 + "${FILESDIR}"/${PN}-2.7.2-fix-configure-checks.patch
89 +)
90 +
91 +src_prepare() {
92 + default
93 +
94 + # bug #778461
95 + sed -i 's/-lmcpp/libmcpp.la/' src/Makefile.am || die
96 +
97 + eautoreconf
98 +}
99 +
100 +src_configure() {
101 + econf --enable-mcpplib
102 +}
103 +
104 +src_install() {
105 + default
106 +
107 + find "${ED}" -name '*.la' -delete || die
108 +}