1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit toolchain-funcs flag-o-matic
8 DESCRIPTION="Your Own Document Language: a pre-document language and tools to process it"
9 HOMEPAGE="https://fbb-git.gitlab.io/yodl/ https://gitlab.com/fbb-git/yodl"
10 SRC_URI="https://gitlab.com/fbb-git/${PN}/-/archive/${PV}/${P}.tar.gz"
14 KEYWORDS="~amd64 ~x86"
17 DEPEND=">=dev-util/icmake-8.00.00"
19 S=${WORKDIR}/${P}/${PN}
22 if [[ ${MERGE_TYPE} != "binary" ]]; then
23 if tc-is-gcc && [[ $(gcc-major-version) -lt 8 ]]; then
24 die "Your compiler doesn't fully support C++17. Use GCC 8 or newer."
25 elif tc-is-clang && [[ $(clang-major-version) -lt 6 ]]; then
26 die "Your compiler doesn't fully support C++17. Use Clang 6 or newer."
32 sed -e "/DOC.* =/s/yodl\(-doc\)\?/${PF}/" \
33 -e "/COMPILER =/s/gcc/$(tc-getCC)/" \
34 -e "/CXX =/s/g++/$(tc-getCXX)/" \
37 sed -e "s/g++/$(tc-getCXX)/" \
38 -e "s:#define CLS://\0:" \
39 -i verbinsert/icmconf || die
41 sed -e "s/ar r /$(tc-getAR) r /" \
42 -e "s/ranlib/$(tc-getRANLIB)/" \
43 -i icmake/stdcompile || die
45 # required for std::filesystem usage
46 append-cxxflags -std=c++17
52 ./build programs || die
55 use doc && { ./build manual || die ; }
59 ./build install programs "${ED}" || die
60 ./build install macros "${ED}" || die
61 ./build install man "${ED}" || die
62 ./build install docs "${ED}" || die
63 use doc && { ./build install manual "${ED}" || die ; }