--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multiprocessing
+
+MY_P=${PN}-gpl-${PV}-src
+
+DESCRIPTION="A complete Web development framework"
+HOMEPAGE="http://libre.adacore.com/tools/aws/"
+SRC_URI="http://mirrors.cdn.adacore.com/art/57399112c7a447658d00e1cd -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="dev-ada/xmlada[static]"
+DEPEND="${RDEPEND}
+ dev-ada/gnat_util[static]
+ dev-ada/asis
+ dev-ada/gprbuild"
+
+S="${WORKDIR}"/${MY_P}
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+src_configure() {
+ emake -j1 setup prefix=/usr
+}
+
+src_compile() {
+ emake PROCESSORS=$(makeopts_jobs)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ einstalldocs
+}
--- /dev/null
+--- aws-gpl-2016-src/shared.gpr.old 2017-01-30 20:00:39.022743691 +0100
++++ aws-gpl-2016-src/shared.gpr 2017-01-30 20:01:20.524985069 +0100
+@@ -130,6 +130,7 @@
+ package Compiler is
+
+ for Driver ("Makefile") use "";
++ for Driver ("C") use External ("CC", "gcc");
+
+ case Build is
+ when "Debug" =>
+@@ -151,11 +151,11 @@
+ end case;
+
+ for Switches ("aws-attachments.adb")
+- use Common_Options & Debug_Options & ("-gnatVn");
++ use Common_Options & Debug_Options & ("-gnatVn") & Adaflags;
+ for Switches ("aws-session.adb")
+- use Common_Options & Debug_Options & ("-gnatVn");
++ use Common_Options & Debug_Options & ("-gnatVn") & Adaflags;
+ for Switches ("templates_parser.adb")
+- use Common_Options & Debug_Options & ("-gnatVn");
++ use Common_Options & Debug_Options & ("-gnatVn") & Adaflags;
+ -- Disable validity check on this unit to work-around N728-028
+
+ -- ADAFLAGS and CFLAGS should come last so that command line
+--- aws-gpl-2016-src/include/include.gpr.old 2017-02-17 22:09:14.361695926 +0100
++++ aws-gpl-2016-src/include/include.gpr 2017-02-17 22:11:36.497215517 +0100
+@@ -54,7 +54,7 @@
+
+ when "Release" =>
+ for Default_Switches ("Ada") use
+- ("-gnat2012", "-O2", "-gnatws", "-gnatn") & Shared.Global_Options;
++ ("-gnat2012", "-O2", "-gnatws", "-gnatn") & Shared.Adaflags & Shared.Global_Options;
+ end case;
+
+ case Shared.S_Target is
--- /dev/null
+<?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>
+ <longdescription lang="en">
+ AWS is a complete framework to develop Web based applications. The main part of the framework is the embedded Web server. This small yet powerful Web server can be embedded into your application so your application will be able to talk with a standard Web browser like Microsoft Internet Explorer or Firefox for example. Around this Web server a lot of services have been developed.
+ </longdescription>
+</pkgmetadata>