commit:     ad254d79b82f400acb7d58433209531bf3ba47c5
Author:     Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 12 20:00:17 2018 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Tue Jun 12 20:00:17 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad254d79

dev-ada/gnatcoll-core: Add dev-ada/gnatcoll-core

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-ada/gnatcoll-core/Manifest                     |  1 +
 .../files/gnatcoll-core-2018-gentoo.patch          | 22 +++++++
 dev-ada/gnatcoll-core/gnatcoll-core-2018.ebuild    | 74 ++++++++++++++++++++++
 dev-ada/gnatcoll-core/metadata.xml                 | 29 +++++++++
 4 files changed, 126 insertions(+)

diff --git a/dev-ada/gnatcoll-core/Manifest b/dev-ada/gnatcoll-core/Manifest
new file mode 100644
index 00000000000..5317f1891c2
--- /dev/null
+++ b/dev-ada/gnatcoll-core/Manifest
@@ -0,0 +1 @@
+DIST gnatcoll-core-gpl-2018-src.tar.gz 1657129 BLAKE2B 
616aef931fb542f4a022c63db53acb0f8b4323e3b948eb7b8b5688c36817b3f52b5f517b969b0560b6492d51a3e59c8350449cbbe7246b5294c45caeead4d9d6
 SHA512 
bf6082573dc537836ea8506a2c9a75dc7837440c35c5b02a52add52e38290d99e90a9706690591f8899b8b4935824b195f230b3aa1c4da10911e3caf954c04ac

diff --git a/dev-ada/gnatcoll-core/files/gnatcoll-core-2018-gentoo.patch 
b/dev-ada/gnatcoll-core/files/gnatcoll-core-2018-gentoo.patch
new file mode 100644
index 00000000000..cedf710c036
--- /dev/null
+++ b/dev-ada/gnatcoll-core/files/gnatcoll-core-2018-gentoo.patch
@@ -0,0 +1,22 @@
+--- a/gnatcoll.gpr     2018-06-12 21:37:42.664733336 +0200
++++ b/gnatcoll.gpr     2018-06-12 21:38:07.965360000 +0200
+@@ -115,6 +115,7 @@
+ 
+       for Switches ("gnatcoll_support.c") use
+          Compiler'Switches ("C") & Extra_Switches;
++      for Driver ("C") use External ("GCC", "gcc");
+ 
+    end Compiler;
+ 
+--- a/src/gnatcoll-projects.ads.old    2017-11-25 14:50:06.919939453 +0100
++++ b/src/gnatcoll-projects.ads        2017-11-25 14:50:38.932387204 +0100
+@@ -1917,7 +1917,8 @@
+       Predefined_Source_Files : GNATCOLL.VFS.File_Array_Access;
+       --  The list of source files in Predefined_Source_Path
+ 
+-      Default_Gnatls : GNAT.Strings.String_Access := new String'("gnatls");
++      Default_Gnatls : GNAT.Strings.String_Access :=
++         new String'("@GNATLS@");
+       --  The default gnatls command to run.
+ 
+       Xrefs_Subdir : GNAT.Strings.String_Access;

diff --git a/dev-ada/gnatcoll-core/gnatcoll-core-2018.ebuild 
b/dev-ada/gnatcoll-core/gnatcoll-core-2018.ebuild
new file mode 100644
index 00000000000..38313cd8d13
--- /dev/null
+++ b/dev-ada/gnatcoll-core/gnatcoll-core-2018.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit multiprocessing
+
+MYP=${PN}-gpl-${PV}
+
+DESCRIPTION="GNAT Component Collection Core packages"
+HOMEPAGE="http://libre.adacore.com";
+SRC_URI="http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27a99
+       -> ${MYP}-src.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnat_2016 gnat_2017 +gnat_2018 +shared static-libs static-pic"
+
+RDEPEND="dev-lang/gnat-gpl:7.3.0
+       dev-ada/libgpr[gnat_2018,shared?,static-libs?,static-pic?]
+       dev-ada/xmlada[gnat_2018,shared?,static-libs?,static-pic?]"
+DEPEND="${RDEPEND}
+       dev-ada/gprbuild[gnat_2018]
+       !dev-ada/gnatcoll"
+
+REQUIRED_USE="!gnat_2016 !gnat_2017 gnat_2018"
+
+S="${WORKDIR}"/${MYP}-src
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+src_prepare() {
+       GCC_PV=7.3.0
+       default
+       sed -i \
+               -e "s:@GNATLS@:${CHOST}-gnatls-${GCC_PV}:g" \
+               src/gnatcoll-projects.ads \
+               || die
+}
+
+src_configure() {
+       emake prefix="${D}usr" PROCESSORS=$(makeopts_jobs) setup
+}
+
+src_compile() {
+       build () {
+               GCC=${CHOST}-gcc-${GCC_PV} gprbuild -p -m -j$(makeopts_jobs) \
+                       -XBUILD=PROD -v -XGNATCOLL_VERSION=${PV} \
+                       -XLIBRARY_TYPE=$1 -XXMLADA_BUILD=$* -XGPR_BUILD=$1 \
+                       gnatcoll.gpr -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} 
|| die
+       }
+       if use shared; then
+               build relocatable
+       fi
+       if use static-pic; then
+               build static-pic
+       fi
+       if use static-libs; then
+               build static
+       fi
+}
+
+src_install() {
+       if use shared; then
+               emake install-relocatable
+       fi
+       if use static-pic; then
+               emake install-static-pic
+       fi
+       if use static-libs; then
+               emake install-static
+       fi
+       einstalldocs
+}

diff --git a/dev-ada/gnatcoll-core/metadata.xml 
b/dev-ada/gnatcoll-core/metadata.xml
new file mode 100644
index 00000000000..294071cbcd1
--- /dev/null
+++ b/dev-ada/gnatcoll-core/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>tup...@gentoo.org</email>
+               <name>Tupone Alfredo</name>
+       </maintainer>
+       <use>
+               <flag name="gnat_2016">Compile with 
dev-lang/gnat-gpl-2016</flag>
+               <flag name="gnat_2017">Compile with 
dev-lang/gnat-gpl-2017</flag>
+               <flag name="gnat_2018">Compile with 
dev-lang/gnat-gpl-2018</flag>
+               <flag name="shared">Build shared library</flag>
+               <flag name="static-pic">Build static library with pic 
code</flag>
+       </use>
+       <longdescription lang="en">
+               The reusable library known as the GNAT Component Collection 
(GNATColl)
+               is based on one main principle: general-purpose packages that 
are part
+               of the GNAT technology should also be available to GNAT user
+               application code. The compiler front end, the GNAT Programming 
Studio
+               (GPS) Interactive Development Environment, and the GNAT Tracker
+               web-based interface all served as sources for the components.
+
+               The GNATColl components complement the predefined Ada and GNAT
+               libraries and deal with a range of common programming issues 
including
+               string and text processing, memory management, and file 
handling.
+               Several of the components are especially useful in enterprise
+               applications.
+       </longdescription>
+</pkgmetadata>

Reply via email to