commit:     a12519250e9ae3073079eee0e8d2b72b4910ef0d
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Tue Aug 16 11:24:49 2016 +0000
Commit:     Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Tue Aug 16 11:24:49 2016 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=a1251925

move egacinstall into separate eclass

 dev-dotnet/npgsql/metadata.xml             |  7 ++++++-
 dev-dotnet/npgsql/npgsql-3.1.6.ebuild      |  4 ++--
 dev-util/mono-tools/mono-tools-9999.ebuild |  6 +++---
 eclass/dotnet.eclass                       | 11 ----------
 eclass/gac.eclass                          | 31 +++++++++++++++++++++++++++++
 eclass/machine.eclass                      | 32 ++++++++++++++++++++++++++++++
 6 files changed, 74 insertions(+), 17 deletions(-)

diff --git a/dev-dotnet/npgsql/metadata.xml b/dev-dotnet/npgsql/metadata.xml
index ab1141e..5bf48a3 100644
--- a/dev-dotnet/npgsql/metadata.xml
+++ b/dev-dotnet/npgsql/metadata.xml
@@ -9,9 +9,14 @@
                <bugs-to>https://github.com/npgsql/npgsql/issues</bugs-to>
                <remote-id type="github">npgsql/npgsql</remote-id>
        </upstream>
-       <use>
+       <use lang="en">
+               <flag name='machine'>register ADO .NET data provider in 
machine.config</flag>
                <flag name='pkg-config'>create .pc file(s) for .dll(s) 
installed to gac</flag>
        </use>
+       <use lang="ru">
+               <flag name='machine'>регистрирует  фабрику ADO .NET провайдера 
в файле machine.config</flag>
+               <flag name='pkg-config'>создаёт .pc файл для .dll-ки, 
устанавливаемой в gac</flag>
+       </use>
        <longdescription lang="en">Npgsql is an open source ADO.NET Data 
Provider for PostgreSQL,
 it allows programs written in C#, F# and similar to access the PostgreSQL 
database server.
 It is implemented in 100% C# code. Works with PostgreSQL 9.x and 
above.</longdescription>

diff --git a/dev-dotnet/npgsql/npgsql-3.1.6.ebuild 
b/dev-dotnet/npgsql/npgsql-3.1.6.ebuild
index 65b6691..3b7ce0e 100644
--- a/dev-dotnet/npgsql/npgsql-3.1.6.ebuild
+++ b/dev-dotnet/npgsql/npgsql-3.1.6.ebuild
@@ -11,9 +11,9 @@ EAPI=6
 # gac = install into gac
 # pkg-config = register in pkg-config database
 USE_DOTNET="net45"
-IUSE="${USE_DOTNET} debug developer test +nupkg +gac +pkg-config"
+IUSE="${USE_DOTNET} debug developer test +nupkg +gac +pkg-config +machine"
 
-inherit nupkg
+inherit gac machine nupkg
 
 NAME="npgsql"
 NUSPEC_ID="${NAME}"

diff --git a/dev-util/mono-tools/mono-tools-9999.ebuild 
b/dev-util/mono-tools/mono-tools-9999.ebuild
index 9a5afd4..ae84f0f 100644
--- a/dev-util/mono-tools/mono-tools-9999.ebuild
+++ b/dev-util/mono-tools/mono-tools-9999.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
+EAPI=6
 
-inherit base dotnet autotools git-2
+inherit dotnet autotools git-2
 
 DESCRIPTION="Set of useful Mono related utilities"
 HOMEPAGE="http://www.mono-project.com/";

diff --git a/eclass/dotnet.eclass b/eclass/dotnet.eclass
index 02b6c81..6651c4f 100644
--- a/eclass/dotnet.eclass
+++ b/eclass/dotnet.eclass
@@ -147,17 +147,6 @@ exbuild_strong() {
        exbuild "${PARAMETERS}"
 }
 
-# @FUNCTION: egacinstall
-# @DESCRIPTION:  install package to GAC
-egacinstall() {
-       use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
-       gacutil -i "${1}" \
-               -root "${ED}"/usr/$(get_libdir) \
-               -gacdir /usr/$(get_libdir) \
-               -package ${2:-${GACPN:-${PN}}} \
-               || die "installing ${1} into the Global Assembly Cache failed"
-}
-
 # @FUNCTION: dotnet_multilib_comply
 # @DESCRIPTION:  multilib comply
 dotnet_multilib_comply() {

diff --git a/eclass/gac.eclass b/eclass/gac.eclass
new file mode 100644
index 0000000..a074aff
--- /dev/null
+++ b/eclass/gac.eclass
@@ -0,0 +1,31 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: gac.eclass
+# @MAINTAINER: cyn...@gentoo.org
+# @BLURB: functions for registring in gac
+# @DESCRIPTION:
+# binary packages should be able to be registred in gac too
+
+case ${EAPI:-0} in
+       0|1|2|3|4|5) die "this eclass doesn't support EAPI ${EAPI:-0}" ;;
+       6) ;;
+esac
+
+DEPEND+=" dev-lang/mono"
+IUSE+=" +gac"
+
+# SRC_URI+=" https://github.com/mono/mono/raw/master/mcs/class/mono.snk";
+# I was unable to setup it this ^^ way
+
+# @FUNCTION: egacinstall
+# @DESCRIPTION:  install package to GAC
+egacinstall() {
+       use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
+       gacutil -i "${1}" \
+               -root "${ED}"/usr/$(get_libdir) \
+               -gacdir /usr/$(get_libdir) \
+               -package ${2:-${GACPN:-${PN}}} \
+               || die "installing ${1} into the Global Assembly Cache failed"
+}

diff --git a/eclass/machine.eclass b/eclass/machine.eclass
new file mode 100644
index 0000000..0cb37c7
--- /dev/null
+++ b/eclass/machine.eclass
@@ -0,0 +1,32 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: machine.eclass
+# @MAINTAINER: cyn...@gentoo.org
+# @BLURB: functions for registring in machine.config
+# @DESCRIPTION:
+# ADO .NET data providers should be able to be registred in machine.config
+
+case ${EAPI:-0} in
+       0|1|2|3|4|5) die "this eclass doesn't support EAPI ${EAPI:-0}" ;;
+       6) ;;
+esac
+
+DEPEND+=" dev-lang/mono
+       dev-util/mono-packaging-tools
+       "
+RDEPEND+=" dev-lang/mono
+       dev-util/mono-packaging-tools
+       "
+
+IUSE+=" +machine"
+
+# SRC_URI+=" https://github.com/mono/mono/raw/master/mcs/class/mono.snk";
+# I was unable to setup it this ^^ way
+
+# @FUNCTION: emachineinstall
+# @DESCRIPTION:  install a provider into machine.config
+emachineinstall() {
+       einfo "Installing $1 into machine.config"
+}

Reply via email to