From b93c3c4db05f6e7d1d69ae1d0850a7b05d4ac0ec Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Wed, 19 Jun 2019 18:21:15 +0000 Subject: [PATCH] added community/binaryen --- community/binaryen/PKGBUILD | 39 ++++++++++++++++++++++++++++++++++ community/binaryen/binaryen.sh | 9 ++++++++ 2 files changed, 48 insertions(+) create mode 100644 community/binaryen/PKGBUILD create mode 100644 community/binaryen/binaryen.sh diff --git a/community/binaryen/PKGBUILD b/community/binaryen/PKGBUILD new file mode 100644 index 000000000..d4d71d154 --- /dev/null +++ b/community/binaryen/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Sven-Hendrik Haase +# Contributor: Dario Ostuni + +# ALARM: Kevin Mihelich +# - only move /usr/lib64 in package for v8 + +pkgname=binaryen +pkgver=84 +pkgrel=1 +pkgdesc="Compiler infrastructure and toolchain library for WebAssembly, in C++" +arch=('x86_64') +url="https://github.com/WebAssembly/binaryen" +license=('MIT') +depends=() +makedepends=(cmake ninja python) +source=("https://github.com/WebAssembly/binaryen/archive/version_${pkgver}.tar.gz" + "binaryen.sh") +sha384sums=('450fe29c997273f7218ea72e3c8348509e8f16e69f6c0f3cc99e58c9d7591c9850b76af7bf1080aba6d1ff93c7e930d9' + 'fdf76d46e6ab9b915212bbca7c29e624e209de911b18ecaccc40b99a00360cd12b261f96c8655f02ec4fd28cedffbcac') + +prepare() { + mkdir binaryen-version_${pkgver}/build +} + +build() { + cd binaryen-version_${pkgver}/build + + cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr .. + ninja +} + +package() { + cd binaryen-version_${pkgver}/build + DESTDIR=${pkgdir} ninja install + [[ $CARCH == "aarch64" ]] && mv ${pkgdir}/usr/lib64 ${pkgdir}/usr/lib + + install -Dm755 $srcdir/binaryen.sh $pkgdir/etc/profile.d/binaryen.sh + install -Dm644 ../LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} diff --git a/community/binaryen/binaryen.sh b/community/binaryen/binaryen.sh new file mode 100644 index 000000000..ec35ec5f5 --- /dev/null +++ b/community/binaryen/binaryen.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# This one is for emscripten. +export BINARYEN="/usr" + +# This one is for binaryen itself. +export BINARYEN_ROOT="/usr" + +# Just agree on one of these god damnit.