Sync with portage [Sat Oct 24 23:51:56 MSK 2015].

mhiretskiy 89
root 9 years ago
parent da2bb32be2
commit 9bb258751f

@ -0,0 +1,157 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
WX_GTK_VER="3.0"
inherit eutils multilib toolchain-funcs wxwidgets
DESCRIPTION="Port of 7-Zip archiver for Unix"
HOMEPAGE="http://p7zip.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}_src_all.tar.bz2"
LICENSE="LGPL-2.1 rar? ( unRAR )"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
IUSE="doc kde rar +pch static wxwidgets abi_x86_x32"
REQUIRED_USE="kde? ( wxwidgets )"
RDEPEND="
kde? ( x11-libs/wxGTK:${WX_GTK_VER}[X] kde-base/kdelibs )
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
DEPEND="${RDEPEND}
amd64? ( dev-lang/yasm )
abi_x86_x32? ( >=dev-lang/yasm-1.2.0-r1 )
x86? ( dev-lang/nasm )"
S=${WORKDIR}/${PN}_${PV}
src_prepare() {
epatch \
"${FILESDIR}"/${P}-osversion.patch \
"${FILESDIR}"/${P}-CVE-2015-1038.patch
if ! use pch; then
sed "s:PRE_COMPILED_HEADER=StdAfx.h.gch:PRE_COMPILED_HEADER=:g" -i makefile.* || die
fi
sed \
-e 's:-m32 ::g' \
-e 's:-m64 ::g' \
-e 's:-O::g' \
-e 's:-pipe::g' \
-e "/^CXX=/s:g++:$(tc-getCXX):" \
-e "/^CC=/s:gcc:$(tc-getCC):" \
-e '/ALLFLAGS/s:-s ::' \
-e "/OPTFLAGS=/s:=.*:=${CXXFLAGS}:" \
-i makefile* || die
# remove non-free RAR codec
if use rar; then
ewarn "Enabling nonfree RAR decompressor"
else
sed \
-e '/Rar/d' \
-e '/RAR/d' \
-i makefile* CPP/7zip/Bundles/Format7zFree/makefile || die
rm -rf CPP/7zip/Compress/Rar || die
fi
if use abi_x86_x32; then
sed -i -e "/^ASM=/s:amd64:x32:" makefile*
cp -f makefile.linux_amd64_asm makefile.machine || die
elif use amd64; then
cp -f makefile.linux_amd64_asm makefile.machine || die
elif use x86; then
cp -f makefile.linux_x86_asm_gcc_4.X makefile.machine || die
elif [[ ${CHOST} == *-darwin* ]] ; then
# Mac OS X needs this special makefile, because it has a non-GNU linker
[[ ${CHOST} == *64-* ]] \
&& cp -f makefile.macosx_64bits makefile.machine \
|| cp -f makefile.macosx_32bits makefile.machine
# bundles have extension .bundle but don't die because USE=-rar
# removes the Rar directory
sed -i -e '/strcpy(name/s/\.so/.bundle/' \
CPP/Windows/DLL.cpp || die
sed -i -e '/^PROG=/s/\.so/.bundle/' \
CPP/7zip/Bundles/Format7zFree/makefile \
$(use rar && echo CPP/7zip/Compress/Rar/makefile) || die
elif use x86-fbsd; then
# FreeBSD needs this special makefile, because it hasn't -ldl
sed -e 's/-lc_r/-pthread/' makefile.freebsd > makefile.machine
fi
if use static; then
sed -i -e '/^LOCAL_LIBS=/s/LOCAL_LIBS=/&-static /' makefile.machine || die
fi
if use kde || use wxwidgets; then
need-wxwidgets unicode
einfo "Preparing dependency list"
emake depend
fi
}
src_compile() {
emake all3
if use kde || use wxwidgets; then
emake -- 7zG
emake -- 7zFM
fi
}
src_test() {
emake test test_7z test_7zr
}
src_install() {
# this wrappers can not be symlinks, p7zip should be called with full path
make_wrapper 7zr "/usr/$(get_libdir)/${PN}/7zr"
make_wrapper 7za "/usr/$(get_libdir)/${PN}/7za"
make_wrapper 7z "/usr/$(get_libdir)/${PN}/7z"
if use kde || use wxwidgets; then
make_wrapper 7zG "/usr/$(get_libdir)/${PN}/7zG"
make_wrapper 7zFM "/usr/$(get_libdir)/${PN}/7zFM"
make_desktop_entry 7zFM "${PN} FM" ${PN} "GTK;Utility;Archiving;Compression"
dobin GUI/p7zipForFilemanager
exeinto /usr/$(get_libdir)/${PN}
doexe bin/7z{G,FM}
insinto /usr/$(get_libdir)/${PN}
doins -r GUI/{Lang,help}
insinto /usr/share/icons/hicolor/16x16/apps/
newins GUI/p7zip_16_ok.png p7zip.png
if use kde; then
rm GUI/kde4/p7zip_compress.desktop || die
insinto /usr/share/kde4/services/ServiceMenus
doins GUI/kde4/*.desktop
fi
fi
dobin contrib/gzip-like_CLI_wrapper_for_7z/p7zip
doman contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1
exeinto /usr/$(get_libdir)/${PN}
doexe bin/7z bin/7za bin/7zr bin/7zCon.sfx
doexe bin/*$(get_modname)
if use rar; then
exeinto /usr/$(get_libdir)/${PN}/Codecs/
doexe bin/Codecs/*$(get_modname)
fi
doman man1/7z.1 man1/7za.1 man1/7zr.1
dodoc ChangeLog README TODO
if use doc; then
dodoc DOC/*.txt
dohtml -r DOC/MANUAL/*
fi
}

@ -1,2 +1 @@
DIST ghex-3.10.0.tar.xz 1287520 SHA256 9c31383b1d32c8942ca0327c615336f5777309674c4fc090e8cceb1576c63255 SHA512 76c298a8156b778e8b1c0ee51a2388db51181b74270b898ebd5c720e6f1a88467bfe10578de74c8fde189706b62754a75ee9a1317a8e2b45c3ff32ec34a6da3a WHIRLPOOL ef2882d24a8148e06fa55a6a22f78148e8b565fc45cfe28a8630123a4f8e2f0fd243ad3a31f206a75926ddb262caa29eafa9ca210a01794ceb6926cf73f4a060
DIST ghex-3.10.1.tar.xz 1424308 SHA256 34b66cb5c84410c420df72f229d25aee5979e58048a246ed719b046f0c241132 SHA512 bfb7f4af1c36698571ea176fd4bbba2ea11a337a8e02976da6b784bd5cc634a4b853e36918ebaeea382d680e796343838ce4709ac720da86755628894043c28c WHIRLPOOL f63bbd4256d4e6e3134e4f58a2b1667d3536aea62605f5762f0ed04191e192e986663c53c7537996553325003dec38f4419b1d9a84465f958e0f5f76cec6fe1e

@ -1,28 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
GCONF_DEBUG="no"
inherit gnome2
DESCRIPTION="GNOME hexadecimal editor"
HOMEPAGE="https://live.gnome.org/Ghex"
LICENSE="GPL-2+ FDL-1.1+"
SLOT="2"
KEYWORDS="amd64 ~arm ~ppc x86 ~x86-interix ~amd64-linux ~x86-linux"
IUSE=""
RDEPEND="
>=dev-libs/atk-1
>=dev-libs/glib-2.31.10:2
>=x11-libs/gtk+-3.3.8:3
"
DEPEND="${RDEPEND}
>=dev-util/intltool-0.41.1
>=sys-devel/gettext-0.17
app-text/yelp-tools
virtual/pkgconfig
"

@ -1,3 +1,2 @@
DIST org-8.2.1.tar.gz 4215666 SHA256 625e2b6786158bcf6c43194075f7638ab8048c68a60025289a051c407e467823 SHA512 366504c8bc4637c96d6255603e949951fed1d89b9b58aa938072c982cca14d5eedfa2a45aabbae55d4862aa9dcc984b379f969cf5b6da50f73d2e0044cd687fb WHIRLPOOL 024166ee4eb6bb994f44249ea819ac3b4aad9c133bfcbc438d57a4dce54b3c8a108519eabf9318e769768be36d1733066bbec58cfaf03fc600de72fd55e3c29d
DIST org-8.2.5h.tar.gz 4220242 SHA256 f0f4924c9d57557b12f535c032f5f8584cc27ab6af2afc9939f9acf1af2c5d80 SHA512 e486a6f831de935fbe9cbcff18042a5a5ff9ecb60ffd755455c70488f95c6c103f7870d7d69f9808043b2b87fe64441adfd5c9ddb417b33fd8f9469d1943db49 WHIRLPOOL 72290244aaabd09660fd290a100d8ae2ed05b64d3b842464f247c20c634a75e2738c07e85d414b852685f2fade0b2aea92a1a2835d178d90b7eab5650710066b
DIST org-8.2.6.tar.gz 4221803 SHA256 a14a20f3d11855758ad8859e8ccdc50922c31bd64b493d44b856d46441362938 SHA512 a64e975738f26b5315584b51332dbcd29eb6e5b03cb505d638d611455beb921c5e0b728b23fb63f380d46d2e33092865b02de01259cff8985693febebcc1a8a3 WHIRLPOOL b834203c48948a84d6458b7f455451cfd3f40fccd0ae55f150cf105ef937f46fb52492642990cf33c90a2464b93d184d85d922680adf4e66a2af5308d3ac631c
DIST org-8.3.2.tar.gz 4442361 SHA256 8ae811d19546f73306710f70eed8ee1a1ec9981e78b98af077fa224d5e8875b8 SHA512 3e1ff47c875a2db3239add8b060f555da357e465161ca62860c0ac2734c2e31c5387d2df4223ab7ea8ea60050f9a845d160b0bcb3afcf36f1d3cabcaa961e6a2 WHIRLPOOL 7ae9c53aa116d1e5cf7527959cdb58cdce63d99d0e487979ee02a12bbb21cbbd0b9a25de7dc86364a6e4affa89813557fc58efa8c1693bcfe1a975f836ef6c1c

@ -1,54 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit elisp
DESCRIPTION="An Emacs mode for notes and project planning"
HOMEPAGE="http://www.orgmode.org/"
SRC_URI="http://orgmode.org/org-${PV}.tar.gz"
LICENSE="GPL-3+ FDL-1.3+ contrib? ( GPL-2+ MIT ) odt-schema? ( OASIS-Open )"
SLOT="0"
KEYWORDS="amd64 ~ppc x86 ~x86-fbsd ~x86-macos"
IUSE="contrib doc odt-schema"
RESTRICT="test"
DEPEND="doc? ( virtual/texi2dvi )"
S="${WORKDIR}/org-${PV}"
SITEFILE="50${PN}-gentoo.el"
src_compile() {
emake datadir="${EPREFIX}${SITEETC}/${PN}"
use doc && emake pdf card
}
src_install() {
emake \
DESTDIR="${D}" \
ETCDIRS="styles $(use odt-schema && echo schema)" \
lispdir="${EPREFIX}${SITELISP}/${PN}" \
datadir="${EPREFIX}${SITEETC}/${PN}" \
infodir="${EPREFIX}/usr/share/info" \
install
cp "${FILESDIR}/${SITEFILE}" "${T}/${SITEFILE}" || die
if use contrib; then
elisp-install ${PN}/contrib contrib/lisp/{org,ob,ox}*.el
insinto /usr/share/doc/${PF}/contrib
doins -r contrib/README contrib/scripts
find "${ED}/usr/share/doc/${PF}/contrib" -type f -name '.*' \
-exec rm -f '{}' '+'
# add the contrib subdirectory to load-path
sed -i -e 's:\(.*@SITELISP@\)\(.*\):&\n\1/contrib\2:' \
"${T}/${SITEFILE}" || die
fi
elisp-site-file-install "${T}/${SITEFILE}"
dodoc README doc/library-of-babel.org doc/orgcard.txt etc/ORG-NEWS
use doc && dodoc doc/org.pdf doc/orgcard.pdf doc/orgguide.pdf
}

@ -1,4 +1,4 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -12,7 +12,7 @@ SRC_URI="http://orgmode.org/org-${PV}.tar.gz"
LICENSE="GPL-3+ FDL-1.3+ contrib? ( GPL-2+ MIT ) odt-schema? ( OASIS-Open )"
SLOT="0"
KEYWORDS="amd64 ppc x86 ~x86-fbsd ~x86-macos"
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd ~x86-macos"
IUSE="contrib doc odt-schema"
RESTRICT="test"

@ -0,0 +1 @@
DIST flannel-0.5.4.tar.gz 578005 SHA256 14bbbabdbb85f3366ae6788a8b8ba110d56add15e06def4d8ead4c9698fc15fd SHA512 535d3de31186760cd72cac5753fabc269c8ebf9f3fe90a381b86dae0747a1dd4f4099cce19729a7d5990fefc99236bea8742062605a376f9bd9f653c07b4e92a WHIRLPOOL 10756f47fc35ce39ac1b9321d4bb347993d8d5dd37bc83bf769e35e32f3de02bbba89d39142c4b6eb8a6bd92be7a5ad91c45bf0f8aeb6e0efe050383766c3aef

@ -0,0 +1,2 @@
[Service]
EnvironmentFile=-/run/flannel/docker

@ -0,0 +1 @@
d /run/flannel 0755 root root

@ -0,0 +1,13 @@
[Unit]
Description=Flanneld overlay address etcd agent
After=network.target
Before=docker.service
[Service]
Type=notify
Environment=FLANNEL_ETCD=http://127.0.0.1:4001 FLANNEL_ETCD_KEY=/coreos.com/network
ExecStart=/usr/bin/flanneld -etcd-endpoints=${FLANNEL_ETCD} -etcd-prefix=${FLANNEL_ETCD_KEY} $FLANNEL_OPTIONS
ExecStartPost=/usr/libexec/flannel/mk-docker-opts.sh -k DOCKER_NETWORK_OPTIONS -d /run/flannel/docker
[Install]
RequiredBy=docker.service

@ -0,0 +1,46 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
inherit systemd user
KEYWORDS="~amd64"
DESCRIPTION="An etcd backed network fabric for containers"
GO_PN="github.com/coreos/flannel"
HOMEPAGE="https://${GO_PN}"
SRC_URI="https://${GO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
DEPEND=">=dev-lang/go-1.4:="
RDEPEND=""
src_prepare() {
local line
sed -e 's:go build:[[ ${0##*/} == test ]] || \0 -v -x:' -i build || die
sed -e 's:go test:\0 -v:' -i test || die
# remote_test.go:98: GetNetworkConfig failed: Get http://127.0.0.1:9999/v1/_/config: dial tcp 127.0.0.1:9999: getsockopt: connection refused
sed -e 's:^func TestRemote:func _TestRemote:' -i remote/remote_test.go || die
}
src_compile() {
"${BASH}" -ex ./build || die 'Build failed'
}
src_test() {
"${BASH}" -ex ./test || die 'Tests failed'
}
src_install() {
dobin bin/*
exeinto /usr/libexec/flannel
doexe dist/mk-docker-opts.sh
insinto /etc/systemd/system/docker.service.d
newins "${FILESDIR}/flannel-docker.conf" flannel.conf
systemd_newtmpfilesd "${FILESDIR}/flannel.tmpfilesd" flannel.conf
systemd_dounit "${FILESDIR}/flanneld.service"
}

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
<email>zmedico@gentoo.org</email>
</maintainer>
<upstream>
<remote-id type="github">coreos/flannel</remote-id>
</upstream>
</pkgmetadata>

@ -3,3 +3,4 @@ DIST sphinx-0.9.9.tar.gz 1218359 SHA256 bf8f55ffc095ff6b628f0cbc7eb5476181114014
DIST sphinx-2.0.10-release.tar.gz 2016687 SHA256 efc9e90d1edec4f159846c8d4ca8839e7dcf9ef88c117d0d369aaead75809f0a SHA512 d22a0ce261cd6decda2e9e91fc9806699c818bb45a9c9c5e11a0944a698d47b5862c577eb55e7b57dd208db982e7f8bfc7163af37aaedc1c537841aff1409952 WHIRLPOOL 46e17cc73225692e8ab73438547863ba78ef7c1be306bd46e393723220007b95d9a0ca62cbd8175423b62bf4599a68c4a4831ac6472d02249104ecdf0e3892ac
DIST sphinx-2.1.8-release.tar.gz 2442119 SHA256 8aebff8b00ec07b71790a67781c80a9a9b3ee28e2a35b226663aaf37cb78b6db SHA512 e53d62a694c1f89a9614d15a7820f245cdad03d6bc4d512dd3dd743908f11c582f45d5cc0a416d0d05b4cbfaffc491fe40e704c03149774ef498b54519d288cf WHIRLPOOL e4bb44920ed536bf6f8dd52fa1c373e9c88fb07a98a7458bd6f39feee2f10323bae13431d26d6340537cc3d2bfde9b4af188cac89b8bf1694aeb3d0842ad71e7
DIST sphinx-2.1.9-release.tar.gz 2443797 SHA256 6289aa0ac3e1456a0c9181ce6bce2287778b5a163f685a1376e181fc87eb7c03 SHA512 7f4538011db5d68bd00c00978d476f780fc2d355113bd2819996bacbaef90b0de5b14c946a9aad83157b818d9b6b01ee0a26bc72862cfd151067ad9967c18f56 WHIRLPOOL fd9e6d31c8b9d88b8de7462ccd947aeb85d97ee4c23c64788653f732a5e47dad134c0f8cedc3b0ccc2d744eb0c4aaeb2d32fbdb02bae50be0d4ed8841a0683a1
DIST sphinx-2.2.10-release.tar.gz 3109250 SHA256 054cb86e64bd48997d89386e1224d4405063d9857b2d7c33dc6cc1b9ef6df440 SHA512 07683f64df730368563e11a7d2939b521837c9a04944ab7d6d09732ab06e451b674169eca4f85db2aae41d883bd16fb4d17b9265912fea9691d07d407d7212d8 WHIRLPOOL b98f7c99d09d10cb4f3656da72acb6c986fe674ecb00347e69a979617253dcf3189aa7507fcabe3d932f6f5f1003b781f6d29bf8d94e777f54ec2588a14855ef

@ -6,6 +6,7 @@
</maintainer>
<use>
<flag name='id64'>use 64-bit document and word IDs</flag>
<flag name='re2'>use the <pkg>dev-libs/re2</pkg> regular expression library</flag>
<flag name='stemmer'>Enable language stemming support</flag>
</use>
</pkgmetadata>

@ -0,0 +1,92 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils autotools toolchain-funcs
#MY_P=${P/_/-}
MY_P=${P}-release
DESCRIPTION="Full-text search engine with support for MySQL and PostgreSQL"
HOMEPAGE="http://www.sphinxsearch.com/"
SRC_URI="http://sphinxsearch.com/files/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="debug id64 mysql odbc postgres re2 stemmer syslog xml"
RDEPEND="mysql? ( virtual/mysql )
postgres? ( dev-db/postgresql:* )
odbc? ( dev-db/unixODBC )
re2? ( dev-libs/re2 )
stemmer? ( dev-libs/snowball-stemmer )
xml? ( dev-libs/expat )
virtual/libiconv"
S=${WORKDIR}/${MY_P}
src_prepare() {
epatch "${FILESDIR}"/${PN}-2.0.1_beta-darwin8.patch
# drop nasty hardcoded search path breaking Prefix
# We patch configure directly since otherwise we need to run
# eautoreconf twice and that causes problems, bug 425380
sed -i -e 's/\/usr\/local\//\/someplace\/nonexisting\//g' configure || die
# Fix QA compilation warnings.
sed -i -e '19i#include <string.h>' api/libsphinxclient/test.c || die
pushd api/libsphinxclient || die
eautoreconf
popd || die
# Drop bundled code to ensure building against system versions. We
# cannot remove libstemmer_c since configure updates its Makefile.
rm -rf libexpat libre2 || die
}
src_configure() {
# fix libiconv detection
use !elibc_glibc && export ac_cv_search_iconv=-liconv
econf \
--sysconfdir="${EPREFIX}/etc/${PN}" \
$(use_enable id64) \
$(use_with debug) \
$(use_with mysql) \
$(use_with odbc unixodbc) \
$(use_with postgres pgsql) \
$(use_with re2) \
$(use_with stemmer libstemmer) \
$(use_with syslog syslog) \
$(use_with xml libexpat )
cd api/libsphinxclient || die
econf STRIP=:
}
src_compile() {
emake AR="$(tc-getAR)" || die "emake failed"
emake -j 1 -C api/libsphinxclient || die "emake libsphinxclient failed"
}
src_test() {
# Tests require a live database and only work from the source
# directory.
:
}
src_install() {
emake DESTDIR="${D}" install || die "install failed"
emake DESTDIR="${D}" -C api/libsphinxclient install || die "install libsphinxclient failed"
dodoc doc/*
dodir /var/lib/sphinx
dodir /var/log/sphinx
newinitd "${FILESDIR}"/searchd.rc searchd
}

@ -1,17 +1,16 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>proxy-maintainers</herd>
<maintainer>
<email>me@bearsh.org</email>
<name>Martin Gysel</name>
<description>Proxy maintainer. Assign bugs to him.</description>
</maintainer>
<maintainer>
<email>bauman.aaron@gmail.com</email>
<email>bman@gentoo.org</email>
<name>Aaron Bauman</name>
<description>Proxy maintainer. Please CC bugs to him.</description>
</maintainer>
<herd>proxy-maintainers</herd>
<longdescription lang="en">
An open source dive log program.
</longdescription>

@ -32,7 +32,7 @@ IUSE="debug doc usb"
RDEPEND="dev-db/sqlite:3
dev-libs/glib:2
>=dev-libs/libdivecomputer-${LIBDC_V}[usb?]
dev-libs/libgit2:=
dev-libs/libgit2:0/21
dev-libs/libxml2
dev-libs/libxslt
dev-libs/libzip
@ -59,7 +59,7 @@ src_unpack() {
}
rm_trans() {
rm "${ED}/usr/share/${PN}/translations/${PN}_${1}.qm" || die "rm ${PN}_${1}.qm failed"
rm "${D}usr/share/${PN}/translations/${PN}_${1}.qm" || die "rm ${PN}_${1}.qm failed"
}
src_install() {
@ -68,9 +68,9 @@ src_install() {
l10n_for_each_disabled_locale_do rm_trans
# this is not a translation but present (no need to die if not present)
rm "${ED}/usr/share/${PN}/translations/${PN}_source.qm"
rm "${D}usr/share/${PN}/translations/${PN}_source.qm"
if ! use doc; then
rm -R "${ED}/usr/share/${PN}/Documentation"* || die "rm doc failed"
rm -R "${D}usr/share/${PN}"/Documentation/* || die "rm doc failed"
fi
}

@ -1,2 +1,2 @@
DIST v1_10_6.tar.gz 6444740 SHA256 f8699fbbfef7f3de2226f5f7dc4c74d98de3b59bfed4c6dac70bb231ec405760 SHA512 5c2a7dac1614751edf925eefa945e08e0b2fb318903b12fc8d4acde0b6027ecb534c90933da14796edc958f0d9a2f892815fddea9ab41ac921756fc5577acd8e WHIRLPOOL 91c47a66f0ab60f2560b103ef7ac6591088296b470d3403d6d9f511d44e361fc6841d9fda85d9c24d6c60595ea66b2a18ebb34c806d3ab4b465895a427a6d819
DIST workrave-1.10.1.tar.gz 6800197 SHA256 6ef89aebd278e27d3b73896485e7d8aaef415e7d18318d3bb7ba0d0507bd48de SHA512 4f721ebaceb43f542c25b0eb3fcd2e2d205290c982ddb57628c56bfed0c63fdde85adf304b4fdaf07908e31e8e31942ffdf17a9f1f0a3e62fec71aa5722d946a WHIRLPOOL f365ba528ef56cc6475dc7898b98d08532724a5cebab81e0a7b25534eaa78871a7ac2e7d7d016fd6812099031355d4950b7eecd671befa2127295cbc68dca498
DIST workrave-1.10.6.tar.gz 6444740 SHA256 f8699fbbfef7f3de2226f5f7dc4c74d98de3b59bfed4c6dac70bb231ec405760 SHA512 5c2a7dac1614751edf925eefa945e08e0b2fb318903b12fc8d4acde0b6027ecb534c90933da14796edc958f0d9a2f892815fddea9ab41ac921756fc5577acd8e WHIRLPOOL 91c47a66f0ab60f2560b103ef7ac6591088296b470d3403d6d9f511d44e361fc6841d9fda85d9c24d6c60595ea66b2a18ebb34c806d3ab4b465895a427a6d819

@ -1,10 +0,0 @@
--- frontend/gtkmm/src/workrave.desktop.in~ 2013-06-11 22:40:13.000000000 +0200
+++ frontend/gtkmm/src/workrave.desktop.in 2014-07-15 11:59:15.905346840 +0200
@@ -1,6 +1,6 @@
[Desktop Entry]
Type=Application
-Categories=Utility;GTK;Accessibility
+Categories=Utility;GTK;Accessibility;
Exec=workrave
Icon=workrave
_Comment=Assists in the prevention and recovery of Repetitive Strain Injury (RSI)

@ -0,0 +1,23 @@
--- configure.ac.old 2015-10-24 10:11:47.469290574 +0200
+++ configure.ac 2015-10-24 10:14:35.918680898 +0200
@@ -884,20 +884,12 @@
if test "x$enable_gstreamer" != "xno";
then
PKG_CHECK_MODULES([GSTREAMER],
- [gstreamer-0.10],
- [config_gstreamer=yes
- AC_DEFINE(HAVE_GSTREAMER, 1, [Use GStreamer for playing sounds])], [ ])
-
- if test "x$config_gstreamer" != "xyes";
- then
- PKG_CHECK_MODULES([GSTREAMER],
[gstreamer-1.0],
[config_gstreamer=yes
AC_DEFINE(HAVE_GSTREAMER, 1, [Use GStreamer for playing sounds])],
[if test "x$enable_gstreamer" = "xyes"; then
AC_MSG_ERROR([GStreamer development headers not found.])
fi])
- fi
fi

@ -1,75 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
GCONF_DEBUG="yes"
PYTHON_COMPAT=( python2_7 )
inherit eutils gnome2 python-single-r1
DESCRIPTION="Helpful utility to attack Repetitive Strain Injury (RSI)"
HOMEPAGE="http://www.workrave.org/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="amd64 ~ppc x86"
IUSE="dbus doc distribution gstreamer nls pulseaudio test"
RDEPEND="
>=dev-libs/glib-2.28.0:2
>=x11-libs/gtk+-3.0:3
>=dev-cpp/gtkmm-3.0.0:3.0
>=dev-cpp/glibmm-2.28.0:2
>=dev-libs/libsigc++-2.2.4.2:2
dbus? (
>=sys-apps/dbus-1.2
dev-libs/dbus-glib )
distribution? ( >=net-libs/gnet-2 )
gstreamer? (
>=media-libs/gstreamer-0.10:0.10
>=media-libs/gst-plugins-base-0.10:0.10 )
pulseaudio? ( >=media-sound/pulseaudio-0.9.15 )
x11-libs/libXScrnSaver
x11-libs/libSM
x11-libs/libX11
x11-libs/libXtst
x11-libs/libXt
x11-libs/libXmu
"
DEPEND="${RDEPEND}
>=dev-util/intltool-0.40.0
x11-proto/xproto
x11-proto/inputproto
x11-proto/recordproto
dev-python/cheetah
virtual/pkgconfig
doc? (
app-text/docbook-sgml-utils
app-text/xmlto )
nls? ( >=sys-devel/gettext-0.17 )
"
pkg_setup() {
python-single-r1_pkg_setup
}
src_prepare() {
epatch "${FILESDIR}/${PN}-1.10.1-desktop.patch"
gnome2_src_prepare
}
src_configure() {
gnome2_src_configure \
--disable-experimental \
--disable-static \
--disable-xml \
$(use_enable dbus) \
$(use_enable doc manual) \
$(use_enable distribution) \
$(use_enable gstreamer) \
$(use_enable nls) \
$(use_enable pulseaudio pulse) \
$(use_enable test tests)
}

@ -0,0 +1,103 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
GCONF_DEBUG="no" # --enable-debug only messes up with FLAGS
PYTHON_COMPAT=( python2_7 )
inherit autotools eutils gnome2 python-single-r1 versionator
DESCRIPTION="Helpful utility to attack Repetitive Strain Injury (RSI)"
HOMEPAGE="http://www.workrave.org/"
# SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
MY_PV=$(replace_all_version_separators '_')
SRC_URI="https://github.com/rcaelers/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
# dbus support looks to be used only for trying to use panel applets on gnome3!
IUSE="ayatana doc gnome gstreamer introspection mate nls pulseaudio test xfce"
REQUIRED_USE="ayatana? ( introspection )"
RDEPEND="
>=dev-libs/glib-2.28.0:2
>=x11-libs/gtk+-3.0:3[introspection?]
>=dev-cpp/gtkmm-3.0.0:3.0
>=dev-cpp/glibmm-2.28.0:2
>=dev-libs/libsigc++-2.2.4.2:2
ayatana? (
>=dev-libs/libdbusmenu-0.4[gtk3,introspection]
>=dev-libs/libindicator-0.4:3 )
gnome? ( >=gnome-base/gnome-shell-3.6.2 )
gstreamer? (
media-libs/gstreamer:1.0[introspection?]
media-libs/gst-plugins-base:1.0[introspection?]
media-plugins/gst-plugins-meta:1.0 )
introspection? ( dev-libs/gobject-introspection:= )
mate? ( mate-base/mate-applets )
pulseaudio? ( >=media-sound/pulseaudio-0.9.15 )
xfce? (
>=x11-libs/gtk+-2.6.0:2[introspection?]
>=xfce-base/xfce4-panel-4.4 )
x11-libs/libXScrnSaver
x11-libs/libSM
x11-libs/libX11
x11-libs/libXtst
x11-libs/libXt
x11-libs/libXmu
"
# dbus? (
# >=sys-apps/dbus-1.2
# dev-libs/dbus-glib )
DEPEND="${RDEPEND}
>=dev-util/intltool-0.40.0
x11-proto/xproto
x11-proto/inputproto
x11-proto/recordproto
dev-python/cheetah
virtual/pkgconfig
doc? (
app-text/docbook-sgml-utils
app-text/xmlto )
nls? ( >=sys-devel/gettext-0.17 )
"
pkg_setup() {
python-single-r1_pkg_setup
}
src_prepare() {
# Fix gstreamer slot automagic dependency, bug #563584
# http://issues.workrave.org/show_bug.cgi?id=1179
epatch "${FILESDIR}"/${PN}-1.10.6-automagic-gstreamer.patch
eautoreconf
gnome2_src_prepare
}
src_configure() {
# gnet ("distribution") is dead for ages and other distributions stopped
# relying on it for such time too.
gnome2_src_configure \
--disable-dbus \
--disable-distribution \
--enable-exercises \
--disable-experimental \
--disable-gnome2 \
--disable-static \
--disable-xml \
$(use_enable ayatana indicator) \
$(use_enable doc manual) \
$(use_enable gnome gnome3) \
$(use_enable gstreamer) \
$(use_enable introspection) \
$(use_enable mate) \
$(use_enable nls) \
$(use_enable pulseaudio pulse) \
$(use_enable test tests) \
$(use_enable xfce)
}

@ -1,2 +1,3 @@
DIST calcurse-3.1.4.tar.gz 684526 SHA256 4121b3b14ded3583af7613a99646332701ee2ccc8cf2b87397eb3c07b97390e3 SHA512 efdb655f96a176ca45a23a6246987735413a69046e5273efafffd5d2087f880969f84e387dd84672dacc8fae670a86ee7b132f6a4662e072ba92121492fd7ca7 WHIRLPOOL cc0802f6128068419de98524fcd984cf3213ca7f7f2cc003b122c808aed858230a87f387682368379329d0205bb42a55d232e5cf82f639535ffdda8ab51d9fa7
DIST calcurse-3.2.1.tar.gz 606098 SHA256 05d5516808f98eee3d1eb8d379aa88cb24afc2b7a3eac046e46247013a61223d SHA512 1aaba75144d4da4caf48f0ff566efc0fe4977e41be0f929b4f13611c12fc849da2185fd132f93723aefc8b965eb4ee6fe2f20eb05d3eecd094891841d613c0df WHIRLPOOL a1c93608aaf136188776993663de757ea4193c6cbbe5c837bc74a7ae5564bad1682b6c4a9f96db106532b4338104859da96b4fdccb2c34963c1e9a1c310517d2
DIST calcurse-4.0.0.tar.gz 611593 SHA256 621b0019907618bd468f9c4dc1ce2186ee86254d3c9ade47dd2d7ab8e6656334 SHA512 42a1b317bfd38974cbe4a4d3d1c848b8cd09233fc71f1f3ce36daf33352d9caffd7926c75d5e7ae6dd1138b8735a5244d5411fa1875a3262f1dc37c0a101d38c WHIRLPOOL dd5e938f2536e079d4cc2437fea057c5ad4d450dc7d2cc7763101192c9f9abf3800d2c08edea8163645e525eaf8e1fdcc5199c91e78a2c8933f66139dafdba3a

@ -0,0 +1,28 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit autotools eutils
DESCRIPTION="a text-based calendar and scheduling application"
HOMEPAGE="http://calcurse.org/"
SRC_URI="http://calcurse.org/files/${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="sys-libs/ncurses:0="
DEPEND="${RDEPEND}"
DOCS=( AUTHORS NEWS README )
src_prepare() {
epatch "${FILESDIR}"/"${P}-tinfo.patch"
# Dubious tests.
rm -v "${S}/test"/ical-00{2,4,6}.sh || die
eautoreconf
}

@ -0,0 +1,21 @@
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
#-------------------------------------------------------------------------------
AC_PREREQ(2.59)
AC_INIT([calcurse],
- m4_esyscmd([build-aux/git-version-gen .version]),
+ m4_esyscmd_s([cat .version]),
[bugs@calcurse.org])
AM_INIT_AUTOMAKE
#m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
@@ -51,6 +51,9 @@
LIBS="$LIBS -l$available_ncurses"
])
+AC_SEARCH_LIBS([cbreak], [tinfow tinfo],,
+ AC_MSG_ERROR([Cannot find a library providing cbreak]))
+
AC_CHECK_HEADERS([pthread.h], [
AC_CHECK_LIB(pthread, pthread_create, [
LIBS="$LIBS -pthread"

@ -2,7 +2,7 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
<email>maintainer-needed@gentoo.org</email>
<email>monsieurp@gentoo.org</email>
</maintainer>
<longdescription>Calcurse is a text-based personal organizer which helps keeping
track of events and everyday tasks. It contains a calendar, a 'todo' list, and

@ -19,7 +19,7 @@ SRC_URI="ftp://ftp.lyx.org/pub/lyx/stable/2.1.x/${MY_P}.tar.xz
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos ~x86-macos"
KEYWORDS="~alpha amd64 hppa ~ia64 ~ppc ~ppc64 ~sparc x86 ~x64-macos ~x86-macos"
IUSE="cups debug nls +latex monolithic-build html rtf dot docbook dia subversion rcs svg gnumeric +hunspell aspell enchant"
LANGS="ar ca cs de da el en es eu fi fr gl he hu ia id it ja nb nn pl pt ro ru sk sr sv tr uk zh_CN zh_TW"

@ -1,2 +1,2 @@
DIST etcd-0.4.6.zip 3184823 SHA256 9134701506a6e9f569ef62d3bb4c43f594f30d66ce67060403998233dbfc0ed6 SHA512 5c25b99c826daa20493645e0e2bec38fd06c17029c3677f65f451fe132441d19e00eebd04c462936c22caeaf327b56cf47027ca8080508dc742a5e6a7d3f89c6 WHIRLPOOL 5ab7fb2d51ca1be4c2a54a37953a0154e06eb094d81ebb94f9260c0f786104d273e214f1ee20cd4a46018e6323d23fe697d54f2903c1acadac9ec2c34611abd6
DIST etcd-2.0.10.tar.gz 450581 SHA256 6029113d9870e5c6f0d10adbd2b6670958a46575114a094b86b607771a0e5ff3 SHA512 825524ee4c435b8f369970cfe39158443b8e29f6fba5ab86ae8be2d91f6faa0674d15f311bc863092fb6c77b054b8f3b69e163610b546e3c5cf59a111b38a3ed WHIRLPOOL a2b4c160cbc9cde5ebf64fa2fe41f6bc6ac5dc851551778b681d658e511f0dbc7241a4c74a6b520d43fe8e9cee65fa28f94655d64caf6f3c99cbd4ba84a57b65
DIST etcd-2.2.1.tar.gz 1844265 SHA256 1c0ce63812ef951f79c0a544c91f9f1ba3c6b50cb3e8197de555732454864d05 SHA512 4a96ed12c1f23ac4c9ea7ffeb17853f10a5eb04365b0fdfa765fa9f3acf12d32f7b4bfaa05de78bc17620808ae97f61425d2956a0d1cd817e501106e39498950 WHIRLPOOL edcb6f837b83f83a658717ceaf79c7304f5d4df34d2a15bbf9d82d370612f31ee8e5e248e9b143ff15df666ce25ab8c47d7dc5c62a3d7365a8bde0153d5e79a7

@ -1,49 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit user systemd
KEYWORDS="~amd64"
DESCRIPTION="A highly-available key value store for shared configuration and service discovery"
HOMEPAGE="https://github.com/coreos/etcd/"
SRC_URI="https://github.com/coreos/etcd/archive/v${PV}.zip -> ${P}.zip"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="doc"
DEPEND=">=dev-lang/go-1.2"
pkg_setup() {
enewgroup ${PN}
enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
}
src_prepare() {
sed -e "s:^\(go install\)\(.*\)$:\\1 -x -ldflags=\"-v -linkmode=external -extldflags '${LDFLAGS}'\" \\2:" \
-i build || die
}
src_compile() {
CGO_CFLAGS="${CFLAGS}" ./build || die
}
src_install() {
insinto /etc/${PN}
doins "${FILESDIR}/${PN}.conf"
dobin bin/${PN}
newbin bin/bench ${PN}-bench
dodoc CHANGELOG README.md
use doc && dodoc -r Documentation
systemd_dounit "${FILESDIR}/${PN}.service"
systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf
newinitd "${FILESDIR}"/${PN}.initd ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}
dodir /var/lib/${PN}
fowners ${PN}:${PN} /var/lib/${PN}
fperms 755 /var/lib/${PN}
dodir /var/log/${PN}
fowners ${PN}:${PN} /var/log/${PN}
fperms 755 /var/log/${PN}
}

@ -13,7 +13,7 @@ SRC_URI="https://github.com/coreos/etcd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="doc"
DEPEND=">=dev-lang/go-1.2"
DEPEND=">=dev-lang/go-1.2:="
RDEPEND="!dev-db/etcdctl"
pkg_setup() {
@ -22,8 +22,12 @@ pkg_setup() {
}
src_prepare() {
sed -e "s|-ldflags '-s'|-x|" \
sed -e 's|GIT_SHA=.*|GIT_SHA=v${PV}|'\
-e 's|-ldflags "-s.*"|-v -x|' \
-e 's|-ldflags "-s|-v -x "|' \
-i build || die
sed -e 's|go test|\0 -v|'\
-i test || die
}
src_compile() {
@ -49,10 +53,5 @@ src_install() {
}
src_test() {
local x
for x in bin/*; do
ebegin "running ${x##*/} --help"
${x} --help >/dev/null || die "${x##*/} --help failed"
eend
done
./test || die
}

