Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 307487 - dev-games/ogre needs media-libs/freeimage
Summary: dev-games/ogre needs media-libs/freeimage
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Games
Depends on:
Blocks: 277625 307205
  Show dependency tree
Reported: 2010-03-02 14:15 UTC by Christoph Brill (egore) (RESIGNED)
Modified: 2012-03-03 21:01 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---

media-libs/freeimage-3.13.1.ebuild (freeimage-3.13.1.ebuild,1.43 KB, text/plain)
2010-03-02 14:16 UTC, Christoph Brill (egore) (RESIGNED)
freeimage-3.13.1-systemlibs.patch (freeimage-3.13.1-systemlibs.patch,57.54 KB, patch)
2010-03-02 14:17 UTC, Christoph Brill (egore) (RESIGNED)
Details | Diff
freeimage-3.13.1.ebuild (freeimage-3.13.1.ebuild,1.97 KB, text/plain)
2010-04-26 18:30 UTC, Jacek Szafarkiewicz
pkg-config file (,159 bytes, text/plain)
2010-04-26 18:30 UTC, Jacek Szafarkiewicz
freeimage-3.13.1.ebuild (freeimage-3.13.1.ebuild,1.98 KB, text/plain)
2010-05-05 16:57 UTC, Jacek Szafarkiewicz
pkg-config file (,204 bytes, text/plain)
2010-05-05 16:58 UTC, Jacek Szafarkiewicz
freeimage-3.13.1.ebuild (freeimage-3.13.1.ebuild,1.83 KB, text/plain)
2010-05-13 19:43 UTC, Azamat H. Hackimov
freeimage-3.13.1-system-jpeg.patch (freeimage-3.13.1-system-jpeg.patch,1.75 KB, patch)
2010-05-13 19:44 UTC, Azamat H. Hackimov
Details | Diff
freeimage-3.13.1-system-libmng.patch (freeimage-3.13.1-system-libmng.patch,825 bytes, patch)
2010-05-13 19:44 UTC, Azamat H. Hackimov
Details | Diff
freeimage-3.13.1-system-libpng.patch (freeimage-3.13.1-system-libpng.patch,416 bytes, patch)
2010-05-13 19:44 UTC, Azamat H. Hackimov
Details | Diff
freeimage-3.13.1-system-makefile.patch (freeimage-3.13.1-system-makefile.patch,38.07 KB, patch)
2010-05-13 19:45 UTC, Azamat H. Hackimov
Details | Diff
freeimage-3.13.1-system-openexr.patch (freeimage-3.13.1-system-openexr.patch,995 bytes, patch)
2010-05-13 19:45 UTC, Azamat H. Hackimov
Details | Diff
freeimage-3.13.1-system-openjpeg.patch (freeimage-3.13.1-system-openjpeg.patch,1.16 KB, patch)
2010-05-13 19:45 UTC, Azamat H. Hackimov
Details | Diff
freeimage-3.13.1-system-zlib.patch (freeimage-3.13.1-system-zlib.patch,641 bytes, patch)
2010-05-13 19:45 UTC, Azamat H. Hackimov
Details | Diff
Ebuild with final fix. (freeimage-3.13.1.ebuild,1.86 KB, text/plain)
2010-05-16 23:57 UTC, Richard Connon

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Brill (egore) (RESIGNED) 2010-03-02 14:15:39 UTC
Freeimage was dropped from the tree because it shipped copies of system libraries. This is indeed an issue.

On the other hand OGRE 3D 1.7.0 depends on freeimage and is not able to load images without freeimage.

Therefore I tried to remove the shipped libraries from freeimage and use the system ones instead.

Reproducible: Always

Steps to Reproduce:
Comment 1 Christoph Brill (egore) (RESIGNED) 2010-03-02 14:16:10 UTC
Created attachment 221795 [details]

The ebuild.
Comment 2 Christoph Brill (egore) (RESIGNED) 2010-03-02 14:17:36 UTC
Created attachment 221797 [details, diff]

