Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2012 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/x11-libs/wxGTK/wxGTK-2.8.12.1.ebuild,v 1.11 2012/05/31 13:25:49 jlec Exp $ |
4 |
|
5 |
EAPI="4" |
6 |
|
7 |
inherit eutils versionator flag-o-matic |
8 |
|
9 |
DESCRIPTION="GTK+ version of wxWidgets, a cross-platform C++ GUI toolkit" |
10 |
HOMEPAGE="http://wxwidgets.org/" |
11 |
|
12 |
BASE_PV="$(get_version_component_range 1-3)" |
13 |
BASE_P="${PN}-${BASE_PV}" |
14 |
|
15 |
# we use the wxPython tarballs because they include the full wxGTK sources and |
16 |
# docs, and are released more frequently than wxGTK. |
17 |
SRC_URI="mirror://sourceforge/wxpython/wxPython-src-${PV}.tar.bz2" |
18 |
|
19 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
20 |
IUSE="X aqua doc debug gnome gstreamer odbc opengl pch sdl tiff" |
21 |
|
22 |
RDEPEND=" |
23 |
dev-libs/expat |
24 |
odbc? ( dev-db/unixODBC ) |
25 |
sdl? ( media-libs/libsdl ) |
26 |
X? ( |
27 |
dev-libs/glib:2 |
28 |
media-libs/libpng:0 |
29 |
sys-libs/zlib |
30 |
virtual/jpeg |
31 |
x11-libs/gtk+:2 |
32 |
x11-libs/libSM |
33 |
x11-libs/libXinerama |
34 |
x11-libs/libXxf86vm |
35 |
x11-libs/pango[X] |
36 |
gnome? ( gnome-base/libgnomeprintui:2.2 ) |
37 |
gstreamer? ( |
38 |
gnome-base/gconf:2 |
39 |
>=media-libs/gstreamer-0.10 |
40 |
>=media-libs/gst-plugins-base-0.10 ) |
41 |
opengl? ( virtual/opengl ) |
42 |
tiff? ( media-libs/tiff:0 ) |
43 |
) |
44 |
aqua? ( |
45 |
>=x11-libs/gtk+-2.4[aqua=] |
46 |
virtual/jpeg |
47 |
tiff? ( media-libs/tiff:0 ) |
48 |
)" |
49 |
|
50 |
DEPEND="${RDEPEND} |
51 |
virtual/pkgconfig |
52 |
X? ( |
53 |
x11-proto/xproto |
54 |
x11-proto/xineramaproto |
55 |
x11-proto/xf86vidmodeproto |
56 |
)" |
57 |
|
58 |
PDEPEND=">=app-admin/eselect-wxwidgets-0.7" |
59 |
|
60 |
SLOT="2.8" |
61 |
LICENSE="wxWinLL-3 |
62 |
GPL-2 |
63 |
odbc? ( LGPL-2 ) |
64 |
doc? ( wxWinFDL-3 )" |
65 |
|
66 |
S="${WORKDIR}/wxPython-src-${PV}" |
67 |
|
68 |
src_prepare() { |
69 |
epatch "${FILESDIR}"/${PN}-2.8.11-unicode-odbc.patch |
70 |
epatch "${FILESDIR}"/${PN}-2.8.11-collision.patch |
71 |
epatch "${FILESDIR}"/${PN}-2.8.7-mmedia.patch # Bug #174874 |
72 |
epatch "${FILESDIR}"/${PN}-2.8.10.1-odbc-defines.patch # Bug #310923 |
73 |
sed \ |
74 |
-e "/wx_cv_std_libpath/s: /usr: ${EPREFIX}/usr:g" \ |
75 |
-i configure || die |
76 |
} |
77 |
|
78 |
src_configure() { |
79 |
local myconf |
80 |
|
81 |
append-flags -fno-strict-aliasing |
82 |
|
83 |
# X independent options |
84 |
myconf="--enable-compat26 |
85 |
--enable-shared |
86 |
--enable-unicode |
87 |
--with-regex=builtin |
88 |
--with-zlib=sys |
89 |
--with-expat=sys |
90 |
$(use_enable debug) |
91 |
$(use_enable pch precomp-headers) |
92 |
$(use_with odbc odbc sys) |
93 |
$(use_with sdl) |
94 |
$(use_with tiff libtiff sys)" |
95 |
|
96 |
# wxGTK options |
97 |
# --enable-graphics_ctx - needed for webkit, editra |
98 |
# --without-gnomevfs - bug #203389 |
99 |
|
100 |
use X && \ |
101 |
myconf="${myconf} |
102 |
--enable-graphics_ctx |
103 |
--enable-gui |
104 |
--with-libpng=sys |
105 |
--with-libxpm=sys |
106 |
--with-libjpeg=sys |
107 |
$(use_enable gstreamer mediactrl) |
108 |
$(use_enable opengl) |
109 |
$(use_with opengl) |
110 |
$(use_with gnome gnomeprint) |
111 |
--without-gnomevfs" |
112 |
|
113 |
use aqua && \ |
114 |
myconf="${myconf} |
115 |
--enable-graphics_ctx |
116 |
--enable-gui |
117 |
--with-libpng=sys |
118 |
--with-libxpm=sys |
119 |
--with-libjpeg=sys |
120 |
--with-mac |
121 |
--with-opengl" |
122 |
# cocoa toolkit seems to be broken |
123 |
# wxBase options |
124 |
if use !X && use !aqua ; then |
125 |
myconf="${myconf} |
126 |
--disable-gui" |
127 |
fi |
128 |
|
129 |
mkdir "${S}"/wxgtk_build |
130 |
cd "${S}"/wxgtk_build |
131 |
|
132 |
ECONF_SOURCE="${S}" econf ${myconf} |
133 |
} |
134 |
|
135 |
src_compile() { |
136 |
cd "${S}"/wxgtk_build |
137 |
|
138 |
emake |
139 |
|
140 |
if [[ -d contrib/src ]]; then |
141 |
cd contrib/src |
142 |
emake |
143 |
fi |
144 |
} |
145 |
|
146 |
src_install() { |
147 |
cd "${S}"/wxgtk_build |
148 |
|
149 |
emake DESTDIR="${D}" install |
150 |
|
151 |
if [[ -d contrib/src ]]; then |
152 |
cd contrib/src |
153 |
emake DESTDIR="${D}" install |
154 |
fi |
155 |
|
156 |
cd "${S}"/docs |
157 |
dodoc changes.txt readme.txt todo30.txt |
158 |
newdoc base/readme.txt base_readme.txt |
159 |
newdoc gtk/readme.txt gtk_readme.txt |
160 |
|
161 |
if use doc; then |
162 |
dohtml -r "${S}"/docs/html/* |
163 |
fi |
164 |
|
165 |
# We don't want this |
166 |
local wxmsw="${ED}usr/share/locale/it/LC_MESSAGES/wxmsw.mo" |
167 |
[[ -e ${wxmsw} ]] && rm "${wxmsw}" |
168 |
} |
169 |
|
170 |
pkg_postinst() { |
171 |
has_version app-admin/eselect-wxwidgets \ |
172 |
&& eselect wxwidgets update |
173 |
} |
174 |
|
175 |
pkg_postrm() { |
176 |
has_version app-admin/eselect-wxwidgets \ |
177 |
&& eselect wxwidgets update |
178 |
} |