1 |
commit: 2fa6b592ca55b53ecceb6659a7f717135d308f27 |
2 |
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Feb 22 16:03:07 2016 +0000 |
4 |
Commit: Heather Cynede <cynede <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 22 16:03:07 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=2fa6b592 |
7 |
|
8 |
template copied from another ebuild |
9 |
|
10 |
dev-dotnet/cecil/cecil-0.9.6_p20160209.ebuild | 125 ++++++++++++++++++++++++++ |
11 |
dev-dotnet/cecil/files/niget_icon_64x64.png | Bin 0 -> 7553 bytes |
12 |
dev-dotnet/cecil/metadata.xml | 21 +++++ |
13 |
3 files changed, 146 insertions(+) |
14 |
|
15 |
diff --git a/dev-dotnet/cecil/cecil-0.9.6_p20160209.ebuild b/dev-dotnet/cecil/cecil-0.9.6_p20160209.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..7726e0f |
18 |
--- /dev/null |
19 |
+++ b/dev-dotnet/cecil/cecil-0.9.6_p20160209.ebuild |
20 |
@@ -0,0 +1,125 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=6 |
26 |
+ |
27 |
+inherit nupkg |
28 |
+ |
29 |
+HOMEPAGE="http://cecil.pe/" |
30 |
+DESCRIPTION="System.Reflection alternative to generate and inspect .NET executables/libraries" |
31 |
+# https://github.com/jbevain/cecil/wiki/License |
32 |
+# https://github.com/jbevain/cecil/blob/master/LICENSE.txt |
33 |
+LICENSE="MIT" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~amd64 ~x86" |
36 |
+IUSE="net45 +gac +nupkg +pkg-config debug developer" |
37 |
+USE_DOTNET="net45" |
38 |
+ |
39 |
+COMMON_DEPEND=">=dev-lang/mono-4.0.2.5 |
40 |
+" |
41 |
+ |
42 |
+RDEPEND="${COMMON_DEPEND} |
43 |
+" |
44 |
+ |
45 |
+DEPEND="${COMMON_DEPEND} |
46 |
+ virtual/pkgconfig |
47 |
+" |
48 |
+ |
49 |
+NAME="cecil" |
50 |
+REPOSITORY="https://github.com/jbevain/${NAME}" |
51 |
+LICENSE_URL="${REPOSITORY}/blob/master/LICENSE" |
52 |
+ICONMETA="https://github.com/lontivero/Open.NAT/tree/gh-pages/images/logos" |
53 |
+ICON_URL="file://${FILESDIR}/nuget_icon_64x64.png" |
54 |
+ |
55 |
+EGIT_BRANCH="master" |
56 |
+EGIT_COMMIT="0e24ced7e3e9dd8320f450b6cb1d981bf9412cf8" |
57 |
+SRC_URI="${REPOSITORY}/archive/${EGIT_BRANCH}/${EGIT_COMMIT}.zip -> ${PF}.zip |
58 |
+ mirror://gentoo/mono.snk.bz2" |
59 |
+#S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" |
60 |
+S="${WORKDIR}/${NAME}-${EGIT_BRANCH}" |
61 |
+ |
62 |
+METAFILETOBUILD="./Mono.Cecil.sln" |
63 |
+ |
64 |
+OUTPUT_DIR=Mono.Cecil/bin |
65 |
+GAC_DLL_NAME=mono.cecil |
66 |
+ |
67 |
+NUSPEC_FILE="${S}/Mono.Cecil.nuspec" |
68 |
+NUSPEC_VERSION="${PVR//-r/.}" |
69 |
+ |
70 |
+src_prepare() { |
71 |
+ enuget_restore "${METAFILETOBUILD}" |
72 |
+ |
73 |
+ patch_nuspec_file ${NUSPEC_FILE} |
74 |
+} |
75 |
+ |
76 |
+src_configure() { |
77 |
+ :; |
78 |
+} |
79 |
+ |
80 |
+src_compile() { |
81 |
+ exbuild /p:SignAssembly=true "/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}" |
82 |
+ |
83 |
+ # run nuget_pack |
84 |
+ enuspec -Prop version=${NUSPEC_VERSION} ${NUSPEC_FILE} |
85 |
+} |
86 |
+ |
87 |
+src_install() { |
88 |
+ enupkg "${WORKDIR}/${NAME}.${NUSPEC_VERSION}.nupkg" |
89 |
+ |
90 |
+ egacinstall "${OUTPUT_DIR}/${DIR}/${GAC_DLL_NAME}.dll" |
91 |
+ |
92 |
+ install_pc_file |
93 |
+} |
94 |
+ |
95 |
+patch_nuspec_file() |
96 |
+{ |
97 |
+ if use nupkg; then |
98 |
+ if use debug; then |
99 |
+ DIR="Debug" |
100 |
+ else |
101 |
+ DIR="Release" |
102 |
+ fi |
103 |
+ FILES_STRING=`cat <<-EOF || die "files at patch_nuspec_file()" |
104 |
+ <files> <!-- https://docs.nuget.org/create/nuspec-reference --> |
105 |
+ <file src="${OUTPUT_DIR}/${DIR}/*.dll" target="lib\net45\" /> |
106 |
+ <file src="${OUTPUT_DIR}/${DIR}/*.mdb" target="lib\net45\" /> |
107 |
+ </files> |
108 |
+ EOF |
109 |
+ ` |
110 |
+ einfo ${FILES_STRING} |
111 |
+ replace "</package>" "${FILES_STRING}</package>" -- $1 || die "replace at patch_nuspec_file()" |
112 |
+ fi |
113 |
+} |
114 |
+ |
115 |
+PC_FILE_NAME=${PN} |
116 |
+ |
117 |
+install_pc_file() |
118 |
+{ |
119 |
+ if use pkg-config; then |
120 |
+ dodir /usr/$(get_libdir)/pkgconfig |
121 |
+ ebegin "Installing ${PC_FILE_NAME}.pc file" |
122 |
+ sed \ |
123 |
+ -e "s:@LIBDIR@:$(get_libdir):" \ |
124 |
+ -e "s:@PACKAGENAME@:${PC_FILE_NAME}:" \ |
125 |
+ -e "s:@DESCRIPTION@:${DESCRIPTION}:" \ |
126 |
+ -e "s:@VERSION@:${PV}:" \ |
127 |
+ -e 's;@LIBS@;-r:${libdir}'"/mono/${PC_FILE_NAME}/${GAC_DLL_NAME}.dll;" \ |
128 |
+ <<\EOF >"${D}/usr/$(get_libdir)/pkgconfig/${PC_FILE_NAME}.pc" || die |
129 |
+prefix=${pcfiledir}/../.. |
130 |
+exec_prefix=${prefix} |
131 |
+libdir=${exec_prefix}/@LIBDIR@ |
132 |
+ |
133 |
+Name: @PACKAGENAME@ |
134 |
+Description: @DESCRIPTION@ |
135 |
+Version: @VERSION@ |
136 |
+Libs: @LIBS@ |
137 |
+EOF |
138 |
+# 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 |
139 |
+# 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) |
140 |
+ |
141 |
+ einfo PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "${PC_FILE_NAME}" |
142 |
+ PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "${PC_FILE_NAME}" || die ".pc file failed to validate." |
143 |
+ eend $? |
144 |
+ fi |
145 |
+} |
146 |
|
147 |
diff --git a/dev-dotnet/cecil/files/niget_icon_64x64.png b/dev-dotnet/cecil/files/niget_icon_64x64.png |
148 |
new file mode 100644 |
149 |
index 0000000..2735bfe |
150 |
Binary files /dev/null and b/dev-dotnet/cecil/files/niget_icon_64x64.png differ |
151 |
|
152 |
diff --git a/dev-dotnet/cecil/metadata.xml b/dev-dotnet/cecil/metadata.xml |
153 |
new file mode 100644 |
154 |
index 0000000..481fc5e |
155 |
--- /dev/null |
156 |
+++ b/dev-dotnet/cecil/metadata.xml |
157 |
@@ -0,0 +1,21 @@ |
158 |
+<?xml version="1.0" encoding="UTF-8"?> |
159 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
160 |
+<pkgmetadata> |
161 |
+ <maintainer type="project"> |
162 |
+ <email>dotnet@g.o</email> |
163 |
+ <description>Gentoo Dotnet Project</description> |
164 |
+ </maintainer> |
165 |
+ <upstream> |
166 |
+ <bugs-to>https://github.com/jbevain/cecil/issues/</bugs-to> |
167 |
+ <remote-id type="github">jbevain/cecil</remote-id> |
168 |
+ </upstream> |
169 |
+ <use> |
170 |
+ <flag name='pkg-config'>create .pc file(s) for .dll(s) installed to gac</flag> |
171 |
+ </use> |
172 |
+ <longdescription lang="en"> |
173 |
+ System.Reflection alternative to generate and inspect .NET executables and libraries (.NET over PE/COFF+) |
174 |
+ </use> |
175 |
+ <longdescription lang="ru"> |
176 |
+ Альтернатива библиотеке System.Reflection для создания и анализа .NET сборок (.NET поверх PE/COFF+) |
177 |
+ </longdescription> |
178 |
+</pkgmetadata> |