Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40063 - xawtv soulhd be installable without X
Summary: xawtv soulhd be installable without X
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 88105
  Show dependency tree
 
Reported: 2004-02-01 05:00 UTC by Bernd Wurst
Modified: 2005-05-29 17:40 UTC (History)
0 users

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


Attachments
New ebuild file which is installable without X (xawtv-3.90-r1.ebuild,2.70 KB, text/plain)
2004-02-09 11:07 UTC, Bernd Wurst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Wurst 2004-02-01 05:00:12 UTC
XAWtv contains some tv- and radio related programs, some of them are console-based. It sould be possible to just build the command line tools if USE="-X" is set.
But xawtv does not use "X" use flag but hard depends on XFree.

I am pretty sure that it should be easy to fix this, because the ebuild passes some X-enabling configure-options to xawtv.

PS: the ebuild uses the "mmx" flag but it's not mentioned in IUSE.
Comment 1 Bernd Wurst 2004-02-09 11:07:46 UTC
Created attachment 25277 [details]
New ebuild file which is installable without X

I made some changes to the ebuild file making it possible to installed only the
console-apps of xawtv.
The author did some mistakes in the code and also in the autoconf-stuff so that
just passing --without-x does not do the trick. So I had to place some seds in
the ebuild. 
Everything I made is in 
if use X;
then [...]
fi;
so it should not affect users who want X support.
Comment 2 Evan Langlois 2004-09-27 17:51:08 UTC
Definately need to see this make it into portage!  However, it looks like the ebuild still thinks some x11 stuff is a dependency.
Comment 3 Aurélien Requiem 2004-12-13 04:39:55 UTC
I'm agree with the X dependencies... So i've produce my own ebuild and a small patch to completly remove X support for  xawtv package.

It is base on the 3.94 release. Tell me what do you think about this ebuild/patch. If you're agree with this small patch, could you also publish it to xawtv team, because it correct a bug. Thanks

------------- PATCH filename: xawtv-3.94-nox11.patch----------------------
diff -uNr xawtv-3.94.org/common/midictrl.c xawtv-3.94/common/midictrl.c
--- xawtv-3.94.org/common/midictrl.c    2003-02-14 15:14:04.000000000 +0100
+++ xawtv-3.94/common/midictrl.c        2004-12-11 14:41:12.432537194 +0100
@@ -6,7 +6,10 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <pthread.h>
+
+#ifndef X_DISPLAY_MISSING
 #include <X11/Intrinsic.h>
+#endif

 #include "grab-ng.h"
 #include "commands.h"

------------- /END PATCH -------------------------------------------------
This patch is to correct the X dependencies in configure script.

------------- EBUILD HERE -----------------------
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-tv/xawtv/xawtv-3.94.ebuild,v 1.1 2004/08/29 01:14:03 mholzer Exp $

# inherit virtualx
inherit eutils

IUSE="aalib alsa lirc mmx motif nls opengl quicktime zvbi X"

MY_PATCH="xawtv-3.94-nox11.patch"
MY_FONT=tv-fonts-1.0
DESCRIPTION="TV application for the bttv driver"
HOMEPAGE="http://bytesex.org/xawtv/"
SRC_URI="http://dl.bytesex.org/releases/xawtv/${P}.tar.gz
        http://dl.bytesex.org/releases/tv-fonts/${MY_FONT}.tar.bz2"
#       mirror://gentoo/${MY_PATCH}"

MY_PV="${P}.tar.gz"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~ppc ~sparc ~alpha ~ia64 ~amd64"

DEPEND=">=sys-libs/ncurses-5.1
        >=media-libs/jpeg-6b
        media-libs/libpng
        X? ( virtual/x11 )
        alsa? ( media-libs/alsa-lib )
        aalib? ( media-libs/aalib )
        motif? ( x11-libs/openmotif
                app-text/recode )
        opengl? ( virtual/opengl )
        quicktime? ( virtual/quicktime )
        zvbi? ( media-libs/zvbi )"

src_unpack() {
        unpack "${MY_PV}"
        use !X && epatch ${FILESDIR}/${MY_PATCH}
}


src_compile() {

#       mmx enables 32bit assembly which is not valid when compiling 64bit on amd64
        if [ "${ARCH}" = "x86" ]
        then
                myconf="`use_enable mmx`"
        else
                myconf=""
        fi

        if use X; then
                myconf="${myconf} --with-x --enable-xfree-ext --enable-xvideo "
        else
                myconf="${myconf} --without-x "
        fi

        econf \
                --enable-dv \
                `use_enable motif` \
                `use_enable quicktime` \
                `use_enable alsa` \
                `use_enable lirc` \
                `use_enable opengl gl`\
                `use_enable zvbi`\
                ${myconf} \
                `use_enable aalib aa` || die " xawtv configure failed"

        make || die
        if use X; then
                cd ${WORKDIR}/${MY_FONT}
                DISPLAY="" Xmake || die "tvfonts failed"
        fi
}

