$OpenBSD: patch-config_office_set_soenv_in,v 1.2 2006/08/20 03:36:52 kurt Exp $
--- config_office/set_soenv.in.orig.port	Wed Jul 19 05:52:27 2006
+++ config_office/set_soenv.in	Fri Aug 18 15:47:46 2006
@@ -368,6 +368,34 @@ elsif ( $platform =~ m/freebsd/ ) 
       $INPATH         = $OUTPATH.$PROEXT;
       $GVERDIR        = $INPATH;
 } 
+elsif ( $platform =~ m/openbsd/ )
+{     print "Setting OpenBSD specific values... ";
+      $outfile        = "OpenBSDEnv.Set";
+      $BIG_SVX        = "TRUE";
+      $COM            = "GCC";
+      $COMPATH        = '@COMPATH@';
+      $CPU            = "I";
+      $CPUNAME        = "INTEL";
+      $CVER           = "C300";
+      $GUI            = "UNX";
+      $GUIBASE        = "unx";
+      $GUIENV         = "sal";
+      $GVER           = "VCL";
+      $OUTPATH        = "unxobsd";
+      $INPATH         = $OUTPATH.$PROEXT;
+      $GVERDIR        = $INPATH;
+      $OS             = "OPENBSD";
+      $PATH_SEPERATOR = $ps;
+      $XPVERSION      = "3";
+      $OSVERSION      = '@OSVERSION@';
+      $JRELIBDIR      = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
+      $JRETOOLKITDIR  = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
+      $JRETHREADDIR   = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
+      $JREEXTRALIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."xawt";
+      if( @GCCVER@ >= 30401 ) {
+         $CVER        = "C341";
+      }
+}
 elsif ( $platform =~ m/linux-gnu/ ) 
 {
 # General Linux settings:
@@ -935,7 +963,7 @@ if ($platform =~ m/solaris/) 
                         $ps.$JRETHREADDIR.
                         $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$LIB;
 }
-elsif ($platform =~ m/linux-gnu|netbsd|osf1|freebsd|aix/)
+elsif ($platform =~ m/linux-gnu|netbsd|osf1|openbsd|freebsd|aix/)
 {  $LD_LIBRARY_PATH   = $cur_dir.
                         $ps.'$SOLARENV'.$ds.'$INPATH'.$LIB.
                         $ps.$JRELIBDIR.
@@ -984,7 +1012,7 @@ if ($platform =~ m/solaris/) 
                         $D."SUPD=$UPD".
                         $D."UPDVER=".'""'."'".'"'."'".'"'."SV$UPD".'"'."'".'"'."'".'"'.'"';
 }
-elsif ($platform =~ m/linux-gnu|netbsd|freebsd|osf1|irix|aix/)
+elsif ($platform =~ m/linux-gnu|netbsd|openbsd|freebsd|osf1|irix|aix/)
 {  $SOLARDEF          = $D."UNX".
                         $D.$COM.
                         $D.$CVER.
@@ -1021,7 +1049,7 @@ if ($platform =~ m/solaris/) 
                         $L.$USR_DT.$LIB.
                         $L.$USR_OPENWIN.$LIB;
 }
-elsif ($platform =~ m/linux-gnu|netbsd|osf1|irix|freebsd|aix/)
+elsif ($platform =~ m/linux-gnu|netbsd|osf1|irix|openbsd|freebsd|aix/)
 {
    $SOLAREXTRALIB     = $L.$par_dir.$LIB64;
 }
@@ -1062,7 +1090,7 @@ if ($platform =~ m/cygwin/)
 }
      
 # The general environment path.
-if ($platform =~ m/linux-gnu|netbsd|odf1|irix|freebsd|aix|solaris/)
+if ($platform =~ m/linux-gnu|netbsd|odf1|irix|openbsd|freebsd|aix|solaris/)
 {  $PATH              = $cur_dir.
                         $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$BIN.
                         $ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN.
@@ -1240,7 +1268,7 @@ if ($platform =~ m/solaris/) 
                         $L_STLPORT_LIB.
                         $L.$XLIB;
 }
-elsif ($platform =~ m/linux-gnu|netbasd|osf1|irix|aix|freebsd/)
+elsif ($platform =~ m/linux-gnu|netbasd|osf1|irix|aix|openbsd|freebsd/)
 {  $SOLARLIB          = $L.$par_dir.$LIB.
                         $L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
                         $L.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$LIB.
@@ -1283,10 +1311,10 @@ $SOLARINC             = $I.$cur_dir.
                         $I.'$SOLARENV'.$INC.
                         $I.'$SRC_ROOT'.$ds."res";
 
-if ($platform =~ m/solaris|linux-gnu|osf1|freebsd|netbsd|irix/)
+if ($platform =~ m/solaris|linux-gnu|osf1|openbsd|freebsd|netbsd|irix/)
 {
 $SOLARINC	     .= $STLPORT_stlport;
-if ($platform =~ m/linux|freebsd|netbsd/)
+if ($platform =~ m/linux|openbsd|freebsd|netbsd/)
 {
 # This simply adds an include path, so even cases that break the FHS work
 $SOLARINC            .= $STLPORT_inc_stlport;
@@ -1326,6 +1354,11 @@ if ($platform =~ m/linux-gnu/)
       		$SOLARINC   .=$I.'$JAVA_HOME'.$INCLUDE.$ds."bsd";
       		$SOLARINC   .=$I.'$JAVA_HOME'.$INCLUDE.$ds."linux";
    		}
+		elsif ($platform =~ m/openbsd/)
+		{
+		$SOLARINC   .=$I.'$JAVA_HOME'.$INCLUDE.$ds."openbsd";
+		$SOLARINC   .=$I.'$JAVA_HOME'.$INCLUDE.$ds."bsd";
+		}
    		elsif ($platform =~ m/netbsd/)
    		{  $SOLARINC   .=$I.'$JAVA_HOME'.$INCLUDE.$ds."netbsd";
    		}
@@ -1338,7 +1371,7 @@ if ($platform =~ m/linux-gnu/)
    		$SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."native_threads".$ds."include";
 	}
     #The tail, if needed
-    if ($platform =~ m/linux-gnu|freebsd|netbsd/)
+    if ($platform =~ m/linux-gnu|openbsd|freebsd|netbsd/)
     {  $SOLARINC  .= $I.$XINC;
     }
     elsif ($platform =~ m/osf1/)
