p4conf.rb #1

  • //
  • guest/
  • perforce_software/
  • p4ruby/
  • main/
  • p4conf.rb
  • View
  • Commits
  • Open Download .zip Download (15 KB)
#*******************************************************************************
# Usage:
#
#	ruby p4conf.rb  --apidir=<path to api> \
#			--apibuild=<Perforce API build> \
#                      --gccver=[23]
#
#	<Perforce API build> should be the identifier of the Perforce API
#	build you downloaded from the website. This is the same as the
#	directory you got it from, but without the leading "bin.". For
#	example, if you downloaded the API build from:
#
#	http://www.perforce.com/downloads/perforce/r05.1/bin.linux26amd64/
#
#	then the API build identifier is 'linux26amd64'
#
#	--gccver defaults to 3 if not specified.
#
#*******************************************************************************
require 'mkmf'
require 'rbconfig'
require "getoptlong"

class ApiVersion
    def initialize( major, minor = nil )
	if( major.kind_of?( String ) && ! minor )
	    if( major =~ /(\d+)\.(\d+)/ )
		major = $1
		minor = $2
	    else
		raise( "Bad API version: #{major}" )
	    end
	end

	@major 	= major.to_i
	@minor	= minor.to_i
    end

    attr_reader :major, :minor

    include Comparable

    def to_s
	"#{major}.#{minor}"
    end

    def to_i
	major << 8 | minor
    end

    def <=>( other )
	hi = @major <=> other.major
	lo = @minor <=> other.minor

	return hi == 0 ? lo : hi
    end
end

#*******************************************************************************
# Prompt the user for something
#*******************************************************************************
def prompt( str, testproc )
    while true
	print( str + ": " )
	val = $stdin.gets.chomp
	break if ( testproc.call( val ) )
    end
    return val
end


#*******************************************************************************
# Find out as much info about the platform as we can. Ideally we want to
# determine the OS name, version and CPU architecture so we can decide
# which compiler flags should be used for the Perforce API for that
# platform.
#*******************************************************************************
def probe_platform

    #
    # Work out the target OS, Version, and Platform
    #
    $p4osplat = CONFIG[ 'host_cpu' ].upcase
    $p4osname = CONFIG[ 'host_os' ].upcase
    $p4osname = $p4osname.gsub( /MSWIN32/, "NT" )
    $p4osname = $p4osname.split( "-" ).shift
    $p4osver  = ""

    # Translate Ruby's arch names into Perforce's. Mostly the same so
    # only the exceptions are handled here.
    if( $p4osplat =~ /^I.86$/ )
	$p4osplat = "X86"
    elsif( $p4osplat == "X86_64" )
	$p4osplat = "AMD64"
    end

    # Now work out the OS version
    if( $p4osname == "NT" )
	$p4osver = ""
    elsif( $p4osname =~ /FREEBSD([0-9]+)/ )
	$p4osname = "FREEBSD"
	$p4osver = $1
    elsif( $p4osname =~ /DARWIN([0-9]+)/ )
	$p4osname = "DARWIN"
	$p4osver = $1
    else
	# Try running a 'uname -r' to work out the version
	begin
	    $p4osver=`uname -r`
	    ver_re = /^(\d+)\.(\d+)/
	    if( md = ver_re.match( $p4osver ) )
		maj = md[1].to_i
		min = md[2].to_i

		# Convert Solaris 5.6 into 2.6.
		if( $p4osname == "SOLARIS" )
		    maj -= 3
		end

		$p4osver = maj.to_s + min.to_s
	    end
	rescue
	    # Nothing - if it failed, it failed.
	end
    end
end