src_install() {
        cd ${S}
        einstall \
                libdir=${D}/usr/lib/xawtv \
                resdir=${D}/etc/X11 || die

        dodoc COPYING Changes README* TODO

        if [ -d /var/www/localhost ]
        then
                exeinto /var/www/localhost/cgi-bin
                doexe scripts/webcam.cgi
                dodoc ${FILESDIR}/webcamrc
        fi

        if ! use nls
        then
                rm -f ${D}/usr/share/man/fr
                rm -f ${D}/usr/share/man/es
        fi

        # The makefile seems to be fubar'd for some data
        dodir /usr/share/${PN}
        mv ${D}/usr/share/*.list ${D}/usr/share/${PN}
        mv ${D}/usr/share/Index* ${D}/usr/share/${PN}

        if use X; then
                cd ${WORKDIR}/${MY_FONT}
                insinto /usr/X11R6/lib/X11/fonts/xawtv
                doins *.gz fonts.alias
        fi
}

pkg_postinst() {

        if use X; then
                ebegin "installing teletype fonts into /usr/X11R6/lib/X11/fonts/xawtv"
                cd /usr/X11R6/lib/X11/fonts/xawtv
                mkfontdir
        fi
        eend
}
------------- /END EBUILD -----------------------
Please note, i've commented the line with "mirror://gentoo/${MY_PATCH}" because my patch is not present on gentoo's mirrors. Uncomment this line when the patch will be available ;-)

Please keep me informed about my solution and feel free to send comments or something like that
Thanks

Aur
Comment 4 Aurélien Requiem 2004-12-13 04:39:55 UTC
I'm agree with the X dependencies... So i've produce my own ebuild and a small patch to completly remove X support for  xawtv package.

It is base on the 3.94 release. Tell me what do you think about this ebuild/patch. If you're agree with this small patch, could you also publish it to xawtv team, because it correct a bug. Thanks

------------- PATCH filename: xawtv-3.94-nox11.patch----------------------
diff -uNr xawtv-3.94.org/common/midictrl.c xawtv-3.94/common/midictrl.c
--- xawtv-3.94.org/common/midictrl.c    2003-02-14 15:14:04.000000000 +0100
+++ xawtv-3.94/common/midictrl.c        2004-12-11 14:41:12.432537194 +0100
@@ -6,7 +6,10 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <pthread.h>
+
+#ifndef X_DISPLAY_MISSING
 #include <X11/Intrinsic.h>
+#endif

 #include "grab-ng.h"
 #include "commands.h"

------------- /END PATCH -------------------------------------------------
This patch is to correct the X dependencies in configure script.

------------- EBUILD HERE -----------------------
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-tv/xawtv/xawtv-3.94.ebuild,v 1.1 2004/08/29 01:14:03 mholzer Exp $

# inherit virtualx
inherit eutils

IUSE="aalib alsa lirc mmx motif nls opengl quicktime zvbi X"

MY_PATCH="xawtv-3.94-nox11.patch"
MY_FONT=tv-fonts-1.0
DESCRIPTION="TV application for the bttv driver"
HOMEPAGE="http://bytesex.org/xawtv/"
SRC_URI="http://dl.bytesex.org/releases/xawtv/${P}.tar.gz
        http://dl.bytesex.org/releases/tv-fonts/${MY_FONT}.tar.bz2"
#       mirror://gentoo/${MY_PATCH}"

MY_PV="${P}.tar.gz"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~ppc ~sparc ~alpha ~ia64 ~amd64"

DEPEND=">=sys-libs/ncurses-5.1
        >=media-libs/jpeg-6b
        media-libs/libpng
        X? ( virtual/x11 )
        alsa? ( media-libs/alsa-lib )
        aalib? ( media-libs/aalib )
        motif? ( x11-libs/openmotif
                app-text/recode )
        opengl? ( virtual/opengl )
        quicktime? ( virtual/quicktime )
        zvbi? ( media-libs/zvbi )"

src_unpack() {
        unpack "${MY_PV}"
        use !X && epatch ${FILESDIR}/${MY_PATCH}
}


src_compile() {

#       mmx enables 32bit assembly which is not valid when compiling 64bit on amd64
        if [ "${ARCH}" = "x86" ]
        then
                myconf="`use_enable mmx`"
        else
                myconf=""
        fi

        if use X; then
                myconf="${myconf} --with-x --enable-xfree-ext --enable-xvideo "
        else
                myconf="${myconf} --without-x "
        fi

        econf \
                --enable-dv \
                `use_enable motif` \
                `use_enable quicktime` \
                `use_enable alsa` \
                `use_enable lirc` \
                `use_enable opengl gl`\
                `use_enable zvbi`\
                ${myconf} \
                `use_enable aalib aa` || die " xawtv configure failed"

        make || die
        if use X; then
                cd ${WORKDIR}/${MY_FONT}
                DISPLAY="" Xmake || die "tvfonts failed"
        fi
}

src_install() {
        cd ${S}
        einstall \
                libdir=${D}/usr/lib/xawtv \
                resdir=${D}/etc/X11 || die

        dodoc COPYING Changes README* TODO

        if [ -d /var/www/localhost ]
        then
                exeinto /var/www/localhost/cgi-bin
                doexe scripts/webcam.cgi
                dodoc ${FILESDIR}/webcamrc
        fi

        if ! use nls
        then
                rm -f ${D}/usr/share/man/fr
                rm -f ${D}/usr/share/man/es
        fi

        # The makefile seems to be fubar'd for some data
        dodir /usr/share/${PN}
        mv ${D}/usr/share/*.list ${D}/usr/share/${PN}
        mv ${D}/usr/share/Index* ${D}/usr/share/${PN}

        if use X; then
                cd ${WORKDIR}/${MY_FONT}
                insinto /usr/X11R6/lib/X11/fonts/xawtv
                doins *.gz fonts.alias
        fi
}

pkg_postinst() {

        if use X; then
                ebegin "installing teletype fonts into /usr/X11R6/lib/X11/fonts/xawtv"
                cd /usr/X11R6/lib/X11/fonts/xawtv
                mkfontdir
        fi
        eend
}
------------- /END EBUILD -----------------------
Please note, i've commented the line with "mirror://gentoo/${MY_PATCH}" because my patch is not present on gentoo's mirrors. Uncomment this line when the patch will be available ;-)

Please keep me informed about my solution and feel free to send comments or something like that
Thanks

Aurélien Requiem
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2005-05-29 17:40:39 UTC
Fixed in CVS.