summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTupone Alfredo <tupone@gentoo.org>2017-04-06 08:44:35 +0200
committerTupone Alfredo <tupone@gentoo.org>2017-04-06 08:44:35 +0200
commit53a82b45cf0a1594164e11175cdde9341ac7e5dd (patch)
treeb7f33a8a2a16371b393e35199f061f3e33712cb9 /dev-ada/gnatcoll
parentdev-php/PEAR-Net_LDAP2: add ~ppc ~ppc64 keywords (bug 589104). (diff)
downloadgentoo-53a82b45cf0a1594164e11175cdde9341ac7e5dd.tar.gz
gentoo-53a82b45cf0a1594164e11175cdde9341ac7e5dd.tar.bz2
gentoo-53a82b45cf0a1594164e11175cdde9341ac7e5dd.zip
dev-ada/gnatcoll: fix discover of atomic inc/dec
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-ada/gnatcoll')
-rw-r--r--dev-ada/gnatcoll/files/gnatcoll-2016-gentoo.patch20
-rw-r--r--dev-ada/gnatcoll/gnatcoll-2016.ebuild21
2 files changed, 40 insertions, 1 deletions
diff --git a/dev-ada/gnatcoll/files/gnatcoll-2016-gentoo.patch b/dev-ada/gnatcoll/files/gnatcoll-2016-gentoo.patch
index 0d3d958c7916..bb2112a058fc 100644
--- a/dev-ada/gnatcoll/files/gnatcoll-2016-gentoo.patch
+++ b/dev-ada/gnatcoll/files/gnatcoll-2016-gentoo.patch
@@ -147,3 +147,23 @@
case GnatColl_Shared.Atomics is
when "intrinsic" =>
+--- gnatcoll-gpl-2016-src/aclocal.m4.old 2017-04-06 08:25:14.796699365 +0200
++++ gnatcoll-gpl-2016-src/aclocal.m4 2017-04-06 08:25:36.622318016 +0200
+@@ -45,7 +45,7 @@
+ cat > conftest.ada <<EOF
+ [$3]
+ EOF
+- if AC_TRY_COMMAND([gnatchop -q conftest.ada && $1 $2 >/dev/null 2>conftest.out])
++ if AC_TRY_COMMAND([${GNATCHOP} -q conftest.ada && $1 $2 >/dev/null 2>conftest.out])
+ then
+ : Success
+ $4
+@@ -68,7 +68,7 @@
+ AC_DEFUN(AM_HAS_INTRINSIC_SYNC_COUNTERS,
+ [
+ AC_MSG_CHECKING([whether platform supports atomic inc/dec])
+- AM_TRY_ADA([gnatmake], [check.adb],
++ AM_TRY_ADA([${GNATMAKE}], [check.adb],
+ [
+ with Interfaces; use Interfaces;
+ procedure Check is
diff --git a/dev-ada/gnatcoll/gnatcoll-2016.ebuild b/dev-ada/gnatcoll/gnatcoll-2016.ebuild
index 3f8a8fb505a4..36e52edb1219 100644
--- a/dev-ada/gnatcoll/gnatcoll-2016.ebuild
+++ b/dev-ada/gnatcoll/gnatcoll-2016.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-inherit multilib multiprocessing
+inherit multilib multiprocessing autotools
MYP=${PN}-gpl-${PV}
@@ -38,6 +38,23 @@ S="${WORKDIR}"/${MYP}-src
PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+pkg_setup() {
+ GCC=${ADA:-$(tc-getCC)}
+ GNATMAKE="${GCC/gcc/gnatmake}"
+ GNATCHOP="${GCC/gcc/gnatchop}"
+ if [[ -z "$(type ${GNATMAKE} 2>/dev/null)" ]] ; then
+ eerror "You need a gcc compiler that provides the Ada Compiler:"
+ eerror "1) use gcc-config to select the right compiler or"
+ eerror "2) set ADA=gcc-4.9.4 in make.conf"
+ die "ada compiler not available"
+ fi
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
src_configure() {
local myConf=""
if use sqlite; then
@@ -46,6 +63,8 @@ src_configure() {
myConf="$myConf --without-sqlite"
fi
econf \
+ GNATCHOP="${GNATCHOP}" \
+ GNATMAKE="${GNATMAKE}" \
$(use_with gmp) \
$(use_with iconv) \
$(use_with postgresql) \