On Sat, Feb 18, 2012 at 09:46:56PM +0100, Julian Sikorski wrote:
Dear fellow Fedora packagers
I was trying to get MAME [1] to use system libjpeg [2]. The problem is
that MAME needs jpeg_mem_src, which is only defined if libjpeg-turbo
compiled with --with-jpeg8 switch, which is not the case for the Fedora
package.
Would such change be feasible to introduce? If not, I assume that I have
no other choice as to use the bundled copy (not really relevant here
since MAME is an RPM Fusion package).
You can specify your own data sources with the libjpeg shipped with fedora
(jped_decompress_struct::src).
What is missing is a default implementation for a source reading from
memory. libjpeg8 ships one by default, but older libjpeg don't have it.
However, the mem source should only be a few functions, so you can probably
only bundle a copy of jpeg_mem_src in your package and use the system
libjpeg. I did something very similar in spice, but it was for
jpeg_mem_dest, not jpeg_mem_src (ie similar functionality, but for
compression instead of decompression), see
http://cgit.freedesktop.org/spice/spice/tree/server/mjpeg_encoder.c#n95
Hope that helps,
Christophe