/[gentoo-x86]/eclass/gtk-engines.eclass
Gentoo

Contents of /eclass/gtk-engines.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.39 - (show annotations) (download)
Mon Nov 30 04:19:36 2009 UTC (5 years, 8 months ago) by abcd
Branch: MAIN
CVS Tags: HEAD
Changes since 1.38: +1 -1 lines
FILE REMOVED
Remove eclasses that have been marked as deprecated for >=2 years; schedule other deprecated eclasses for removal

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/gtk-engines.eclass,v 1.38 2008/02/10 14:47:14 eva Exp $
4
5 # IMPORTANT:
6 # This eclass is deprecated and should not be used in new ebuilds.
7
8 #
9 # The gtk-engines eclass is inherited by all gtk-engines-* ebuilds.
10 #
11 # Please note that Gtk engines are special packages that mainly provide
12 # common libraries for Gtk themes, and there is a special meta-package
13 # that have what you're probably looking for: gtk-themes.
14 #
15 # If you want themes to make your GTK 2 apps look pretty, you can do
16 # something like the following, and everything will be taken care of:
17 #
18 # emerge gtk-themes
19 #
20 # If themes for GTK 1 programs is what you're looking for, then something
21 # like this should help you:
22 #
23 # emerge =gtk-themes-1*
24
25 inherit eutils
26
27
28 [ -n "$DEBUG" ] && einfo "Entering gtk-engines.eclass"
29
30 [ -z "$DESCRIPTION" ] && DESCRIPTION="Based on the gtk-engines eclass"
31 [ -z "$HOMEPAGE" ] && HOMEPAGE="http://www.gnome.org/"
32 [ -z "$LICENSE" ] && LICENSE="GPL-2"
33
34 KEYWORDS="x86 ppc alpha sparc hppa amd64"
35
36 DEPEND=""
37
38 case "${SLOT}" in
39 "1" )
40 DEPEND="${DEPEND} =x11-libs/gtk+-1.2*" ;;
41 "2" )
42 DEPEND="${DEPEND} >=x11-libs/gtk+-2" ;;
43 * )
44 DEPEND="${DEPEND} x11-libs/gtk+" ;;
45 esac
46
47 [ -n "$DEBUG" ] && einfo "SLOT is ${SLOT}"
48
49 MY_PN="${PN}"
50 INSTALL_FONTS=0
51 ENGINE=${PN/gtk-engines-/}
52
53 [ -n "$DEBUG" ] && einfo "ENGINE is ${ENGINE}"
54
55 case "${ENGINE}" in
56 "cleanice" )
57 [ "$SLOT" -eq "2" ] && MY_PN="gtk-engines-cleanice2" ;;
58
59 "crux" )
60 MY_PN="crux" ;;
61
62 "eazel" )
63 MY_PN="eazel-engine" ;;
64
65 "flat" )
66 [ "$SLOT" -eq "2" ] && MY_PN="gtk-flat-theme-2.0" ;;
67
68 "geramik" )
69 MY_PN="3952-Geramik" ;;
70
71 "lighthouseblue" )
72 MY_PN="lighthouseblue" ;;
73
74 "metal" | "notif" | "pixbuf" | "pixmap" | "raleigh" | "redmond95" )
75 MY_PN="gtk-engines"
76 if [ "$SLOT" -eq "2" ]
77 then
78 DEPEND="${DEPEND} >=dev-util/pkgconfig-0.12.0"
79
80 # Do _NOT_ strip symbols in the build! Need both lines for Portage
81 # 1.8.9+
82 DEBUG="yes"
83 RESTRICT="strip"
84 # force debug information
85 CFLAGS="${CFLAGS} -g"
86 CXXFLAGS="${CXXFLAGS} -g"
87
88 else
89 DEPEND="${DEPEND} >=media-libs/imlib-1.8"
90 fi
91 ;;
92
93 "mist" )
94 MY_PN="GTK-mist-engine" ;;
95
96 "thinice" )
97 [ "$SLOT" -eq "2" ] && MY_PN="gtk-thinice-engine" ;;
98
99 "xenophilia" )
100 MY_PN="xenophilia"
101 INSTALL_FONTS=1
102 ;;
103
104 "xfce" )
105 MY_PN="gtk-xfce-engine" ;;
106 esac
107
108 MY_P="${MY_PN}-${PV}"
109
110 [ -n "$DEBUG" ] && einfo "MY_P is ${MY_P}"
111
112 if [ "X${ENGINE}" = "Xthinice" ] && [ "$SLOT" -eq "2" ]
113 then
114 SRC_URI="http://thinice.sourceforge.net/${MY_P}.tar.gz"
115
116 elif [ "X${ENGINE}" = "Xmist" ]
117 then
118 SRC_URI="http://ftp.gnome.org/pub/GNOME/teams/art.gnome.org/themes/gtk2/${MY_P}.tar.gz"
119
120 elif [ "X${ENGINE}" = "Xflat" ] && [ "$SLOT" -eq "2" ]
121 then
122 SRC_URI="http://download.freshmeat.net/themes/gtk2flat/gtk2flat-default.tar.gz"
123
124 elif [ "X${ENGINE}" = "Xgeramik" ]
125 then
126 SRC_URI="http://www.kde-look.org/content/files/${MY_P}.tar.gz"
127
128 elif [ "X${ENGINE}" = "Xxfce" ]
129 then
130 SRC_URI="mirror://sourceforge/xfce/${MY_P}.tar.gz"
131
132 elif [ "X${ENGINE}" = "Xlighthouseblue" ]
133 then
134 SRC_URI="mirror://sourceforge/lighthouseblue/${MY_P}.tar.gz"
135
136 elif [ "X${ENGINE}" = "Xcrux" ]
137 then
138 PVP=(${PV//[-\._]/ })
139 SRC_URI="mirror://gnome/sources/${MY_PN}/${PVP[0]}.${PVP[1]}/${MY_P}.tar.bz2"
140
141 elif [ "X${MY_PN}" = "Xgtk-engines" ] && [ "$SLOT" -eq "2" ]
142 then
143 PVP=(${PV//[-\._]/ })
144 SRC_URI="mirror://gnome/sources/${MY_PN}/${PVP[0]}.${PVP[1]}/${MY_P}.tar.bz2"
145
146 else
147 SRC_PATH="${MY_PN:0:1}/${MY_PN}/${MY_PN}_${PV}.orig.tar.gz"
148 SRC_URI="http://ftp.debian.org/debian/pool/main/$SRC_PATH"
149 fi
150
151 [ -n "$DEBUG" ] && einfo "SRC_URI is ${SRC_URI}"
152
153 gtk-engines_src_unpack() {
154 unpack ${A}
155
156 [ -f "${FILESDIR}/${P}-gentoo.diff" ] && \
157 patch -p0 < "${FILESDIR}/${P}-gentoo.diff"
158
159 MY_DIR=`ls -t ${WORKDIR} | head -n 1`
160
161 mv $MY_DIR $S
162 }
163
164 gtk-engines_src_compile() {
165 econf || die "./configure failed"
166
167 [ "X${MY_PN}" = "Xgtk-engines" ] && cd ${ENGINE}
168
169 emake || die "Compilation failed"
170 }
171
172 gtk-engines_src_install() {
173 [ "X${MY_PN}" = "Xgtk-engines" ] && cd ${ENGINE}
174
175 # Some corrections to misc files
176 if [ "X${ENGINE}" = "Xxenophilia" ]
177 then
178 dodir /usr/X11R6/$(get_libdir)/X11/fonts/misc
179
180 mv fonts/Makefile fonts/Makefile.orig
181 sed -e 's:/usr:${D}/usr:' \
182 -e 's:local:misc:' \
183 -e '7,8d' \
184 fonts/Makefile.orig > fonts/Makefile || die
185 rm fonts/Makefile.orig
186 fi
187
188 einstall \
189 THEME_DIR=${D}/usr/share/themes \
190 ENGINE_DIR=${D}/usr/$(get_libdir)/gtk/themes/engines \
191 || die "Installation failed"
192
193 # Remove unwanted stuff, since some engines include GTK-1 and GTK-2
194 # support.
195 if [ "X${ENGINE}" = "Xmist" ]
196 then
197 if [ "$SLOT" -eq "2" ]
198 then
199 rm -rf "${D}/usr/$(get_libdir)/gtk" "${D}/usr/share/themes/Mist/gtk"
200 else
201 rm -rf ${D}/usr/$(get_libdir)/gtk-2.0 ${D}/usr/share/themes/Mist/gtk-2.0
202 fi
203
204 rm -rf "${D}/usr/share/themes/Mist/metacity-1"
205
206 elif [ "X${ENGINE}" = "Xgeramik" ]
207 then
208 if [ "$SLOT" -eq "2" ]
209 then
210 mv "${D}/usr/share/themes/Geramik/gtk/*png" \
211 "${D}/usr/share/themes/Geramik/gtk-2.0"
212 mv "${D}/usr/share/themes/Geramik/gtk-2.0/gtkrc-2.0" \
213 "${D}/usr/share/themes/Geramik/gtk-2.0/gtkrc"
214
215 rm -rf "${D}/usr/$(get_libdir)/gtk" "${D}/usr/share/themes/Geramik/gtk"
216 else
217 rm -rf "${D}/usr/$(get_libdir)/gtk-2.0" "${D}/usr/share/themes/Geramik/gtk-2.0"
218 fi
219
220 elif [ "X${ENGINE}" = "Xlighthouseblue" ]
221 then
222 if [ "$SLOT" -eq "2" ]
223 then
224 rm -rf "${D}/usr/$(get_libdir)/gtk" "${D}/usr/share/themes/LighthouseBlue/gtk"
225 else
226 rm -rf \
227 "${D}/usr/$(get_libdir)/gtk-2.0" \
228 "${D}/usr/share/themes/LighthouseBlue/gtk-2.0"
229 fi
230 fi
231
232 for doc in AUTHORS BUGS ChangeLog CONFIGURATION COPYING CUSTOMIZATION \
233 NEWS README THANKS TODO
234 do
235 [ -s $doc ] && dodoc $doc
236 done
237 }
238
239 gtk-engines_pkg_postinst() {
240 if [ "$INSTALL_FONTS" -ne 0 ]
241 then
242 echo ">>> Updating X fonts..."
243 mkfontdir /usr/X11R6/$(get_libdir)/X11/fonts/misc
244 xset fp rehash || fonts_notice
245 fi
246 }
247
248 gtk-engines_pkg_postrm() {
249 if [ "$INSTALL_FONTS" -ne 0 ]
250 then
251 echo ">>> Updating X fonts..."
252 mkfontdir /usr/X11R6/$(get_libdir)/X11/fonts/misc
253 xset fp rehash || fonts_notice
254 fi
255 }
256
257 fonts_notice() {
258 einfo "We can't reset the font path at the moment. You might want"
259 einfo "to run the following command manually:"
260 einfo ""
261 einfo " xset fp rehash"
262 }
263
264 EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm

  ViewVC Help
Powered by ViewVC 1.1.20