openbsd-ports/editors/openoffice3/patches/patch-set_soenv_in
2009-06-02 21:48:39 +00:00

184 lines
7.0 KiB
Plaintext

--- set_soenv.in.orig.port Wed Apr 22 08:54:40 2009
+++ set_soenv.in Tue Jun 2 00:22:48 2009
@@ -812,6 +812,61 @@ elsif ( $platform =~ m/aix/ )
$OS = "AIX";
$PATH_SEPERATOR = $ps;
}
+elsif ( $platform =~ m/openbsd/ )
+{ print "Setting OpenBSD specific values... ";
+ $outfile = "OpenBSDEnv.Set";
+ $BIG_SVX = "TRUE";
+ $COM = "GCC";
+ $COMPATH = '@COMPATH@';
+ if ( $platform =~ m/^i386/ )
+ {
+ $CPU = "I";
+ $CPUNAME = "INTEL";
+ $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";
+ }
+ elsif ( $platform =~ m/^x86_64/ )
+ {
+ $CPU = "X";
+ $CPUNAME = "X86_64";
+ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64";
+ $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."server";
+ $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."native_threads";
+ $JREEXTRALIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."xawt";
+ }
+ elsif ( $platform =~ m/^amd64/ )
+ {
+ $CPU = "X";
+ $CPUNAME = "X86_64";
+ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64";
+ $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."server";
+ $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."native_threads";
+ $JREEXTRALIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."xawt";
+ }
+ elsif ($platform =~ m/^sparc64/)
+ {
+ $CPU = "S";
+ $CPUNAME = "SPARC";
+ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc64";
+ $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc64".$ds."server";
+ $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc64".$ds."native_threads";
+ $JREEXTRALIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc64".$ds."xawt";
+ }
+ $CVER = "C300";
+ $GUI = "UNX";
+ $GUIBASE = "unx";
+ $GVER = "VCL";
+ $OUTPATH = "unxobsd";
+ $INPATH = $OUTPATH.$PROEXT;
+ $OS = "OPENBSD";
+ $PATH_SEPERATOR = $ps;
+ $OSVERSION = '@OSVERSION@';
+ if( @GCCVER@ >= 30401 ) {
+ $CVER = "C341";
+ }
+}
else {
print "\nset_soenv: Cannot figure out what platform you are running\n";
print "For $platform.\n";
@@ -1076,7 +1131,7 @@ if ($platform =~ m/solaris/)
$ps.$JRETHREADDIR.
$ps.'$SOLARVER'.$ds.'$INPATH'.$LIB;
}
-elsif ($platform =~ m/linux|netbsd|osf1|freebsd|aix/)
+elsif ($platform =~ m/linux|netbsd|osf1|freebsd|aix|openbsd/)
{ $LD_LIBRARY_PATH = $cur_dir.
$ps.'$SOLARENV'.$ds.'$INPATH'.$LIB.
$ps.$JRELIBDIR.
@@ -1118,7 +1173,7 @@ if ($platform =~ m/solaris/)
$L.$USR_DT.$LIB.
$L.$USR_OPENWIN.$LIB;
}
-elsif ($platform =~ m/linux|netbsd|osf1|irix|freebsd|aix/)
+elsif ($platform =~ m/linux|netbsd|osf1|irix|freebsd|aix|openbsd/)
{
$SOLAREXTRALIB = $L.$par_dir.$LIB64;
}
@@ -1183,7 +1238,7 @@ if ($platform =~ m/cygwin|os2/)
}
# The general environment path.
-if ($platform =~ m/linux|netbsd|odf1|irix|freebsd|aix|solaris/)
+if ($platform =~ m/linux|netbsd|odf1|irix|freebsd|aix|solaris|openbsd/)
{ $PATH = $cur_dir.
$ps.'$SOLARVER'.$ds.'$INPATH'.$BIN.
$ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN.
@@ -1417,11 +1472,12 @@ if ($platform =~ m/solaris/)
$L_STLPORT_LIB.
$L.$XLIB;
}
-elsif ($platform =~ m/linux|netbasd|osf1|irix|aix|freebsd/)
+elsif ($platform =~ m/linux|netbasd|osf1|irix|aix|freebsd|openbsd/)
{ $SOLARLIB = $L.$par_dir.$LIB.
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
$L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
+ $L.$USR_LOCAL.$LIB.
$L.'$JAVA_HOME'.$LIB64.
$L.$JRELIBDIR.
$L.$JRETOOLKITDIR.
@@ -1445,7 +1501,19 @@ elsif ($platform =~ m/darwin/)
}
}
-
+elsif ($platform =~ m/openbsd/)
+{ $SOLARLIB = $L.$par_dir.$LIB.
+ $L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
+ $L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
+ $L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
+ $L.$USR_LOCAL.$LIB.
+ $L.'$JAVA_HOME'.$LIB64.
+ $L.$JRELIBDIR.
+ $L.$JRETOOLKITDIR.
+ $L.$JRETHREADDIR.
+ $L_STLPORT_LIB.
+ $L.$XLIB;
+}
if ($SYSTEM_MOZILLA eq "YES")
{
$SOLARLIB .= $L."@MOZ_LIB@"
@@ -1460,10 +1528,10 @@ $SOLARINC = $I.$cur_dir.
$I.'$SOLARENV'.$INC.
$I.'$SRC_ROOT'.$ds."res";
-if ($platform =~ m/solaris|linux|osf1|freebsd|netbsd|irix/)
+if ($platform =~ m/solaris|linux|osf1|freebsd|netbsd|irix|openbsd/)
{
$SOLARINC .= $STLPORT_stlport;
-if ($platform =~ m/linux|freebsd|netbsd/)
+if ($platform =~ m/linux|freebsd|netbsd|openbsd/)
{
# This simply adds an include path, so even cases that break the FHS work
$SOLARINC .= $STLPORT_inc_stlport;
@@ -1485,9 +1553,15 @@ if ($platform =~ m/linux/)
}
- $SOLARINC .= $I.'$SOLARENV'.$INC.$ds."Xp31".
- $I.'$JAVA_HOME'.$INCLUDE;
+ $SOLARINC .= $I.'$SOLARENV'.$INC.$ds."Xp31";
+ # pickup system jpeg over java jpeg
+ if ($platform =~ m/openbsd/)
+ { $SOLARINC .= $I.$USR_LOCAL.$INCLUDE;
+ }
+
+ $SOLARINC .= $I.'$JAVA_HOME'.$INCLUDE;
+
#include system dependent Java include directory
if (!($JDK eq "gcj"))
{
@@ -1509,13 +1583,16 @@ if ($platform =~ m/linux/)
elsif ($platform =~ m/irix/)
{ $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."irix";
}
+ elsif ($platform =~ m/openbsd/)
+ { $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."openbsd";
+ }
#java threads include path
$SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."native_threads".$ds."include";
}
#The tail, if needed
- if ($platform =~ m/linux|freebsd|netbsd/)
+ if ($platform =~ m/linux|freebsd|netbsd|openbsd/)
{ $SOLARINC .= $I.$XINC;
}
elsif ($platform =~ m/osf1/)
@@ -2127,6 +2204,7 @@ if ($platform =~ m/os2/)
ToFile( "SWITCHAR", "-", "e");
}
ToFile( "SAL_ENABLE_FILE_LOCKING", "1", "e");
+
#
# Writing unset variables you might not need to file.
#