Bug#903036: ahven: FTBFS with gcc-8: gnatmake does not support gpr projects anymore

2018-07-17 Thread Nicolas Boulenguez
Package: src:ahven
Followup-For: Bug #903036

The attached patch fixes an issue with dbusada and adds a regression
test.
>From f48c0b602f518cd85678789615ab529489072ad7 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez 
Date: Tue, 17 Jul 2018 16:06:21 +0200
Subject: Remove Library_Interface so that the shared library works with all
 sources visible.


diff --git a/debian/patches/no-library-interface.diff 
b/debian/patches/no-library-interface.diff
new file mode 100644
index 000..8fa0816
--- /dev/null
+++ b/debian/patches/no-library-interface.diff
@@ -0,0 +1,35 @@
+Description: do not use Library_Interface
+ Library_Interface intends to prevent the user using some sources
+ (Ada private packages are sufficient in most circumstances).
+ .
+ Debian Ada Policy requires all source code available for debugging purposes.
+ .
+ Library_Interface also removes some public symbols from the shared
+ library, causing an error when all sources are visible:
+ undefined reference to `ahven_compat_E'.
+Author: Nicolas Boulenguez 
+
+--- a/gnat_linux/build_ahven.gpr
 b/gnat_linux/build_ahven.gpr
+@@ -27,21 +27,6 @@
+case Comfignat.Library_Type is
+   when "dynamic" | "relocatable" =>
+  for Library_Version   use "libahven.so." & Version;
+- for Library_Interface use ("Ahven",
+-"Ahven.Framework",
+-"Ahven.Listeners",
+-"Ahven.Listeners.Basic",
+-"Ahven.Name_List",
+-"Ahven.AStrings",
+-"Ahven.Long_AStrings",
+-"Ahven.Results",
+-"Ahven.Parameters",
+-"Ahven.SList",
+-"Ahven.Runner",
+-"Ahven.Tap_Runner",
+-"Ahven.Temporary_Output",
+-"Ahven.Text_Runner",
+-"Ahven.XML_Runner");
+   when "static" =>
+  null;
+end case;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 000..5177149
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+no-library-interface.diff
diff --git a/debian/tests/link-with-shared b/debian/tests/link-with-shared
index b7e73bb..422ab85 100644
--- a/debian/tests/link-with-shared
+++ b/debian/tests/link-with-shared
@@ -8,8 +8,10 @@ project P is
for Main use ("p.adb");
 end P;
 EOF
+# Import Ahven.Text_Runner in order to check regression on the problem
+# described in no-library-interfaces.diff.
 cat > p.adb <

Bug#903036: ahven: FTBFS with gcc-8: gnatmake does not support gpr projects anymore

2018-07-17 Thread Nicolas Boulenguez
The attached patches fix two errors in previous propositions.
>From ec154cff3108e69ca3b90a1087bd4c9d9aa8eb05 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez 
Date: Tue, 17 Jul 2018 11:25:34 +0200
Subject: [PATCH 1/2] Fix transmission of shared object version.

---
 debian/rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index bfadf9f..478a4a9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,7 @@
 # Replace eval with error to debug.
 $(foreach line,$(shell sed -n '\
   s/^ gnat, gnat-\([0-9.]\+\),$$/ gnat_version:=\1 /p;\
-  s/^Package: libahven\([0-9.]\+\)$$/ VERSION:=\1  /p;\
+  s/^Package: libahven\([0-9.]\+\)$$/ ahven_soversion:=\1  /p;\
   ' debian/control),$(eval $(line)))
 
 doc_pkg := libahven-doc
@@ -15,7 +15,7 @@ include /usr/share/ada/debian_packaging-$(gnat_version).mk
 
 conf_args := \
   GNAT_BUILDER=gprbuild \
-  GNAT_BUILDER_FLAGS='$(BUILDER_OPTIONS)' \
+  GNAT_BUILDER_FLAGS='$(BUILDER_OPTIONS) -Xahven_soversion=$(ahven_soversion)' \
   $(foreach v,VERSION ADAFLAGS LDFLAGS,$(v)='$($(v))')
 
 %:
-- 
2.18.0

>From 2d4d51d72ae82b85a2986b817e3e2fb5c66b9da9 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez 
Date: Tue, 17 Jul 2018 11:25:41 +0200
Subject: [PATCH 2/2] Actually bump the ALI and SO versions.

---
 debian/control | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 1ec0c58..371eae9 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,7 @@ Homepage: https://www.ahven-framework.com/
 Vcs-Browser: https://git.codelabs.ch/?p=debian/ahven.git
 Vcs-Git: https://git.codelabs.ch/git/debian/ahven.git
 
-Package: libahven6-dev
+Package: libahven7-dev
 Section: libdevel
 Architecture: any
 Depends: ${misc:Depends}, ${ada:Depends}
@@ -33,7 +33,7 @@ Description: Unit test library for Ada (development)
  .
  This package contains the development files.
 
-Package: libahven27
+Package: libahven28
 # This line is parsed by debian/rules.
 Architecture: any
 Multi-Arch: same
-- 
2.18.0



Bug#903036: ahven: FTBFS with gcc-8: gnatmake does not support gpr projects anymore

2018-07-16 Thread Nicolas Boulenguez
Source: ahven
Followup-For: Bug #903036

The first attached patches fixes architecture-independant builds.

The second one is only a suggestion that I find easyer to maintain,
but feel free to reject it. The binary packages should be identical.


ahven3.tar.gz
Description: application/gzip


Bug#903036: ahven: FTBFS with gcc-8: gnatmake does not support gpr projects anymore

2018-07-16 Thread Nicolas Boulenguez
Package: src:ahven
Followup-For: Bug #903036

Hello.

The attachment implements the planned changes (patches are numbered
from 2 to 5, and should be applied on top of the previous attachment).

They are based on upstream revision 7007dc659385, in the hope that 2.7
will not change much and that we will spare another ALI version bump.

Please review the changes, and either allow an NMU or a sponsored
upload.  Once ahven has been updated, its reverse dependencies will
require similar work, and there is a deadline now (2018-08-22)
(because of XMLAda).

Thanks.


ahven2.tar.gz
Description: application/gzip


Bug#903036: ahven: FTBFS with gcc-8: gnatmake does not support gpr projects anymore

2018-07-05 Thread Nicolas Boulenguez
Source: ahven
Version: 2.6-1.2
Severity: normal

Hello.

The default Ada compiler in Debian will soon become gcc-8.
Your package fails to build with gcc-8 because gnatmake-8 does not support
GNAT projects (.gpr) anymore.
Please consider avoiding projects in your build system and/or
switching to the gprbuild tool.

A change of the major compiler version or a new upstream release
usually both require a bump of ALI and SO versions, then a passage
through the NEW queue.  You may want to take the opportunity and
package the apparently incoming 2.7.

2.7 only requires sphinx to build the manual. You may want to use the
same passage through NEW to introduce a separate -doc package
including the manual, now that it builds from source.

The attached trivial suggestions may be useful during the same update,
but does not fix the FTBFS issue.


ahven.tar.gz
Description: application/gzip