Gentoo Archives: gentoo-user

From: Michael Orlitzky <michael@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Problem installing PHP pdo
Date: Sun, 23 Dec 2012 21:24:17
Message-Id: 50D77627.1010008@orlitzky.com
In Reply to: Re: [gentoo-user] Problem installing PHP pdo by Mike Diehl
1 On 12/23/2012 03:44 PM, Mike Diehl wrote:
2 >
3 > I did an emerge -s for pdo and didn't find anything so I followed the
4 > directions given on the eGroupware installation guide and ran:
5 >
6 > pecl install pdo
7 >
8 > Is there an ebuild that I should/could use instead?
9 >
10
11 Yep, it's a USE flag for dev-lang/php. In /etc/portage/package.use, you
12 can add,
13
14 dev-lang/php ... pdo ...
15
16 where the ellipses represent any other USE flags you may have set. The
17 re-emerge php with,
18
19 emerge -1 dev-lang/php
20
21 and it should work, although you may need to restart your web server first.
22
23 Digression: personally, I don't like Gentoo's webapp framework and I
24 don't use the ebuilds for any of the web applications that we run. But,
25 egroupware is in portage, as www-apps/egroupware.
26
27 This may make your life easier if you're familiar with webapps under
28 Gentoo: you can just emerge it, and it will make sure all of the
29 dependencies are satisfied.
30
31 If you *don't* want to go the webapp route, it still makes your life
32 easier, since somebody already went to the trouble of figuring out the
33 right dependencies. From the ebuild,
34
35 RDEPEND="jpgraph? ( dev-php/jpgraph )
36 dev-php/pear
37 dev-php/PEAR-Auth_SASL
38 virtual/httpd-php
39 dev-lang/php[gd,imap,pdo,posix,session,sqlite,ssl,
40 unicode,xml,zip,zlib,ldap?,mysql?,postgres?]
41 virtual/cron"
42
43 You should make sure you have each of these installed for eGroupware to
44 work. The stuff in square brackets [] are USE flags, in this case for
45 dev-lang/php.
46
47 Since I already mentioned that I don't use the webapp framework, what I
48 usually do in a case like this (where something's in portage but I don't
49 want to use it) is create my own ebuild just for the dependencies. So
50 basically, I would create an ebuild called egroupware-dependencies in an
51 overlay, and copy (R)DEPEND from the egroupware ebuild. The rest of the
52 ebuild would do nothing.
53
54 Then I emerge it, and it gets added to @world. This prevents someone
55 from later removing e.g. dev-php/PEAR-Auth_SASL because they don't know
56 what it's for. (That person would be me in, say, a year.)

Replies

Subject Author
Re: [gentoo-user] Problem installing PHP pdo Mike Diehl <mdiehl@××××××××.com>