Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 80815

Summary: app-text/tmview-1.03 - a set of DVI viewers - dvisvga, dvifb and dvilx
Product: Gentoo Linux Reporter: Petr Baudis <pasky>
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Status: RESOLVED OBSOLETE    
Severity: enhancement CC: tex
Priority: High Keywords: EBUILD, PATCH
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: tmview-1.03.ebuild
tmview-compilefixes.patch
tmview-kpathsea.patch
tmview-manpages.patch
tmview-portability.patch

Description Petr Baudis 2005-02-04 18:30:00 UTC
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.
Comment 1 Petr Baudis 2005-02-04 18:31:48 UTC
Created attachment 50399 [details]
tmview-1.03.ebuild
Comment 2 Petr Baudis 2005-02-04 18:33:20 UTC
Created attachment 50400 [details, diff]
tmview-compilefixes.patch
Comment 3 Petr Baudis 2005-02-04 18:33:37 UTC
Created attachment 50401 [details, diff]
tmview-kpathsea.patch
Comment 4 Petr Baudis 2005-02-04 18:33:48 UTC
Created attachment 50402 [details, diff]
tmview-manpages.patch
Comment 5 Petr Baudis 2005-02-04 18:34:02 UTC
Created attachment 50403 [details, diff]
tmview-portability.patch
Comment 6 Mamoru KOMACHI (RETIRED) gentoo-dev 2005-02-12 09:41:47 UTC
I'll check and add it this weekend.
Comment 7 Mamoru KOMACHI (RETIRED) gentoo-dev 2005-02-16 03:40:10 UTC
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.
Comment 8 Petr Baudis 2005-02-16 12:09:32 UTC
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?)
Comment 9 Mamoru KOMACHI (RETIRED) gentoo-dev 2005-02-16 20:11:09 UTC
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.
Comment 10 Paul Ortyl 2005-04-27 07:00:01 UTC
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 )
}

Comment 11 Alexis Ballier gentoo-dev 2017-02-08 18:03:30 UTC
last update in 2001 upstream, pretty sure it is not maintained anymore