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

Jan Rękorajski baggins at sith.mimuw.edu.pl
Sat May 1 16:13:26 CEST 2010


On Sat, 01 May 2010, Caleb Maclennan wrote:

> 2010/5/1 caleb <caleb at 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!
baggins<at>mimuw.edu.pl   |  OTHERWISE THEY WOULDN'T BE SUSPECTS, WOULD THEY?
BOFH, MANIAC              |                   -- TROOPS by Kevin Rubio


More information about the pld-devel-en mailing list