diff options
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | remove_termcap_static_lib.patch | 17 |
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b7b8a0273929 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = mruby + pkgdesc = Lightweight Ruby + pkgver = 1.1.0 + pkgrel = 1 + url = https://github.com/mruby/mruby + arch = i686 + arch = x86_64 + license = MIT + makedepends = git + makedepends = bison + makedepends = ruby + options = staticlibs + source = https://github.com/mruby/mruby/archive/1.1.0.zip + source = remove_termcap_static_lib.patch + sha1sums = SKIP + sha1sums = 3042fc7811afee7e88535dca43495a1a5486d6a5 + +pkgname = mruby + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6c779d13f2c9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com> + +pkgname=mruby +pkgver=1.1.0 +pkgrel=1 +pkgdesc='Lightweight Ruby' +arch=(i686 x86_64) +url='https://github.com/mruby/mruby' +license=(MIT) +makedepends=(git bison ruby) +options=(staticlibs) +source=(https://github.com/mruby/mruby/archive/$pkgver.zip + remove_termcap_static_lib.patch) +sha1sums=('SKIP' + '3042fc7811afee7e88535dca43495a1a5486d6a5') + +prepare() { + cd mruby-$pkgver + patch -p1 < "$srcdir"/remove_termcap_static_lib.patch +} + +build() { + cd mruby-$pkgver + CFLAGS="$CFLAGS -std=c11" + make +} + +check() { + cd mruby-$pkgver + make test +} + +package() { + cd mruby-$pkgver + + install -d "$pkgdir/usr/bin" "$pkgdir/usr/lib" + cp build/host/bin/* "$pkgdir/usr/bin" + cp build/host/lib/*.a "$pkgdir/usr/lib" + cp -r include "$pkgdir/usr" +} + diff --git a/remove_termcap_static_lib.patch b/remove_termcap_static_lib.patch new file mode 100644 index 000000000000..5ac108033b25 --- /dev/null +++ b/remove_termcap_static_lib.patch @@ -0,0 +1,17 @@ +diff --git a/mrbgems/mruby-bin-mirb/mrbgem.rake b/mrbgems/mruby-bin-mirb/mrbgem.rake +index 6ddd972..fa0499f 100644 +--- a/mrbgems/mruby-bin-mirb/mrbgem.rake ++++ b/mrbgems/mruby-bin-mirb/mrbgem.rake +@@ -6,11 +6,7 @@ MRuby::Gem::Specification.new('mruby-bin-mirb') do |spec| + if spec.build.cc.search_header_path 'readline/readline.h' + spec.cc.defines << "ENABLE_READLINE" + if spec.build.cc.search_header_path 'termcap.h' +- if MRUBY_BUILD_HOST_IS_CYGWIN then +- spec.linker.libraries << 'ncurses' +- else +- spec.linker.libraries << 'termcap' +- end ++ spec.linker.libraries << 'ncurses' + end + spec.linker.libraries << 'readline' + elsif spec.build.cc.search_header_path 'linenoise.h' |