diff options
author | Tupone Alfredo <tupone@gentoo.org> | 2017-04-02 21:16:15 +0200 |
---|---|---|
committer | Tupone Alfredo <tupone@gentoo.org> | 2017-04-02 21:16:15 +0200 |
commit | 982565bd10630c6f6ccb8ec0eb714dd2f9c0e272 (patch) | |
tree | f94c6eb1abe9638891c0dc7e65551736a9e5f790 /dev-ada | |
parent | dev-ada/xmlada: Fix dependency (diff) | |
download | gentoo-982565bd10630c6f6ccb8ec0eb714dd2f9c0e272.tar.gz gentoo-982565bd10630c6f6ccb8ec0eb714dd2f9c0e272.tar.bz2 gentoo-982565bd10630c6f6ccb8ec0eb714dd2f9c0e272.zip |
dev-ada/gnat_util: Adding dev-ada/gnat-util-2016
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-ada')
-rw-r--r-- | dev-ada/gnat_util/Manifest | 1 | ||||
-rw-r--r-- | dev-ada/gnat_util/files/gnat_util-2016-gentoo.patch | 100 | ||||
-rw-r--r-- | dev-ada/gnat_util/gnat_util-2016.ebuild | 55 | ||||
-rw-r--r-- | dev-ada/gnat_util/metadata.xml | 22 |
4 files changed, 178 insertions, 0 deletions
diff --git a/dev-ada/gnat_util/Manifest b/dev-ada/gnat_util/Manifest new file mode 100644 index 000000000000..74f186b9a0a6 --- /dev/null +++ b/dev-ada/gnat_util/Manifest @@ -0,0 +1 @@ +DIST gnat_util-gpl-2016-src.tar.gz 1126296 SHA256 8e76d7eb1cbae1d3040b9e4196ab07d6e0dd5d4eeb3f5e0fbeb267b1a3470af5 SHA512 1edb67e762637e9e951356c7be402d7b2b903a05abdc93eadaf5ba98bc7bfa936b4fa2a2ae7eb986200dec755020e53d312d42769512fba2e290099f6030bbd0 WHIRLPOOL c2218ba14f669aa2412be4e0a42b1ffb475c720e608e73bca3bbe42dcaefe2dc4410c4632e0e900a8c72ed92c3ec670bd35935783f43c1eb0eb2cdb7afc4f63e diff --git a/dev-ada/gnat_util/files/gnat_util-2016-gentoo.patch b/dev-ada/gnat_util/files/gnat_util-2016-gentoo.patch new file mode 100644 index 000000000000..7559894c6d00 --- /dev/null +++ b/dev-ada/gnat_util/files/gnat_util-2016-gentoo.patch @@ -0,0 +1,100 @@ +--- gnat_util-gpl-2014-src/Makefile.old 2016-12-28 09:56:49.378950217 +0100 ++++ gnat_util-gpl-2014-src/Makefile 2016-12-28 09:57:12.301562519 +0100 +@@ -19,17 +19,26 @@ + MKDIR=mkdir -p + SRC=gen_src + +-.PHONY: all +-all: generate_sources ++build-static: + ${BUILDER} -m -XOS=$(OS_TYPE) -XBUILD=$(BUILD_TYPE) \ +- -XLIBRARY_TYPE=static -Pgnat_util -p ++ -XLIBRARY_TYPE=static -Pgnat_util -p \ ++ -cargs:ada $(ADAFLAGS) -cargs:C $(CFLAGS) +-ifeq ($(ENABLE_SHARED), yes) ++build-shared: + ${BUILDER} -m -XOS=$(OS_TYPE) -XBUILD=$(BUILD_TYPE) \ +- -XLIBRARY_TYPE=relocatable -Pgnat_util -p ++ -XLIBRARY_TYPE=relocatable -Pgnat_util -p \ ++ -cargs:ada $(ADAFLAGS) -cargs:C $(CFLAGS) +-endif +-ifeq ($(ENABLE_PIC), yes) ++build-static-pic: + ${BUILDER} -m -XOS=$(OS_TYPE) -XBUILD=$(BUILD_TYPE) \ +- -XLIBRARY_TYPE=static-pic -Pgnat_util -p ++ -XLIBRARY_TYPE=static-pic -Pgnat_util -p \ ++ -cargs:ada $(ADAFLAGS) -cargs:C $(CFLAGS) ++.PHONY: all ++all: generate_sources ++ $(MAKE) build-static ++ifeq ($(ENABLE_SHARED), yes) ++ $(MAKE) build-shared ++endif ++ifeq ($(ENABLE_PIC), yes) ++ $(MAKE) build-static-pic + endif + + .PHONY: generate_sources +@@ -48,7 +48,7 @@ + $(MKDIR) $(SRC) + $(CP) xsnamest.adb xutil.* snames.adb-tmpl snames.ads-tmpl snames.h-tmpl $(SRC) + (cd $(SRC) && \ +- gnatmake -gnatf -gnatwae -gnatyg -gnatyS xsnamest && \ ++ ${GNATMAKE} -gnatf -gnatwae -gnatyg -gnatyS xsnamest && \ + ./xsnamest && mv snames.ns snames.ads && mv snames.nb snames.adb) + $(CP) sdefault_adb.gnat_util $(SRC)/sdefault.adb + +@@ -58,8 +58,7 @@ + --prefix=$(prefix) --project-subdir=lib/gnat gnat_util + endif + +-.PHONY: install +-install: install-clean ++install-static: + ${INSTALLER} -p -f -m -XOS=$(OS_TYPE) -XBUILD=$(BUILD_TYPE) \ + -XLIBRARY_TYPE=static \ + --prefix=$(prefix) \ +@@ -67,7 +66,7 @@ + --lib-subdir=lib/gnat_util/static \ + --project-subdir=lib/gnat \ + --build-var=LIBRARY_TYPE --build-name=static -Pgnat_util +-ifeq ($(ENABLE_SHARED), yes) ++install-shared: + ${INSTALLER} -p -f -m -XOS=$(OS_TYPE) -XBUILD=$(BUILD_TYPE) \ + -XLIBRARY_TYPE=relocatable \ + --prefix=$(prefix) \ +@@ -75,8 +74,7 @@ + --lib-subdir=lib/gnat_util/relocatable \ + --project-subdir=lib/gnat \ + --build-var=LIBRARY_TYPE --build-name=relocatable -Pgnat_util +-endif +-ifeq ($(ENABLE_PIC), yes) ++install-static-pic: + ${INSTALLER} -p -f -m -XOS=$(OS_TYPE) -XBUILD=$(BUILD_TYPE) \ + -XLIBRARY_TYPE=static-pic \ + --prefix=$(prefix) \ +@@ -84,6 +82,14 @@ + --lib-subdir=lib/gnat_util/static-pic \ + --project-subdir=lib/gnat \ + --build-var=LIBRARY_TYPE --build-name=static-pic -Pgnat_util ++.PHONY: install ++install: install-clean ++ $(MAKE) install-static ++ifeq ($(ENABLE_SHARED), yes) ++ $(MAKE) install-shared ++endif ++ifeq ($(ENABLE_PIC), yes) ++ $(MAKE) install-static-pic + endif + + .PHONY: clean +--- gnat_util-gpl-2016-src/gnat_util.gpr.old 2017-02-09 22:15:27.153827164 +0100 ++++ gnat_util-gpl-2016-src/gnat_util.gpr 2017-02-09 22:15:38.307627480 +0100 +@@ -31,6 +31,7 @@ + for Default_Switches ("Ada") use ("-O0", "-gnato", "-g", "-gnata"); + for Default_Switches ("C") use ("-g"); + end case; ++ for Driver ("C") use External ("CC", "gcc"); + end Compiler; + + package Builder is diff --git a/dev-ada/gnat_util/gnat_util-2016.ebuild b/dev-ada/gnat_util/gnat_util-2016.ebuild new file mode 100644 index 000000000000..0fab74a0ea24 --- /dev/null +++ b/dev-ada/gnat_util/gnat_util-2016.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit toolchain-funcs multiprocessing + +MYP=${PN}-gpl-${PV} + +DESCRIPTION="Provides access to GNAT compiler internals for AdaCore utilities" +HOMEPAGE="http://libre.adacore.com" +SRC_URI="http://mirrors.cdn.adacore.com/art/57399637c7a447658e0affa6 -> ${MYP}-src.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+shared static static-pic" + +RDEPEND="dev-lang/gnat-gpl" +DEPEND="${RDEPEND} + dev-ada/gprbuild" + +S="${WORKDIR}"/${MYP}-src + +PATCHES=( "${FILESDIR}"/${P}-gentoo.patch ) + +pkg_setup() { + GCC=${ADA:-$(tc-getCC)} + GNATMAKE="${GCC/gcc/gnatmake}" + 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_compile() { + emake GNATMAKE=${GNATMAKE} BUILDER="gprbuild -j$(makeopts_jobs)" generate_sources + for kind in shared static static-pic; do + if use ${kind}; then + emake BUILDER="gprbuild -j$(makeopts_jobs)" build-${kind} + fi + done +} + +src_install() { + for kind in shared static static-pic; do + if use ${kind}; then + emake prefix="${D}"/usr install-${kind} + fi + done + einstalldocs +} diff --git a/dev-ada/gnat_util/metadata.xml b/dev-ada/gnat_util/metadata.xml new file mode 100644 index 000000000000..06e6729dec8c --- /dev/null +++ b/dev-ada/gnat_util/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>tupone@gentoo.org</email> + <name>Tupone Alfredo</name> + </maintainer> + <use> + <flag name="shared">Build gnat_util shared library</flag> + <flag name="static">Build gnat_util static library</flag> + <flag name="static-pic">Build gnat_util static library with pic code</flag> + </use> + <longdescription lang="en"> + Gnat_Util is a library uniting a number of GNAT sources that are used by + different tools. At the moment Gnat_Util provides GNAT sources needed by ASIS, + GNATCOLL and Gprbuild. Its main purpose is allowing to simultaneously use + tools like ASIS and GNATCOLL (and other ones based on GNAT sources, if they + are to come), which would normally cause name conflicts between the same GNAT + sources that they use. Building both of them using same set of sources that + is Gnat_Util solves this problem. + </longdescription> +</pkgmetadata> |