Sun Jul 8 20:14:28 2012 UTC ()
www/aws: Build with USE_LANGUAGES+= ada

1) Remove lang/gnat-aux dependency
2) USE_LANGUAGES+= ada (invokes lang/gcc-aux dependency)
3) Restore use of pkgsrc wrappers
4) Utilize custom capability of devel/gprbuild-aux Library_Options ("-R"
   and "-Wl,-R" to redefine rpaths of shared libraries to remove
   references to the work directory.  This error was highlighted by new
   updates to the PKG_DEVELOPER=yes checks.
5) Fix for Ada 2012 binding interpretation that prevented build on
   lang/gcc-aux.  (AI05-0115, aggregates with invisible components)
6) GPRBuild-based packages require USE_LANGUAGES+= c++ fortran in addition
   to "c" and "ada" because GPRBUILD probes for these languages.  If they
   aren't on the language list, pkgsrc comes back with a warning message
   that causes gprbuild to throw an unhandled exception due to a regex
   failure.  www/aws doesn't contain c++ or fortran despite the value of
   USE_LANGUAGES.


(marino)
diff -r1.5 -r1.6 pkgsrc/www/aws/Makefile
diff -r1.3 -r1.4 pkgsrc/www/aws/distinfo
diff -r1.3 -r1.4 pkgsrc/www/aws/options.mk
diff -r0 -r1.1 pkgsrc/www/aws/patches/patch-docs_docs.gpr
diff -r0 -r1.1 pkgsrc/www/aws/patches/patch-include_include.gpr
diff -r0 -r1.1 pkgsrc/www/aws/patches/patch-src_soap_soap-message-xml.adb
diff -r0 -r1.1 pkgsrc/www/aws/patches/patch-src_src.gpr

cvs diff -r1.5 -r1.6 pkgsrc/www/aws/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/www/aws/Attic/Makefile 2012/03/16 04:31:15 1.5
+++ pkgsrc/www/aws/Attic/Makefile 2012/07/08 20:14:28 1.6
@@ -1,70 +1,82 @@ @@ -1,70 +1,82 @@
1# $NetBSD: Makefile,v 1.5 2012/03/16 04:31:15 obache Exp $ 1# $NetBSD: Makefile,v 1.6 2012/07/08 20:14:28 marino Exp $
2# 2#
3 3
4DISTNAME= aws-${AWS_VERSION} 4DISTNAME= aws-${AWS_VERSION}
5PKGREVISION= 2 5PKGREVISION= 3
6CATEGORIES= www 6CATEGORIES= www
7MASTER_SITES= http://downloads.dragonlace.net/src/ \ 7MASTER_SITES= http://downloads.dragonlace.net/src/ \
8 http://dragonlace.mirrors.ada.cx/src/ 8 http://dragonlace.mirrors.ada.cx/src/
9EXTRACT_SUFX= .tar.bz2 9EXTRACT_SUFX= .tar.bz2
10 10
11MAINTAINER= draco@marino.st 11MAINTAINER= draco@marino.st
12HOMEPAGE= http://libre.adacore.com/libre/tools/aws/ 12HOMEPAGE= http://libre.adacore.com/libre/tools/aws/
13COMMENT= Adacore Ada Web Server and framework 13COMMENT= Adacore Ada Web Server and framework
14LICENSE= gnu-gpl-v2 14LICENSE= gnu-gpl-v2
15 15
16PKG_DESTDIR_SUPPORT= user-destdir 16PKG_DESTDIR_SUPPORT= user-destdir
17AWS_VERSION= 2.10.0.1 17AWS_VERSION= 2.10.0.1
18USE_TOOLS+= gmake makeinfo sed gawk 18USE_TOOLS+= gmake makeinfo sed gawk
 19USE_LANGUAGES= c ada c++ fortran
 20
 21# Note: c++ and fortran aren't used, but gprconfig probes for them.
 22# When that happens, pkgsrc wrapper emits a warning message which causes
 23# gprconfig to crash due to output text not matching expected regexp
 24# Adding c++ and fortran to USE_LANGUAGES avoids this issue.
