summaryrefslogtreecommitdiff
blob: f7662d8c7d288ca3c5d8ebba98137adc597112e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/picasa/picasa-2.2.2820.5.ebuild,v 1.9 2007/10/17 00:29:11 wolf31o2 Exp $

inherit eutils versionator

MY_P="picasa-$(replace_version_separator 3 '-')"
DESCRIPTION="Google's photo organizer"
HOMEPAGE="http://picasa.google.com"
SRC_URI="http://dl.google.com/linux/standalone/${MY_P}.i386.bin"
LICENSE="google-picasa"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
RESTRICT="mirror strip"
QA_TEXTRELS_x86="opt/picasa/wine/lib/wine/license.exe.so"
QA_EXECSTACK_x86="opt/picasa/bin/xsu
               opt/picasa/wine/bin/wine
               opt/picasa/wine/bin/wineserver
               opt/picasa/wine/bin/wine-pthread
               opt/picasa/wine/bin/wine-kthread
               opt/picasa/wine/lib/*
               opt/picasa/wine/lib/wine/*"

RDEPEND="x86? (
		dev-libs/atk
		dev-libs/glib
		dev-libs/libxml2
		sys-libs/zlib
		x11-libs/gtk+
		x11-libs/libICE
		x11-libs/libSM
		x11-libs/libX11
		x11-libs/libXext
		x11-libs/libXi
		x11-libs/libXt
		x11-libs/pango )
	amd64? (
		app-emulation/emul-linux-x86-gtklibs )"

S=${WORKDIR}

src_unpack() {
	unpack_makeself

	sed -i -e "s:28.20:28.3205:" \
		'wine/drive_c/Program Files/Picasa2/update/LifeScapeUpdater/currentversion.ini'
	sed -i -e "s:;;HKLM,Soft:HKLM,Soft:" -e \
		's:"DisableMediaDetector",0x10003,0x00000001:"DisableMediaDetector",0x10003,0x00000000:' \
		wine/drive_c/windows/inf/picasa.inf

	# Display unicode filenames correctly by not unsetting locale, bug #147094
	epatch ${FILESDIR}/picasa-unicode.patch
}

src_install() {
	insinto /opt/picasa
	doins -r bin wine
	chmod a+x ${D}/opt/picasa/{wine/{lib/{wine/*.so,*.so.1},bin/*},bin/*}
	keepdir /opt/picasa/wine/drive_c/windows/{command,system}

	dodir /usr/bin
	for i in picasa mediadetector s{et,how}picasascreensaver; do
		dosym /opt/picasa/bin/${i} /usr/bin/${i}
	done

	dodoc README LICENSE.FOSS

	cd desktop
	mv google-picasa-mediadetector.desktop.template google-picasa-mediadetector.desktop
	mv google-picasa.desktop.template google-picasa.desktop
	sed -i -e "s:EXEC:mediadetector:" google-picasa-mediadetector.desktop
	sed -i -e "s:EXEC:picasa:" google-picasa.desktop
	sed -i -e "s:ICON:picasa.xpm:" google-picasa{,-mediadetector}.desktop

	doicon picasa.xpm
	domenu {google-picasa{,-mediadetector},picasascr}.desktop
}