Gentoo Archives: gentoo-dev

From: Thomas de Grenier de Latour <degrenier@×××××××××××.fr>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Problem writing my first ebuild
Date: Fri, 14 Jun 2002 18:49:11
Message-Id: 20020615015219.1acbafd8.degrenier@easyconnect.fr
In Reply to: [gentoo-dev] Problem writing my first ebuild by Thomas de Grenier de Latour
1 On Sat, 15 Jun 2002 01:09:24 +0200
2 Thomas de Grenier de Latour <degrenier@×××××××××××.fr> wrote:
3
4 > a few files, some fonts to go in /usr/X11R6/lib/X11/fonts/misc, are
5 > shared by this two program, so I can't emerge my application because
6 > of a sandbox write lock.
7
8 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:
9
10 [...]
11 Making install in font
12 make[1]: Entering directory `/var/tmp/portage/xawdecode-1.6.1/work/xawdecode-1.6.1/font'
13 mkfontdir
14 mkdir -p //usr/X11R6/lib/X11/fonts/misc
15 for file in led-fixed.pcf; do \
16 install -m 644 $file //usr/X11R6/lib/X11/fonts/misc; \
17 done
18 ACCESS DENIED open_wr: //usr/X11R6/lib/X11/fonts/misc/led-fixed.pcf
19 install: cannot create regular file `//usr/X11R6/lib/X11/fonts/misc/led-fixed.pcf': Permission denied
20 make[1]: *** [install] Error 1
21 [...]
22
23
24
25 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...) :
26
27 # Copyright 1999-2002 Gentoo Technologies, Inc.
28 # Distributed under the terms of the GNU General Public License v2
29 # Author Thomas de Grenier de Latour <degrenier@×××××××××××.fr>
30 # (based on xawtv-3.7.3.ebuild by Craig Dooley)
31
32 S=${WORKDIR}/${P}
33 DESCRIPTION="TV application for the bttv driver, with decrypting plugin support"
34 SRC_URI="http://www.geocities.com/Xawdecode/download/xawdecode-1.6.1.tar.gz"
35 HOMEPAGE="http://www.xawdecode.fr.st"
36 SLOT="0"
37 DEPEND="virtual/glibc
38 >=media-libs/jpeg-6b
39 >=x11-base/xfree-4.0.1
40 encode? ( media-libs/divx4linux )
41 encode? ( media-sound/lame )
42 # for lirc support, have a look here:
43 # http://bugs.gentoo.org/show_bug.cgi?id=3328
44 lirc? ( sys-apps/lirc )"
45
46 src_unpack() {
47 unpack ${PN}-${PV}.tar.gz
48 cd ${S}
49 }
50
51 src_compile() {
52 local myconf
53 use encode && myconf="--enable-divx" \
54 || myconf="--disable-divx"
55 use lirc && myconf="$myconf --enable-lirc" \
56 || myconf="$myconf --disable-lirc"
57
58
59 ./configure --prefix=/usr --host=${CHOST} \
60 --enable-jpeg \
61 --enable-xfree-ext \
62 --enable-xvideo \
63 --with-x $myconf || die
64
65 emake || die
66 }
67
68 src_install() {
69 fontdir=${D}/usr/X11R6/lib/X11/fonts/misc
70 make install \
71 prefix=${D}/usr \
72 mandir=${D}/usr/share/man
73 resdir=${D}/etc/X11 \
74 fontdir=$fontdir || die
75
76 # remove the bogus fonts.dir so it isn't "owned" by this ebuild
77 rm -f $fontdir/fonts.dir
78
79 dodoc AUTHORS Changelog COPYING NEWS
80 dodoc README* Readme*
81 }
82
83 src_postinst() {
84 mkfontdir /usr/X11R6/lib/X11/fonts/misc
85 }
86
87 src_postrm() {
88 mkfontdir /usr/X11R6/lib/X11/fonts/misc
89 }