summaryrefslogtreecommitdiff
blob: c9bf697a244f14fce5fe1f684d066ecf6564a882 (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
78
79
80
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils wxwidgets autotools gnome2

MY_P=XaraLX-${PV/_p/r}

DESCRIPTION="general purpose vector graphics program"
HOMEPAGE="http://www.xaraxtreme.org"
SRC_URI="http://downloads2.xara.com/opensource/${MY_P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

RDEPEND="x11-libs/gtk+
	>=x11-libs/wxGTK-2.6.3
	virtual/libintl
	>=media-libs/libpng-1.2.8
	>=media-libs/jpeg-6b
	app-arch/zip
	dev-lang/perl
	>=dev-libs/libxml2-2.6.0"
DEPEND="${RDEPEND}
	dev-util/pkgconfig
	>=sys-devel/gettext-0.14.3"

S=${WORKDIR}/${MY_P}

pkg_setup() {
	export WX_GTK_VER="2.6"
	need-wxwidgets unicode
}

src_unpack() {
	unpack ${A}
	cd "${S}"
	sed -i -e "s/CXFTreeDlg:://" Kernel/cxftree.h
	sed -i -e "s:XaraLX:xaralx:g" Makefile.am

	eautoreconf
}

src_compile() {
	econf \
		--with-wx-config=${WX_CONFIG} \
		--with-wx-base-config=${WX_CONFIG} \
		--enable-filters \
		|| die "econf failed"

	emake || die "emake failed"
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"

	insinto /usr/share/${PN}
	doins -r Designs Templates

	doicon ${PN}.png
	domenu ${PN}.desktop

	insinto /usr/share/icons/hicolor/48x48/mimetypes
	newins xaralx.png gnome-mime-application-vnd.xara.png
	insinto /usr/share/mime/packages
	doins Mime/xaralx.xml
	insinto /usr/share/application-registry
	doins Mime/mime-storage/gnome/xaralx.applications
	insinto /usr/share/mime-info
	doins Mime/mime-storage/gnome/xaralx.{keys,mime}

	doman doc/xaralx.1
	dodoc AUTHORS ChangeLog LICENSE NEWS README \
		doc/{gifutil.txt,mtrand.txt,XSVG.txt}
	newdoc doc/en/LICENSE LICENSE-docs
	dodir /usr/share/doc/${PF}/html
	tar xjf doc/en/xaralxHelp.tar.gz -C ${D}/usr/share/doc/${PF}/html
}