From: Giancarlo F Bellido Date: 2008-05-29T11:48:27+09:00 Subject: [PATCH] ZLIB for MSVC 8 - tar_input.rb This is a multi-part message in MIME format. ------=_NextPart_000_00C0_01C8C10B.F4320920 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I managed to install wxruby and compile zlib extension using this patch in ruby trunk. Using zlib 1.2.3 (zlib1.lib) and removing the hack in tar_input.rb. Tested in windows XP SP3 MSVC8(2005) and ubuntu linux using zlib1g-dev package. Anyone knows if the tar_input.rb workaround still works in other systems? ------=_NextPart_000_00C0_01C8C10B.F4320920 Content-Type: application/octet-stream; name="zlib-changes.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="zlib-changes.patch" Index: lib/rubygems/package/tar_input.rb =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/rubygems/package/tar_input.rb (revision 16657) +++ lib/rubygems/package/tar_input.rb (working copy) @@ -201,16 +201,16 @@ # times. And that's the way it is.=0A= =0A= def zipped_stream(entry)=0A= - if defined? Rubinius then=0A= + #if defined? Rubinius then=0A= zis =3D Zlib::GzipReader.new entry=0A= dis =3D zis.read=0A= is =3D StringIO.new(dis)=0A= - else=0A= + #else=0A= # This is Jamis Buck's Zlib workaround for some unknown issue=0A= - entry.read(10) # skip the gzip header=0A= - zis =3D Zlib::Inflate.new(-Zlib::MAX_WBITS)=0A= - is =3D StringIO.new(zis.inflate(entry.read))=0A= - end=0A= + # entry.read(10) # skip the gzip header=0A= + # zis =3D Zlib::Inflate.new(-Zlib::MAX_WBITS)=0A= + # is =3D StringIO.new(zis.inflate(entry.read))=0A= + #end=0A= ensure=0A= zis.finish if zis=0A= end=0A= Index: ext/zlib/extconf.rb =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- ext/zlib/extconf.rb (revision 16657) +++ ext/zlib/extconf.rb (working copy) @@ -10,7 +10,7 @@ dir_config 'zlib'=0A= =0A= =0A= -if %w'z libz zlib zdll'.find {|z| have_library(z, 'deflateReset')} and=0A= +if %w'zlib1 z libz zlib zdll'.find {|z| have_library(z, = 'deflateReset')} and=0A= have_header('zlib.h') then=0A= =0A= defines =3D []=0A= @@ -22,7 +22,7 @@ os_code =3D 'AMIGA'=0A= when /\Aos2[\-_]emx\z/ then=0A= os_code =3D 'OS2'=0A= - when 'mswin32', 'mingw32', 'bccwin32' then=0A= + when 'mswin32', 'mingw32', 'bccwin32', 'mswin32_80' then=0A= # NOTE: cygwin should be regarded as Unix.=0A= os_code =3D 'WIN32'=0A= else=0A= ------=_NextPart_000_00C0_01C8C10B.F4320920--