/[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.27 Revision 1.36
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2012 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.27 2010/11/18 09:06:18 pacho Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gtk-sharp-module.eclass,v 1.36 2012/09/27 16:35:41 axs 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
13 13
14WANT_AUTOMAKE=none 14WANT_AUTOMAKE=none
15WANT_AUTOCONF=none 15WANT_AUTOCONF=none
16 16
17inherit eutils mono multilib libtool autotools base versionator 17inherit eutils mono multilib libtool autotools base versionator
18
19case ${EAPI:-0} in
20 2|3|4|5) ;;
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/}
118 ;; 123 ;;
119 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)
120 TARBALL="gnome-desktop-sharp" 125 TARBALL="gnome-desktop-sharp"
121 add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*" 126 add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
122 add_depend "=dev-dotnet/gnome-sharp-2.24*" 127 add_depend "=dev-dotnet/gnome-sharp-2.24*"
128 add_depend "gnome-base/gnome-desktop:2"
123 add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*" 129 add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*"
124 ;; 130 ;;
125 *) 131 *)
126 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!"
127 die "How did we get here!!?" 133 die "How did we get here!!?"
180 add_depend "~dev-dotnet/glib-sharp-${PV}" 186 add_depend "~dev-dotnet/glib-sharp-${PV}"
181 add_depend "~dev-dotnet/atk-sharp-${PV}" 187 add_depend "~dev-dotnet/atk-sharp-${PV}"
182 add_depend "~dev-dotnet/gdk-sharp-${PV}" 188 add_depend "~dev-dotnet/gdk-sharp-${PV}"
183 add_depend "~dev-dotnet/gtk-sharp-${PV}" 189 add_depend "~dev-dotnet/gtk-sharp-${PV}"
184 add_depend "~dev-dotnet/pango-sharp-${PV}" 190 add_depend "~dev-dotnet/pango-sharp-${PV}"
185 add_depend ">=gnome-base/libglade-2.3.6" 191 add_depend ">=gnome-base/libglade-2.3.6:2.0"
186 ;; 192 ;;
187 #gnome-sharp tarball 193 #gnome-sharp tarball
188 art-sharp-*) 194 art-sharp-*)
189 add_depend ">=media-libs/libart_lgpl-2.3.20" 195 add_depend ">=media-libs/libart_lgpl-2.3.20"
190 ;; 196 ;;
191 gnome-sharp-*) 197 gnome-sharp-*)
192 add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}" 198 add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}"
193 add_depend "~dev-dotnet/gnomevfs-sharp-${PV}" 199 add_depend "~dev-dotnet/gnomevfs-sharp-${PV}"
194 add_depend "~dev-dotnet/art-sharp-${PV}" 200 add_depend "~dev-dotnet/art-sharp-${PV}"
195 add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}" 201 add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}"
196 add_depend ">=x11-libs/gtk+-2.14.0" 202 add_depend ">=x11-libs/gtk+-2.14.0:2"
197 ;; 203 ;;
198 gconf-sharp-*) 204 gconf-sharp-*)
199 add_depend ">=gnome-base/gconf-${PV_MAJOR}" 205 add_depend ">=gnome-base/gconf-${PV_MAJOR}:2"
200 add_depend "=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}*" 206 add_depend "=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
201 add_depend "~dev-dotnet/gnome-sharp-${PV}" 207 add_depend "~dev-dotnet/gnome-sharp-${PV}"
202 add_depend "~dev-dotnet/art-sharp-${PV}" 208 add_depend "~dev-dotnet/art-sharp-${PV}"
203 ;; 209 ;;
204 gnomevfs-sharp-*) 210 gnomevfs-sharp-*)
205 add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}" 211 add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}:2"
206 ;; 212 ;;
207 #gnome-desktop-sharp tarball 213 #gnome-desktop-sharp tarball
208 gnome-desktop-sharp-*) 214 gnome-desktop-sharp-*)
209 # NOTE: libgnome-desktop-2.so has been known to make binary- 215 # NOTE: libgnome-desktop-2.so has been known to make binary-
210 # incompatible changes, requiring .so bumps. gnome-desktop-sharp 216 # incompatible changes, requiring .so bumps. gnome-desktop-sharp
211 # is locked to a specific .so.n version, so strict dependencies 217 # is locked to a specific .so.n version, so strict dependencies
212 # may be required in the future (as it has in the past). 218 # may be required in the future (as it has in the past).
213 add_depend ">=gnome-base/gnome-desktop-${PV_MAJOR}" 219 add_depend ">=gnome-base/gnome-desktop-${PV_MAJOR}:2"
214 ;; 220 ;;
215 gnome-panel-sharp-*) 221 gnome-panel-sharp-*)
216 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}" 222 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}"
217 ;; 223 ;;
218 gnome-print-sharp-*) 224 gnome-print-sharp-*)
219 add_depend ">=gnome-base/libgnomeprint-${API_VERSION}" 225 add_depend "gnome-base/libgnomeprint:2.2"
226 add_depend "gnome-base/libgnomeprintui:2.2"
220 ;; 227 ;;
221 gtkhtml-sharp-*) 228 gtkhtml-sharp-*)
222 #NOTE: gtkhtml dependency must follow gtkhtml-sharp version. 229 #NOTE: gtkhtml dependency must follow gtkhtml-sharp version.
223 #i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24 230 #i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24
224 # gtkhtml-sharp-2.16.0 >=gtkhtml-3.16 231 # gtkhtml-sharp-2.16.0 >=gtkhtml-3.16
225 # See bug 249540 for unpleasant side effects. 232 # See bug 249540 for unpleasant side effects.
226 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"
227 ;; 234 ;;
228 gtksourceview-sharp-*) 235 gtksourceview-sharp-*)
229 add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0" 236 add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0"
230 ;; 237 ;;
231 nautilusburn-sharp-*) 238 nautilusburn-sharp-*)
232 add_depend ">=gnome-extra/nautilus-cd-burner-2.24.0" 239 add_depend ">=gnome-extra/nautilus-cd-burner-2.24.0"
233 ;; 240 ;;
234 rsvg-sharp-*) 241 rsvg-sharp-*)
235 add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}" 242 add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}:2"
236 ;; 243 ;;
237 vte-sharp-*) 244 vte-sharp-*)
238 add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}" 245 add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}:0"
239 ;; 246 ;;
240 wnck-sharp-*) 247 wnck-sharp-*)
241 add_depend ">=x11-libs/libwnck-${PV_MAJOR}" 248 add_depend ">=x11-libs/libwnck-${PV_MAJOR}:1"
242 ;; 249 ;;
243esac 250esac
244 251
245# @ECLASS-VARIABLE: DESCRIPTION 252# @ECLASS-VARIABLE: DESCRIPTION
246# @DESCRIPTION: 253# @DESCRIPTION:
248DESCRIPTION="GtkSharp's ${GTK_SHARP_MODULE} module of the ${TARBALL} tarball" 255DESCRIPTION="GtkSharp's ${GTK_SHARP_MODULE} module of the ${TARBALL} tarball"
249# @ECLASS-VARIABLE: HOMEPAGE 256# @ECLASS-VARIABLE: HOMEPAGE
250# @DESCRIPTION: 257# @DESCRIPTION:
251# Default value: http://www.mono-project.com/GtkSharp 258# Default value: http://www.mono-project.com/GtkSharp
252HOMEPAGE="http://www.mono-project.com/GtkSharp" 259HOMEPAGE="http://www.mono-project.com/GtkSharp"
253# @ECLASS-VARIABLE: DESCRIPTION 260# @ECLASS-VARIABLE: LICENSE
254# @DESCRIPTION: 261# @DESCRIPTION:
255# Default value: LGPL-2.1 262# Default value: LGPL-2.1
256LICENSE="LGPL-2.1" 263LICENSE="LGPL-2.1"
257 264
258add_depend ">=dev-lang/mono-2.0.1" 265add_depend ">=dev-lang/mono-2.0.1"
259add_bdepend ">=sys-apps/sed-4" 266add_bdepend ">=sys-apps/sed-4"
260add_bdepend ">=dev-util/pkgconfig-0.23" 267add_bdepend "virtual/pkgconfig"
261add_bdepend ">=app-shells/bash-3.1" 268add_bdepend ">=app-shells/bash-3.1"
262 269
263IUSE="debug" 270IUSE="debug"
264# @ECLASS-VARIABLE: S 271# @ECLASS-VARIABLE: S
265# @DESCRIPTION: 272# @DESCRIPTION:
317 echo "${rvalue[@]}" 324 echo "${rvalue[@]}"
318} 325}
319 326
320# @FUNCTION: phase_hook 327# @FUNCTION: phase_hook
321# @USAGE: <prefix> 328# @USAGE: <prefix>
329# @DESCRIPTION:
322# Looks for functions named <prefix>_caller_suffix and executes them. 330# Looks for functions named <prefix>_caller_suffix and executes them.
323# _caller_suffix is the calling function with the prefix 331# _caller_suffix is the calling function with the prefix
324# gtk-sharp-module removed. 332# gtk-sharp-module removed.
325phase_hook() { 333phase_hook() {
326 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs one argument" 334 [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs one argument"
409# @DESCRIPTION: 417# @DESCRIPTION:
410# 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
411# 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
412# $GTK_SHARP_MODULE is a member of $gtk_sharp_module_list. 420# $GTK_SHARP_MODULE is a member of $gtk_sharp_module_list.
413gtk-sharp-tarball-post_src_prepare() { 421gtk-sharp-tarball-post_src_prepare() {
422 has "${EAPI:-0}" 2 && ! use prefix && EPREFIX=
414 cd "${S}/${GTK_SHARP_MODULE_DIR}" 423 cd "${S}/${GTK_SHARP_MODULE_DIR}"
415 sed -i \ 424 sed -i \
416 -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);" \
417 -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);" \
418 -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);" \
421 -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" \
422 -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" \
423 -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" \
424 -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" \
425 -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" \
426 -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;" \
427 -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;" \
428 -e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \ 437 -e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \
429 -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):" \
430 $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles" 439 $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles"
431} 440}
432 441
484# 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
485# for each ebuild be only its own dependencies. Without patching configure. 494# for each ebuild be only its own dependencies. Without patching configure.
486# 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
487# is a member of $gnome_sharp_module_list. 496# is a member of $gnome_sharp_module_list.
488gnome-sharp-tarball_src_configure() { 497gnome-sharp-tarball_src_configure() {
498 has "${EAPI:-0}" 2 && ! use prefix && EPREFIX=
489 pkg_check_modules_override GLADESHARP glade-sharp-2.0 499 pkg_check_modules_override GLADESHARP glade-sharp-2.0
490 pkg_check_modules_override GAPI gapi-2.0 500 pkg_check_modules_override GAPI gapi-2.0
491 ac_path_prog_override GAPI_PARSER /usr/bin/gapi2-parser 501 ac_path_prog_override GAPI_PARSER "${EPREFIX}"/usr/bin/gapi2-parser
492 ac_path_prog_override GAPI_CODEGEN /usr/bin/gapi2-codegen 502 ac_path_prog_override GAPI_CODEGEN "${EPREFIX}"/usr/bin/gapi2-codegen
493 ac_path_prog_override GAPI_FIXUP /usr/bin/gapi2-fixup 503 ac_path_prog_override GAPI_FIXUP "${EPREFIX}"/usr/bin/gapi2-fixup
494} 504}
495 505
496# @FUNCTION: gtk-sharp-module_src_configure 506# @FUNCTION: gtk-sharp-module_src_configure
497# @USAGE: [econf-arguments] 507# @USAGE: [econf-arguments]
498# @DESCRIPTION: 508# @DESCRIPTION:

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.36

  ViewVC Help
Powered by ViewVC 1.1.20