19 25
20PYTHON_VERSIONS_ACCEPTED= 26 27 26PYTHON_VERSIONS_ACCEPTED= 26 27
21 27
22.include "options.mk" 28.include "options.mk"
23 29
24MAKE_ENV+= ADA_PROJECT_PATH=${PREFIX}/lib/gnat 30MAKE_ENV+= ADA_PROJECT_PATH=${PREFIX}/lib/gnat
25 31
 32# Link options were added for the aws library
 33# "-R" option disables all rpaths except adalib and compiler libs. This is
 34# done because by default the rpaths will points at the WRKOBJDIR because
 35# it doesn't support the concept of DESTDIR.
 36# "-Wl,-R" adds a second rpath string.
 37# -Wl,-rpath is a better choice, but synonym -Wl,-R works on all BSD and SunOS
 38SUBST_CLASSES+= rpath
 39SUBST_STAGE.rpath= pre-configure
 40SUBST_MESSAGE.rpath= Adjust rpaths of shared libraries
 41SUBST_FILES.rpath= src/src.gpr include/include.gpr
 42SUBST_SED.rpath= -e "s,@ADDITIONAL_RPATH@,${ADDITIONAL_RPATH},"
 43ADDITIONAL_RPATH= ${PREFIX}/lib:${PREFIX}/lib/aws/native/relocatable
 44