@ -1,11 +1,17 @@
[Unit]
Description=etcd
Description=Etcd Server
After=network.target
[Service]
User=etcd
Type=notify
PermissionsStartOnly=true
Environment=ETCD_DATA_DIR=/var/lib/etcd
Environment=ETCD_NAME=%m
WorkingDirectory=/var/lib/etcd/
User=etcd
ExecStart=/usr/bin/etcd
Restart=always
RestartSec=10s
Restart=on-failure
LimitNOFILE=65536
[Install]
WantedBy=default.target

@ -0,0 +1,54 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
CMAKE_IN_SOURCE_BUILD=1
WX_GTK_VER="3.0"
inherit cmake-utils eutils wxwidgets
MY_PN=${PN/a/A}
KEYWORDS="~amd64 ~x86"
DESCRIPTION="${MY_PN} is a job scheduler for PostgreSQL"
HOMEPAGE="http://www.pgadmin.org/download/pgagent.php"
SRC_URI="mirror://postgresql/pgadmin3/release/${PN}/${MY_PN}-${PV}-Source.tar.gz"
LICENSE="POSTGRESQL GPL-2"
SLOT="0"
IUSE=""
RDEPEND=">=dev-db/postgresql-9.0.0:*
x11-libs/wxGTK:${WX_GTK_VER}
"
DEPEND="${RDEPEND}
>=dev-util/cmake-2.6
"
S="${WORKDIR}/${MY_PN}-${PV}-Source"
src_prepare() {
sed -e "s:share):share/${P}):" \
-i CMakeLists.txt || die "Couldn't patch CMakeLists.txt"
sed -i -e '/SET(WX_VERSION "2.8")/d' CMakeLists.txt || die
}
src_configure() {
if has_version "x11-libs/wxGTK[X]"; then
need-wxwidgets unicode
else
need-wxwidgets base-unicode
fi
mycmakeargs="-DSTATIC_BUILD:BOOLEAN=FALSE -DWX_VERSION=${WX_GTK_VER}"
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
newinitd "${FILESDIR}/pgagent.initd" ${PN}
newconfd "${FILESDIR}/pgagent.confd" ${PN}
rm "${ED}"/usr/{LICENSE,README} || die "Failed to remove useless docs"
}

