/[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.32 - (hide annotations) (download)
Mon Aug 22 04:46:32 2011 UTC (3 years, 4 months ago) by vapier
Branch: MAIN
Changes since 1.31: +3 -2 lines
fix random bugs in eclass documentation, and convert to new @AUTHOR tag

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

  ViewVC Help
Powered by ViewVC 1.1.20