[Cooker] Re: r460568 - cooker/SDL_image/current/SPECS

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown [Cooker] Re: r460568 - cooker/SDL_image/current/SPECS

by Anssi Hannula-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

fwang wrote:

> Modified: cooker/SDL_image/current/SPECS/SDL_image.spec
> ==============================================================================
> --- cooker/SDL_image/current/SPECS/SDL_image.spec (original)
> +++ cooker/SDL_image/current/SPECS/SDL_image.spec Fri Nov  6 02:34:53 2009
> @@ -2,11 +2,14 @@
>  %define apiver 1.2
>  %define libname %mklibname %{name} %{apiver} %{major}
>  %define develname %mklibname %{name} -d
> +%define libjpeg_version %(rpm -q --whatprovides libjpeg --queryformat="%{VERSION}")
> +%define libpng_version %(rpm -q --whatprovides libpng --queryformat="%{VERSION}")
> +%define libtiff_version %(rpm -q --whatprovides libtiff --queryformat="%{VERSION}")
[...]
> +# following lines are requires because it dlopen rather than link against those libs
> +Requires:       libjpeg = %libjpeg_version
> +Requires:       libpng = %libpng_version
> +Requires:       libtiff = %libtiff_version
>  
>  %description -n %{libname}
>  This package contains the library needed to run programs dynamically

Look at configure options next time before making this kind of hacks :)

Fixed properly by disabling dlopening.

--
Anssi Hannula

Re: [Cooker] Re: r460568 - cooker/SDL_image/current/SPECS

by Jan Ciger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Anssi Hannula <anssi@...> wrote:

> > +# following lines are requires because it dlopen rather than link
> > against those libs +Requires:       libjpeg = %libjpeg_version
> > +Requires:       libpng = %libpng_version
> > +Requires:       libtiff = %libtiff_version
> >
> >  %description -n %{libname}
> >  This package contains the library needed to run programs dynamically
>
> Look at configure options next time before making this kind of hacks :)
>
> Fixed properly by disabling dlopening.
                           ^^^^^^^^^^^^^^

Isn't this defeating the purpose of the lib using dlopen()? The idea is likely
to support the libs you have installed on your system without having a hard
dependency on them. If you disable dlopen(), you must pull in all of them for
the support to work. These requires should be suggests instead - the library
will work even if no or only one of the underlying backends is installed.

Regards,

Jan


signature.asc (197 bytes) Download Attachment

Re: [Cooker] Re: r460568 - cooker/SDL_image/current/SPECS

by Frederik Himpe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On za, 2009-11-07 at 18:12 +0100, Jan Ciger wrote:

> Isn't this defeating the purpose of the lib using dlopen()? The idea is likely
> to support the libs you have installed on your system without having a hard
> dependency on them. If you disable dlopen(), you must pull in all of them for
> the support to work. These requires should be suggests instead - the library
> will work even if no or only one of the underlying backends is installed.

libjpeg is such a basic library that the user will have it installed
anyway...

--
Frederik Himpe <fhimpe@...>


Re: [Cooker] Re: r460568 - cooker/SDL_image/current/SPECS

by Anssi Hannula-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jan Ciger wrote:

> Anssi Hannula <anssi@...> wrote:
>>> +# following lines are requires because it dlopen rather than link
>>> against those libs +Requires:       libjpeg = %libjpeg_version
>>> +Requires:       libpng = %libpng_version
>>> +Requires:       libtiff = %libtiff_version
>>>
>>>  %description -n %{libname}
>>>  This package contains the library needed to run programs dynamically
>> Look at configure options next time before making this kind of hacks :)
>>
>> Fixed properly by disabling dlopening.
>                            ^^^^^^^^^^^^^^
>
> Isn't this defeating the purpose of the lib using dlopen()?

Yes, it is.

> The idea is likely
> to support the libs you have installed on your system without having a hard
> dependency on them. If you disable dlopen(), you must pull in all of them for
> the support to work. These requires should be suggests instead - the library
> will work even if no or only one of the underlying backends is installed.

In this case, it is an SDL image handling library that requires libjpeg,
libpng and libtiff to support those kind of images. Those libraries are
rather common+small and the formats popular. I think most applications
that use libSDL_image expect to be able to open them.

I don't see much added benefit in using dlopening here (are there many
people wanting e.g. libSDL_image without libpng installed?), but there
are downsides such as above, i.e. apps expecting formats to work (and
e.g. 2010.0 has libSDL_image linked against libjpeg62, but no dependency
in it).

--
Anssi Hannula