/[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.14 - (hide annotations) (download)
Thu Jan 29 22:48:20 2009 UTC (5 years, 7 months ago) by loki_val
Branch: MAIN
Changes since 1.13: +368 -236 lines
New and spiffy version of the old eclass.

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

  ViewVC Help
Powered by ViewVC 1.1.20