* [gentoo-dev] Problem writing my first ebuild
@ 2002-06-14 23:09 Thomas de Grenier de Latour
2002-06-14 23:35 ` Chad M. Huneycutt
2002-06-14 23:52 ` Thomas de Grenier de Latour
0 siblings, 2 replies; 4+ messages in thread
From: Thomas de Grenier de Latour @ 2002-06-14 23:09 UTC (permalink / raw
To: gentoo-dev
Hi,
I'm trying to write an ebuild for "xawdecode", a TV program based on "xawtv". I've based on xawtv-3.7.2.ebuild, but I have a problem: a few files, some fonts to go in /usr/X11R6/lib/X11/fonts/misc, are shared by this two program, so I can't emerge my application because of a sandbox write lock. How are we supposed to deal with this kind of incompatibility ? I've though about patching the Makefile to place the font somewhere else, but I don't feel it really satisfying.
Thanks for your advice,
-- Thomas.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Problem writing my first ebuild
2002-06-14 23:09 [gentoo-dev] Problem writing my first ebuild Thomas de Grenier de Latour
@ 2002-06-14 23:35 ` Chad M. Huneycutt
2002-06-15 0:08 ` [gentoo-dev] " Thomas de Grenier de Latour
2002-06-14 23:52 ` Thomas de Grenier de Latour
1 sibling, 1 reply; 4+ messages in thread
From: Chad M. Huneycutt @ 2002-06-14 23:35 UTC (permalink / raw
To: gentoo-dev
Thomas de Grenier de Latour wrote:
> I'm trying to write an ebuild for "xawdecode", a TV program based on
> "xawtv". I've based on xawtv-3.7.2.ebuild, but I have a problem: a few
> files, some fonts to go in /usr/X11R6/lib/X11/fonts/misc, are shared by
> this two program, so I can't emerge my application because of a sandbox
> write lock. How are we supposed to deal with this kind of
> incompatibility ? I've though about patching the Makefile to place the
> font somewhere else, but I don't feel it really satisfying.
You are missing a very important point. Your ebuild should not be writing
*anything* to the live filesystem. Everything goes in ${D}
(/var/tmp/portage/<pkg-name>/image/). Have you looked at other ebuilds?
In particular, you should look at some examples of dodir and doins.
Chad
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-dev] Re: Problem writing my first ebuild
2002-06-14 23:09 [gentoo-dev] Problem writing my first ebuild Thomas de Grenier de Latour
2002-06-14 23:35 ` Chad M. Huneycutt
@ 2002-06-14 23:52 ` Thomas de Grenier de Latour
1 sibling, 0 replies; 4+ messages in thread
From: Thomas de Grenier de Latour @ 2002-06-14 23:52 UTC (permalink / raw
To: gentoo-dev
On Sat, 15 Jun 2002 01:09:24 +0200
Thomas de Grenier de Latour <degrenier@easyconnect.fr> wrote:
> a few files, some fonts to go in /usr/X11R6/lib/X11/fonts/misc, are
> shared by this two program, so I can't emerge my application because
> of a sandbox write lock.
Sorry about replying to myself, but I'm wondering if the problem is related to xawtv... I tried even after unmerging xawtv, and it still happens:
[...]
Making install in font
make[1]: Entering directory `/var/tmp/portage/xawdecode-1.6.1/work/xawdecode-1.6.1/font'
mkfontdir
mkdir -p //usr/X11R6/lib/X11/fonts/misc
for file in led-fixed.pcf; do \
install -m 644 $file //usr/X11R6/lib/X11/fonts/misc; \
done
ACCESS DENIED open_wr: //usr/X11R6/lib/X11/fonts/misc/led-fixed.pcf
install: cannot create regular file `//usr/X11R6/lib/X11/fonts/misc/led-fixed.pcf': Permission denied
make[1]: *** [install] Error 1
[...]
For informations, here is my attempt of ebuild file (all the fonts related stuff is exact copy of the xawtv ebuild, wich I'm not sure to understand...) :
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# Author Thomas de Grenier de Latour <degrenier@easyconnect.fr>
# (based on xawtv-3.7.3.ebuild by Craig Dooley)
S=${WORKDIR}/${P}
DESCRIPTION="TV application for the bttv driver, with decrypting plugin support"
SRC_URI="http://www.geocities.com/Xawdecode/download/xawdecode-1.6.1.tar.gz"
HOMEPAGE="http://www.xawdecode.fr.st"
SLOT="0"
DEPEND="virtual/glibc
>=media-libs/jpeg-6b
>=x11-base/xfree-4.0.1
encode? ( media-libs/divx4linux )
encode? ( media-sound/lame )
# for lirc support, have a look here:
# http://bugs.gentoo.org/show_bug.cgi?id=3328
lirc? ( sys-apps/lirc )"
src_unpack() {
unpack ${PN}-${PV}.tar.gz
cd ${S}
}
src_compile() {
local myconf
use encode && myconf="--enable-divx" \
|| myconf="--disable-divx"
use lirc && myconf="$myconf --enable-lirc" \
|| myconf="$myconf --disable-lirc"
./configure --prefix=/usr --host=${CHOST} \
--enable-jpeg \
--enable-xfree-ext \
--enable-xvideo \
--with-x $myconf || die
emake || die
}
src_install() {
fontdir=${D}/usr/X11R6/lib/X11/fonts/misc
make install \
prefix=${D}/usr \
mandir=${D}/usr/share/man
resdir=${D}/etc/X11 \
fontdir=$fontdir || die
# remove the bogus fonts.dir so it isn't "owned" by this ebuild
rm -f $fontdir/fonts.dir
dodoc AUTHORS Changelog COPYING NEWS
dodoc README* Readme*
}
src_postinst() {
mkfontdir /usr/X11R6/lib/X11/fonts/misc
}
src_postrm() {
mkfontdir /usr/X11R6/lib/X11/fonts/misc
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-dev] Re: Problem writing my first ebuild
2002-06-14 23:35 ` Chad M. Huneycutt
@ 2002-06-15 0:08 ` Thomas de Grenier de Latour
0 siblings, 0 replies; 4+ messages in thread
From: Thomas de Grenier de Latour @ 2002-06-15 0:08 UTC (permalink / raw
To: gentoo-dev
On Fri, 14 Jun 2002 19:35:21 -0400
"Chad M. Huneycutt" <chad.huneycutt@acm.org> wrote:
> Thomas de Grenier de Latour wrote:
> > I'm trying to write an ebuild for "xawdecode", a TV program based on
> > "xawtv". I've based on xawtv-3.7.2.ebuild, but I have a problem: a few
> > files, some fonts to go in /usr/X11R6/lib/X11/fonts/misc, are shared by
> > this two program, so I can't emerge my application because of a sandbox
> > write lock. How are we supposed to deal with this kind of
> > incompatibility ? I've though about patching the Makefile to place the
> > font somewhere else, but I don't feel it really satisfying.
>
> You are missing a very important point. Your ebuild should not be writing
> *anything* to the live filesystem. Everything goes in ${D}
> (/var/tmp/portage/<pkg-name>/image/). Have you looked at other ebuilds?
> In particular, you should look at some examples of dodir and doins.
>
Ok, I start to understand... I've got something like this, middle-clicked from the original xawtv ebuild:
[...]
src_install() {
fontdir=${D}/usr/X11R6/lib/X11/fonts/misc
make install \
prefix=${D}/usr \
mandir=${D}/usr/share/man \
resdir=${D}/etc/X11 \
fontdir=$fontdir || die
[...]
But $fontdir is probably not used in xawdecode Makefiles as it is in xawtv ones. Sorry about this, I think I need to give a closer look to several things before writing things I don't understand.
No TV tonight ;)
Thanks for your help,
-- Thomas.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-06-15 0:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-14 23:09 [gentoo-dev] Problem writing my first ebuild Thomas de Grenier de Latour
2002-06-14 23:35 ` Chad M. Huneycutt
2002-06-15 0:08 ` [gentoo-dev] " Thomas de Grenier de Latour
2002-06-14 23:52 ` Thomas de Grenier de Latour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox