--- Ghidra/Features/FunctionID/build.gradle.orig	2019-10-23 20:54:54 UTC
+++ Ghidra/Features/FunctionID/build.gradle
@@ -75,7 +75,7 @@ task buildFidDocumentationPdf(type: Exec) {
 		cp $installPoint/topics/FunctionID/images/*.png $buildDir/images
 
 		echo '** Building FunctionID.fo **'
-		xsltproc --output $buildDir/fid_withscaling.xml --stringparam profile.condition "withscaling" /usr/share/sgml/docbook/xsl-stylesheets/profiling/profile.xsl fid.xml 2>&1
+		xsltproc --output $buildDir/fid_withscaling.xml --stringparam profile.condition "withscaling" /usr/local/share/xsl/docbook/profiling/profile.xsl fid.xml 2>&1
 		xsltproc --output $buildDir/FunctionID.fo fid_pdf.xsl $buildDir/fid_withscaling.xml 2>&1
 
 		echo '** Building FunctionID.pdf **'
@@ -98,9 +98,10 @@ task buildFidDocumentationPdf(type: Exec) {
 	// Check the OS before executing command.
 	doFirst {
 		if ( !(org.gradle.internal.os.OperatingSystem.current().isLinux() 
-			|| org.gradle.internal.os.OperatingSystem.current().isMacOsX())) {
+			|| org.gradle.internal.os.OperatingSystem.current().isMacOsX()
+			|| org.gradle.internal.os.OperatingSystem.current().getName().contains("FreeBSD"))) {
 			throw new TaskExecutionException( it,
-				new Exception( "The '$it.name' task only works on Linux or Mac Os X" ))
+				new Exception( "The '$it.name' task only works on Linux, FreeBSD or Mac Os X" ))
 		}
 	}
 
@@ -142,7 +143,7 @@ task buildFidDocumentationHtml(type: Exec) {
 	rm -f $installPoint/topics/FunctionID/*.html
 
 	echo '** Building html files **'
-	xsltproc --output $buildDir/fid_noscaling.xml --stringparam profile.condition "noscaling" /usr/share/sgml/docbook/xsl-stylesheets/profiling/profile.xsl fid.xml 2>&1
+	xsltproc --output $buildDir/fid_noscaling.xml --stringparam profile.condition "noscaling" /usr/local/share/xsl/docbook/profiling/profile.xsl fid.xml 2>&1
 	xsltproc --stringparam base.dir ${installPoint}/topics/FunctionID/ fid_html.xsl $buildDir/fid_noscaling.xml 2>&1
 	sed -i -e '/Frontpage.css/ { p; s/Frontpage.css/languages.css/; }' ${installPoint}/topics/FunctionID/*.html