public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Heather Cynede" <cynede@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/cecil/files/, dev-dotnet/cecil/
Date: Wed,  2 Mar 2016 08:27:36 +0000 (UTC)	[thread overview]
Message-ID: <1456156987.2fa6b592ca55b53ecceb6659a7f717135d308f27.cynede@gentoo> (raw)

commit:     2fa6b592ca55b53ecceb6659a7f717135d308f27
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Mon Feb 22 16:03:07 2016 +0000
Commit:     Heather Cynede <cynede <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 16:03:07 2016 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=2fa6b592

template copied from another ebuild

 dev-dotnet/cecil/cecil-0.9.6_p20160209.ebuild | 125 ++++++++++++++++++++++++++
 dev-dotnet/cecil/files/niget_icon_64x64.png   | Bin 0 -> 7553 bytes
 dev-dotnet/cecil/metadata.xml                 |  21 +++++
 3 files changed, 146 insertions(+)

diff --git a/dev-dotnet/cecil/cecil-0.9.6_p20160209.ebuild b/dev-dotnet/cecil/cecil-0.9.6_p20160209.ebuild
new file mode 100644
index 0000000..7726e0f
--- /dev/null
+++ b/dev-dotnet/cecil/cecil-0.9.6_p20160209.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit nupkg
+
+HOMEPAGE="http://cecil.pe/"
+DESCRIPTION="System.Reflection alternative to generate and inspect .NET executables/libraries"
+# https://github.com/jbevain/cecil/wiki/License
+# https://github.com/jbevain/cecil/blob/master/LICENSE.txt
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="net45 +gac +nupkg +pkg-config debug developer"
+USE_DOTNET="net45"
+
+COMMON_DEPEND=">=dev-lang/mono-4.0.2.5
+"
+
+RDEPEND="${COMMON_DEPEND}
+"
+
+DEPEND="${COMMON_DEPEND}
+	virtual/pkgconfig
+"
+
+NAME="cecil"
+REPOSITORY="https://github.com/jbevain/${NAME}"
+LICENSE_URL="${REPOSITORY}/blob/master/LICENSE"
+ICONMETA="https://github.com/lontivero/Open.NAT/tree/gh-pages/images/logos"
+ICON_URL="file://${FILESDIR}/nuget_icon_64x64.png"
+
+EGIT_BRANCH="master"
+EGIT_COMMIT="0e24ced7e3e9dd8320f450b6cb1d981bf9412cf8"
+SRC_URI="${REPOSITORY}/archive/${EGIT_BRANCH}/${EGIT_COMMIT}.zip -> ${PF}.zip
+	mirror://gentoo/mono.snk.bz2"
+#S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
+S="${WORKDIR}/${NAME}-${EGIT_BRANCH}"
+
+METAFILETOBUILD="./Mono.Cecil.sln"
+
+OUTPUT_DIR=Mono.Cecil/bin
+GAC_DLL_NAME=mono.cecil
+
+NUSPEC_FILE="${S}/Mono.Cecil.nuspec"
+NUSPEC_VERSION="${PVR//-r/.}"
+
+src_prepare() {
+	enuget_restore "${METAFILETOBUILD}"
+
+	patch_nuspec_file ${NUSPEC_FILE}
+}
+
+src_configure() {
+	:;
+}
+
+src_compile() {
+	exbuild /p:SignAssembly=true "/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}"
+
+	# run nuget_pack
+	enuspec -Prop version=${NUSPEC_VERSION} ${NUSPEC_FILE}
+}
+
+src_install() {
+	enupkg "${WORKDIR}/${NAME}.${NUSPEC_VERSION}.nupkg"
+
+	egacinstall "${OUTPUT_DIR}/${DIR}/${GAC_DLL_NAME}.dll"
+
+	install_pc_file
+}
+
+patch_nuspec_file()
+{
+	if use nupkg; then
+		if use debug; then
+			DIR="Debug"
+		else
+			DIR="Release"
+		fi
+		FILES_STRING=`cat <<-EOF || die "files at patch_nuspec_file()"
+		       <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
+		               <file src="${OUTPUT_DIR}/${DIR}/*.dll" target="lib\net45\" />
+		               <file src="${OUTPUT_DIR}/${DIR}/*.mdb" target="lib\net45\" />
+		       </files>
+		EOF
+		`
+		einfo ${FILES_STRING}
+		replace "</package>" "${FILES_STRING}</package>" -- $1 || die "replace at patch_nuspec_file()"
+	fi
+}
+
+PC_FILE_NAME=${PN}
+
+install_pc_file()
+{
+	if use pkg-config; then
+		dodir /usr/$(get_libdir)/pkgconfig
+		ebegin "Installing ${PC_FILE_NAME}.pc file"
+		sed \
+			-e "s:@LIBDIR@:$(get_libdir):" \
+			-e "s:@PACKAGENAME@:${PC_FILE_NAME}:" \
+			-e "s:@DESCRIPTION@:${DESCRIPTION}:" \
+			-e "s:@VERSION@:${PV}:" \
+			-e 's;@LIBS@;-r:${libdir}'"/mono/${PC_FILE_NAME}/${GAC_DLL_NAME}.dll;" \
+			<<\EOF >"${D}/usr/$(get_libdir)/pkgconfig/${PC_FILE_NAME}.pc" || die
+prefix=${pcfiledir}/../..
+exec_prefix=${prefix}
+libdir=${exec_prefix}/@LIBDIR@
+
+Name: @PACKAGENAME@
+Description: @DESCRIPTION@
+Version: @VERSION@
+Libs: @LIBS@
+EOF
+# Package exported to: /var/tmp/portage/dev-dotnet/Open-NAT-1.0.0-r201510290/image//usr/lib64/mono/Open-NAT/Open.Nat.dll -> ../gac/Open.Nat/1.0.0.0__0738eb9f132ed756/Open.Nat.dll
+# Installed Open.Nat/bin/Release/Open.Nat.dll into the gac (/var/tmp/portage/dev-dotnet/Open-NAT-1.0.0-r201510290/image//usr/lib64/mono/gac)
+
+		einfo PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "${PC_FILE_NAME}"
+		PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "${PC_FILE_NAME}" || die ".pc file failed to validate."
+		eend $?
+	fi
+}

