dev-ada/xmlada: Enable build with gnat-gpl-2019
authorTupone Alfredo <tupone@gentoo.org>
Thu, 30 May 2019 07:06:05 +0000 (09:06 +0200)
committerTupone Alfredo <tupone@gentoo.org>
Thu, 30 May 2019 07:06:05 +0000 (09:06 +0200)
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11

dev-ada/xmlada/files/xmlada-2018-gentoo.patch
dev-ada/xmlada/metadata.xml
dev-ada/xmlada/xmlada-2018-r1.ebuild [new file with mode: 0644]

index 9e79572e3067f094f4b8e0741e2cde24c1457c98..439b85026d5fbee8a4a99afb15037bea1ca63cbd 100644 (file)
@@ -1,5 +1,5 @@
---- xmlada-gpl-2017-src/Makefile.in.old        2017-12-04 20:09:23.730805855 +0100
-+++ xmlada-gpl-2017-src/Makefile.in    2017-12-04 20:09:51.586331155 +0100
+--- a/Makefile.in      2017-12-04 20:09:23.730805855 +0100
++++ b/Makefile.in      2017-12-04 20:09:51.586331155 +0100
 @@ -62,7 +62,8 @@
  
  # Rebuild the tests (and not the XML/Ada code itself)
@@ -9,8 +9,8 @@
                -XTESTS_ACTIVATED=Only xmlada.gpr
  
  # Run the tests. This requires an install of XML/Ada first
---- xmlada-gpl-2017-src/tests/Makefile.old     2017-12-04 21:38:29.722818904 +0100
-+++ xmlada-gpl-2017-src/tests/Makefile 2017-12-04 21:38:54.229382658 +0100
+--- a/tests/Makefile   2017-12-04 21:38:29.722818904 +0100
++++ b/tests/Makefile   2017-12-04 21:38:54.229382658 +0100
 @@ -1,8 +1,6 @@
  TESTS= test_unicode \
                 test_state \
                gprbuild -q -Pdefault.gpr; \
                ./validate > $(RESULTS)/multiple_xsd.out; \
                cp $(RESULTS)/multiple_xsd.out $(RESULTS)/multiple_xsd.diff; \
+--- a/input_sources/input_sources-http.adb     2019-05-29 10:18:23.428517625 +0200
++++ b/input_sources/input_sources-http.adb     2019-05-29 10:17:53.451007226 +0200
+@@ -191,7 +191,7 @@
+       Create_Socket (Socket);
+       Set_Socket_Option (Socket, Socket_Level, (Reuse_Address, True));
+-      Set_Socket_Option (Socket, Option => (Receive_Buffer, 3000));
++      Set_Socket_Option (Socket, Socket_Level, (Receive_Buffer, 3000));
+       Connect_Socket (Socket, Addr);
+       Channel := Stream (Socket);
index 22eacbe16159a60b7ad20fa5baf590e13f9d752b..17a114e73ebbec4e2f8184b95e933f684c011749 100644 (file)
@@ -8,7 +8,8 @@
        <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-2017</flag>
+               <flag name="gnat_2018">Compile with dev-lang/gnat-gpl-2018</flag>
+               <flag name="gnat_2019">Compile with dev-lang/gnat-gpl-2019</flag>
                <flag name="shared">Build shared library</flag>
                <flag name="static-pic">Build static library with pic code</flag>
        </use>
diff --git a/dev-ada/xmlada/xmlada-2018-r1.ebuild b/dev-ada/xmlada/xmlada-2018-r1.ebuild
new file mode 100644 (file)
index 0000000..4898810
--- /dev/null
@@ -0,0 +1,81 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multiprocessing
+
+MYP=${PN}-gpl-${PV}
+
+DESCRIPTION="Set of modules that provide a simple manipulation of XML streams"
+HOMEPAGE="http://libre.adacore.com/"
+SRC_URI="http://mirrors.cdn.adacore.com/art/591aeb88c7a4473fcbb154f8 ->
+       ${MYP}-src.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnat_2016 gnat_2017 +gnat_2018 gnat_2019 +shared static-libs static-pic"
+REQUIRED_USE="|| ( shared static-libs static-pic )
+       ^^ ( gnat_2016 gnat_2017 gnat_2018 gnat_2019 )"
+
+RDEPEND="gnat_2016? ( dev-lang/gnat-gpl:4.9.4 )
+       gnat_2017? ( dev-lang/gnat-gpl:6.3.0 )
+       gnat_2018? ( dev-lang/gnat-gpl:7.3.1 )
+       gnat_2019? ( dev-lang/gnat-gpl:8.3.1 )"
+DEPEND="${RDEPEND}
+       dev-ada/gprbuild[gnat_2016(-)?,gnat_2017(-)?,gnat_2018(-)?,gnat_2019(-)?]"
+
+S="${WORKDIR}"/${MYP}-src
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+src_configure () {
+       econf --prefix="${D}"/usr
+}
+
+src_compile () {
+       build () {
+               gprbuild -j$(makeopts_jobs) -m -p -v -XLIBRARY_TYPE=$1 \
+                       -XBUILD=Production -XPROCESSORS=$(makeopts_jobs) xmlada.gpr \
+                       -cargs ${ADAFLAGS} || die "gprbuild failed"
+       }
+       if use shared; then
+               build relocatable
+       fi
+       if use static-libs; then
+               build static
+       fi
+       if use static-pic; then
+               build static-pic
+       fi
+}
+
+src_test() {
+       emake test
+       emake run_test | grep DIFF && die
+}
+
+src_install () {
+       build () {
+               gprinstall -XLIBRARY_TYPE=$1 -f -p -XBUILD=Production \
+                       -XPROCESSORS=$(makeopts_jobs) --prefix="${D}"usr \
+                       --install-name=xmlada --build-var=LIBRARY_TYPE \
+                       --build-var=XMLADA_BUILD \
+                       --build-name=$1 xmlada.gpr || die "gprinstall failed"
+       }
+       if use shared; then
+               build relocatable
+       fi
+       if use static-libs; then
+               build static
+       fi
+       if use static-pic; then
+               build static-pic
+       fi
+
+       einstalldocs
+       dodoc xmlada-roadmap.txt
+       rm "${D}"/usr/share/doc/${PN}/.buildinfo || die
+       rm -r "${D}"/usr/share/gpr/manifests || die
+}