@ -0,0 +1,25 @@
Description: Fix to build with wxWidgets 3.0
This patch should also work with wxWidgets 2.8.
Author: Olly Betts <olly@survex.com>
Last-Update: 2014-03-12
--- usbprog-0.2.0.orig/gui/usbprogFrm.cc
+++ usbprog-0.2.0/gui/usbprogFrm.cc
@@ -296,7 +296,7 @@ void usbprogFrm::CreateGUIControls()
// file dialog
m_fileDialog = new wxFileDialog(m_panel, wxT("Choose a file"),
- wxT(""), wxT(""), wxT("*.bin"), wxOPEN);
+ wxT(""), wxT(""), wxT("*.bin"), wxFD_OPEN);
m_topBox->Add(topSizer, wxEXPAND, wxALL, 10);
@@ -670,7 +670,7 @@ void usbprogFrm::enableDisableDebug(wxCo
dbg->setFileHandle(NULL);
} else {
wxFileDialog fdg(m_panel, wxT("Choose a file"),
- wxT(""), wxT(""), wxT("*.log"), wxSAVE);
+ wxT(""), wxT(""), wxT("*.log"), wxFD_SAVE);
if (fdg.ShowModal() != wxID_OK)
dbg->setFileHandle(stderr);
else {

@ -0,0 +1,44 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
WX_GTK_VER="3.0"
inherit eutils wxwidgets
DESCRIPTION="flashtool for the multi purpose programming adapter usbprog"
HOMEPAGE="http://www.embedded-projects.net/index.php?page_id=215"
SRC_URI="mirror://berlios/${PN}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="static-libs X"
RDEPEND="
X? ( x11-libs/wxGTK:${WX_GTK_VER} )
>=dev-libs/libxml2-2.0.0
net-misc/curl
virtual/libusb:0
sys-libs/readline:0
"
DEPEND="${RDEPEND}
virtual/pkgconfig
"
src_prepare() {
epatch "${FILESDIR}"/${P}-wx3.0.patch
}
src_configure() {
use X && need-wxwidgets unicode
econf \
$(use_enable X gui) \
$(use_enable static-libs static)
}
src_install() {
default
use static-libs || find "${ED}" -name '*.la' -delete
}

@ -1,102 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
JAVA_PKG_IUSE="doc examples source test"
# Register this as a split-ant task.
WANT_SPLIT_ANT="true"
# Don't rewrite examples, that's bad.
JAVA_PKG_BSFIX_ALL="no"
inherit java-pkg-2 java-ant-2 eutils
MY_PN="apache-ivy"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Ivy is a free java based dependency manager"
HOMEPAGE="http://ant.apache.org/ivy"
SRC_URI="mirror://apache/ant/ivy/${PV}/${MY_P}-src.tar.gz"
LICENSE="Apache-2.0"
SLOT="2"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
# We cannot build tests yet as there is no org.apache.tools.ant.BuildFileTest packaged anywhere yet.
RESTRICT="test"
# There may be additional optional dependencies (commons-logging, commons-lang...)
CDEPEND="dev-java/jsch:0
dev-java/bcpkix:0
dev-java/bcpg:1.50
dev-java/ant-core:0
dev-java/bcprov:1.50
dev-java/commons-vfs:0
dev-java/jakarta-oro:2.0
dev-java/commons-httpclient:3"
DEPEND=">=virtual/jdk-1.6
test? (
dev-java/ant-junit:0
)
${CDEPEND}"
RDEPEND=">=virtual/jre-1.6
${CDEPEND}"
S="${WORKDIR}/${MY_P}"
java_prepare() {
# This stuff needs removing.
local CLEANUP=(
doc/reports
test/triggers
doc/configuration
test/repositories
test/java/org/apache/ivy/core/settings/custom-resolver.jar
src/example/chained-resolvers/settings/repository/test-1.0.jar
)
rm -rf "${CLEANUP[@]}" || die
java-ant_rewrite-classpath
mkdir lib || die
}
JAVA_ANT_REWRITE_CLASSPATH="true"
EANT_GENTOO_CLASSPATH="
jsch
bcpkix
ant-core
bcpg-1.50
commons-vfs
bcprov-1.50
jakarta-oro-2.0
commons-httpclient-3
"
EANT_BUILD_TARGET="/offline jar"
EANT_EXTRA_ARGS="-Dbuild.version=${PV} -Dbundle.version=${PV}"
src_test() {
java-pkg_jar-from --into lib junit
ANT_TASKS="ant-junit" eant "/offline test"
}
src_install() {
java-pkg_dojar build/artifact/jars/ivy.jar
java-pkg_register-ant-task
if use doc; then
java-pkg_dojavadoc build/doc/reports/api
java-pkg_dohtml -r doc
fi
use examples && java-pkg_doexamples src/example
use source && java-pkg_dosrc src/java/*
}

@ -23,7 +23,7 @@ SRC_URI="mirror://apache/ant/ivy/${PV}/${MY_P}-src.tar.gz"
LICENSE="Apache-2.0"
SLOT="2"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
# We cannot build tests yet as there is no org.apache.tools.ant.BuildFileTest packaged anywhere yet.
RESTRICT="test"

@ -1,67 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
JAVA_PKG_IUSE="doc source test"
inherit java-pkg-2 java-pkg-simple
MY_P="${PN}-jdk15on-${PV/./}"
DESCRIPTION="Java cryptography APIs"
HOMEPAGE="http://www.bouncycastle.org/java.html"
SRC_URI="http://www.bouncycastle.org/download/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
CDEPEND="dev-java/bcprov:0[test?]
dev-java/bcpkix:0
dev-java/sun-jaf:0
dev-java/junit:0
dev-java/oracle-javamail:0"
DEPEND=">=virtual/jdk-1.6
app-arch/unzip
${CDEPEND}"
RDEPEND=">=virtual/jre-1.6
${CDEPEND}"
S="${WORKDIR}/${MY_P}"
JAVA_GENTOO_CLASSPATH="
junit
bcprov
bcpkix
sun-jaf
oracle-javamail
"
# Package can't be built with test as bcprov and bcpkix can't be built with test.
RESTRICT="test"
src_unpack() {
default
cd "${S}"
unpack ./src.zip
}
java_prepare() {
JAVA_RM_FILES=(
org/bouncycastle/mail/smime/test/*
org/bouncycastle/mail/smime/examples/CreateSignedMail.java
)
}
src_compile() {
java-pkg-simple_src_compile
}
src_install() {
java-pkg-simple_src_install
use source && java-pkg_dosrc org
}

@ -16,7 +16,7 @@ SRC_URI="http://www.bouncycastle.org/download/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="1.50"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
KEYWORDS="amd64 ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
CDEPEND="dev-java/bcprov:${SLOT}
dev-java/bcpkix:${SLOT}

@ -1,67 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
JAVA_PKG_IUSE="doc source test"
inherit java-pkg-2 java-pkg-simple
MY_P="${PN}-jdk15on-${PV/./}"
DESCRIPTION="Java cryptography APIs"
HOMEPAGE="http://www.bouncycastle.org/java.html"
SRC_URI="http://www.bouncycastle.org/download/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
CDEPEND="dev-java/bcprov:0[test?]
dev-java/bcpkix:0
dev-java/sun-jaf:0
dev-java/junit:0
dev-java/oracle-javamail:0"
DEPEND=">=virtual/jdk-1.6
app-arch/unzip
${CDEPEND}"
RDEPEND=">=virtual/jre-1.6
${CDEPEND}"
S="${WORKDIR}/${MY_P}"
JAVA_GENTOO_CLASSPATH="
junit
bcprov
bcpkix
sun-jaf
oracle-javamail
"
# Package can't be built with test as bcprov and bcpkix can't be built with test.
RESTRICT="test"
src_unpack() {
default
cd "${S}"
unpack ./src.zip
}
java_prepare() {
JAVA_RM_FILES=(
org/bouncycastle/mail/smime/test/*
org/bouncycastle/mail/smime/examples/CreateSignedMail.java
)
}
src_compile() {
java-pkg-simple_src_compile
}
src_install() {
java-pkg-simple_src_install
use source && java-pkg_dosrc org
}

@ -16,7 +16,7 @@ SRC_URI="http://www.bouncycastle.org/download/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="1.52"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
KEYWORDS="amd64 ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
CDEPEND="dev-java/bcprov:${SLOT}
dev-java/bcpkix:${SLOT}

@ -1,4 +1,4 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -16,7 +16,7 @@ SRC_URI="http://www.bouncycastle.org/download/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="1.50"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
KEYWORDS="amd64 ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
# Tests are currently broken. Appears to need older version of bcprov; but since bcprov is not slotted, this can cause conflicts.
# Needs further investigation; though, only a small part has tests and there are no tests for bcpg itself.
@ -45,7 +45,7 @@ src_unpack() {
}
java_prepare() {
if ! test; then
if ! use test; then
local RM_TEST_FILES=(
org/bouncycastle/openpgp/test
org/bouncycastle/openpgp/examples/test

@ -1,34 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
JAVA_PKG_IUSE="doc source"
inherit java-pkg-2 java-pkg-simple
MY_PN="${PN}-jdk15on"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Java cryptography APIs"
HOMEPAGE="http://www.bouncycastle.org/java.html"
SRC_URI="http://central.maven.org/maven2/org/bouncycastle/${MY_PN}/${PV}/${MY_P}-sources.jar"
KEYWORDS="amd64 ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
LICENSE="BSD"
SLOT="0"
CDEPEND="dev-java/bcprov:${SLOT}"
DEPEND=">=virtual/jdk-1.6
app-arch/unzip
${CDEPEND}"
RDEPEND=">=virtual/jre-1.6
${CDEPEND}"
JAVA_GENTOO_CLASSPATH="bcprov-${SLOT}"
JAVA_ENCODING="ISO-8859-1"
JAVA_SRC_DIR="org"

@ -15,7 +15,7 @@ DESCRIPTION="Java cryptography APIs"
HOMEPAGE="http://www.bouncycastle.org/java.html"
SRC_URI="http://central.maven.org/maven2/org/bouncycastle/${MY_PN}/${PV}/${MY_P}-sources.jar"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
KEYWORDS="amd64 ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
LICENSE="BSD"
SLOT="1.50"

@ -2,7 +2,4 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>java</herd>
<maintainer>
<email>monsieurp@gentoo.org</email>
</maintainer>
</pkgmetadata>

@ -1,56 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
JAVA_PKG_IUSE="doc source"
inherit java-pkg-2 java-pkg-simple
DESCRIPTION="Java library that generate documents in the Portable Document Format (PDF) and/or HTML."
HOMEPAGE="http://itextpdf.com"
SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
LICENSE="AGPL-3"
SLOT="5"
KEYWORDS="~amd64 ~x86"
CDEPEND="dev-java/bcmail:0
dev-java/bcpkix:0
dev-java/bcprov:1.52
dev-java/xml-security:0"
RDEPEND="${CDEPEND}
>=virtual/jre-1.6"
DEPEND="${CDEPEND}
>=virtual/jdk-1.6
app-arch/unzip"
JAVA_GENTOO_CLASSPATH="
bcmail
bcpkix
bcprov-1.52
xml-security"
PATCHES=(
"${FILESDIR}"/${P}-OcspClientBouncyCastle.java.patch
)
java_prepare() {
mkdir source || die
for x in *-sources.jar; do
unzip -n ${x} -d source || die
done
rm -v *.jar || die
mkdir target/classes/com/itextpdf/text/pdf/fonts -p || die
cp source/com/itextpdf/text/pdf/fonts/*{afm,html,txt} target/classes/com/itextpdf/text/pdf/fonts/ || die
mkdir target/classes/com/itextpdf/text/l10n/ -p || die
cp -r source/com/itextpdf/text/l10n/* target/classes/com/itextpdf/text/l10n/ || die
epatch "${PATCHES[@]}"
}

@ -14,7 +14,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
LICENSE="AGPL-3"
SLOT="5"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 x86"
BC_SLOT="1.52"

@ -1,48 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
JAVA_PKG_IUSE="doc source"
inherit java-pkg-2 java-pkg-simple
DESCRIPTION="Java library that generate documents in the Portable Document Format (PDF) and/or HTML."
HOMEPAGE="http://itextpdf.com"
SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
LICENSE="AGPL-3"
SLOT="5"
KEYWORDS="~amd64 ~x86"
COMMON_DEP="
dev-java/bcmail:0
>=dev-java/bcprov-1.49:0
dev-java/bcpkix:0
dev-java/xml-security:0
"
RDEPEND="${COMMON_DEP}
>=virtual/jre-1.5"
DEPEND="${COMMON_DEP}
>=virtual/jdk-1.5
app-arch/unzip"
JAVA_GENTOO_CLASSPATH="bcmail,bcprov,bcpkix,xml-security"
java_prepare() {
mkdir source || die
for x in *-sources.jar; do
unzip -n ${x} -d source || die
done
rm -v *.jar || die
mkdir target/classes/com/itextpdf/text/pdf/fonts -p || die
cp source/com/itextpdf/text/pdf/fonts/*{afm,html,txt} target/classes/com/itextpdf/text/pdf/fonts/ || die
mkdir target/classes/com/itextpdf/text/l10n/ -p || die
cp -r source/com/itextpdf/text/l10n/* target/classes/com/itextpdf/text/l10n/ || die
}

@ -1 +1,2 @@
DIST jamvm-1.5.4.tar.gz 656283 SHA256 7865693698bc4322cabe1014a4b7ebdec1bc1daf45f1a4457b6e908a4446b124 SHA512 a4a7a2917881262fee19b6aedd9dc50a78463c5e4b02bda4b8184aef49797e3476f8ec8671047a01ba246af7d84cbe58f57ee84bb198817738c79d9f62c1ddbc WHIRLPOOL 615d94ab3a8359c8d6d0a2347d836c0a6adceaeda03a72d105b094f4ffb3161a5f3abbd4c12aa75703823da203d1cee91591e829a796813f82fcfbf2703068f2
DIST jamvm-2.0.0.tar.gz 741459 SHA256 76428e96df0ae9dd964c7a7c74c1e9a837e2f312c39e9a357fa8178f7eff80da SHA512 8ac27787ee94fa8fde962635d3c08d1dc1e5244c9d56bb693e73f3fd9b58e944ad3f7a0127afeed727d7c00d904a775d2c483157f5ac87e7eab6ecade1aad21d WHIRLPOOL 7e80be683fafb444cd417502b96089ce4f6879a049ca49e33691b4d5d6755814654ab4ed7626b666dd48f9d6101567b2a12de43b916055ea1d067c5d4df06443

@ -0,0 +1,27 @@
diff -Nru jamvm-2.0.0.old/configure.ac jamvm-2.0.0/configure.ac
--- jamvm-2.0.0.old/configure.ac 2014-06-10 21:33:37.000000000 +0100
+++ jamvm-2.0.0/configure.ac 2014-11-28 19:22:12.183091414 +0000
@@ -236,6 +236,7 @@
install_dir=$prefix
fi
AC_DEFINE_UNQUOTED(INSTALL_DIR, "$install_dir", [Installation directory (prefix)])
+AC_DEFINE_UNQUOTED(PKGDATADIR, "$datadir/$PACKAGE", [Package data directory (pkgdatadir)])
AC_ARG_ENABLE(zip,
[AS_HELP_STRING(--disable-zip,turn-off zip support in the bootstrap loader)],,)
diff -Nru jamvm-2.0.0.old/src/classlib/gnuclasspath/class.c jamvm-2.0.0/src/classlib/gnuclasspath/class.c
--- jamvm-2.0.0.old/src/classlib/gnuclasspath/class.c 2012-05-17 22:01:47.000000000 +0100
+++ jamvm-2.0.0/src/classlib/gnuclasspath/class.c 2014-11-28 19:23:27.312108240 +0000
@@ -110,10 +110,10 @@
separate class files in a directory structure */
#ifdef USE_ZIP
-#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes.zip"
+#define JAMVM_CLASSES PKGDATADIR"/classes.zip"
#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath/glibj.zip"
#else
-#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes"
+#define JAMVM_CLASSES PKGDATADIR"/classes"
#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath"
#endif

@ -0,0 +1,16 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
VERSION="JamVM JDK @PV@"
JAVA_HOME="@GENTOO_PORTAGE_EPREFIX@/usr/@LIBDIR@/@PN@-jdk"
JDK_HOME="@GENTOO_PORTAGE_EPREFIX@/usr/@LIBDIR@/@PN@-jdk"
BOOTCLASSPATH="@GENTOO_PORTAGE_EPREFIX@/usr/@LIBDIR@/@PN@/classes.zip:${JAVA_HOME}/lib/rt.jar"
JAVAC="${JAVA_HOME}/bin/javac"
PATH="${JAVA_HOME}/bin"
ROOTPATH="${JAVA_HOME}/bin"
PROVIDES_TYPE="JRE"
PROVIDES_VERSION="1.5"
GENERATION="2"
ENV_VARS="JAVA_HOME JAVAC PATH"
LDPATH="${JAVA_HOME}/lib"

@ -0,0 +1,57 @@
#!/usr/bin/perl -w
use strict;
use constant NO_DUP_ARGS => qw(-source -target -d -encoding);
use constant STRIP_ARGS => qw(-Werror -implicit:none -J-Xbootclasspath/p:);
my $ECJ_WARNINGS="-nowarn";
my ( @bcoption, @source15, @target15, @cp );
push @bcoption, '-bootclasspath', '@RT_JAR@:@TOOLS_JAR@'
unless grep {$_ eq '-bootclasspath'} @ARGV;
push @source15, '-source', '1.5'
unless grep {$_ eq '-source'} @ARGV;
push @target15, '-target', '1.5'
unless grep {$_ eq '-target'} @ARGV;
push @cp, '-cp', '.'
unless grep {$_ =~ '\-c(p|lasspath)'} @ARGV or $ENV{CLASSPATH};
my @ecj_parms = ($ECJ_WARNINGS, @bcoption, @source15, @target15, @cp);
# Work around ecj's inability to handle duplicate command-line
# options and unknown javac options.
sub gen_ecj_opts
{
my @new_args = @{$_[0]};
for my $opt (NO_DUP_ARGS)
{
my @indices = reverse grep {$new_args[$_] eq $opt} 0..$#new_args;
if (@indices > 1) {
shift @indices; # keep last instance only
splice @new_args, $_, 2 for @indices;
}
}
for my $opt (STRIP_ARGS)
{
my @indices = reverse grep {$new_args[$_] eq $opt} 0..$#new_args;
splice @new_args, $_, 1 for @indices;
}
return \@new_args;
}
sub split_vm_args
{
my @new_args = @{$_[0]};
my @vm_args = map { substr $_, 2 } grep $_ =~ /^-J/, @new_args;
my @javac_args = grep $_ !~ /^-J/, @new_args;
return (\@vm_args, \@javac_args);
}
my ($vm_args, $javac_args) = split_vm_args (gen_ecj_opts( \@ARGV ));
my @CLASSPATH = ('@ECJ_JAR@');
push @CLASSPATH, split /:/, $ENV{"CLASSPATH"} if exists $ENV{"CLASSPATH"};
$ENV{"CLASSPATH"} = join ':', @CLASSPATH;
exec '@JAVA@', @$vm_args, 'org.eclipse.jdt.internal.compiler.batch.Main', @ecj_parms, @$javac_args;

@ -0,0 +1,48 @@
diff --git a/src/os/linux/arm/callNative.S b/src/os/linux/arm/callNative.S
index 245afd1..1583023 100644
--- a/src/os/linux/arm/callNative.S
+++ b/src/os/linux/arm/callNative.S
@@ -36,3 +36,7 @@
#include "callNativeOABI.S"
#endif
#endif
+
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/src/os/linux/mips/callNative.S b/src/os/linux/mips/callNative.S
index cede343..90d9163 100644
--- a/src/os/linux/mips/callNative.S
+++ b/src/os/linux/mips/callNative.S
@@ -184,3 +184,7 @@ return:
j $31
.end callJNIMethod
#endif
+
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/src/os/linux/powerpc/callNative.S b/src/os/linux/powerpc/callNative.S
index aa47f6a..763dc0a 100644
--- a/src/os/linux/powerpc/callNative.S
+++ b/src/os/linux/powerpc/callNative.S
@@ -281,3 +281,7 @@ return:
mr 1,11
blr
#endif
+
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/src/os/linux/x86_64/callNative.S b/src/os/linux/x86_64/callNative.S
index 26404e6..9fb5cdf 100644
--- a/src/os/linux/x86_64/callNative.S
+++ b/src/os/linux/x86_64/callNative.S
@@ -267,3 +267,7 @@ float_ret:
addq $8, %rcx
jmp return
#endif
+
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

@ -21,9 +21,13 @@ DEPEND="dev-java/gnu-classpath:${CLASSPATH_SLOT}
amd64? ( virtual/libffi )"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/"${P}-classes-location.patch"
)
src_prepare() {
# without this patch, classes.zip is not found at runtime
epatch "${FILESDIR}/classes-location.patch"
epatch "${PATCHES[@]}"
eautoreconf
# These come precompiled.
@ -76,7 +80,7 @@ src_install() {
dodoc ACKNOWLEDGEMENTS AUTHORS ChangeLog NEWS README
set_java_env "${FILESDIR}/${PN}-1.5.4-r2.env"
set_java_env "${FILESDIR}/${P}-env.file"
dosym /usr/bin/jamvm ${INSTALL_DIR}/bin/java
dosym ${CLASSPATH_DIR}/share/classpath/glibj.zip ${INSTALL_DIR}/jre/lib/rt.jar

@ -0,0 +1,128 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils flag-o-matic multilib java-vm-2 autotools
DESCRIPTION="An extremely small and specification-compliant virtual machine"
HOMEPAGE="http://jamvm.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc ~x86"
IUSE="debug libffi"
DEPEND="dev-java/gnu-classpath:0.98
|| ( dev-java/eclipse-ecj:* dev-java/ecj-gcj:* )
libffi? ( virtual/libffi )
ppc64? ( virtual/libffi )
sparc? ( virtual/libffi )"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/"${P}-classes-location.patch"
"${FILESDIR}"/"${P}-noexecstack.patch"
)
src_prepare() {
# without this patch, classes.zip is not found at runtime
epatch "${PATCHES[@]}"
eautoreconf
# These come precompiled.
# configure script uses detects the compiler
# from PATH. I guess we should compile this from source.
# Then just make sure not to hit
# https://bugs.gentoo.org/show_bug.cgi?id=163801
#
#rm -v lib/classes.zip || die
}
src_configure() {
filter-flags "-fomit-frame-pointer"
if use ppc64 || use sparc || use libffi; then
append-cflags "$(pkg-config --cflags-only-I libffi)"
fi
local fficonf="--enable-ffi"
if { ! use ppc64 && ! use sparc; }; then
fficonf="$(use_enable libffi ffi)"
fi
econf ${fficonf} \
--disable-dependency-tracking \
$(use_enable debug trace) \
--libdir="${EPREFIX}"/usr/$(get_libdir)/${PN} \
--includedir="${EPREFIX}"/usr/include/${PN} \
--with-classpath-install-dir=/usr
}
create_launcher() {
local script="${D}/${INSTALL_DIR}/bin/${1}"
cat > "${script}" <<-EOF
#!/bin/sh
exec /usr/bin/jamvm \
-Xbootclasspath/p:/usr/share/classpath/tools.zip" \
gnu.classpath.tools.${1}.Main "\$@"
EOF
chmod +x "${script}" || die
}
src_install() {
local libdir=$(get_libdir)
local CLASSPATH_DIR=/usr/libexec/gnu-classpath-0.98
local JDK_DIR=/usr/${libdir}/${PN}-jdk
emake DESTDIR="${D}" install
dodoc ACKNOWLEDGEMENTS AUTHORS ChangeLog NEWS README
set_java_env "${FILESDIR}/${P}-env.file"
dodir ${JDK_DIR}/bin
dosym /usr/bin/jamvm ${JDK_DIR}/bin/java
for files in ${CLASSPATH_DIR}/g*; do
if [ $files = "${CLASSPATH_DIR}/bin/gjdoc" ] ; then
dosym $files ${JDK_DIR}/bin/javadoc || die
else
dosym $files \
${JDK_DIR}/bin/$(echo $files|sed "s#$(dirname $files)/g##") || die
fi
done
dodir ${JDK_DIR}/jre/lib
dosym /usr/share/classpath/glibj.zip ${JDK_DIR}/jre/lib/rt.jar
dodir ${JDK_DIR}/lib
dosym /usr/share/classpath/tools.zip ${JDK_DIR}/lib/tools.jar
local ecj_jar="$(readlink "${EPREFIX}"/usr/share/eclipse-ecj/ecj.jar)"
exeinto ${JDK_DIR}/bin
sed -e "s#@JAVA@#/usr/bin/jamvm#" \
-e "s#@ECJ_JAR@#${ecj_jar}#" \
-e "s#@RT_JAR@#/usr/share/classpath/glibj.zip#" \
-e "s#@TOOLS_JAR@#/usr/share/classpath/tools.zip#" \
"${FILESDIR}"/"${P}-javac.in" | newexe - javac
local libarch="${ARCH}"
[ ${ARCH} == x86 ] && libarch="i386"
[ ${ARCH} == x86_64 ] && libarch="amd64"
dodir ${JDK_DIR}/jre/lib/${libarch}/client
dodir ${JDK_DIR}/jre/lib/${libarch}/server
dosym /usr/${libdir}/${PN}/libjvm.so ${JDK_DIR}/jre/lib/${libarch}/client/libjvm.so
dosym /usr/${libdir}/${PN}/libjvm.so ${JDK_DIR}/jre/lib/${libarch}/server/libjvm.so
dosym /usr/${libdir}/classpath/libjawt.so ${JDK_DIR}/jre/lib/${libarch}/libjawt.so
# Can't use java-vm_set-pax-markings as doesn't work with symbolic links
# Ensure a PaX header is created.
local pax_markings="C"
# Usally disabeling MPROTECT is sufficent.
local pax_markings+="m"
# On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well.
use x86 && pax_markings+="sp"
pax-mark ${pax_markings} "${ED}"/usr/bin/jamvm
}

@ -1 +1,2 @@
DIST JAXWS2.0.1m1_source_20060817.jar 8993405 SHA256 9725cfb91cecff833055d7af45c3413ca9d1a818a4cfdb86211ed82f383f3865 SHA512 55454a8270310b9778c69aad8b8ace45dc4ba3059b33ac48dcfd5d771fade2d6e4c46a5a65a522ae5cca0438f159ba84c90d8e74d54731a9c6c0caa9d84a0314 WHIRLPOOL fe0727935c592b538b7042808fffa987ea5ae47554367ea0cfc91f65d765bd234713aaa142b2297988d74eec01fce9cd4bedceb0fb7b0068eb38084a1d5f5ba7
DIST jsr181-api-1.0-MR1-sources.jar 3929 SHA256 abb37e9c15043bde98ad27bae9b955bb43ccf5c27c1a0f88d57d2bb8bc509b14 SHA512 383806428ebe80e94af2c80a3d383f24e934cde57d5628e60b2e2335052ac037ad45f1e8c265c579cf60ed7383b15fd8f2e8dda6b08d8edf1d171b9f0ef0080e WHIRLPOOL 0e611e08d8aa78555fecefd7a6e56a488e555db0dfdc62c1ff1e96f643f8e5b67f62142d1935190ac7a23aa7555a2ce389bd459f0d482cbba03bdedf365408e2

@ -0,0 +1,24 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit java-pkg-2 java-pkg-simple
MY_PN="${PN}-api"
MY_PV="${PV}-MR1"
MY_P="${MY_PN}-${MY_PV}"
DESCRIPTION="JSR 181 API classes"
HOMEPAGE="http://jcp.org/en/jsr/summary?id=181"
SRC_URI="http://central.maven.org/maven2/javax/jws/${MY_PN}/${MY_PV}/${MY_P}-sources.jar"
LICENSE="CDDL"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
IUSE=""
RDEPEND=">=virtual/jre-1.6"
DEPEND=">=virtual/jdk-1.6
app-arch/unzip"

@ -13,7 +13,7 @@ SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
LICENSE="GPL-2-with-exceptions"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
# This pkg does not actually seem to compile currently in a uClibc

@ -1,20 +1,5 @@
DIST gmp-4.3.2.tar.bz2 1897483 SHA256 936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775 SHA512 2e0b0fd23e6f10742a5517981e5171c6e88b0a93c83da701b296f5c0861d72c19782daab589a7eac3f9032152a0fc7eff7f5362db8fccc4859564a9aa82329cf WHIRLPOOL ab3d9c95b436df3782830da0874307d5577b83c111c2fae4a9063d4083f97c5c12643b154c1bd9a588945e5a677fb8ab416c394ced3e9b0aa671b2238bcb9b40
DIST gmp-5.0.1.tar.bz2 2006109 SHA256 a2a610f01fd3298dc08c87bf30498c2402590e1bcb227fc40b15ee6d280939fb SHA512 9a128f7e192e5f1233ec068b04ba4789cd10ae1ca1a21d1089b9b596022f7dfb66c313599b5de462135b1556a8f8e72bce1b5f4666b1eeed1652e3d7f2f5d168 WHIRLPOOL e19602c9914ed0bcd60aa198cb6f4b35a8f133381808f0a0f0759987407aa8e356bf8cba99b4f4e44f526412a80ee1dbdd6fd2adaa88f8aaa1c7e7e881626f9a
DIST gmp-5.0.2.tar.bz2 2024576 SHA256 dbc2db76fdd4e99f85d5e35aa378ed62c283e0d586b91bd8703aff75a7804c28 SHA512 b53cc482e73aa91ae4f83301d9ef83a98cd85cfe53347e102a059fa477edceebded466223b436bc250314eb6ec2e53ecc4fa1528341435f09e232f0c4e305bad WHIRLPOOL a60dbfd26fca44edeab921d2293bb5cdea62ad5050ebbaa7d0e21fe2089deaa893d92abdd109e613edf234a36071d64422c04b24de3c952b0147a4310b4229d4
DIST gmp-5.0.3.tar.xz 1685288 SHA256 438ee3e2d03a5b7c23e9f3f46919ab53cab102bcf4f3c34ea3a08486610fd450 SHA512 dc68ad36bbf515386d735784fe4583443eb6168d10c2967e47ce4bd541076a18c01bcc4b04261330ee0489560978234c36bf7064d611ce2f21ac38c37e6b34f0 WHIRLPOOL cf9a481f8a3c911ac023fcbbd5129bbd3ea7003bca745268b0f4f7cc94cff601d68a3cbe62037819e430677f49b182f0ceaf80c76c6b9bc39103f7973e9e2589
DIST gmp-5.0.4.tar.xz 1689832 SHA256 4e6de1262ec94cce7833abb787a6d9157a822cc63d406c3d46c737e46ade1523 SHA512 68e2eca72aa8bdf4dd83da55625c32488015c10ea8aed79c8b861070de99bad0bb44b78c32655c12df90802bde564f98f41e8bffa1a1f522f3432271a8fcb00c WHIRLPOOL 85860d555f48062cac175a9cc239cf18c69ea68f98477f3b0ff75cc91b1b4c04e1bebbfe5699ea103031fe381f3cc93089065cbbd67ad5e923169b3f38469eaf
DIST gmp-5.0.5.tar.xz 1671264 SHA256 e87015a825a2445e169931ee27849d52576a2d9e338d1383dcb36fed68d0006f SHA512 79f69ed7959af18e626d4b21b5707ebd7701261ebc2cc9f78fa03c5efa9eb1c1aef2ba8728cdbc34fb09ba333aeba0f88ba7e4d87d6a93b21f936f9d8ee1174a WHIRLPOOL c224f0ce28762e8987b5c5a817d24412d1c85e7bab2f173b138f463cc380d85ab02585d4c2a0e5052c34a405e6cec1f744edb0ee525002d6b77584ff6ecb601b
DIST gmp-5.1.0.tar.xz 1806216 SHA256 c232d96b92ee251a6b8fdbf0a45d4db17a784846dfdfaf36651eeef2117a8991 SHA512 33b364bddfe829c78e3720ad15dc9fe5cf4c774e9a206ae0a8467666872d40148da07b8a4d8b251e3240c3c8b4eee5e082edc13aa208d3912f9f5d600d1110e8 WHIRLPOOL 28fb5693254bd25276348c8483ca8a7638c6a781d566e1dba085c581d3de7f99f9deee57bb613dbea78c0aeebf01e0eafe6003bd5327b48495c7f86b4dc3a92f
DIST gmp-5.1.1.tar.xz 1812988 SHA256 4bd64d782fdeb61aeed45b434fca5246d66baa9de76f87cba30c38460d8834c2 SHA512 4cc3307411eb2144e87b791ee2f52e0020711638f911dfa3cc5929a57eda5ac7d9ca10c1c0bb75c96afc7ff7a9c6ad165bc87409b036c562867b4e5da15ba571 WHIRLPOOL 8a7afe06d530a15edb75a0c37c8497d1ab209dfeffebd44aecfcfe6b75586c182384cfdf8ea9b696ce968aed04944ec7c1c271730b65c34b2e3504d26565240e
DIST gmp-5.1.2.tar.xz 1819560 SHA256 c7d943a6eceb4f0d3d3ab1176aec37853831cdfa281e012f8a344ba3ceefcbc2 SHA512 2c135bb6be908e93e63fe8828b2128b4e22e8ba29adf3cc917493ab66b42d54654dad7f101f902105e854731a69a202c38e34f119f642828fa5568ef21075c5a WHIRLPOOL dc18f8b2f7f592a52872f477ff375a29d58bca6661877bd0e4ef26766ed439e98172e277fed9f91d7204990b3030423bf6b3bff0b996ec371d6e681f8c21e504
DIST gmp-5.1.3.tar.xz 1818812 SHA256 dee2eda37f4ff541f30019932db0c37f6f77a30ba3609234933b1818f9b07071 SHA512 44bbec2b2a6480d4c9a9a633cca4fe0de966c13bc08bdcd8b934d81e21f3dfacaecf273f149dc613d365277d280ecee43cffdafaec1bd1239a7ed903f8658b5b WHIRLPOOL 0c4365a129136655046a8e46c4e2487a981c03de97ec47899f752cbd6e61661c6068b19c547acce8436f7a9af91396545c9bf7aa9de73a0f29384bbfebef927f
DIST gmp-6.0.0a.tar.xz 1904112 SHA256 9156d32edac6955bc53b0218f5f3763facb890b73a835d5e1b901dcf8eb8b764 SHA512 50368f4368b244b442438ce1768cf0f1166e490d1bafb8feda1ffc90fea3807e7328f30f3faa861799e4f5ff6e3113049ca3231b2f48571e4583fc3d60441816 WHIRLPOOL 81639a9d433ce9ccb26527af309c7c41437bb3463e5986cce3b35f81b527068a2304ec3287e660454f850dedab61463a077f49d4ea2b7ee87eec94b15730c394
DIST gmp-man-5.0.2.pdf 1024222 SHA256 fcdd621dea0215b8920bdbfacf374ae8ef4f548a2d0c3e8d65d904f1b9d174d4 SHA512 95ea00ee16e87e9f379e76cd6c1a850866e5f22c0e6fc6e5deaae1213a694d28dd6fc09c105b5e71d4bb24e07ca8b77c56d756ef680beac1f64cc17ab51b246c WHIRLPOOL eaa78db21ee7dc8076a752cc949f336c1699c752626496d1490babc2d00115b08fa954ba9f732405d63bbdb43d97c43bed1917629fee1106e2e87942c78d6da8
DIST gmp-man-5.0.3.pdf 1159053 SHA256 8f12da7b0665a2a0b5e1bc83c702e67b1b854382af5cba58c2859564fc930550 SHA512 4be246f234379033922255ece26f8f7b6056ee637f0d3964459829a946368ae01e2434b22fb1a180cf0a4efa7ad18d332d3e1a89cf9040d5f9f27e43cd3ca8ab WHIRLPOOL 50b27cccd274d84d2b35d2551089755b5b88837fb28a24c5e244c8706004925fe86ff81c2cc68d6125f2113b68a741b9a6615b931bf8260f2cd384dcd5115336
DIST gmp-man-5.0.4.pdf 1160172 SHA256 c577d4dea9964e85c07f859d60833fc56d10aba16fd42f380939b0360f79defb SHA512 0159c748e75ba12a4fe3164e7071966e39475fa95b477e16de9cff095dd67c144c3aed24a611cf44c434bff9942faa432fb2222a7a27c587ed22a2df2f33a8c0 WHIRLPOOL df53ea3df9069c3958427ae18d29247c7502e5140b7c6f8c2b15d38aab308a9fa8dea8f3b636907ce5588cc738393e600e4f7160d502f42b6df339a7f76ad5ca
DIST gmp-man-5.0.5.pdf 1162914 SHA256 33c7456155bf39704eb1c874849315a925140014b4ad8a8c6f0e07e4fde6a9f2 SHA512 2207266e1187f9951e01f02c6c70eb8bde78fd8d748f144c1bcb10702510f79ee9dd698347d80cac2445112c1554919e734dafd48ebc4662e39b9031b3147544 WHIRLPOOL 1becb075143db9fb26662fed68f760624d381306831a9a58234d5e82303290497bb7b99582a1ab77bd8a72de70e97b516e113264aa307774a4632faf223624c8
DIST gmp-man-5.1.0.pdf 1156063 SHA256 def7bae39aaf2756cd074207c02afca8b3dde66111bbc17769f196082de2f28b SHA512 e3736853a20fbb0de86458a1e724f515429ac43458e62479e7721416553e6015b3d5e6de6a6f3b00f0a6530ba6c9556aa1d6283d9dced2c58e1ce96c73c367a5 WHIRLPOOL a2ec71ce7e4369575d17691c694f0d175afcbc1832fac1c0eefeee7d694280317d51cef6a6cf02c1a6f8e941c69900fa175ca049b5a30718d39d84254ec7be68
DIST gmp-man-5.1.1.pdf 1156487 SHA256 c8c33650c321022c417275321b75e3b0c1bf87275f17323fa843778097449504 SHA512 3e855b882a039099bdc3719c94e4c18d0025e3a903b770752271a41dd9c5cf2b70654f6f59c32edfd4320e9954f679610764f379bd21b9d883d4fc20bd312f76 WHIRLPOOL b87d92601f3c170527192f78c60d6a137043f39772baabdd17957344207fbaae1ad88f03e22348e6e572f0a8a28ee1d80b3dc52015704cb52676b545ccb9f4e5
DIST gmp-man-5.1.2.pdf 1156466 SHA256 2f059a5179c2ea971b9b16553b9f15504e82ef0b7bc7f0b80b1b4fe33147c21f SHA512 b6fc8d82bf15b3d550bf2388fefbba4c7e1bdd5b324d6be52e6398d7b8fb72dd4a59f498bec80a7c8382fe3b5c026434766f0c319742c1263326e0a5b589bb21 WHIRLPOOL b43d41bdf97b94c284fbff305d9968d3142f748b79df51b3e34aa4a576e1655ebe2d3c90473b95d90f79670ae7b100a7b5e5d26ae353470ef2e2f853748dce95
DIST gmp-man-5.1.3.pdf 1159009 SHA256 56b0e21329f46ef1d59c1f191afc82c59f8b72273a8131ed9b5000b7d0689c38 SHA512 ba6a4b0bd2b5ee4d284dd13e9c5531fcb9cfbbbc80f40df458d73c80a1aa250b750cfdd5039998e8b0c7259a8b4d24bd0c7b59a90108f9b680bee62e6948d59e WHIRLPOOL ade206d7e1f543ed028f51e247067eec4511bd0f2499103e1e6296fad2bf50c4f8e09cf7688cc5dd56ee572cf889508ac7918f85e5f91d29d088882f7734a4e0
DIST gmp-man-6.0.0a.pdf 1187496 SHA256 b38ed1d760b20c01b734b65380ab667373fa48d8203f762a434cd3f326c67a38 SHA512 528972502d65d23b58c47a594a628e648f11cc027bd0894a39b8f892bb421ceabb7f35640a9eede21cea791f5f597ed4661a1f73444c56a6fb31fa6e362d96c2 WHIRLPOOL e6c4eb3a9adc82496a1872223ceb153e05c3aabd2323aeb38064739a5200eb8fc24fa3bb96f5fb1e632cc90a2576bd3966bae3c7a7a0c750ca56faeb30837eea

@ -1,256 +0,0 @@
Gentoo uses ABI env var already
--- gmp-4.2.3/configure
+++ gmp-4.2.3/configure
@@ -489,7 +489,7 @@
WANT_MPBSD_TRUE
WANT_MPBSD_FALSE
GMP_NAIL_BITS
-ABI
+GMPABI
HAVE_HOST_CPU_FAMILY_power
HAVE_HOST_CPU_FAMILY_powerpc
GMP_LDFLAGS
@@ -930,7 +930,7 @@
ac_precious_vars='build_alias
host_alias
target_alias
-ABI
+GMPABI
CC
CFLAGS
LDFLAGS
@@ -1091,7 +1091,7 @@
include additional configurations [automatic]
Some influential environment variables:
- ABI desired ABI (for processors supporting more than one ABI)
+ GMPABI desired ABI (for processors supporting more than one ABI)
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
@@ -2670,7 +2670,7 @@
# (64-bit), but not both, so there's no option to choose the desired
# mode, we must instead detect which of the two it is. This is done by
# checking sizeof(long), either 4 or 8 bytes respectively. Do this in
- # ABI=1.0 too, in case someone tries to build that with a 2.0w gcc.
+ # GMPABI=1.0 too, in case someone tries to build that with a 2.0w gcc.
#
gcc_cflags="-O2"
gcc_cflags_optlist="arch"
@@ -2694,11 +2694,11 @@
# gcc 2.7.2.3 knows -mpa-risc-1-0 and -mpa-risc-1-1
# gcc 2.95 adds -mpa-risc-2-0, plus synonyms -march=1.0, 1.1 and 2.0
#
- # We don't use -mpa-risc-2-0 in ABI=1.0 because 64-bit registers may not
+ # We don't use -mpa-risc-2-0 in GMPABI=1.0 because 64-bit registers may not
# be saved by the kernel on an old system. Actually gcc (as of 3.2)
# only adds a few float instructions with -mpa-risc-2-0, so it would
# probably be safe, but let's not take the chance. In any case, a
- # configuration like --host=hppa2.0 ABI=1.0 is far from optimal.
+ # configuration like --host=hppa2.0 GMPABI=1.0 is far from optimal.
#
case $host_cpu in
hppa1.0*) gcc_cflags_arch="-mpa-risc-1-0" ;;
@@ -2733,9 +2733,9 @@
cc_20n_cflags="+DA2.0 +e +O2 -Wl,+vnocompatwarnings"
cc_20n_testlist="hpc-hppa-2-0"
- # ABI=2.0w is available for hppa2.0w and hppa2.0, but not for
+ # GMPABI=2.0w is available for hppa2.0w and hppa2.0, but not for
# hppa2.0n, on the assumption that that the latter indicates a
- # desire for ABI=2.0n.
+ # desire for GMPABI=2.0n.
case $host in
hppa2.0n-*-*) ;;
*)
@@ -3203,7 +3203,7 @@
# mode, but not set our ABI. For some reason it's sparc where this
# keeps coming up, presumably users there are accustomed to driving the
# compiler mode that way. The effect of our testlist setting is to
- # reject ABI=64 in favour of ABI=32 if the user has forced the flags to
+ # reject GMPABI=64 in favour of GMPABI=32 if the user has forced the flags to
# 32-bit mode.
#
abilist="32"
@@ -3308,12 +3308,12 @@
case $host_cpu in
sparc64 | sparcv9* | ultrasparc*)
case $host in
- # Solaris 6 and earlier cannot run ABI=64 since it doesn't save
- # registers properly, so ABI=32 is left as the only choice.
+ # Solaris 6 and earlier cannot run GMPABI=64 since it doesn't save
+ # registers properly, so GMPABI=32 is left as the only choice.
#
*-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
- # BSD sparc64 ports are 64-bit-only systems, so ABI=64 is the only
+ # BSD sparc64 ports are 64-bit-only systems, so GMPABI=64 is the only
# choice. In fact they need no special compiler flags, gcc -m64
# is the default, but it doesn't hurt to add it. v9 CPUs always
# use the sparc64 port, since the plain 32-bit sparc ports don't
@@ -3399,7 +3399,7 @@
# -O, but lets assume that's no longer true.
#
# -m32 forces 32-bit mode on a bi-arch 32/64 amd64 build of gcc. -m64 is
- # the default in such a build (we think), so -m32 is essential for ABI=32.
+ # the default in such a build (we think), so -m32 is essential for GMPABI=32.
# This is, of course, done for any $host_cpu, not just x86_64, so we can
# get such a gcc into the right mode to cross-compile to say i486-*-*.
#
@@ -3639,7 +3639,7 @@
cat >&5 <<EOF
User:
-ABI=$ABI
+GMPABI=$GMPABI
CC=$CC
CFLAGS=$CFLAGS_or_unset
CPPFLAGS=$CPPFLAGS_or_unset
@@ -3660,24 +3660,24 @@
# If the user specifies an ABI then it must be in $abilist, after that
# $abilist is restricted to just that choice.
#
-if test -n "$ABI"; then
+if test -n "$GMPABI"; then
found=no
for abi in $abilist; do
- if test $abi = "$ABI"; then found=yes; break; fi
+ if test $abi = "$GMPABI"; then found=yes; break; fi
done
if test $found = no; then
- { { echo "$as_me:$LINENO: error: ABI=$ABI is not among the following valid choices: $abilist" >&5
-echo "$as_me: error: ABI=$ABI is not among the following valid choices: $abilist" >&2;}
+ { { echo "$as_me:$LINENO: error: GMPABI=$GMPABI is not among the following valid choices: $abilist" >&5
+echo "$as_me: error: GMPABI=$GMPABI is not among the following valid choices: $abilist" >&2;}
{ (exit 1); exit 1; }; }
fi
- abilist="$ABI"
+ abilist="$GMPABI"
fi
found_compiler=no
for abi in $abilist; do
- echo "checking ABI=$abi"
+ echo "checking GMPABI=$abi"
# Suppose abilist="64 32", then for abi=64, will have abi1="_64" and
# abi2="_64". For abi=32, will have abi1="_32" and abi2="". This is how
@@ -5128,7 +5128,7 @@
# For -march settings which enable SSE2 we exclude certain bad
# gcc versions and we need an OS knowing how to save xmm regs.
#
- # This is only for ABI=32, any 64-bit gcc is good and any OS
+ # This is only for GMPABI=32, any 64-bit gcc is good and any OS
# knowing x86_64 will know xmm.
#
# -march=k8 was only introduced in gcc 3.3, so we shouldn't need
@@ -6368,16 +6368,16 @@
done
fi
- ABI="$abi"
+ GMPABI="$abi"
CC="$cc"
CFLAGS="$cflags"
CPPFLAGS="$cppflags"
# Could easily have this in config.h too, if desired.
- ABI_nodots=`echo $ABI | sed 's/\./_/'`
+ GMPABI_nodots=`echo $GMPABI | sed 's/\./_/'`
-echo "define_not_for_expansion(\`HAVE_ABI_$ABI_nodots')" >> $gmp_tmpconfigm4p
+echo "define_not_for_expansion(\`HAVE_ABI_$GMPABI_nodots')" >> $gmp_tmpconfigm4p
@@ -8830,12 +8830,12 @@
# If there's any sse2 or mmx in the path, check whether the assembler
# supports it, and remove if not.
#
-# We only need this in ABI=32, for ABI=64 on x86_64 we can assume a new
+# We only need this in GMPABI=32, for GMPABI=64 on x86_64 we can assume a new
# enough assembler.
#
case $host in
i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | athlon64-*-* | atom-*-* | core2-*-* | x86_64-*-*)
- if test "$ABI" = 32; then
+ if test "$GMPABI" = 32; then
case "$path $fat_path" in
*mmx*) echo "$as_me:$LINENO: checking if the assembler knows about MMX instructions" >&5
echo $ECHO_N "checking if the assembler knows about MMX instructions... $ECHO_C" >&6
@@ -9019,7 +9019,7 @@
cat >&5 <<EOF
Decided:
-ABI=$ABI
+GMPABI=$GMPABI
CC=$CC
CFLAGS=$CFLAGS
CPPFLAGS=$CPPFLAGS
@@ -9028,7 +9028,7 @@
CXXFLAGS=$CXXFLAGS
path=$path
EOF
-echo "using ABI=\"$ABI\""
+echo "using GMPABI=\"$GMPABI\""
echo " CC=\"$CC\""
echo " CFLAGS=\"$CFLAGS\""
echo " CPPFLAGS=\"$CPPFLAGS\""
@@ -30005,7 +30005,7 @@
case $host in
*-*-aix*)
- case $ABI in
+ case $GMPABI in
64 | aix64)
echo "include_mpn(\`powerpc64/aix.m4')" >> $gmp_tmpconfigm4i
;;
@@ -30015,7 +30015,7 @@
esac
;;
*-*-linux* | *-*-*bsd*)
- case $ABI in
+ case $GMPABI in
mode64)
echo "include_mpn(\`powerpc64/elf.m4')" >> $gmp_tmpconfigm4i
;;
@@ -30025,7 +30025,7 @@
esac
;;
*-*-darwin*)
- case $ABI in
+ case $GMPABI in
mode64)
echo "include_mpn(\`powerpc64/darwin.m4')" >> $gmp_tmpconfigm4i
;;
@@ -30048,7 +30048,7 @@
;;
sparcv9*-*-* | ultrasparc*-*-* | sparc64-*-*)
- case $ABI in
+ case $GMPABI in
64)
echo "$as_me:$LINENO: checking if the assembler accepts \".register\"" >&5
@@ -30130,7 +30130,7 @@
echo "define(<ALIGN_FILL_0x90>,<$gmp_cv_asm_align_fill_0x90>)" >> $gmp_tmpconfigm4
- case $ABI in
+ case $GMPABI in
32)
echo "include_mpn(\`x86/x86-defs.m4')" >> $gmp_tmpconfigm4i
@@ -34032,7 +34032,7 @@
WANT_MPBSD_TRUE!$WANT_MPBSD_TRUE$ac_delim
WANT_MPBSD_FALSE!$WANT_MPBSD_FALSE$ac_delim
GMP_NAIL_BITS!$GMP_NAIL_BITS$ac_delim
-ABI!$ABI$ac_delim
+GMPABI!$GMPABI$ac_delim
HAVE_HOST_CPU_FAMILY_power!$HAVE_HOST_CPU_FAMILY_power$ac_delim
HAVE_HOST_CPU_FAMILY_powerpc!$HAVE_HOST_CPU_FAMILY_powerpc$ac_delim
GMP_LDFLAGS!$GMP_LDFLAGS$ac_delim

