#******************************************************************************* # Usage: # # ruby p4conf.rb --apidir=<path to api> # #******************************************************************************* require 'mkmf' require 'rbconfig' require "getoptlong" require "fileutils" 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 @type = nil end def set_type( type ) if( type.kind_of?( String ) ) @type = type end end attr_reader :major, :minor, :type include Comparable def to_s if( @type and not @type.empty? ) "#{major}.#{minor}.#{@type.upcase}" else "#{major}.#{minor}" end 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[ 'arch' ].split( /-/ )[ 0 ].upcase $p4osname = CONFIG[ 'arch' ].split( /-/ )[ 1 ].upcase $p4osname = $p4osname.gsub( /MSWIN32(_\d+)?/, "NT" ) $p4osname = $p4osname.split( "-" ).shift $p4osver = "" # Now work out the OS version if( $p4osname == "NT" ) $p4osver = "" elsif( $p4osname =~ /MINGW/ ) $p4osver = "" elsif( $p4osname =~ /FREEBSD([0-9]+)/ ) $p4osname = "FREEBSD" $p4osver = $1 elsif( $p4osname =~ /DARWIN([0-9]+)/ ) $p4osname = "DARWIN" $p4osver = $1 elsif( $p4osname =~ /AIX(5)\.(\d)/ ) # AIX osname looks like "aix5.3.0.0" $p4osname = "AIX" $p4osver = $1 + $2 elsif( $p4osname =~ /SOLARIS2\.(\d+)/ ) $p4osname = "SOLARIS" $p4osver = $1 else # Try running a 'uname -r' to work out the version begin $p4osver=`uname -r`.chomp ver_re = /^(\d+)\.(\d+)/ md = ver_re.match( $p4osver ) if( md ) maj = md[1].to_i min = md[2].to_i $p4osver = maj.to_s + min.to_s end rescue # Nothing - if it failed, it failed. end end # On Mac OSX, fix the build to 64 bit arch $p4osplat = "X86_64" if( $p4osname == "DARWIN" ) # 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 =~ /^AMD64$/ ) $p4osplat = "X86_64" elsif( $p4osplat == "POWERPC" ) $p4osplat = "PPC" end end def uname_platform plat = "UNKNOWN" begin plat = `uname -p` plat = plat.chomp.upcase rescue # Nothing - if it failed, it failed. end plat 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 #******************************************************************************* # Set platform specific compile options #******************************************************************************* def set_platform_cflags $CPPFLAGS += "-DOS_#{$p4osname} " $CPPFLAGS += "-DOS_#{$p4osname}#{$p4osver} " $CPPFLAGS += "-DOS_#{$p4osname}#{$p4osver}#{$p4osplat} " if( $p4osname == "NT" ) $CPPFLAGS += "/DCASE_INSENSITIVE " end if( $p4osname == "MINGW32") $CPPFLAGS += "-DOS_NT -DCASE_INSENSITIVE " end if( $p4osname == "SOLARIS" ) $CPPFLAGS += "-Dsolaris " end if( $p4osname == "DARWIN" ) # Only build for 64 bit if we have more than one arch defined in CFLAGS $CFLAGS.slice!( "-arch i386" ) $CFLAGS.slice!( "-arch ppc" ); $CPPFLAGS += "-DCASE_INSENSITIVE " end end #******************************************************************************* # Set platform specific build options #******************************************************************************* def set_platform_opts #*************************************************************************** # 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 LDSHARED and CC values directly #*************************************************************************** # Expand any embedded variables (like '$(CC)') CONFIG[ "CC" ] = RbConfig::CONFIG[ "CC" ] CONFIG[ "LDSHARED" ] = RbConfig::CONFIG[ "LDSHARED" ] # Now ensure we're using g++ instead of gcc CONFIG[ "CC" ].sub!( /gcc/, "g++" ) CONFIG[ "LDSHARED" ].sub!( /gcc/, "g++" ) CONFIG[ "CXX" ] = CONFIG[ "CC" ] unless CONFIG.has_key?( "CXX" ) # O/S specific oddities 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[ "CC" ] = "xcrun c++" CONFIG[ "CXX" ] = "xcrun c++" CONFIG[ "LDSHARED" ] = CONFIG[ "CXX" ] + " -bundle" elsif ( $p4osname == "FREEBSD" || $p4osname == "LINUX" ) # FreeBSD 6 and some Linuxes use 'cc' for linking by default. The # gcc detection patterns above won't catch that, so for these # platforms, we specifically convert cc to c++. CONFIG[ "LDSHARED" ].sub!( /^cc/, "c++" ) elsif( $p4osname == "MINGW32" ) # When building with MinGW we need to statically link libgcc CONFIG[ "LDSHARED" ] = CONFIG[ "LDSHARED" ] + " -static-libgcc" 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" ) elsif( $p4osname == "CYGWIN" ) # Clear out the bogus libs on cygwin. CONFIG[ "LIBS" ] = "" elsif( $p4osname == "DARWIN" && $p4osver.to_i >= 8 ) # Only build for 64 bit if we have more than one arch defined in CFLAGS $LDFLAGS.slice!( "-arch i386" ) $LDFLAGS.slice!( "-arch ppc" ); $LDFLAGS += " -framework Carbon" end end #******************************************************************************* # Set directory for the Perforce API #******************************************************************************* def set_apidir( path, sslpath ) libdir = path + "/lib" libdir = [ File.directory?( libdir ) ? libdir : path ] libdir.push( sslpath ) unless( sslpath.nil? or sslpath.empty? ) hdrdir = path + "/include/p4" hdrdir = File.directory?( hdrdir ) ? hdrdir : path # This bit's real ugly... Ruby's mkmf.rb seems to have a very strange idea # about link order. It puts the default library paths ahead of thos suppled # by the user at runtime. When library names clash that doesn't help # anyone. So, we mess with DEFLIBPATH here, as well as LIBPATH in the hope # that a belt-and-braces approach will do the trick on all platforms. # Sadly, DEFLIBPATH doesn't always exist so we have to test for it. $DEFLIBPATH = [ libdir ] | $DEFLIBPATH if $DEFLIBPATH $LIBPATH = [ libdir ] | $LIBPATH $DEFLIBPATH.flatten! $LIBPATH.flatten! $CPPFLAGS += " -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+)\s+(\d+)\s+(\w*\S*)\s*;' ) rp = Regexp.new( '^PATCHLEVEL = (\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 ] ) apiver.set_type( md[ 3 ] ) elsif md = rp.match( line ) $apipatch = md[ 1 ] end end end puts( "Found #{apiver} Perforce API in #{dir}" ) return apiver end #******************************************************************************* # Function to check that the version of the API used is digestible #******************************************************************************* def check_api_version( ver ) return true if ver == $TARGET_API_VERSION if( ver != $TARGET_API_VERSION ) puts <<EOS This version of P4Ruby was designed for use with the #{$TARGET_API_VERSION} release of the Perforce C++ API. Using it with other releases may not work, and is not supported. EOS print( "Do you wish to continue anyway (y/n): " ) answer = $stdin.gets.chomp return false unless answer == "y" end true end def check_ruby_version major = RbConfig::CONFIG['MAJOR'].to_i minor = RbConfig::CONFIG['MINOR'].to_i if major == 1 && minor >= 8 return true end if major == 2 && minor == 0 return true end puts <<EOS Use of this version of P4Ruby with versions of Ruby later than 2.0 is not supported. EOS print( "Do you wish to continue anyway (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( 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( define( "ID_OS", $p4osname + $p4osver + $p4osplat ) ) ch.puts( define( "ID_REL", $p4ruby_version.join( "." ).upcase ) ) ch.puts( define( "ID_PATCH", $p4ruby_patchlevel, true ) ) ch.puts( define( "ID_Y", $p4ruby_date[ 0 ] ) ) ch.puts( define( "ID_M", $p4ruby_date[ 1 ] ) ) ch.puts( define( "ID_D", $p4ruby_date[ 2 ] ) ) ch.puts( define( "ID_API", $apiver ) ) ch.puts( define( "ID_API_PATCH", $apipatch ) ) 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[ "CXX" ] ) # 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 #******************************************************************************* # Identify P4Ruby Version and date from the Version file #******************************************************************************* def identify_p4ruby File.open( "Version" ) do |f| f.each_line do |line| line = line.chomp if( line =~ /^RELEASE\s*=\s*(\d+\s+\d+\s+\w*\S*)\s*;/ ) $p4ruby_version = $1.split( / / ) elsif( line =~ /^PATCHLEVEL\s*=\s*(\d+)/ ) $p4ruby_patchlevel = $1.to_i elsif( line =~ /^SUPPDATE\s*=\s*([0-9 ]+)/ ) $p4ruby_date = $1.split( / / ) end end end end #******************************************************************************* # Copy version file from P4 tree if it exists. #******************************************************************************* def copy_version v = '../p4/Version' if File.exists?( v ) FileUtils.cp( v, 'Version' ) FileUtils.chmod( 0644, 'Version' ) end end #******************************************************************************* # Setup SSL lib linkage #******************************************************************************* def ssl_lib # Check the API is at least 2012.1 - earlier versions don't support # encryption, so we shouldn't even try to link. return if( $apiver < ApiVersion.new( 2012, 1 ) ) if( $sslpath.nil? ) api_lib( "p4sslstub" ) else # The SSL lib names are different on Windows, so we # need to check what platform we are building on. if( $p4osname =~ /NT/ ) plat = $p4osplat == "X86" ? "32" : "64" $libs = append_library( $libs, "ssleay#{plat}" ) $libs = append_library( $libs, "libeay#{plat}" ) elsif( $p4osname =~ /MINGW/ ) $libs = append_library( $libs, "gdi32" ) $libs = append_library( $libs, "crypto" ) $libs = append_library( $libs, "ssl" ) else $libs = append_library( $libs, "crypto" ) $libs = append_library( $libs, "ssl" ) end end end #******************************************************************************* # Make any necessary changes to the Makefile. #******************************************************************************* def patch_makefile() return unless $p4osname == "NT" # On Windows, 'make install' can fail if any of the files are read-only. # This is because install tries to set the modtime on the file using utime() # and utime only works if a file is writable. This just makes install not # try to set the time. # # On Windows, we assume we're using VC++ 2005 or newer and that the # manifest for the DLL must be updated. This adds that command into # the Makefile as Ruby doesn't do it for us. i = File.open( "Makefile", "r" ) o = File.open( "Makefile.tmp", "w" ) i.each_line do |line| if( line =~ /^INSTALL_PROG/ or line =~ /^INSTALL_DATA/ ) line.sub!( /vpm/, "vm" ) elsif( line =~ /^\t\$\(LDSHARED\)/ ) line += "\tmt -nologo -manifest $(DLLIB).manifest -outputresource:$(DLLIB);2" end o.write( line ) end i.close o.close File.unlink( "Makefile" ) File.rename( "Makefile.tmp", "Makefile" ) end #******************************************************************************* # Start of main functionality #******************************************************************************* # # Maximum version of the Perforce API this build of P4Ruby knows how to # work with # $TARGET_API_VERSION = ApiVersion.new( 2014, 1 ) opts = GetoptLong.new( [ "--apidir", "-d", GetoptLong::REQUIRED_ARGUMENT ], [ "--ssl", GetoptLong::OPTIONAL_ARGUMENT ] ) $apidir = nil $apiver = nil $apipatch = nil $apibuild = nil $apitype = nil $p4ruby_ver = nil $p4ruby_date = nil $p4ruby_patchlevel = nil $sslpath = nil $withssl = false opts.each do |opt,arg| if ( opt == "--apidir" ) $apidir = File.expand_path( arg ) elsif ( opt == "--ssl" ) $sslpath = arg.empty? ? arg : File.expand_path( arg ) end end copy_version 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_ruby_version exit( 1 ) unless check_api_version( $apiver ) set_apidir( $apidir, $sslpath ) set_platform_opts() set_platform_cflags() use_platform_libs() identify_p4ruby # Perforce API libraries - in reverse order ssl_lib 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} CPPFLAGS : #{$CPPFLAGS} LIBPATH : #{$LIBPATH.join(":")} libs : #{$libs} EOS puts( "Creating extconf.h" ) write_extconf_h write_makefile( "P4" ) patch_makefile
# | 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 |