26GENERATE_PLIST= cd ${DESTDIR}${PREFIX}; 45GENERATE_PLIST= cd ${DESTDIR}${PREFIX};
27GENERATE_PLIST+= ${FIND} bin/aws_password; 46GENERATE_PLIST+= ${FIND} bin/aws_password;
28GENERATE_PLIST+= ${FIND} bin/awsres; 47GENERATE_PLIST+= ${FIND} bin/awsres;
29GENERATE_PLIST+= ${FIND} bin/templates2ada; 48GENERATE_PLIST+= ${FIND} bin/templates2ada;
30GENERATE_PLIST+= ${FIND} bin/templatespp; 49GENERATE_PLIST+= ${FIND} bin/templatespp;
31GENERATE_PLIST+= ${FIND} bin/webxref; 50GENERATE_PLIST+= ${FIND} bin/webxref;
32GENERATE_PLIST+= ${FIND} bin/wsdl2aws; 51GENERATE_PLIST+= ${FIND} bin/wsdl2aws;
33GENERATE_PLIST+= ${FIND} include/aws/ -name \* -type f | ${SORT} -dr; 52GENERATE_PLIST+= ${FIND} include/aws/ -name \* -type f | ${SORT} -dr;
34GENERATE_PLIST+= ${FIND} lib/aws/ -name \* -type f | ${SORT} -dr; 53GENERATE_PLIST+= ${FIND} lib/aws/ -name \* -type f | ${SORT} -dr;
35GENERATE_PLIST+= ${FIND} lib/gnat/aws/ -name \* -type f | ${SORT}; 54GENERATE_PLIST+= ${FIND} lib/gnat/aws/ -name \* -type f | ${SORT};
36GENERATE_PLIST+= ${FIND} lib/gnat/aws.gpr; 55GENERATE_PLIST+= ${FIND} lib/gnat/aws.gpr;
37GENERATE_PLIST+= ${FIND} share/doc/aws/ -name \* -type f | ${SORT}; 56GENERATE_PLIST+= ${FIND} share/doc/aws/ -name \* -type f | ${SORT};
38GENERATE_PLIST+= ${FIND} share/examples/aws/ -name \* -type f | ${SORT} -dr; 57GENERATE_PLIST+= ${FIND} share/examples/aws/ -name \* -type f | ${SORT} -dr;
39GENERATE_PLIST+= ${FIND} share/gps/plug-ins/ada2wsdl.xml; 58GENERATE_PLIST+= ${FIND} share/gps/plug-ins/ada2wsdl.xml;
40GENERATE_PLIST+= ${FIND} share/gps/plug-ins/aws.py; 59GENERATE_PLIST+= ${FIND} share/gps/plug-ins/aws.py;
41GENERATE_PLIST+= ${FIND} share/gps/plug-ins/aws.xml; 60GENERATE_PLIST+= ${FIND} share/gps/plug-ins/aws.xml;
42GENERATE_PLIST+= ${FIND} share/gps/plug-ins/aws_api.xml; 61GENERATE_PLIST+= ${FIND} share/gps/plug-ins/aws_api.xml;
43GENERATE_PLIST+= ${FIND} share/gps/plug-ins/wsdl2aws.xml; 62GENERATE_PLIST+= ${FIND} share/gps/plug-ins/wsdl2aws.xml;
44 63
45post-wrapper: 
46 # We disable at least the wrapper binaries on all GNAT AUX to 
47 # avoid potential linkage problems 
48 ${RM} ${WRKDIR}/.wrapper/bin/* 
49 
50do-configure: 64do-configure:
51 cd ${WRKSRC} && ${SETENV} CC=gnatgcc \ 65 cd ${WRKSRC} && ${GMAKE} setup ${CONFIGURE_ARGS}
52 ${GMAKE} setup ${CONFIGURE_ARGS} 
53 66
54do-build: 67do-build:
55 cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} build build_doc 68 cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} build build_doc
56 69
57do-test: install 70do-test: install
58 cd ${WRKSRC}/regtests && python${PYVERSSUFFIX} testsuite.py 71 cd ${WRKSRC}/regtests && python${PYVERSSUFFIX} testsuite.py
59 72
60do-install: 73do-install:
61 cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${GMAKE} install 74 cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${GMAKE} install
62 ${TOUCH} ${DESTDIR}${PREFIX}/share/examples/aws/bin/IGNORE.ME 75 ${TOUCH} ${DESTDIR}${PREFIX}/share/examples/aws/bin/IGNORE.ME
63 76
64.include "../../devel/zlib/buildlink3.mk" 77.include "../../devel/zlib/buildlink3.mk"
65.include "../../lang/python/pyversion.mk" 78.include "../../lang/python/pyversion.mk"
66.include "../../devel/gnatpython/buildlink3.mk" 79.include "../../devel/gnatpython/buildlink3.mk"
67.include "../../lang/gnat-aux/buildlink3.mk" 
68.include "../../textproc/xmlada/buildlink3.mk" 80.include "../../textproc/xmlada/buildlink3.mk"
69.include "../../devel/gprbuild-aux/buildlink3.mk" 81.include "../../devel/gprbuild-aux/buildlink3.mk"
70.include "../../mk/bsd.pkg.mk" 82.include "../../mk/bsd.pkg.mk"

cvs diff -r1.3 -r1.4 pkgsrc/www/aws/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/www/aws/Attic/distinfo 2011/07/19 19:56:37 1.3
+++ pkgsrc/www/aws/Attic/distinfo 2012/07/08 20:14:28 1.4
@@ -1,21 +1,25 @@ @@ -1,21 +1,25 @@
1$NetBSD: distinfo,v 1.3 2011/07/19 19:56:37 drochner Exp $ 1$NetBSD: distinfo,v 1.4 2012/07/08 20:14:28 marino Exp $
2 2
3SHA1 (aws-2.10.0.1.tar.bz2) = 3ea20d4328951089f93caa3693eb24d67cf76594 3SHA1 (aws-2.10.0.1.tar.bz2) = 3ea20d4328951089f93caa3693eb24d67cf76594
4RMD160 (aws-2.10.0.1.tar.bz2) = 8d6c2e9e681f18b16bbd79e76e6b65bb8f07a871 4RMD160 (aws-2.10.0.1.tar.bz2) = 8d6c2e9e681f18b16bbd79e76e6b65bb8f07a871
5Size (aws-2.10.0.1.tar.bz2) = 1386481 bytes 5Size (aws-2.10.0.1.tar.bz2) = 1386481 bytes
6SHA1 (patch-ac) = 1985aca4185538590cea3d939f095b69495eb0fa 6SHA1 (patch-ac) = 1985aca4185538590cea3d939f095b69495eb0fa
7SHA1 (patch-ad) = 6bfa89f2837cc0dca4f5c391b7e05e74a3d85181 7SHA1 (patch-ad) = 6bfa89f2837cc0dca4f5c391b7e05e74a3d85181
8SHA1 (patch-ae) = 44f66219a999b90d626f8f581942ae4f406e6c18 8SHA1 (patch-ae) = 44f66219a999b90d626f8f581942ae4f406e6c18
9SHA1 (patch-af) = b3f6ca145cede4df4e101c9cd0fd255e2ad23d3f 9SHA1 (patch-af) = b3f6ca145cede4df4e101c9cd0fd255e2ad23d3f
10SHA1 (patch-ag) = 5c5122daa913cc541fcd05d61f5b67a989a00b4d 10SHA1 (patch-ag) = 5c5122daa913cc541fcd05d61f5b67a989a00b4d
11SHA1 (patch-ba) = 334c40657793f0a6bcec295cc07329ca96bc8372 11SHA1 (patch-ba) = 334c40657793f0a6bcec295cc07329ca96bc8372
12SHA1 (patch-bb) = e2db43dd317b01b9d0e97c481b2851b19469667b 12SHA1 (patch-bb) = e2db43dd317b01b9d0e97c481b2851b19469667b
13SHA1 (patch-bc) = b4f9926351a0ab3c5e5c73601093266f0d8efaaa 13SHA1 (patch-bc) = b4f9926351a0ab3c5e5c73601093266f0d8efaaa
14SHA1 (patch-bd) = b640a61fe75e9bfd06ea6a546ba827a71631517c 14SHA1 (patch-bd) = b640a61fe75e9bfd06ea6a546ba827a71631517c
15SHA1 (patch-be) = c07e84b8f669e1aec7368a5be0fbcb91b37b32fe 15SHA1 (patch-be) = c07e84b8f669e1aec7368a5be0fbcb91b37b32fe
16SHA1 (patch-bf) = 22fe61a2441649cf2bb2c9b6b22008562ca7127f 16SHA1 (patch-bf) = 22fe61a2441649cf2bb2c9b6b22008562ca7127f
17SHA1 (patch-bg) = ebbba6439c4cdbeb2f0e1afaec9c46f429e408b9 17SHA1 (patch-bg) = ebbba6439c4cdbeb2f0e1afaec9c46f429e408b9
18SHA1 (patch-bh) = 59f370db7e47d5fb18fa239dfc3396703f7251c8 18SHA1 (patch-bh) = 59f370db7e47d5fb18fa239dfc3396703f7251c8
19SHA1 (patch-bi) = 3878eb24a44a23f119d78aad5b0c5bcfce1fc4a2 19SHA1 (patch-bi) = 3878eb24a44a23f119d78aad5b0c5bcfce1fc4a2
20SHA1 (patch-bj) = 6e138dbe344600ea870e33b030662422cadf6cbc 20SHA1 (patch-bj) = 6e138dbe344600ea870e33b030662422cadf6cbc
21SHA1 (patch-bk) = 7be4ff0eefa89a24d942fc38c55f81864dd483de 21SHA1 (patch-bk) = 7be4ff0eefa89a24d942fc38c55f81864dd483de
 22SHA1 (patch-docs_docs.gpr) = acbe31da756c0cc3ee86132eedd0f0cc0ae6dd0e
 23SHA1 (patch-include_include.gpr) = 8e65a8238077df79fedaafa8b95eb51c8897b6c0
 24SHA1 (patch-src_soap_soap-message-xml.adb) = d7b84968c615c017fb33536d177ce8b4557e29dc
 25SHA1 (patch-src_src.gpr) = 500bb473414253696c43dfa8b5999681accdb6ca

cvs diff -r1.3 -r1.4 pkgsrc/www/aws/Attic/options.mk (expand / switch to unified diff)

--- pkgsrc/www/aws/Attic/options.mk 2011/07/19 19:56:37 1.3
+++ pkgsrc/www/aws/Attic/options.mk 2012/07/08 20:14:28 1.4
@@ -1,48 +1,52 @@ @@ -1,48 +1,52 @@
1# $NetBSD: options.mk,v 1.3 2011/07/19 19:56:37 drochner Exp $ 1# $NetBSD: options.mk,v 1.4 2012/07/08 20:14:28 marino Exp $
2 2
3 3
4# xmlada is built-in (not optional) due to gprbuild dependency 4# xmlada is built-in (not optional) due to gprbuild dependency
5# zlib is built-in because it's mandatory. It even comes with AWS. 5# zlib is built-in because it's mandatory. It even comes with AWS.
6# ASIS is not supported right now (custom build, requires part of GNAT) 6# ASIS is not supported right now (custom build, requires part of GNAT)
7 7
8# The "ipv6" option effectively disabled IPv4 support, so it 8# The "ipv6" option effectively disabled IPv4 support, so it
9# should not be switched on per default even on systems which 9# should not be switched on per default even on systems which
10# support IPv6. For that reason, the option name is not "inet6". 10# support IPv6. For that reason, the option name is not "inet6".
11 11
12PKG_OPTIONS_VAR= PKG_OPTIONS.aws 12PKG_OPTIONS_VAR= PKG_OPTIONS.aws
13PKG_SUPPORTED_OPTIONS= ssl ldap ipv6 debug disable-shared-rt relocatable 13PKG_SUPPORTED_OPTIONS= ssl ldap ipv6 debug disable-shared-rt relocatable
14PKG_SUGGESTED_OPTIONS= ssl 14PKG_SUGGESTED_OPTIONS= ssl
15 15
16.include "../../mk/bsd.prefs.mk" 16.include "../../mk/bsd.prefs.mk"
17.include "../../mk/bsd.options.mk" 17.include "../../mk/bsd.options.mk"
18 18
19CONFIGURE_ARGS+= GCC=gnatgcc 19CONFIGURE_ARGS+= GCC=ada
20CONFIGURE_ARGS+= PROCESSORS=1 20CONFIGURE_ARGS+= PROCESSORS=1
21CONFIGURE_ARGS+= PYTHON=python${PYVERSSUFFIX} 21CONFIGURE_ARGS+= PYTHON=python${PYVERSSUFFIX}
 22CONFIGURE_ARGS+= XMLADA=true
 23CONFIGURE_ARGS+= prefix=${PREFIX}
22DOTBUILD= release 24DOTBUILD= release
23 25
24# The system libgcc is from version 4.1 which doesn't include the symbol 26# The system libgcc is from version 4.1 which doesn't include the symbol
25# _Unwind_GetIPInfo. If AWS uses the system zlib or if it's configured to use 27# _Unwind_GetIPInfo. If AWS uses the system zlib or if it's configured to use
26# SSL the search path /usr/lib is inserted in the gnatmake/gprbuild 28# SSL the search path /usr/lib is inserted in the gnatmake/gprbuild
27# instructions and the system libgcc.a is picked up instead of 29# instructions and the system libgcc.a is picked up instead of
28# /usr/pkg/lib/libgcc.a. This is a bug confirmed by Adacore and an internal 30# /usr/pkg/lib/libgcc.a. This is a bug confirmed by Adacore and an internal
29# bug report has been generated. In the meantime, this means AWS can't be 31# bug report has been generated. In the meantime, this means AWS can't be
30# configured for HTTPS on NetBSD, and that zlib must be built from scratch on 32# configured for HTTPS on NetBSD, and that zlib must be built from scratch on
31# NetBSD until NetBSD upgrades it's libgcc or until a new GNAT and GPRBuild 33# NetBSD until NetBSD upgrades it's libgcc or until a new GNAT and GPRBuild
32# are delivered that don't have this bug. 34# are delivered that don't have this bug.
33 35
34.if $(OPSYS) == "NetBSD" 36.if $(OPSYS) == "NetBSD"
35CONFIGURE_ARGS+= ZLIB=false 37CONFIGURE_ARGS+= ZLIB=false
 38.else
 39CONFIGURE_ARGS+= ZLIB=true
36.endif 40.endif
37 41
38################### 42###################
39## SSL Support ## 43## SSL Support ##
40################### 44###################
41 45
42.if !empty(PKG_OPTIONS:Mssl) 46.if !empty(PKG_OPTIONS:Mssl)
43.if $(OPSYS) == "NetBSD" 47.if $(OPSYS) == "NetBSD"
44MESSAGE_SRC= MESSAGE_NETBSD_SSL 48MESSAGE_SRC= MESSAGE_NETBSD_SSL
45.else 49.else
46.include "../../security/openssl/buildlink3.mk" 50.include "../../security/openssl/buildlink3.mk"
47CONFIGURE_ARGS+= SOCKET=openssl 51CONFIGURE_ARGS+= SOCKET=openssl
48.endif 52.endif

File Added: pkgsrc/www/aws/patches/Attic/patch-docs_docs.gpr
$NetBSD: patch-docs_docs.gpr,v 1.1 2012/07/08 20:14:28 marino Exp $

--- docs/docs.gpr.orig	2011-01-25 20:53:19.000000000 +0000
+++ docs/docs.gpr
@@ -55,7 +55,7 @@ project Docs is
 
    package Binder is
       for Default_Switches ("Ada")
-         use Shared.Builder'Default_Switches ("Ada") & ("-static");
+         use Shared.Builder'Default_Switches ("Ada");
    end Binder;
 
    -------------

File Added: pkgsrc/www/aws/patches/Attic/patch-include_include.gpr
$NetBSD: patch-include_include.gpr,v 1.1 2012/07/08 20:14:28 marino Exp $

--- include/include.gpr.orig	2011-01-25 20:52:57.000000000 +0000
+++ include/include.gpr
@@ -40,6 +40,7 @@ project Include is
 
    for Library_Name use "aws_include";
    for Library_Kind use Shared.Library_Type;
+   for Library_Options use ("-R", "-Wl,-R,@ADDITIONAL_RPATH@");
 
    ---------
    -- Ide --

File Added: pkgsrc/www/aws/patches/Attic/patch-src_soap_soap-message-xml.adb
$NetBSD: patch-src_soap_soap-message-xml.adb,v 1.1 2012/07/08 20:14:28 marino Exp $

--- src/soap/soap-message-xml.adb.orig	2012-07-05 03:56:08.000000000 +0000
+++ src/soap/soap-message-xml.adb
@@ -437,7 +437,8 @@ package body SOAP.Message.XML is
             Faultstring => SOAP.Parameters.Get (S.Parameters, "faultstring"));
       else
          return Message.Response.Object'
-           (S.Name_Space, S.Wrapper_Name, S.Parameters);
+           (Message.Object'(S.Name_Space, S.Wrapper_Name, S.Parameters)
+            with null record);
       end if;
 
    exception
@@ -483,7 +484,8 @@ package body SOAP.Message.XML is
             Faultstring => SOAP.Parameters.Get (S.Parameters, "faultstring"));
       else
          return Message.Response.Object'
-           (S.Name_Space, S.Wrapper_Name, S.Parameters);
+           (Message.Object'(S.Name_Space, S.Wrapper_Name, S.Parameters)
+            with null record);
       end if;
 
    exception

File Added: pkgsrc/www/aws/patches/Attic/patch-src_src.gpr
$NetBSD: patch-src_src.gpr,v 1.1 2012/07/08 20:14:28 marino Exp $

--- src/src.gpr.orig	2011-01-25 20:52:57.000000000 +0000
+++ src/src.gpr
@@ -77,7 +77,7 @@ project Src is
             when "Windows_NT" =>
                for Library_Options use ("-lwsock32", "-lws2_32");
             when others =>
-               null;
+               for Library_Options use ("-R", "-Wl,-R,@ADDITIONAL_RPATH@");
          end case;
 
          case Shared.LDAP is