@ -1,68 +0,0 @@
stolen from SuSE
--- configure.in
+++ configure.in
@@ -1050,6 +1050,9 @@
;;
+ s390x-*-*)
+ path="s390x" ;;
+
# IBM s/370 and similar
[s3[6-9]0*-*-*])
gcc_cflags="-O2 $fomit_frame_pointer"
--- configure
+++ configure
@@ -1050,6 +1050,9 @@
;;
+ s390x-*-*)
+ path="s390x" ;;
+
# IBM s/370 and similar
s3[6-9]0*-*-*)
gcc_cflags="-O2 $fomit_frame_pointer"
--- mpn/s390/gmp-mparam.h
+++ mpn/s390/gmp-mparam.h
@@ -20,7 +20,8 @@
MA 02110-1301, USA. */
-/* GMP_LIMB_BITS etc generated by configure */
+#define GMP_LIMB_BITS 32
+#define BYTES_PER_MP_LIMB 4
/* Generated by tuneup.c, 2001-12-03, gcc 2.95 */
--- mpn/s390x/gmp-mparam.h
+++ mpn/s390x/gmp-mparam.h
@@ -0,0 +1,27 @@
+/* gmp-mparam.h -- Compiler/machine parameter header file.
+
+Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+#define GMP_LIMB_BITS 64
+#define BYTES_PER_MP_LIMB 8
+#define BITS_PER_LONGINT 64
+#define BITS_PER_INT 32
+#define BITS_PER_SHORTINT 16
+#define BITS_PER_CHAR 8

@ -1,36 +0,0 @@
# HG changeset patch
# User Torbjorn Granlund <tege@gmplib.org>
# Date 1267122532 -3600
# Node ID 794410151f5f966bcb5c3489b6441614990efe7c
# Parent 948660e2e56d9cfaae035082b8fd473985505fb6
Fix a test case to work for long long limbs.
2010-02-25 Torbjorn Granlund <tege@gmplib.org>
* tests/mpz/t-perfpow.c (check_random): Use mp_limb_t type for limb
variables.
diff -r 948660e2e56d -r 794410151f5f tests/mpz/t-perfpow.c
--- a/tests/mpz/t-perfpow.c Thu Feb 25 16:08:21 2010 +0100
+++ b/tests/mpz/t-perfpow.c Thu Feb 25 19:28:52 2010 +0100
@@ -2,7 +2,7 @@
Contributed to the GNU project by Torbjorn Granlund and Martin Boij.
-Copyright 2008, 2009 Free Software Foundation, Inc.
+Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -109,7 +109,8 @@
{
mpz_t n, np, temp, primes[NRP];
int i, j, k, unique, destroy, res;
- unsigned long int nrprimes, primebits, g, exp[NRP], e;
+ unsigned long int nrprimes, primebits;
+ mp_limb_t g, exp[NRP], e;
gmp_randstate_ptr rands;
rands = RANDS;

@ -1,130 +0,0 @@
2010-07-27 Magnus Granberg <zorry@gentoo.org>
#236054
tests/Makefile.in add -nopie to CFLAGS
test/misc/Makefile.in likewise
test/mpbsd/Makefile.in likewise
test/mpf/Makefile.in likewise
test/mpn/Makefile.in likewise
test/mpq/Makefile.in likewise
test/mpz/Makefile.in likewise
test/randMakefile.in likewise
test/cxx/Makefile.in likewise and CXXFLAGS
--- a/tests/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/devel/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/devel/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/misc/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/misc/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/mpbsd/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/mpbsd/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/mpf/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/mpf/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/mpn/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/mpn/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/mpq/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/mpq/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/mpz/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/mpz/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/rand/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/rand/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/cxx/Makefile.in 2010-02-06 12:43:21.000000000 +0000
+++ b/tests/cxx/Makefile.in 2010-07-27 01:31:43.000000000 +0000
@@ -189,13 +189,13 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXFLAGS = @CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@ -nopie
CYGPATH_W = @CYGPATH_W@
DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@
DEFS = @DEFS@

@ -1,21 +0,0 @@
# HG changeset patch
# User Torbjorn Granlund <tege@gmplib.org>
# Date 1310730221 -7200
# Node ID 538dfce27f410b910d5e2f011119269e224d16a3
# Parent 03ed209dd7efd4f4fff0ce297bb3a8f7e7ba2366
(mpn_dcpi1_bdiv_q): Get mpn_sub_1 size argument right.
diff -r 03ed209dd7ef -r 538dfce27f41 mpn/generic/dcpi1_bdiv_q.c
--- a/mpn/generic/dcpi1_bdiv_q.c Thu Jun 16 12:22:24 2011 +0200
+++ b/mpn/generic/dcpi1_bdiv_q.c Fri Jul 15 13:43:41 2011 +0200
@@ -130,7 +129,7 @@
qn = nn - qn;
while (qn > dn)
{
- mpn_sub_1 (np + dn, np + dn, qn, cy);
+ mpn_sub_1 (np + dn, np + dn, qn - dn, cy);
cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, dn, dinv, tp);
qp += dn;
np += dn;

@ -1,94 +0,0 @@
UpstreamStatus: Pending
When LONG_MIN is passed to val, -val is undefined. This patch fixes
it. See for details: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50066
Received this patch from H.J. Lu <hjl.tools@gmail.com>
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01
--- gmp-4.3.2/mpf/iset_si.c.ll 2010-01-07 12:09:03.000000000 -0800
+++ gmp-4.3.2/mpf/iset_si.c 2011-11-30 16:42:35.827944358 -0800
@@ -31,7 +31,7 @@ mpf_init_set_si (mpf_ptr r, long int val
r->_mp_prec = prec;
r->_mp_d = (mp_ptr) (*__gmp_allocate_func) ((prec + 1) * BYTES_PER_MP_LIMB);
- vl = (mp_limb_t) (unsigned long int) (val >= 0 ? val : -val);
+ vl = (mp_limb_t) (val >= 0 ? (unsigned long int) val : -(unsigned long int) val);
r->_mp_d[0] = vl & GMP_NUMB_MASK;
size = vl != 0;
--- gmp-4.3.2/mpf/set_si.c.ll 2010-01-07 12:09:03.000000000 -0800
+++ gmp-4.3.2/mpf/set_si.c 2011-11-30 16:42:47.823878367 -0800
@@ -27,7 +27,7 @@ mpf_set_si (mpf_ptr dest, long val)
mp_size_t size;
mp_limb_t vl;
- vl = (mp_limb_t) (unsigned long int) (val >= 0 ? val : -val);
+ vl = (mp_limb_t) (val >= 0 ? (unsigned long int) val : -(unsigned long int) val);
dest->_mp_d[0] = vl & GMP_NUMB_MASK;
size = vl != 0;
--- gmp-4.3.2/mpz/cmp_si.c.ll 2010-01-07 12:09:03.000000000 -0800
+++ gmp-4.3.2/mpz/cmp_si.c 2011-11-30 13:44:25.923319700 -0800
@@ -27,7 +27,7 @@ _mpz_cmp_si (mpz_srcptr u, signed long i
{
mp_size_t usize = u->_mp_size;
mp_size_t vsize;
- mp_limb_t u_digit;
+ mp_limb_t u_digit, vl_digit;
#if GMP_NAIL_BITS != 0
/* FIXME. This isn't very pretty. */
@@ -41,11 +41,14 @@ _mpz_cmp_si (mpz_srcptr u, signed long i
vsize = 0;
if (v_digit > 0)
- vsize = 1;
+ {
+ vsize = 1;
+ vl_digit = (mp_limb_t) (unsigned long) v_digit;
+ }
else if (v_digit < 0)
{
vsize = -1;
- v_digit = -v_digit;
+ vl_digit = (mp_limb_t) -(unsigned long) v_digit;
}
if (usize != vsize)
@@ -56,10 +59,10 @@ _mpz_cmp_si (mpz_srcptr u, signed long i
u_digit = u->_mp_d[0];
- if (u_digit == (mp_limb_t) (unsigned long) v_digit)
+ if (u_digit == vl_digit)
return 0;
- if (u_digit > (mp_limb_t) (unsigned long) v_digit)
+ if (u_digit > vl_digit)
return usize;
else
return -usize;
--- gmp-4.3.2/mpz/iset_si.c.ll 2010-01-07 12:09:03.000000000 -0800
+++ gmp-4.3.2/mpz/iset_si.c 2011-11-30 13:44:25.924319695 -0800
@@ -31,7 +31,7 @@ mpz_init_set_si (mpz_ptr dest, signed lo
dest->_mp_alloc = 1;
dest->_mp_d = (mp_ptr) (*__gmp_allocate_func) (BYTES_PER_MP_LIMB);
- vl = (mp_limb_t) (unsigned long int) (val >= 0 ? val : -val);
+ vl = (mp_limb_t) (val >= 0 ? (unsigned long int) val : -(unsigned long int) val);
dest->_mp_d[0] = vl & GMP_NUMB_MASK;
size = vl != 0;
--- gmp-4.3.2/mpz/set_si.c.ll 2010-01-07 12:09:03.000000000 -0800
+++ gmp-4.3.2/mpz/set_si.c 2011-11-30 13:44:25.947319574 -0800
@@ -27,7 +27,7 @@ mpz_set_si (mpz_ptr dest, signed long in
mp_size_t size;
mp_limb_t vl;
- vl = (mp_limb_t) (unsigned long int) (val >= 0 ? val : -val);
+ vl = (mp_limb_t) (val >= 0 ? (unsigned long int) val : -(unsigned long int) val);
dest->_mp_d[0] = vl & GMP_NUMB_MASK;
size = vl != 0;

@ -1,41 +0,0 @@
Upstream-Status: Pending
Add X32 support in gmp configure.
Patch Originator: H J Lu @ Intel
Patch modified for Yocto by Nitin Kamble
Signed Off By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/11/21
--- gmp-4.3.2/configure
+++ gmp-4.3.2/configure
@@ -1499,6 +1499,21 @@
path_64="x86_64/atom x86_64"
;;
esac
+
+ # X32 support.
+ case x"$path_64" in
+ xx86_64*)
+ abilist="x32 64 32"
+ path_x32="$path_64"
+ limb_x32=longlong
+ cclist_x32="gcc"
+ gcc_x32_cflags="-O2 -mx32"
+ any_x32_testlist="sizeof-long-4"
+ CALLING_CONVENTIONS_OBJS_x32='amd64call.lo amd64check$U.lo'
+ SPEED_CYCLECOUNTER_OBJ_x32=x86_64.lo
+ cyclecounter_size_x32=2
+ ;;
+ esac
;;
esac
;;
@@ -3039,7 +3058,7 @@
;;
esac
;;
- 64)
+ 64|x32)
echo "include_mpn(\`x86_64/x86_64-defs.m4')" >> $gmp_tmpconfigm4i

@ -1,41 +0,0 @@
Upstream-Status: Pending
Add X32 support in gmp configure.
Patch Originator: H J Lu @ Intel
Patch modified for Yocto by Nitin Kamble
Signed Off By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/11/21
--- gmp-5.0.5/configure
+++ gmp-5.0.5/configure
@@ -5189,6 +5189,21 @@
esac
;;
esac
+
+ # X32 support.
+ case x"$path_64" in
+ xx86_64*)
+ abilist="x32 64 32"
+ path_x32="$path_64"
+ limb_x32=longlong
+ cclist_x32="gcc"
+ gcc_x32_cflags="-O2 -mx32"
+ any_x32_testlist="sizeof-long-4"
+ CALLING_CONVENTIONS_OBJS_x32='amd64call.lo amd64check$U.lo'
+ SPEED_CYCLECOUNTER_OBJ_x32=x86_64.lo
+ cyclecounter_size_x32=2
+ ;;
+ esac
;;
@@ -3039,7 +3058,7 @@
;;
esac
;;
- 64)
+ 64|x32)
echo "include_mpn(\`x86_64/x86_64-defs.m4')" >> $gmp_tmpconfigm4i

@ -1,12 +0,0 @@
fix missing __gmpn_invert_limb symbols w/armv4 targets
--- a/configure
+++ b/configure
@@ -582,6 +582,7 @@ case $host in
# options fail.
case $host_cpu in
armsa1 | armv4*)
+ path="arm"
;;
armxscale | arm9te | arm10 | armv5*)
path="arm/v5 arm"

@ -1,42 +0,0 @@
Upstream-Status: Pending
Add X32 support in gmp configure.
Patch Originator: H J Lu @ Intel
Patch modified for Yocto by Nitin Kamble
Signed Off By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/11/21
--- gmp-5.1.0/configure
+++ gmp-5.1.0/configure
@@ -5237,6 +5237,22 @@ echo "include_mpn(\`vax/elf.m4')" >> $gmp_tmpconfigm4i
extra_functions_64="invert_limb_table"
fi
+ # X32 support.
+ case x"$path_64" in
+ xx86_64*)
+ abilist="x32 64 32"
+ path_x32="$path_64"
+ limb_x32=longlong
+ cclist_x32="gcc"
+ gcc_x32_cflags="-O2 -mx32"
+ any_x32_testlist="sizeof-long-4"
+ CALLING_CONVENTIONS_OBJS_x32=$CALLING_CONVENTIONS_OBJS_64
+ SPEED_CYCLECOUNTER_OBJ_x32=$SPEED_CYCLECOUNTER_OBJ_64
+ cyclecounter_size_x32=$cyclecounter_size_64
+ extra_functions_x32=$extra_functions_64
+ ;;
+ esac
+
case $host in
*-*-solaris*)
# Sun cc.
@@ -28611,7 +28627,7 @@ echo "include_mpn(\`x86/darwin.m4')" >> $gmp_tmpconfigm4i
;;
esac
;;
- 64)
+ 64|x32)
echo "include_mpn(\`x86_64/x86_64-defs.m4')" >> $gmp_tmpconfigm4i

@ -1,119 +0,0 @@
2010-07-27 Magnus Granberg <zorry@gentoo.org>
#236054
tests/Makefile.in add -nopie to CFLAGS
test/misc/Makefile.in likewise
test/mpbsd/Makefile.in likewise
test/mpf/Makefile.in likewise
test/mpn/Makefile.in likewise
test/mpq/Makefile.in likewise
test/mpz/Makefile.in likewise
test/randMakefile.in likewise
test/cxx/Makefile.in likewise and CXXFLAGS
--- a/tests/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/devel/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/devel/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/misc/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/misc/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/mpf/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/mpf/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/mpn/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/mpn/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/mpq/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/mpq/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/mpz/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/mpz/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/rand/Makefile.in 2010-07-27 00:53:05.000000000 +0000
+++ b/tests/rand/Makefile.in 2010-07-27 00:35:10.000000000 +0000
@@ -200,7 +200,7 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
--- a/tests/cxx/Makefile.in 2010-02-06 12:43:21.000000000 +0000
+++ b/tests/cxx/Makefile.in 2010-07-27 01:31:43.000000000 +0000
@@ -189,13 +189,13 @@
CC = @CC@
CCAS = @CCAS@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -nopie
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOR_BUILD = @CPP_FOR_BUILD@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXFLAGS = @CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@ -nopie
CYGPATH_W = @CYGPATH_W@
DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@
DEFS = @DEFS@

@ -4,9 +4,9 @@
# this ebuild is only for the libgmp.so.3 ABI SONAME
EAPI="3"
EAPI="5"
inherit eutils libtool toolchain-funcs
inherit eutils libtool toolchain-funcs multilib-minimal
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
HOMEPAGE="http://gmplib.org/"
@ -22,32 +22,38 @@ RDEPEND=""
src_prepare() {
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
epatch "${FILESDIR}"/${PN}-4.3.2-ABI-multilib.patch
epatch "${FILESDIR}"/${PN}-4.2.1-s390.diff
sed -i -e 's:ABI = @ABI@:GMPABI = @GMPABI@:' \
Makefile.in */Makefile.in */*/Makefile.in
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="${GMPABI}" "$0.wrapped" "$@"
EOF
chmod a+rx configure
}
src_configure() {
multilib_src_configure() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) export GMPABI=32;;
64|amd64|n64) export GMPABI=64;;
o32|n32) export GMPABI=${ABI};;
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
[onx]32) GMPABI=${ABI};;
esac
export GMPABI
tc-export CC
econf \
ECONF_SOURCE="${S}" econf \
--localstatedir=/var/state/gmp \
--disable-mpfr \
--disable-mpbsd \
@ -55,7 +61,7 @@ src_configure() {
--disable-cxx
}
src_install() {
emake install-libLTLIBRARIES DESTDIR="${D}" || die
multilib_src_install() {
emake DESTDIR="${D}" install-libLTLIBRARIES
rm "${D}"/usr/*/libgmp.{la,so} || die
}

