freebsd-ports/editors/openoffice/files/patch-solenv+bin+getcompver.awk
Martin Blapp 6f36732a2d Make openoffice compile with gcc from ports, or just with CC=$CC and
CXX=$CXX, like it should normally be. Usable options are:

USEPORTGCC295=YES, USEPORTGCC31=YES and USEPORTGCC32=YES

Add a lot off gcc3.x fixes, make included stlport compile with CURRENT.

Next step will be to include a mozilla build, so we can link openoffice
against mozilla librarys without c++ compat problems.
2002-05-29 13:58:09 +00:00

44 lines
1.2 KiB
Awk

--- ../solenv/bin/getcompver.awk.orig Tue May 28 13:09:01 2002
+++ ../solenv/bin/getcompver.awk Tue May 28 13:08:14 2002
@@ -61,9 +61,11 @@
#*************************************************************************
BEGIN {
CCversion = 0
+ compiler_matched = 0
}
# Sun c++ compiler
/Sun WorkShop/ {
+ compiler_matched = 1
# version number right after "C++"
x = match( $0, /C\+\+ .*/ )
btwn = substr( $0, RSTART, RLENGTH)
@@ -73,12 +75,28 @@
}
# Microsoft c++ compiler
/Microsoft.*..\...\...../ {
+ compiler_matched = 1
# match on the format of the ms versions ( dd.dd.dddd )
x = match( $0, /..\...\...../ )
CCversion = substr( $0, RSTART, RLENGTH)
}
+# Java
+/java version/ {
+ compiler_matched = 1
+ # match on the format of the java versions ( d[d].d[d].d[d] )
+ x = match( $0, /".*\..*\..*"/ )
+ CCversion = substr( $0, RSTART+1, RLENGTH-2)
+}
+/^[0-9]*[.][0-9]*$/ {
+ if ( compiler_matched == 0 ) {
+# need to blow to x.xx.xx for comparing
+ CCversion = $0 ".0"
+ }
+}
/^[0-9]*[.][0-9]*[.][0-9]*$/ {
- CCversion = $0
+ if ( compiler_matched == 0 ) {
+ CCversion = $0
+ }
}
END {
if ( num == "true" ) {