/[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.13
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.13 2009/01/23 20:28:58 loki_val 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}*"
81[[ "${PN}" != "gtk-sharp-gapi" ]] && add_bdepend "!!=dev-dotnet/gtk-sharp-gapi-2.12.7-r5"
82[[ "${PN}" != "gtk-sharp-gapi" ]] && add_bdepend "!!=dev-dotnet/gtk-sharp-gapi-2.12.7-r6"
83
84has "${GTK_SHARP_MODULE}" ${gnome_sharp_module_list} ${gnome_desktop_sharp_module_list} gtk-dotnet glade \
85 && add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
86has "${GTK_SHARP_MODULE}" gtk gdk atk pango gtk-dotnet parser \
87 && add_depend "=dev-dotnet/glib-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
88has "${GTK_SHARP_MODULE}" ${gnome_desktop_sharp_module_list} \
89 && add_depend ">=dev-dotnet/gnome-sharp-${PV_MAJOR}"
90
91case ${PF} in
92 #gtk-sharp tarball
93 gtk-sharp-gapi*)
94 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
95 add_depend "dev-perl/XML-LibXML"
96 ;;
97 gtk-sharp-*)
98 add_depend "~dev-dotnet/atk-sharp-${PV}"
99 add_depend "~dev-dotnet/gdk-sharp-${PV}"
100 add_depend "~dev-dotnet/pango-sharp-${PV}"
101 ;;
102 gdk-sharp-*)
103 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
104 add_depend "x11-libs/gtk+:2"
105 add_depend "~dev-dotnet/pango-sharp-${PV}"
106 ;;
107 atk-sharp-*)
108 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
109 add_depend "dev-libs/atk"
110 ;;
111 glib-sharp-*)
112 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
113 add_depend "dev-libs/glib:2"
114 ;;
115 pango-sharp-*)
116 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
117 add_depend "x11-libs/pango"
118 ;;
119 gtk-dotnet-*)
120 add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
121 add_depend "~dev-dotnet/gdk-sharp-${PV}"
122 add_depend "~dev-dotnet/pango-sharp-${PV}"
123 add_depend "!dev-lang/mono[minimal]"
124 ;;
125 glade-sharp-*)
126 add_depend "~dev-dotnet/atk-sharp-${PV}"
127 add_depend "~dev-dotnet/gdk-sharp-${PV}"
128 add_depend "~dev-dotnet/pango-sharp-${PV}"
129 add_depend ">=gnome-base/libglade-2.3.6"
130 ;;
131 #gnome-sharp tarball
132 art-sharp-*)
133 add_depend ">=media-libs/libart_lgpl-2.3.20"
134 ;;
135 gnome-sharp-*)
136 add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}"
137 add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}"
138 add_depend "~dev-dotnet/gnomevfs-sharp-${PV}"
139 add_depend "~dev-dotnet/art-sharp-${PV}"
140 add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}"
141 ;;
142 gconf-sharp-*)
143 add_depend ">=gnome-base/gconf-${PV_MAJOR}"
144 add_depend ">=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}"
145 add_depend "~dev-dotnet/gnome-sharp-${PV}"
146 add_depend "~dev-dotnet/art-sharp-${PV}"
147 ;;
148 gnomevfs-sharp-*)
149 add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}"
150 ;;
151 #gnome-desktop-sharp tarball
152 gnome-desktop-sharp-*)
153 add_depend "=gnome-base/gnome-desktop-${PV_MAJOR}*"
154 ;;
155 gnome-panel-sharp-*)
156 add_depend "=gnome-base/gnome-panel-${PV_MAJOR}*"
157 ;;
158 gnome-print-sharp-*)
159 add_depend ">=gnome-base/libgnomeprint-${API_VERSION}"
160 ;;
161 gtkhtml-sharp-*)
162 #NOTE: gtkhtml dependency must follow gtkhtml-sharp version.
163 #i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24
164 # gtkhtml-sharp-2.16.0 >=gtkhtml-3.16
165 # See bug 249540 for unpleasant side effects.
166 add_depend ">=gnome-extra/gtkhtml-$(($(get_version_component_range 1) + 1 )).$(get_version_component_range 2)"
167 ;;
168 gtksourceview-sharp-*)
169 add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0"
170 ;;
171 nautilusburn-sharp-*)
172 add_depend ">=gnome-extra/nautilus-cd-burner-${PV_MAJOR}"
173 ;;
174 rsvg-sharp-*)
175 add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}"
176 ;;
177 vte-sharp-*)
178 add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}"
179 ;;
180 wnck-sharp-*)
181 add_depend ">=x11-libs/libwnck-${PV_MAJOR}"
182 ;;
183esac
184
185
186
187GSM_P=$(gsm_get_tarball)-${PV}
188S=${WORKDIR}/${GSM_P}
189SRC_URI="mirror://gnome/sources/$(gsm_get_tarball)/${PV%.*}/${GSM_P}.tar.bz2"
190
191if [[ "${GSM_P%.*}" = "gtk-sharp-2.12" ]]
192then
193 SRC_URI="${SRC_URI}
194 mirror://gentoo/gtk-sharp-2.12.0-patches.tar.bz2"
195 #Upstream: https://bugzilla.novell.com/show_bug.cgi?id=$bugno
196 #Upstream bug #421063
197 PATCHES=( "${WORKDIR}/patches/$(gsm_get_tarball)-2.12.0-parallelmake.patch"
198 "${WORKDIR}/patches/$(gsm_get_tarball)-2.12.0-doc-parallelmake.patch" )
199 EAUTORECONF="YES"
66fi 200fi
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 201
77 202
78### Public functions. 203### Public functions.
79 204
80gtk-sharp-module_fix_files() { 205gtk-sharp-module_fix_files() {
84 # "${gapi_dir}/glib-sharp.xml". 209 # "${gapi_dir}/glib-sharp.xml".
85 # 210 #
86 # We also make sure to call the installed gapi-fixup and gapi-codegen and 211 # We also make sure to call the installed gapi-fixup and gapi-codegen and
87 # not the ones that would be built locally. 212 # not the ones that would be built locally.
88 local gapi_dir="${ROOT}/usr/share/gapi${GTK_SHARP_SLOT_DEC}" 213 local gapi_dir="${ROOT}/usr/share/gapi${GTK_SHARP_SLOT_DEC}"
214 local GAPI_FIXUP="gapi2-fixup"
215 local GAPI_CODEGEN="gapi2-codegen"
89 216
90 local makefiles=( $(find "${S}" -name Makefile.in) ) 217 local makefiles=( $(find "${S}" -name Makefile.in) )
91 sed -i \ 218 sed -i \
92 -e "s;\(\.\.\|\$(top_srcdir)\)/[[:alpha:]]*/\([[:alpha:]]*\(-[[:alpha:]]*\)*\).xml;${gapi_dir}/\2.xml;g" \ 219 -e "s;\(\.\.\|\$(top_srcdir)\|\$(srcdir)/\.\.\)/[[:alpha:]]*/\([[:alpha:]]*\(-[[:alpha:]]*\)*\).xml;${gapi_dir}/\2.xml;g" \
220 -e "s; \.\./glib/glib-sharp.dll; $(get_sharp_lib glib-sharp-2.0);g" \
221 -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" \ 222 -e "s; \.\./art/art-sharp.dll; $(get_sharp_lib art-sharp-2.0);g" \
223 -e "s; \.\./atk/atk-sharp.dll; $(get_sharp_lib atk-sharp-2.0);g" \
224 -e "s; \.\./gdk/gdk-sharp.dll; $(get_sharp_lib gdk-sharp-2.0);g" \
225 -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" \ 226 -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);" \ 227 -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);" \ 228 -e "s;\$(top_builddir)/gnome/gnome-sharp.dll;$(get_sharp_lib gnome-sharp-2.0);" \
229 -e "s;\$(RUNTIME) \$(top_builddir)/parser/gapi-fixup.exe;${GAPI_FIXUP};" \
230 -e "s;\$(RUNTIME) \$(top_builddir)/generator/gapi_codegen.exe;${GAPI_CODEGEN};" \
231 -e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \
232 -e "s:\$(INCLUDE_API) \$(top_builddir)/generator/gapi_codegen.exe:\$(INCLUDE_API):" \
97 "${makefiles[@]}" || die "failed to fix GtkSharp makefiles" 233 "${makefiles[@]}" || die "failed to fix GtkSharp makefiles"
98} 234}
99 235
100get_sharp_lib() { 236get_sharp_lib() {
101 S="$(pkg-config --libs ${1})" 237 S="$(pkg-config --libs ${1})"
102 S=${S%% *} 238 S=${S%% *}
103 printf ${S#-r:} 239 printf ${S#-r:}
104} 240}
105 241
242gtk-sharp_tarball_src_prepare() {
243 local package
244 sed -i -e '/SUBDIRS/s/ glib / /' \
245 -e '/SUBDIRS/s/ glade / /' \
246 -e '/SUBDIRS/s/ sample / /' \
247 -e '/SUBDIRS/s/ doc/ /' \
248 Makefile.am || die "failed sedding sense into gtk-sharp's Makefile.am"
249 for package in GLIB PANGO ATK GTK
250 do
251 sed -r -i -e "s:(PKG_CHECK_MODULES\(${package}.*)\):\1,[foo=bar],[bar=foo]):" \
252 configure.in || die "failed sedding sense into gnome-sharp's configure.in"
253 done
254 EAUTORECONF=YES
255}
256
257gnome-sharp_tarball_src_prepare() {
258 if ! [[ "${PN}" = "gconf-sharp" ]]
259 then
260 sed -r -i -e "s:(PKG_CHECK_MODULES\(GLADESHARP.*)\):\1,[foo=bar],[bar=foo]):" \
261 configure.in || die "failed sedding sense into gnome-sharp's configure.in"
262 EAUTORECONF=YES
263 fi
264}
265
106gtk-sharp-module_src_prepare() { 266gtk-sharp-module_src_prepare() {
107 # Make selecting components configurable. 267 if [[ "$(type -t $(gsm_get_tarball)_tarball_src_prepare)" = "function" ]]
108 epatch "${WORKDIR}/${MY_P}-configurable.diff" 268 then
269 ebegin "Running $(gsm_get_tarball)_tarball_src_prepare"
270 $(gsm_get_tarball)_tarball_src_prepare
271 eend $?
272 fi
273 base_src_util autopatch
109 274
110 # Disable building samples, #16015. 275 [[ ${EAUTORECONF} ]] && eautoreconf
111 sed -i -e "s:sample::" "${S}/Makefile.am" || die
112
113 eautoreconf
114 276
115 cd "${S}/${GTK_SHARP_MODULE_DIR}" 277 cd "${S}/${GTK_SHARP_MODULE_DIR}"
116 278
117 gtk-sharp-module_fix_files &> /dev/null 279 gtk-sharp-module_fix_files &> /dev/null
118} 280}
119 281
120gtk-sharp-module_src_configure() { 282gtk-sharp-module_src_configure() {
121 # Disable any module besides one(s) we want. 283 econf --disable-static \
122 local module gtk_sharp_conf 284 --disable-dependency-tracking \
285 --disable-maintainer-mode \
286 $(use debug &&echo "--enable-debug" ) \
287 ${gtk_sharp_conf} \
288 ${@} || die "econf failed"
289}
123 290
124 einfo "Configuring to build ${PN} module ..." 291gtk-sharp-module_src_compile() {
292 cd "${S}/${GTK_SHARP_MODULE_DIR}"
293 emake || die "emake failed"
294}
125 295
126 # No bogus configure parameters please. 296gtk-sharp-module_src_install() {
127 [[ ${GTK_SHARP_MODULE} == "gnome-desktop" ]] && GTK_SHARP_MODULE=
128 297
129 for module in ${GTK_SHARP_MODULE} ${GTK_SHARP_MODULE_DEPS} ; do 298 cd "${S}/${GTK_SHARP_MODULE_DIR}"
130 my_module_list=${my_module_list/${module}/} 299 emake DESTDIR=${D} install || die "emake install failed"
300 mono_multilib_comply
301 find "${D}" -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
302 if has "${GTK_SHARP_MODULE}" gtk gdk atk pango
303 then
304 find "${D}" -name '*.pc' -exec rm -rf '{}' '+' || die "la removal failed"
305 pkgconfig_filename="${PN}${GTK_SHARP_SLOT_DEC}"
306 pkgconfig_pkgname="${GTK_SHARP_MODULE}#"
307 pkgconfig_description=".NET/Mono bindings for ${GTK_SHARP_MODULE}"
308 pkgconfig_monodir="$(gsm_get_tarball)${GTK_SHARP_SLOT_DEC}"
309 case ${GTK_SHARP_MODULE} in
310 gtk)
311 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}"
312 ;;
313 gdk)
314 pkgconfig_requires="glib-sharp${GTK_SHARP_SLOT_DEC} pango-sharp${GTK_SHARP_SLOT_DEC}"
315 ;;
316 atk)
317 pkgconfig_requires="glib-sharp${GTK_SHARP_SLOT_DEC}"
318 ;;
319 pango)
320 pkgconfig_requires="glib-sharp${GTK_SHARP_SLOT_DEC}"
321 ;;
322 *)
323 die "unhandled gtk_sharp_module"
324 ;;
325 esac
326 generate_pkgconfig
327 fi
328}
329
330EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install
331
332generate_pkgconfig() {
333 ebegin "Generating .pc file for ${P}"
334 local dll \
335 gfile \
336 pkgconfig_gapidir \
337 apifile \
338 LSTRING='Libs:' \
339 CSTRING='Cflags:' \
340 pkgconfig_filename="${1:-${pkgconfig_filename:-${PN}}}" \
341 pkgconfig_monodir="${2:-${pkgconfig_monodir:-${pkgconfig_filename}}}" \
342 pkgconfig_pkgname="${3:-${pkgconfig_pkgname:-${pkgconfig_filename}}}" \
343 pkgconfig_version="${4:-${pkgconfig_version:-${PV}}}" \
344 pkgconfig_description="${5:-${pkgconfig_description:-${DESCRIPTION}}}" \
345 pkgconfig_requires="${6:-${pkgconfig_requires}}" \
346
347 pushd "${D}/usr/" &> /dev/null
348 apifile=$(find share -name '*-api.xml' 2>/dev/null)
349 popd &> /dev/null
350
351 pkgconfig_gapidir=${apifile:+\$\{prefix\}/${apifile%/*}}
352
353 dodir "/usr/$(get_libdir)/pkgconfig"
354 cat <<- EOF -> "${D}/usr/$(get_libdir)/pkgconfig/${pkgconfig_filename}.pc"
355 prefix=\${pcfiledir}/../..
356 exec_prefix=\${prefix}
357 libdir=\${prefix}/$(get_libdir)
358 gapidir=${pkgconfig_gapidir}
359 Name: ${pkgconfig_pkgname}
360 Description: ${pkgconfig_description}
361 Version: ${pkgconfig_version}
362 EOF
363
364 for gfile in "${D}"/usr/${apifile%/*}/*-api.xml
365 do
366 CSTRING="${CSTRING} -I:"'${gapidir}'"/${gfile##*/}"
131 done 367 done
132 for module in ${my_module_list} ; do 368 echo "${CSTRING}" >> "${D}/usr/$(get_libdir)/pkgconfig/${pkgconfig_filename}.pc"
133 gtk_sharp_conf="${gtk_sharp_conf} --disable-${module} " 369
370
371 for dll in "${D}"/usr/$(get_libdir)/mono/${pkgconfig_monodir}/*.dll
372 do
373 if ! [[ "${dll##*/}" == "policy."*".dll" ]]
374 then
375 LSTRING="${LSTRING} -r:"'${libdir}'"/mono/${pkgconfig_monodir}/${dll##*/}"
376 fi
134 done 377 done
135 for module in ${GTK_SHARP_MODULE} ${GTK_SHARP_MODULE_DEPS} ; do 378 echo "${LSTRING}" >> "${D}/usr/$(get_libdir)/pkgconfig/${pkgconfig_filename}.pc"
136 gtk_sharp_conf="${gtk_sharp_conf} --enable-${module} "
137 done
138 379
139 cd "${S}" 380 if [[ "${pkgconfig_requires}" ]]
140 econf ${@} ${gtk_sharp_conf} || die "econf failed" 381 then
382 printf "Requires: ${pkgconfig_requires}" >> "${D}/usr/$(get_libdir)/pkgconfig/${pkgconfig_filename}.pc"
383 fi
384 PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --silence-errors --libs ${pkgconfig_filename} &> /dev/null
385 eend $?
141} 386}
142 387
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.13

  ViewVC Help
Powered by ViewVC 1.1.20