/[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.30 - (show annotations) (download)
Fri May 6 04:24:31 2011 UTC (3 years, 3 months ago) by loki_val
Branch: MAIN
Changes since 1.29: +3 -2 lines
Missing depend gnome-base/libgnomeprintui added. Almost-silent build failure would result if this were not present, only caught by presence of too few files.

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.29 2011/03/21 21:52:51 nirbheek 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 libtool 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_bdepend
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_rdepend
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/${TARBALL}-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 case ${PVR} in
104 2.24.1*)
105 SRC_URI="mirror://gentoo/${TARBALL}-2.24.1.patch.bz2"
106 # Upstream bug: https://bugzilla.novell.com/show_bug.cgi?id=483251
107 PATCHES=(
108 "${WORKDIR}/${TARBALL}-2.24.1.patch"
109 )
110 EAUTORECONF="YES"
111 add_bdepend "=sys-devel/automake-1.10*"
112 add_bdepend ">=sys-devel/autoconf-2.61"
113 ;;
114 2.24.2*)
115 add_depend ">=dev-lang/mono-2.7"
116 ;;
117 esac
118 ;;
119 gnome-desktop|gnome-print|gnome-panel|gtkhtml|gtksourceview|nautilusburn|rsvg|vte|wnck)
120 TARBALL="gnome-desktop-sharp"
121 add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
122 add_depend "=dev-dotnet/gnome-sharp-2.24*"
123 add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*"
124 ;;
125 *)
126 eerror "Huh? Sonny boy, looks like your GTK_SHARP_MODULE is not on the approved list. BAILING!"
127 die "How did we get here!!?"
128 ;;
129 esac
130
131 case ${PF} in
132 #gtk-sharp tarball
133 gtk-sharp-docs*)
134 add_depend ">=virtual/monodoc-2.0"
135 ;;
136 gtk-sharp-gapi*)
137 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
138 add_depend "dev-perl/XML-LibXML"
139 ;;
140 gtk-sharp-*)
141 add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
142 add_depend "~dev-dotnet/glib-sharp-${PV}"
143 add_depend "~dev-dotnet/atk-sharp-${PV}"
144 add_depend "~dev-dotnet/gdk-sharp-${PV}"
145 add_depend "~dev-dotnet/pango-sharp-${PV}"
146 ;;
147 gdk-sharp-*)
148 add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
149 add_depend "~dev-dotnet/glib-sharp-${PV}"
150 add_depend "x11-libs/gtk+:2"
151 add_depend "~dev-dotnet/pango-sharp-${PV}"
152 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
153 ;;
154 atk-sharp-*)
155 add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
156 add_depend "~dev-dotnet/glib-sharp-${PV}"
157 add_depend "dev-libs/atk"
158 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
159 ;;
160 glib-sharp-*)
161 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
162 add_depend "dev-libs/glib:2"
163 ;;
164 pango-sharp-*)
165 add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
166 add_depend "~dev-dotnet/glib-sharp-${PV}"
167 add_depend "x11-libs/pango"
168 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
169 ;;
170 gtk-dotnet-*)
171 add_depend "~dev-dotnet/glib-sharp-${PV}"
172 add_depend "~dev-dotnet/gdk-sharp-${PV}"
173 add_depend "~dev-dotnet/pango-sharp-${PV}"
174 add_depend "~dev-dotnet/gtk-sharp-${PV}"
175 add_depend "dev-lang/mono[-minimal]"
176 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
177 ;;
178 glade-sharp-*)
179 add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
180 add_depend "~dev-dotnet/glib-sharp-${PV}"
181 add_depend "~dev-dotnet/atk-sharp-${PV}"
182 add_depend "~dev-dotnet/gdk-sharp-${PV}"
183 add_depend "~dev-dotnet/gtk-sharp-${PV}"
184 add_depend "~dev-dotnet/pango-sharp-${PV}"
185 add_depend ">=gnome-base/libglade-2.3.6:2.0"
186 ;;
187 #gnome-sharp tarball
188 art-sharp-*)
189 add_depend ">=media-libs/libart_lgpl-2.3.20"
190 ;;
191 gnome-sharp-*)
192 add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}"
193 add_depend "~dev-dotnet/gnomevfs-sharp-${PV}"
194 add_depend "~dev-dotnet/art-sharp-${PV}"
195 add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}"
196 add_depend ">=x11-libs/gtk+-2.14.0:2"
197 ;;
198 gconf-sharp-*)
199 add_depend ">=gnome-base/gconf-${PV_MAJOR}:2"
200 add_depend "=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
201 add_depend "~dev-dotnet/gnome-sharp-${PV}"
202 add_depend "~dev-dotnet/art-sharp-${PV}"
203 ;;
204 gnomevfs-sharp-*)
205 add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}:2"
206 ;;
207 #gnome-desktop-sharp tarball
208 gnome-desktop-sharp-*)
209 # NOTE: libgnome-desktop-2.so has been known to make binary-
210 # incompatible changes, requiring .so bumps. gnome-desktop-sharp
211 # is locked to a specific .so.n version, so strict dependencies
212 # may be required in the future (as it has in the past).
213 add_depend ">=gnome-base/gnome-desktop-${PV_MAJOR}:2"
214 ;;
215 gnome-panel-sharp-*)
216 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}"
217 ;;
218 gnome-print-sharp-*)
219 add_depend "gnome-base/libgnomeprint:2.2"
220 add_depend "gnome-base/libgnomeprintui:2.2"
221 ;;
222 gtkhtml-sharp-*)
223 #NOTE: gtkhtml dependency must follow gtkhtml-sharp version.
224 #i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24
225 # gtkhtml-sharp-2.16.0 >=gtkhtml-3.16
226 # See bug 249540 for unpleasant side effects.
227 add_depend ">=gnome-extra/gtkhtml-$(($(get_version_component_range 1) + 1 )).$(get_version_component_range 2):3.14"
228 ;;
229 gtksourceview-sharp-*)
230 add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0"
231 ;;
232 nautilusburn-sharp-*)
233 add_depend ">=gnome-extra/nautilus-cd-burner-2.24.0"
234 ;;
235 rsvg-sharp-*)
236 add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}:2"
237 ;;
238 vte-sharp-*)
239 add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}:0"
240 ;;
241 wnck-sharp-*)
242 add_depend ">=x11-libs/libwnck-${PV_MAJOR}:1"
243 ;;
244 esac
245
246 # @ECLASS-VARIABLE: DESCRIPTION
247 # @DESCRIPTION:
248 # Default value: GtkSharp's ${GTK_SHARP_MODULE} module of the ${TARBALL} tarball
249 DESCRIPTION="GtkSharp's ${GTK_SHARP_MODULE} module of the ${TARBALL} tarball"
250 # @ECLASS-VARIABLE: HOMEPAGE
251 # @DESCRIPTION:
252 # Default value: http://www.mono-project.com/GtkSharp
253 HOMEPAGE="http://www.mono-project.com/GtkSharp"
254 # @ECLASS-VARIABLE: DESCRIPTION
255 # @DESCRIPTION:
256 # Default value: LGPL-2.1
257 LICENSE="LGPL-2.1"
258
259 add_depend ">=dev-lang/mono-2.0.1"
260 add_bdepend ">=sys-apps/sed-4"
261 add_bdepend ">=dev-util/pkgconfig-0.23"
262 add_bdepend ">=app-shells/bash-3.1"
263
264 IUSE="debug"
265 # @ECLASS-VARIABLE: S
266 # @DESCRIPTION:
267 # Default value: ${WORKDIR}/${TARBALL}-${PV}
268 S="${WORKDIR}/${TARBALL}-${PV}"
269 # @ECLASS-VARIABLE: SRC_URI
270 # @DESCRIPTION:
271 # Default value: mirror://gnome/sources/${TARBALL}/${PV_MAJOR}/${TARBALL}-${PV}.tar.bz2
272 SRC_URI="${SRC_URI}
273 mirror://gnome/sources/${TARBALL}/${PV_MAJOR}/${TARBALL}-${PV}.tar.bz2"
274
275 # @FUNCTION: get_sharp_apis
276 # @USAGE: <type> <pkgconfig-package>
277 # @RETURN: .NET API files
278 # @DESCRIPTION:
279 # Given a valid pkg-config package, will return a list of API xml files.
280 # <type> can be either --prefixed or --bare. If prefixed, each API file
281 # will be prefixed with -I:
282 get_sharp_apis() {
283 [[ ${#@} -eq 2 ]] || die "${FUNCNAME} needs two arguments"
284 get_sharp_assemblies "$@"
285 }
286
287 # @FUNCTION: get_sharp_assemblies
288 # @USAGE: <type> <pkgconfig-package>
289 # @RETURN: .NET .dll assemblies
290 # @DESCRIPTION:
291 # Given a valid pkg-config package, will return a list of .dll assemblies.
292 # <type> can be either --prefixed or --bare. If prefixed, each .dll file
293 # will be prefixed with -r:
294 get_sharp_assemblies() {
295 [[ ${#@} -eq 2 ]] || die "${FUNCNAME} needs two arguments"
296 local string config=libs prefix="-r:"
297 local -a rvalue
298 [[ "${FUNCNAME[1]}" = "get_sharp_apis" ]] && config=cflags && prefix="-I:"
299 for string in $(pkg-config --${config} ${2} 2> /dev/null)
300 do
301 rvalue+=( ${string#-?:} )
302 done
303
304 case $1 in
305 --bare)
306 :
307 ;;
308 --prefixed)
309 for (( i=0 ; i< ${#rvalue[@]} ; i++ ))
310 do
311 rvalue[$i]=${prefix}${rvalue[$i]}
312 done
313 ;;
314 *)
315 die "${FUNCNAME}: Unknown parameter"
316 ;;
317 esac
318 echo "${rvalue[@]}"
319 }
320
321 # @FUNCTION: phase_hook
322 # @USAGE: <prefix>
323 # Looks for functions named <prefix>_caller_suffix and executes them.
324 # _caller_suffix is the calling function with the prefix
325 # gtk-sharp-module removed.
326 phase_hook() {
327 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs one argument"
328 if [[ "$(type -t ${1}${FUNCNAME[1]#gtk-sharp-module})" = "function" ]]
329 then
330 ebegin "Phase-hook: Running ${1}${FUNCNAME[1]#gtk-sharp-module}"
331 ${1}${FUNCNAME[1]#gtk-sharp-module}
332 eend 0
333 fi
334 }
335
336 # @FUNCTION: ac_path_prog_override
337 # @USAGE: <PROG> [path]
338 # @DESCRIPTION:
339 # Override AC_PATH_PROG() autoconf macros. Path will be set to " " if
340 # not specified.
341 ac_path_prog_override() {
342 if [[ ${#@} -lt 1 || ${#@} -gt 2 ]]
343 then
344 eerror "${FUNCNAME[0]} requires at least one parameter and takes at most two:"
345 eerror "AC_PATH_PROG(PARAM1, param2)"
346 die "${FUNCNAME[0]} requires at least one parameter and takes at most two:"
347 fi
348 export ac_cv_path_${1}="${2:- }"
349 }
350
351
352 # @FUNCTION: pkg_check_modules_override
353 # @USAGE: <GROUP> [package1] [package2]
354 # @DESCRIPTION:
355 # Will export the appropriate variables to override PKG_CHECK_MODULES autoconf
356 # macros, with the string " " by default. If packages are specified, they will
357 # be looked up with pkg-config and the appropriate LIBS and CFLAGS substituted.
358 # LIBS and CFLAGS can also be specified per-package with the following syntax:
359 # @CODE
360 # package=LIBS%CFLAGS
361 # @CODE
362 # = and % have no effect unless both are specified.
363 # Here is an example:
364 # @CODE
365 # pkg_check_modules_override GASH "gtk+-2.0=-jule%" gobject-2.0
366 # @CODE
367 # The above example will do:
368 # export GASH_CFLAGS+=" -jule"
369 # export GASH_LIBS+=" "
370 # export GASH_CFLAGS+=" $(pkg-config --cflags gobject-2.0)"
371 # export GASH_LIBS+=" $(pkg-config --libs gobject-2.0)"
372 #
373 # NOTE: If a package is not found, the string " " will be inserted in place of
374 # <GROUP>_CFLAGS and <GROUP>_LIBS
375 pkg_check_modules_override() {
376 local package
377 local group="${1}"
378 local packages="${*:2}"
379 export ${group}_CFLAGS=" "
380 export ${group}_LIBS=" "
381
382 if [[ ${#@} -lt 1 ]]
383 then
384 eerror "${FUNCNAME[0]} requires at least one parameter: GROUP"
385 eerror "PKG_CHECK_MODULES(GROUP, package1 package2 etc)"
386 die "${FUNCNAME[0]} requires at least one parameter: GROUP"
387 fi
388
389 for package in $packages
390 do
391 if [[ ${package/=} != ${package} && ${package/\%} != ${package} ]]
392 then
393 package_cflag_libs=${package##*=}
394 export ${group}_CFLAGS+=" ${package_cflag_libs%%\%*}"
395 export ${group}_LIBS+=" ${package_cflag_libs##*\%}"
396 else
397 if pkg-config --exists $package
398 then
399 export ${group}_CFLAGS+=" $(pkg-config --cflags $package)"
400 export ${group}_LIBS+=" $(pkg-config --libs $package)"
401 else
402 export ${group}_CFLAGS+=" "
403 export ${group}_LIBS+=" "
404 fi
405 fi
406 done
407 }
408
409 # @FUNCTION: gtk-sharp-tarball-post_src_prepare
410 # @DESCRIPTION:
411 # Runs a M-m-m-monster sed on GTK_SHARP_MODULE_DIR to convert references to
412 # local assemblies to the installed ones. Is only called by src_prepare when
413 # $GTK_SHARP_MODULE is a member of $gtk_sharp_module_list.
414 gtk-sharp-tarball-post_src_prepare() {
415 cd "${S}/${GTK_SHARP_MODULE_DIR}"
416 sed -i \
417 -e "s; \$(srcdir)/../glib/glib-api.xml; $(get_sharp_apis --bare glib-sharp-2.0);" \
418 -e "s; ../pango/pango-api.xml; $(get_sharp_apis --bare pango-sharp-2.0);" \
419 -e "s; ../atk/atk-api.xml; $(get_sharp_apis --bare atk-sharp-2.0);" \
420 -e "s; ../gdk/gdk-api.xml; $(get_sharp_apis --bare gdk-sharp-2.0);" \
421 -e "s; ../gtk/gtk-api.xml; $(get_sharp_apis --bare gtk-sharp-2.0);" \
422 -e "s; \.\./glib/glib-sharp.dll; $(get_sharp_assemblies --bare glib-sharp-2.0);g" \
423 -e "s; \.\./pango/pango-sharp.dll; $(get_sharp_assemblies --bare pango-sharp-2.0);g" \
424 -e "s; \.\./atk/atk-sharp.dll; $(get_sharp_assemblies --bare atk-sharp-2.0);g" \
425 -e "s; \.\./gdk/gdk-sharp.dll; $(get_sharp_assemblies --bare gdk-sharp-2.0);g" \
426 -e "s; \.\./gtk/gtk-sharp.dll; $(get_sharp_assemblies --bare gtk-sharp-2.0);g" \
427 -e "s;\$(RUNTIME) \$(top_builddir)/parser/gapi-fixup.exe;/usr/bin/gapi2-fixup;" \
428 -e "s;\$(RUNTIME) \$(top_builddir)/generator/gapi_codegen.exe;/usr/bin/gapi2-codegen;" \
429 -e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \
430 -e "s:\$(INCLUDE_API) \$(top_builddir)/generator/gapi_codegen.exe:\$(INCLUDE_API):" \
431 $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles"
432 }
433
434 # @FUNCTION: gnome-sharp-tarball-post_src_prepare
435 # @DESCRIPTION:
436 # Runs a M-m-m-monster sed on GTK_SHARP_MODULE_DIR to convert references to
437 # local assemblies to the installed ones. Is only called by src_prepare when
438 # $GTK_SHARP_MODULE is a member of $gnome_sharp_module_list.
439 gnome-sharp-tarball-post_src_prepare() {
440 cd "${S}/${GTK_SHARP_MODULE_DIR}"
441 sed -i \
442 -e "s; ../gnomevfs/gnome-vfs-api.xml; $(get_sharp_apis --bare gnome-vfs-sharp-2.0);" \
443 -e "s; ../art/art-api.xml; $(get_sharp_apis --bare art-sharp-2.0);" \
444 -e "s; \.\./art/art-sharp.dll; $(get_sharp_assemblies --bare art-sharp-2.0);g" \
445 -e "s; \.\./gnomevfs/gnome-vfs-sharp.dll; $(get_sharp_assemblies --bare gnome-vfs-sharp-2.0);g" \
446 -e "s;/r:\$(top_builddir)/art/art-sharp.dll;$(get_sharp_assemblies --prefixed art-sharp-2.0);" \
447 -e "s;/r:\$(top_builddir)/gnome/gnome-sharp.dll;$(get_sharp_assemblies --prefixed gnome-sharp-2.0);" \
448 $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles"
449 }
450
451 # @FUNCTION: gtk-sharp-module_src_prepare
452 # @DESCRIPTION:
453 # Runs autopatch from base.eclass, eautoreconf if EAUTORECONF is set to any
454 # value.
455 # Contains a phase_hook, runs very last.
456 # phase_hook prefix trigger: ${TARBALL}-tarball-post
457 # Is exported.
458 gtk-sharp-module_src_prepare() {
459 base_src_prepare
460 # @ECLASS-VARIABLE: EAUTORECONF
461 # @DESCRIPTION:
462 # If set, EAUTORECONF will be run during src_prepare.
463 [[ ${EAUTORECONF} ]] && eautoreconf
464 phase_hook ${TARBALL}-tarball-post
465 elibtoolize
466 }
467
468 # @FUNCTION: gtk-sharp-tarball_src_configure
469 # @DESCRIPTION:
470 # Sets some environment variables that will allow us to make the dependencies
471 # for each ebuild be only its own dependencies, without patching configure.
472 # Is only called by gtk-sharp-module_src_configure when $GTK_SHARP_MODULE
473 # is a member of $gtk_sharp_module_list.
474 gtk-sharp-tarball_src_configure() {
475 pkg_check_modules_override GLIB gobject-2.0
476 pkg_check_modules_override GIO gio-2.0
477 pkg_check_modules_override PANGO pango
478 pkg_check_modules_override ATK atk
479 pkg_check_modules_override GTK gtk+-2.0
480 pkg_check_modules_override GLADE libglade-2.0
481 }
482
483 # @FUNCTION: gnome-sharp-tarball_src_configure
484 # @DESCRIPTION:
485 # Sets some environment variables that will allow us to make the dependencies
486 # for each ebuild be only its own dependencies. Without patching configure.
487 # Is only called by gtk-sharp-module_src_configure when $GTK_SHARP_MODULE
488 # is a member of $gnome_sharp_module_list.
489 gnome-sharp-tarball_src_configure() {
490 pkg_check_modules_override GLADESHARP glade-sharp-2.0
491 pkg_check_modules_override GAPI gapi-2.0
492 ac_path_prog_override GAPI_PARSER /usr/bin/gapi2-parser
493 ac_path_prog_override GAPI_CODEGEN /usr/bin/gapi2-codegen
494 ac_path_prog_override GAPI_FIXUP /usr/bin/gapi2-fixup
495 }
496
497 # @FUNCTION: gtk-sharp-module_src_configure
498 # @USAGE: [econf-arguments]
499 # @DESCRIPTION:
500 # Calls econf with some default values.
501 # Contains a phase_hook, run before econf.
502 # phase_hook prefix trigger: ${TARBALL}-tarball
503 # Is exported.
504 gtk-sharp-module_src_configure() {
505 phase_hook ${TARBALL}-tarball
506 econf --disable-static \
507 --disable-dependency-tracking \
508 --disable-maintainer-mode \
509 $(use debug &&echo "--enable-debug" ) \
510 ${@} || die "econf failed"
511 }
512
513 # @FUNCTION: gtk-sharp-module_src_compile
514 # @DESCRIPTION:
515 # Calls emake in the subdir of the module.
516 # Sets CSC=/usr/bin/gmcs. Deletes top_srcdir Makefiles to prevent recursing in
517 # case we missed some dll references.
518 # Is exported.
519 gtk-sharp-module_src_compile() {
520 rm -f "${S}"/Makefile* &> /dev/null
521 cd "${S}/${GTK_SHARP_MODULE_DIR}"
522 emake CSC=/usr/bin/gmcs || die "emake failed"
523 }
524
525 # @FUNCTION: gtk-sharp-module_src_install
526 # @DESCRIPTION:
527 # Installs the module. Fixes up lib paths so they're multilib-safe.
528 # Gets rid of .la files.
529 # Is exported.
530 gtk-sharp-module_src_install() {
531 cd "${S}/${GTK_SHARP_MODULE_DIR}"
532 emake DESTDIR="${D}" install || die "emake install failed"
533 mono_multilib_comply
534 find "${D}" -type f -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
535 [[ $(find "${D}" -type f|wc -l) -lt 3 ]] && die "Too few files. This smells like a failed install."
536 }
537
538 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20