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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.19 Revision 1.33
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 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.19 2009/03/09 01:02:13 loki_val Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gtk-sharp-module.eclass,v 1.33 2011/11/10 19:09:17 pacho Exp $
4 4
5# @ECLASS: gtk-sharp-module.eclass 5# @ECLASS: gtk-sharp-module.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# dotnet@gentoo.org 7# dotnet@gentoo.org
8# @BLURB: Manages the modules of the gtk-, gnome-, and gnome-desktop-sharp tarballs 8# @BLURB: Manages the modules of the gtk-, gnome-, and gnome-desktop-sharp tarballs
12# PLEASE TAKE NOTE: ONLY FOR EAPI-2 EBUILDS 12# PLEASE TAKE NOTE: ONLY FOR EAPI-2 EBUILDS
13 13
14WANT_AUTOMAKE=none 14WANT_AUTOMAKE=none
15WANT_AUTOCONF=none 15WANT_AUTOCONF=none
16 16
17inherit eutils mono multilib autotools base versionator 17inherit eutils mono multilib libtool autotools base versionator
18
19case ${EAPI:-0} in
20 2|3|4) ;;
21 *) die "Unknown EAPI." ;;
22esac
18 23
19# @ECLASS-VARIABLE: GTK_SHARP_MODULE 24# @ECLASS-VARIABLE: GTK_SHARP_MODULE
20# @DESCRIPTION: 25# @DESCRIPTION:
21# The name of the Gtk# module. 26# The name of the Gtk# module.
22# Default value: ${PN/-sharp/} 27# Default value: ${PN/-sharp/}
43# @ECLASS-VARIABLE: PV_MAJOR 48# @ECLASS-VARIABLE: PV_MAJOR
44# @DESCRIPTION: 49# @DESCRIPTION:
45# The first two components of the PV variable. 50# The first two components of the PV variable.
46PV_MAJOR=$(get_version_component_range 1-2) 51PV_MAJOR=$(get_version_component_range 1-2)
47 52
48# @FUNCTION: add_bdepends 53# @FUNCTION: add_bdepend
49# @USAGE: <package atom> 54# @USAGE: <package atom>
50# @DESCRIPTION: 55# @DESCRIPTION:
51# Adds to the DEPEND variable 56# Adds to the DEPEND variable
52add_bdepend() { 57add_bdepend() {
53 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument" 58 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument"
54 DEPEND="${DEPEND} $@" 59 DEPEND="${DEPEND} $@"
55} 60}
56 61
57# @FUNCTION: add_rdepends 62# @FUNCTION: add_rdepend
58# @USAGE: <package atom> 63# @USAGE: <package atom>
59# @DESCRIPTION: 64# @DESCRIPTION:
60# Adds to the RDEPEND variable 65# Adds to the RDEPEND variable
61add_rdepend() { 66add_rdepend() {
62 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument" 67 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument"
101 has "${GTK_SHARP_MODULE}" "${gapi_users_list}" && \ 106 has "${GTK_SHARP_MODULE}" "${gapi_users_list}" && \
102 add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*" 107 add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*"
103 case ${PVR} in 108 case ${PVR} in
104 2.24.1*) 109 2.24.1*)
105 SRC_URI="mirror://gentoo/${TARBALL}-2.24.1.patch.bz2" 110 SRC_URI="mirror://gentoo/${TARBALL}-2.24.1.patch.bz2"
111 # Upstream bug: https://bugzilla.novell.com/show_bug.cgi?id=483251
106 PATCHES=( 112 PATCHES=(
107 "${WORKDIR}/${TARBALL}-2.24.1.patch" 113 "${WORKDIR}/${TARBALL}-2.24.1.patch"
108 ) 114 )
109 EAUTORECONF="YES" 115 EAUTORECONF="YES"
110 add_bdepend "=sys-devel/automake-1.10*" 116 add_bdepend "=sys-devel/automake-1.10*"
111 add_bdepend ">=sys-devel/autoconf-2.61" 117 add_bdepend ">=sys-devel/autoconf-2.61"
112 ;; 118 ;;
119 2.24.2*)
120 add_depend ">=dev-lang/mono-2.7"
121 ;;
113 esac 122 esac
114 ;; 123 ;;
115 gnome-desktop|gnome-print|gnome-panel|gtkhtml|gtksourceview|nautilusburn|rsvg|vte|wnck) 124 gnome-desktop|gnome-print|gnome-panel|gtkhtml|gtksourceview|nautilusburn|rsvg|vte|wnck)
116 TARBALL="gnome-desktop-sharp" 125 TARBALL="gnome-desktop-sharp"
117 add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*" 126 add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
118 add_depend "=dev-dotnet/gnome-sharp-${PV_MAJOR}*" 127 add_depend "=dev-dotnet/gnome-sharp-2.24*"
128 add_depend "gnome-base/gnome-desktop:2"
119 add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*" 129 add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*"
120 ;; 130 ;;
121 *) 131 *)
122 eerror "Huh? Sonny boy, looks like your GTK_SHARP_MODULE is not on the approved list. BAILING!" 132 eerror "Huh? Sonny boy, looks like your GTK_SHARP_MODULE is not on the approved list. BAILING!"
123 die "How did we get here!!?" 133 die "How did we get here!!?"
176 add_depend "~dev-dotnet/glib-sharp-${PV}" 186 add_depend "~dev-dotnet/glib-sharp-${PV}"
177 add_depend "~dev-dotnet/atk-sharp-${PV}" 187 add_depend "~dev-dotnet/atk-sharp-${PV}"
178 add_depend "~dev-dotnet/gdk-sharp-${PV}" 188 add_depend "~dev-dotnet/gdk-sharp-${PV}"
179 add_depend "~dev-dotnet/gtk-sharp-${PV}" 189 add_depend "~dev-dotnet/gtk-sharp-${PV}"
180 add_depend "~dev-dotnet/pango-sharp-${PV}" 190 add_depend "~dev-dotnet/pango-sharp-${PV}"
181 add_depend ">=gnome-base/libglade-2.3.6" 191 add_depend ">=gnome-base/libglade-2.3.6:2.0"
182 ;; 192 ;;
183 #gnome-sharp tarball 193 #gnome-sharp tarball
184 art-sharp-*) 194 art-sharp-*)
185 add_depend ">=media-libs/libart_lgpl-2.3.20" 195 add_depend ">=media-libs/libart_lgpl-2.3.20"
186 ;; 196 ;;
187 gnome-sharp-*) 197 gnome-sharp-*)
188 add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}" 198 add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}"
189 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}"
190 add_depend "~dev-dotnet/gnomevfs-sharp-${PV}" 199 add_depend "~dev-dotnet/gnomevfs-sharp-${PV}"
191 add_depend "~dev-dotnet/art-sharp-${PV}" 200 add_depend "~dev-dotnet/art-sharp-${PV}"
192 add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}" 201 add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}"
202 add_depend ">=x11-libs/gtk+-2.14.0:2"
193 ;; 203 ;;
194 gconf-sharp-*) 204 gconf-sharp-*)
195 add_depend ">=gnome-base/gconf-${PV_MAJOR}" 205 add_depend ">=gnome-base/gconf-${PV_MAJOR}:2"
196 add_depend ">=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}" 206 add_depend "=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
197 add_depend "~dev-dotnet/gnome-sharp-${PV}" 207 add_depend "~dev-dotnet/gnome-sharp-${PV}"
198 add_depend "~dev-dotnet/art-sharp-${PV}" 208 add_depend "~dev-dotnet/art-sharp-${PV}"
199 ;; 209 ;;
200 gnomevfs-sharp-*) 210 gnomevfs-sharp-*)
201 add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}" 211 add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}:2"
202 ;; 212 ;;
203 #gnome-desktop-sharp tarball 213 #gnome-desktop-sharp tarball
204 gnome-desktop-sharp-*) 214 gnome-desktop-sharp-*)
205 # NOTE: This is REQUIRED to be locked to PV_MAJOR 215 # NOTE: libgnome-desktop-2.so has been known to make binary-
206 # libgnome-desktop-2.so.INTEGER is hardcoded in gnomedesktop-sharp.dll.config 216 # incompatible changes, requiring .so bumps. gnome-desktop-sharp
217 # is locked to a specific .so.n version, so strict dependencies
218 # may be required in the future (as it has in the past).
207 add_depend "=gnome-base/gnome-desktop-${PV_MAJOR}*" 219 add_depend ">=gnome-base/gnome-desktop-${PV_MAJOR}:2"
208 ;; 220 ;;
209 gnome-panel-sharp-*) 221 gnome-panel-sharp-*)
210 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}" 222 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}"
211 ;; 223 ;;
212 gnome-print-sharp-*) 224 gnome-print-sharp-*)
213 add_depend ">=gnome-base/libgnomeprint-${API_VERSION}" 225 add_depend "gnome-base/libgnomeprint:2.2"
226 add_depend "gnome-base/libgnomeprintui:2.2"
214 ;; 227 ;;
215 gtkhtml-sharp-*) 228 gtkhtml-sharp-*)
216 #NOTE: gtkhtml dependency must follow gtkhtml-sharp version. 229 #NOTE: gtkhtml dependency must follow gtkhtml-sharp version.
217 #i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24 230 #i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24
218 # gtkhtml-sharp-2.16.0 >=gtkhtml-3.16 231 # gtkhtml-sharp-2.16.0 >=gtkhtml-3.16
219 # See bug 249540 for unpleasant side effects. 232 # See bug 249540 for unpleasant side effects.
220 add_depend ">=gnome-extra/gtkhtml-$(($(get_version_component_range 1) + 1 )).$(get_version_component_range 2)" 233 add_depend ">=gnome-extra/gtkhtml-$(($(get_version_component_range 1) + 1 )).$(get_version_component_range 2):3.14"
221 ;; 234 ;;
222 gtksourceview-sharp-*) 235 gtksourceview-sharp-*)
223 add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0" 236 add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0"
224 ;; 237 ;;
225 nautilusburn-sharp-*) 238 nautilusburn-sharp-*)
226 add_depend ">=gnome-extra/nautilus-cd-burner-${PV_MAJOR}" 239 add_depend ">=gnome-extra/nautilus-cd-burner-2.24.0"
227 ;; 240 ;;
228 rsvg-sharp-*) 241 rsvg-sharp-*)
229 add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}" 242 add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}:2"
230 ;; 243 ;;
231 vte-sharp-*) 244 vte-sharp-*)
232 add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}" 245 add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}:0"
233 ;; 246 ;;
234 wnck-sharp-*) 247 wnck-sharp-*)
235 add_depend ">=x11-libs/libwnck-${PV_MAJOR}" 248 add_depend ">=x11-libs/libwnck-${PV_MAJOR}:1"
236 ;; 249 ;;
237esac 250esac
238 251
239# @ECLASS-VARIABLE: DESCRIPTION 252# @ECLASS-VARIABLE: DESCRIPTION
240# @DESCRIPTION: 253# @DESCRIPTION:
311 echo "${rvalue[@]}" 324 echo "${rvalue[@]}"
312} 325}
313 326
314# @FUNCTION: phase_hook 327# @FUNCTION: phase_hook
315# @USAGE: <prefix> 328# @USAGE: <prefix>
329# @DESCRIPTION:
316# Looks for functions named <prefix>_caller_suffix and executes them. 330# Looks for functions named <prefix>_caller_suffix and executes them.
317# _caller_suffix is the calling function with the prefix 331# _caller_suffix is the calling function with the prefix
318# gtk-sharp-module removed. 332# gtk-sharp-module removed.
319phase_hook() { 333phase_hook() {
320 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs one argument" 334 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs one argument"
403# @DESCRIPTION: 417# @DESCRIPTION:
404# Runs a M-m-m-monster sed on GTK_SHARP_MODULE_DIR to convert references to 418# Runs a M-m-m-monster sed on GTK_SHARP_MODULE_DIR to convert references to
405# local assemblies to the installed ones. Is only called by src_prepare when 419# local assemblies to the installed ones. Is only called by src_prepare when
406# $GTK_SHARP_MODULE is a member of $gtk_sharp_module_list. 420# $GTK_SHARP_MODULE is a member of $gtk_sharp_module_list.
407gtk-sharp-tarball-post_src_prepare() { 421gtk-sharp-tarball-post_src_prepare() {
422 has "${EAPI:-0}" 2 && ! use prefix && EPREFIX=
408 cd "${S}/${GTK_SHARP_MODULE_DIR}" 423 cd "${S}/${GTK_SHARP_MODULE_DIR}"
409 sed -i \ 424 sed -i \
410 -e "s; \$(srcdir)/../glib/glib-api.xml; $(get_sharp_apis --bare glib-sharp-2.0);" \ 425 -e "s; \$(srcdir)/../glib/glib-api.xml; $(get_sharp_apis --bare glib-sharp-2.0);" \
411 -e "s; ../pango/pango-api.xml; $(get_sharp_apis --bare pango-sharp-2.0);" \ 426 -e "s; ../pango/pango-api.xml; $(get_sharp_apis --bare pango-sharp-2.0);" \
412 -e "s; ../atk/atk-api.xml; $(get_sharp_apis --bare atk-sharp-2.0);" \ 427 -e "s; ../atk/atk-api.xml; $(get_sharp_apis --bare atk-sharp-2.0);" \
415 -e "s; \.\./glib/glib-sharp.dll; $(get_sharp_assemblies --bare glib-sharp-2.0);g" \ 430 -e "s; \.\./glib/glib-sharp.dll; $(get_sharp_assemblies --bare glib-sharp-2.0);g" \
416 -e "s; \.\./pango/pango-sharp.dll; $(get_sharp_assemblies --bare pango-sharp-2.0);g" \ 431 -e "s; \.\./pango/pango-sharp.dll; $(get_sharp_assemblies --bare pango-sharp-2.0);g" \
417 -e "s; \.\./atk/atk-sharp.dll; $(get_sharp_assemblies --bare atk-sharp-2.0);g" \ 432 -e "s; \.\./atk/atk-sharp.dll; $(get_sharp_assemblies --bare atk-sharp-2.0);g" \
418 -e "s; \.\./gdk/gdk-sharp.dll; $(get_sharp_assemblies --bare gdk-sharp-2.0);g" \ 433 -e "s; \.\./gdk/gdk-sharp.dll; $(get_sharp_assemblies --bare gdk-sharp-2.0);g" \
419 -e "s; \.\./gtk/gtk-sharp.dll; $(get_sharp_assemblies --bare gtk-sharp-2.0);g" \ 434 -e "s; \.\./gtk/gtk-sharp.dll; $(get_sharp_assemblies --bare gtk-sharp-2.0);g" \
420 -e "s;\$(RUNTIME) \$(top_builddir)/parser/gapi-fixup.exe;/usr/bin/gapi2-fixup;" \ 435 -e "s;\$(RUNTIME) \$(top_builddir)/parser/gapi-fixup.exe;${EPREFIX}/usr/bin/gapi2-fixup;" \
421 -e "s;\$(RUNTIME) \$(top_builddir)/generator/gapi_codegen.exe;/usr/bin/gapi2-codegen;" \ 436 -e "s;\$(RUNTIME) \$(top_builddir)/generator/gapi_codegen.exe;${EPREFIX}/usr/bin/gapi2-codegen;" \
422 -e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \ 437 -e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \
423 -e "s:\$(INCLUDE_API) \$(top_builddir)/generator/gapi_codegen.exe:\$(INCLUDE_API):" \ 438 -e "s:\$(INCLUDE_API) \$(top_builddir)/generator/gapi_codegen.exe:\$(INCLUDE_API):" \
424 $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles" 439 $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles"
425} 440}
426 441
447# value. 462# value.
448# Contains a phase_hook, runs very last. 463# Contains a phase_hook, runs very last.
449# phase_hook prefix trigger: ${TARBALL}-tarball-post 464# phase_hook prefix trigger: ${TARBALL}-tarball-post
450# Is exported. 465# Is exported.
451gtk-sharp-module_src_prepare() { 466gtk-sharp-module_src_prepare() {
452 base_src_util autopatch 467 base_src_prepare
453# @ECLASS-VARIABLE: EAUTORECONF 468# @ECLASS-VARIABLE: EAUTORECONF
454# @DESCRIPTION: 469# @DESCRIPTION:
455# If set, EAUTORECONF will be run during src_prepare. 470# If set, EAUTORECONF will be run during src_prepare.
456 [[ ${EAUTORECONF} ]] && eautoreconf 471 [[ ${EAUTORECONF} ]] && eautoreconf
457 phase_hook ${TARBALL}-tarball-post 472 phase_hook ${TARBALL}-tarball-post
473 elibtoolize
458} 474}
459 475
460# @FUNCTION: gtk-sharp-tarball_src_configure 476# @FUNCTION: gtk-sharp-tarball_src_configure
461# @DESCRIPTION: 477# @DESCRIPTION:
462# Sets some environment variables that will allow us to make the dependencies 478# Sets some environment variables that will allow us to make the dependencies
477# Sets some environment variables that will allow us to make the dependencies 493# Sets some environment variables that will allow us to make the dependencies
478# for each ebuild be only its own dependencies. Without patching configure. 494# 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 495# Is only called by gtk-sharp-module_src_configure when $GTK_SHARP_MODULE
480# is a member of $gnome_sharp_module_list. 496# is a member of $gnome_sharp_module_list.
481gnome-sharp-tarball_src_configure() { 497gnome-sharp-tarball_src_configure() {
498 has "${EAPI:-0}" 2 && ! use prefix && EPREFIX=
482 pkg_check_modules_override GLADESHARP glade-sharp-2.0 499 pkg_check_modules_override GLADESHARP glade-sharp-2.0
483 pkg_check_modules_override GAPI gapi-2.0 500 pkg_check_modules_override GAPI gapi-2.0
484 ac_path_prog_override GAPI_PARSER /usr/bin/gapi2-parser 501 ac_path_prog_override GAPI_PARSER "${EPREFIX}"/usr/bin/gapi2-parser
485 ac_path_prog_override GAPI_CODEGEN /usr/bin/gapi2-codegen 502 ac_path_prog_override GAPI_CODEGEN "${EPREFIX}"/usr/bin/gapi2-codegen
486 ac_path_prog_override GAPI_FIXUP /usr/bin/gapi2-fixup 503 ac_path_prog_override GAPI_FIXUP "${EPREFIX}"/usr/bin/gapi2-fixup
487} 504}
488 505
489# @FUNCTION: gtk-sharp-module_src_configure 506# @FUNCTION: gtk-sharp-module_src_configure
490# @USAGE: [econf-arguments] 507# @USAGE: [econf-arguments]
491# @DESCRIPTION: 508# @DESCRIPTION:

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.33

  ViewVC Help
Powered by ViewVC 1.1.20