nini-1.1.0-r2.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit mono multilib versionator
  5. DESCRIPTION="Nini - A configuration library for .NET"
  6. HOMEPAGE="http://nini.sourceforge.net"
  7. SRC_URI="mirror://sourceforge/nini/Nini-${PV}.zip"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE="debug"
  12. RDEPEND=">=dev-lang/mono-2"
  13. DEPEND="${RDEPEND}
  14. app-arch/sharutils
  15. "
  16. S="${WORKDIR}/Nini/Source"
  17. src_prepare() {
  18. uudecode -o Nini.snk "${FILESDIR}"/Nini.snk.uue || die
  19. }
  20. src_configure() {
  21. use debug && DEBUG="-debug"
  22. }
  23. src_compile() {
  24. #See nini in Debian for info
  25. mcs ${DEBUG} \
  26. -nowarn:1616 \
  27. -target:library \
  28. -out:Nini.dll \
  29. -define:STRONG \
  30. -r:System.dll \
  31. -r:System.Xml.dll \
  32. -keyfile:Nini.snk \
  33. AssemblyInfo.cs Config/*.cs Ini/*.cs Util/*.cs \
  34. || die "Compilation failed"
  35. sed \
  36. -e 's|@prefix@|${pcfiledir}/../..|' \
  37. -e 's|@exec_prefix@|${prefix}|' \
  38. -e "s|@libdir@|\$\{exec_prefix\}/$(get_libdir)|" \
  39. -e "s|@libs@|-r:\$\{libdir\}/mono/Nini/Nini.dll|" \
  40. -e "s|@VERSION@|${PV}|" \
  41. "${FILESDIR}"/nini.pc.in > "${S}"/nini.pc
  42. }
  43. src_install() {
  44. egacinstall Nini.dll Nini
  45. pkgconfigdir=/usr/$(get_libdir)/pkgconfig
  46. insinto ${pkgconfigdir}
  47. newins "${S}"/nini.pc ${P}.pc
  48. dosym ${P}.pc ${pkgconfigdir}/${PN}-$(get_version_component_range 1-2).pc
  49. dosym ${P}.pc ${pkgconfigdir}/${PN}.pc
  50. dodoc "${S}"/../CHANGELOG.txt "${S}"/../README.txt
  51. }