#! /bin/sh /usr/share/dpatch/dpatch-run
## 92-default-ACE_ROOT.dpatch by Thomas Girard <thomas.g.girard@free.fr>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Automatically set ACE_ROOT to /usr/share/ace in MPC generated
## DP: GNUmakefile if no ACE_ROOT is set.

@DPATCH@
--- ACE_wrappers.orig/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm
+++ ACE_wrappers/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm
@@ -89,6 +89,9 @@
             "ifeq (\$(findstring k,\$(MAKEFLAGS)),k)$crlf",
             "  KEEP_GOING = -$crlf",
             "endif$crlf$crlf",
+            "ifndef ACE_ROOT$crlf",
+            "  export ACE_ROOT = /usr/lib/ace$crlf",
+            "endif$crlf",
             "include \$(ACE_ROOT)/include/makeinclude/macros.GNU$crlf";
 
   if ($named) {
