diff options
author | Christian Faulhammer <fauli@gentoo.org> | 2008-10-03 18:52:07 +0000 |
---|---|---|
committer | Christian Faulhammer <fauli@gentoo.org> | 2008-10-03 18:52:07 +0000 |
commit | fc6181a8a8c7f91fd9235ebe8f99f06dc10aa7b5 (patch) | |
tree | d70ccd7f586e02d9587ed14cea02020460ff71ee /dev-lang/erlang | |
parent | Version bump. (diff) | |
download | historical-fc6181a8a8c7f91fd9235ebe8f99f06dc10aa7b5.tar.gz historical-fc6181a8a8c7f91fd9235ebe8f99f06dc10aa7b5.tar.bz2 historical-fc6181a8a8c7f91fd9235ebe8f99f06dc10aa7b5.zip |
fix severe runtime issues with get_tcp function, taken from upstream as reported in bug 239173 by Oscar Hellström <oscar AT oscarh DOT net>
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'dev-lang/erlang')
-rw-r--r-- | dev-lang/erlang/ChangeLog | 9 | ||||
-rw-r--r-- | dev-lang/erlang/Manifest | 10 | ||||
-rw-r--r-- | dev-lang/erlang/erlang-12.2.4-r1.ebuild | 158 | ||||
-rw-r--r-- | dev-lang/erlang/files/erlang-12.2.4-inet_drv.patch | 31 |
4 files changed, 203 insertions, 5 deletions
diff --git a/dev-lang/erlang/ChangeLog b/dev-lang/erlang/ChangeLog index cf37f92bfd27..6ecc6d917dd3 100644 --- a/dev-lang/erlang/ChangeLog +++ b/dev-lang/erlang/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-lang/erlang # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/ChangeLog,v 1.137 2008/09/03 15:13:23 opfer Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/ChangeLog,v 1.138 2008/10/03 18:52:07 opfer Exp $ + +*erlang-12.2.4-r1 (03 Oct 2008) + + 03 Oct 2008; Christian Faulhammer <opfer@gentoo.org> + +files/erlang-12.2.4-inet_drv.patch, +erlang-12.2.4-r1.ebuild: + fix severe runtime issues with get_tcp function, taken from upstream as + reported in bug 239173 by Oscar Hellström <oscar AT oscarh DOT net> *erlang-12.2.4 (03 Sep 2008) diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest index ccc14352bbc1..d2e38b896383 100644 --- a/dev-lang/erlang/Manifest +++ b/dev-lang/erlang/Manifest @@ -4,6 +4,7 @@ Hash: SHA1 AUX 50erlang-gentoo.el 134 RMD160 a453ad18f47d20e5ea5ecd1f4e4054d00eab5c35 SHA1 7c17979f533654ef05bbfcc8ae30554e7843923b SHA256 97e1da82cae31a554134d7370739520e4c67b2544e5a13f887651a62e710b4d4 AUX erlang-12.2.3-gethostbyname.patch 609 RMD160 37e053888f38ddcb061993d9317e144e2240f7f7 SHA1 85e5eb8b2f5bfc24644b90118ac7f10d95489933 SHA256 c24b981761f39492a150dd1fee2fb10c17869873ea2cbd679090008775960bfa AUX erlang-12.2.3-glibc28.patch 431 RMD160 0f776b37e3d072f3a8dca72f5eb1cd0893ae522f SHA1 12bdfe823e9bae3ac40d2ee8a951b183b4b85ac8 SHA256 628038216ff9f66aad5100fa8663bc4ca229b33bd9ba952b95c64b43af1635d6 +AUX erlang-12.2.4-inet_drv.patch 1252 RMD160 5473604c27455d6865582649c7f8415e48d9f931 SHA1 9eca4efb6097e538022cbe50641a53a9f6984fab SHA256 ee718ce7bcd31030f8899182ebd9c9ae2ac12f186851e32f95bf127f42a0cd29 DIST otp_doc_html_R12B-3.tar.gz 5655205 RMD160 8295d4e94952bad6458f2038415c474e687631cb SHA1 194003607113c84aef5b5daad7ca8b8901d1d80a SHA256 4690829f270a40d6c1849a34e9854ba4f55e1ec1a1e91dbc09e6a0a0a7228005 DIST otp_doc_html_R12B-4.tar.gz 5674796 RMD160 bf05981ddf2e97910141739980cee09572b1c34d SHA1 cbe6bc52a5000b21de5cac5f9b2672b935e94ed7 SHA256 00c16e09dbe7510efd4ff121347e08eb4b715ee4c82cafec75fdfeedfc40a923 DIST otp_doc_man_R12B-3.tar.gz 809746 RMD160 7e0c27391f42b1e58c7bb1472594e9fe6f7ac414 SHA1 8ea4c9fa7d941c339c73bb417f88ee939d6989eb SHA256 08e3ed5a285eabe94fef6726bd591e02c42a8425ddcdb6a6d3f38f4a2d517e62 @@ -11,13 +12,14 @@ DIST otp_doc_man_R12B-4.tar.gz 814528 RMD160 f14eb1f542ebecceddd6ac70aa4ed325f91 DIST otp_src_R12B-3.tar.gz 42195557 RMD160 e7b5da985b939e51ef4e2d19fb96cff1781ce263 SHA1 ea5f202cc35ed6ef2796727b95d62c9bbe6ad5e5 SHA256 a8ed977d468454ca8d849ee5fa08ac3d521d76f23649bef531b76bdfa73f8eb2 DIST otp_src_R12B-4.tar.gz 44405399 RMD160 3c57ae04388c0493d97c76529c57c50de639bdce SHA1 4e42454c3f560ce6efd3c917a79a5b288664e329 SHA256 abe19407b7557fd1e25f08adb8a387c144d994a2134c467fb2dca7fb7dc061f4 EBUILD erlang-12.2.3-r1.ebuild 4820 RMD160 98a3daaf37517376c9a786b8d58004105bdf6528 SHA1 cf5d110c0eec7d0a894e8d6b414ee279aec7af45 SHA256 555415b7883c00d0b0e2012a03e9d6b79f994096c6cfe751a25a0ca4dabac96a +EBUILD erlang-12.2.4-r1.ebuild 4856 RMD160 d4f5b7d0843aeac1d8460609618a7dc5ac7e444b SHA1 2c745c6c13d2332e497dc933ab8e0f970cf7b721 SHA256 4e0d95364fd0ecb7d313ea51aeeb2ee88734f111ef1662f73f172a463ea6c7a5 EBUILD erlang-12.2.4.ebuild 4726 RMD160 c8e0cf3413dc80e6fb50d452bd4fafa791eff624 SHA1 9c4e9c6e347256ab100112dadc36b65d2e10afa5 SHA256 4891a0aacaba6c8e1035bf703db359c1c33348c3d2c84a4239e37f2a2a196a22 -MISC ChangeLog 22834 RMD160 30ae04a920650a615c2d5783d0ef32fd62c5eaaf SHA1 b3df5db13243f6c7b68395769bb280f02a9f6db6 SHA256 6b96ab36849e489aa427ae2e4c660964c662d92ed209945756f219c38e123fb3 +MISC ChangeLog 23133 RMD160 e4752f51cf8d600606d14f8633bbdedac60d9e11 SHA1 0c977ff93a096933a63af345e2c4b06f7f5fd930 SHA256 3f58a4e35c47b2660617a2dc6d6a161addd6daead7844a67ed3272d8410db114 MISC metadata.xml 756 RMD160 a8696744a014686725d3d4564f72fda756c9ed30 SHA1 401ad27309457ecfdebfbb9afbfe7884355b2943 SHA256 9e43ae1a447628dd51dd7077cef97bf984fff99a97a87d466a30fe0a1e00b5a5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAki+qdEACgkQNQqtfCuFneM26gCeMyzvN6zl3kxXszFgSyua6Ho7 -IycAoJnhGTV41XzcsJRbpGmiELXBSBci -=R807 +iEYEARECAAYFAkjmaeIACgkQNQqtfCuFneN1UQCfQVg/YOpWkn/Ifo/9lnaX97RS +j74An0LzjQjbD3BDLt0AZPbdvoDiR5bm +=yiMQ -----END PGP SIGNATURE----- diff --git a/dev-lang/erlang/erlang-12.2.4-r1.ebuild b/dev-lang/erlang/erlang-12.2.4-r1.ebuild new file mode 100644 index 000000000000..f210b6117a51 --- /dev/null +++ b/dev-lang/erlang/erlang-12.2.4-r1.ebuild @@ -0,0 +1,158 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-12.2.4-r1.ebuild,v 1.1 2008/10/03 18:52:07 opfer Exp $ + +inherit autotools elisp-common eutils flag-o-matic multilib versionator + +# NOTE: If you need symlinks for binaries please tell maintainers or +# open up a bug to let it be created. + +# erlang uses a really weird versioning scheme which caused quite a few problems +# already. Thus we do a slight modification converting all letters to digits to +# make it more sane (see e.g. #26420) + +# the next line selects the right source. +MY_PV="R$(get_major_version)B-$(get_version_component_range 3)" + +# ATTN!! Take care when processing the C, etc version! +MY_P=otp_src_${MY_PV} + +DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries" +HOMEPAGE="http://www.erlang.org/" +SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz + doc? ( http://erlang.org/download/otp_doc_man_${MY_PV}.tar.gz + http://erlang.org/download/otp_doc_html_${MY_PV}.tar.gz )" + +LICENSE="EPL" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="doc emacs hipe java kpoll odbc smp sctp ssl tk" + +RDEPEND=">=dev-lang/perl-5.6.1 + ssl? ( >=dev-libs/openssl-0.9.7d ) + emacs? ( virtual/emacs ) + java? ( >=virtual/jdk-1.2 ) + odbc? ( dev-db/unixODBC )" +DEPEND="${RDEPEND} + sctp? ( net-misc/lksctp-tools ) + tk? ( dev-lang/tk )" + +S="${WORKDIR}/${MY_P}" + +SITEFILE=50${PN}-gentoo.el + +src_unpack() { + unpack ${A} + cd "${S}" + + use odbc || sed -i 's: odbc : :' lib/Makefile + + # Fix build on Gentoo/FreeBSD, upstream once accepted it but restored previous behaviour + # because of failures on vanilla BSD + epatch "${FILESDIR}"/${PN}-12.2.3-gethostbyname.patch + # incorporated by upstream for 12B-5 or later, fixes runtime issues from bug 239173 + epatch "${FILESDIR}"/${P}-inet_drv.patch + + if use hipe; then + ewarn + ewarn "You enabled High performance Erlang. Be aware that this extension" + ewarn "can break the compilation in many ways, especially on hardened systems." + ewarn "Don't cry, don't file bugs, just disable it! If you have fix, tell us." + ewarn + fi + eautoreconf +} + +src_compile() { + use java || export JAVAC=false + + econf \ + --enable-threads \ + $(use_enable sctp) \ + $(use_enable hipe) \ + $(use_with ssl) \ + $(use_enable ssl dynamic-ssl-lib) \ + $(use_enable kpoll kernel-poll) \ + $(use_enable smp smp-support) \ + || die "econf failed" + emake -j1 || die "emake failed" + + if use emacs ; then + pushd lib/tools/emacs + elisp-compile *.el || die + popd + fi +} + +extract_version() { + sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk" +} + +src_install() { + local ERL_LIBDIR=/usr/$(get_libdir)/erlang + local ERL_INTERFACE_VER=$(extract_version lib/erl_interface EI_VSN) + local ERL_ERTS_VER=$(extract_version erts VSN) + + emake -j1 INSTALL_PREFIX="${D}" install || die "install failed" + dodoc AUTHORS README + + dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl + dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc + dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript + dosym \ + "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \ + /usr/bin/erl_call + dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam + + ## Remove ${D} from the following files + dosed "${ERL_LIBDIR}/bin/erl" + dosed "${ERL_LIBDIR}/bin/start" + grep -rle "${D}" "${D}/${ERL_LIBDIR}/erts-${ERL_ERTS_VER}" | xargs sed -i -e "s:${D}::g" + + ## Clean up the no longer needed files + rm "${D}/${ERL_LIBDIR}/Install" + + if use doc ; then + for i in "${WORKDIR}"/man/man* ; do + dodir "${ERL_LIBDIR}/${i##${WORKDIR}}" + done + for file in "${WORKDIR}"/man/man*/*.[1-9]; do + # Man page processing tools expect a capitalized "SEE ALSO" section + # header, has been reported upstream, should be fixed in R12 + sed -i -e 's,\.SH See Also,\.SH SEE ALSO,g' ${file} + # doman sucks so we can't use it + cp ${file} "${D}/${ERL_LIBDIR}"/man/man${file##*.}/ + done + # extend MANPATH, so the normal man command can find it + # see bug 189639 + dodir /etc/env.d/ + echo "MANPATH=\"${ERL_LIBDIR}/man\"" > "${D}/etc/env.d/90erlang" + dohtml -A README,erl,hrl,c,h,kwc,info -r \ + "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-* + fi + + if use emacs ; then + pushd "${S}" + elisp-install erlang lib/tools/emacs/*.{el,elc} + elisp-site-file-install "${FILESDIR}"/${SITEFILE} + popd + fi + + # prepare erl for SMP, fixes bug #188112 + use smp && sed -i -e 's:\(exec.*erlexec\):\1 -smp:' \ + "${D}/${ERL_LIBDIR}/bin/erl" +} + +pkg_postinst() { + use emacs && elisp-site-regen + elog + elog "If you need a symlink to one of Erlang's binaries," + elog "please open a bug on http://bugs.gentoo.org/" + elog + elog "Gentoo's versioning scheme differs from the author's, so please refer to this version as ${MY_PV}" + elog +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-lang/erlang/files/erlang-12.2.4-inet_drv.patch b/dev-lang/erlang/files/erlang-12.2.4-inet_drv.patch new file mode 100644 index 000000000000..8baca6ebe3c0 --- /dev/null +++ b/dev-lang/erlang/files/erlang-12.2.4-inet_drv.patch @@ -0,0 +1,31 @@ +--- otp_src_R12B-4.orig/erts/emulator/drivers/common/inet_drv.c 2008-09-01 05:51:18.000000000 -0700 ++++ otp_src_R12B-4/erts/emulator/drivers/common/inet_drv.c 2008-09-30 10:38:06.000000000 -0700 +@@ -7239,19 +7239,18 @@ + buf, &len) == NULL) + return ctl_error(EINVAL, rbuf, rsize); + +- sock_select(INETP(desc), FD_CONNECT, 1); + code = sock_connect(desc->inet.s, + (struct sockaddr*) &desc->inet.remote, len); + if ((code == SOCKET_ERROR) && + ((sock_errno() == ERRNO_BLOCK) || /* Winsock2 */ + (sock_errno() == EINPROGRESS))) { /* Unix & OSE!! */ + desc->inet.state = TCP_STATE_CONNECTING; ++ sock_select(INETP(desc), FD_CONNECT, 1); + if (timeout != INET_INFINITY) + driver_set_timer(desc->inet.port, timeout); + enq_async(INETP(desc), tbuf, INET_REQ_CONNECT); + } + else if (code == 0) { /* ok we are connected */ +- sock_select(INETP(desc), FD_CONNECT, 0); + desc->inet.state = TCP_STATE_CONNECTED; + if (desc->inet.active) + sock_select(INETP(desc), (FD_READ|FD_CLOSE), 1); +@@ -7259,7 +7258,6 @@ + async_ok(INETP(desc)); + } + else { +- sock_select(INETP(desc), FD_CONNECT, 0); + return ctl_error(sock_errno(), rbuf, rsize); + } + return ctl_reply(INET_REP_OK, tbuf, 2, rbuf, rsize); |