/[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.7 Revision 1.11
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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.7 2008/12/03 20:44:04 loki_val Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gtk-sharp-module.eclass,v 1.11 2009/01/06 19:37:18 grobian Exp $
4 4
5# Author : Peter Johanson <latexer@gentoo.org>, butchered by ikelos, then loki_val. 5# Author : Peter Johanson <latexer@gentoo.org>, butchered by ikelos, then loki_val.
6# Based off of original work in gst-plugins.eclass by <foser@gentoo.org> 6# Based off of original work in gst-plugins.eclass by <foser@gentoo.org>
7 7
8# Note that this breaks compatibility with the original gtk-sharp-component 8# Note that this breaks compatibility with the original gtk-sharp-component
9# eclass. 9# eclass.
10 10
11inherit eutils mono multilib autotools 11inherit eutils mono multilib autotools base versionator
12 12
13# Get the name of the component to build and the build dir; by default, 13# Get the name of the component to build and the build dir; by default,
14# extract it from the ebuild's name. 14# extract it from the ebuild's name.
15GTK_SHARP_MODULE=${GTK_SHARP_MODULE:=${PN/-sharp/}} 15GTK_SHARP_MODULE=${GTK_SHARP_MODULE:=${PN/-sharp/}}
16GTK_SHARP_MODULE_DIR=${GTK_SHARP_MODULE_DIR:=${PN/-sharp/}} 16GTK_SHARP_MODULE_DIR=${GTK_SHARP_MODULE_DIR:=${PN/-sharp/}}
17 17
18# In some cases the desired module cannot be configured to be built on its own.
19# This variable allows for the setting of additional configure-deps.
20GTK_SHARP_MODULE_DEPS="${GTK_SHARP_MODULE_DEPS}"
21
22# Allow ebuilds to set a value for the required GtkSharp version; default to 18# Allow ebuilds to set a value for the required GtkSharp version.
23# ${PV}.
24GTK_SHARP_REQUIRED_VERSION=${GTK_SHARP_REQUIRED_VERSION:=${PV%.*}} 19GTK_SHARP_REQUIRED_VERSION=${GTK_SHARP_REQUIRED_VERSION}
25 20
26# Version number used to differentiate between unversioned 1.0 series and the 21# Version number used to differentiate between unversioned 1.0 series and the
27# versioned 2.0 series (2.0 series has 2 or 2.0 appended to various paths and 22# versioned 2.0 series (2.0 series has 2 or 2.0 appended to various paths and
28# scripts). Default to ${SLOT}. 23# scripts). Default to ${SLOT}.
29GTK_SHARP_SLOT="${GTK_SHARP_SLOT:=${SLOT}}" 24GTK_SHARP_SLOT="${GTK_SHARP_SLOT:=${SLOT}}"
30GTK_SHARP_SLOT_DEC="${GTK_SHARP_SLOT_DEC:=-${GTK_SHARP_SLOT}.0}" 25GTK_SHARP_SLOT_DEC="${GTK_SHARP_SLOT_DEC:=-${GTK_SHARP_SLOT}.0}"
31 26
27#Handy little var
28PV_MAJOR=$(get_version_component_range 1-2)
29
32# Set some defaults. 30# Set some defaults.
33DESCRIPTION="GtkSharp's ${GTK_SHARP_MODULE} module" 31DESCRIPTION="GtkSharp's ${GTK_SHARP_MODULE} module"
34HOMEPAGE="http://www.mono-project.com/GtkSharp" 32HOMEPAGE="http://www.mono-project.com/GtkSharp"
35 33
36LICENSE="LGPL-2.1" 34LICENSE="LGPL-2.1"
37 35DEPEND="
38DEPEND="=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}* 36 >=dev-lang/mono-2.0.1
39 >=sys-apps/sed-4 37 >=sys-apps/sed-4
40 >=dev-util/pkgconfig-0.23" 38 >=dev-util/pkgconfig-0.23
41RDEPEND="=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*" 39 "
40RDEPEND="
41 >=dev-lang/mono-2.0.1
42 "
42 43
43RESTRICT="test" 44IUSE="debug"
45
44 46
45# The GtkSharp modules are currently divided into three seperate tarball 47# The GtkSharp modules are currently divided into three seperate tarball
46# distributions. Figure out which of these our component belongs to. This is 48# distributions. Figure out which of these our component belongs to.
47# done to avoid passing bogus configure parameters, as well as to return the 49
48# correct tarball to download. Note that this makes ${GTK_SHARP_TARBALL_PREFIX} 50gtk_sharp_module_list="glib glade gtk gdk atk pango gtk-dotnet gtk-gapi"
49# obsolete.
50gnome_sharp_module_list="art gnome gnomevfs" 51gnome_sharp_module_list="art gnome gnomevfs gconf"
51gnome_desktop_sharp_module_list="gnome-print gnome-panel gtkhtml gtksourceview nautilusburn rsvg vte wnck" 52gnome_desktop_sharp_module_list="gnome-desktop gnome-print gnome-panel gtkhtml gtksourceview nautilusburn rsvg vte wnck"
52 53
53if [[ " ${gnome_sharp_module_list} " == *" ${GTK_SHARP_MODULE} "* ]] ; then 54has "${GTK_SHARP_MODULE}" ${gtk_sharp_module_list} && GTK_SHARP_REQUIRED_VERSION=${PV}
54 my_module_list="${gnome_sharp_module_list}"
55 my_tarball="gnome-sharp"
56 55
57# While gnome-desktop-sharp is a part of gnome-desktop-sharp (0_o) it is not a 56
58# configurable component, so we don't want to put it into the module list. 57add_bdepend() {
59# Result is that we have to check for it manually here and in src_configure. 58 DEPEND="${DEPEND} $@"
60elif [[ " ${gnome_desktop_sharp_module_list} " == *" ${GTK_SHARP_MODULE} "* || 59}
61 "${GTK_SHARP_MODULE}" == "gnome-desktop" ]] ; then 60
62 my_module_list="${gnome_desktop_sharp_module_list}" 61add_rdepend() {
63 my_tarball="gnome-desktop-sharp" 62 RDEPEND="${RDEPEND} $@"
64else 63}
64
65add_depend() {
66 DEPEND="${DEPEND} $@"
67 RDEPEND="${RDEPEND} $@"
68}
69
70gsm_get_tarball() {
71 has "${GTK_SHARP_MODULE}" ${gtk_sharp_module_list} \
72 && echo "gtk-sharp" && return 0
73 has "${GTK_SHARP_MODULE}" ${gnome_sharp_module_list} \
74 && echo "gnome-sharp" && return 0
75 has "${GTK_SHARP_MODULE}" ${gnome_desktop_sharp_module_list} \
76 && echo "gnome-desktop-sharp" && return 0
65 die "unknown GtkSharp module: ${GTK_SHARP_MODULE}" 77 die "unknown GtkSharp module: ${GTK_SHARP_MODULE}"
78}
79
80[[ "${PN}" != "gtk-sharp-gapi" ]] && add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*"
81has "${GTK_SHARP_MODULE}" ${gnome_sharp_module_list} ${gnome_desktop_sharp_module_list} gtk-dotnet glade \
82 && add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
83has "${GTK_SHARP_MODULE}" gtk gdk atk pango gtk-dotnet parser \
84 && add_depend "=dev-dotnet/glib-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
85has "${GTK_SHARP_MODULE}" ${gnome_desktop_sharp_module_list} \
86 && add_depend ">=dev-dotnet/gnome-sharp-${PV_MAJOR}"
87
88case ${PF} in
89 #gtk-sharp tarball
90 gtk-sharp-gapi*)
91 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
92 add_depend "dev-perl/XML-LibXML"
93 ;;
94 gtk-sharp-*)
95 add_depend "~dev-dotnet/atk-sharp-${PV}"
96 add_depend "~dev-dotnet/gdk-sharp-${PV}"
97 add_depend "~dev-dotnet/pango-sharp-${PV}"
98 ;;
99 gdk-sharp-*)
100 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
101 add_depend "x11-libs/gtk+:2"
102 add_depend "~dev-dotnet/pango-sharp-${PV}"
103 ;;
104 atk-sharp-*)
105 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
106 add_depend "dev-libs/atk"
107 ;;
108 glib-sharp-*)
109 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
110 add_depend "dev-libs/glib:2"
111 ;;
112 pango-sharp-*)
113 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
114 add_depend "x11-libs/pango"
115 ;;
116 gtk-dotnet-*)
117 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
118 add_depend "~dev-dotnet/gdk-sharp-${PV}"
119 add_depend "~dev-dotnet/pango-sharp-${PV}"
120 add_depend "!dev-lang/mono[minimal]"
121 ;;
122 glade-sharp-*)
123 add_depend "~dev-dotnet/atk-sharp-${PV}"
124 add_depend "~dev-dotnet/gdk-sharp-${PV}"
125 add_depend "~dev-dotnet/pango-sharp-${PV}"
126 add_depend ">=gnome-base/libglade-2.3.6"
127 ;;
128 #gnome-sharp tarball
129 art-sharp-*)
130 add_depend ">=media-libs/libart_lgpl-2.3.20"
131 ;;
132 gnome-sharp-*)
133 add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}"
134 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}"
135 add_depend "~dev-dotnet/gnomevfs-sharp-${PV}"
136 add_depend "~dev-dotnet/art-sharp-${PV}"
137 add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}"
138 ;;
139 gconf-sharp-*)
140 add_depend ">=gnome-base/gconf-${PV_MAJOR}"
141 add_depend ">=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}"
142 add_depend "~dev-dotnet/gnome-sharp-${PV}"
143 add_depend "~dev-dotnet/art-sharp-${PV}"
144 ;;
145 gnomevfs-sharp-*)
146 add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}"
147 ;;
148 #gnome-desktop-sharp tarball
149 gnome-desktop-sharp-*)
150 add_depend "=gnome-base/gnome-desktop-${PV_MAJOR}*"
151 ;;
152 gnome-panel-sharp-*)
153 add_depend "=gnome-base/gnome-panel-${PV_MAJOR}*"
154 ;;
155 gnome-print-sharp-*)
156 add_depend ">=gnome-base/libgnomeprint-${API_VERSION}"
157 ;;
158 gtkhtml-sharp-*)
159 #NOTE: gtkhtml dependency must follow gtkhtml-sharp version.
160 #i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24
161 # gtkhtml-sharp-2.16.0 >=gtkhtml-3.16
162 # See bug 249540 for unpleasant side effects.
163 add_depend ">=gnome-extra/gtkhtml-$(($(get_version_component_range 1) + 1 )).$(get_version_component_range 2)"
164 ;;
165 gtksourceview-sharp-*)
166 add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0"
167 ;;
168 nautilusburn-sharp-*)
169 add_depend ">=gnome-extra/nautilus-cd-burner-${PV_MAJOR}"
170 ;;
171 rsvg-sharp-*)
172 add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}"
173 ;;
174 vte-sharp-*)
175 add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}"
176 ;;
177 wnck-sharp-*)
178 add_depend ">=x11-libs/libwnck-${PV_MAJOR}"
179 ;;
180esac
181
182
183
184GSM_P=$(gsm_get_tarball)-${PV}
185S=${WORKDIR}/${GSM_P}
186SRC_URI="mirror://gnome/sources/$(gsm_get_tarball)/${PV%.*}/${GSM_P}.tar.bz2"
187
188if [[ "${GSM_P%.*}" = "gtk-sharp-2.12" ]]
189then
190 SRC_URI="${SRC_URI}
191 mirror://gentoo/gtk-sharp-2.12.0-patches.tar.bz2"
192 #Upstream: https://bugzilla.novell.com/show_bug.cgi?id=$bugno
193 #Upstream bug #421063
194 PATCHES=( "${WORKDIR}/patches/$(gsm_get_tarball)-2.12.0-parallelmake.patch"
195 "${WORKDIR}/patches/$(gsm_get_tarball)-2.12.0-doc-parallelmake.patch" )
196 EAUTORECONF="YES"
66fi 197fi
67
68MY_P=${my_tarball}-${PV}
69S=${WORKDIR}/${MY_P}
70
71# Since all interesting versions are hosted on the GNOME server anyway it's the
72# only one we support, for now.
73SRC_URI="mirror://gnome/sources/${my_tarball}/${PV%.*}/${MY_P}.tar.bz2
74 mirror://gentoo/${MY_P}-configurable.diff.gz
75 http://dev.gentoo.org/~ikelos/devoverlay-distfiles/${MY_P}-configurable.diff.gz"
76 198
77 199
78### Public functions. 200### Public functions.
79 201
80gtk-sharp-module_fix_files() { 202gtk-sharp-module_fix_files() {
84 # "${gapi_dir}/glib-sharp.xml". 206 # "${gapi_dir}/glib-sharp.xml".
85 # 207 #
86 # We also make sure to call the installed gapi-fixup and gapi-codegen and 208 # We also make sure to call the installed gapi-fixup and gapi-codegen and
87 # not the ones that would be built locally. 209 # not the ones that would be built locally.
88 local gapi_dir="${ROOT}/usr/share/gapi${GTK_SHARP_SLOT_DEC}" 210 local gapi_dir="${ROOT}/usr/share/gapi${GTK_SHARP_SLOT_DEC}"
211 local GAPI_FIXUP="gapi2-fixup"
212 local GAPI_CODEGEN="gapi2-codegen"
89 213
90 local makefiles=( $(find "${S}" -name Makefile.in) ) 214 local makefiles=( $(find "${S}" -name Makefile.in) )
91 sed -i \ 215 sed -i \
92 -e "s;\(\.\.\|\$(top_srcdir)\)/[[:alpha:]]*/\([[:alpha:]]*\(-[[:alpha:]]*\)*\).xml;${gapi_dir}/\2.xml;g" \ 216 -e "s;\(\.\.\|\$(top_srcdir)\|\$(srcdir)/\.\.\)/[[:alpha:]]*/\([[:alpha:]]*\(-[[:alpha:]]*\)*\).xml;${gapi_dir}/\2.xml;g" \
217 -e "s; \.\./glib/glib-sharp.dll; $(get_sharp_lib glib-sharp-2.0);g" \
218 -e "s; \.\./pango/pango-sharp.dll; $(get_sharp_lib pango-sharp-2.0);g" \
93 -e "s; \.\./art/art-sharp.dll; $(get_sharp_lib art-sharp-2.0);g" \ 219 -e "s; \.\./art/art-sharp.dll; $(get_sharp_lib art-sharp-2.0);g" \
220 -e "s; \.\./atk/atk-sharp.dll; $(get_sharp_lib atk-sharp-2.0);g" \
221 -e "s; \.\./gdk/gdk-sharp.dll; $(get_sharp_lib gdk-sharp-2.0);g" \
222 -e "s; \.\./gtk/gtk-sharp.dll; $(get_sharp_lib gtk-sharp-2.0);g" \
94 -e "s;\.\./gnomevfs/gnome-vfs-sharp.dll;$(get_sharp_lib gnome-vfs-sharp-2.0);g" \ 223 -e "s;\.\./gnomevfs/gnome-vfs-sharp.dll;$(get_sharp_lib gnome-vfs-sharp-2.0);g" \
95 -e "s;\$(top_builddir)/art/art-sharp.dll;$(get_sharp_lib art-sharp-2.0);" \ 224 -e "s;\$(top_builddir)/art/art-sharp.dll;$(get_sharp_lib art-sharp-2.0);" \
96 -e "s;\$(top_builddir)/gnome/gnome-sharp.dll;$(get_sharp_lib gnome-sharp-2.0);" \ 225 -e "s;\$(top_builddir)/gnome/gnome-sharp.dll;$(get_sharp_lib gnome-sharp-2.0);" \
226 -e "s;\$(RUNTIME) \$(top_builddir)/parser/gapi-fixup.exe;${GAPI_FIXUP};" \
227 -e "s;\$(RUNTIME) \$(top_builddir)/generator/gapi_codegen.exe;${GAPI_CODEGEN};" \
228 -e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \
229 -e "s:\$(INCLUDE_API) \$(top_builddir)/generator/gapi_codegen.exe:\$(INCLUDE_API):" \
97 "${makefiles[@]}" || die "failed to fix GtkSharp makefiles" 230 "${makefiles[@]}" || die "failed to fix GtkSharp makefiles"
98} 231}
99 232
100get_sharp_lib() { 233get_sharp_lib() {
101 S="$(pkg-config --libs ${1})" 234 S="$(pkg-config --libs ${1})"
102 S=${S%% *} 235 S=${S%% *}
103 printf ${S#-r:} 236 printf ${S#-r:}
104} 237}
105 238
239gtk-sharp_tarball_src_prepare() {
240 local package
241 sed -i -e '/SUBDIRS/s/ glib / /' \
242 -e '/SUBDIRS/s/ glade / /' \
243 -e '/SUBDIRS/s/ sample / /' \
244 -e '/SUBDIRS/s/ doc/ /' \
245 Makefile.am || die "failed sedding sense into gtk-sharp's Makefile.am"
246 for package in GLIB PANGO ATK GTK
247 do
248 sed -r -i -e "s:(PKG_CHECK_MODULES\(${package}.*)\):\1,[foo=bar],[bar=foo]):" \
249 configure.in || die "failed sedding sense into gnome-sharp's configure.in"
250 done
251 EAUTORECONF=YES
252}
253
254gnome-sharp_tarball_src_prepare() {
255 if ! [[ "${PN}" = "gconf-sharp" ]]
256 then
257 sed -r -i -e "s:(PKG_CHECK_MODULES\(GLADESHARP.*)\):\1,[foo=bar],[bar=foo]):" \
258 configure.in || die "failed sedding sense into gnome-sharp's configure.in"
259 EAUTORECONF=YES
260 fi
261}
262
106gtk-sharp-module_src_prepare() { 263gtk-sharp-module_src_prepare() {
107 # Make selecting components configurable. 264 if [[ "$(type -t $(gsm_get_tarball)_tarball_src_prepare)" = "function" ]]
108 epatch "${WORKDIR}/${MY_P}-configurable.diff" 265 then
266 ebegin "Running $(gsm_get_tarball)_tarball_src_prepare"
267 $(gsm_get_tarball)_tarball_src_prepare
268 eend $?
269 fi
270 base_src_util autopatch
109 271
110 # Disable building samples, #16015. 272 [[ ${EAUTORECONF} ]] && eautoreconf
111 sed -i -e "s:sample::" "${S}/Makefile.am" || die
112
113 eautoreconf
114 273
115 cd "${S}/${GTK_SHARP_MODULE_DIR}" 274 cd "${S}/${GTK_SHARP_MODULE_DIR}"
116 275
117 gtk-sharp-module_fix_files &> /dev/null 276 gtk-sharp-module_fix_files &> /dev/null
118} 277}
119 278
120gtk-sharp-module_src_configure() { 279gtk-sharp-module_src_configure() {
121 # Disable any module besides one(s) we want. 280 econf --disable-static \
122 local module gtk_sharp_conf 281 --disable-dependency-tracking \
282 --disable-maintainer-mode \
283 $(use debug &&echo "--enable-debug" ) \
284 ${gtk_sharp_conf} \
285 ${@} || die "econf failed"
286}
123 287
124 einfo "Configuring to build ${PN} module ..." 288gtk-sharp-module_src_compile() {
289 cd "${S}/${GTK_SHARP_MODULE_DIR}"
290 emake || die "emake failed"
291}
125 292
126 # No bogus configure parameters please. 293gtk-sharp-module_src_install() {
127 [[ ${GTK_SHARP_MODULE} == "gnome-desktop" ]] && GTK_SHARP_MODULE=
128 294
129 for module in ${GTK_SHARP_MODULE} ${GTK_SHARP_MODULE_DEPS} ; do 295 cd "${GTK_SHARP_MODULE_DIR}"
130 my_module_list=${my_module_list/${module}/} 296 emake DESTDIR=${D} install || die "emake install failed"
297 mono_multilib_comply
298 find "${D}" -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
299 if has "${GTK_SHARP_MODULE}" gtk gdk atk pango
300 then
301 find "${D}" -name '*.pc' -exec rm -rf '{}' '+' || die "la removal failed"
302 pkgconfig_filename="${PN}${GTK_SHARP_SLOT_DEC}"
303 pkgconfig_pkgname="${GTK_SHARP_MODULE}#"
304 pkgconfig_description=".NET/Mono bindings for ${GTK_SHARP_MODULE}"
305 pkgconfig_monodir="$(gsm_get_tarball)${GTK_SHARP_SLOT_DEC}"
306 case ${GTK_SHARP_MODULE} in
307 gtk)
308 pkgconfig_requires="glib-sharp${GTK_SHARP_SLOT_DEC} atk-sharp${GTK_SHARP_SLOT_DEC} gdk-sharp${GTK_SHARP_SLOT_DEC} pango-sharp${GTK_SHARP_SLOT_DEC}"
309 ;;
310 gdk)
311 pkgconfig_requires="glib-sharp${GTK_SHARP_SLOT_DEC} pango-sharp${GTK_SHARP_SLOT_DEC}"
312 ;;
313 atk)
314 pkgconfig_requires="glib-sharp${GTK_SHARP_SLOT_DEC}"
315 ;;
316 pango)
317 pkgconfig_requires="glib-sharp${GTK_SHARP_SLOT_DEC}"
318 ;;
319 *)
320 die "unhandled gtk_sharp_module"
321 ;;
322 esac
323 generate_pkgconfig
324 fi
325}
326
327EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install
328
329generate_pkgconfig() {
330 ebegin "Generating .pc file for ${P}"
331 local dll \
332 gfile \
333 pkgconfig_gapidir \
334 apifile \
335 LSTRING='Libs:' \
336 CSTRING='Cflags:' \
337 pkgconfig_filename="${1:-${pkgconfig_filename:-${PN}}}" \
338 pkgconfig_monodir="${2:-${pkgconfig_monodir:-${pkgconfig_filename}}}" \
339 pkgconfig_pkgname="${3:-${pkgconfig_pkgname:-${pkgconfig_filename}}}" \
340 pkgconfig_version="${4:-${pkgconfig_version:-${PV}}}" \
341 pkgconfig_description="${5:-${pkgconfig_description:-${DESCRIPTION}}}" \
342 pkgconfig_requires="${6:-${pkgconfig_requires}}" \
343
344 pushd "${D}/usr/" &> /dev/null
345 apifile=$(find share -name '*-api.xml' 2>/dev/null)
346 popd &> /dev/null
347
348 pkgconfig_gapidir=${apifile:+\$\{prefix\}/${apifile%/*}}
349
350 dodir "/usr/$(get_libdir)/pkgconfig"
351 cat <<- EOF -> "${D}/usr/$(get_libdir)/pkgconfig/${pkgconfig_filename}.pc"
352 prefix=\${pcfiledir}/../..
353 exec_prefix=\${prefix}
354 libdir=\${prefix}/$(get_libdir)
355 gapidir=${pkgconfig_gapidir}
356 Name: ${pkgconfig_pkgname}
357 Description: ${pkgconfig_description}
358 Version: ${pkgconfig_version}
359 EOF
360
361 for gfile in "${D}"/usr/${apifile%/*}/*-api.xml
362 do
363 CSTRING="${CSTRING} -I:"'${gapidir}'"/${gfile##*/}"
131 done 364 done
132 for module in ${my_module_list} ; do 365 echo "${CSTRING}" >> "${D}/usr/$(get_libdir)/pkgconfig/${pkgconfig_filename}.pc"
133 gtk_sharp_conf="${gtk_sharp_conf} --disable-${module} " 366
367
368 for dll in "${D}"/usr/$(get_libdir)/mono/${pkgconfig_monodir}/*.dll
369 do
370 if ! [[ "${dll##*/}" == "policy."*".dll" ]]
371 then
372 LSTRING="${LSTRING} -r:"'${libdir}'"/mono/${pkgconfig_monodir}/${dll##*/}"
373 fi
134 done 374 done
135 for module in ${GTK_SHARP_MODULE} ${GTK_SHARP_MODULE_DEPS} ; do 375 echo "${LSTRING}" >> "${D}/usr/$(get_libdir)/pkgconfig/${pkgconfig_filename}.pc"
136 gtk_sharp_conf="${gtk_sharp_conf} --enable-${module} "
137 done
138 376
139 cd "${S}" 377 if [[ "${pkgconfig_requires}" ]]
140 econf ${@} ${gtk_sharp_conf} || die "econf failed" 378 then
379 printf "Requires: ${pkgconfig_requires}" >> "${D}/usr/$(get_libdir)/pkgconfig/${pkgconfig_filename}.pc"
380 fi
381 PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --silence-errors --libs ${pkgconfig_filename} &> /dev/null
382 eend $?
141} 383}
142 384
143gtk-sharp-module_src_compile() {
144
145 cd "${S}/${GTK_SHARP_MODULE_DIR}"
146 LANG=C emake || die "emake failed"
147}
148
149gtk-sharp-module_src_install() {
150 cd "${GTK_SHARP_MODULE_DIR}"
151 LANG=C emake DESTDIR=${D} install || die "emake install failed"
152}
153
154EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.20