summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-09 10:31:33 +0100
committerSam James <sam@gentoo.org>2022-09-09 10:31:33 +0100
commit438a88bbd14a2e2909f0d416e113383f5e0bacd1 (patch)
treed1e54b33fdb370d5ad714a90aa4ced4d9a503634 /dev-cpp/libmcpp
parentdev-libs/libgpiod: Stabilize 1.6.3-r1 arm64, #859802 (diff)
downloadgentoo-438a88bbd14a2e2909f0d416e113383f5e0bacd1.tar.gz
gentoo-438a88bbd14a2e2909f0d416e113383f5e0bacd1.tar.bz2
gentoo-438a88bbd14a2e2909f0d416e113383f5e0bacd1.zip
dev-cpp/libmcpp: fix configure checks, EAPI 8
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp/libmcpp')
-rw-r--r--dev-cpp/libmcpp/files/libmcpp-2.7.2-fix-configure-checks.patch34
-rw-r--r--dev-cpp/libmcpp/libmcpp-2.7.2_p5-r1.ebuild46
2 files changed, 80 insertions, 0 deletions
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
new file mode 100644
index 000000000000..e7bb77d6cf41
--- /dev/null
+++ b/dev-cpp/libmcpp/files/libmcpp-2.7.2-fix-configure-checks.patch
@@ -0,0 +1,34 @@
+https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-devtools/mcpp/files/0001-configure-Fix-checks-for-system-headers.patch?id=6721430ca97aa98208cc1c450e4e8c4c274ca840
+
+From c1e9f2f3d086e0df3c10a2468fd7b37fd0c5038c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 7 Sep 2022 00:02:08 -0700
+Subject: [PATCH] configure: Fix checks for system headers
+
+Define _DEFAULT_SOURCE in system.c so unistd.h can expose readlink API
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/configure.ac
++++ b/configure.ac
+@@ -152,7 +152,7 @@ fi
+
+ dnl Checks for header files.
+
+-AC_CHECK_HEADERS( [unistd.h, stdint.h, inttypes.h])
++AC_CHECK_HEADERS( [unistd.h stdint.h inttypes.h])
+
+ dnl Checks for typedefs, and compiler characteristics.
+
+--- a/src/system.c
++++ b/src/system.c
+@@ -36,6 +36,8 @@
+ * 1. specify the constants in "configed.H" or "noconfig.H",
+ * 2. append the system-dependent routines in this file.
+ */
++
++#define _DEFAULT_SOURCE
+ #if PREPROCESSED
+ #include "mcpp.H"
+ #else
diff --git a/dev-cpp/libmcpp/libmcpp-2.7.2_p5-r1.ebuild b/dev-cpp/libmcpp/libmcpp-2.7.2_p5-r1.ebuild
new file mode 100644
index 000000000000..beab5412fb93
--- /dev/null
+++ b/dev-cpp/libmcpp/libmcpp-2.7.2_p5-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2022 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 ~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
+)
+
+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
+}