ruby: update to 2.1.2.
This revamps and simplifies the ruby template. ruby now subsumes ruby-rdoc, ruby-irb and ruby-gems. ruby-ri stays separate because of size, but has an exact dependency. Added patches for LibreSSL (removal of RAND_egd) and libffi detection.
This commit is contained in:
parent
609d10ab60
commit
faa764fb59
7 changed files with 66 additions and 47 deletions
|
@ -447,7 +447,7 @@ libSDL_ttf-2.0.so.0 SDL_ttf-2.0.9_1
|
||||||
libparted.so.2 libparted-3.1_1
|
libparted.so.2 libparted-3.1_1
|
||||||
libparted-fs-resize.so.0 libparted-3.1_1
|
libparted-fs-resize.so.0 libparted-3.1_1
|
||||||
libntfs-3g.so.85 ntfs-3g-2014.2.15_1
|
libntfs-3g.so.85 ntfs-3g-2014.2.15_1
|
||||||
libruby.so.2.0 ruby-2.0.0_1
|
libruby.so.2.1 ruby-2.1.2_1
|
||||||
libxenctrl.so.4.4 xen-libs-4.4_1<4.5
|
libxenctrl.so.4.4 xen-libs-4.4_1<4.5
|
||||||
libxenguest.so.4.4 xen-libs-4.4_1<4.5
|
libxenguest.so.4.4 xen-libs-4.4_1<4.5
|
||||||
libxlutil.so.4.3 xen-libs-4.3_1
|
libxlutil.so.4.3 xen-libs-4.3_1
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
ruby
|
|
|
@ -1 +0,0 @@
|
||||||
ruby
|
|
|
@ -1 +0,0 @@
|
||||||
ruby
|
|
14
srcpkgs/ruby/patches/fiddle-libffi-version.patch
Normal file
14
srcpkgs/ruby/patches/fiddle-libffi-version.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
Patch for ruby 2.1.2, upstream for next 2.1.x.
|
||||||
|
|
||||||
|
--- ext/fiddle/extconf.rb 2014/06/20 22:48:41 46484
|
||||||
|
+++ ext/fiddle/extconf.rb 2014/06/21 03:54:19 46485
|
||||||
|
@@ -7,7 +7,8 @@
|
||||||
|
pkg_config("libffi")
|
||||||
|
if ver = pkg_config("libffi", "modversion")
|
||||||
|
ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored.
|
||||||
|
- $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver.split('.') }})
|
||||||
|
+ ver = (ver.split('.') + [0,0])[0,3]
|
||||||
|
+ $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }})
|
||||||
|
end
|
||||||
|
|
||||||
|
unless have_header('ffi.h')
|
42
srcpkgs/ruby/patches/libressl.patch
Normal file
42
srcpkgs/ruby/patches/libressl.patch
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
LibreSSL does not provide RAND_egd, drop wrappers for it.
|
||||||
|
|
||||||
|
--- ext/openssl/extconf.rb 2014-07-21 16:12:51.350690031 +0200
|
||||||
|
+++ ext/openssl/extconf.rb 2014-07-21 16:13:29.806691406 +0200
|
||||||
|
@@ -150,6 +150,7 @@
|
||||||
|
have_struct_member("X509_ATTRIBUTE", "single", "openssl/x509.h")
|
||||||
|
have_macro("OPENSSL_FIPS", ['openssl/opensslconf.h']) && $defs.push("-DHAVE_OPENSSL_FIPS")
|
||||||
|
have_macro("EVP_CTRL_GCM_GET_TAG", ['openssl/evp.h']) && $defs.push("-DHAVE_AUTHENTICATED_ENCRYPTION")
|
||||||
|
+have_func("RAND_egd")
|
||||||
|
|
||||||
|
Logging::message "=== Checking done. ===\n"
|
||||||
|
|
||||||
|
diff -ur /tmp/openssl/ossl_rand.c openssl/ossl_rand.c
|
||||||
|
--- ext/openssl/ossl_rand.c 2014-07-21 16:12:51.350690031 +0200
|
||||||
|
+++ ext/openssl/ossl_rand.c 2014-07-21 16:16:58.322698863 +0200
|
||||||
|
@@ -125,6 +125,7 @@
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if defined(HAVE_RAND_EGD_METHOD)
|
||||||
|
/*
|
||||||
|
* call-seq:
|
||||||
|
* egd(filename) -> true
|
||||||
|
@@ -158,6 +159,7 @@
|
||||||
|
}
|
||||||
|
return Qtrue;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* call-seq:
|
||||||
|
@@ -195,8 +197,10 @@
|
||||||
|
DEFMETH(mRandom, "write_random_file", ossl_rand_write_file, 1);
|
||||||
|
DEFMETH(mRandom, "random_bytes", ossl_rand_bytes, 1);
|
||||||
|
DEFMETH(mRandom, "pseudo_bytes", ossl_rand_pseudo_bytes, 1);
|
||||||
|
+#if defined(HAVE_RAND_EGD_METHOD)
|
||||||
|
DEFMETH(mRandom, "egd", ossl_rand_egd, 1);
|
||||||
|
DEFMETH(mRandom, "egd_bytes", ossl_rand_egd_bytes, 2);
|
||||||
|
+#endif
|
||||||
|
DEFMETH(mRandom, "status?", ossl_rand_status, 0)
|
||||||
|
}
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
# Template build file for 'ruby'.
|
# Template build file for 'ruby'.
|
||||||
_ruby_ver=2.0.0
|
|
||||||
_ruby_distpatchver=p481
|
|
||||||
_ruby_distver="${_ruby_ver}-${_ruby_distpatchver}"
|
|
||||||
|
|
||||||
pkgname=ruby
|
pkgname=ruby
|
||||||
version="${_ruby_ver}${_ruby_distpatchver}"
|
version=2.1.2
|
||||||
revision=3
|
_ruby_abiver=2.1.0
|
||||||
wrksrc="${pkgname}-${_ruby_distver}"
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--enable-shared --disable-rpath
|
configure_args="--enable-shared --disable-rpath
|
||||||
DOXYGEN=/usr/bin/doxygen DOT=/usr/bin/dot PKG_CONFIG=/usr/bin/pkg-config"
|
DOXYGEN=/usr/bin/doxygen DOT=/usr/bin/dot PKG_CONFIG=/usr/bin/pkg-config"
|
||||||
|
@ -14,15 +10,16 @@ short_desc="Ruby programming language"
|
||||||
homepage="http://www.ruby-lang.org/en/"
|
homepage="http://www.ruby-lang.org/en/"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
license="BSD"
|
license="BSD"
|
||||||
distfiles="ftp://ftp.ruby-lang.org/pub/ruby/2.0/$pkgname-${_ruby_distver}.tar.bz2"
|
distfiles="ftp://ftp.ruby-lang.org/pub/ruby/2.1/${pkgname}-${version}.tar.bz2"
|
||||||
checksum=0762dad7e96d8091bdf33b3e3176c2066fbf3dc09dfe85fbf40e74e83c63d8e2
|
checksum=6948b02570cdfb89a8313675d4aa665405900e27423db408401473f30fc6e901
|
||||||
|
|
||||||
hostmakedepends="pkg-config bison groff doxygen graphviz"
|
hostmakedepends="pkg-config bison groff doxygen graphviz"
|
||||||
makedepends="zlib-devel readline-devel>=6.3 libffi-devel libressl-devel
|
makedepends="zlib-devel readline-devel>=6.3 libffi-devel libressl-devel
|
||||||
gdbm-devel libyaml-devel pango-devel"
|
gdbm-devel libyaml-devel pango-devel"
|
||||||
|
replaces="ruby-rdoc>=0 ruby-gems>=0 ruby-irb>=0"
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
hostmakedepends+=" ruby>=${version} ruby-rdoc>=${version} ruby-ri>=${version}"
|
hostmakedepends+=" ruby>=${version}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pre_build() {
|
pre_build() {
|
||||||
|
@ -46,44 +43,13 @@ ruby-devel_package() {
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/include
|
vmove usr/include
|
||||||
vmove "usr/lib/*.a"
|
vmove "usr/lib/*.a"
|
||||||
vmove usr/lib/ruby/2.0.0/mkmf.rb
|
vmove usr/lib/ruby/${_ruby_abiver}/mkmf.rb
|
||||||
vmove usr/lib/pkgconfig
|
vmove usr/lib/pkgconfig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ruby-gems_package() {
|
|
||||||
depends="ruby-rdoc>=${version}"
|
|
||||||
short_desc="Package management framework for Ruby libraries/applications"
|
|
||||||
noarch=yes
|
|
||||||
pkg_install() {
|
|
||||||
vmove usr/bin/gem
|
|
||||||
vmove usr/lib/ruby/gems
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ruby-irb_package() {
|
|
||||||
depends="ruby"
|
|
||||||
short_desc="Interactive Ruby"
|
|
||||||
noarch=yes
|
|
||||||
pkg_install() {
|
|
||||||
vmove usr/bin/irb
|
|
||||||
vmove usr/lib/ruby/2.0.0/irb
|
|
||||||
vmove "usr/share/man/man1/irb*"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ruby-rdoc_package() {
|
|
||||||
depends="ruby-irb>=${version}"
|
|
||||||
short_desc="Generate documentation from Ruby source files"
|
|
||||||
noarch=yes
|
|
||||||
pkg_install() {
|
|
||||||
vmove usr/bin/rdoc
|
|
||||||
vmove usr/lib/ruby/2.0.0/rdoc
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ruby-ri_package() {
|
ruby-ri_package() {
|
||||||
depends="ruby-rdoc>=${version}"
|
depends="ruby-${version}_${revision}"
|
||||||
short_desc="Ruby Interactive reference"
|
short_desc="Ruby Interactive reference"
|
||||||
noarch=yes
|
noarch=yes
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue