summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorPeter Alfredsen <loki_val@gentoo.org>2008-11-28 00:20:08 +0000
committerPeter Alfredsen <loki_val@gentoo.org>2008-11-28 00:20:08 +0000
commitc59740aa8314692cf25bcdee5c61537eaee73425 (patch)
tree34c82dc0afe33630103952e21c65d1ff6ef088c6 /eclass
parentUpdate information about password stored for boinc. Just cosmetic. (diff)
downloadgentoo-2-c59740aa8314692cf25bcdee5c61537eaee73425.tar.gz
gentoo-2-c59740aa8314692cf25bcdee5c61537eaee73425.tar.bz2
gentoo-2-c59740aa8314692cf25bcdee5c61537eaee73425.zip
Major changes to avoid pkg-config files displaying the wrong --libs. Simplifications, quoting fixed.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/gtk-sharp-module.eclass89
1 files changed, 31 insertions, 58 deletions
diff --git a/eclass/gtk-sharp-module.eclass b/eclass/gtk-sharp-module.eclass
index 4c08d76d15a1..8756bc5581e5 100644
--- a/eclass/gtk-sharp-module.eclass
+++ b/eclass/gtk-sharp-module.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gtk-sharp-module.eclass,v 1.5 2008/11/27 05:24:23 loki_val Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gtk-sharp-module.eclass,v 1.6 2008/11/28 00:20:08 loki_val Exp $
# Author : Peter Johanson <latexer@gentoo.org>, butchered by ikelos, then loki_val.
# Based off of original work in gst-plugins.eclass by <foser@gentoo.org>
@@ -35,10 +35,10 @@ HOMEPAGE="http://www.mono-project.com/GtkSharp"
LICENSE="LGPL-2.1"
-RDEPEND="=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*
- >=dev-lang/mono-2"
-DEPEND="${RDEPEND}
- >=sys-apps/sed-4"
+DEPEND="=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*
+ >=sys-apps/sed-4
+ >=dev-util/pkgconfig-0.23"
+RDEPEND="=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
RESTRICT="test"
@@ -47,14 +47,10 @@ RESTRICT="test"
# done to avoid passing bogus configure parameters, as well as to return the
# correct tarball to download. Note that this makes ${GTK_SHARP_TARBALL_PREFIX}
# obsolete.
-gtk_sharp_module_list="glade"
gnome_sharp_module_list="art gnome gnomevfs"
gnome_desktop_sharp_module_list="gnome-print gnome-panel gtkhtml gtksourceview nautilusburn rsvg vte wnck"
-if [[ " ${gtk_sharp_module_list} " == *" ${GTK_SHARP_MODULE} "* ]] ; then
- my_module_list="${gtk_sharp_module_list}"
- my_tarball="gtk-sharp"
-elif [[ " ${gnome_sharp_module_list} " == *" ${GTK_SHARP_MODULE} "* ]] ; then
+if [[ " ${gnome_sharp_module_list} " == *" ${GTK_SHARP_MODULE} "* ]] ; then
my_module_list="${gnome_sharp_module_list}"
my_tarball="gnome-sharp"
@@ -82,63 +78,41 @@ SRC_URI="mirror://gnome/sources/${my_tarball}/${PV%.*}/${MY_P}.tar.bz2
### Public functions.
gtk-sharp-module_fix_files() {
- # Change references like "/r:../glib/glib-sharp.dll" ->
- # "/r:${GTK_SHARP_LIB_DIR}/glib-sharp.dll" and references like
+ # Change references like "/r:../art/art-sharp.dll" ->
+ # "/r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/art-sharp.dll" and references like
# "../glib/glib-sharp.xml" or "$(top_srcdir)/glib/glib-sharp.xml" ->
- # "${GAPI_DIR}/glib-sharp.xml".
+ # "${gapi_dir}/glib-sharp.xml".
#
# We also make sure to call the installed gapi-fixup and gapi-codegen and
# not the ones that would be built locally.
local gapi_dir="${ROOT}/usr/share/gapi${GTK_SHARP_SLOT_DEC}"
- local gapi_fixup="gapi${GTK_SHARP_SLOT}-fixup"
- local gapi_codegen="gapi${GTK_SHARP_SLOT}-codegen"
-
- # This is very likely to be of use outside of this function as well, so make
- # it public.
- GTK_SHARP_LIB_DIR="${ROOT}/usr/$(get_libdir)/mono/gtk-sharp${GTK_SHARP_SLOT_DEC}"
-
- local makefiles="$(find ${S} -name Makefile.in)"
- sed -i -e "s;\(\.\.\|\$(top_srcdir)\)/[[:alpha:]]*/\([[:alpha:]]*\(-[[:alpha:]]*\)*\).xml;${gapi_dir}/\2.xml;g" \
- -e "s;/r:\(\.\./\)*[[:alpha:]]*/\([[:alpha:]]*\(-[[:alpha:]]*\)*\).dll;/r:${GTK_SHARP_LIB_DIR}/\2.dll;g" \
- -e "s;\.\./[[:alpha:]]*/\([[:alpha:]]*\(-[[:alpha:]]*\)*\).dll;${GTK_SHARP_LIB_DIR}/\1.dll;g" \
- -e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \
- -e "s:\$(INCLUDE_API) \$(top_builddir)/generator/gapi_codegen.exe:\$(INCLUDE_API):" \
- -e "s:\$(RUNTIME) \$(top_builddir)/parser/gapi-fixup.exe:${gapi_fixup}:" \
- -e "s:\$(RUNTIME) \$(top_builddir)/generator/gapi_codegen.exe:${gapi_codegen}:" \
- ${makefiles} || die "failed to fix GtkSharp makefiles"
-
- # Oh GtkSharp, why do your pkgconfig entries suck donkey ass? Why do
- # gnome-desktop-sharp modules use ${assemblies_dir} for Libs: instead of
- # the convention you yourself introduced for gnome-sharp, which just uses
- # @PACKAGE_VERSION@? Are you just trying to annoy me?
- local pcins="$(find ${S} -name *.pc.in)"
- sed -i -e 's:^libdir.*:libdir=@libdir@:' \
- -e "s:\${assemblies_dir}:\${libdir}/mono/gtk-sharp${GTK_SHARP_SLOT_DEC}:" \
- ${pcins} || die "failed to fix GtkSharp pkgconfig entries"
+
+ local makefiles=( $(find "${S}" -name Makefile.in) )
+ sed -i \
+ -e "s;\(\.\.\|\$(top_srcdir)\)/[[:alpha:]]*/\([[:alpha:]]*\(-[[:alpha:]]*\)*\).xml;${gapi_dir}/\2.xml;g" \
+ -e "s; \.\./art/art-sharp.dll; $(get_sharp_lib art-sharp-2.0);g" \
+ -e "s;\.\./gnomevfs/gnome-vfs-sharp.dll;$(get_sharp_lib gnome-vfs-sharp-2.0);g" \
+ -e "s;\$(top_builddir)/art/art-sharp.dll;$(get_sharp_lib art-sharp-2.0);" \
+ -e "s;\$(top_builddir)/gnome/gnome-sharp.dll;$(get_sharp_lib gnome-sharp-2.0);" \
+ "${makefiles[@]}" || die "failed to fix GtkSharp makefiles"
+}
+
+get_sharp_lib() {
+ S="$(pkg-config --libs ${1})"
+ S=${S%% *}
+ printf ${S#-r:}
}
gtk-sharp-module_src_prepare() {
# Make selecting components configurable.
- epatch ${WORKDIR}/${MY_P}-configurable.diff
-
- # Fixes support with pkgconfig-0.17, #92503.
- sed -i -e 's/\<PKG_PATH\>/GTK_SHARP_PKG_PATH/g' \
- -e ':^CFLAGS=:d' \
- "${S}"/configure.in
-
- # Fix install data hook, #161093.
- if [ -f "${S}/sample/gconf/Makefile.am" ]
- then
- sed -i -e 's/^install-hook/install-data-hook/' \
- "${S}"/sample/gconf/Makefile.am || die
- fi
+ epatch "${WORKDIR}/${MY_P}-configurable.diff"
# Disable building samples, #16015.
- sed -i -e "s:sample::" "${S}"/Makefile.am || die
+ sed -i -e "s:sample::" "${S}/Makefile.am" || die
eautoreconf
- cd "${S}"/${GTK_SHARP_MODULE_DIR}
+ cd "${S}/${GTK_SHARP_MODULE_DIR}"
gtk-sharp-module_fix_files
}
@@ -168,14 +142,13 @@ gtk-sharp-module_src_configure() {
gtk-sharp-module_src_compile() {
- cd "${S}"/${GTK_SHARP_MODULE_DIR}
- LANG=C emake ${OVERRIDEJOBS} || die "emake failed"
+ cd "${S}/${GTK_SHARP_MODULE_DIR}"
+ LANG=C emake || die "emake failed"
}
gtk-sharp-module_src_install() {
- cd ${GTK_SHARP_MODULE_DIR}
- LANG=C emake ${OVERRIDEJOBS} GACUTIL_FLAGS="/root ${D}/usr/$(get_libdir) /gacdir /usr/$(get_libdir) /package gtk-sharp${GTK_SHARP_SLOT_DEC}" \
- DESTDIR="${D}" install || die "emake install failed"
+ cd "${GTK_SHARP_MODULE_DIR}"
+ LANG=C emake DESTDIR=${D} install || die "emake install failed"
}
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install