diff --git a/dev-dotnet/cecil/files/niget_icon_64x64.png b/dev-dotnet/cecil/files/niget_icon_64x64.png
new file mode 100644
index 0000000..2735bfe
Binary files /dev/null and b/dev-dotnet/cecil/files/niget_icon_64x64.png differ

diff --git a/dev-dotnet/cecil/metadata.xml b/dev-dotnet/cecil/metadata.xml
new file mode 100644
index 0000000..481fc5e
--- /dev/null
+++ b/dev-dotnet/cecil/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>dotnet@gentoo.org</email>
+		<description>Gentoo Dotnet Project</description>
+	</maintainer>
+	<upstream>
+		<bugs-to>https://github.com/jbevain/cecil/issues/</bugs-to>
+		<remote-id type="github">jbevain/cecil</remote-id>
+	</upstream>
+	<use>
+		<flag name='pkg-config'>create .pc file(s) for .dll(s) installed to gac</flag>
+	</use>
+	<longdescription lang="en">
+		System.Reflection alternative to generate and inspect .NET executables and libraries (.NET over PE/COFF+)
+	</use>
+	<longdescription lang="ru">
+		Альтернатива библиотеке System.Reflection для создания и анализа .NET сборок (.NET поверх PE/COFF+)
+    </longdescription>
+</pkgmetadata>


             reply	other threads:[~2016-03-02  8:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02  8:27 Heather Cynede [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-03-02  8:27 [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/cecil/files/, dev-dotnet/cecil/ Heather Cynede
2016-11-24 11:42 Mikhail Pukhlikov
2017-08-03  7:57 Mikhail Pukhlikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456156987.2fa6b592ca55b53ecceb6659a7f717135d308f27.cynede@gentoo \
    --to=cynede@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox