diff options
author | Alex Legler <a3li@gentoo.org> | 2009-02-23 14:05:31 +0000 |
---|---|---|
committer | Alex Legler <a3li@gentoo.org> | 2009-02-23 14:05:31 +0000 |
commit | f5eff08fcad44bc0a53b17aedc009b499a47579d (patch) | |
tree | 1af3aa99915738a2339d94210dfd6f985ad3d7d3 /dev-lang | |
parent | Sparc stable, security Bug #252576. (diff) | |
download | historical-f5eff08fcad44bc0a53b17aedc009b499a47579d.tar.gz historical-f5eff08fcad44bc0a53b17aedc009b499a47579d.tar.bz2 historical-f5eff08fcad44bc0a53b17aedc009b499a47579d.zip |
Revbumps fixing bugs 260006, 230748, 258893 and 234877.
Package-Manager: portage-2.2_rc23/cvs/Linux x86_64
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/ruby/ChangeLog | 14 | ||||
-rw-r--r-- | dev-lang/ruby/Manifest | 17 | ||||
-rw-r--r-- | dev-lang/ruby/files/ruby-mkconfig.patch | 14 | ||||
-rw-r--r-- | dev-lang/ruby/files/ruby-ossl_ocsp-verification.patch | 36 | ||||
-rw-r--r-- | dev-lang/ruby/ruby-1.8.6_p287-r12.ebuild | 181 | ||||
-rw-r--r-- | dev-lang/ruby/ruby-1.8.6_p287-r5.ebuild | 179 | ||||
-rw-r--r-- | dev-lang/ruby/ruby-1.8.7_p72-r2.ebuild | 186 |
7 files changed, 625 insertions, 2 deletions
diff --git a/dev-lang/ruby/ChangeLog b/dev-lang/ruby/ChangeLog index 685fa3f67594..894e787ccc37 100644 --- a/dev-lang/ruby/ChangeLog +++ b/dev-lang/ruby/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for dev-lang/ruby # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.374 2009/02/10 18:11:39 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.375 2009/02/23 14:05:31 a3li Exp $ + +*ruby-1.8.7_p72-r2 (23 Feb 2009) +*ruby-1.8.6_p287-r12 (23 Feb 2009) +*ruby-1.8.6_p287-r5 (23 Feb 2009) + + 23 Feb 2009; Alex Legler <a3li@gentoo.org> +files/ruby-mkconfig.patch, + +files/ruby-ossl_ocsp-verification.patch, +ruby-1.8.6_p287-r5.ebuild, + +ruby-1.8.6_p287-r12.ebuild, +ruby-1.8.7_p72-r2.ebuild: + Revision bumps for security bug 260006 (X.509 certificate spoofing). Also + fixing bugs 234877 (backported patch for mkconfig), 258893 (ebuild dies + now before compilation if Tk useflags don't match) and 230748 (adding + --enable-option-checking=no for newer versions of autoconf). 10 Feb 2009; Raúl Porcel <armin76@gentoo.org> ruby-1.8.6_p287-r4.ebuild: arm/ia64/s390/sh/sparc stable wrt #254307 diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest index 7c2a98941dfa..4b4a7f62396b 100644 --- a/dev-lang/ruby/Manifest +++ b/dev-lang/ruby/Manifest @@ -1,8 +1,13 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX ruby-1.8.6-memory-leak.diff 1351 RMD160 cba1335fcd52df26b4b2884dea14e0c74852b67a SHA1 184c1743592684abfc1cce8ffa38ae749fe0a1b1 SHA256 90dbc7b444ed936ed8a1fadb443240ec494a6c748d38ff089af423e50bdd9528 AUX ruby-1.8.6-openssl.patch 4892 RMD160 7ffca1f0d339c60f3a4d1cd452c78eace3bd1f62 SHA1 d5279868d614cfeb2e0eba984096096515baafe0 SHA256 ad98b05dc7a2ba9ac5fac21094660c919a987222db19ff5f8bad8e16ae1a6f49 AUX ruby-1.8.6-shortname_constants.patch 1390 RMD160 0920bf92ddccf7f01626f705ddba65258531fd29 SHA1 ad3e0ec4867d86a2b94cbd483ea621ef9ca5359e SHA256 c9ba2a01c622017d6863b8ccbf68211d3b691099e0f3cd75b66949bc2b6896fe AUX ruby-1.8.6_p111-r13657.patch 1915 RMD160 9c135a4e779095127bf7e5d47d2ae3b703e8b41e SHA1 47428434aaa61b5fd11684d8faa8c7db4886b680 SHA256 0856f5987b74be29562e16b3dafc62cb6b874e5536bd73ba2c7fb1e4a4630e24 AUX ruby-1.8.6_p287-entity_expansion_limit.diff 3423 RMD160 a3a48a3fdc3f5923e436e054625d25f7f10ba13c SHA1 642f90e45cb50413ef0ce3b31a5f8f712c55372f SHA256 a3d32bade6bfceb14b67bbc54744801c7ecf6c9e3f6a1204c46bea4a32012e37 +AUX ruby-mkconfig.patch 407 RMD160 8fdec98672ce845a94c1b28a17747c1e9dd7ec72 SHA1 1e2b97282f4fa55d213dd0b4e7c75fc53367ce7f SHA256 b1ca3500ac50fa49fa1f478aa34f318cff8d92abcd75edfc80fd96338a59e2f4 +AUX ruby-ossl_ocsp-verification.patch 1235 RMD160 73f221edff140dca5227adb693b562ec81401f83 SHA1 37a15d77b845cdb5a86fe049c069f1804efc18a8 SHA256 940f6db6f1bc58c6f4ac42439f908fd07e9711bc2522f043bf639ee2fced2856 DIST onigd2_5_9.tar.gz 221355 RMD160 ceeee9a0221d431d6576a566621ba9badab6423d SHA1 41ca5b916ae1d3b1675fcc45181a0ed04e8726b7 SHA256 b24df7c0fa6fc72ce37fd1e203f378359f29f739a3f4c5b6bdd40ca5f7d25db0 DIST ruby-1.8.6-p114.tar.bz2 3920921 RMD160 332d6e98ef79ad8175ce699ed5293407763f769f SHA1 9929782935ebb77d040593a010b8d65b03ce6e23 SHA256 4ac0d0271324c54525210f775e5fcc9a37e3d8a10b96d68cdfeeb361c6f64a63 DIST ruby-1.8.6-p287.tar.bz2 3956902 RMD160 df0950f1cdf9ea26b6d2f04756d9db89ae295de4 SHA1 29b02ccab3c1d6b4a71148ad960e65b5f892fe17 SHA256 ac15a1cb78c50ec9cc7e831616a143586bdd566bc865c6b769a0c47b3b3936ce @@ -11,8 +16,18 @@ EBUILD ruby-1.8.6_p114.ebuild 4931 RMD160 2c4ebea5ed7e80ca3473397cdd126a987bdfe9 EBUILD ruby-1.8.6_p287-r1.ebuild 4646 RMD160 39915495b9f14fa349360553ef26b405fade5a4a SHA1 70861c23eed9eeabd4b1b1353c5258a1d0a832c9 SHA256 ad5cc4a5320fb83349b14e98cf8cd6f2e791cb4bc82919e21f562bd5ac4b044e EBUILD ruby-1.8.6_p287-r10.ebuild 4731 RMD160 146d3835bf6b3c90a17cebe12189e960b0f59540 SHA1 5676c1882d1b5d8d38fb4fac8766bcaeda0ab146 SHA256 cca23cc42f3e619ab14a2ae4520614a1401e7866d9d9979f05a96a37f41ff8ba EBUILD ruby-1.8.6_p287-r11.ebuild 4794 RMD160 fb6e51eb819314a35360fbc397a6541d670a24b9 SHA1 e752bad43c64ea2fc59d7bafe9b2fe4155aaf24b SHA256 be1ad42428ddbbfc9b54381cd1f5a74b46f0d5e944ef21f24584d0bfff809b73 +EBUILD ruby-1.8.6_p287-r12.ebuild 5279 RMD160 0eee72218f6a50b389b0d14d761b1308bf96c314 SHA1 a926529124f6ca5706897a2c133c67ae35443bce SHA256 ed89c5760c6dfd89a58af9c7681a43ffc914f02b7225338a7fe469468da2e891 EBUILD ruby-1.8.6_p287-r3.ebuild 4716 RMD160 bd81fadaeacb6fd6e2186b6620fd5f7771de7279 SHA1 200d8db91cf95b5aee62d50c44c1e84a7340319d SHA256 e6a082b15adfb9f713eff21e97a40b435e167d4ce37a3fd47272b26ae4507dc4 EBUILD ruby-1.8.6_p287-r4.ebuild 4754 RMD160 1d177a447f5a28788c7da5fb1f28ab58ea5a47e7 SHA1 b0ac9d1a58a06fe66c9eb17febabde0e19f047c0 SHA256 aece074422486b145727eaa2181317f0e7d2c1b5f476542c76117b50892be880 +EBUILD ruby-1.8.6_p287-r5.ebuild 5251 RMD160 c071b7581bf03c5a3e64d75784b472d4115de9ae SHA1 f73ce663bd6a708e95832053b85e1d0c2515fc9e SHA256 33dff1af92363b720c28c2ad553b9d5c6e609458d5c862f5f1b7c960bc8ec3f9 EBUILD ruby-1.8.7_p72-r1.ebuild 4996 RMD160 fbb788ad0a6e6084843954bc4d26d18d6e3084f2 SHA1 30e2c7f785fa3ec124baa41476e0642005e366cb SHA256 dacdfba23768e420afdf3331072bc47247aa0049cd3e913a3d3e76e9f72ea46e -MISC ChangeLog 56115 RMD160 06f959b496fa211ee8ce60fbe37441f02be52e8c SHA1 88f6169695600a58a1ec1ca0bb012173ff6646f7 SHA256 0deea320a69ec53343130ddb88e582a1e7c8f472fb9987ce323e77fe5aa5c7aa +EBUILD ruby-1.8.7_p72-r2.ebuild 5483 RMD160 42d8ca02a69aacac9132e0541ea8bdfc8ec704b0 SHA1 739230e1bf6149e80e708d804fc90bebbae33525 SHA256 9a02f0d4da895bb4f7177ddbf95493f75c03fe4239c09fe7fc2f4239f543475b +MISC ChangeLog 56704 RMD160 c6ab9e2dfd53efe4cd15e86f13747cda79b360b5 SHA1 021e037bc234cdd17eb7afeaf2d4956a2d6e6faa SHA256 e80439096e2cb89278e3099b75a78d0002db6eadbaafb3fafb87a264d9a16865 MISC metadata.xml 262 RMD160 f8642aa78425fe09dc0e0660cb20a5bd4233d5bb SHA1 64def0369477ecf76b9285fb9c1cf0e6a4f334e5 SHA256 5ee3c0cfedcb966505e4fafcfc5321a8ee20c128da9bbcafff5aa268df588d59 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkmirTgACgkQk3qunHEll7MQlgCfWB3J4CQJvqtOo4TwNtpnRoUN +v0YAoMOXHH6dJiq5YbYv1QISWVMciQSz +=Zl5j +-----END PGP SIGNATURE----- diff --git a/dev-lang/ruby/files/ruby-mkconfig.patch b/dev-lang/ruby/files/ruby-mkconfig.patch new file mode 100644 index 000000000000..4426ef90d7ed --- /dev/null +++ b/dev-lang/ruby/files/ruby-mkconfig.patch @@ -0,0 +1,14 @@ +Fix for mkconfig to be able to handle empty continued lines. +Patch from [ruby-core:20420] via bug 234877. + +--- mkconfig.rb.orig 2008-06-08 01:37:10.000000000 +0900 ++++ mkconfig.rb 2009-02-12 13:39:02.000000000 +0900 +@@ -54,7 +54,7 @@ + continued_name = name + next + end +- when /^"(.+)"\s*(\\)?$/ ++ when /^"(.*)"\s*(\\)?$/ + if continued_line + continued_line << $1 + unless $2 diff --git a/dev-lang/ruby/files/ruby-ossl_ocsp-verification.patch b/dev-lang/ruby/files/ruby-ossl_ocsp-verification.patch new file mode 100644 index 000000000000..2155547ae7e3 --- /dev/null +++ b/dev-lang/ruby/files/ruby-ossl_ocsp-verification.patch @@ -0,0 +1,36 @@ +Patch for CVE-2009-0642 from [ruby-core:21762] / Redmine: [Bug #1091] + +Ruby 1.8 and 1.9 does not properly check the return value from the +OCSP_basic_verify function, which might allow remote attackers to +successfully present an invalid X.509 certificate, possibly +involving a revoked certificate. + +--- trunk/ext/openssl/ossl_ocsp.c 2008/08/31 04:45:44 18975 ++++ trunk/ext/openssl/ossl_ocsp.c 2009/02/19 06:39:52 22440 +@@ -593,22 +593,22 @@ + static VALUE + ossl_ocspbres_verify(int argc, VALUE *argv, VALUE self) + { +- VALUE certs, store, flags; ++ VALUE certs, store, flags, result; + OCSP_BASICRESP *bs; + STACK_OF(X509) *x509s; + X509_STORE *x509st; +- int flg, result; ++ int flg; + + rb_scan_args(argc, argv, "21", &certs, &store, &flags); + x509st = GetX509StorePtr(store); + flg = NIL_P(flags) ? 0 : INT2NUM(flags); + x509s = ossl_x509_ary2sk(certs); + GetOCSPBasicRes(self, bs); +- result = OCSP_basic_verify(bs, x509s, x509st, flg); ++ result = OCSP_basic_verify(bs, x509s, x509st, flg) > 0 ? Qtrue : Qfalse; + sk_X509_pop_free(x509s, X509_free); + if(!result) rb_warn("%s", ERR_error_string(ERR_peek_error(), NULL)); + +- return result ? Qtrue : Qfalse; ++ return result; + } + + /* diff --git a/dev-lang/ruby/ruby-1.8.6_p287-r12.ebuild b/dev-lang/ruby/ruby-1.8.6_p287-r12.ebuild new file mode 100644 index 000000000000..c712ad0a9f07 --- /dev/null +++ b/dev-lang/ruby/ruby-1.8.6_p287-r12.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.8.6_p287-r12.ebuild,v 1.1 2009/02/23 14:05:31 a3li Exp $ + +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" + +ONIGURUMA="onigd2_5_9" + +inherit autotools eutils flag-o-matic multilib versionator + +MY_P="${PN}-$(replace_version_separator 3 '-')" +S=${WORKDIR}/${MY_P} + +SLOT=$(get_version_component_range 1-2) +MY_SUFFIX=$(delete_version_separator 1 ${SLOT}) + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="http://www.ruby-lang.org/" +SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.bz2" + +LICENSE="Ruby" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="berkdb debug doc emacs examples gdbm ipv6 rubytests socks5 ssl threads tk xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db ) + gdbm? ( sys-libs/gdbm ) + ssl? ( dev-libs/openssl ) + socks5? ( >=net-proxy/dante-1.1.13 ) + tk? ( dev-lang/tk ) + app-admin/eselect-ruby + !=dev-lang/ruby-cvs-${SLOT}* + !dev-ruby/rdoc + !dev-ruby/rexml" +DEPEND="${RDEPEND}" +PDEPEND="emacs? ( app-emacs/ruby-mode ) + xemacs? ( app-xemacs/ruby-modes )" + +PROVIDE="virtual/ruby" + +pkg_setup() { + if use tk && ! (use threads == built_with_use dev-lang/tk threads) ; then + eerror + eerror "You have Tk support enabled." + eerror + eerror "Ruby and Tk need the same 'threads' USE flag settings." + eerror "Either change the USE flag on dev-lang/ruby or on dev-lang/tk" + eerror "and recompile tk." + + die "threads USE flag mismatch" + fi +} + +src_unpack() { + unpack ${A} + + cd "${S}/ext/dl" + epatch "${FILESDIR}/${PN}-1.8.6-memory-leak.diff" + cd "${S}" + + epatch "${FILESDIR}/${P}-entity_expansion_limit.diff" + epatch "${FILESDIR}/${PN}-1.8.6-shortname_constants.patch" + epatch "${FILESDIR}/${PN}-1.8.6-openssl.patch" + epatch "${FILESDIR}/${PN}-mkconfig.patch" + epatch "${FILESDIR}/${PN}-ossl_ocsp-verification.patch" + + # Fix a hardcoded lib path in configure script + sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ + configure.in || die "sed failed" + + eautoreconf +} + +src_compile() { + # -fomit-frame-pointer makes ruby segfault, see bug #150413. + filter-flags -fomit-frame-pointer + # In many places aliasing rules are broken; play it safe + # as it's risky with newer compilers to leave it as it is. + append-flags -fno-strict-aliasing + + # Socks support via dante + if use socks5 ; then + # Socks support can't be disabled as long as SOCKS_SERVER is + # set and socks library is present, so need to unset + # SOCKS_SERVER in that case. + unset SOCKS_SERVER + fi + + # Increase GC_MALLOC_LIMIT if set (default is 8000000) + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" + fi + + econf --program-suffix=$MY_SUFFIX --enable-shared \ + $(use_enable socks5 socks) \ + $(use_enable doc install-doc) \ + $(use_enable threads pthread) \ + $(use_enable ipv6) \ + $(use_enable debug) \ + $(use_with berkdb dbm) \ + $(use_with gdbm) \ + $(use_with ssl openssl) \ + $(use_with tk) \ + ${myconf} \ + --with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \ + --enable-option-checking=no \ + || die "econf failed" + + emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_test() { + emake -j1 test || die "make test failed" + + elog "Ruby's make test has been run. Ruby also ships with a make check" + elog "that cannot be run until after ruby has been installed." + elog + if use rubytests; then + elog "You have enabled rubytests, so they will be installed to" + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" + elog "than root, and you must place them into a writeable directory." + elog "Then call: " + elog + elog "ruby -C /location/of/tests runner.rb" + else + elog "Enable the rubytests USE flag to install the make check tests" + fi +} + +src_install() { + LD_LIBRARY_PATH="${D}/usr/$(get_libdir)" + RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${SLOT}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + export LD_LIBRARY_PATH RUBYLIB + + emake DESTDIR="${D}" install || die "make install failed" + + MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) + keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']") + keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']") + + if use doc; then + make DESTDIR="${D}" install-doc || die "make install-doc failed" + fi + + if use examples; then + dodir /usr/share/doc/${PF} + cp -pPR sample "${D}/usr/share/doc/${PF}" + fi + + dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%.*}) + dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%_*}) + + dodoc ChangeLog NEWS README* ToDo + + if use rubytests; then + dodir /usr/share/${PN}-${SLOT} + cp -pPR test "${D}/usr/share/${PN}-${SLOT}" + fi +} + +pkg_postinst() { + if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then + eselect ruby set ruby${MY_SUFFIX} + fi + + elog + elog "This ebuild is compatible to eselect-ruby" + elog "To switch between available Ruby profiles, execute as root:" + elog "\teselect ruby set ruby(18|19|...)" + elog +} + +pkg_postrm() { + if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then + eselect ruby set ruby${MY_SUFFIX} + fi +} diff --git a/dev-lang/ruby/ruby-1.8.6_p287-r5.ebuild b/dev-lang/ruby/ruby-1.8.6_p287-r5.ebuild new file mode 100644 index 000000000000..e8ef0a3914d5 --- /dev/null +++ b/dev-lang/ruby/ruby-1.8.6_p287-r5.ebuild @@ -0,0 +1,179 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.8.6_p287-r5.ebuild,v 1.1 2009/02/23 14:05:31 a3li Exp $ + +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" + +ONIGURUMA="onigd2_5_9" + +inherit autotools eutils flag-o-matic multilib versionator + +MY_P="${PN}-$(replace_version_separator 3 '-')" +S=${WORKDIR}/${MY_P} + +SLOT=$(get_version_component_range 1-2) +MY_SUFFIX=$(delete_version_separator 1 ${SLOT}) + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="http://www.ruby-lang.org/" +SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.bz2" + +LICENSE="Ruby" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="berkdb debug doc emacs examples gdbm ipv6 rubytests socks5 ssl threads tk xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db ) + gdbm? ( sys-libs/gdbm ) + ssl? ( dev-libs/openssl ) + socks5? ( >=net-proxy/dante-1.1.13 ) + tk? ( dev-lang/tk ) + >=dev-ruby/ruby-config-0.3.1 + !=dev-lang/ruby-cvs-${SLOT}* + !dev-ruby/rdoc + !dev-ruby/rexml" +DEPEND="${RDEPEND}" +PDEPEND="emacs? ( app-emacs/ruby-mode ) + xemacs? ( app-xemacs/ruby-modes )" + +PROVIDE="virtual/ruby" + +pkg_setup() { + if use tk && ! (use threads == built_with_use dev-lang/tk threads) ; then + eerror + eerror "You have Tk support enabled." + eerror + eerror "Ruby and Tk need the same 'threads' USE flag settings." + eerror "Either change the USE flag on dev-lang/ruby or on dev-lang/tk" + eerror "and recompile tk." + + die "threads USE flag mismatch" + fi +} + +src_unpack() { + unpack ${A} + + cd "${S}/ext/dl" + epatch "${FILESDIR}/${PN}-1.8.6-memory-leak.diff" + cd "${S}" + + epatch "${FILESDIR}/${P}-entity_expansion_limit.diff" + epatch "${FILESDIR}/${PN}-1.8.6-shortname_constants.patch" + epatch "${FILESDIR}/${PN}-1.8.6-openssl.patch" + epatch "${FILESDIR}/${PN}-mkconfig.patch" + epatch "${FILESDIR}/${PN}-ossl_ocsp-verification.patch" + + # Fix a hardcoded lib path in configure script + sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ + configure.in || die "sed failed" + + eautoreconf +} + +src_compile() { + # -fomit-frame-pointer makes ruby segfault, see bug #150413. + filter-flags -fomit-frame-pointer + # In many places aliasing rules are broken; play it safe + # as it's risky with newer compilers to leave it as it is. + append-flags -fno-strict-aliasing + + # Socks support via dante + if use socks5 ; then + # Socks support can't be disabled as long as SOCKS_SERVER is + # set and socks library is present, so need to unset + # SOCKS_SERVER in that case. + unset SOCKS_SERVER + fi + + # Increase GC_MALLOC_LIMIT if set (default is 8000000) + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" + fi + + econf --program-suffix=$MY_SUFFIX --enable-shared \ + $(use_enable socks5 socks) \ + $(use_enable doc install-doc) \ + $(use_enable threads pthread) \ + $(use_enable ipv6) \ + $(use_enable debug) \ + $(use_with berkdb dbm) \ + $(use_with gdbm) \ + $(use_with ssl openssl) \ + $(use_with tk) \ + ${myconf} \ + --with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \ + --enable-option-checking=no \ + || die "econf failed" + + emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_test() { + emake -j1 test || die "make test failed" + + elog "Ruby's make test has been run. Ruby also ships with a make check" + elog "that cannot be run until after ruby has been installed." + elog + if use rubytests; then + elog "You have enabled rubytests, so they will be installed to" + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" + elog "than root, and you must place them into a writeable directory." + elog "Then call: " + elog + elog "ruby -C /location/of/tests runner.rb" + else + elog "Enable the rubytests USE flag to install the make check tests" + fi +} + +src_install() { + LD_LIBRARY_PATH="${D}/usr/$(get_libdir)" + RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${SLOT}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + export LD_LIBRARY_PATH RUBYLIB + + emake DESTDIR="${D}" install || die "make install failed" + + MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) + keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']") + keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']") + + if use doc; then + make DESTDIR="${D}" install-doc || die "make install-doc failed" + fi + + if use examples; then + dodir /usr/share/doc/${PF} + cp -pPR sample "${D}/usr/share/doc/${PF}" + fi + + dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%.*}) + dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%_*}) + + dodoc ChangeLog NEWS README* ToDo + + if use rubytests; then + dodir /usr/share/${PN}-${SLOT} + cp -pPR test "${D}/usr/share/${PN}-${SLOT}" + fi +} + +pkg_postinst() { + + if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then + "${ROOT}usr/sbin/ruby-config" ruby$MY_SUFFIX + fi + elog + elog "You can change the default ruby interpreter by ${ROOT}usr/sbin/ruby-config" + elog +} + +pkg_postrm() { + if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then + "${ROOT}usr/sbin/ruby-config" ruby$MY_SUFFIX + fi +} diff --git a/dev-lang/ruby/ruby-1.8.7_p72-r2.ebuild b/dev-lang/ruby/ruby-1.8.7_p72-r2.ebuild new file mode 100644 index 000000000000..4a542562187b --- /dev/null +++ b/dev-lang/ruby/ruby-1.8.7_p72-r2.ebuild @@ -0,0 +1,186 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p72-r2.ebuild,v 1.1 2009/02/23 14:05:31 a3li Exp $ + +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" + +#PATCHES APPLY, DOESN'T COMPILE THOUGH +#ONIGURUMA="onigd2_5_9" + +inherit autotools eutils flag-o-matic multilib versionator + +SLOT=$(get_version_component_range 1-2) +MY_SUFFIX=$(delete_version_separator 1 ${SLOT}) + +MY_P="${PN}-$(replace_version_separator 3 '-')" +S=${WORKDIR}/${MY_P} + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="http://www.ruby-lang.org/" +SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.bz2" +# cjk? ( http://www.geocities.jp/kosako3/oniguruma/archive/${ONIGURUMA}.tar.gz )" + +LICENSE="Ruby" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="berkdb debug doc emacs examples gdbm ipv6 rubytests socks5 ssl threads tk xemacs" #cjk + +RDEPEND=" + berkdb? ( sys-libs/db ) + gdbm? ( sys-libs/gdbm ) + ssl? ( dev-libs/openssl ) + socks5? ( >=net-proxy/dante-1.1.13 ) + tk? ( dev-lang/tk ) + >=dev-ruby/ruby-config-0.3.1 + !=dev-lang/ruby-cvs-${SLOT}* + !dev-ruby/rdoc + !dev-ruby/rexml" +DEPEND="${RDEPEND}" +PDEPEND="emacs? ( app-emacs/ruby-mode ) + xemacs? ( app-xemacs/ruby-modes )" + +PROVIDE="virtual/ruby" + +pkg_setup() { + if use tk && ! (use threads == built_with_use dev-lang/tk threads) ; then + eerror + eerror "You have Tk support enabled." + eerror + eerror "Ruby and Tk need the same 'threads' USE flag settings." + eerror "Either change the USE flag on dev-lang/ruby or on dev-lang/tk" + eerror "and recompile tk." + + die "threads USE flag mismatch" + fi +} + +src_unpack() { + unpack ${A} + +# if use cjk ; then +# einfo "Applying ${ONIGURUMA}" +# pushd "${WORKDIR}/oniguruma" +# econf --with-rubydir="${S}" || die "oniguruma econf failed" +# emake $MY_SUFFIX || die "oniguruma emake failed" +# popd +# fi + + cd "${S}/ext/dl" + epatch "${FILESDIR}/${PN}-1.8.6-memory-leak.diff" + cd "${S}" + epatch "${FILESDIR}/${PN}-1.8.6-shortname_constants.patch" + epatch "${FILESDIR}/${PN}-mkconfig.patch" + epatch "${FILESDIR}/${PN}-ossl_ocsp-verification.patch" + + # Fix a hardcoded lib path in configure script + sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ + configure.in || die "sed failed" + + eautoreconf +} + +src_compile() { + # -fomit-frame-pointer makes ruby segfault, see bug #150413. + filter-flags -fomit-frame-pointer + # In many places aliasing rules are broken; play it safe + # as it's risky with newer compilers to leave it as it is. + append-flags -fno-strict-aliasing + + # Socks support via dante + if use socks5 ; then + # Socks support can't be disabled as long as SOCKS_SERVER is + # set and socks library is present, so need to unset + # SOCKS_SERVER in that case. + unset SOCKS_SERVER + fi + + # Increase GC_MALLOC_LIMIT if set (default is 8000000) + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" + fi + + econf --program-suffix=$MY_SUFFIX --enable-shared \ + $(use_enable socks5 socks) \ + $(use_enable doc install-doc) \ + $(use_enable threads pthread) \ + $(use_enable ipv6) \ + $(use_enable debug) \ + $(use_with berkdb dbm) \ + $(use_with gdbm) \ + $(use_with ssl openssl) \ + $(use_with tk) \ + ${myconf} \ + --with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \ + --enable-option-checking=no \ + || die "econf failed" + + emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_test() { + emake -j1 test || die "make test failed" + + elog "Ruby's make test has been run. Ruby also ships with a make check" + elog "that cannot be run until after ruby has been installed." + elog + if use rubytests; then + elog "You have enabled rubytests, so they will be installed to" + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" + elog "than root, and you must place them into a writeable directory." + elog "Then call: " + elog + elog "ruby -C /location/of/tests runner.rb" + else + elog "Enable the rubytests USE flag to install the make check tests" + fi +} + +src_install() { + LD_LIBRARY_PATH="${D}/usr/$(get_libdir)" + RUBYLIB="${S}:${LD_LIBRARY_PATH}/ruby/${SLOT}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + export LD_LIBRARY_PATH RUBYLIB + + emake DESTDIR="${D}" install || die "make install failed" + + MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) + keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']") + keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']") + + if use doc; then + make DESTDIR="${D}" install-doc || die "make install-doc failed" + fi + + if use examples; then + dodir /usr/share/doc/${PF} + cp -pPR sample "${D}/usr/share/doc/${PF}" + fi + + dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%.*}) + dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%_*}) + + dodoc ChangeLog NEWS README* ToDo + + if use rubytests; then + dodir /usr/share/${PN}-${SLOT} + cp -pPR test "${D}/usr/share/${PN}-${SLOT}" + fi +} + +pkg_postinst() { + + if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then + "${ROOT}usr/sbin/ruby-config" ruby$MY_SUFFIX + fi + elog + elog "You can change the default ruby interpreter by ${ROOT}usr/sbin/ruby-config" + elog +} + +pkg_postrm() { + if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then + "${ROOT}usr/sbin/ruby-config" ruby$MY_SUFFIX + fi +} |