From 4bf7b0950bd6b4cff4e092cf6bb7337a30c76db7 Mon Sep 17 00:00:00 2001
From: Anthony Mallet <anthony.mallet@laas.fr>
Date: Fri, 6 Jun 2014 10:37:54 +0200
Subject: [PATCH] [wip/genom3-openprs] Upstream fix for private exceptions

This fixes the build of components defining exceptions that are not in the
public interface (e.g. exceptions thrown by tasks).
---
 genom3-openprs/Makefile         |  2 +-
 genom3-openprs/distinfo         |  1 +
 genom3-openprs/patches/patch-aa | 19 +++++++++++++++++++
 3 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 genom3-openprs/patches/patch-aa

diff --git a/genom3-openprs/Makefile b/genom3-openprs/Makefile
index 6809e27d..bec621a7 100644
--- a/genom3-openprs/Makefile
+++ b/genom3-openprs/Makefile
@@ -2,7 +2,7 @@
 # Created:			Anthony Mallet on Sun, 28 Jan 2007
 #
 
-PKGREVISION=	1
+PKGREVISION=	2
 DISTNAME=	genom3-openprs-1.0.6
 CATEGORIES=	architecture
 MASTER_SITES=	${MASTER_SITE_OPENROBOTS:=genom3-openprs/}
diff --git a/genom3-openprs/distinfo b/genom3-openprs/distinfo
index 8eca21e6..c9a1afe0 100644
--- a/genom3-openprs/distinfo
+++ b/genom3-openprs/distinfo
@@ -1,3 +1,4 @@
 SHA1 (genom3-openprs-1.0.6.tar.gz) = 9d7740f3ef344817255c49491fbcde6381f948f4
 RMD160 (genom3-openprs-1.0.6.tar.gz) = 31b567ed8f2396f8cf957b4ca53efbe69fdba066
 Size (genom3-openprs-1.0.6.tar.gz) = 61419 bytes
+SHA1 (patch-aa) = b81520e5d19585be76118bf4ed06edeba393e64e
diff --git a/genom3-openprs/patches/patch-aa b/genom3-openprs/patches/patch-aa
new file mode 100644
index 00000000..de58c8e3
--- /dev/null
+++ b/genom3-openprs/patches/patch-aa
@@ -0,0 +1,19 @@
+Private exceptions will not be defined for a client (since they cannot be
+thrown).
+
+This fixes the build of component defining exceptions thrown only by tasks.
+
+diff --git a/client/EncodeDecodeOpenprs.c b/client/EncodeDecodeOpenprs.c
+index a776c90..d99b98b 100644
+--- client/EncodeDecodeOpenprs.c
++++ client/EncodeDecodeOpenprs.c
+@@ -485,7 +485,8 @@ Term *genom_oprs_<"$comp">_exception(genom_event e, const void *detail)
+ 	  free(s);
+ 	  return res;
+      }
+-<'foreach e [$component throws] {'>
++<'foreach e [$component types public] {'>
++<'  if {[$e kind] != "exception"} continue'>
+      else if (e == <"[$e cname]">_id) {
+ <'  if {[llength [$e members]]} {'>
+        return build_<"$comp">_exception_term("<"[$e cname]">", decode_g3_<"[$e mangle]">(detail));
-- 
GitLab