#*******************************************************************************
# Allow the user to override our guesses as to the platform and provide
# an explicit API build version.
#*******************************************************************************
def override_platform( plat )

    archs = %w{ x86 amd64 ppc sparc arm axp }

    # Build the regular expression we're going to use, first as a string
    plat_re = '(\D+)(\d+)?('
    plat_re += archs.join( '|' )
    plat_re += ')?'

    # Now convert to a regexp
    plat_re = Regexp.new( plat_re )

    if( md = plat_re.match( plat ) )
	$p4osname = md[ 1 ].upcase
	$p4osver  = md[ 2 ] || ""
	$p4osplat = ( md[ 3 ] || "" ).upcase
    end
end

#*******************************************************************************
# Add the #define for const_char='const char' on platforms that need it
#*******************************************************************************
def set_const_char()
    $CFLAGS += %Q{-Dconst_char="const char" }
end
    
#*******************************************************************************
# Set platform specific compile options
#*******************************************************************************
def set_platform_cflags
    $CFLAGS += "-DOS_#{$p4osname} "
    $CFLAGS += "-DOS_#{$p4osname}#{$p4osver} "
    $CFLAGS += "-DOS_#{$p4osname}#{$p4osver}#{$p4osplat} "

    if( $p4osname == "NT" )
      $CFLAGS += "/DCASE_INSENSITIVE "
      $CFLAGS += "/MT "
    end

    if( $p4osname == "SOLARIS" )
	$CFLAGS += "-Dsolaris "
	# Solaris 2.7 and later require -Dconst_char="const char"
	if ( $p4osver.to_i >= 27 )
	    set_const_char()
	end
    elsif( $p4osname == "LINUX" && $p4osplat == "AMD64" )
	set_const_char()
    end

    if( $p4osname == "DARWIN" )
	$CFLAGS += "-DCASE_INSENSITIVE "
    end
end

#*******************************************************************************
# Set platform specific build options
#*******************************************************************************
def set_platform_opts
    if ( $p4osname == "CYGWIN" && $p4gccver == 2 )
	CONFIG[ "CC" ] = "gcc-2"
	CONFIG[ "CXX" ] = "g++-2"
	CONFIG[ "LDSHARED" ].gsub!( /g\+\+/, "g++-2" ) 
    elsif ( $p4osname == "DARWIN" && $p4gccver == 2 )
	CONFIG[ "CC" ] = "gcc2"
	CONFIG[ "CXX" ] = "g++2"
	CONFIG[ "LDSHARED" ].sub!( /^cc/, "g++2" ) 
    elsif ( $p4osname == "DARWIN" )
	CONFIG[ "LDSHARED" ] = CONFIG[ "CXX" ] + " -bundle"
    elsif ( $p4osname == "FREEBSD" )
	# FreeBSD 6 at least uses cc for linking by default
	CONFIG[ "LDSHARED" ].sub!( /^cc/, "c++" ) 
    end
end


#*******************************************************************************
# Use platform libs. Call *before* adding the API libs to preserve linking 
# order.
#*******************************************************************************
def use_platform_libs
    if ( $p4osname == "SOLARIS" )
	osver = `uname -r`
	osver.gsub!( /5\./, "2" )
	if ( osver == "25" )
	    $LDFLAGS += "/usr/ucblib/libucb.a "
	end
	use_lib( "nsl" )
	use_lib( "socket" )
    elsif ( $p4osname == "NT" )
	use_lib( "advapi32" )
	use_lib( "wsock32" )
	use_lib( "kernel32" )
	use_lib( "oldnames" )
	use_lib( "libcmt" )
    elsif( $p4osname == "CYGWIN" )
        # Clear out the bogus libs on cygwin.
        CONFIG[ "LIBS" ] = ""
    elsif( $p4osname == "DARWIN" && $p4osver.to_i >= 8 )
	$LDFLAGS += " -framework Carbon"
    end
end


#*******************************************************************************
# Set directory for the Perforce API 
#*******************************************************************************
def set_apidir( path )
    libdir = path + "/lib"
    libdir = File.directory?( libdir ) ? libdir : path 

    hdrdir = path + "/include/p4"
    hdrdir = File.directory?( hdrdir ) ? hdrdir : path

    $LIBPATH = [ libdir ] | $LIBPATH 
    $CFLAGS += " -I#{hdrdir} "
