binaryen-9999.ebuild (1100B)
1 # Copyright 1999-2021 Gentoo Authors 2 # Distributed under the terms of the GNU General Public License v2 3 4 EAPI=6 5 6 inherit cmake-utils 7 8 DESCRIPTION="Сompiler and toolchain infrastructure library for WebAssembly, written in C++" 9 HOMEPAGE="https://github.com/WebAssembly/binaryen" 10 11 if [[ ${PV} == 9999 ]]; then 12 inherit git-r3 13 EGIT_REPO_URI="https://github.com/WebAssembly/${PN}.git" 14 EGIT_SUBMODULES=() 15 KEYWORDS="" 16 else 17 SRC_URI="https://github.com/WebAssembly/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" 18 KEYWORDS="~amd64 ~x86" 19 fi 20 21 LICENSE="Apache-2.0" 22 SLOT="0" 23 IUSE="" 24 25 RDEPEND="" 26 DEPEND="${RDEPEND}" 27 28 CMAKE_MIN_VERSION="2.8.7" 29 30 src_prepare() { 31 sed -r -i \ 32 -e '/INSTALL.+src\/binaryen-c\.h/d' \ 33 CMakeLists.txt || die 34 35 cmake-utils_src_prepare 36 } 37 38 src_configure() { 39 local mycmakeargs=( 40 -DBUILD_STATIC_LIB=OFF 41 -DENABLE_WERROR=OFF 42 ) 43 44 cmake-utils_src_configure 45 } 46 47 src_install() { 48 cmake-utils_src_install 49 50 insinto "/usr/include/${PN}" 51 doins "${S}"/src/*.h 52 53 for hdir in asmjs emscripten-optimizer ir support; do 54 insinto "/usr/include/${PN}/${hdir}" 55 doins "${S}"/src/${hdir}/*.h 56 done 57 }