summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTupone Alfredo <tupone@gentoo.org>2017-03-29 21:27:24 +0200
committerTupone Alfredo <tupone@gentoo.org>2017-03-29 21:27:24 +0200
commit46dba86bc79018ffa1157f9f06e598de481ebb66 (patch)
tree465f4a6c9d7c0459365dc6dd3aad5b8aeb135026 /dev-ada
parentdev-lang/gnat-gpl: Set the gnatbind executable for gprbind (diff)
downloadgentoo-46dba86bc79018ffa1157f9f06e598de481ebb66.tar.gz
gentoo-46dba86bc79018ffa1157f9f06e598de481ebb66.tar.bz2
gentoo-46dba86bc79018ffa1157f9f06e598de481ebb66.zip
dev-ada/gprbuild: Now that dev-ada/xmlada is in, use it to build
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-ada')
-rw-r--r--dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch54
-rw-r--r--dev-ada/gprbuild/gprbuild-2016.ebuild74
-rw-r--r--dev-ada/gprbuild/metadata.xml11
3 files changed, 113 insertions, 26 deletions
diff --git a/dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch b/dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch
index 952c2c0a69d4..f3566e87adbd 100644
--- a/dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch
+++ b/dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch
@@ -160,3 +160,57 @@ diff -Naur gprbuild-gpl-2016-src.old/src/gprinstall-sigint_intercepted.ads gprbu
+pragma Convention (C, Sigint_Intercepted);
+-- Called when the program is interrupted by Ctrl-C to delete the
+-- temporary mapping files and configuration pragmas files.
+--- gprbuild-gpl-2016-src/Makefile.in.old 2017-01-19 19:52:41.242907252 +0100
++++ gprbuild-gpl-2016-src/Makefile.in 2017-01-19 19:54:45.822646333 +0100
+@@ -25,12 +25,12 @@
+ host=@host@
+ target=@target@
+ build=@build@
+-prefix=@prefix@
++prefix=$(DESTDIR)@prefix@
+ srcdir=@srcdir@
+ objdir=@objdir@
+ exec_prefix=@exec_prefix@
+ datarootdir=@datarootdir@
+-datadir=@datadir@
++datadir=$(DESTDIR)@datadir@
+ bindir=@bindir@
+ libdir=@libdir@
+ libexecdir=@libexecdir@
+@@ -66,7 +66,7 @@
+ .PHONY: all distall gprbuild gprconfig gprclean gprinstall gprname gprls
+
+ all:
+- $(GPRBUILD_BUILDER)
++ $(GPRBUILD_BUILDER) -cargs:C $(CFLAGS) -cargs:Ada $(ADAFLAGS)
+
+ distall: all install install.dist
+
+@@ -173,13 +173,13 @@
+ libgpr.build: $(foreach t, $(LIBGPR_TYPES), libgpr.build.$(t))
+
+ libgpr.build.shared:
+- ${BUILDER} -XLIBRARY_TYPE=relocatable -P$(srcdir)/gpr/gpr.gpr
++ ${BUILDER} -XLIBRARY_TYPE=relocatable -P$(srcdir)/gpr/gpr.gpr -cargs:Ada $(ADAFLAGS)
+
+ libgpr.build.static:
+- ${BUILDER} -XLIBRARY_TYPE=static -P$(srcdir)/gpr/gpr.gpr
++ ${BUILDER} -XLIBRARY_TYPE=static -P$(srcdir)/gpr/gpr.gpr -cargs:Ada $(ADAFLAGS)
+
+ libgpr.build.static-pic:
+- ${BUILDER} -XLIBRARY_TYPE=static-pic -P$(srcdir)/gpr/gpr.gpr
++ ${BUILDER} -XLIBRARY_TYPE=static-pic -P$(srcdir)/gpr/gpr.gpr -cargs:Ada $(ADAFLAGS)
+
+ libgpr.install: $(foreach t, $(LIBGPR_TYPES), libgpr.install.$(t))
+
+--- gprbuild-gpl-2015-src/gprbuild.gpr.old 2017-01-11 21:44:59.795997896 +0100
++++ gprbuild-gpl-2015-src/gprbuild.gpr 2017-01-11 21:45:07.971998651 +0100
+@@ -66,6 +66,7 @@
+ for Switches ("gpr*.ad?") use
+ Compiler'Default_Switches ("Ada") & ("-g1");
+ end case;
++ for Driver ("C") use External ("CC", "gcc");
+ end Compiler;
+
+ package Binder is
+ make BUILDER="$(BUILDER)" BUILD="$(BUILD)"
diff --git a/dev-ada/gprbuild/gprbuild-2016.ebuild b/dev-ada/gprbuild/gprbuild-2016.ebuild
index 03d3c2baa53e..2fe32aa1093b 100644
--- a/dev-ada/gprbuild/gprbuild-2016.ebuild
+++ b/dev-ada/gprbuild/gprbuild-2016.ebuild
@@ -12,19 +12,22 @@ HOMEPAGE="http://libre.adacore.com/"
SRC_URI="
http://mirrors.cdn.adacore.com/art/57399662c7a447658e0affa8
-> ${MYP}-src.tar.gz
- http://mirrors.cdn.adacore.com/art/57399978c7a447658e0affc0
- -> xmlada-gpl-${PV}-src.tar.gz"
+ bootstrap? (
+ http://mirrors.cdn.adacore.com/art/57399978c7a447658e0affc0
+ -> xmlada-gpl-${PV}-src.tar.gz )"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
-IUSE=""
+IUSE="bootstrap +shared static static-pic"
-DEPEND="dev-lang/gnat-gpl"
+DEPEND="dev-lang/gnat-gpl
+ !bootstrap? ( dev-ada/xmlada )"
RDEPEND="${DEPEND}"
S="${WORKDIR}"/${MYP}-src
+REQUIRED_USE="bootstrap? ( !shared !static !static-pic )"
PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
pkg_setup() {
@@ -44,34 +47,55 @@ pkg_setup() {
}
src_configure() {
- :
+ if ! use bootstrap ; then
+ default
+ fi
}
bin_progs="gprbuild gprconfig gprclean gprinstall gprname gprls"
lib_progs="gprlib gprbind"
src_compile() {
- local xmlada_src="../xmlada-gpl-${PV}-src"
- incflags="-Isrc -Igpr/src -I${xmlada_src}/sax -I${xmlada_src}/dom \
- -I${xmlada_src}/schema -I${xmlada_src}/unicode \
- -I${xmlada_src}/input_sources"
- ${GCC} -c ${CFLAGS} src/gpr_imports.c -o gpr_imports.o || die
- for bin in ${bin_progs}; do
- ${GNATMAKE} -j$(makeopts_jobs) ${incflags} $ADAFLAGS ${bin}-main \
- -o ${bin} -largs gpr_imports.o || die
- done
- for lib in $lib_progs; do
- ${GNATMAKE} -j$(makeopts_jobs) ${incflags} ${lib} $ADAFLAGS \
- -largs gpr_imports.o || die
- done
+ if use bootstrap; then
+ local xmlada_src="../xmlada-gpl-${PV}-src"
+ incflags="-Isrc -Igpr/src -I${xmlada_src}/sax -I${xmlada_src}/dom \
+ -I${xmlada_src}/schema -I${xmlada_src}/unicode \
+ -I${xmlada_src}/input_sources"
+ $(tc-getCC) -c ${CFLAGS} src/gpr_imports.c -o gpr_imports.o
+ for bin in ${bin_progs}; do
+ ${GNATMAKE} -j$(makeopts_jobs) ${incflags} $ADAFLAGS ${bin}-main \
+ -o ${bin} -largs gpr_imports.o || die
+ done
+ for lib in $lib_progs; do
+ ${GNATMAKE} -j$(makeopts_jobs) ${incflags} ${lib} $ADAFLAGS \
+ -largs gpr_imports.o || die
+ done
+ else
+ emake PROCESSORS=$(makeopts_jobs) all
+ for kind in shared static static-pic; do
+ if use ${kind}; then
+ emake PROCESSORS=$(makeopts_jobs) libgpr.build.${kind}
+ fi
+ done
+ fi
}
src_install() {
- dobin ${bin_progs}
- insinto /usr/share/gprconfig
- exeinto /usr/libexec/gprbuild
- doexe ${lib_progs}
- doins share/gprconfig/*.xml
- insinto /usr/share/gpr
- doins share/_default.gpr
+ if use bootstrap; then
+ dobin ${bin_progs}
+ insinto /usr/share/gprconfig
+ exeinto /usr/libexec/gprbuild
+ doexe ${lib_progs}
+ doins share/gprconfig/*.xml
+ insinto /usr/share/gpr
+ doins share/_default.gpr
+ else
+ default
+ for kind in shared static static-pic; do
+ if use ${kind}; then
+ emake DESTDIR="${D}" libgpr.install.${kind}
+ fi
+ done
+ fi
+ einstalldocs
}
diff --git a/dev-ada/gprbuild/metadata.xml b/dev-ada/gprbuild/metadata.xml
index d39fc81d0ddc..521d595c3ffb 100644
--- a/dev-ada/gprbuild/metadata.xml
+++ b/dev-ada/gprbuild/metadata.xml
@@ -5,7 +5,16 @@
<email>tupone@gentoo.org</email>
<name>Tupone Alfredo</name>
</maintainer>
+ <use>
+ <flag name="shared">Build shared library</flag>
+ <flag name="static">Build static library</flag>
+ <flag name="static-pic">Build static library with pic code</flag>
+ </use>
<longdescription lang="en">
- GPRbuild is an advanced software tool designed to help automate the construction of multi-language systems. It removes complexity from multi-language development by allowing developers to quickly and easily compile and link software written in a combination of languages including Ada, Assembler, C, C++, and Fortran. Easily extendable by users to cover new toolchains and languages it is primarily aimed at projects of all sizes organized into subsystems and libraries and is particularly well-suited for compiled languages.
+ XML/Ada is a set of modules that provide a simple manipulation of XML streams. It supports the whole XML 1.1 specifications, and can parse any file that follows this standard (including the contents of the DTD, although no validation of the document is done based on those).
+
+ It also provides support for a number of other standard associated with XML, like SAX, DOM and XML schemas.
+
+ In addition, it includes a module to manipulate Unicode streams, since this is required by the XML standard.
</longdescription>
</pkgmetadata>