Description: starting from version 2.7.0, beast2 needs beastfx for its build.
 We handle this through a MUT package, so that layout of the build tree is a
 bit different from the one upstream uses.
 This implies checking the list of services in the right directory when running
 the unit tests.
Author: Pierre Gruet <pgt@debian.org>
Forwarded: not-needed
Last-Update: 2022-10-27

--- a/build.xml
+++ b/build.xml
@@ -9,7 +9,7 @@
     </description>
 
     <!-- set global properties for this build -->
-    <property name="beast2" location="../beast2"/>
+    <property name="beast2" location=".."/>
     <property name="src" location="${beast2}/src"/>
     <property name="build" location="${beast2}/build" />
     <property name="lib" location="${beast2}/lib" />
@@ -17,8 +17,8 @@
     <property name="dist" location="${beast2}/build/dist" />
     <property name="test" location="${beast2}/test" />
     
-    <property name="BEASTappName" value="BeastFX" />
-    <property name="beast2app" location="../${BEASTappName}"/>
+    <property name="BEASTappName" value="." />
+    <property name="beast2app" location="${BEASTappName}"/>
     <property name="distapp" location="${beast2app}/build/dist"/>
     <property name="templates" value="fxtemplates"/>
 
--- a/beastfx/build.xml
+++ b/beastfx/build.xml
@@ -8,14 +8,14 @@
 	</description>
 
 	<!-- set global properties for this build -->
-	<property name="BeastFX" value="BeastFX" />
+	<property name="BeastFX" value="beastfx" />
 	<property name="srcFX" location="../${BeastFX}/src" />
 	<property name="buildFX" location="../${BeastFX}/build" />
 	<property name="libFX" location="../${BeastFX}/locallib" />
 	<property name="resourcesFX" location="../${BeastFX}/resources" />
 
 	<property name="distFX" location="${buildFX}/dist" />
-	<property name="beast2path" location="../beast2" />
+	<property name="beast2path" location=".." />
 	<property name="srcBeast2" location="${beast2path}/src" />
 	<property name="beast2classpath" location="${beast2path}/build" />
 	<property name="Add_on_dir" value="${release_dir}/add-on" />
--- a/src/beast/pkgmgmt/BEASTClassLoader.java
+++ b/src/beast/pkgmgmt/BEASTClassLoader.java
@@ -193,6 +193,9 @@
 			for (String jarFileName : classPath.substring(1, classPath.length() - 1).split(File.pathSeparator)) {
 				File jarFile = new File(jarFileName);
 				try {
+					if (new File("../version.xml").exists()) {
+                        addServices("../version.xml");
+                    }
 					String parentDir = jarFile.isDirectory() ?							
 							(jarFile.getParentFile() == null ? File.pathSeparator :jarFile.getParentFile().getPath()) :
 							(jarFile.getParentFile() == null  || jarFile.getParentFile().getParentFile() == null ? File.pathSeparator :
