/[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.32
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.32 2011/08/22 04:46:32 vapier 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*"
119 add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*" 128 add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*"
120 ;; 129 ;;
121 *) 130 *)
122 eerror "Huh? Sonny boy, looks like your GTK_SHARP_MODULE is not on the approved list. BAILING!" 131 eerror "Huh? Sonny boy, looks like your GTK_SHARP_MODULE is not on the approved list. BAILING!"
123 die "How did we get here!!?" 132 die "How did we get here!!?"
176 add_depend "~dev-dotnet/glib-sharp-${PV}" 185 add_depend "~dev-dotnet/glib-sharp-${PV}"
177 add_depend "~dev-dotnet/atk-sharp-${PV}" 186 add_depend "~dev-dotnet/atk-sharp-${PV}"
178 add_depend "~dev-dotnet/gdk-sharp-${PV}" 187 add_depend "~dev-dotnet/gdk-sharp-${PV}"
179 add_depend "~dev-dotnet/gtk-sharp-${PV}" 188 add_depend "~dev-dotnet/gtk-sharp-${PV}"
180 add_depend "~dev-dotnet/pango-sharp-${PV}" 189 add_depend "~dev-dotnet/pango-sharp-${PV}"
181 add_depend ">=gnome-base/libglade-2.3.6" 190 add_depend ">=gnome-base/libglade-2.3.6:2.0"
182 ;; 191 ;;
183 #gnome-sharp tarball 192 #gnome-sharp tarball
184 art-sharp-*) 193 art-sharp-*)
185 add_depend ">=media-libs/libart_lgpl-2.3.20" 194 add_depend ">=media-libs/libart_lgpl-2.3.20"
186 ;; 195 ;;
187 gnome-sharp-*) 196 gnome-sharp-*)
188 add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}" 197 add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}"
189 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}"
190 add_depend "~dev-dotnet/gnomevfs-sharp-${PV}" 198 add_depend "~dev-dotnet/gnomevfs-sharp-${PV}"
191 add_depend "~dev-dotnet/art-sharp-${PV}" 199 add_depend "~dev-dotnet/art-sharp-${PV}"
192 add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}" 200 add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}"
201 add_depend ">=x11-libs/gtk+-2.14.0:2"
193 ;; 202 ;;
194 gconf-sharp-*) 203 gconf-sharp-*)
195 add_depend ">=gnome-base/gconf-${PV_MAJOR}" 204 add_depend ">=gnome-base/gconf-${PV_MAJOR}:2"
196 add_depend ">=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}" 205 add_depend "=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
197 add_depend "~dev-dotnet/gnome-sharp-${PV}" 206 add_depend "~dev-dotnet/gnome-sharp-${PV}"
198 add_depend "~dev-dotnet/art-sharp-${PV}" 207 add_depend "~dev-dotnet/art-sharp-${PV}"
199 ;; 208 ;;
200 gnomevfs-sharp-*) 209 gnomevfs-sharp-*)
201 add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}" 210 add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}:2"
202 ;; 211 ;;
203 #gnome-desktop-sharp tarball 212 #gnome-desktop-sharp tarball
204 gnome-desktop-sharp-*) 213 gnome-desktop-sharp-*)
205 # NOTE: This is REQUIRED to be locked to PV_MAJOR 214 # NOTE: libgnome-desktop-2.so has been known to make binary-
206 # libgnome-desktop-2.so.INTEGER is hardcoded in gnomedesktop-sharp.dll.config 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).
207 add_depend "=gnome-base/gnome-desktop-${PV_MAJOR}*" 218 add_depend ">=gnome-base/gnome-desktop-${PV_MAJOR}:2"
208 ;; 219 ;;
209 gnome-panel-sharp-*) 220 gnome-panel-sharp-*)
210 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}" 221 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}"
211 ;; 222 ;;
212 gnome-print-sharp-*) 223 gnome-print-sharp-*)
213 add_depend ">=gnome-base/libgnomeprint-${API_VERSION}" 224 add_depend "gnome-base/libgnomeprint:2.2"
225 add_depend "gnome-base/libgnomeprintui:2.2"
214 ;; 226 ;;
215 gtkhtml-sharp-*) 227 gtkhtml-sharp-*)
216 #NOTE: gtkhtml dependency must follow gtkhtml-sharp version. 228 #NOTE: gtkhtml dependency must follow gtkhtml-sharp version.
217 #i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24 229 #i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24
218 # gtkhtml-sharp-2.16.0 >=gtkhtml-3.16 230 # gtkhtml-sharp-2.16.0 >=gtkhtml-3.16
219 # See bug 249540 for unpleasant side effects. 231 # See bug 249540 for unpleasant side effects.
220 add_depend ">=gnome-extra/gtkhtml-$(($(get_version_component_range 1) + 1 )).$(get_version_component_range 2)" 232 add_depend ">=gnome-extra/gtkhtml-$(($(get_version_component_range 1) + 1 )).$(get_version_component_range 2):3.14"
221 ;; 233 ;;
222 gtksourceview-sharp-*) 234 gtksourceview-sharp-*)
223 add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0" 235 add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0"
224 ;; 236 ;;
225 nautilusburn-sharp-*) 237 nautilusburn-sharp-*)
226 add_depend ">=gnome-extra/nautilus-cd-burner-${PV_MAJOR}" 238 add_depend ">=gnome-extra/nautilus-cd-burner-2.24.0"
227 ;; 239 ;;
228 rsvg-sharp-*) 240 rsvg-sharp-*)
229 add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}" 241 add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}:2"
230 ;; 242 ;;
231 vte-sharp-*) 243 vte-sharp-*)
232 add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}" 244 add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}:0"
233 ;; 245 ;;
234 wnck-sharp-*) 246 wnck-sharp-*)
235 add_depend ">=x11-libs/libwnck-${PV_MAJOR}" 247 add_depend ">=x11-libs/libwnck-${PV_MAJOR}:1"
236 ;; 248 ;;
237esac 249esac
238 250
239# @ECLASS-VARIABLE: DESCRIPTION 251# @ECLASS-VARIABLE: DESCRIPTION
240# @DESCRIPTION: 252# @DESCRIPTION:
311 echo "${rvalue[@]}" 323 echo "${rvalue[@]}"
312} 324}
313 325
314# @FUNCTION: phase_hook 326# @FUNCTION: phase_hook
315# @USAGE: <prefix> 327# @USAGE: <prefix>
328# @DESCRIPTION:
316# Looks for functions named <prefix>_caller_suffix and executes them. 329# Looks for functions named <prefix>_caller_suffix and executes them.
317# _caller_suffix is the calling function with the prefix 330# _caller_suffix is the calling function with the prefix
318# gtk-sharp-module removed. 331# gtk-sharp-module removed.
319phase_hook() { 332phase_hook() {
320 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs one argument" 333 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs one argument"
403# @DESCRIPTION: 416# @DESCRIPTION:
404# Runs a M-m-m-monster sed on GTK_SHARP_MODULE_DIR to convert references to 417# 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 418# 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. 419# $GTK_SHARP_MODULE is a member of $gtk_sharp_module_list.
407gtk-sharp-tarball-post_src_prepare() { 420gtk-sharp-tarball-post_src_prepare() {
421 has "${EAPI:-0}" 2 && ! use prefix && EPREFIX=
408 cd "${S}/${GTK_SHARP_MODULE_DIR}" 422 cd "${S}/${GTK_SHARP_MODULE_DIR}"
409 sed -i \ 423 sed -i \
410 -e "s; \$(srcdir)/../glib/glib-api.xml; $(get_sharp_apis --bare glib-sharp-2.0);" \ 424 -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);" \ 425 -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);" \ 426 -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" \ 429 -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" \ 430 -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" \ 431 -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" \ 432 -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" \ 433 -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;" \ 434 -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;" \ 435 -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):" \ 436 -e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \
423 -e "s:\$(INCLUDE_API) \$(top_builddir)/generator/gapi_codegen.exe:\$(INCLUDE_API):" \ 437 -e "s:\$(INCLUDE_API) \$(top_builddir)/generator/gapi_codegen.exe:\$(INCLUDE_API):" \
424 $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles" 438 $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles"
425} 439}
426 440
447# value. 461# value.
448# Contains a phase_hook, runs very last. 462# Contains a phase_hook, runs very last.
449# phase_hook prefix trigger: ${TARBALL}-tarball-post 463# phase_hook prefix trigger: ${TARBALL}-tarball-post
450# Is exported. 464# Is exported.
451gtk-sharp-module_src_prepare() { 465gtk-sharp-module_src_prepare() {
452 base_src_util autopatch 466 base_src_prepare
453# @ECLASS-VARIABLE: EAUTORECONF 467# @ECLASS-VARIABLE: EAUTORECONF
454# @DESCRIPTION: 468# @DESCRIPTION:
455# If set, EAUTORECONF will be run during src_prepare. 469# If set, EAUTORECONF will be run during src_prepare.
456 [[ ${EAUTORECONF} ]] && eautoreconf 470 [[ ${EAUTORECONF} ]] && eautoreconf
457 phase_hook ${TARBALL}-tarball-post 471 phase_hook ${TARBALL}-tarball-post
472 elibtoolize
458} 473}
459 474
460# @FUNCTION: gtk-sharp-tarball_src_configure 475# @FUNCTION: gtk-sharp-tarball_src_configure
461# @DESCRIPTION: 476# @DESCRIPTION:
462# 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
477# Sets some environment variables that will allow us to make the dependencies 492# Sets some environment variables that will allow us to make the dependencies
478# for each ebuild be only its own dependencies. Without patching configure. 493# 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 494# Is only called by gtk-sharp-module_src_configure when $GTK_SHARP_MODULE
480# is a member of $gnome_sharp_module_list. 495# is a member of $gnome_sharp_module_list.
481gnome-sharp-tarball_src_configure() { 496gnome-sharp-tarball_src_configure() {
497 has "${EAPI:-0}" 2 && ! use prefix && EPREFIX=
482 pkg_check_modules_override GLADESHARP glade-sharp-2.0 498 pkg_check_modules_override GLADESHARP glade-sharp-2.0
483 pkg_check_modules_override GAPI gapi-2.0 499 pkg_check_modules_override GAPI gapi-2.0
484 ac_path_prog_override GAPI_PARSER /usr/bin/gapi2-parser 500 ac_path_prog_override GAPI_PARSER "${EPREFIX}"/usr/bin/gapi2-parser
485 ac_path_prog_override GAPI_CODEGEN /usr/bin/gapi2-codegen 501 ac_path_prog_override GAPI_CODEGEN "${EPREFIX}"/usr/bin/gapi2-codegen
486 ac_path_prog_override GAPI_FIXUP /usr/bin/gapi2-fixup 502 ac_path_prog_override GAPI_FIXUP "${EPREFIX}"/usr/bin/gapi2-fixup
487} 503}
488 504
489# @FUNCTION: gtk-sharp-module_src_configure 505# @FUNCTION: gtk-sharp-module_src_configure
490# @USAGE: [econf-arguments] 506# @USAGE: [econf-arguments]
491# @DESCRIPTION: 507# @DESCRIPTION:

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

  ViewVC Help
Powered by ViewVC 1.1.20