# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=mruby pkgver=3.2.0 pkgrel=0 pkgdesc="Lightweight Ruby" url="https://mruby.org" arch="all !armhf !armv7 !x86 !s390x" license="MIT" makedepends="bison readline-dev ruby ruby-rake" subpackages="$pkgname-dev $pkgname-tools" source="https://github.com/mruby/mruby/archive/$pkgver/mruby-$pkgver.tar.gz build_config.rb " # secfixes: # 3.1.0-r0: # - CVE-2021-4110 # - CVE-2021-4188 # - CVE-2022-0080 # - CVE-2022-0240 # - CVE-2022-0326 # - CVE-2022-0481 # - CVE-2022-0631 # - CVE-2022-0632 # - CVE-2022-0890 # - CVE-2022-1071 # - CVE-2022-1106 # - CVE-2022-1201 # - CVE-2022-1427 # 2.1.2-r0: # - CVE-2020-15866 export MRUBY_CONFIG="$srcdir/build_config.rb" build() { ./minirake --verbose # Replace build paths with install destinations. sed -i \ -e "s|$builddir/include|/usr/include|" \ -e "s|$builddir/build/[^/]\+/lib|/usr/lib|" \ -e "s| -I\"$builddir/build/[^/]\+/include\"||" \ build/*/bin/mruby-config \ build/*/lib/libmruby.flags.mak } check() { ./minirake test } package() { install -d "$pkgdir"/usr/bin cp build/host-debug/bin/* "$pkgdir"/usr/bin/ cp build/host/bin/* "$pkgdir"/usr/bin/ rm -f "$pkgdir"/usr/bin/mrbtest install -d "$pkgdir"/usr/lib cp build/host/lib/* "$pkgdir"/usr/lib/ install -d "$pkgdir"/usr/include cp -r include/* "$pkgdir"/usr/include/ cp -r build/host/include/mruby/presym/* "$pkgdir"/usr/include/mruby/presym/ } dev() { default_dev amove usr/lib/libmruby.flags.mak } tools() { pkgdesc="$pkgdesc (tools)" install -d "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/ \ && mv "$subpkgdir"/usr/bin/mruby "$pkgdir"/usr/bin/ } sha512sums=" bb46fa0eda6507cabe775e3f9cceec6da64d5a96c20e704e7ada94f5b4906989553c363cfd85789c4adcb030a6cfd36b8a99d8247f32687c913bbe06edb9bbca mruby-3.2.0.tar.gz 66586bd03db9911a5f730efad2e603a8677c09213d7d8a0d7adbc7ed1d43802aa7f2af88ca003191da54687b614aa2ce57b07e48b4f4a66ec124119eedc0fa1e build_config.rb "