The necessary path. It will not win any beauty prices but at least it's a start.
Comment 3 Doktor Notor 2010-03-02 14:28:42 UTC
Well, good luck. Since this apparently will never be fixed upstream (cf. I don't see anyone maintaining a huge 60K patch that unbudles bundled junk and that breaks on every new release just because upstream can't be talked into sense. 
Comment 4 biohazrd 2010-04-19 05:30:47 UTC
epatch fails for me massively with 3.13.1 source just downloaded.  Missing Hunk errors like upstream changed the source code and not the revision.  Thanks for the effort though...
Comment 5 Azamat H. Hackimov 2010-04-22 20:25:49 UTC
Maybe better split patch into small bits for each library. This will more maintainable.
Comment 6 Jacek Szafarkiewicz 2010-04-26 18:30:27 UTC
Created attachment 229277 [details]

Little modified ebuild with pkg-config file
Comment 7 Jacek Szafarkiewicz 2010-04-26 18:30:48 UTC
Created attachment 229279 [details]
pkg-config file
Comment 8 Jacek Szafarkiewicz 2010-05-05 16:57:30 UTC
Created attachment 230479 [details]

Update for pkg-config to be more dynamic
Comment 9 Jacek Szafarkiewicz 2010-05-05 16:58:12 UTC
Created attachment 230481 [details]
pkg-config file
Comment 10 Richard Connon 2010-05-13 12:04:11 UTC
Seems to have problems with recent libtiff upgrade.
Package seems to use a bundled "tiffiop.h" instead of the public interfaces.
This should be fixed and pushed upstream I guess.
Comment 11 Azamat H. Hackimov 2010-05-13 19:41:59 UTC
I discover two bugs:
1. Linking problem with OGRE (#307205, thanks to Richard Connon for pointing)
2. Compilation problem with OGRE.

1st problem solved by FI upstream (coping with ln and ldconfig).
2nd is more complex. FI uses transupp from original jpeg sources (two files - transupp.h and transupp.c). These two files must be compiled into libfreeimage.

Both problem solved via huge patchwork :). But I still have no idea, how test this stuff. Test files from archive are outdated. Could someone give me simple testsuite (loading image, for example)?
Comment 12 Azamat H. Hackimov 2010-05-13 19:43:11 UTC
Created attachment 231361 [details]
Comment 13 Azamat H. Hackimov 2010-05-13 19:44:09 UTC
Created attachment 231363 [details, diff]
Comment 14 Azamat H. Hackimov 2010-05-13 19:44:33 UTC
Created attachment 231365 [details, diff]
Comment 15 Azamat H. Hackimov 2010-05-13 19:44:46 UTC
Created attachment 231367 [details, diff]
Comment 16 Azamat H. Hackimov 2010-05-13 19:45:10 UTC
Created attachment 231369 [details, diff]
Comment 17 Azamat H. Hackimov 2010-05-13 19:45:28 UTC
Created attachment 231371 [details, diff]
Comment 18 Azamat H. Hackimov 2010-05-13 19:45:42 UTC
Created attachment 231373 [details, diff]
Comment 19 Azamat H. Hackimov 2010-05-13 19:45:56 UTC
Created attachment 231375 [details, diff]
Comment 20 Thomas J. Moore 2010-05-13 23:06:26 UTC
I also had to add the following to the end of src_prepare to avoid sandbox problems:

	sed -i 's/ldconfig//' Makefile.gnu

Otherwise, the ebuild seemed to work fine for me.
Comment 21 Richard Connon 2010-05-16 23:57:02 UTC
Created attachment 231741 [details]
Ebuild with final fix.

Patch from last comment included in build
Comment 22 Account removed 2010-06-18 11:41:34 UTC
Thank you for your work on the patches!
Probably the only chance to have an up2date and clean ogre under gentoo.

If you're interested you're welcome to maintain your patched freeimage ebuilds in our official gamerlay overlay.
Feel free du visit us on IRC freenode #gentoo-gamerlay.
Comment 23 Azamat H. Hackimov 2010-08-23 18:46:13 UTC
FreeImage 3.14.1 is out. You can try it in gamerlay overlay.
Comment 24 Reuben Martin 2010-09-10 01:04:07 UTC
Bug# 277625 is dependant on this bug. Somebody with sufficient privileges please add it to this bugs block list. 
Comment 25 Myckel Habets 2011-02-27 16:12:46 UTC
(In reply to comment #23)
> FreeImage 3.14.1 is out. You can try it in gamerlay overlay.

Just build it. Got this QA message:

 * QA Notice: The following files contain runtime text relocations
 *  Text relocations force the dynamic linker to perform extra
 *  work at startup, waste system resources, and may pose a security
 *  risk.  On some architectures, the code may not even function
 *  properly, if at all.
 *  For more information, see
 *  Please include the following list of files in your report:
 * TEXTREL usr/lib/
 * TEXTREL usr/lib/

Also, version 3.15.0 seems to be released.
Comment 26 Azamat H. Hackimov 2011-03-05 22:50:07 UTC
Hello there.
I just commited 3.15.0 into gamerlay overlay.
Comment 27 Myckel Habets 2011-09-14 06:53:21 UTC
July 25th, 2011: FreeImage 3.15.1 released

Release 3.15.1 is a maintenance release that brings several fixes for TIFF, JPEG, BMP, PCX and CUT plugins.
The most significant fixes concern the security against malicious images, so that an update is highly recommended.
The library has been updated with the new libtiff (3.9.5), libpng (1.5.4), libraw (0.13.7) and OpenJPEG (1.5.0) libraries. FreeImage is also distributed with updated C++ and Delphi wrappers.
As usual, check the changes log for full details (especially for bug fixes) and check also the updated FreeImage documentation.
Comment 28 Azamat H. Hackimov 2011-09-14 08:52:03 UTC
(In reply to comment #27)
> July 25th, 2011: FreeImage 3.15.1 released

Already in Gamerlay. But this version is hardmasked - it requires latest libpng 1.5.x, so I can't compile and check this release completly.
Comment 29 Azamat H. Hackimov 2012-02-13 02:03:10 UTC
media-libs/freeimage-3.15.1 is now in repository
Comment 30 Myckel Habets 2012-02-13 18:39:54 UTC
(In reply to comment #29)
> media-libs/freeimage-3.15.1 is now in repository

Great! Ogre is heading towards v1.8, lets see if we can revive it in the main tree.
Comment 31 Myckel Habets 2012-02-18 20:12:32 UTC
(In reply to comment #29)
> media-libs/freeimage-3.15.1 is now in repository

This seems to work lovely. I've noticed that the freeimage ebuild in the gamerlay repo is however still broken (any reason to keep it around in there?). I'm planning to upload 2 new ebuilds for ogre this evening (1.7.4 and 1.8.0_rc1).
Comment 32 SpanKY gentoo-dev 2012-03-03 21:01:05 UTC
freeimage is in the tree again, as is newer ogre.  if there are problems with either, please file a new bug.