Skip to content

Commit

Permalink
dev-ada/gnatcoll-bindings: New package dev-ada/gnatcoll-bindings-2018
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.40, Repoman-2.3.9
  • Loading branch information
atupone committed Jun 21, 2018
1 parent 06df722 commit 0a31fa5
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-ada/gnatcoll-bindings/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST gnatcoll-bindings-gpl-2018-src.tar.gz 100068 BLAKE2B 7e5fe106d421d853135ddaea04b7bf2b306e7d0f054379b4c66b58844ac73270d7c82de549e9440f4ecc672ed7e9df6e2b3c1fea55b67403aaa33b09c124bb9b SHA512 2d42e904ab7324d958b34b103ceb2cf7d9bf620f324578b8d3537c18bcc2b4ba73d553bbec773cde5d57979c3e68bc9eef69f97dd55a3b21e43d464881676295
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/gmp/gnatcoll_gmp.gpr 2018-06-18 21:48:15.289991113 +0200
+++ b/gmp/gnatcoll_gmp.gpr 2018-06-18 21:48:46.869507399 +0200
@@ -65,7 +65,7 @@
for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ");
for Switches ("C") use ("-O2", "-Wunreachable-code");
end case;
-
+ for Driver ("C") use External ("GCC", "gcc");
end Compiler;

package Binder is
81 changes: 81 additions & 0 deletions dev-ada/gnatcoll-bindings/gnatcoll-bindings-2018.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

PYTHON_COMPAT=( python2_7 )
inherit multilib multiprocessing python-single-r1

MYP=${PN}-gpl-${PV}

DESCRIPTION="GNAT Component Collection"
HOMEPAGE="http://libre.adacore.com"
SRC_URI="http://mirrors.cdn.adacore.com/art/5b0ce9cfc7a4475261f97ca5
-> ${MYP}-src.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="gnat_2016 gnat_2017 +gnat_2018 gmp iconv python readline +shared
static-libs static-pic syslog"
# gtk iconv postgres pygobject projects sqlite tools

RDEPEND="python? ( ${PYTHON_DEPS} )
dev-ada/gnatcoll-core[gnat_2018,shared?,static-libs?,static-pic?]
dev-ada/libgpr[gnat_2018,shared?,static-libs?,static-pic?]
dev-ada/xmlada[gnat_2018,shared?,static-libs?,static-pic?]
dev-lang/gnat-gpl:7.3.0
gmp? ( dev-libs/gmp:* )"

DEPEND="${RDEPEND}
dev-ada/gprbuild[gnat_2018]"

REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
!gnat_2016 !gnat_2017 gnat_2018"

S="${WORKDIR}"/${MYP}-src

PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )

src_compile() {
GCC_PV=7.3.0
GCC=${CHOST}-gcc-${GCC_PV}
build () {
GCC=${CHOST}-gcc-${GCC_PV} gprbuild -j$(makeopts_jobs) -m -p -v \
-XLIBRARY_TYPE=$2 -P $1/gnatcoll_$1.gpr -XBUILD="PROD" \
-XGNATCOLL_ICONV_OPT= -XGNATCOLL_PYTHON_CFLAGS="-I$(python_get_includedir)" \
-XGNATCOLL_PYTHON_LIBS=$(python_get_library_path) \
-cargs:Ada ${ADAFLAGS} -cargs:C ${CFLAGS} || die "gprbuild failed"
}
for kind in shared static-libs static-pic ; do
if use $kind; then
lib=${kind%-libs}
lib=${lib/shared/relocatable}
for dir in gmp iconv python readline syslog ; do
if use $dir; then
build $dir $lib
fi
done
fi
done
}

src_install() {
build () {
gprinstall -p -f -XBUILD=PROD --prefix="${D}"/usr \
-XLIBRARY_TYPE=$2 -P $1/gnatcoll_$1.gpr \
--build-name=$2
}
for kind in shared static-libs static-pic ; do
if use $kind; then
lib=${kind%-libs}
lib=${lib/shared/relocatable}
for dir in gmp iconv python readline syslog ; do
if use $dir; then
build $dir $lib
fi
done
fi
done
einstalldocs
}
29 changes: 29 additions & 0 deletions dev-ada/gnatcoll-bindings/metadata.xml
Original file line number Diff line number Diff line change
@@ -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>[email protected]</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 shared library</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>

0 comments on commit 0a31fa5

Please sign in to comment.