From e4ba8f5a8fa699b615f406bd7f4b4f5ef7a736a2 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Fri, 19 Jul 2019 11:46:08 -0400 Subject: [PATCH] dev-util/conf2struct: Respect CFLAGS and CC Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Craig Andrews --- .../conf2struct/conf2struct-0_pre0-r1.ebuild | 43 +++++++++++++++++++ dev-util/conf2struct/conf2struct-9999.ebuild | 4 ++ 2 files changed, 47 insertions(+) create mode 100644 dev-util/conf2struct/conf2struct-0_pre0-r1.ebuild diff --git a/dev-util/conf2struct/conf2struct-0_pre0-r1.ebuild b/dev-util/conf2struct/conf2struct-0_pre0-r1.ebuild new file mode 100644 index 000000000000..b31468b61ccd --- /dev/null +++ b/dev-util/conf2struct/conf2struct-0_pre0-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic systemd toolchain-funcs + +DESCRIPTION="Create C parsers for libconfig and command-line" +HOMEPAGE="https://github.com/yrutschle/conf2struct/" +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/yrutschle/conf2struct.git" + inherit git-r3 +else + KEYWORDS="~amd64" + GIT_COMMIT="10ea3356b65e712fb000f4d37f00e1dc09c1e722" + SRC_URI="https://github.com/yrutschle/conf2struct/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${GIT_COMMIT}" +fi + +PATCHES=( + "${FILESDIR}/${P}-install-and-uninstall.patch" + "${FILESDIR}/${P}-cc-and-cflags.patch" + "${FILESDIR}/${P}-destdir.patch" + "${FILESDIR}/${P}-install-not-run-all.patch" + "${FILESDIR}/${P}-dest-exists.patch" +) + +LICENSE="BSD-2" +SLOT="0" +IUSE="" + +RDEPEND="dev-libs/libconfig + dev-perl/Conf-Libconfig" +DEPEND="${RDEPEND}" + +src_compile(){ + # -j1 due to parallel make issue reported upstream at: https://github.com/yrutschle/conf2struct/issues/10 + emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + +src_install(){ + emake DESTDIR="${D}" prefix="${EPREFIX%/}/usr" install +} diff --git a/dev-util/conf2struct/conf2struct-9999.ebuild b/dev-util/conf2struct/conf2struct-9999.ebuild index f20edc27e4db..b853d93f1b86 100644 --- a/dev-util/conf2struct/conf2struct-9999.ebuild +++ b/dev-util/conf2struct/conf2struct-9999.ebuild @@ -23,6 +23,10 @@ RDEPEND="dev-libs/libconfig dev-perl/Conf-Libconfig" DEPEND="${RDEPEND}" +src_compile(){ + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + src_install(){ emake DESTDIR="${D}" prefix="${EPREFIX%/}/usr" install } -- 2.26.2