@ -1,87 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit flag-o-matic eutils libtool toolchain-funcs
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
HOMEPAGE="http://gmplib.org/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"
# doc? ( http://www.nada.kth.se/~tege/${PN}-man-${PV}.pdf )"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
IUSE="cxx" #doc
DEPEND="sys-devel/m4"
RDEPEND=""
src_unpack() {
unpack ${A}
cd "${S}"
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
epatch "${FILESDIR}"/${P}-perfpow-test.patch
epatch "${FILESDIR}"/${PN}-5.0.0-s390.diff
# disable -fPIE -pie in the tests for x86 #236054
if use x86 && gcc-specs-pie ; then
epatch "${FILESDIR}"/${PN}-5.0.1-x86-nopie-tests.patch
fi
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "${0}.wrapped" "$@"
EOF
chmod a+rx configure
}
src_compile() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
o32|n32) GMPABI=${ABI};;
esac
export GMPABI
tc-export CC
econf \
--localstatedir=/var/state/gmp \
--disable-mpbsd \
$(use_enable cxx) \
|| die "configure failed"
emake || die "emake failed"
}
src_install() {
emake DESTDIR="${D}" install || die "make install failed"
dodoc AUTHORS ChangeLog NEWS README
dodoc doc/configuration doc/isa_abi_headache
dohtml -r doc
#use doc && cp "${DISTDIR}"/gmp-man-${PV}.pdf "${D}"/usr/share/doc/${PF}/
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
}

@ -1,86 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit flag-o-matic eutils libtool toolchain-funcs
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
HOMEPAGE="http://gmplib.org/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"
# doc? ( http://www.nada.kth.se/~tege/${PN}-man-${PV}.pdf )"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
IUSE="cxx" #doc
DEPEND="sys-devel/m4"
RDEPEND=""
src_unpack() {
unpack ${A}
cd "${S}"
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
epatch "${FILESDIR}"/${PN}-5.0.0-s390.diff
# disable -fPIE -pie in the tests for x86 #236054
if use x86 && gcc-specs-pie ; then
epatch "${FILESDIR}"/${PN}-5.0.1-x86-nopie-tests.patch
fi
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "${0}.wrapped" "$@"
EOF
chmod a+rx configure
}
src_compile() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
o32|n32) GMPABI=${ABI};;
esac
export GMPABI
tc-export CC
econf \
--localstatedir=/var/state/gmp \
--disable-mpbsd \
$(use_enable cxx) \
|| die "configure failed"
emake || die "emake failed"
}
src_install() {
emake DESTDIR="${D}" install || die "make install failed"
dodoc AUTHORS ChangeLog NEWS README
dodoc doc/configuration doc/isa_abi_headache
dohtml -r doc
#use doc && cp "${DISTDIR}"/gmp-man-${PV}.pdf "${D}"/usr/share/doc/${PF}/
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
}

@ -1,102 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit flag-o-matic eutils libtool toolchain-funcs
MY_PV=${PV/_p*}
MY_P=${PN}-${MY_PV}
PLEVEL=${PV/*p}
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
HOMEPAGE="http://gmplib.org/"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.bz2
doc? ( http://gmplib.org/${PN}-man-${MY_PV}.pdf )"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
IUSE="doc cxx static-libs"
DEPEND="sys-devel/m4"
RDEPEND=""
S=${WORKDIR}/${MY_P}
src_unpack() {
unpack ${MY_P}.tar.bz2
cd "${S}"
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
epatch "${FILESDIR}"/${PN}-5.0.0-s390.diff
epatch "${FILESDIR}"/${MY_P}-unnormalised-dividends.patch
has x32 $(get_all_abis) && epatch "${FILESDIR}"/${PN}-5.0.2*x32*.patch
# disable -fPIE -pie in the tests for x86 #236054
if use x86 && gcc-specs-pie ; then
epatch "${FILESDIR}"/${PN}-5.0.1-x86-nopie-tests.patch
fi
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "${0}.wrapped" "$@"
EOF
chmod a+rx configure
}
src_compile() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
[onx]32) GMPABI=${ABI};;
esac
export GMPABI
tc-export CC
econf \
--localstatedir=/var/state/gmp \
--disable-mpbsd \
$(use_enable cxx) \
$(use_enable static-libs static) \
|| die
emake || die
}
src_install() {
emake DESTDIR="${D}" install || die
# should be a standalone lib
rm -f "${D}"/usr/$(get_libdir)/libgmp.la
# this requires libgmp
local la="${D}/usr/$(get_libdir)/libgmpxx.la"
use static-libs \
&& sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \
|| rm -f "${la}"
dodoc AUTHORS ChangeLog NEWS README
dodoc doc/configuration doc/isa_abi_headache
dohtml -r doc
use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
}

@ -1,101 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit flag-o-matic eutils libtool toolchain-funcs
MY_PV=${PV/_p*}
MY_P=${PN}-${MY_PV}
PLEVEL=${PV/*p}
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
HOMEPAGE="http://gmplib.org/"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
doc? ( http://gmplib.org/${PN}-man-${MY_PV}.pdf )"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
IUSE="doc cxx static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
RDEPEND=""
S=${WORKDIR}/${MY_P}
src_unpack() {
xz -dc "${DISTDIR}/${MY_P}.tar.xz" | tar xof - || die
cd "${S}"
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
epatch "${FILESDIR}"/${PN}-5.0.2*x32*.patch
# disable -fPIE -pie in the tests for x86 #236054
if use x86 && gcc-specs-pie ; then
epatch "${FILESDIR}"/${PN}-5.0.1-x86-nopie-tests.patch
fi
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "${0}.wrapped" "$@"
EOF
chmod a+rx configure
}
src_compile() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
[onx]32) GMPABI=${ABI};;
esac
export GMPABI
tc-export CC
econf \
--localstatedir=/var/state/gmp \
--disable-mpbsd \
$(use_enable cxx) \
$(use_enable static-libs static) \
|| die
emake || die
}
src_install() {
emake DESTDIR="${D}" install || die
# should be a standalone lib
rm -f "${D}"/usr/$(get_libdir)/libgmp.la
# this requires libgmp
local la="${D}/usr/$(get_libdir)/libgmpxx.la"
use static-libs \
&& sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \
|| rm -f "${la}"
dodoc AUTHORS ChangeLog NEWS README
dodoc doc/configuration doc/isa_abi_headache
dohtml -r doc
use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
}

@ -1,101 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit flag-o-matic eutils libtool unpacker toolchain-funcs
MY_PV=${PV/_p*}
MY_P=${PN}-${MY_PV}
PLEVEL=${PV/*p}
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
HOMEPAGE="http://gmplib.org/"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
doc? ( http://gmplib.org/${PN}-man-${MY_PV}.pdf )"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="doc cxx static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
RDEPEND=""
S=${WORKDIR}/${MY_P}
src_unpack() {
unpacker_src_unpack
cd "${S}"
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
epatch "${FILESDIR}"/${PN}-5.0.2-x32-support.patch
# disable -fPIE -pie in the tests for x86 #236054
if use x86 && gcc-specs-pie ; then
epatch "${FILESDIR}"/${PN}-5.0.1-x86-nopie-tests.patch
fi
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "${0}.wrapped" "$@"
EOF
chmod a+rx configure
}
src_compile() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
[onx]32) GMPABI=${ABI};;
esac
export GMPABI
tc-export CC
econf \
--localstatedir=/var/state/gmp \
--disable-mpbsd \
$(use_enable cxx) \
$(use_enable static-libs static) \
|| die
emake || die
}
src_install() {
emake DESTDIR="${D}" install || die
# should be a standalone lib
rm -f "${D}"/usr/$(get_libdir)/libgmp.la
# this requires libgmp
local la="${D}/usr/$(get_libdir)/libgmpxx.la"
use static-libs \
&& sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \
|| rm -f "${la}"
dodoc AUTHORS ChangeLog NEWS README
dodoc doc/configuration doc/isa_abi_headache
dohtml -r doc
use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
}

@ -1,101 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit flag-o-matic eutils libtool unpacker toolchain-funcs
MY_PV=${PV/_p*}
MY_P=${PN}-${MY_PV}
PLEVEL=${PV/*p}
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
HOMEPAGE="http://gmplib.org/"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
doc? ( http://gmplib.org/${PN}-man-${MY_PV}.pdf )"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="doc cxx static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
RDEPEND=""
S=${WORKDIR}/${MY_P}
src_unpack() {
unpacker_src_unpack
cd "${S}"
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
epatch "${FILESDIR}"/${PN}-5.0.5-x32-support.patch
# disable -fPIE -pie in the tests for x86 #236054
if use x86 && gcc-specs-pie ; then
epatch "${FILESDIR}"/${PN}-5.0.1-x86-nopie-tests.patch
fi
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "${0}.wrapped" "$@"
EOF
chmod a+rx configure
}
src_compile() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
[onx]32) GMPABI=${ABI};;
esac
export GMPABI
tc-export CC
econf \
--localstatedir=/var/state/gmp \
--disable-mpbsd \
$(use_enable cxx) \
$(use_enable static-libs static) \
|| die
emake || die
}
src_install() {
emake DESTDIR="${D}" install || die
# should be a standalone lib
rm -f "${D}"/usr/$(get_libdir)/libgmp.la
# this requires libgmp
local la="${D}/usr/$(get_libdir)/libgmpxx.la"
use static-libs \
&& sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \
|| rm -f "${la}"
dodoc AUTHORS ChangeLog NEWS README
dodoc doc/configuration doc/isa_abi_headache
dohtml -r doc
use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
}

@ -1,116 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit flag-o-matic eutils libtool unpacker toolchain-funcs
MY_PV=${PV/_p*}
MY_P=${PN}-${MY_PV}
PLEVEL=${PV/*p}
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
HOMEPAGE="http://gmplib.org/"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
ftp://ftp.gmplib.org/pub/${MY_P}/${MY_P}.tar.xz
doc? ( http://gmplib.org/${PN}-man-${MY_PV}.pdf )"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="doc cxx pgo static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
RDEPEND=""
S=${WORKDIR}/${MY_P}
src_unpack() {
unpacker_src_unpack
cd "${S}"
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
epatch "${FILESDIR}"/${PN}-5.1.0-armv4.patch
epatch "${FILESDIR}"/${PN}-5.1.0-x32-support.patch
# disable -fPIE -pie in the tests for x86 #236054
if use x86 && gcc-specs-pie ; then
epatch "${FILESDIR}"/${PN}-5.1.0-x86-nopie-tests.patch
fi
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "$0.wrapped" "$@"
EOF
chmod a+rx configure
}
src_compile() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
[onx]32) GMPABI=${ABI};;
esac
export GMPABI
tc-export CC
econf \
--localstatedir=/var/state/gmp \
$(use_enable cxx) \
$(use_enable static-libs static)
emake || die
if use pgo ; then
emake -j1 -C tune tuneup || die
ebegin "Trying to generate tuned data"
./tune/tuneup | tee gmp.mparam.h.new
if eend $(( 0 + ${PIPESTATUS[*]/#/+} )) ; then
mv gmp.mparam.h.new gmp-mparam.h || die
emake clean || die
emake || die
fi
fi
}
src_test() {
emake check
}
src_install() {
emake DESTDIR="${D}" install || die
# should be a standalone lib
rm -f "${D}"/usr/$(get_libdir)/libgmp.la
# this requires libgmp
local la="${D}/usr/$(get_libdir)/libgmpxx.la"
use static-libs \
&& sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \
|| rm -f "${la}"
dodoc AUTHORS ChangeLog NEWS README
dodoc doc/configuration doc/isa_abi_headache
dohtml -r doc
use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
}

@ -1,115 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit flag-o-matic eutils libtool unpacker toolchain-funcs
MY_PV=${PV/_p*}
MY_P=${PN}-${MY_PV}
PLEVEL=${PV/*p}
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
HOMEPAGE="http://gmplib.org/"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
ftp://ftp.gmplib.org/pub/${MY_P}/${MY_P}.tar.xz
doc? ( http://gmplib.org/${PN}-man-${MY_PV}.pdf )"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="doc cxx pgo static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
RDEPEND=""
S=${WORKDIR}/${MY_P}
src_unpack() {
unpacker_src_unpack
cd "${S}"
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
epatch "${FILESDIR}"/${PN}-5.1.0-armv4.patch
# disable -fPIE -pie in the tests for x86 #236054
if use x86 && gcc-specs-pie ; then
epatch "${FILESDIR}"/${PN}-5.1.0-x86-nopie-tests.patch
fi
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "$0.wrapped" "$@"
EOF
chmod a+rx configure
}
src_compile() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
[onx]32) GMPABI=${ABI};;
esac
export GMPABI
tc-export CC
econf \
--localstatedir=/var/state/gmp \
$(use_enable cxx) \
$(use_enable static-libs static)
emake || die
if use pgo ; then
emake -j1 -C tune tuneup || die
ebegin "Trying to generate tuned data"
./tune/tuneup | tee gmp.mparam.h.new
if eend $(( 0 + ${PIPESTATUS[*]/#/+} )) ; then
mv gmp.mparam.h.new gmp-mparam.h || die
emake clean || die
emake || die
fi
fi
}
src_test() {
emake check
}
src_install() {
emake DESTDIR="${D}" install || die
# should be a standalone lib
rm -f "${D}"/usr/$(get_libdir)/libgmp.la
# this requires libgmp
local la="${D}/usr/$(get_libdir)/libgmpxx.la"
use static-libs \
&& sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \
|| rm -f "${la}"
dodoc AUTHORS ChangeLog NEWS README
dodoc doc/configuration doc/isa_abi_headache
dohtml -r doc
use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
}

@ -1,114 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit flag-o-matic eutils libtool unpacker toolchain-funcs
MY_PV=${PV/_p*}
MY_P=${PN}-${MY_PV}
PLEVEL=${PV/*p}
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
HOMEPAGE="http://gmplib.org/"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
ftp://ftp.gmplib.org/pub/${MY_P}/${MY_P}.tar.xz
doc? ( http://gmplib.org/${PN}-man-${MY_PV}.pdf )"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="doc cxx pgo static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
RDEPEND=""
S=${WORKDIR}/${MY_P}
src_unpack() {
unpacker_src_unpack
cd "${S}"
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
# disable -fPIE -pie in the tests for x86 #236054
if use x86 && gcc-specs-pie ; then
epatch "${FILESDIR}"/${PN}-5.1.0-x86-nopie-tests.patch
fi
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "$0.wrapped" "$@"
EOF
chmod a+rx configure
}
src_compile() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
[onx]32) GMPABI=${ABI};;
esac
export GMPABI
tc-export CC
econf \
--localstatedir=/var/state/gmp \
$(use_enable cxx) \
$(use_enable static-libs static)
emake || die
if use pgo ; then
emake -j1 -C tune tuneup || die
ebegin "Trying to generate tuned data"
./tune/tuneup | tee gmp.mparam.h.new
if eend $(( 0 + ${PIPESTATUS[*]/#/+} )) ; then
mv gmp.mparam.h.new gmp-mparam.h || die
emake clean || die
emake || die
fi
fi
}
src_test() {
emake check
}
src_install() {
emake DESTDIR="${D}" install || die
# should be a standalone lib
rm -f "${D}"/usr/$(get_libdir)/libgmp.la
# this requires libgmp
local la="${D}/usr/$(get_libdir)/libgmpxx.la"
use static-libs \
&& sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \
|| rm -f "${la}"
dodoc AUTHORS ChangeLog NEWS README
dodoc doc/configuration doc/isa_abi_headache
dohtml -r doc
use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
}

@ -22,10 +22,7 @@ IUSE="doc cxx pgo static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
RDEPEND="abi_x86_32? (
!<=app-emulation/emul-linux-x86-baselibs-20131008-r1
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
)"
RDEPEND=""
S=${WORKDIR}/${MY_P}
@ -45,7 +42,7 @@ src_prepare() {
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "$0.wrapped" "$@"
exec env ABI="${GMPABI}" "$0.wrapped" "$@"
EOF
chmod a+rx configure
}
@ -54,7 +51,7 @@ multilib_src_configure() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)

@ -1,114 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit flag-o-matic eutils libtool unpacker toolchain-funcs
MY_PV=${PV/_p*}
MY_P=${PN}-${MY_PV}
PLEVEL=${PV/*p}
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
HOMEPAGE="http://gmplib.org/"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
ftp://ftp.gmplib.org/pub/${MY_P}/${MY_P}.tar.xz
doc? ( http://gmplib.org/${PN}-man-${MY_PV}.pdf )"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="doc cxx pgo static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
RDEPEND=""
S=${WORKDIR}/${MY_P}
src_unpack() {
unpacker_src_unpack
cd "${S}"
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
# disable -fPIE -pie in the tests for x86 #236054
if use x86 && gcc-specs-pie ; then
epatch "${FILESDIR}"/${PN}-5.1.0-x86-nopie-tests.patch
fi
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "$0.wrapped" "$@"
EOF
chmod a+rx configure
}
src_compile() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
[onx]32) GMPABI=${ABI};;
esac
export GMPABI
tc-export CC
econf \
--localstatedir=/var/state/gmp \
$(use_enable cxx) \
$(use_enable static-libs static)
emake || die
if use pgo ; then
emake -j1 -C tune tuneup || die
ebegin "Trying to generate tuned data"
./tune/tuneup | tee gmp.mparam.h.new
if eend $(( 0 + ${PIPESTATUS[*]/#/+} )) ; then
mv gmp.mparam.h.new gmp-mparam.h || die
emake clean || die
emake || die
fi
fi
}
src_test() {
emake check
}
src_install() {
emake DESTDIR="${D}" install || die
# should be a standalone lib
rm -f "${D}"/usr/$(get_libdir)/libgmp.la
# this requires libgmp
local la="${D}/usr/$(get_libdir)/libgmpxx.la"
use static-libs \
&& sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \
|| rm -f "${la}"
dodoc AUTHORS ChangeLog NEWS README
dodoc doc/configuration doc/isa_abi_headache
dohtml -r doc
use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
}

@ -17,15 +17,12 @@ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
LICENSE="|| ( LGPL-3+ GPL-2+ )"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="doc cxx pgo static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
RDEPEND="abi_x86_32? (
!<=app-emulation/emul-linux-x86-baselibs-20131008-r1
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
)"
RDEPEND=""
S=${WORKDIR}/${MY_P%a}
@ -44,7 +41,7 @@ src_prepare() {
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/bin/sh
exec env ABI="$GMPABI" "$0.wrapped" "$@"
exec env ABI="${GMPABI}" "$0.wrapped" "$@"
EOF
chmod a+rx configure
}
@ -53,7 +50,7 @@ multilib_src_configure() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
export GMPABI="1.0"
GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)

@ -1,7 +1,3 @@
DIST mpfr-2.4.2.tar.bz2 1077886 SHA256 c7e75a08a8d49d2082e4caee1591a05d11b9d5627514e678f02d66a124bcf2ba SHA512 c004b3dbf86c04960e4a1f8db37a409a7cc4cb76135e76e98dcc5ad93aaa8deb62334ee13ff84447a7c12a5e8cb57f25c62ac908c24920f1fb1a38d79d4a4c5e WHIRLPOOL d08935d1c5cda48753ddbf98b3b0e87d911279d7fea24e6b210da7e2378f769f3b20babe96859601195d6a9811cf8297d239df53ad2cfa6d0a1bb7bb02ac6a29
DIST mpfr-3.0.0.tar.bz2 1138685 SHA256 8f4e5f9c53536cb798a30455ac429b1f9fc75a0f8af32d6e0ac31ebf1024821f SHA512 f404a5ebc48624406ff62ddc7c75c75ae06c207b0cdb60d330e95f2782fca9cf4875f8b8389b666bc96d4f157afbdf270d39d95ae890fc7f81027f744632d016 WHIRLPOOL 195eaafca24f4c11472eebc400899244966ed2f087604c8827314ca64ce4bb282af5ff683a1ffaeba5034d0ef82dbb627a88e77af7c1832b78b2ecb5a82d1b77
DIST mpfr-3.0.1.tar.bz2 1154306 SHA256 e1977099bb494319c0f0c1f85759050c418a56884e9c6cef1c540b9b13e38e7f SHA512 bbac7d0d63fd3b4cd895e247c448adce7f4c2b6b66ecfe26af138018e0f96991fa8cbd8cbe94f924761aa1ac676e259af1228600dfc0854314e875e7739fd279 WHIRLPOOL 9d8e9fb6fd4c4526ae853e2bbf85c85dabe01000b0df6f79dcfdbb15f0df95f5a084f304e6e0bc78fbd768eecfb7749c5dfa03a772cc6444432dcaccb1c6adc9
DIST mpfr-3.1.0.tar.bz2 1203891 SHA256 74a7bbbad168dd1cc414f1c9210b8fc16ccfc8e422d34b3371a8978e31eab680 SHA512 86083d8cf9dbcf1e33fcf1d73da8bd5b98fbc9187acf36b2d84c453fd18010aa659960a8026470e49d535d957f764941926a78acb31fe2869bf9a92524e0e81c WHIRLPOOL 7eb97b6df3ca8f903e2fa65c2f184edbf6cf990ce512eaf9598a52db381d74879e5549bf019e89b7d7d260d1347e19d6c03e8365e8340591e110d011090a7a4b
DIST mpfr-3.1.1.tar.xz 1071688 SHA256 49d5acc32dbeec30a8e26af9c19845763d63feacb8bf97b12876008419f5a17a SHA512 4fcc87e19a08622b3211a33807e708b78da6c8659f391003703a9e170c485f56e6ebfff48d42afca7b4edb14fd9487684c4d8fd6c9f805ed62b6d5259d5721a8 WHIRLPOOL c4fdb3c7fba779cfa8900cd3b05322d4853bb6114ea42a5ec315d4489c25e962185f3e3cd3b3214360b55a58da02987c62c5ca92fb14989b38bd8c93bccd63d5
DIST mpfr-3.1.2.tar.xz 1074388 SHA256 399d0f47ef6608cc01d29ed1b99c7faff36d9994c45f36f41ba250147100453b SHA512 8d594206afb2637ed39ad564d42c8c4d02b042b95925f5c6ec891e5cb87f7155195559c7ff477256a088ecaaa3c2b0d35a9d11a74ed526a1080d49b2950e5587 WHIRLPOOL 1e391888d9cecc71617e99eb841cafac536e703b12d46a53fdcf773cc2654c98ca6bde2358f997c8b7bfd832bdb0c395b224df8a460a8fb5b4ad6f2c2e092b17
DIST mpfr-3.1.3.tar.xz 1112096 SHA256 6835a08bd992c8257641791e9a6a2b35b02336c8de26d0a8577953747e514a16 SHA512 79846fd82974269aa48152c2b6dbcb2321130dc4d0f0ba2eb94d56619b177add9b2077ebf88b4382c56db19c4215910e5a252f216715c1eee40baa299da42eb4 WHIRLPOOL fba9174551511ffa0fed80d906c5282c095697e79ab9b6fdeb915b9a81f15e20290b3ae6aa7c9ee9ef10fa9c0f973d8a75e1a169aae43f87a28ca433a93c57ce

@ -1,220 +0,0 @@
diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
--- mpfr-3.0.0-a/PATCHES 2010-06-23 11:02:49.000000000 +0000
+++ mpfr-3.0.0-b/PATCHES 2010-06-23 11:03:36.000000000 +0000
@@ -0,0 +1 @@
+mpfr_out_str
diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
--- mpfr-3.0.0-a/VERSION 2010-06-10 11:00:14.000000000 +0000
+++ mpfr-3.0.0-b/VERSION 2010-06-23 11:03:20.000000000 +0000
@@ -1 +1 @@
-3.0.0
+3.0.0-p1
diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
--- mpfr-3.0.0-a/mpfr.h 2010-06-10 11:00:14.000000000 +0000
+++ mpfr-3.0.0-b/mpfr.h 2010-06-23 11:03:20.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 0
#define MPFR_VERSION_PATCHLEVEL 0
-#define MPFR_VERSION_STRING "3.0.0"
+#define MPFR_VERSION_STRING "3.0.0-p1"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.0.0-a/mpfr.texi mpfr-3.0.0-b/mpfr.texi
--- mpfr-3.0.0-a/mpfr.texi 2010-06-10 11:00:14.000000000 +0000
+++ mpfr-3.0.0-b/mpfr.texi 2010-06-23 11:03:12.000000000 +0000
@@ -2050,7 +2050,7 @@
are printed. If @var{base} is greater than 10, @samp{@@} will be used
instead of @samp{e} as exponent delimiter.
-Return the number of bytes written, or if an error occurred, return 0.
+Return the number of characters written, or if an error occurred, return 0.
@end deftypefun
@deftypefun size_t mpfr_inp_str (mpfr_t @var{rop}, FILE *@var{stream}, int @var{base}, mpfr_rnd_t @var{rnd})
diff -Naurd mpfr-3.0.0-a/out_str.c mpfr-3.0.0-b/out_str.c
--- mpfr-3.0.0-a/out_str.c 2010-06-10 11:00:14.000000000 +0000
+++ mpfr-3.0.0-b/out_str.c 2010-06-23 11:03:12.000000000 +0000
@@ -22,6 +22,16 @@
#include "mpfr-impl.h"
+/* Warning! S should not contain "%". */
+#define OUT_STR_RET(S) \
+ do \
+ { \
+ int r; \
+ r = fprintf (stream, (S)); \
+ return r < 0 ? 0 : r; \
+ } \
+ while (0)
+
size_t
mpfr_out_str (FILE *stream, int base, size_t n_digits, mpfr_srcptr op,
mpfr_rnd_t rnd_mode)
@@ -29,6 +39,7 @@
char *s, *s0;
size_t l;
mpfr_exp_t e;
+ int err;
MPFR_ASSERTN (base >= 2 && base <= 62);
@@ -36,37 +47,16 @@
if (stream == NULL)
stream = stdout;
- if (MPFR_IS_NAN(op))
- {
- fprintf (stream, "@NaN@");
- return 3;
- }
-
- if (MPFR_IS_INF(op))
- {
- if (MPFR_SIGN(op) > 0)
- {
- fprintf (stream, "@Inf@");
- return 3;
- }
- else
- {
- fprintf (stream, "-@Inf@");
- return 4;
- }
- }
-
- if (MPFR_IS_ZERO(op))
+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (op)))
{
- if (MPFR_SIGN(op) > 0)
- {
- fprintf(stream, "0");
- return 1;
- }
+ if (MPFR_IS_NAN (op))
+ OUT_STR_RET ("@NaN@");
+ else if (MPFR_IS_INF (op))
+ OUT_STR_RET (MPFR_IS_POS (op) ? "@Inf@" : "-@Inf@");
else
{
- fprintf(stream, "-0");
- return 2;
+ MPFR_ASSERTD (MPFR_IS_ZERO (op));
+ OUT_STR_RET (MPFR_IS_POS (op) ? "0" : "-0");
}
}
@@ -77,21 +67,31 @@
l = strlen (s) + 1; /* size of allocated block returned by mpfr_get_str
- may be incorrect, as only an upper bound? */
- if (*s == '-')
- fputc (*s++, stream);
- /* outputs mantissa */
- fputc (*s++, stream); e--; /* leading digit */
- fputc ((unsigned char) MPFR_DECIMAL_POINT, stream);
- fputs (s, stream); /* rest of mantissa */
+ /* outputs possible sign and significand */
+ err = (*s == '-' && fputc (*s++, stream) == EOF)
+ || fputc (*s++, stream) == EOF /* leading digit */
+ || fputc ((unsigned char) MPFR_DECIMAL_POINT, stream) == EOF
+ || fputs (s, stream) == EOF; /* trailing significand */
(*__gmp_free_func) (s0, l);
+ if (MPFR_UNLIKELY (err))
+ return 0;
+
+ e--; /* due to the leading digit */
/* outputs exponent */
if (e)
{
+ int r;
+
MPFR_ASSERTN(e >= LONG_MIN);
MPFR_ASSERTN(e <= LONG_MAX);
- l += fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e);
+
+ r = fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e);
+ if (MPFR_UNLIKELY (r < 0))
+ return 0;
+
+ l += r;
}
return l;
diff -Naurd mpfr-3.0.0-a/tests/tout_str.c mpfr-3.0.0-b/tests/tout_str.c
--- mpfr-3.0.0-a/tests/tout_str.c 2010-06-10 11:00:13.000000000 +0000
+++ mpfr-3.0.0-b/tests/tout_str.c 2010-06-23 11:03:12.000000000 +0000
@@ -46,22 +46,54 @@
special (void)
{
mpfr_t x;
+ unsigned int n;
mpfr_init (x);
mpfr_set_nan (x);
- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
+ if (n != 5)
+ {
+ printf ("Error: mpfr_out_str (file, 10, 0, NaN, MPFR_RNDN) wrote %u "
+ "characters instead of 5.\n", n);
+ exit (1);
+ }
mpfr_set_inf (x, 1);
- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
+ if (n != 5)
+ {
+ printf ("Error: mpfr_out_str (file, 10, 0, +Inf, MPFR_RNDN) wrote %u "
+ "characters instead of 5.\n", n);
+ exit (1);
+ }
mpfr_set_inf (x, -1);
- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
+ if (n != 6)
+ {
+ printf ("Error: mpfr_out_str (file, 10, 0, -Inf, MPFR_RNDN) wrote %u "
+ "characters instead of 6.\n", n);
+ exit (1);
+ }
mpfr_set_ui (x, 0, MPFR_RNDN);
- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
+ if (n != 1)
+ {
+ printf ("Error: mpfr_out_str (file, 10, 0, +0, MPFR_RNDN) wrote %u "
+ "characters instead of 1.\n", n);
+ exit (1);
+ }
+
mpfr_neg (x, x, MPFR_RNDN);
- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
+ if (n != 2)
+ {
+ printf ("Error: mpfr_out_str (file, 10, 0, -0, MPFR_RNDN) wrote %u "
+ "characters instead of 2.\n", n);
+ exit (1);
+ }
mpfr_clear (x);
}
diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
--- mpfr-3.0.0-a/version.c 2010-06-10 11:00:14.000000000 +0000
+++ mpfr-3.0.0-b/version.c 2010-06-23 11:03:20.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.0.0";
+ return "3.0.0-p1";
}

