Re: packages: flvtool2/flvtool2.spec, flvtool2/flvtool2-ruby19.patch (NEW) - up...

2010-05-02 Thread Paweł Zuzelski
On Sat, 01 May 2010, Caleb Maclennan wrote:

 2010/5/1 caleb ca...@pld-linux.org:
  - patched setup script to run on ruby-1.9
  +Patch0:                %{name}-ruby19.patch
  +%patch0 -p1
 
 Some [widely bemoaned] changes to the way ruby handles string encoding
 from 1.8 to 1.9 require changes in some scripts to run reliably. I
 took a cue from several other patched pld packages and patched the
 setup script for flvtools2 sot that it runs on ruby-1.9. The only
 other way to make it run was to force the LANG to a non-utf8
 selection, which didn't seem like the right option.
 
 However this breaks the package build on ruby 1.8 systems. Is there an
 acceptable way to mark a patch in the spec for inclusion only if the
 host system is running a certain version of a package?

Please, don't reply to pld-cvs-commits list. Reply do pld-devel-en@
(or pld-devel-pl@).

Can anyone change the configuration of pld-cvs-commit to disallow
sending to that list?

-- 
Regards,
Paweł
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: packages: flvtool2/flvtool2.spec, flvtool2/flvtool2-ruby19.patch (NEW) - up...

2010-05-01 Thread Caleb Maclennan
2010/5/1 caleb ca...@pld-linux.org:
 - patched setup script to run on ruby-1.9
 +Patch0:                %{name}-ruby19.patch
 +%patch0 -p1

Some [widely bemoaned] changes to the way ruby handles string encoding
from 1.8 to 1.9 require changes in some scripts to run reliably. I
took a cue from several other patched pld packages and patched the
setup script for flvtools2 sot that it runs on ruby-1.9. The only
other way to make it run was to force the LANG to a non-utf8
selection, which didn't seem like the right option.

However this breaks the package build on ruby 1.8 systems. Is there an
acceptable way to mark a patch in the spec for inclusion only if the
host system is running a certain version of a package?

Caleb
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: packages: flvtool2/flvtool2.spec, flvtool2/flvtool2-ruby19.patch (NEW) - up...

2010-05-01 Thread Jan Rękorajski
On Sat, 01 May 2010, Caleb Maclennan wrote:

 2010/5/1 caleb ca...@pld-linux.org:
  - patched setup script to run on ruby-1.9
  +Patch0:                %{name}-ruby19.patch
  +%patch0 -p1
 
 Some [widely bemoaned] changes to the way ruby handles string encoding
 from 1.8 to 1.9 require changes in some scripts to run reliably. I
 took a cue from several other patched pld packages and patched the
 setup script for flvtools2 sot that it runs on ruby-1.9. The only
 other way to make it run was to force the LANG to a non-utf8
 selection, which didn't seem like the right option.
 
 However this breaks the package build on ruby 1.8 systems. Is there an
 acceptable way to mark a patch in the spec for inclusion only if the
 host system is running a certain version of a package?

IMO the best way is to make a bcond, like this:

%bcond_with ruby18  # build with ruby 1.8

%if %{with ruby18}
BuildRequires:  ruby = 1.8
BuildConflicts: ruby = 1.9
%else
BuildRequires:  ruby = 1.9
%endif

%{!?with_ruby18:%patch0 -p1}

this will give full control over build process.

-- 
Jan Rękorajski|  ALL SUSPECTS ARE GUILTY. PERIOD!
bagginsatmimuw.edu.pl   |  OTHERWISE THEY WOULDN'T BE SUSPECTS, WOULD THEY?
BOFH, MANIAC  |   -- TROOPS by Kevin Rubio
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: packages: flvtool2/flvtool2.spec, flvtool2/flvtool2-ruby19.patch (NEW) - up...

2010-05-01 Thread Radosław Zieliński
On 1 May 2010 06:58, Caleb Maclennan ca...@pld-linux.org wrote:
 However this breaks the package build on ruby 1.8 systems. Is there an
 acceptable way to mark a patch in the spec for inclusion only if the
 host system is running a certain version of a package?

Writing portable patches is the preferred solution.

  if RUBY_VERSION  1.9
 ... force_encoding() ...
  end
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: packages: flvtool2/flvtool2.spec, flvtool2/flvtool2-ruby19.patch (NEW) - up...

2010-05-01 Thread Radosław Zieliński
2010/5/1 Radosław Zieliński rade...@gmail.com:
[...]
  if RUBY_VERSION  1.9

Oops: this should have been =, instead of .
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en