commit 47714654851ab3225f690b1de3d5782c3df03d2e parent 809289f534d394d21978a5dca6d81a151d945a59 Author: parazyd <parazyd@dyne.org> Date: Tue, 2 Feb 2021 10:08:20 +0100 dev-util/binaryen: Add 9999 ebuild. Diffstat:
A | dev-util/binaryen/binaryen-9999.ebuild | | | 57 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | dev-util/binaryen/metadata.xml | | | 7 | +++++++ |
2 files changed, 64 insertions(+), 0 deletions(-)
diff --git a/dev-util/binaryen/binaryen-9999.ebuild b/dev-util/binaryen/binaryen-9999.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils + +DESCRIPTION="Сompiler and toolchain infrastructure library for WebAssembly, written in C++" +HOMEPAGE="https://github.com/WebAssembly/binaryen" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/WebAssembly/${PN}.git" + EGIT_SUBMODULES=() + KEYWORDS="" +else + SRC_URI="https://github.com/WebAssembly/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" + +RDEPEND="" +DEPEND="${RDEPEND}" + +CMAKE_MIN_VERSION="2.8.7" + +src_prepare() { + sed -r -i \ + -e '/INSTALL.+src\/binaryen-c\.h/d' \ + CMakeLists.txt || die + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DBUILD_STATIC_LIB=OFF + -DENABLE_WERROR=OFF + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + insinto "/usr/include/${PN}" + doins "${S}"/src/*.h + + for hdir in asmjs emscripten-optimizer ir support; do + insinto "/usr/include/${PN}/${hdir}" + doins "${S}"/src/${hdir}/*.h + done +} diff --git a/dev-util/binaryen/metadata.xml b/dev-util/binaryen/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>parazyd@dyne.org</email> +</maintainer> +</pkgmetadata>