With media-libs/giflib-4.2.3: rm -f libmgpimage.a ar clq libmgpimage.a imagetypes.o gif.o send.o zio.o zoom.o new.o compress.o reduce.o value.o misc.o rotate.o rle.o rlelib.o smooth.o halftone.o clip.o dither.o xbitmap.o xpixmap.o pbm.o pcx.o xwd.o mac.o jpeg.o g3.o path.o sunraster.o mcidas.o fbm.o faces.o cmuwmraster.o bright.o img.o mc_tables.o window.o png.o ranlib libmgpimage.a make[1]: Leaving directory `/var/tmp/portage/app-office/magicpoint-1.13a/work/magicpoint-1.13a/image' rm -f mgp i686-pc-linux-gnu-gcc -o mgp -O2 -march=core2 -mfpmath=sse -mmmx -msse -msse2 -mssse3 -pipe -Wl,-O1 -Wl,--as-needed -L/usr/lib mgp.o draw.o parse.o plist.o globals.o x11.o font.o background.o scanner.o grammar.o postscript.o tfont.o embed.o unimap.o mng.o m17n.o strlcpy.o strlcat.o -L./image -lmgpimage -lm -lpng16 -L/usr/lib -lpng -L/usr/lib -lmng -L/usr/lib/X11 -lXft -lgif -lXext -lX11 ./image/libmgpimage.a(gif.o): In function `gifLoad': gif.c:(.text+0x3f1): undefined reference to `PrintGifError' collect2: error: ld returned 1 exit status make: *** [mgp] Error 1 [31;01m*[0m ERROR: app-office/magicpoint-1.13a::gentoo failed (compile phase): [31;01m*[0m emake failed [31;01m*[0m [31;01m*[0m If you need support, post the output of `emerge --info '=app-office/magicpoint-1.13a::gentoo'`, [31;01m*[0m the complete build log and the output of `emerge -pqv '=app-office/magicpoint-1.13a::gentoo'`. [31;01m*[0m The complete build log is located at '/var/tmp/portage/app-office/magicpoint-1.13a/temp/build.log'. [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/app-office/magicpoint-1.13a/temp/environment'. [31;01m*[0m Working directory: '/var/tmp/portage/app-office/magicpoint-1.13a/work/magicpoint-1.13a' [31;01m*[0m S: '/var/tmp/portage/app-office/magicpoint-1.13a/work/magicpoint-1.13a'
This appears to be related to the elimination of PrintGifError with GifErrorString as mentioned in https://abf.rosalinux.ru/openmandriva/imlib/commit/b74ec4832c680c1bbe084cc94562f812fb05c7c5 (changed from giflib 4.1 in 4.2) imlib has the same problem. see 486372 for example patch
Created attachment 364928 [details, diff] magicpoint-giflib.patch Here is the patch, fixing this bug.
Bug confirmed. Attached patch fixes the problem. Thanks. Please include it in portage.
Any chance to push this patch in the tree, so giflib would be stabilized?
*** Bug 539428 has been marked as a duplicate of this bug. ***
This is one of the last consumers of old imlib... do we really need this in the tree?
(In reply to Pacho Ramos from comment #6) > This is one of the last consumers of old imlib... do we really need this in > the tree? I would like to be able to continue using it. I'm talking with idella4 about proxy-maintaining it.
Created attachment 422606 [details] magicpoint-1.13a_p20121015.ebuild
Lots of fun here. ESR in his wisdom removed the PrintGifError() function from the public giflib API in giflib-4.2.0. Instead, GifErrorString() was added, which has different semantics. I propose to fix this bug *and* make Pacho happy at the same time by bumping app-office/magicpoint to the latest snapshot version, 20121015. There are later snapshots but nothing has changed since then. I have attached magicpoint-1.13a_p20121015.ebuild which depends on imlib2 instead of old imlib with USE=imlib and which with USE="-imlib gif" depends on >=giflib-4.2.0 and uses sed to patch image/gif.c to use the newer API. image/gif.c and image/png.c are #ifdef:ed out when imlib is used, so libpng is no longer a dependency with USE=imlib. I also added RESTRICT_USE="imlib? ( !gif )"
Created attachment 422608 [details] magicpoint-1.13a_p20121015.ebuild Add IUSE=png to model dependencies more accurately.
The review. This is mostly content carried over from the magicpoint-1.13a.ebuild. 1. 1999-2011 -> 1999-2016 2. EAPI=4 -> EAPI=5 and any required adjustments. 3. MY_DEPEND. No idea who came up with that name. More commonly, use COMMON_DEPEND 4. ${S} & REQUIRED_USE typically follow dependencies but this is purely style. You can leave them as they are and not be wrong. It appears you've not run repoman full but if you had it would have prompted over png? ( >=media-libs/libpng-1.4 ) requiring a slot operator. 5. OPTIONAL. First two patches MIGHT go into var PATCHES prior to src_prepare(). Sometimes the order of execution messes things up, so they could stay as they are. 6. use doc && dodoc FAQ... should go 7. Use of pushd/popd is a populat option over `cd` to a folder 8. samples probably belong in /usr/share/doc/${PF}/sample or make a folder examples and set with use examples, possibly with just doins -r. 9. mgp2html.pl,mgp2latex.pl are perl scripts meaning you need dep on dev-lang/perl
Also, on runtesting, it does build and install. There is a non fatal qa warning concerning [-Wimplicit-function-declaration] With the items in previous Comment addressed, this should then be about ready.
Created attachment 422710 [details, diff] magicpoint-1.13a_p20121015-draw-charset.patch This fixes a bug in upstream code which noticed by a GCC warning.
Created attachment 422712 [details, diff] magicpoint-1.13a_p20121015-draw-stringtoolong.patch This patch fixes an upstream bug causing mgp to hang with 100% CPU load when a string on a slide was too long to fit inside the presentation window. Now mgp exits with an error instead.
Created attachment 422714 [details, diff] magicpoint-1.13a_p20121015-implicit-declaration.patch This patch tries to fix all implicit declaration compiler warnings.
Created attachment 422718 [details, diff] magicpoint-1.13a_p20121015-any-giflib.patch This patch contains the actual fix for this bug; the upstream code is adapted to make it build successfully and work correctly with any version of giflib currently available in the gentoo tree, as well as with any older versions. Since giflib has a history of breaking API and ABI without changing soname this might need to be extended further in the future, but on the other hand I don't expect the giflib API to change further in these areas. As of 5.1.0 the API is finally thread-safe everywhere.
Created attachment 422720 [details, diff] magicpoint-1.13a_p20121015-gif-dimension.patch This patch fixes an upstream bug where an error message format string was used without passing data that matched the format, potentially causing an access to uninitialized memory at runtime.
Created attachment 422722 [details] magicpoint-1.13a_p20121015.ebuild This is an updated ebuild which applies the attached patches as neccessary, includes fixes for all feedback by Ian in comment#12 and works for me.
Created attachment 422726 [details, diff] magicpoint-1.13a_p20121015-parse-empty.patch Do not crash on .mgp files without any pages.
Created attachment 422728 [details] magicpoint-1.13a_p20121015.ebuild Updated ebuild which also applies parse-empty.patch.
Very good effort. A couple of fine points to finish off 1. I'd add a # Comment to qualify the opening sed statement in src_prepare. 2. pushd contrib requires on of the following options a) pushd contrib > /dev/null || die b) pushd contrib > /dev/null || die "nice $msg" c) pushd contrib || die +- "nice $msg" All are acceptable and appease repoman. (I'd go for c)) Then I shall add it albeit masked. The unmasking we shall handle separately
Created attachment 422748 [details] magicpoint-1.13a_p20121015.ebuild Updated ebuild with || die on all pushd lines
Created attachment 422750 [details] magicpoint-1.13a_p20121015.ebuild Add a comment describing that sed is used to put the snapshot date into the version string.
commit 4330b52986b655353b9aa63d7479537a9beee9f1 Author: Ian Delaney <idella4@gentoo.org> Date: Wed Jan 13 13:04:28 2016 +0800 app-office/magicpoint: bump to vn. 1.13a_p20121015, a snapshot ebuild prepared, with support, by user Peter Stuge, now entered as the proxy maintainer under the proxy-maintainers herd in metadata. Also new use flag 'contrib' added to metadata, ebuild and patches submitted all vua the gentoo bug, though the package remains pmasked for removal. Yet to be negotiated with pertinent devs Gentoo bug: #486248
Fails to build because of underlinking: /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: m17n.o: undefined reference to symbol 'FcPatternGetString' /usr/lib64/libfontconfig.so.1: error adding symbols: DSO missing from command line -lfontconfig is missing, adding it solves the problem x86_64-pc-linux-gnu-gcc -o mgp -O2 -march=native -pipe -Wl,-O1 -Wl,--as-needed -L/usr/lib64 mgp.o draw.o parse.o plist.o globals.o x11.o font.o background.o scanner.o grammar.o postscript.o tfont.o embed.o unimap.o mng.o m17n.o strlcpy.o strlcat.o -L./image -lmgpimage -lm -lpng16 -L/usr/lib -lpng -L/usr/lib -lmng -L/usr/lib/X11 -lXft -lgif -L/usr/lib64 -lm17n-core -lm17n -lm17n-flt -lm17n-gui -lm17n-core -lXext -lX11 -lfontconfig
(In reply to Attila Tóth from comment #25) > Fails to build because of underlinking: > /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../x86_64-pc-linux-gnu/bin/ > ld: m17n.o: undefined reference to symbol 'FcPatternGetString' > /usr/lib64/libfontconfig.so.1: error adding symbols: DSO missing from > command line > > -lfontconfig is missing, adding it solves the problem Thanks a lot for testing! I didn't look into m17n. :( fontconfig is actually not hard required, but is used if fontconfig.h is found. I'll go over the configure script tonight and upload an updated ebuild. I will not revbump it (-p1) since there is no difference in what gets installed.
unmasked and dropped the old version, for the pending bugs please use a separate bug Thanks
(In reply to Pacho Ramos from comment #27) > for the pending bugs please use a separate bug I've opened https://bugs.gentoo.org/show_bug.cgi?id=572658 with a new patch and a new ebuild attached.