blob: 9b868b2a4c76d9d35485f07b2f3e2b43c72fd22f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-dotnet/ndoc/ndoc-1.3.1-r3.ebuild,v 1.5 2009/09/27 17:07:02 nixnut Exp $
EAPI=2
inherit mono
DESCRIPTION=".NET Documentation Tool"
HOMEPAGE="http://ndoc.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${PN}-devel-v${PV}.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="doc"
RDEPEND=">=dev-lang/mono-1.0"
DEPEND="${RDEPEND}
>=dev-dotnet/nant-0.85_rc2
app-arch/unzip
dev-util/pkgconfig"
S=${WORKDIR}
src_prepare() {
sed -r -i -e 's: doc="[^"]+\"::' $(find . -name '*.build')
}
src_compile() {
# Workaround some unused private warnings which the buildfiles are treating as errors
find "${S}" -name '*.build' -exec sed -e 's@warnaserror="true"@@g' -i {} \;
nant -t:mono-1.0 || die
}
DLL_FILES="NDoc.Core.dll NDoc.Documenter.JavaDoc.dll NDoc.Documenter.Latex.dll NDoc.Documenter.LinearHtml.dll NDoc.Documenter.Msdn.dll NDoc.Documenter.Msdn2.dll NDoc.Documenter.Xml.dll NDoc.ExtendedUI.dll NDoc.VisualStudio.dll"
src_install() {
cd "${S}"/bin/mono/1.0
for dll in *.dll *.exe; do
egacinstall $dll || die "Failed to install $dll."
done
cat > ndoc <<- EOF
#!/bin/bash
mono \$MONO_OPTIONS /usr/$(get_libdir)/ndoc/NDocConsole.exe "\$@"
EOF
dobin ndoc
use doc && dohtml -a gif,html,css,js -r "${S}"/doc/sdk/
generate_pkgconfig "${PN}" "NDoc" || die
}
generate_pkgconfig() {
ebegin "Generating .pc file"
local dll \
LSTRING='Libs:' \
pkgconfig_filename="${1:-${PN}}" \
pkgconfig_pkgname="${2:-${pkgconfig_filename}}" \
pkgconfig_description="${3:-${DESCRIPTION}}"
dodir "/usr/$(get_libdir)/pkgconfig"
cat <<- EOF -> "${D}/usr/$(get_libdir)/pkgconfig/${pkgconfig_filename}.pc"
prefix=/usr
exec_prefix=\${prefix}
libdir=\${prefix}/$(get_libdir)
Name: ${pkgconfig_pkgname}
Description: ${pkgconfig_description}
Version: ${PV}
EOF
for dll in "${D}"/usr/$(get_libdir)/mono/${pkgconfig_filename}/*.dll
do
LSTRING="${LSTRING} -r:"'${libdir}'"/mono/${pkgconfig_filename}/${dll##*/}"
done
printf "${LSTRING}" >> "${D}/usr/$(get_libdir)/pkgconfig/${pkgconfig_filename}.pc"
PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --silence-errors --libs ${pkgconfig_filename} &> /dev/null
eend $?
}
|