@ -1,377 +0,0 @@
diff -Naurd mpfr-3.0.0-a/Makefile.in mpfr-3.0.0-b/Makefile.in
--- mpfr-3.0.0-a/Makefile.in 2010-06-10 11:00:52.000000000 +0000
+++ mpfr-3.0.0-b/Makefile.in 2010-06-10 11:00:52.000000000 +0000
@@ -239,6 +239,7 @@
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
--- mpfr-3.0.0-a/PATCHES 2010-06-23 11:03:36.000000000 +0000
+++ mpfr-3.0.0-b/PATCHES 2010-06-25 13:23:13.000000000 +0000
@@ -0,0 +1 @@
+alloca
diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
--- mpfr-3.0.0-a/VERSION 2010-06-23 11:03:20.000000000 +0000
+++ mpfr-3.0.0-b/VERSION 2010-06-25 13:23:13.000000000 +0000
@@ -1 +1 @@
-3.0.0-p1
+3.0.0-p2
diff -Naurd mpfr-3.0.0-a/acinclude.m4 mpfr-3.0.0-b/acinclude.m4
--- mpfr-3.0.0-a/acinclude.m4 2010-06-10 11:00:14.000000000 +0000
+++ mpfr-3.0.0-b/acinclude.m4 2010-06-10 11:00:14.000000000 +0000
@@ -59,6 +59,9 @@
dnl sys/fpu.h - MIPS specific
AC_CHECK_HEADERS([sys/time.h sys/fpu.h])
+dnl Check how to get `alloca'
+AC_FUNC_ALLOCA
+
dnl SIZE_MAX macro
gl_SIZE_MAX
diff -Naurd mpfr-3.0.0-a/configure mpfr-3.0.0-b/configure
--- mpfr-3.0.0-a/configure 2010-06-10 11:00:51.000000000 +0000
+++ mpfr-3.0.0-b/configure 2010-06-25 13:23:05.000000000 +0000
@@ -783,6 +783,7 @@
OBJDUMP
DLLTOOL
AS
+ALLOCA
MPFR_LIBM
ANSI2KNR
U
@@ -5622,6 +5623,197 @@
done
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_working_alloca_h=yes
+else
+ ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_alloca_works=yes
+else
+ ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then :
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_c_stack_direction=0
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+ return find_stack_direction () < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_stack_direction=1
+else
+ ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+
for ac_header in stdint.h
do :
@@ -7564,13 +7756,13 @@
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:7567: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:7759: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:7570: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:7762: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:7573: output\"" >&5)
+ (eval echo "\"\$as_me:7765: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -8772,7 +8964,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 8775 "configure"' > conftest.$ac_ext
+ echo '#line 8967 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -10032,11 +10224,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10035: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10227: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10039: \$? = $ac_status" >&5
+ echo "$as_me:10231: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -10371,11 +10563,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10374: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10566: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10378: \$? = $ac_status" >&5
+ echo "$as_me:10570: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -10476,11 +10668,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10479: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10671: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10483: \$? = $ac_status" >&5
+ echo "$as_me:10675: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10531,11 +10723,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10534: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10726: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10538: \$? = $ac_status" >&5
+ echo "$as_me:10730: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12915,7 +13107,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12918 "configure"
+#line 13110 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13011,7 +13203,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 13014 "configure"
+#line 13206 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
--- mpfr-3.0.0-a/mpfr.h 2010-06-23 11:03:20.000000000 +0000
+++ mpfr-3.0.0-b/mpfr.h 2010-06-25 13:23:13.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 0
#define MPFR_VERSION_PATCHLEVEL 0
-#define MPFR_VERSION_STRING "3.0.0-p1"
+#define MPFR_VERSION_STRING "3.0.0-p2"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.0.0-a/tests/Makefile.in mpfr-3.0.0-b/tests/Makefile.in
--- mpfr-3.0.0-a/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000
+++ mpfr-3.0.0-b/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000
@@ -960,6 +960,7 @@
red=; grn=; lgn=; blu=; std=
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
--- mpfr-3.0.0-a/version.c 2010-06-23 11:03:20.000000000 +0000
+++ mpfr-3.0.0-b/version.c 2010-06-25 13:23:13.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.0.0-p1";
+ return "3.0.0-p2";
}

@ -1,88 +0,0 @@
diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
--- mpfr-3.0.0-a/PATCHES 2010-07-10 00:11:19.000000000 +0000
+++ mpfr-3.0.0-b/PATCHES 2010-07-10 00:12:50.000000000 +0000
@@ -0,0 +1 @@
+gamma_underflow
diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
--- mpfr-3.0.0-a/VERSION 2010-06-25 13:23:13.000000000 +0000
+++ mpfr-3.0.0-b/VERSION 2010-07-10 00:11:53.000000000 +0000
@@ -1 +1 @@
-3.0.0-p2
+3.0.0-p3
diff -Naurd mpfr-3.0.0-a/gamma.c mpfr-3.0.0-b/gamma.c
--- mpfr-3.0.0-a/gamma.c 2010-06-10 11:00:14.000000000 +0000
+++ mpfr-3.0.0-b/gamma.c 2010-07-10 00:11:46.000000000 +0000
@@ -274,7 +274,7 @@
/* we want an upper bound for x * [log(2-x)-1].
since x < 0, we need a lower bound on log(2-x) */
mpfr_ui_sub (xp, 2, x, MPFR_RNDD);
- mpfr_log (xp, xp, MPFR_RNDD);
+ mpfr_log2 (xp, xp, MPFR_RNDD);
mpfr_sub_ui (xp, xp, 1, MPFR_RNDD);
mpfr_mul (xp, xp, x, MPFR_RNDU);
@@ -303,8 +303,8 @@
{
mpfr_sub (tmp, tmp, tmp2, MPFR_RNDZ); /* low bnd on |sin(Pi*(2-x))| */
mpfr_ui_div (tmp, 12, tmp, MPFR_RNDU); /* upper bound */
- mpfr_log (tmp, tmp, MPFR_RNDU);
- mpfr_add (tmp, tmp, xp, MPFR_RNDU);
+ mpfr_log2 (tmp, tmp, MPFR_RNDU);
+ mpfr_add (xp, tmp, xp, MPFR_RNDU);
underflow = mpfr_cmp_si (xp, expo.saved_emin - 2) <= 0;
}
diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
--- mpfr-3.0.0-a/mpfr.h 2010-06-25 13:23:13.000000000 +0000
+++ mpfr-3.0.0-b/mpfr.h 2010-07-10 00:11:53.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 0
#define MPFR_VERSION_PATCHLEVEL 0
-#define MPFR_VERSION_STRING "3.0.0-p2"
+#define MPFR_VERSION_STRING "3.0.0-p3"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.0.0-a/tests/tgamma.c mpfr-3.0.0-b/tests/tgamma.c
--- mpfr-3.0.0-a/tests/tgamma.c 2010-06-10 11:00:13.000000000 +0000
+++ mpfr-3.0.0-b/tests/tgamma.c 2010-07-10 00:11:46.000000000 +0000
@@ -461,6 +461,20 @@
mpfr_clear (x);
}
+/* bug found by Stathis, only occurs on 32-bit machines */
+static void
+test20100709 (void)
+{
+ mpfr_t x;
+ int inex;
+
+ mpfr_init2 (x, 100);
+ mpfr_set_str (x, "-4.6308260837372266e+07", 10, MPFR_RNDN);
+ inex = mpfr_gamma (x, x, MPFR_RNDN);
+ MPFR_ASSERTN(MPFR_IS_ZERO(x) && MPFR_IS_NEG(x) && inex > 0);
+ mpfr_clear (x);
+}
+
int
main (int argc, char *argv[])
{
@@ -471,6 +485,7 @@
test_generic (2, 100, 2);
gamma_integer ();
test20071231 ();
+ test20100709 ();
data_check ("data/gamma", mpfr_gamma, "mpfr_gamma");
diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
--- mpfr-3.0.0-a/version.c 2010-06-25 13:23:13.000000000 +0000
+++ mpfr-3.0.0-b/version.c 2010-07-10 00:11:53.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.0.0-p2";
+ return "3.0.0-p3";
}

@ -1,137 +0,0 @@
diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
--- mpfr-3.0.1-a/PATCHES 2011-04-12 10:50:02.000000000 +0000
+++ mpfr-3.0.1-b/PATCHES 2011-04-12 10:50:02.000000000 +0000
@@ -0,0 +1 @@
+asin_exprange
diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
--- mpfr-3.0.1-a/VERSION 2011-04-04 10:19:18.000000000 +0000
+++ mpfr-3.0.1-b/VERSION 2011-04-12 10:50:02.000000000 +0000
@@ -1 +1 @@
-3.0.1
+3.0.1-p1
diff -Naurd mpfr-3.0.1-a/asin.c mpfr-3.0.1-b/asin.c
--- mpfr-3.0.1-a/asin.c 2011-04-04 10:19:18.000000000 +0000
+++ mpfr-3.0.1-b/asin.c 2011-04-12 10:50:02.000000000 +0000
@@ -63,11 +63,14 @@
compared = mpfr_cmp_ui (xp, 1);
+ MPFR_SAVE_EXPO_MARK (expo);
+
if (MPFR_UNLIKELY (compared >= 0))
{
mpfr_clear (xp);
if (compared > 0) /* asin(x) = NaN for |x| > 1 */
{
+ MPFR_SAVE_EXPO_FREE (expo);
MPFR_SET_NAN (asin);
MPFR_RET_NAN;
}
@@ -80,13 +83,11 @@
inexact = -mpfr_const_pi (asin, MPFR_INVERT_RND(rnd_mode));
MPFR_CHANGE_SIGN (asin);
}
- mpfr_div_2ui (asin, asin, 1, rnd_mode); /* May underflow */
- return inexact;
+ mpfr_div_2ui (asin, asin, 1, rnd_mode);
}
}
-
- MPFR_SAVE_EXPO_MARK (expo);
-
+ else
+ {
/* Compute exponent of 1 - ABS(x) */
mpfr_ui_sub (xp, 1, xp, MPFR_RNDD);
MPFR_ASSERTD (MPFR_GET_EXP (xp) <= 0);
@@ -115,6 +116,7 @@
inexact = mpfr_set (asin, xp, rnd_mode);
mpfr_clear (xp);
+ }
MPFR_SAVE_EXPO_FREE (expo);
return mpfr_check_range (asin, inexact, rnd_mode);
diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
--- mpfr-3.0.1-a/mpfr.h 2011-04-04 10:19:18.000000000 +0000
+++ mpfr-3.0.1-b/mpfr.h 2011-04-12 10:50:02.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 0
#define MPFR_VERSION_PATCHLEVEL 1
-#define MPFR_VERSION_STRING "3.0.1"
+#define MPFR_VERSION_STRING "3.0.1-p1"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.0.1-a/tests/tasin.c mpfr-3.0.1-b/tests/tasin.c
--- mpfr-3.0.1-a/tests/tasin.c 2011-04-04 10:19:17.000000000 +0000
+++ mpfr-3.0.1-b/tests/tasin.c 2011-04-12 10:50:02.000000000 +0000
@@ -219,6 +219,49 @@
mpfr_clear (y);
}
+static void
+reduced_expo_range (void)
+{
+ mpfr_exp_t emin, emax;
+ mpfr_t x, y, ex_y;
+ int inex, ex_inex;
+ unsigned int flags, ex_flags;
+
+ emin = mpfr_get_emin ();
+ emax = mpfr_get_emax ();
+
+ mpfr_inits2 (4, x, y, ex_y, (mpfr_ptr) 0);
+ mpfr_set_str (x, "-0.1e1", 2, MPFR_RNDN);
+
+ mpfr_set_emin (1);
+ mpfr_set_emax (1);
+ mpfr_clear_flags ();
+ inex = mpfr_asin (y, x, MPFR_RNDA);
+ flags = __gmpfr_flags;
+ mpfr_set_emin (emin);
+ mpfr_set_emax (emax);
+
+ mpfr_set_str (ex_y, "-0.1101e1", 2, MPFR_RNDN);
+ ex_inex = -1;
+ ex_flags = MPFR_FLAGS_INEXACT;
+
+ if (SIGN (inex) != ex_inex || flags != ex_flags ||
+ ! mpfr_equal_p (y, ex_y))
+ {
+ printf ("Error in reduced_expo_range\non x = ");
+ mpfr_dump (x);
+ printf ("Expected y = ");
+ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN);
+ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags);
+ printf ("Got y = ");
+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
+ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags);
+ exit (1);
+ }
+
+ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0);
+}
+
int
main (void)
{
@@ -226,6 +269,7 @@
special ();
special_overflow ();
+ reduced_expo_range ();
test_generic (2, 100, 15);
diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
--- mpfr-3.0.1-a/version.c 2011-04-04 10:19:18.000000000 +0000
+++ mpfr-3.0.1-b/version.c 2011-04-12 10:50:02.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.0.1";
+ return "3.0.1-p1";
}

@ -1,76 +0,0 @@
diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
--- mpfr-3.0.1-a/PATCHES 2011-05-04 11:18:33.000000000 +0000
+++ mpfr-3.0.1-b/PATCHES 2011-05-04 11:18:33.000000000 +0000
@@ -0,0 +1 @@
+rec_sqrt-carry
diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
--- mpfr-3.0.1-a/VERSION 2011-04-12 10:50:02.000000000 +0000
+++ mpfr-3.0.1-b/VERSION 2011-05-04 11:18:33.000000000 +0000
@@ -1 +1 @@
-3.0.1-p1
+3.0.1-p2
diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
--- mpfr-3.0.1-a/mpfr.h 2011-04-12 10:50:02.000000000 +0000
+++ mpfr-3.0.1-b/mpfr.h 2011-05-04 11:18:33.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 0
#define MPFR_VERSION_PATCHLEVEL 1
-#define MPFR_VERSION_STRING "3.0.1-p1"
+#define MPFR_VERSION_STRING "3.0.1-p2"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.0.1-a/rec_sqrt.c mpfr-3.0.1-b/rec_sqrt.c
--- mpfr-3.0.1-a/rec_sqrt.c 2011-04-04 10:19:18.000000000 +0000
+++ mpfr-3.0.1-b/rec_sqrt.c 2011-05-04 11:18:33.000000000 +0000
@@ -375,20 +375,37 @@
MPFR_ASSERTD(un == ln + 1 || un == ln + 2);
/* the high un-ln limbs of u will overlap the low part of {x+ln,xn},
we need to add or subtract the overlapping part {u + ln, un - ln} */
+ /* Warning! th may be 0, in which case the mpn_add_1 and mpn_sub_1
+ below (with size = th) mustn't be used. In such a case, the limb
+ (carry) will be 0, so that this is semantically a no-op, but if
+ mpn_add_1 and mpn_sub_1 are used, GMP (currently) still does a
+ non-atomic read/write in a place that is not always allocated,
+ with the possible consequences: a crash if the corresponding
+ address is not mapped, or (rather unlikely) memory corruption
+ if another process/thread writes at the same place; things may
+ be worse with future GMP versions. Hence the tests carry != 0. */
if (neg == 0)
{
if (ln > 0)
MPN_COPY (x, u, ln);
cy = mpn_add (x + ln, x + ln, xn, u + ln, un - ln);
/* add cu at x+un */
- cy += mpn_add_1 (x + un, x + un, th, cu);
+ if (cu != 0)
+ {
+ MPFR_ASSERTD (th != 0);
+ cy += mpn_add_1 (x + un, x + un, th, cu);
+ }
}
else /* negative case */
{
/* subtract {u+ln, un-ln} from {x+ln,un} */
cy = mpn_sub (x + ln, x + ln, xn, u + ln, un - ln);
/* carry cy is at x+un, like cu */
- cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */
+ if (cy + cu != 0)
+ {
+ MPFR_ASSERTD (th != 0);
+ cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */
+ }
/* cy cannot be zero, since the most significant bit of Xh is 1,
and the correction is bounded by 2^{-h+3} */
MPFR_ASSERTD(cy == 0);
diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
--- mpfr-3.0.1-a/version.c 2011-04-12 10:50:02.000000000 +0000
+++ mpfr-3.0.1-b/version.c 2011-05-04 11:18:33.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.0.1-p1";
+ return "3.0.1-p2";
}

@ -1,107 +0,0 @@
diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
--- mpfr-3.0.1-a/PATCHES 2011-05-05 00:00:35.000000000 +0000
+++ mpfr-3.0.1-b/PATCHES 2011-05-05 00:00:35.000000000 +0000
@@ -0,0 +1 @@
+atan-expo-range
diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
--- mpfr-3.0.1-a/VERSION 2011-05-04 11:18:33.000000000 +0000
+++ mpfr-3.0.1-b/VERSION 2011-05-05 00:00:35.000000000 +0000
@@ -1 +1 @@
-3.0.1-p2
+3.0.1-p3
diff -Naurd mpfr-3.0.1-a/atan.c mpfr-3.0.1-b/atan.c
--- mpfr-3.0.1-a/atan.c 2011-04-04 10:19:18.000000000 +0000
+++ mpfr-3.0.1-b/atan.c 2011-05-05 00:00:35.000000000 +0000
@@ -431,5 +431,5 @@
MPFR_GROUP_CLEAR (group);
MPFR_SAVE_EXPO_FREE (expo);
- return mpfr_check_range (arctgt, inexact, rnd_mode);
+ return mpfr_check_range (atan, inexact, rnd_mode);
}
diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
--- mpfr-3.0.1-a/mpfr.h 2011-05-04 11:18:33.000000000 +0000
+++ mpfr-3.0.1-b/mpfr.h 2011-05-05 00:00:35.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 0
#define MPFR_VERSION_PATCHLEVEL 1
-#define MPFR_VERSION_STRING "3.0.1-p2"
+#define MPFR_VERSION_STRING "3.0.1-p3"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.0.1-a/tests/tatan.c mpfr-3.0.1-b/tests/tatan.c
--- mpfr-3.0.1-a/tests/tatan.c 2011-04-04 10:19:17.000000000 +0000
+++ mpfr-3.0.1-b/tests/tatan.c 2011-05-05 00:00:35.000000000 +0000
@@ -535,6 +535,52 @@
mpfr_clears (a, x, y, (mpfr_ptr) 0);
}
+/* http://websympa.loria.fr/wwsympa/arc/mpfr/2011-05/msg00008.html
+ * Incorrect flags (in debug mode on a 32-bit machine, assertion failure).
+ */
+static void
+reduced_expo_range (void)
+{
+ mpfr_exp_t emin, emax;
+ mpfr_t x, y, ex_y;
+ int inex, ex_inex;
+ unsigned int flags, ex_flags;
+
+ emin = mpfr_get_emin ();
+ emax = mpfr_get_emax ();
+
+ mpfr_inits2 (12, x, y, ex_y, (mpfr_ptr) 0);
+ mpfr_set_str (x, "0.1e-5", 2, MPFR_RNDN);
+
+ mpfr_set_emin (-5);
+ mpfr_set_emax (-5);
+ mpfr_clear_flags ();
+ inex = mpfr_atan (y, x, MPFR_RNDN);
+ flags = __gmpfr_flags;
+ mpfr_set_emin (emin);
+ mpfr_set_emax (emax);
+
+ mpfr_set_str (ex_y, "0.1e-5", 2, MPFR_RNDN);
+ ex_inex = 1;
+ ex_flags = MPFR_FLAGS_INEXACT;
+
+ if (SIGN (inex) != ex_inex || flags != ex_flags ||
+ ! mpfr_equal_p (y, ex_y))
+ {
+ printf ("Error in reduced_expo_range\non x = ");
+ mpfr_dump (x);
+ printf ("Expected y = ");
+ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN);
+ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags);
+ printf ("Got y = ");
+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
+ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags);
+ exit (1);
+ }
+
+ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0);
+}
+
int
main (int argc, char *argv[])
{
@@ -546,6 +592,7 @@
smallvals_atan2 ();
atan2_bug_20071003 ();
atan2_different_prec ();
+ reduced_expo_range ();
test_generic_atan (2, 200, 17);
test_generic_atan2 (2, 200, 17);
diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
--- mpfr-3.0.1-a/version.c 2011-05-04 11:18:33.000000000 +0000
+++ mpfr-3.0.1-b/version.c 2011-05-05 00:00:35.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.0.1-p2";
+ return "3.0.1-p3";
}

@ -1,47 +0,0 @@
diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
--- mpfr-3.0.1-a/PATCHES 2011-05-09 14:48:24.000000000 +0000
+++ mpfr-3.0.1-b/PATCHES 2011-05-09 14:48:24.000000000 +0000
@@ -0,0 +1 @@
+texp-zero
diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
--- mpfr-3.0.1-a/VERSION 2011-05-05 00:00:35.000000000 +0000
+++ mpfr-3.0.1-b/VERSION 2011-05-09 14:48:24.000000000 +0000
@@ -1 +1 @@
-3.0.1-p3
+3.0.1-p4
diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
--- mpfr-3.0.1-a/mpfr.h 2011-05-05 00:00:35.000000000 +0000
+++ mpfr-3.0.1-b/mpfr.h 2011-05-09 14:48:24.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 0
#define MPFR_VERSION_PATCHLEVEL 1
-#define MPFR_VERSION_STRING "3.0.1-p3"
+#define MPFR_VERSION_STRING "3.0.1-p4"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.0.1-a/tests/texp.c mpfr-3.0.1-b/tests/texp.c
--- mpfr-3.0.1-a/tests/texp.c 2011-04-04 10:19:17.000000000 +0000
+++ mpfr-3.0.1-b/tests/texp.c 2011-05-09 14:48:24.000000000 +0000
@@ -170,7 +170,9 @@
mpfr_set_prec (x, prec);
mpfr_set_prec (y, prec);
mpfr_set_prec (z, prec);
- mpfr_urandomb (x, RANDS);
+ do
+ mpfr_urandomb (x, RANDS);
+ while (MPFR_IS_ZERO (x)); /* 0 is handled by mpfr_exp only */
rnd = RND_RAND ();
mpfr_exp_2 (y, x, rnd);
mpfr_exp_3 (z, x, rnd);
diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
--- mpfr-3.0.1-a/version.c 2011-05-05 00:00:35.000000000 +0000
+++ mpfr-3.0.1-b/version.c 2011-05-09 14:48:24.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.0.1-p3";
+ return "3.0.1-p4";
}

@ -1,50 +0,0 @@
diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
--- mpfr-3.1.0-a/PATCHES 2011-10-05 21:39:57.000000000 +0000
+++ mpfr-3.1.0-b/PATCHES 2011-10-05 21:39:57.000000000 +0000
@@ -0,0 +1 @@
+mpfr_unlikely
diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
--- mpfr-3.1.0-a/VERSION 2011-10-03 08:17:15.000000000 +0000
+++ mpfr-3.1.0-b/VERSION 2011-10-05 21:39:57.000000000 +0000
@@ -1 +1 @@
-3.1.0
+3.1.0-p1
diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h
--- mpfr-3.1.0-a/src/mpfr-impl.h 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/mpfr-impl.h 2011-10-05 21:39:57.000000000 +0000
@@ -988,10 +988,11 @@
******************************************************/
/* Theses macros help the compiler to determine if a test is
- * likely or unlikely. */
+ likely or unlikely. The !! is necessary in case x is larger
+ than a long. */
#if __MPFR_GNUC(3,0) || __MPFR_ICC(8,1,0)
# define MPFR_LIKELY(x) (__builtin_expect(!!(x),1))
-# define MPFR_UNLIKELY(x) (__builtin_expect((x),0))
+# define MPFR_UNLIKELY(x) (__builtin_expect(!!(x),0))
#else
# define MPFR_LIKELY(x) (x)
# define MPFR_UNLIKELY(x) (x)
diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
--- mpfr-3.1.0-a/src/mpfr.h 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/mpfr.h 2011-10-05 21:39:57.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 1
#define MPFR_VERSION_PATCHLEVEL 0
-#define MPFR_VERSION_STRING "3.1.0"
+#define MPFR_VERSION_STRING "3.1.0-p1"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
--- mpfr-3.1.0-a/src/version.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/version.c 2011-10-05 21:39:57.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.1.0";
+ return "3.1.0-p1";
}

@ -1,96 +0,0 @@
diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
--- mpfr-3.1.0-a/PATCHES 2011-10-14 10:43:32.000000000 +0000
+++ mpfr-3.1.0-b/PATCHES 2011-10-14 10:43:32.000000000 +0000
@@ -0,0 +1 @@
+lib-search-path
diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
--- mpfr-3.1.0-a/VERSION 2011-10-05 21:39:57.000000000 +0000
+++ mpfr-3.1.0-b/VERSION 2011-10-14 10:43:32.000000000 +0000
@@ -1 +1 @@
-3.1.0-p1
+3.1.0-p2
diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
--- mpfr-3.1.0-a/src/mpfr.h 2011-10-05 21:39:57.000000000 +0000
+++ mpfr-3.1.0-b/src/mpfr.h 2011-10-14 10:43:32.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 1
#define MPFR_VERSION_PATCHLEVEL 0
-#define MPFR_VERSION_STRING "3.1.0-p1"
+#define MPFR_VERSION_STRING "3.1.0-p2"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
--- mpfr-3.1.0-a/src/version.c 2011-10-05 21:39:57.000000000 +0000
+++ mpfr-3.1.0-b/src/version.c 2011-10-14 10:43:32.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.1.0-p1";
+ return "3.1.0-p2";
}
diff -Naurd mpfr-3.1.0-a/tests/Makefile.am mpfr-3.1.0-b/tests/Makefile.am
--- mpfr-3.1.0-a/tests/Makefile.am 2011-10-03 08:17:14.000000000 +0000
+++ mpfr-3.1.0-b/tests/Makefile.am 2011-10-03 08:17:14.000000000 +0000
@@ -65,8 +65,24 @@
TESTS = $(check_PROGRAMS)
TESTS_ENVIRONMENT = MPFR_QUIET=1 $(VALGRIND)
-# Option to prevent libtool from generating wrapper scripts for the tests.
+# The -no-install option prevents libtool from generating wrapper scripts
+# for the tests.
# This is useful to easily run the test scripts under valgrind or gdb.
# See discussion http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28033
# http://article.gmane.org/gmane.comp.lib.gnulib.bugs/28140 in particular.
-AM_LDFLAGS = -no-install
+#
+# The -L$(top_builddir)/src/.libs option is necessary for some platforms,
+# such as HP-UX, when --with-gmp or --with-gmp-lib is used and an old MPFR
+# library is already installed in the corresponding lib directory: its
+# purpose is to make sure that the local .libs comes first in the library
+# search path (otherwise the tests are linked against the old MPFR library
+# by the LINK command -- see the generated Makefile). See:
+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00042.html
+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00043.html
+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00044.html
+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00066.html
+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00065.html
+# and
+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9728
+#
+AM_LDFLAGS = -no-install -L$(top_builddir)/src/.libs
diff -Naurd mpfr-3.1.0-a/tests/Makefile.in mpfr-3.1.0-b/tests/Makefile.in
--- mpfr-3.1.0-a/tests/Makefile.in 2011-10-03 08:17:35.000000000 +0000
+++ mpfr-3.1.0-b/tests/Makefile.in 2011-10-03 08:17:35.000000000 +0000
@@ -1124,11 +1124,27 @@
TESTS = $(check_PROGRAMS)
TESTS_ENVIRONMENT = MPFR_QUIET=1 $(VALGRIND)
-# Option to prevent libtool from generating wrapper scripts for the tests.
+# The -no-install option prevents libtool from generating wrapper scripts
+# for the tests.
# This is useful to easily run the test scripts under valgrind or gdb.
# See discussion http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28033
# http://article.gmane.org/gmane.comp.lib.gnulib.bugs/28140 in particular.
-AM_LDFLAGS = -no-install
+#
+# The -L$(top_builddir)/src/.libs option is necessary for some platforms,
+# such as HP-UX, when --with-gmp or --with-gmp-lib is used and an old MPFR
+# library is already installed in the corresponding lib directory: its
+# purpose is to make sure that the local .libs comes first in the library
+# search path (otherwise the tests are linked against the old MPFR library
+# by the LINK command -- see the generated Makefile). See:
+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00042.html
+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00043.html
+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00044.html
+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00066.html
+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00065.html
+# and
+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9728
+#
+AM_LDFLAGS = -no-install -L$(top_builddir)/src/.libs
all: all-am
.SUFFIXES:

@ -1,247 +0,0 @@
diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
--- mpfr-3.1.0-a/PATCHES 2011-11-03 15:15:11.000000000 +0000
+++ mpfr-3.1.0-b/PATCHES 2011-11-03 15:15:11.000000000 +0000
@@ -0,0 +1 @@
+vasprintf
diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
--- mpfr-3.1.0-a/VERSION 2011-10-14 10:43:32.000000000 +0000
+++ mpfr-3.1.0-b/VERSION 2011-11-03 15:15:11.000000000 +0000
@@ -1 +1 @@
-3.1.0-p2
+3.1.0-p3
diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
--- mpfr-3.1.0-a/src/mpfr.h 2011-10-14 10:43:32.000000000 +0000
+++ mpfr-3.1.0-b/src/mpfr.h 2011-11-03 15:15:11.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 1
#define MPFR_VERSION_PATCHLEVEL 0
-#define MPFR_VERSION_STRING "3.1.0-p2"
+#define MPFR_VERSION_STRING "3.1.0-p3"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.1.0-a/src/vasprintf.c mpfr-3.1.0-b/src/vasprintf.c
--- mpfr-3.1.0-a/src/vasprintf.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/vasprintf.c 2011-11-03 15:15:11.000000000 +0000
@@ -1178,7 +1178,7 @@
mpfr_exp_t exp;
char * str;
const int spec_g = (spec.spec == 'g' || spec.spec == 'G');
- const int keep_trailing_zeros = spec_g && spec.alt;
+ const int keep_trailing_zeros = !spec_g || spec.alt;
/* WARNING: an empty precision field is forbidden (it means precision = 6
and it should have been changed to 6 before the function call) */
@@ -1356,7 +1356,7 @@
else
/* 1 <= |p| */
{
- size_t nsd; /* Number of significant digits */
+ size_t str_len;
/* Determine the position of the most significant decimal digit. */
exp = floor_log10 (p);
@@ -1365,12 +1365,10 @@
/* P is too large to print all its integral part digits */
return -1;
- np->ip_size = exp + 1;
-
- nsd = spec.prec + np->ip_size;
if (dec_info == NULL)
- {
- str = mpfr_get_str (NULL, &exp, 10, nsd, p, spec.rnd_mode);
+ { /* this case occurs with mpfr_printf ("%.0RUf", x) with x=9.5 */
+ str =
+ mpfr_get_str (NULL, &exp, 10, spec.prec+exp+1, p, spec.rnd_mode);
register_string (np->sl, str);
}
else
@@ -1379,81 +1377,60 @@
str = dec_info->str;
}
np->ip_ptr = MPFR_IS_NEG (p) ? ++str : str; /* skip sign */
+ str_len = strlen (str);
+
+ /* integral part */
+ if (exp > str_len)
+ /* mpfr_get_str gives no trailing zero when p is rounded up to the next
+ power of 10 (p integer, so no fractional part) */
+ {
+ np->ip_trailing_zeros = exp - str_len;
+ np->ip_size = str_len;
+ }
+ else
+ np->ip_size = exp;
if (spec.group)
/* thousands separator in integral part */
np->thousands_sep = MPFR_THOUSANDS_SEPARATOR;
- if (nsd == 0 || (spec_g && !spec.alt))
- /* compute how much non-zero digits in integral and fractional
- parts */
+ /* fractional part */
+ str += np->ip_size;
+ str_len -= np->ip_size;
+ if (!keep_trailing_zeros)
+ /* remove trailing zeros, if any */
{
- size_t str_len;
- str_len = strlen (str); /* note: the sign has been skipped */
-
- if (exp > str_len)
- /* mpfr_get_str doesn't give the trailing zeros when p is a
- multiple of 10 (p integer, so no fractional part) */
- {
- np->ip_trailing_zeros = exp - str_len;
- np->ip_size = str_len;
- if (spec.alt)
- np->point = MPFR_DECIMAL_POINT;
- }
- else
- /* str may contain some digits which are in fractional part */
+ char *ptr = str + str_len - 1; /* pointer to the last digit of
+ str */
+ while ((*ptr == '0') && (str_len != 0))
{
- char *ptr;
-
- ptr = str + str_len - 1; /* points to the end of str */
- str_len -= np->ip_size; /* number of digits in fractional
- part */
-
- if (!keep_trailing_zeros)
- /* remove trailing zeros, if any */
- {
- while ((*ptr == '0') && (str_len != 0))
- {
- --ptr;
- --str_len;
- }
- }
-
- if (str_len > INT_MAX)
- /* too many digits in fractional part */
- return -1;
-
- if (str_len != 0)
- /* some digits in fractional part */
- {
- np->point = MPFR_DECIMAL_POINT;
- np->fp_ptr = str + np->ip_size;
- np->fp_size = str_len;
- }
+ --ptr;
+ --str_len;
}
}
- else
- /* spec.prec digits in fractional part */
+
+ if (str_len > 0)
+ /* some nonzero digits in fractional part */
{
- if (np->ip_size == exp - 1)
- /* the absolute value of the number has been rounded up to a power
- of ten.
- Insert an additional zero in integral part and put the rest of
- them in fractional part. */
- np->ip_trailing_zeros = 1;
+ if (str_len > INT_MAX)
+ /* too many digits in fractional part */
+ return -1;
- if (spec.prec != 0)
- {
- MPFR_ASSERTD (np->ip_size + np->ip_trailing_zeros == exp);
- MPFR_ASSERTD (np->ip_size + spec.prec == nsd);
+ np->point = MPFR_DECIMAL_POINT;
+ np->fp_ptr = str;
+ np->fp_size = str_len;
+ }
- np->point = MPFR_DECIMAL_POINT;
- np->fp_ptr = str + np->ip_size;
- np->fp_size = spec.prec;
- }
- else if (spec.alt)
- np->point = MPFR_DECIMAL_POINT;
+ if (keep_trailing_zeros && str_len < spec.prec)
+ /* add missing trailing zeros */
+ {
+ np->point = MPFR_DECIMAL_POINT;
+ np->fp_trailing_zeros = spec.prec - np->fp_size;
}
+
+ if (spec.alt)
+ /* add decimal point even if no digits follow it */
+ np->point = MPFR_DECIMAL_POINT;
}
return 0;
diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
--- mpfr-3.1.0-a/src/version.c 2011-10-14 10:43:32.000000000 +0000
+++ mpfr-3.1.0-b/src/version.c 2011-11-03 15:15:11.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.1.0-p2";
+ return "3.1.0-p3";
}
diff -Naurd mpfr-3.1.0-a/tests/tsprintf.c mpfr-3.1.0-b/tests/tsprintf.c
--- mpfr-3.1.0-a/tests/tsprintf.c 2011-10-03 08:17:14.000000000 +0000
+++ mpfr-3.1.0-b/tests/tsprintf.c 2011-11-03 15:15:11.000000000 +0000
@@ -475,6 +475,18 @@
check_sprintf ("-1.", "%- #0.1RG", x);
/* precision zero */
+ mpfr_set_d (x, 9.5, MPFR_RNDN);
+ check_sprintf ("9", "%.0RDf", x);
+ check_sprintf ("10", "%.0RUf", x);
+
+ mpfr_set_d (x, 19.5, MPFR_RNDN);
+ check_sprintf ("19", "%.0RDf", x);
+ check_sprintf ("20", "%.0RUf", x);
+
+ mpfr_set_d (x, 99.5, MPFR_RNDN);
+ check_sprintf ("99", "%.0RDf", x);
+ check_sprintf ("100", "%.0RUf", x);
+
mpfr_set_d (x, -9.5, MPFR_RNDN);
check_sprintf ("-10", "%.0RDf", x);
check_sprintf ("-10", "%.0RYf", x);
@@ -1078,6 +1090,23 @@
mpfr_clear (x);
}
+static void
+bug20111102 (void)
+{
+ mpfr_t t;
+ char s[100];
+
+ mpfr_init2 (t, 84);
+ mpfr_set_str (t, "999.99999999999999999999", 10, MPFR_RNDN);
+ mpfr_sprintf (s, "%.20RNg", t);
+ if (strcmp (s, "1000") != 0)
+ {
+ printf ("Error in bug20111102, expected 1000, got %s\n", s);
+ exit (1);
+ }
+ mpfr_clear (t);
+}
+
/* In particular, the following test makes sure that the rounding
* for %Ra and %Rb is not done on the MPFR number itself (as it
* would overflow). Note: it has been reported on comp.std.c that
@@ -1161,6 +1190,7 @@
locale = setlocale (LC_ALL, "C");
#endif
+ bug20111102 ();
native_types ();
hexadecimal ();
binary ();

@ -1,166 +0,0 @@
diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
--- mpfr-3.1.0-a/PATCHES 2011-11-28 12:22:52.000000000 +0000
+++ mpfr-3.1.0-b/PATCHES 2011-11-28 12:22:52.000000000 +0000
@@ -0,0 +1 @@
+gmp41compat
diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
--- mpfr-3.1.0-a/VERSION 2011-11-03 15:15:11.000000000 +0000
+++ mpfr-3.1.0-b/VERSION 2011-11-28 12:22:52.000000000 +0000
@@ -1 +1 @@
-3.1.0-p3
+3.1.0-p4
diff -Naurd mpfr-3.1.0-a/doc/mpfr.info mpfr-3.1.0-b/doc/mpfr.info
--- mpfr-3.1.0-a/doc/mpfr.info 2011-10-03 09:43:04.000000000 +0000
+++ mpfr-3.1.0-b/doc/mpfr.info 2011-11-28 12:22:52.000000000 +0000
@@ -2994,11 +2994,12 @@
* `mpfr_urandom' and `mpfr_urandomb' changed in MPFR 3.1. Their
behavior no longer depends on the platform (assuming this is also
- true for GMP's random generator). As a consequence, the returned
- values can be different between MPFR 3.1 and previous MPFR
- versions. Note: as the reproducibility of these functions was not
- specified before MPFR 3.1, the MPFR 3.1 behavior is _not_ regarded
- as backward incompatible with previous versions.
+ true for GMP's random generator, which is not the case between GMP
+ 4.1 and 4.2 if `gmp_randinit_default' is used). As a consequence,
+ the returned values can be different between MPFR 3.1 and previous
+ MPFR versions. Note: as the reproducibility of these functions
+ was not specified before MPFR 3.1, the MPFR 3.1 behavior is _not_
+ regarded as backward incompatible with previous versions.

@@ -4239,13 +4240,13 @@
Node: Type and Macro Changes129308
Node: Added Functions132029
Node: Changed Functions134972
-Node: Removed Functions139167
-Node: Other Changes139579
-Node: Contributors141108
-Node: References143574
-Node: GNU Free Documentation License145315
-Node: Concept Index167758
-Node: Function and Type Index173677
+Node: Removed Functions139253
+Node: Other Changes139665
+Node: Contributors141194
+Node: References143660
+Node: GNU Free Documentation License145401
+Node: Concept Index167844
+Node: Function and Type Index173763

End Tag Table
diff -Naurd mpfr-3.1.0-a/doc/mpfr.texi mpfr-3.1.0-b/doc/mpfr.texi
--- mpfr-3.1.0-a/doc/mpfr.texi 2011-10-03 08:17:14.000000000 +0000
+++ mpfr-3.1.0-b/doc/mpfr.texi 2011-11-28 12:22:52.000000000 +0000
@@ -3466,8 +3466,9 @@
a lack of specification.
@item @code{mpfr_urandom} and @code{mpfr_urandomb} changed in MPFR 3.1.
-Their behavior no longer depends on the platform (assuming this is also
-true for GMP's random generator). As a consequence, the returned values
+Their behavior no longer depends on the platform (assuming this is also true
+for GMP's random generator, which is not the case between GMP 4.1 and 4.2 if
+@code{gmp_randinit_default} is used). As a consequence, the returned values
can be different between MPFR 3.1 and previous MPFR versions.
Note: as the reproducibility of these functions was not specified
before MPFR 3.1, the MPFR 3.1 behavior is @emph{not} regarded as
diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
--- mpfr-3.1.0-a/src/mpfr.h 2011-11-03 15:15:11.000000000 +0000
+++ mpfr-3.1.0-b/src/mpfr.h 2011-11-28 12:22:52.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 1
#define MPFR_VERSION_PATCHLEVEL 0
-#define MPFR_VERSION_STRING "3.1.0-p3"
+#define MPFR_VERSION_STRING "3.1.0-p4"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
--- mpfr-3.1.0-a/src/version.c 2011-11-03 15:15:11.000000000 +0000
+++ mpfr-3.1.0-b/src/version.c 2011-11-28 12:22:52.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.1.0-p3";
+ return "3.1.0-p4";
}
diff -Naurd mpfr-3.1.0-a/tests/trandom.c mpfr-3.1.0-b/tests/trandom.c
--- mpfr-3.1.0-a/tests/trandom.c 2011-10-03 08:17:14.000000000 +0000
+++ mpfr-3.1.0-b/tests/trandom.c 2011-11-28 12:22:52.000000000 +0000
@@ -114,21 +114,29 @@
mpfr_t x;
gmp_randstate_t s;
+#if __MPFR_GMP(4,2,0)
+# define C1 "0.895943"
+# define C2 "0.848824"
+#else
+# define C1 "0.479652"
+# define C2 "0.648529"
+#endif
+
gmp_randinit_default (s);
gmp_randseed_ui (s, 42);
mpfr_init2 (x, 17);
mpfr_urandomb (x, s);
- if (mpfr_cmp_str1 (x, "0.895943") != 0)
+ if (mpfr_cmp_str1 (x, C1) != 0)
{
- printf ("Error in bug20100914, expected 0.895943, got ");
+ printf ("Error in bug20100914, expected " C1 ", got ");
mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
printf ("\n");
exit (1);
}
mpfr_urandomb (x, s);
- if (mpfr_cmp_str1 (x, "0.848824") != 0)
+ if (mpfr_cmp_str1 (x, C2) != 0)
{
- printf ("Error in bug20100914, expected 0.848824, got ");
+ printf ("Error in bug20100914, expected " C2 ", got ");
mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
printf ("\n");
exit (1);
diff -Naurd mpfr-3.1.0-a/tests/turandom.c mpfr-3.1.0-b/tests/turandom.c
--- mpfr-3.1.0-a/tests/turandom.c 2011-10-03 08:17:14.000000000 +0000
+++ mpfr-3.1.0-b/tests/turandom.c 2011-11-28 12:22:52.000000000 +0000
@@ -160,23 +160,29 @@
mpfr_t x;
gmp_randstate_t s;
+#if __MPFR_GMP(4,2,0)
+# define C1 "0.8488312"
+# define C2 "0.8156509"
+#else
+# define C1 "0.6485367"
+# define C2 "0.9362717"
+#endif
+
gmp_randinit_default (s);
gmp_randseed_ui (s, 42);
mpfr_init2 (x, 17);
mpfr_urandom (x, s, MPFR_RNDN);
- /* the following values are obtained on a 32-bit computer, we should get
- the same values on a 64-bit computer */
- if (mpfr_cmp_str1 (x, "0.8488312") != 0)
+ if (mpfr_cmp_str1 (x, C1) != 0)
{
- printf ("Error in bug20100914, expected 0.8488312, got ");
+ printf ("Error in bug20100914, expected " C1 ", got ");
mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
printf ("\n");
exit (1);
}
mpfr_urandom (x, s, MPFR_RNDN);
- if (mpfr_cmp_str1 (x, "0.8156509") != 0)
+ if (mpfr_cmp_str1 (x, C2) != 0)
{
- printf ("Error in bug20100914, expected 0.8156509, got ");
+ printf ("Error in bug20100914, expected " C2 ", got ");
mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
printf ("\n");
exit (1);

@ -1,69 +0,0 @@
diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
--- mpfr-3.1.0-a/PATCHES 2012-02-24 12:44:49.000000000 +0000
+++ mpfr-3.1.0-b/PATCHES 2012-02-24 12:44:49.000000000 +0000
@@ -0,0 +1 @@
+logging-freeze
diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
--- mpfr-3.1.0-a/VERSION 2011-11-28 12:22:52.000000000 +0000
+++ mpfr-3.1.0-b/VERSION 2012-02-24 12:44:49.000000000 +0000
@@ -1 +1 @@
-3.1.0-p4
+3.1.0-p5
diff -Naurd mpfr-3.1.0-a/src/add_d.c mpfr-3.1.0-b/src/add_d.c
--- mpfr-3.1.0-a/src/add_d.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/add_d.c 2012-02-24 12:44:49.000000000 +0000
@@ -34,7 +34,7 @@
(("b[%Pu]=%.*Rg c=%.20g rnd=%d",
mpfr_get_prec(b), mpfr_log_prec, b, c, rnd_mode),
("a[%Pu]=%.*Rg inexact=%d",
- mpfr_get_prec (a), mpfr_get_prec, a, inexact));
+ mpfr_get_prec (a), mpfr_log_prec, a, inexact));
MPFR_SAVE_EXPO_MARK (expo);
diff -Naurd mpfr-3.1.0-a/src/add_ui.c mpfr-3.1.0-b/src/add_ui.c
--- mpfr-3.1.0-a/src/add_ui.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/add_ui.c 2012-02-24 12:44:49.000000000 +0000
@@ -29,7 +29,7 @@
MPFR_LOG_FUNC
(("x[%Pu]=%.*Rg u=%d rnd=%d",
mpfr_get_prec(x), mpfr_log_prec, x, u, rnd_mode),
- ("y[%Pu]=%.*Rg", mpfr_get_prec (y), mpfr_get_prec, y));
+ ("y[%Pu]=%.*Rg", mpfr_get_prec (y), mpfr_log_prec, y));
if (MPFR_LIKELY(u != 0) ) /* if u=0, do nothing */
{
diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
--- mpfr-3.1.0-a/src/mpfr.h 2011-11-28 12:22:52.000000000 +0000
+++ mpfr-3.1.0-b/src/mpfr.h 2012-02-24 12:44:49.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 1
#define MPFR_VERSION_PATCHLEVEL 0
-#define MPFR_VERSION_STRING "3.1.0-p4"
+#define MPFR_VERSION_STRING "3.1.0-p5"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.1.0-a/src/mul_d.c mpfr-3.1.0-b/src/mul_d.c
--- mpfr-3.1.0-a/src/mul_d.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/mul_d.c 2012-02-24 12:44:49.000000000 +0000
@@ -34,7 +34,7 @@
(("b[%Pu]=%.*Rg c=%.20g rnd=%d",
mpfr_get_prec(b), mpfr_log_prec, b, c, rnd_mode),
("a[%Pu]=%.*Rg inexact=%d",
- mpfr_get_prec (a), mpfr_get_prec, a, inexact));
+ mpfr_get_prec (a), mpfr_log_prec, a, inexact));
MPFR_SAVE_EXPO_MARK (expo);
diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
--- mpfr-3.1.0-a/src/version.c 2011-11-28 12:22:52.000000000 +0000
+++ mpfr-3.1.0-b/src/version.c 2012-02-24 12:44:49.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.1.0-p4";
+ return "3.1.0-p5";
}

@ -1,45 +0,0 @@
diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
--- mpfr-3.1.0-a/PATCHES 2012-02-24 13:50:05.000000000 +0000
+++ mpfr-3.1.0-b/PATCHES 2012-02-24 13:50:05.000000000 +0000
@@ -0,0 +1 @@
+logging-varfmt
diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
--- mpfr-3.1.0-a/VERSION 2012-02-24 12:44:49.000000000 +0000
+++ mpfr-3.1.0-b/VERSION 2012-02-24 13:50:05.000000000 +0000
@@ -1 +1 @@
-3.1.0-p5
+3.1.0-p6
diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h
--- mpfr-3.1.0-a/src/mpfr-impl.h 2011-10-05 21:39:57.000000000 +0000
+++ mpfr-3.1.0-b/src/mpfr-impl.h 2012-02-24 13:50:05.000000000 +0000
@@ -1592,7 +1592,7 @@
do \
if ((MPFR_LOG_INTERNAL_F & mpfr_log_type) && \
(mpfr_log_current <= mpfr_log_level)) \
- LOG_PRINT ("%s.%d:%s[%#Pu]=%.*Rf\n", __func__, __LINE__, \
+ LOG_PRINT ("%s.%d:%s[%#Pu]=%.*Rg\n", __func__, __LINE__, \
#x, mpfr_get_prec (x), mpfr_log_prec, x); \
while (0)
diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
--- mpfr-3.1.0-a/src/mpfr.h 2012-02-24 12:44:49.000000000 +0000
+++ mpfr-3.1.0-b/src/mpfr.h 2012-02-24 13:50:05.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 1
#define MPFR_VERSION_PATCHLEVEL 0
-#define MPFR_VERSION_STRING "3.1.0-p5"
+#define MPFR_VERSION_STRING "3.1.0-p6"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
--- mpfr-3.1.0-a/src/version.c 2012-02-24 12:44:49.000000000 +0000
+++ mpfr-3.1.0-b/src/version.c 2012-02-24 13:50:05.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.1.0-p5";
+ return "3.1.0-p6";
}

@ -1,591 +0,0 @@
diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
--- mpfr-3.1.0-a/PATCHES 2012-03-08 15:17:03.000000000 +0000
+++ mpfr-3.1.0-b/PATCHES 2012-03-08 15:17:03.000000000 +0000
@@ -0,0 +1 @@
+large-prec
diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
--- mpfr-3.1.0-a/VERSION 2012-02-24 13:50:05.000000000 +0000
+++ mpfr-3.1.0-b/VERSION 2012-03-08 15:17:03.000000000 +0000
@@ -1 +1 @@
-3.1.0-p6
+3.1.0-p7
diff -Naurd mpfr-3.1.0-a/src/add1.c mpfr-3.1.0-b/src/add1.c
--- mpfr-3.1.0-a/src/add1.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/add1.c 2012-03-08 15:17:03.000000000 +0000
@@ -44,12 +44,12 @@
bq = MPFR_PREC(b);
cq = MPFR_PREC(c);
- an = (aq-1)/GMP_NUMB_BITS+1; /* number of limbs of a */
+ an = MPFR_PREC2LIMBS (aq); /* number of limbs of a */
aq2 = (mpfr_prec_t) an * GMP_NUMB_BITS;
sh = aq2 - aq; /* non-significant bits in low limb */
- bn = (bq-1)/GMP_NUMB_BITS+1; /* number of limbs of b */
- cn = (cq-1)/GMP_NUMB_BITS+1; /* number of limbs of c */
+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */
+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */
ap = MPFR_MANT(a);
bp = MPFR_MANT(b);
@@ -124,7 +124,7 @@
dif = aq2 - diff_exp;
/* dif is the number of bits of c which overlap with a' */
- difn = (dif-1)/GMP_NUMB_BITS + 1;
+ difn = MPFR_PREC2LIMBS (dif);
/* only the highest difn limbs from c have to be considered */
if (MPFR_UNLIKELY(difn > cn))
{
diff -Naurd mpfr-3.1.0-a/src/add1sp.c mpfr-3.1.0-b/src/add1sp.c
--- mpfr-3.1.0-a/src/add1sp.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/add1sp.c 2012-03-08 15:17:03.000000000 +0000
@@ -107,7 +107,7 @@
/* Read prec and num of limbs */
p = MPFR_PREC(b);
- n = (p+GMP_NUMB_BITS-1)/GMP_NUMB_BITS;
+ n = MPFR_PREC2LIMBS (p);
MPFR_UNSIGNED_MINUS_MODULO(sh, p);
bx = MPFR_GET_EXP(b);
d = (mpfr_uexp_t) (bx - MPFR_GET_EXP(c));
diff -Naurd mpfr-3.1.0-a/src/agm.c mpfr-3.1.0-b/src/agm.c
--- mpfr-3.1.0-a/src/agm.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/agm.c 2012-03-08 15:17:03.000000000 +0000
@@ -91,7 +91,7 @@
q = MPFR_PREC(r);
p = q + MPFR_INT_CEIL_LOG2(q) + 15;
MPFR_ASSERTD (p >= 7); /* see algorithms.tex */
- s = (p - 1) / GMP_NUMB_BITS + 1;
+ s = MPFR_PREC2LIMBS (p);
/* b (op2) and a (op1) are the 2 operands but we want b >= a */
compare = mpfr_cmp (op1, op2);
@@ -285,7 +285,7 @@
/* Next iteration */
MPFR_ZIV_NEXT (loop, p);
- s = (p - 1) / GMP_NUMB_BITS + 1;
+ s = MPFR_PREC2LIMBS (p);
}
MPFR_ZIV_FREE (loop);
diff -Naurd mpfr-3.1.0-a/src/eq.c mpfr-3.1.0-b/src/eq.c
--- mpfr-3.1.0-a/src/eq.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/eq.c 2012-03-08 15:17:03.000000000 +0000
@@ -56,8 +56,8 @@
if (uexp != vexp)
return 0; /* no bit agree */
- usize = (MPFR_PREC(u) - 1) / GMP_NUMB_BITS + 1;
- vsize = (MPFR_PREC(v) - 1) / GMP_NUMB_BITS + 1;
+ usize = MPFR_LIMB_SIZE (u);
+ vsize = MPFR_LIMB_SIZE (v);
if (vsize > usize) /* exchange u and v */
{
diff -Naurd mpfr-3.1.0-a/src/exp.c mpfr-3.1.0-b/src/exp.c
--- mpfr-3.1.0-a/src/exp.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/exp.c 2012-03-08 15:17:03.000000000 +0000
@@ -133,7 +133,7 @@
mp_size_t yn;
int sh;
- yn = 1 + (MPFR_PREC(y) - 1) / GMP_NUMB_BITS;
+ yn = MPFR_LIMB_SIZE (y);
sh = (mpfr_prec_t) yn * GMP_NUMB_BITS - MPFR_PREC(y);
MPFR_MANT(y)[0] += MPFR_LIMB_ONE << sh;
inexact = 1;
diff -Naurd mpfr-3.1.0-a/src/get_d.c mpfr-3.1.0-b/src/get_d.c
--- mpfr-3.1.0-a/src/get_d.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/get_d.c 2012-03-08 15:17:03.000000000 +0000
@@ -100,7 +100,7 @@
nbits += (1021 + e);
MPFR_ASSERTD (nbits >= 1);
}
- np = (nbits + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
+ np = MPFR_PREC2LIMBS (nbits);
MPFR_ASSERTD ( np <= MPFR_LIMBS_PER_DOUBLE );
carry = mpfr_round_raw_4 (tp, MPFR_MANT(src), MPFR_PREC(src), negative,
nbits, rnd_mode);
diff -Naurd mpfr-3.1.0-a/src/get_flt.c mpfr-3.1.0-b/src/get_flt.c
--- mpfr-3.1.0-a/src/get_flt.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/get_flt.c 2012-03-08 15:17:03.000000000 +0000
@@ -92,7 +92,7 @@
nbits += (125 + e);
MPFR_ASSERTD (nbits >= 1);
}
- np = (nbits + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
+ np = MPFR_PREC2LIMBS (nbits);
MPFR_ASSERTD(np <= MPFR_LIMBS_PER_FLT);
carry = mpfr_round_raw_4 (tp, MPFR_MANT(src), MPFR_PREC(src), negative,
nbits, rnd_mode);
diff -Naurd mpfr-3.1.0-a/src/get_str.c mpfr-3.1.0-b/src/get_str.c
--- mpfr-3.1.0-a/src/get_str.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/get_str.c 2012-03-08 15:17:03.000000000 +0000
@@ -2351,7 +2351,7 @@
/* the first digit will contain only r bits */
prec = (m - 1) * pow2 + r; /* total number of bits */
- n = (prec - 1) / GMP_NUMB_BITS + 1;
+ n = MPFR_PREC2LIMBS (prec);
MPFR_TMP_MARK (marker);
x1 = MPFR_TMP_LIMBS_ALLOC (n + 1);
@@ -2417,12 +2417,12 @@
exact = 1;
/* number of limbs */
- n = 1 + (prec - 1) / GMP_NUMB_BITS;
+ n = MPFR_PREC2LIMBS (prec);
/* a will contain the approximation of the mantissa */
a = MPFR_TMP_LIMBS_ALLOC (n);
- nx = 1 + (MPFR_PREC(x) - 1) / GMP_NUMB_BITS;
+ nx = MPFR_LIMB_SIZE (x);
if ((mpfr_exp_t) m == g) /* final exponent is 0, no multiplication or
division to perform */
diff -Naurd mpfr-3.1.0-a/src/init2.c mpfr-3.1.0-b/src/init2.c
--- mpfr-3.1.0-a/src/init2.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/init2.c 2012-03-08 15:17:03.000000000 +0000
@@ -51,7 +51,7 @@
which both have an odd mantissa */
MPFR_ASSERTN(p >= MPFR_PREC_MIN && p <= MPFR_PREC_MAX);
- xsize = (mp_size_t) ((p - 1) / GMP_NUMB_BITS) + 1;
+ xsize = MPFR_PREC2LIMBS (p);
tmp = (mpfr_limb_ptr) (*__gmp_allocate_func)(MPFR_MALLOC_SIZE(xsize));
MPFR_PREC(x) = p; /* Set prec */
diff -Naurd mpfr-3.1.0-a/src/lngamma.c mpfr-3.1.0-b/src/lngamma.c
--- mpfr-3.1.0-a/src/lngamma.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/lngamma.c 2012-03-08 15:17:03.000000000 +0000
@@ -67,7 +67,7 @@
/* Now, the unit bit is represented. */
- prec = ((prec - 1) / GMP_NUMB_BITS + 1) * GMP_NUMB_BITS - expo;
+ prec = MPFR_PREC2LIMBS (prec) * GMP_NUMB_BITS - expo;
/* number of represented fractional bits (including the trailing 0's) */
x0 = *(MPFR_MANT (x) + prec / GMP_NUMB_BITS);
diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h
--- mpfr-3.1.0-a/src/mpfr-impl.h 2012-02-24 13:50:05.000000000 +0000
+++ mpfr-3.1.0-b/src/mpfr-impl.h 2012-03-09 12:06:26.000000000 +0000
@@ -646,10 +646,24 @@
**************** mpfr_t properties *******************
******************************************************/
+/* In the following macro, p is usually a mpfr_prec_t, but this macro
+ works with other integer types (without integer overflow). Checking
+ that p >= 1 in debug mode is useful here because this macro can be
+ used on a computed precision (in particular, this formula does not
+ work for a degenerate case p = 0, and could give different results
+ on different platforms). But let us not use an assertion checking
+ in the MPFR_LAST_LIMB() and MPFR_LIMB_SIZE() macros below to avoid
+ too much expansion for assertions (in practice, this should be a
+ problem just when testing MPFR with the --enable-assert configure
+ option and the -ansi -pedantic-errors gcc compiler flags). */
+#define MPFR_PREC2LIMBS(p) \
+ (MPFR_ASSERTD ((p) >= 1), ((p) - 1) / GMP_NUMB_BITS + 1)
+
#define MPFR_PREC(x) ((x)->_mpfr_prec)
#define MPFR_EXP(x) ((x)->_mpfr_exp)
#define MPFR_MANT(x) ((x)->_mpfr_d)
-#define MPFR_LIMB_SIZE(x) ((MPFR_PREC((x))-1)/GMP_NUMB_BITS+1)
+#define MPFR_LAST_LIMB(x) ((MPFR_PREC (x) - 1) / GMP_NUMB_BITS)
+#define MPFR_LIMB_SIZE(x) (MPFR_LAST_LIMB (x) + 1)
/******************************************************
@@ -749,7 +763,8 @@
#define MPFR_IS_FP(x) (!MPFR_IS_NAN(x) && !MPFR_IS_INF(x))
#define MPFR_IS_SINGULAR(x) (MPFR_EXP(x) <= MPFR_EXP_INF)
#define MPFR_IS_PURE_FP(x) (!MPFR_IS_SINGULAR(x) && \
- (MPFR_ASSERTD (MPFR_MANT(x)[MPFR_LIMB_SIZE(x)-1] & MPFR_LIMB_HIGHBIT), 1))
+ (MPFR_ASSERTD ((MPFR_MANT(x)[MPFR_LAST_LIMB(x)] \
+ & MPFR_LIMB_HIGHBIT) != 0), 1))
#define MPFR_ARE_SINGULAR(x,y) \
(MPFR_UNLIKELY(MPFR_IS_SINGULAR(x)) || MPFR_UNLIKELY(MPFR_IS_SINGULAR(y)))
@@ -1061,7 +1076,7 @@
/* Set a number to 1 (Fast) - It doesn't check if 1 is in the exponent range */
#define MPFR_SET_ONE(x) \
do { \
- mp_size_t _size = MPFR_LIMB_SIZE(x) - 1; \
+ mp_size_t _size = MPFR_LAST_LIMB(x); \
MPFR_SET_POS(x); \
MPFR_EXP(x) = 1; \
MPN_ZERO ( MPFR_MANT(x), _size); \
@@ -1213,8 +1228,8 @@
_destp = MPFR_MANT (dest); \
if (MPFR_UNLIKELY (_destprec >= _srcprec)) \
{ \
- _srcs = (_srcprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \
- _dests = (_destprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS - _srcs; \
+ _srcs = MPFR_PREC2LIMBS (_srcprec); \
+ _dests = MPFR_PREC2LIMBS (_destprec) - _srcs; \
MPN_COPY (_destp + _dests, srcp, _srcs); \
MPN_ZERO (_destp, _dests); \
inexact = 0; \
@@ -1227,8 +1242,8 @@
mp_limb_t _rb, _sb, _ulp; \
\
/* Compute Position and shift */ \
- _srcs = (_srcprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \
- _dests = (_destprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \
+ _srcs = MPFR_PREC2LIMBS (_srcprec); \
+ _dests = MPFR_PREC2LIMBS (_destprec); \
MPFR_UNSIGNED_MINUS_MODULO (_sh, _destprec); \
_sp = (srcp) + _srcs - _dests; \
\
@@ -1372,7 +1387,7 @@
if (MPFR_LIKELY (MPFR_PREC (dest) == MPFR_PREC (src))) \
{ \
MPN_COPY (MPFR_MANT (dest), MPFR_MANT (src), \
- (MPFR_PREC (src) + GMP_NUMB_BITS-1)/GMP_NUMB_BITS); \
+ MPFR_LIMB_SIZE (src)); \
inexact = 0; \
} \
else \
@@ -1682,7 +1697,7 @@
MPFR_ASSERTD (_prec >= MPFR_PREC_MIN); \
if (MPFR_UNLIKELY (_prec > MPFR_PREC_MAX)) \
mpfr_abort_prec_max (); \
- _size = (mpfr_prec_t) (_prec + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; \
+ _size = MPFR_PREC2LIMBS (_prec); \
if (MPFR_UNLIKELY (_size * (num) > MPFR_GROUP_STATIC_SIZE)) \
{ \
(g).alloc = (num) * _size * sizeof (mp_limb_t); \
@@ -1733,7 +1748,7 @@
MPFR_ASSERTD (_prec >= MPFR_PREC_MIN); \
if (MPFR_UNLIKELY (_prec > MPFR_PREC_MAX)) \
mpfr_abort_prec_max (); \
- _size = (mpfr_prec_t) (_prec + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; \
+ _size = MPFR_PREC2LIMBS (_prec); \
(g).alloc = (num) * _size * sizeof (mp_limb_t); \
if (MPFR_LIKELY (_oalloc == 0)) \
(g).mant = (mp_limb_t *) (*__gmp_allocate_func) ((g).alloc); \
@@ -1886,7 +1901,7 @@
MPFR_NORETURN_ATTR;
__MPFR_DECLSPEC void mpfr_rand_raw _MPFR_PROTO((mpfr_limb_ptr, gmp_randstate_t,
- unsigned long));
+ mpfr_prec_t));
__MPFR_DECLSPEC mpz_t* mpfr_bernoulli_internal _MPFR_PROTO((mpz_t*,
unsigned long));
diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
--- mpfr-3.1.0-a/src/mpfr.h 2012-02-24 13:50:05.000000000 +0000
+++ mpfr-3.1.0-b/src/mpfr.h 2012-03-08 15:17:03.000000000 +0000
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 1
#define MPFR_VERSION_PATCHLEVEL 0
-#define MPFR_VERSION_STRING "3.1.0-p6"
+#define MPFR_VERSION_STRING "3.1.0-p7"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.1.0-a/src/mul.c mpfr-3.1.0-b/src/mul.c
--- mpfr-3.1.0-a/src/mul.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/mul.c 2012-03-08 15:17:03.000000000 +0000
@@ -93,15 +93,15 @@
ax = MPFR_GET_EXP (b) + MPFR_GET_EXP (c);
- bq = MPFR_PREC(b);
- cq = MPFR_PREC(c);
+ bq = MPFR_PREC (b);
+ cq = MPFR_PREC (c);
- MPFR_ASSERTD(bq+cq > bq); /* PREC_MAX is /2 so no integer overflow */
+ MPFR_ASSERTN ((mpfr_uprec_t) bq + cq <= MPFR_PREC_MAX);
- bn = (bq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of b */
- cn = (cq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of c */
+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */
+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */
k = bn + cn; /* effective nb of limbs used by b*c (= tn or tn+1) below */
- tn = (bq + cq + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
+ tn = MPFR_PREC2LIMBS (bq + cq);
/* <= k, thus no int overflow */
MPFR_ASSERTD(tn <= k);
@@ -292,12 +292,12 @@
bq = MPFR_PREC (b);
cq = MPFR_PREC (c);
- MPFR_ASSERTD (bq+cq > bq); /* PREC_MAX is /2 so no integer overflow */
+ MPFR_ASSERTN ((mpfr_uprec_t) bq + cq <= MPFR_PREC_MAX);
- bn = (bq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of b */
- cn = (cq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of c */
+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */
+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */
k = bn + cn; /* effective nb of limbs used by b*c (= tn or tn+1) below */
- tn = (bq + cq + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
+ tn = MPFR_PREC2LIMBS (bq + cq);
MPFR_ASSERTD (tn <= k); /* tn <= k, thus no int overflow */
/* Check for no size_t overflow*/
diff -Naurd mpfr-3.1.0-a/src/pow.c mpfr-3.1.0-b/src/pow.c
--- mpfr-3.1.0-a/src/pow.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/pow.c 2012-03-08 15:17:03.000000000 +0000
@@ -136,7 +136,7 @@
(b) all the 'z' bits are zero
*/
- prec = ((prec - 1) / GMP_NUMB_BITS + 1) * GMP_NUMB_BITS - expo;
+ prec = MPFR_PREC2LIMBS (prec) * GMP_NUMB_BITS - expo;
/* number of z+0 bits */
yn = prec / GMP_NUMB_BITS;
diff -Naurd mpfr-3.1.0-a/src/print_raw.c mpfr-3.1.0-b/src/print_raw.c
--- mpfr-3.1.0-a/src/print_raw.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/print_raw.c 2012-03-08 15:17:03.000000000 +0000
@@ -84,7 +84,7 @@
int i;
mpfr_prec_t count = 0;
char c;
- mp_size_t n = (r - 1) / GMP_NUMB_BITS + 1;
+ mp_size_t n = MPFR_PREC2LIMBS (r);
printf("%s ", str);
for(n-- ; n>=0 ; n--)
@@ -109,7 +109,7 @@
int i;
mpfr_prec_t count = 0;
char c;
- mp_size_t n = (r - 1) / GMP_NUMB_BITS + 1;
+ mp_size_t n = MPFR_PREC2LIMBS (r);
for(n-- ; n>=0 ; n--)
{
diff -Naurd mpfr-3.1.0-a/src/round_prec.c mpfr-3.1.0-b/src/round_prec.c
--- mpfr-3.1.0-a/src/round_prec.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/round_prec.c 2012-03-08 15:17:03.000000000 +0000
@@ -55,12 +55,12 @@
MPFR_ASSERTN(prec >= MPFR_PREC_MIN && prec <= MPFR_PREC_MAX);
- nw = 1 + (prec - 1) / GMP_NUMB_BITS; /* needed allocated limbs */
+ nw = MPFR_PREC2LIMBS (prec); /* needed allocated limbs */
/* check if x has enough allocated space for the significand */
/* Get the number of limbs from the precision.
(Compatible with all allocation methods) */
- ow = (MPFR_PREC (x) + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
+ ow = MPFR_LIMB_SIZE (x);
if (nw > ow)
{
/* FIXME: Variable can't be created using custom allocation,
diff -Naurd mpfr-3.1.0-a/src/round_raw_generic.c mpfr-3.1.0-b/src/round_raw_generic.c
--- mpfr-3.1.0-a/src/round_raw_generic.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/round_raw_generic.c 2012-03-08 15:17:03.000000000 +0000
@@ -80,7 +80,7 @@
(xprec <= yprec || MPFR_IS_LIKE_RNDZ (rnd_mode, neg)))
return 0;
- xsize = (xprec-1)/GMP_NUMB_BITS + 1;
+ xsize = MPFR_PREC2LIMBS (xprec);
nw = yprec / GMP_NUMB_BITS;
rw = yprec & (GMP_NUMB_BITS - 1);
diff -Naurd mpfr-3.1.0-a/src/set.c mpfr-3.1.0-b/src/set.c
--- mpfr-3.1.0-a/src/set.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/set.c 2012-03-08 15:17:03.000000000 +0000
@@ -48,8 +48,7 @@
/* Same precision and b is not singular:
* just copy the mantissa, and set the exponent and the sign
* The result is exact. */
- MPN_COPY (MPFR_MANT (a), MPFR_MANT (b),
- (MPFR_PREC (b) + GMP_NUMB_BITS-1)/GMP_NUMB_BITS);
+ MPN_COPY (MPFR_MANT (a), MPFR_MANT (b), MPFR_LIMB_SIZE (b));
MPFR_RET (0);
}
else
diff -Naurd mpfr-3.1.0-a/src/set_f.c mpfr-3.1.0-b/src/set_f.c
--- mpfr-3.1.0-a/src/set_f.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/set_f.c 2012-03-08 15:17:03.000000000 +0000
@@ -43,7 +43,7 @@
if (SIZ(x) * MPFR_FROM_SIGN_TO_INT(MPFR_SIGN(y)) < 0)
MPFR_CHANGE_SIGN (y);
- sy = 1 + (MPFR_PREC(y) - 1) / GMP_NUMB_BITS;
+ sy = MPFR_LIMB_SIZE (y);
my = MPFR_MANT(y);
mx = PTR(x);
diff -Naurd mpfr-3.1.0-a/src/set_prec.c mpfr-3.1.0-b/src/set_prec.c
--- mpfr-3.1.0-a/src/set_prec.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/set_prec.c 2012-03-08 15:17:03.000000000 +0000
@@ -32,7 +32,7 @@
MPFR_ASSERTN (p >= MPFR_PREC_MIN && p <= MPFR_PREC_MAX);
/* Calculate the new number of limbs */
- xsize = (p - 1) / GMP_NUMB_BITS + 1;
+ xsize = MPFR_PREC2LIMBS (p);
/* Realloc only if the new size is greater than the old */
xoldsize = MPFR_GET_ALLOC_SIZE (x);
diff -Naurd mpfr-3.1.0-a/src/setmax.c mpfr-3.1.0-b/src/setmax.c
--- mpfr-3.1.0-a/src/setmax.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/setmax.c 2012-03-08 15:17:03.000000000 +0000
@@ -32,7 +32,7 @@
mp_limb_t *xp;
MPFR_SET_EXP (x, e);
- xn = 1 + (MPFR_PREC(x) - 1) / GMP_NUMB_BITS;
+ xn = MPFR_LIMB_SIZE (x);
sh = (mpfr_prec_t) xn * GMP_NUMB_BITS - MPFR_PREC(x);
xp = MPFR_MANT(x);
xp[0] = MP_LIMB_T_MAX << sh;
diff -Naurd mpfr-3.1.0-a/src/sqr.c mpfr-3.1.0-b/src/sqr.c
--- mpfr-3.1.0-a/src/sqr.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/sqr.c 2012-03-08 15:17:03.000000000 +0000
@@ -56,11 +56,11 @@
ax = 2 * MPFR_GET_EXP (b);
bq = MPFR_PREC(b);
- MPFR_ASSERTD (2 * bq > bq); /* PREC_MAX is /2 so no integer overflow */
+ MPFR_ASSERTN (2 * (mpfr_uprec_t) bq <= MPFR_PREC_MAX);
- bn = MPFR_LIMB_SIZE(b); /* number of limbs of b */
- tn = 1 + (2 * bq - 1) / GMP_NUMB_BITS; /* number of limbs of square,
- 2*bn or 2*bn-1 */
+ bn = MPFR_LIMB_SIZE (b); /* number of limbs of b */
+ tn = MPFR_PREC2LIMBS (2 * bq); /* number of limbs of square,
+ 2*bn or 2*bn-1 */
if (MPFR_UNLIKELY(bn > MPFR_SQR_THRESHOLD))
return mpfr_mul (a, b, b, rnd_mode);
diff -Naurd mpfr-3.1.0-a/src/stack_interface.c mpfr-3.1.0-b/src/stack_interface.c
--- mpfr-3.1.0-a/src/stack_interface.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/stack_interface.c 2012-03-08 15:17:03.000000000 +0000
@@ -26,7 +26,7 @@
size_t
mpfr_custom_get_size (mpfr_prec_t prec)
{
- return (prec + GMP_NUMB_BITS -1) / GMP_NUMB_BITS * BYTES_PER_MP_LIMB;
+ return MPFR_PREC2LIMBS (prec) * BYTES_PER_MP_LIMB;
}
#undef mpfr_custom_init
diff -Naurd mpfr-3.1.0-a/src/strtofr.c mpfr-3.1.0-b/src/strtofr.c
--- mpfr-3.1.0-a/src/strtofr.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/strtofr.c 2012-03-08 15:17:03.000000000 +0000
@@ -467,7 +467,7 @@
/* Set y to the value of the ~prec most significant bits of pstr->mant
(as long as we guarantee correct rounding, we don't need to get
exactly prec bits). */
- ysize = (prec - 1) / GMP_NUMB_BITS + 1;
+ ysize = MPFR_PREC2LIMBS (prec);
/* prec bits corresponds to ysize limbs */
ysize_bits = ysize * GMP_NUMB_BITS;
/* and to ysize_bits >= prec > MPFR_PREC (x) bits */
diff -Naurd mpfr-3.1.0-a/src/sub1sp.c mpfr-3.1.0-b/src/sub1sp.c
--- mpfr-3.1.0-a/src/sub1sp.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/sub1sp.c 2012-03-08 15:17:03.000000000 +0000
@@ -155,8 +155,8 @@
MPFR_ASSERTD(MPFR_IS_PURE_FP(c));
/* Read prec and num of limbs */
- p = MPFR_PREC(b);
- n = (p-1)/GMP_NUMB_BITS+1;
+ p = MPFR_PREC (b);
+ n = MPFR_PREC2LIMBS (p);
/* Fast cmp of |b| and |c|*/
bx = MPFR_GET_EXP (b);
diff -Naurd mpfr-3.1.0-a/src/urandomb.c mpfr-3.1.0-b/src/urandomb.c
--- mpfr-3.1.0-a/src/urandomb.c 2011-10-03 08:17:09.000000000 +0000
+++ mpfr-3.1.0-b/src/urandomb.c 2012-03-08 15:17:03.000000000 +0000
@@ -31,13 +31,20 @@
a sufficient number of limbs */
void
mpfr_rand_raw (mpfr_limb_ptr mp, gmp_randstate_t rstate,
- unsigned long int nbits)
+ mpfr_prec_t nbits)
{
mpz_t z;
+ MPFR_ASSERTN (nbits >= 1);
/* To be sure to avoid the potential allocation of mpz_urandomb */
- ALLOC(z) = SIZ(z) = ((nbits - 1) / GMP_NUMB_BITS) + 1;
+ ALLOC(z) = SIZ(z) = MPFR_PREC2LIMBS (nbits);
PTR(z) = mp;
+#if __MPFR_GMP(5,0,0)
+ /* Check for integer overflow (unless mp_bitcnt_t is signed,
+ but according to the GMP manual, this shouldn't happen).
+ Note: mp_bitcnt_t has been introduced in GMP 5.0.0. */
+ MPFR_ASSERTN ((mp_bitcnt_t) -1 < 0 || nbits <= (mp_bitcnt_t) -1);
+#endif
mpz_urandomb (z, rstate, nbits);
}
diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
--- mpfr-3.1.0-a/src/version.c 2012-02-24 13:50:05.000000000 +0000
+++ mpfr-3.1.0-b/src/version.c 2012-03-08 15:17:03.000000000 +0000
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.1.0-p6";
+ return "3.1.0-p7";
}
diff -Naurd mpfr-3.1.0-a/tests/tinits.c mpfr-3.1.0-b/tests/tinits.c
--- mpfr-3.1.0-a/tests/tinits.c 2011-10-03 08:17:14.000000000 +0000
+++ mpfr-3.1.0-b/tests/tinits.c 2012-03-08 15:17:03.000000000 +0000
@@ -1,4 +1,4 @@
-/* Test file for mpfr_inits, mpfr_inits2 and mpfr_clears.
+/* Test file for mpfr_init2, mpfr_inits, mpfr_inits2 and mpfr_clears.
Copyright 2003, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
Contributed by the Arenaire and Caramel projects, INRIA.
@@ -20,18 +20,43 @@
http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */
+#include <stdlib.h>
+
#include "mpfr-test.h"
int
main (void)
{
mpfr_t a, b, c;
+ long large_prec;
tests_start_mpfr ();
+
mpfr_inits (a, b, c, (mpfr_ptr) 0);
mpfr_clears (a, b, c, (mpfr_ptr) 0);
mpfr_inits2 (200, a, b, c, (mpfr_ptr) 0);
mpfr_clears (a, b, c, (mpfr_ptr) 0);
+
+ /* test for precision 2^31-1, see
+ https://gforge.inria.fr/tracker/index.php?func=detail&aid=13918 */
+ large_prec = 2147483647;
+ if (getenv ("MPFR_CHECK_LARGEMEM") != NULL)
+ {
+ /* We assume that the precision won't be increased internally. */
+ if (large_prec > MPFR_PREC_MAX)
+ large_prec = MPFR_PREC_MAX;
+ mpfr_inits2 (large_prec, a, b, (mpfr_ptr) 0);
+ mpfr_set_ui (a, 17, MPFR_RNDN);
+ mpfr_set (b, a, MPFR_RNDN);
+ if (mpfr_get_ui (a, MPFR_RNDN) != 17)
+ {
+ printf ("Error in mpfr_init2 with precision 2^31-1\n");
+ exit (1);
+ }
+ mpfr_clears (a, b, (mpfr_ptr) 0);
+ }
+
tests_end_mpfr ();
+
return 0;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save