# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka global pkgname := 'binaryen' global pkgver := '1.37.18' global pkgrel := '0' global pkgdesc := '"Compiler infrastructure and toolchain library for WebAssembly, in C++'" global url := '"https://github.com/WebAssembly/binaryen'" global arch := '"all !s390x'" global license := '"ASL-2.0'" global makedepends := '"cmake'" global checkdepends := '"nodejs python2'" global subpackages := ""$pkgname-dev"" global source := ""$pkgname-$pkgver.tar.gz::https://github.com/WebAssembly/$pkgname/archive/$pkgver.tar.gz link-dynamically.patch ignore-type-limits-error.patch"" global builddir := ""$srcdir/$pkgname-$pkgver"" matchstr $CARCH { x86 { global options := '"!check'"} # XXX: two tests fail } proc build { cd $builddir cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DBUILD_SHARED_LIBS=ON make } proc check { cd $builddir # waterfall requires additional dependency # gcc-tests fail, dunno why python2 check.py --no-test-waterfall --no-run-gcc-tests } proc package { cd $builddir make install DESTDIR="$pkgdir" rm "$pkgdir"/usr/share/binaryen/binaryen.js } global sha512sums := '"684db138400764d90b38a7394a35e4b9ec47892c73de568b50daa1f3ad4ea98a4c4bf0e7fdd90aaf4a49ed29fccb309078cb2c6053f1b15143df7c68943677d6 binaryen-1.37.18.tar.gz 4a6f6708b8d72ba0be901eb0a6cba4e07e40270fc1d5abf5bea5f82ef34100ecb2017a1c8ae1c4b10446ef87d0328f4b4f9a7776ec8c2f850170fe241cfda1c6 link-dynamically.patch 3b95a197cd8805dfa714cf9f31adc1437b6d29bd4082f752c16d98c40cd024b110c02a412285c78251cb5d0b3080c0f9e4d45d8dd0166c71b9462b1610191ab8 ignore-type-limits-error.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(binaryen)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(1.37.18)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(0)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Compiler infrastructure and toolchain library for WebAssembly, in C++"))} spids: [15] ) ] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("https://github.com/WebAssembly/binaryen"))} spids: [20] ) ] spids: [20] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ ("all !s390x"))} spids:[25])] spids: [25] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (ASL-2.0))} spids:[30])] spids: [30] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:makedepends) op:Equal rhs:{(DQ (cmake))} spids:[35])] spids: [35] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:checkdepends) op: Equal rhs: {(DQ ("nodejs python2"))} spids: [40] ) ] spids: [40] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (-dev))} spids: [45] ) ] spids: [45] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".tar.gz::https://github.com/WebAssembly/") ($ VSub_Name "$pkgname") (/archive/) ($ VSub_Name "$pkgver") (".tar.gz\n") ("\tlink-dynamically.patch\n") ("\tignore-type-limits-error.patch") ) } spids: [51] ) ] spids: [51] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir") (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver"))} spids: [65] ) ] spids: [65] ) (Case to_match: {(DQ ($ VSub_Name "$CARCH"))} arms: [ (case_arm pat_list: [{(x86)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:options) op: Equal rhs: {(DQ ("!check"))} spids: [87] ) ] spids: [87] ) ] spids: [84 85 91 -1] ) ] spids: [75 81 96] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(cmake)} {(-DCMAKE_BUILD_TYPE) (Lit_Other "=") (Release)} {(-DCMAKE_INSTALL_PREFIX) (Lit_Other "=") (/usr)} {(-DCMAKE_INSTALL_LIBDIR) (Lit_Other "=") (lib)} {(-DCMAKE_CXX_FLAGS) (Lit_Other "=") (DQ ($ VSub_Name "$CXXFLAGS"))} {(-DCMAKE_C_FLAGS) (Lit_Other "=") (DQ ($ VSub_Name "$CFLAGS"))} {(-DCMAKE_VERBOSE_MAKEFILE) (Lit_Other "=") (ON)} {(-DBUILD_SHARED_LIBS) (Lit_Other "=") (ON)} ) (C {(make)}) ] spids: [103] ) spids: [99 102] ) (FuncDef name: check body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(python2)} {(check.py)} {(--no-test-waterfall)} {(--no-run-gcc-tests)}) ] spids: [172] ) spids: [168 171] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(make)} {(install)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))}) (C {(rm)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/binaryen/binaryen.js)}) ] spids: [206] ) spids: [202 205] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "684db138400764d90b38a7394a35e4b9ec47892c73de568b50daa1f3ad4ea98a4c4bf0e7fdd90aaf4a49ed29fccb309078cb2c6053f1b15143df7c68943677d6 binaryen-1.37.18.tar.gz\n" ) ( "4a6f6708b8d72ba0be901eb0a6cba4e07e40270fc1d5abf5bea5f82ef34100ecb2017a1c8ae1c4b10446ef87d0328f4b4f9a7776ec8c2f850170fe241cfda1c6 link-dynamically.patch\n" ) ( "3b95a197cd8805dfa714cf9f31adc1437b6d29bd4082f752c16d98c40cd024b110c02a412285c78251cb5d0b3080c0f9e4d45d8dd0166c71b9462b1610191ab8 ignore-type-limits-error.patch" ) ) } spids: [237] ) ] spids: [237] ) ] )