From 41a1bf2ca3c32fdc4f164b35327ff72aca9992a5 Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Wed, 3 Jun 2020 10:15:01 +0200 Subject: app-text/yodl: DEPEND => BDEPEND - Do not strip yodlverbinsert - Add build dependencies for USE=doc - Reorganise src_compile() Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Jeroen Roovers --- app-text/yodl/yodl-4.02.02-r1.ebuild | 73 ++++++++++++++++++++++++++++++++++++ app-text/yodl/yodl-4.02.02.ebuild | 64 ------------------------------- 2 files changed, 73 insertions(+), 64 deletions(-) create mode 100644 app-text/yodl/yodl-4.02.02-r1.ebuild delete mode 100644 app-text/yodl/yodl-4.02.02.ebuild (limited to 'app-text/yodl') diff --git a/app-text/yodl/yodl-4.02.02-r1.ebuild b/app-text/yodl/yodl-4.02.02-r1.ebuild new file mode 100644 index 000000000000..b54d4d14d58f --- /dev/null +++ b/app-text/yodl/yodl-4.02.02-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs flag-o-matic + +DESCRIPTION="Your Own Document Language: a pre-document language and tools to process it" +HOMEPAGE="https://fbb-git.gitlab.io/yodl/ https://gitlab.com/fbb-git/yodl" +SRC_URI="https://gitlab.com/fbb-git/${PN}/-/archive/${PV}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +BDEPEND=" + >=dev-util/icmake-8.00.00 + doc? ( + dev-texlive/texlive-latexextra + dev-texlive/texlive-plaingeneric + ) +" + +S=${WORKDIR}/${P}/${PN} + +pkg_pretend() { + if [[ ${MERGE_TYPE} != "binary" ]]; then + if tc-is-gcc && [[ $(gcc-major-version) -lt 8 ]]; then + die "Your compiler doesn't fully support C++17. Use GCC 8 or newer." + elif tc-is-clang && [[ $(clang-major-version) -lt 6 ]]; then + die "Your compiler doesn't fully support C++17. Use Clang 6 or newer." + fi + fi +} + +src_prepare() { + sed -e "/DOC.* =/s/yodl\(-doc\)\?/${PF}/" \ + -e "/COMPILER =/s/gcc/$(tc-getCC)/" \ + -e "/CXX =/s/g++/$(tc-getCXX)/" \ + -i INSTALL.im || die + + sed -e "s/g++/$(tc-getCXX)/" \ + -e "s:#define CLS://\0:" \ + -i verbinsert/icmconf || die + + sed -e "s/ar r /$(tc-getAR) r /" \ + -e "s/ranlib/$(tc-getRANLIB)/" \ + -i icmake/stdcompile || die + + sed -e '/strip/s|"-s"|""|g' \ + -i icmake/program || die + + # required for std::filesystem usage + append-cxxflags -std=c++17 + + default +} + +src_compile() { + local target + for target in programs macros man $(usex doc manual ''); do + ./build ${target} || die "${target} failed" + done +} + +src_install() { + ./build install programs "${ED}" || die + ./build install macros "${ED}" || die + ./build install man "${ED}" || die + ./build install docs "${ED}" || die + use doc && { ./build install manual "${ED}" || die ; } +} diff --git a/app-text/yodl/yodl-4.02.02.ebuild b/app-text/yodl/yodl-4.02.02.ebuild deleted file mode 100644 index 25f75b909934..000000000000 --- a/app-text/yodl/yodl-4.02.02.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs flag-o-matic - -DESCRIPTION="Your Own Document Language: a pre-document language and tools to process it" -HOMEPAGE="https://fbb-git.gitlab.io/yodl/ https://gitlab.com/fbb-git/yodl" -SRC_URI="https://gitlab.com/fbb-git/${PN}/-/archive/${PV}/${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="doc" - -DEPEND=">=dev-util/icmake-8.00.00" - -S=${WORKDIR}/${P}/${PN} - -pkg_pretend() { - if [[ ${MERGE_TYPE} != "binary" ]]; then - if tc-is-gcc && [[ $(gcc-major-version) -lt 8 ]]; then - die "Your compiler doesn't fully support C++17. Use GCC 8 or newer." - elif tc-is-clang && [[ $(clang-major-version) -lt 6 ]]; then - die "Your compiler doesn't fully support C++17. Use Clang 6 or newer." - fi - fi -} - -src_prepare() { - sed -e "/DOC.* =/s/yodl\(-doc\)\?/${PF}/" \ - -e "/COMPILER =/s/gcc/$(tc-getCC)/" \ - -e "/CXX =/s/g++/$(tc-getCXX)/" \ - -i INSTALL.im || die - - sed -e "s/g++/$(tc-getCXX)/" \ - -e "s:#define CLS://\0:" \ - -i verbinsert/icmconf || die - - sed -e "s/ar r /$(tc-getAR) r /" \ - -e "s/ranlib/$(tc-getRANLIB)/" \ - -i icmake/stdcompile || die - - # required for std::filesystem usage - append-cxxflags -std=c++17 - - default -} - -src_compile() { - ./build programs || die - ./build macros || die - ./build man || die - use doc && { ./build manual || die ; } -} - -src_install() { - ./build install programs "${ED}" || die - ./build install macros "${ED}" || die - ./build install man "${ED}" || die - ./build install docs "${ED}" || die - use doc && { ./build install manual "${ED}" || die ; } -} -- cgit v1.2.3-65-gdbad