end

#*******************************************************************************
# Get the version of the Perforce API in a directory
#*******************************************************************************
def get_api_version( dir )
    #
    # 2007.2 and later APIs put the Version file in the 'sample' 
    # subdirectory. Look there if we can't find it in the API root
    #
    ver_file = dir + "/Version"
    unless File.exists?( ver_file )
	ver_file = dir + "/sample/Version"
	return nil unless File.exists?( ver_file )
    end

    re = Regexp.new( '^RELEASE = (\d+)[\. ](\d+)' )
    apiver = nil
    File.open( ver_file, "r" ) do
	|f|
	f.each_line do
	    |line|
	    if md = re.match( line ) 
		apiver = ApiVersion.new( md[ 1 ],  md[ 2 ] )
		break
	    end
	end
    end
    return apiver
end
		
#*******************************************************************************
# Function to check that the version of the API used is digestible
#*******************************************************************************
def check_api_version( ver )
    return true if ver <= $MAX_API_VERSION

    puts <<EOS

This version of P4Ruby was designed to be used with the #{$MAX_API_VERSION}
Perforce C++ API. It may not work with later versions of the API.

EOS
    print( "Would you like to continue (y/n): " )
    answer = $stdin.gets.chomp
    return false unless answer == "y"
    true
end

#*******************************************************************************
# function for generating a correctly formatted #define string
#*******************************************************************************
def define( macro, value, string=true )
    if( string )
	%Q{#define #{macro}\t"#{value}"}
    else
	%Q{#define #{macro}\t#{value}}
    end
end

#*******************************************************************************
#* Write the extconf.h file 
#*******************************************************************************
def write_extconf_h
    File.open( "extconf.h", "w" ) do
	|ch|
	ch.puts( "#include <version.h>" )
	ch.puts( define( "P4APIVER_STRING",	$apiver ) )
	ch.puts( define( "P4APIVER_ID", 	$apiver.to_i, false ) )
	ch.puts( define( "P4OSNAME",		$p4osname ) )
	ch.puts( define( "P4OSPLAT",		$p4osplat ) )
	ch.puts( define( "P4OSVER",		$p4osver ) )
	ch.puts( define( "P4CFLAGS", 		$CFLAGS.gsub( '"', '\"' ) ) )
	ch.puts( define( "P4LIBPATH",		$LIBPATH.join( ":" ) ) )
	ch.puts( define( "P4LIBS",   		$libs ) )
	ch.puts <<EOS
#if RUBY_VERSION_MAJOR == 1 && RUBY_VERSION_MINOR == 6
#  define P4RUBY_FUNC_CAST( f ) ((VALUE (*)()) f)
#else
#  define P4RUBY_FUNC_CAST( f ) ((VALUE (*)( VALUE )) f)
#endif
EOS
    end
end

#*******************************************************************************
# Add a Perforce API library making sure it's properly named on NT
#*******************************************************************************
def api_lib( lib )
    rlib = lib
    rlib = "lib" + lib if ( $p4osname == "NT" )
    use_lib( rlib )
end
 
#*******************************************************************************
# Add a library to the link command bypassing lame have_library/find_library
# which utterly suck for C++ libs. 
# NOTE: Add libs in *reverse* order.
#*******************************************************************************
def use_lib( lib ) 
    $libs = append_library( $libs, lib )
end

#*******************************************************************************
# Function to write the makefile itself. This is mostly a wrapper around
# mkmf's create_makefile(), but due to some deficiencies in mkmf w.r.t C++
# sources, we occasionally have to edit the makefile
#*******************************************************************************
def write_makefile( name )
    create_makefile( name )
    if ( CONFIG[ "CC" ] =~ /gcc/ )
	# Then we need to add a definition of CXX to the makefile
	# or the build will fail on some platforms (Cygwin at least).
	File.unlink( "Makefile.tmp" ) if File.exists?( "Makefile.tmp" )
	File.rename( "Makefile", "Makefile.tmp" )
	inmf = File.open( "Makefile.tmp" )
	outmf = File.open( "Makefile", "w+" )
	seen = false
	inmf.each do
	    |line|
	    if ( !seen && line =~ /^CC = / )
		outmf.puts( "CXX = " + CONFIG[ "CXX" ] )
		seen = true
	    end
	    outmf.puts( line )
	end
	inmf.close
	outmf.close
	File.unlink( "Makefile.tmp" )
    end


end

#*******************************************************************************
# Start of main functionality
#*******************************************************************************

#
# Maximum version of the Perforce API this build of P4Ruby knows how to
# work with
#
$MAX_API_VERSION = ApiVersion.new( 2007, 2 )

opts = GetoptLong.new(
		[ "--apidir",	"-d", 	GetoptLong::REQUIRED_ARGUMENT ],
		[ "--apibuild",	"-b",	GetoptLong::REQUIRED_ARGUMENT ],
		[ "--gccver",		GetoptLong::REQUIRED_ARGUMENT ]
		)
$apidir = nil
$apiver = nil
$apibuild = nil
$p4gccver = 3

#*******************************************************************************
# C++ programs should be linked with g++ not with gcc. mkmf doesn't get that
# right, so we have to hack it a little here. This particularly affects
# gcc 3.x users as older gcc versions didn't mind too much. Since mkmf is
# pretty convoluted it seems the safest way to ensure that g++ is used is
# to update the CC value as that ripples through the Makefile
#*******************************************************************************

if ( CONFIG[ "CC" ] =~ /gcc/ )
    CONFIG[ "CC" ].sub!( /gcc/, "g++" )
    CONFIG[ 'LDSHARED' ].sub!( /gcc/, "g++" )
    CONFIG[ "CXX" ] = CONFIG[ "CC" ] unless CONFIG.has_key?( "CXX" )
end

opts.each do
    |opt,arg|
    if ( opt == "--apidir" )
	$apidir = File.expand_path( arg ) 
    elsif( opt == "--apibuild" )
	$apibuild = arg
    elsif( opt == "--gccver" )
	$p4gccver = arg[0,1].to_i 
    end
end

puts( "" )
puts( "Starting to configure P4/Ruby for building" )
puts( "" )

#
# Guess the platform we're on, and then allow the user to override our
# guesswork if necessary
#
probe_platform()
override_platform( $apibuild )

#
# If the user has not supplied the api directories or apiver we prompt for them
#
dirproc = Proc.new {
	    |dir|
	    dir = File.expand_path( dir )
	    if ( ! File.directory?( dir ) )
		puts( "No such directory. Try again" )
		false
	    else
		true
	    end
	}

if ( ! $apidir )
    $apidir = prompt( "Enter the path to the Perforce API", dirproc )
    $apidir = File.expand_path( $apidir )
end

# 
# Read the Version file in the API directory to find the API version string
# and add this to the build environment
#

#
# If we failed to work this out, we have to ask the user.
#
verproc = Proc.new {
	    |ver|
	    if( ver =~ /(\d+)\.(\d+)/ )
		true
	    else
		puts( "Not a valid Perforce version. Try again." )
		false
	    end
	}

$apiver = get_api_version( $apidir )
if( !$apiver )
    while( ! $apiver )
	$apiver = prompt( "Enter the version of the Perforce API", verproc )
    end
    $apiver = ApiVersion.new( $apiver )
end

# 
# Check that the version of the API is one we can cope with, or that the
# user wants to punt.
#
exit( 1 ) unless check_api_version( $apiver )

set_apidir( $apidir )
set_platform_opts()
set_platform_cflags()

#
# 2006.1 or later API builds always need const_char defined
#
sixone = ApiVersion.new( 2006, 1 )
set_const_char() if( $apiver >= sixone )

use_platform_libs()

# Perforce API libraries - in reverse order 
api_lib( "supp" )
api_lib( "rpc" )
api_lib( "client" )

# 
# OK, now we know what we're going to do, let's tell the user
#
puts <<EOS

P4/Ruby Configuration Summary
-----------------------------

Using Perforce API Version: #{$apiver}
API headers and libs from : #{$apidir}
OS name                   : #{$p4osname}
OS version                : #{$p4osver}
Platform                  : #{$p4osplat}
CFLAGS                    : #{$CFLAGS}
LIBPATH                   : #{$LIBPATH.join(":")}
libs                      : #{$libs}

EOS

puts( "Creating extconf.h" )
write_extconf_h
write_makefile( "P4" )
# Change User Description Committed
#55 14682 Git Fusion Git Fusion branch management

Imported from Git
 ghost-of-change-num: 960958
 ghost-of-sha1: 005052ae424bd69f426f7209e741ca1c8c3253c7
 ghost-precedes-sha1: ad052c71a568ef12165e143a6866ad9ceffbb4a1
 parent-branch: None@960958
 push-state: incomplete
#54 14675 tony Add a 'make test' target that calls 'rake test' and
a Rakefile that loads and runs all the unit tests.

Reformatted p4conf.rb while I was there and added a vim
modeline so righteous editors will get the correct settings
immediately.
#53 14673 tony Update target API for P4Ruby to 2014.2, and remove the old Carbon
framework in favour of CoreFoundation
#52 14662 tony Add Linux to the list of platforms that links in libc++.
#51 14661 tony Pull 2014.1 p4conf.rb fix back into main
#50 14659 tony Add ignore file support to P4Ruby.
This change adds
three new methods:

    P4#ignore_file        - Return current ignore file
    P4#ignore_file=        - Set ignore file name
    P4#ignored?        - Test if a path is ignored

It also removes the check which objected to the use of Ruby 2.0
since we now support it. Now we simply check that you're not
using 2.1 (still a development release).
#49 14657 tony Make P4Ruby build with Ruby 2.0.0 (on Mac at least).
Mostly
cosmetic changes: just makes the build script handle the
Ruby 2 mkmf and the changes also work with 1.8.7 and 1.9.3
so they should probably have been like this all along.

Infrastructure change only - no functional change
#48 14654 jmistry Merging P4Ruby p12.2 to main.

Integration only change.
#47 14640 jmistry Pull changes from p12.1 to main.

Integration only change.
#46 14639 noahf Link the p4ruby plugin binary with OpenSSL for the installer.

The mingw openssl libraries follow the unix convention (libssl.a), not
the visual studio (ssleay32.lib) convention.  It also requires linking
with -lgdi32.
#45 14638 jmistry Update TARGET_API_VERSION to 2012.2
#44 14635 jmistry p4conf.rb fix for SSL:

Added new configuration option '--ssl=<ssl library path>' to specify the ssl
libraries.  If using '--ssl' with no path then ssl libraries are included, but path
is assumed to be set by the system.

User visible change to be documented in release notes.
#43 14634 jmistry Fix version string

Follow-on to change 415652 - local testing showed that the new regexp
was too greedy.  This change ensures that the regexp  doesn't include
the trailing ';' in the version string.
#42 14631 jmistry Include the entire RELEASE name from Version

'p4conf.rb' wasn't matching the entire release name from 'Version', which meant
that certain test builds would have an incomplete version string compared to
the name in 'Version'.  The regular expression is a bit more generous now and
matches for all word and non-space characters, which seems to solve the problem.
#41 14630 jmistry Change p4conf.rb to only build 64bit on Mac OS.
Previously, P4Ruby was built as a fat universal lib;
however, as of 12.1 we will no longer build a universal
API for Mac.  Although Ruby on Mac is a universal
binary, it seems happy enough to load 64bit only
libraries.

Also re-added rule to link against 'p4sslstub', which
I inadvertently removed in change 408875.

User visible change to be documented in release notes.
#40 14627 jmistry Update p4conf.rb for 2012.1

Update $TARGET_API_VERSION to 2012.1, so that P4Ruby no longer prompts if you
try to build with a 2012.1 version of the C++ API.

Also changed whitespace formatting in file.
#39 14624 jmistry Pull p11.1 changes back to main
#38 14623 jmistry Clear extra 'puts'

Follow-on from change 405900, where I left a
debugging 'puts'.
#37 14622 jmistry Pull 10.2 changes to main

Pick up missing changes in p10.2 and integrate to main.

As part of the integrate I also moved the unit tests '16_streams.rb' and
'17_streaming_handler.rb' because the integration introduced collisions with
the unit test names. Updated MANIFEST with new names for unit tests and also
added '98_unicode.rb', which was missing from it.
#36 14621 ateague Force building against the SSL Stub library shipped with the
p4api distribution.

This does require this version of P4Ruby to use the 2012.1 version
of the P4API when being built. This will be the first p4api to be built
with SSL turned on (so that the p4sslstub library will be available).

To support true SSL, the developer will need to edit the library
lines. We should make this a configuration option for the build or
automatically detect the presence of the OpenSSL libraries.
#35 14619 jmistry Fix version string

Only include type in $apiver if it exists and isn't empty.
#34 14618 jmistry pull libstc++ fix from p11.1 to main

Integration only change.
#33 14617 jmistry Correct version string on Mac OS X

Fixed the output of P4.identify for P4Ruby built with Ruby 1.9.2 on
Mac OS X, so that it now reads 'P4RUBY/DARWIN10X86_64/...'.

Previously, even if $p4osplat was set, it could get overwritten with the
output from 'uname -p', which erroneously set it to 'X86'.  Now, we check
if '$p4osplat' is set, and only if it isn't do we fall back on 'uname -p'. 
Otherwise, we assume that CONFIG[ 'arch' ] is correct.
#32 14616 jmistry pull lib fix from p11.1 to main

Integration only change.
#31 14612 jmistry FreeBSD version string now set to FREEBSD7X86_64.
#30 14608 jmistry Add encoding to Strings

As part of adding Ruby 1.9 support we need to associate the encoding
for Ruby's strings from the server.  This approach is similar to Sven's
(in changelist 257263), where everything but the 'content' charset was
set to 'utf8'.  The content charset is picked up from P4CHARSET and this
is used to translate any file content.

Also disabled the Ruby 1.9 warning for each compile.

User visible change to be documented in release notes.
#29 14601 psoccard P4Ruby can now be compiled successfully using the Mingw compiler
#28 14600 psoccard Back out changelist 331329 after overwritting changelist 328578
#27 14599 psoccard P4Ruby can now be compiled successfully using the Mingw compiler
#26 14595 jmistry P4.identify now includes API change

P4.identify output now includes C/C++ API change and report product
name as P4RUBY, instead of P4Ruby.

So, the output now looks like this:
    Rev. P4RUBY/DARWIN10U/2011.1.MAIN/279655 (2011.1.MAIN/279655 API) (2011/01/04).
#25 14590 mashmore Updating p4-ruby / p4-perl builds in main to rely on API version 2011.1 (since that's what we're now reflecting in //depot/main/p4/Version)
#24 14578 tony Pull 2010.1 changes into main
#23 14577 cmullins Make p4perl/p4python/p4ruby depend on 2010.2 API as that's what main is now.
#22 14576 tony Make P4Ruby build script warn the user if they're not using
Ruby 1.8. They can opt to override, but they get told it's
not supported.
#21 14573 tony Remove old Ruby 1.6 cruft from P4Ruby.
This has the beneficial
side effect of allowing it to build with Ruby 1.9. It seems
to work with Ruby 1.9 now, but the test harness doesn't so
Ruby 1.9 support remains unofficial for now.

User-visible infrastructure change. Documented in p4rubynotes.txt
#20 14568 tony Make main P4Ruby depend on the 2010.1 API as that's what main
builds now.
#19 14566 tony Remove -fvisibility-inlines-hidden from P4Ruby build.
It causes
warnings whenever people build with the Darwin API (correct) as
it's only needed when people build with the MACOSX api (works,
but really incorrect).

No functional change
#18 14556 tony Make P4Ruby copy the Version file from P4.
The Release notes are already
copied.
#17 14555 tony Make P4Ruby in main require the 2009.2 API
#16 14554 tony Make P4Ruby build using VC++ 2005 or later using a -sTYPE=dyn API

This requires that we remove libcmt.lib from the link, and use /MD
instead of /MT on the compile phase. I also had to add a nasty
hack to run the manifest tool - nasty because it assumes it's
there and that it's necessary. Building with VC++ 2003 will now
probably appear to fail.
#15 14552 tony Improve build on Mac OS X now that we have Universal Binary APIs
#14 14546 tony Fix P4Ruby build to ensure that it finds our libraries first
when library names conflict. This fix is real ugly, and
basically abuses Ruby's build system. But then, if they
don't make it easy...

Bug fix to build script. Not doc'd anywhere
#13 14542 tony Make P4Perl, P4Python, and P4Ruby require the 2008.2 API

Infrastructure change
#12 14533 tony Pull p4conf.rb fix from 2008.1 back into main

Integration-only change
#11 14532 tony Porting changes for Mac OSX Leopard.
Pretty ugly: first off, we have
to duck building a universal binary because our API isn't built
that way. Secondly, we have to add the -fvisibility-inlines-hidden
flag because API is built with it (because Qt requires it).

Porting change only
#10 14529 tony Pull 2007.3 p4-ruby changes back to main.

Integration only change
#9 14524 tony Fix P4Perl and P4Ruby's API support to 2007.3.
Both the build
process and the release notes now make it clear that other
APIs might work, but aren't supported.
#8 14523 tony Remove debugging statement left over from earlier change
#7 14519 tony Solaris porting work: switch to using 'target_os' and 'target_cpu'
rather than 'host_...' because (a) we should be building for the
target rather than the host (though mostly they're the same), and
(b) because the values are simpler.

Also add some code to detect that we're on solaris properly,
rather than using 'uname -r' which is the fallback. This code
may not work on versions of Solaris older than 2.10, but we're
not supporting them, so...
#6 14518 tony Porting changes for Windows.
A few tweaks to the generated
makefile are required to stop Windows griping about
file permissions on chmod, and since it's sometimes hard
to delete a file immediately after closing it, we have
a couple of retries built-in to the test suite now.

Note that to clean up the test root, we have to shut all the
spawned p4d's down. That means all the clients must disconnect,
so the test cases that connect have all be updated to
disconnect.
#5 14513 tony Remove all compatibility code with versions of the API older
than 2006.2 from both P4Perl and P4Ruby. We're insisting that
people use a 2006.2 or later API for this first release, and will
support the current API, and the previous two releases going forward.

Also stripped out some reference Ruby code that was still lurking
in P4Perl (commented out, obviously).

Also ensured that both Makefile.PL and p4conf.rb insist on the
minimum API level, and warn the user if they're attempting to
build with an even newer release of the API.
#4 14484 tony Remove the old const_char macro from P4Perl and P4Ruby (P4Python
never used it). Since we're going to insist on an API later than
2006.1, we can ditch this piece of legacy compatibility.
#3 14482 tony Use Ident from Perforce API to identify P4Ruby instead of home-grown
equivalent. The extra information included in the original output
will be added into new methods later.
#2 14481 tony Update P4Ruby in main with fixes made to public depot
#1 14480 tony Add P4Ruby 1.5944 to main as start-point for the first
productized release of P4Ruby