$OpenBSD: patch-Ghidra_Features_Decompiler_build_gradle,v 1.2 2020/07/19 01:29:23 lteo Exp $

From https://github.com/NationalSecurityAgency/ghidra/pull/490

Index: Ghidra/Features/Decompiler/build.gradle
--- Ghidra/Features/Decompiler/build.gradle.orig
+++ Ghidra/Features/Decompiler/build.gradle
@@ -78,8 +78,10 @@ def installPoint = "$rootDir/GhidraDocs/languages/html
  */
 task buildDecompilerDocumentationPdfs(type: Exec) {
 	// Check the OS before enabling task.
+	String osName = System.getProperty("os.name")
 	if (!(org.gradle.internal.os.OperatingSystem.current().isLinux() 
-		|| org.gradle.internal.os.OperatingSystem.current().isMacOsX())) {
+		|| org.gradle.internal.os.OperatingSystem.current().isMacOsX()
+		|| isOpenBSD(osName))) {
 			it.enabled = false
 	}
 
@@ -209,10 +211,12 @@ task buildDecompilerDocumentationHtml(type: Exec) {
 
 		// Check the OS before executing command.
 		doFirst {
+			String osName = System.getProperty("os.name")
 			if ( !(org.gradle.internal.os.OperatingSystem.current().isLinux() 
-				|| org.gradle.internal.os.OperatingSystem.current().isMacOsX())) {
+				|| org.gradle.internal.os.OperatingSystem.current().isMacOsX()
+				|| isOpenBSD(osName))) {
 				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 or Mac OS X, or OpenBSD" ))
 			}
 		}
 
@@ -248,6 +252,7 @@ model {
 			targetPlatform "win64"
 			targetPlatform "linux64"
 			targetPlatform "osx64"
+			targetPlatform "openbsd64"
 			sources {
 				cpp {
 		            source {
@@ -345,6 +350,7 @@ model {
 			targetPlatform "win64"
 			targetPlatform "linux64"
 			targetPlatform "osx64"
+			targetPlatform "openbsd64"
 			sources {
 				cpp {
 					source {
