Please see the attached ebuild for (suggested) app-text/tmview-1.03. TMView is a set of very useful DVI viewers - dvisvga, dvifb and dvilx. It depends on virtual/tetex and appropriate libraries (based on the USE flags). Some patches are needed for kpathsea support, enhanced portability etc. Part of them were derived from the Debian tmview package. The patches are attached to this bug, too.
Created attachment 50399 [details] tmview-1.03.ebuild
Created attachment 50400 [details, diff] tmview-compilefixes.patch
Created attachment 50401 [details, diff] tmview-kpathsea.patch
Created attachment 50402 [details, diff] tmview-manpages.patch
Created attachment 50403 [details, diff] tmview-portability.patch
I'll check and add it this weekend.
Hi, I looked at your ebuild. What should be done if you have all three USE flags unset? It looks it doesn't compile anything if X, svga and fb (fbcon is global USE flag, so fbcon is better though) are not set.
I think it should raise an error if you have all three USE flags unset. You should make up your mind _which_ one do you want and it doesn't make much sense to force any of them to you if you don't have any of the applicable USE flags set. I tend to disagree with fbcon over fb, since fbcon concerns a framebuffer _console_. I think a plain framebuffer is enough for the dvifb, and if we are to differentiate between those by using separate flags, fb should be probably the one. (Another question is whether it makes sense to differentiate; if it doesn't, why does xine have a local fb flag and doesn't use the global fbcon flag, too?)
OK, fb reasoning seems valid for me. Sorry for the wrong comment. There is only xine using the USE flag so we should add local USE flag as well. (Please write it to bugzilla if your ebuild needs local USE flag next time. If your ebuild only uses global USE flags, that's fine, but if it uses local ones we need to add it to /usr/portage/profiles/use.local.desc before starting to use it) If you can fix your ebuild to achieve what you wrote in Comment #8 it would be great (please reattach it here). If you cannot I'll do that but it will take a while. If you are going to do that pkg_setup() is the right place to check USE flags. Thanks in advance.
1/ There is a compilation error with gcc-3.4: empty label (default:) at the end of "switch" statement renders an error 2/ CFLAGS are not used by the Makefiles 3/ there is no USE flag for 8/16/32 bit configuration for dvilx Below is part of ebuild file, which addresses (1) and (2). it should be remade to patches, but that was easier for my purposes (two functions within ebuild were modified). Paul Ortyl ===================================================================== src_unpack() { unpack ${A} for i in tmview-compilefixes.patch tmview-kpathsea.patch tmview-manpages.patch tmview-portability.patch; do patch -d ${S} -p1 < ${FILESDIR}/$i || die done # correct the compilation error for x in `find . -name \*.c `; do perl -e 'undef $/; $_=<>; s/ default:([\n\t ]+\})/$1/gm; print $_' < $x >$x.new && mv $x.new $x; done # correct the makefiles, so that CFLAGS are used for x in `find . -name Make\*` ; do perl -e 'undef $/; $_=<>; s/(CC=[^\#\n]+)/$1 \$\(CFLAGS\) /gm; print $_' < $x >$x.new && mv $x.new $x; done } src_compile() { use svga && ( emake -f MakeSVGA CFLAGS="$CFLAGS" || die ) use fb && ( emake -f MakeFb CFLAGS="$CFLAGS" || die ) use X && ( emake -f MakeLX CFLAGS="$CFLAGS" || die ) }
last update in 2001 upstream, pretty sure it is not maintained anymore