/[gentoo-x86]/eclass/gtk-sharp-module.eclass
Gentoo

Contents of /eclass/gtk-sharp-module.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (show annotations) (download)
Wed Feb 25 06:48:13 2009 UTC (5 years, 4 months ago) by zmedico
Branch: MAIN
Changes since 1.16: +3 -3 lines
Fix invalid combination of >= and * in gnome-desktop-sharp and gnome-panel-sharp deps.

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/gtk-sharp-module.eclass,v 1.16 2009/02/24 22:04:56 loki_val Exp $
4
5 # @ECLASS: gtk-sharp-module.eclass
6 # @MAINTAINER:
7 # dotnet@gentoo.org
8 # @BLURB: Manages the modules of the gtk-, gnome-, and gnome-desktop-sharp tarballs
9 # @DESCRIPTION:
10 # This eclass provides phase functions and helper functions for the modules
11 # of the gtk-sharp, gnome-sharp and gnome-desktop-sharp tarballs.
12 # PLEASE TAKE NOTE: ONLY FOR EAPI-2 EBUILDS
13
14 WANT_AUTOMAKE=none
15 WANT_AUTOCONF=none
16
17 inherit eutils mono multilib autotools base versionator
18
19 # @ECLASS-VARIABLE: GTK_SHARP_MODULE
20 # @DESCRIPTION:
21 # The name of the Gtk# module.
22 # Default value: ${PN/-sharp/}
23 GTK_SHARP_MODULE=${GTK_SHARP_MODULE:=${PN/-sharp/}}
24
25 # @ECLASS-VARIABLE: GTK_SHARP_MODULE_DIR
26 # @DESCRIPTION:
27 # The subdirectory of S in which GTK_SHARP_MODULE is installed.
28 # Default value: ${PN/-sharp/}
29 GTK_SHARP_MODULE_DIR=${GTK_SHARP_MODULE_DIR:=${PN/-sharp/}}
30
31 # @ECLASS-VARIABLE: GTK_SHARP_REQUIRED_VERSION
32 # @DESCRIPTION:
33 # The version of the gtk-sharp tarball this package requires.
34 # Optional.
35 GTK_SHARP_REQUIRED_VERSION="${GTK_SHARP_REQUIRED_VERSION}"
36
37 # @ECLASS-VARIABLE: gapi_users_list
38 # @DESCRIPTION:
39 # List of modules that use one of gapi2-codegen, gapi2-fixup or gapi2-parser
40 # No ebuild-serviceable parts inside.
41 gapi_users_list="art gnome gnomevfs ${gnome_desktop_sharp_module_list} atk gtk gdk glade pango"
42
43 # @ECLASS-VARIABLE: PV_MAJOR
44 # @DESCRIPTION:
45 # The first two components of the PV variable.
46 PV_MAJOR=$(get_version_component_range 1-2)
47
48 # @FUNCTION: add_bdepends
49 # @USAGE: <package atom>
50 # @DESCRIPTION:
51 # Adds to the DEPEND variable
52 add_bdepend() {
53 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument"
54 DEPEND="${DEPEND} $@"
55 }
56
57 # @FUNCTION: add_rdepends
58 # @USAGE: <package atom>
59 # @DESCRIPTION:
60 # Adds to the RDEPEND variable
61 add_rdepend() {
62 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument"
63 RDEPEND="${RDEPEND} $@"
64 }
65
66 # @FUNCTION: add_depend
67 # @USAGE: <package atom>
68 # @DESCRIPTION:
69 # Adds to the DEPEND and RDEPEND variables
70 add_depend() {
71 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument"
72 DEPEND="${DEPEND} $@"
73 RDEPEND="${RDEPEND} $@"
74 }
75
76 # @ECLASS-VARIABLE: TARBALL
77 # @DESCRIPTION:
78 # The GtkSharp modules are currently divided into three seperate tarball
79 # distributions. The TARBALL variable holds the name of the tarball
80 # to which GTK_SHARP_MODULE belongs.
81 case ${GTK_SHARP_MODULE} in
82 glib|glade|gtk|gdk|atk|pango|gtk-dotnet|gtk-gapi|gtk-docs)
83 TARBALL="gtk-sharp"
84 case ${PVR} in
85 2.12.*)
86 SRC_URI="mirror://gentoo/gtk-sharp-2.12.7.patch.bz2"
87 #Upstream: https://bugzilla.novell.com/show_bug.cgi?id=$bugno
88 #Upstream bug #470390 for the gtk-sharp-2.12.7.patch
89 PATCHES=(
90 "${WORKDIR}/${TARBALL}-2.12.7.patch"
91 )
92 EAUTORECONF="YES"
93 add_bdepend "=sys-devel/automake-1.10*"
94 add_bdepend ">=sys-devel/autoconf-2.61"
95 ;;
96 esac
97 ;;
98 art|gnome|gnomevfs|gconf)
99 TARBALL="gnome-sharp"
100 add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
101 has "${GTK_SHARP_MODULE}" "${gapi_users_list}" && \
102 add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*"
103 ;;
104 gnome-desktop|gnome-print|gnome-panel|gtkhtml|gtksourceview|nautilusburn|rsvg|vte|wnck)
105 TARBALL="gnome-desktop-sharp"
106 add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
107 add_depend "=dev-dotnet/gnome-sharp-${PV_MAJOR}*"
108 add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*"
109 ;;
110 *)
111 eerror "Huh? Sonny boy, looks like your GTK_SHARP_MODULE is not on the approved list. BAILING!"
112 die "How did we get here!!?"
113 ;;
114 esac
115
116 case ${PF} in
117 #gtk-sharp tarball
118 gtk-sharp-docs*)
119 add_depend ">=virtual/monodoc-2.0"
120 ;;
121 gtk-sharp-gapi*)
122 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
123 add_depend "dev-perl/XML-LibXML"
124 ;;
125 gtk-sharp-*)
126 add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
127 add_depend "~dev-dotnet/glib-sharp-${PV}"
128 add_depend "~dev-dotnet/atk-sharp-${PV}"
129 add_depend "~dev-dotnet/gdk-sharp-${PV}"
130 add_depend "~dev-dotnet/pango-sharp-${PV}"
131 ;;
132 gdk-sharp-*)
133 add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
134 add_depend "~dev-dotnet/glib-sharp-${PV}"
135 add_depend "x11-libs/gtk+:2"
136 add_depend "~dev-dotnet/pango-sharp-${PV}"
137 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
138 ;;
139 atk-sharp-*)
140 add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
141 add_depend "~dev-dotnet/glib-sharp-${PV}"
142 add_depend "dev-libs/atk"
143 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
144 ;;
145 glib-sharp-*)
146 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
147 add_depend "dev-libs/glib:2"
148 ;;
149 pango-sharp-*)
150 add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
151 add_depend "~dev-dotnet/glib-sharp-${PV}"
152 add_depend "x11-libs/pango"
153 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
154 ;;
155 gtk-dotnet-*)
156 add_depend "~dev-dotnet/glib-sharp-${PV}"
157 add_depend "~dev-dotnet/gdk-sharp-${PV}"
158 add_depend "~dev-dotnet/pango-sharp-${PV}"
159 add_depend "~dev-dotnet/gtk-sharp-${PV}"
160 add_depend "dev-lang/mono[-minimal]"
161 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
162 ;;
163 glade-sharp-*)
164 add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
165 add_depend "~dev-dotnet/glib-sharp-${PV}"
166 add_depend "~dev-dotnet/atk-sharp-${PV}"
167 add_depend "~dev-dotnet/gdk-sharp-${PV}"
168 add_depend "~dev-dotnet/gtk-sharp-${PV}"
169 add_depend "~dev-dotnet/pango-sharp-${PV}"
170 add_depend ">=gnome-base/libglade-2.3.6"
171 ;;
172 #gnome-sharp tarball
173 art-sharp-*)
174 add_depend ">=media-libs/libart_lgpl-2.3.20"
175 ;;
176 gnome-sharp-*)
177 add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}"
178 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}"
179 add_depend "~dev-dotnet/gnomevfs-sharp-${PV}"
180 add_depend "~dev-dotnet/art-sharp-${PV}"
181 add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}"
182 ;;
183 gconf-sharp-*)
184 add_depend ">=gnome-base/gconf-${PV_MAJOR}"
185 add_depend ">=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}"
186 add_depend "~dev-dotnet/gnome-sharp-${PV}"
187 add_depend "~dev-dotnet/art-sharp-${PV}"
188 ;;
189 gnomevfs-sharp-*)
190 add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}"
191 ;;
192 #gnome-desktop-sharp tarball
193 gnome-desktop-sharp-*)
194 add_depend ">=gnome-base/gnome-desktop-${PV_MAJOR}"
195 ;;
196 gnome-panel-sharp-*)
197 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}"
198 ;;
199 gnome-print-sharp-*)
200 add_depend ">=gnome-base/libgnomeprint-${API_VERSION}"
201 ;;
202 gtkhtml-sharp-*)
203 #NOTE: gtkhtml dependency must follow gtkhtml-sharp version.
204 #i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24
205 # gtkhtml-sharp-2.16.0 >=gtkhtml-3.16
206 # See bug 249540 for unpleasant side effects.
207 add_depend ">=gnome-extra/gtkhtml-$(($(get_version_component_range 1) + 1 )).$(get_version_component_range 2)"
208 ;;
209 gtksourceview-sharp-*)
210 add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0"
211 ;;
212 nautilusburn-sharp-*)
213 add_depend ">=gnome-extra/nautilus-cd-burner-${PV_MAJOR}"
214 ;;
215 rsvg-sharp-*)
216 add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}"
217 ;;
218 vte-sharp-*)
219 add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}"
220 ;;
221 wnck-sharp-*)
222 add_depend ">=x11-libs/libwnck-${PV_MAJOR}"
223 ;;
224 esac
225
226 # @ECLASS-VARIABLE: DESCRIPTION
227 # @DESCRIPTION:
228 # Default value: GtkSharp's ${GTK_SHARP_MODULE} module of the ${TARBALL} tarball
229 DESCRIPTION="GtkSharp's ${GTK_SHARP_MODULE} module of the ${TARBALL} tarball"
230 # @ECLASS-VARIABLE: HOMEPAGE
231 # @DESCRIPTION:
232 # Default value: http://www.mono-project.com/GtkSharp
233 HOMEPAGE="http://www.mono-project.com/GtkSharp"
234 # @ECLASS-VARIABLE: DESCRIPTION
235 # @DESCRIPTION:
236 # Default value: LGPL-2.1
237 LICENSE="LGPL-2.1"
238
239 add_depend ">=dev-lang/mono-2.0.1"
240 add_bdepend ">=sys-apps/sed-4"
241 add_bdepend ">=dev-util/pkgconfig-0.23"
242 add_bdepend ">=app-shells/bash-3.1"
243
244 IUSE="debug"
245 # @ECLASS-VARIABLE: HOMEPAGE
246 # @DESCRIPTION:
247 # Default value: ${WORKDIR}/${TARBALL}-${PV}
248 S="${WORKDIR}/${TARBALL}-${PV}"
249 # @ECLASS-VARIABLE: SRC_URI
250 # @DESCRIPTION:
251 # Default value: mirror://gnome/sources/${TARBALL}/${PV_MAJOR}/${TARBALL}-${PV}.tar.bz2
252 SRC_URI="${SRC_URI}
253 mirror://gnome/sources/${TARBALL}/${PV_MAJOR}/${TARBALL}-${PV}.tar.bz2"
254
255 # @FUNCTION: get_sharp_apis
256 # @USAGE: <type> <pkgconfig-package>
257 # @RETURN: .NET API files
258 # @DESCRIPTION:
259 # Given a valid pkg-config package, will return a list of API xml files.
260 # <type> can be either --prefixed or --bare. If prefixed, each API file
261 # will be prefixed with -I:
262 get_sharp_apis() {
263 [[ ${#@} -eq 2 ]] || die "${FUNCNAME} needs two arguments"
264 get_sharp_assemblies "$@"
265 }
266
267 # @FUNCTION: get_sharp_assemblies
268 # @USAGE: <type> <pkgconfig-package>
269 # @RETURN: .NET .dll assemblies
270 # @DESCRIPTION:
271 # Given a valid pkg-config package, will return a list of .dll assemblies.
272 # <type> can be either --prefixed or --bare. If prefixed, each .dll file
273 # will be prefixed with -r:
274 get_sharp_assemblies() {
275 [[ ${#@} -eq 2 ]] || die "${FUNCNAME} needs two arguments"
276 local string config=libs prefix="-r:"
277 local -a rvalue
278 [[ "${FUNCNAME[1]}" = "get_sharp_apis" ]] && config=cflags && prefix="-I:"
279 for string in $(pkg-config --${config} ${2} 2> /dev/null)
280 do
281 rvalue+=( ${string#-?:} )
282 done
283
284 case $1 in
285 --bare)
286 :
287 ;;
288 --prefixed)
289 for (( i=0 ; i< ${#rvalue[@]} ; i++ ))
290 do
291 rvalue[$i]=${prefix}${rvalue[$i]}
292 done
293 ;;
294 *)
295 die "${FUNCNAME}: Unknown parameter"
296 ;;
297 esac
298 echo "${rvalue[@]}"
299 }
300
301 # @FUNCTION: phase_hook
302 # @USAGE: <prefix>
303 # Looks for functions named <prefix>_caller_suffix and executes them.
304 # _caller_suffix is the calling function with the prefix
305 # gtk-sharp-module removed.
306 phase_hook() {
307 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs one argument"
308 if [[ "$(type -t ${1}${FUNCNAME[1]#gtk-sharp-module})" = "function" ]]
309 then
310 ebegin "Phase-hook: Running ${1}${FUNCNAME[1]#gtk-sharp-module}"
311 ${1}${FUNCNAME[1]#gtk-sharp-module}
312 eend 0
313 fi
314 }
315
316 # @FUNCTION: ac_path_prog_override
317 # @USAGE: <PROG> [path]
318 # @DESCRIPTION:
319 # Override AC_PATH_PROG() autoconf macros. Path will be set to " " if
320 # not specified.
321 ac_path_prog_override() {
322 if [[ ${#@} -lt 1 || ${#@} -gt 2 ]]
323 then
324 eerror "${FUNCNAME[0]} requires at least one parameter and takes at most two:"
325 eerror "AC_PATH_PROG(PARAM1, param2)"
326 die "${FUNCNAME[0]} requires at least one parameter and takes at most two:"
327 fi
328 export ac_cv_path_${1}="${2:- }"
329 }
330
331
332 # @FUNCTION: pkg_check_modules_override
333 # @USAGE: <GROUP> [package1] [package2]
334 # @DESCRIPTION:
335 # Will export the appropriate variables to override PKG_CHECK_MODULES autoconf
336 # macros, with the string " " by default. If packages are specified, they will
337 # be looked up with pkg-config and the appropriate LIBS and CFLAGS substituted.
338 # LIBS and CFLAGS can also be specified per-package with the following syntax:
339 # @CODE
340 # package=LIBS%CFLAGS
341 # @CODE
342 # = and % have no effect unless both are specified.
343 # Here is an example:
344 # @CODE
345 # pkg_check_modules_override GASH "gtk+-2.0=-jule%" gobject-2.0
346 # @CODE
347 # The above example will do:
348 # export GASH_CFLAGS+=" -jule"
349 # export GASH_LIBS+=" "
350 # export GASH_CFLAGS+=" $(pkg-config --cflags gobject-2.0)"
351 # export GASH_LIBS+=" $(pkg-config --libs gobject-2.0)"
352 #
353 # NOTE: If a package is not found, the string " " will be inserted in place of
354 # <GROUP>_CFLAGS and <GROUP>_LIBS
355 pkg_check_modules_override() {
356 local package
357 local group="${1}"
358 local packages="${*:2}"
359 export ${group}_CFLAGS=" "
360 export ${group}_LIBS=" "
361
362 if [[ ${#@} -lt 1 ]]
363 then
364 eerror "${FUNCNAME[0]} requires at least one parameter: GROUP"
365 eerror "PKG_CHECK_MODULES(GROUP, package1 package2 etc)"
366 die "${FUNCNAME[0]} requires at least one parameter: GROUP"
367 fi
368
369 for package in $packages
370 do
371 if [[ ${package/=} != ${package} && ${package/\%} != ${package} ]]
372 then
373 package_cflag_libs=${package##*=}
374 export ${group}_CFLAGS+=" ${package_cflag_libs%%\%*}"
375 export ${group}_LIBS+=" ${package_cflag_libs##*\%}"
376 else
377 if pkg-config --exists $package
378 then
379 export ${group}_CFLAGS+=" $(pkg-config --cflags $package)"
380 export ${group}_LIBS+=" $(pkg-config --libs $package)"
381 else
382 export ${group}_CFLAGS+=" "
383 export ${group}_LIBS+=" "
384 fi
385 fi
386 done
387 }
388
389 # @FUNCTION: gtk-sharp-tarball-post_src_prepare
390 # @DESCRIPTION:
391 # Runs a M-m-m-monster sed on GTK_SHARP_MODULE_DIR to convert references to
392 # local assemblies to the installed ones. Is only called by src_prepare when
393 # $GTK_SHARP_MODULE is a member of $gtk_sharp_module_list.
394 gtk-sharp-tarball-post_src_prepare() {
395 cd "${S}/${GTK_SHARP_MODULE_DIR}"
396 sed -i \
397 -e "s; \$(srcdir)/../glib/glib-api.xml; $(get_sharp_apis --bare glib-sharp-2.0);" \
398 -e "s; ../pango/pango-api.xml; $(get_sharp_apis --bare pango-sharp-2.0);" \
399 -e "s; ../atk/atk-api.xml; $(get_sharp_apis --bare atk-sharp-2.0);" \
400 -e "s; ../gdk/gdk-api.xml; $(get_sharp_apis --bare gdk-sharp-2.0);" \
401 -e "s; ../gtk/gtk-api.xml; $(get_sharp_apis --bare gtk-sharp-2.0);" \
402 -e "s; \.\./glib/glib-sharp.dll; $(get_sharp_assemblies --bare glib-sharp-2.0);g" \
403 -e "s; \.\./pango/pango-sharp.dll; $(get_sharp_assemblies --bare pango-sharp-2.0);g" \
404 -e "s; \.\./atk/atk-sharp.dll; $(get_sharp_assemblies --bare atk-sharp-2.0);g" \
405 -e "s; \.\./gdk/gdk-sharp.dll; $(get_sharp_assemblies --bare gdk-sharp-2.0);g" \
406 -e "s; \.\./gtk/gtk-sharp.dll; $(get_sharp_assemblies --bare gtk-sharp-2.0);g" \
407 -e "s;\$(RUNTIME) \$(top_builddir)/parser/gapi-fixup.exe;/usr/bin/gapi2-fixup;" \
408 -e "s;\$(RUNTIME) \$(top_builddir)/generator/gapi_codegen.exe;/usr/bin/gapi2-codegen;" \
409 -e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \
410 -e "s:\$(INCLUDE_API) \$(top_builddir)/generator/gapi_codegen.exe:\$(INCLUDE_API):" \
411 $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles"
412 }
413
414 # @FUNCTION: gnome-sharp-tarball-post_src_prepare
415 # @DESCRIPTION:
416 # Runs a M-m-m-monster sed on GTK_SHARP_MODULE_DIR to convert references to
417 # local assemblies to the installed ones. Is only called by src_prepare when
418 # $GTK_SHARP_MODULE is a member of $gnome_sharp_module_list.
419 gnome-sharp-tarball-post_src_prepare() {
420 cd "${S}/${GTK_SHARP_MODULE_DIR}"
421 sed -i \
422 -e "s; ../gnomevfs/gnome-vfs-api.xml; $(get_sharp_apis --bare gnome-vfs-sharp-2.0);" \
423 -e "s; ../art/art-api.xml; $(get_sharp_apis --bare art-sharp-2.0);" \
424 -e "s; \.\./art/art-sharp.dll; $(get_sharp_assemblies --bare art-sharp-2.0);g" \
425 -e "s; \.\./gnomevfs/gnome-vfs-sharp.dll; $(get_sharp_assemblies --bare gnome-vfs-sharp-2.0);g" \
426 -e "s;/r:\$(top_builddir)/art/art-sharp.dll;$(get_sharp_assemblies --prefixed art-sharp-2.0);" \
427 -e "s;/r:\$(top_builddir)/gnome/gnome-sharp.dll;$(get_sharp_assemblies --prefixed gnome-sharp-2.0);" \
428 $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles"
429 }
430
431 # @FUNCTION: gtk-sharp-module_src_prepare
432 # @DESCRIPTION:
433 # Runs autopatch from base.eclass, eautoreconf if EAUTORECONF is set to any
434 # value.
435 # Contains a phase_hook, runs very last.
436 # phase_hook prefix trigger: ${TARBALL}-tarball-post
437 # Is exported.
438 gtk-sharp-module_src_prepare() {
439 base_src_util autopatch
440 # @ECLASS-VARIABLE: EAUTORECONF
441 # @DESCRIPTION:
442 # If set, EAUTORECONF will be run during src_prepare.
443 [[ ${EAUTORECONF} ]] && eautoreconf
444 phase_hook ${TARBALL}-tarball-post
445 }
446
447 # @FUNCTION: gtk-sharp-tarball_src_configure
448 # @DESCRIPTION:
449 # Sets some environment variables that will allow us to make the dependencies
450 # for each ebuild be only its own dependencies, without patching configure.
451 # Is only called by gtk-sharp-module_src_configure when $GTK_SHARP_MODULE
452 # is a member of $gtk_sharp_module_list.
453 gtk-sharp-tarball_src_configure() {
454 pkg_check_modules_override GLIB gobject-2.0
455 pkg_check_modules_override GIO gio-2.0
456 pkg_check_modules_override PANGO pango
457 pkg_check_modules_override ATK atk
458 pkg_check_modules_override GTK gtk+-2.0
459 pkg_check_modules_override GLADE libglade-2.0
460 }
461
462 # @FUNCTION: gnome-sharp-tarball_src_configure
463 # @DESCRIPTION:
464 # Sets some environment variables that will allow us to make the dependencies
465 # for each ebuild be only its own dependencies. Without patching configure.
466 # Is only called by gtk-sharp-module_src_configure when $GTK_SHARP_MODULE
467 # is a member of $gnome_sharp_module_list.
468 gnome-sharp-tarball_src_configure() {
469 pkg_check_modules_override GLADESHARP glade-sharp-2.0
470 pkg_check_modules_override GAPI gapi-2.0
471 ac_path_prog_override GAPI_PARSER /usr/bin/gapi2-parser
472 ac_path_prog_override GAPI_CODEGEN /usr/bin/gapi2-codegen
473 ac_path_prog_override GAPI_FIXUP /usr/bin/gapi2-fixup
474 }
475
476 # @FUNCTION: gtk-sharp-module_src_configure
477 # @USAGE: [econf-arguments]
478 # @DESCRIPTION:
479 # Calls econf with some default values.
480 # Contains a phase_hook, run before econf.
481 # phase_hook prefix trigger: ${TARBALL}-tarball
482 # Is exported.
483 gtk-sharp-module_src_configure() {
484 phase_hook ${TARBALL}-tarball
485 econf --disable-static \
486 --disable-dependency-tracking \
487 --disable-maintainer-mode \
488 $(use debug &&echo "--enable-debug" ) \
489 ${@} || die "econf failed"
490 }
491
492 # @FUNCTION: gtk-sharp-module_src_compile
493 # @DESCRIPTION:
494 # Calls emake in the subdir of the module.
495 # Sets CSC=/usr/bin/gmcs. Deletes top_srcdir Makefiles to prevent recursing in
496 # case we missed some dll references.
497 # Is exported.
498 gtk-sharp-module_src_compile() {
499 rm -f "${S}"/Makefile* &> /dev/null
500 cd "${S}/${GTK_SHARP_MODULE_DIR}"
501 emake CSC=/usr/bin/gmcs || die "emake failed"
502 }
503
504 # @FUNCTION: gtk-sharp-module_src_install
505 # @DESCRIPTION:
506 # Installs the module. Fixes up lib paths so they're multilib-safe.
507 # Gets rid of .la files.
508 # Is exported.
509 gtk-sharp-module_src_install() {
510 cd "${S}/${GTK_SHARP_MODULE_DIR}"
511 emake DESTDIR="${D}" install || die "emake install failed"
512 mono_multilib_comply
513 find "${D}" -type f -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
514 [[ $(find "${D}" -type f|wc -l) -lt 3 ]] && die "Too few files. This smells like a failed install."
515 }
516
517 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20