1 |
commit: e4e1b08e357416e2598af152c86bf0dce54b59b2 |
2 |
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Feb 27 16:57:08 2016 +0000 |
4 |
Commit: Heather Cynede <cynede <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 27 16:57:08 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=e4e1b08e |
7 |
|
8 |
compiled for three versions of framework |
9 |
|
10 |
dev-dotnet/cecil/cecil-0.9.6_p20160209.ebuild | 78 ++++++++++++++++----------- |
11 |
dev-dotnet/cecil/files/nuspec.patch | 34 ++++++++++++ |
12 |
dev-dotnet/cecil/metadata.xml | 4 +- |
13 |
3 files changed, 84 insertions(+), 32 deletions(-) |
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 |
index 7726e0f..5ef6253 100644 |
17 |
--- a/dev-dotnet/cecil/cecil-0.9.6_p20160209.ebuild |
18 |
+++ b/dev-dotnet/cecil/cecil-0.9.6_p20160209.ebuild |
19 |
@@ -13,8 +13,8 @@ DESCRIPTION="System.Reflection alternative to generate and inspect .NET executab |
20 |
LICENSE="MIT" |
21 |
SLOT="0" |
22 |
KEYWORDS="~amd64 ~x86" |
23 |
-IUSE="net45 +gac +nupkg +pkg-config debug developer" |
24 |
-USE_DOTNET="net45" |
25 |
+USE_DOTNET="net35 net40 net45" |
26 |
+IUSE="net35 net40 net45 +gac +nupkg +pkg-config debug developer" |
27 |
|
28 |
COMMON_DEPEND=">=dev-lang/mono-4.0.2.5 |
29 |
" |
30 |
@@ -41,16 +41,18 @@ S="${WORKDIR}/${NAME}-${EGIT_BRANCH}" |
31 |
|
32 |
METAFILETOBUILD="./Mono.Cecil.sln" |
33 |
|
34 |
-OUTPUT_DIR=Mono.Cecil/bin |
35 |
-GAC_DLL_NAME=mono.cecil |
36 |
+GAC_DLL_NAME=Mono.Cecil |
37 |
|
38 |
+NUSPEC_ID="Mono.Cecil" |
39 |
NUSPEC_FILE="${S}/Mono.Cecil.nuspec" |
40 |
-NUSPEC_VERSION="${PVR//-r/.}" |
41 |
+NUSPEC_VERSION="${PV//_p/.}" |
42 |
|
43 |
src_prepare() { |
44 |
enuget_restore "${METAFILETOBUILD}" |
45 |
|
46 |
- patch_nuspec_file ${NUSPEC_FILE} |
47 |
+ eapply "${FILESDIR}/nuspec.patch" |
48 |
+ |
49 |
+ eapply_user |
50 |
} |
51 |
|
52 |
src_configure() { |
53 |
@@ -58,40 +60,56 @@ src_configure() { |
54 |
} |
55 |
|
56 |
src_compile() { |
57 |
- exbuild /p:SignAssembly=true "/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}" |
58 |
+ if [[ -z ${TOOLS_VERSION} ]]; then |
59 |
+ TOOLS_VERSION=4.0 |
60 |
+ fi |
61 |
+ PARAMETERS=" /tv:${TOOLS_VERSION}" |
62 |
+ if use developer; then |
63 |
+ SARGS=/p:DebugSymbols=True |
64 |
+ else |
65 |
+ SARGS=/p:DebugSymbols=False |
66 |
+ fi |
67 |
+ PARAMETERS+=" ${SARGS}" |
68 |
+ PARAMETERS+=" /p:SignAssembly=true" |
69 |
+ PARAMETERS+=" /p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" |
70 |
+ PARAMETERS+=" /v:detailed" |
71 |
+ |
72 |
+ |
73 |
+ for x in ${USE_DOTNET} ; do |
74 |
+ FW_UPPER=${x:3:1} |
75 |
+ FW_LOWER=${x:4:1} |
76 |
+ PARAMETERS_2=" /p:TargetFrameworkVersion=v${FW_UPPER}.${FW_LOWER}" |
77 |
+ if use debug; then |
78 |
+ CARGS=/p:Configuration=net_${FW_UPPER}_${FW_LOWER}_Debug |
79 |
+ else |
80 |
+ CARGS=/p:Configuration=net_${FW_UPPER}_${FW_LOWER}_Release |
81 |
+ fi |
82 |
+ PARAMETERS_2+=" ${CARGS}" |
83 |
+ exbuild_raw ${PARAMETERS} ${PARAMETERS_2} "${METAFILETOBUILD}" |
84 |
+ done |
85 |
|
86 |
# run nuget_pack |
87 |
- enuspec -Prop version=${NUSPEC_VERSION} ${NUSPEC_FILE} |
88 |
+ enuspec -Prop "id=${NUSPEC_ID};version=${NUSPEC_VERSION}" ${NUSPEC_FILE} |
89 |
} |
90 |
|
91 |
src_install() { |
92 |
- enupkg "${WORKDIR}/${NAME}.${NUSPEC_VERSION}.nupkg" |
93 |
+ enupkg "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg" |
94 |
+ |
95 |
+ if use debug; then |
96 |
+ DIR=Debug |
97 |
+ else |
98 |
+ DIR=Release |
99 |
+ fi |
100 |
|
101 |
- egacinstall "${OUTPUT_DIR}/${DIR}/${GAC_DLL_NAME}.dll" |
102 |
+ for x in ${USE_DOTNET} ; do |
103 |
+ FW_UPPER=${x:3:1} |
104 |
+ FW_LOWER=${x:4:1} |
105 |
+ egacinstall "bin/net_${FW_UPPER}_${FW_LOWER}_${DIR}/${GAC_DLL_NAME}.dll" |
106 |
+ done |
107 |
|
108 |
install_pc_file |
109 |
} |
110 |
|
111 |
-patch_nuspec_file() |
112 |
-{ |
113 |
- if use nupkg; then |
114 |
- if use debug; then |
115 |
- DIR="Debug" |
116 |
- else |
117 |
- DIR="Release" |
118 |
- fi |
119 |
- FILES_STRING=`cat <<-EOF || die "files at patch_nuspec_file()" |
120 |
- <files> <!-- https://docs.nuget.org/create/nuspec-reference --> |
121 |
- <file src="${OUTPUT_DIR}/${DIR}/*.dll" target="lib\net45\" /> |
122 |
- <file src="${OUTPUT_DIR}/${DIR}/*.mdb" target="lib\net45\" /> |
123 |
- </files> |
124 |
- EOF |
125 |
- ` |
126 |
- einfo ${FILES_STRING} |
127 |
- replace "</package>" "${FILES_STRING}</package>" -- $1 || die "replace at patch_nuspec_file()" |
128 |
- fi |
129 |
-} |
130 |
- |
131 |
PC_FILE_NAME=${PN} |
132 |
|
133 |
install_pc_file() |
134 |
|
135 |
diff --git a/dev-dotnet/cecil/files/nuspec.patch b/dev-dotnet/cecil/files/nuspec.patch |
136 |
new file mode 100644 |
137 |
index 0000000..39ce752 |
138 |
--- /dev/null |
139 |
+++ b/dev-dotnet/cecil/files/nuspec.patch |
140 |
@@ -0,0 +1,34 @@ |
141 |
+diff --git a/Mono.Cecil.nuspec b/Mono.Cecil.nuspec |
142 |
+index e01234e..f7c2372 100644 |
143 |
+--- a/Mono.Cecil.nuspec |
144 |
++++ b/Mono.Cecil.nuspec |
145 |
+@@ -1,23 +1,23 @@ |
146 |
+ <?xml version="1.0"?> |
147 |
+ <package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
148 |
+ <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> |
149 |
+- <id>Mono.Cecil</id> |
150 |
+- <version>0.9.6.0</version> |
151 |
++ <id>$id$</id> |
152 |
++ <version>$version$</version> |
153 |
+ <title>Mono.Cecil</title> |
154 |
+ <authors>Jb Evain</authors> |
155 |
+ <owners>Jb Evain</owners> |
156 |
+ <licenseUrl>http://opensource.org/licenses/mit-license.php</licenseUrl> |
157 |
+ <requireLicenseAcceptance>false</requireLicenseAcceptance> |
158 |
+ <projectUrl>http://github.com/jbevain/cecil/</projectUrl> |
159 |
++ <iconUrl>file:///var/lib/layman/dotnet/dev-dotnet/cecil/files/niget_icon_64x64.png</iconUrl> |
160 |
+ <summary>Cecil is a library written by Jb Evain to generate and inspect programs and libraries in the ECMA CIL format.</summary> |
161 |
+ <description>Cecil is a library written by Jb Evain to generate and inspect programs and libraries in the ECMA CIL format. It has full support for generics, and support some debugging symbol format. In simple English, with Cecil, you can load existing managed assemblies, browse all the contained types, modify them on the fly and save back to the disk the modified assembly.</description> |
162 |
+ <language>en-US</language> |
163 |
+ <tags>assembly assemblies module modules il cil msil bytecode reflection injection cecil mono aop</tags> |
164 |
+ </metadata> |
165 |
+ <files> |
166 |
+- <file src="bin\net_3_5_Release\*.dll" target="lib/net35" /> |
167 |
+- <file src="bin\net_4_0_Release\*.dll" target="lib/net40" /> |
168 |
+- <file src="bin\net_4_5_Release\*.dll" target="lib/net45" /> |
169 |
+- <file src="bin\pcl_Release\*.dll" target="lib/portable-net40+sl5+win8+wp8+wpa" /> |
170 |
++ <file src="bin/net_3_5_$configuration$/*.dll" target="lib/net35" /> |
171 |
++ <file src="bin/net_4_0_$configuration$/*.dll" target="lib/net40" /> |
172 |
++ <file src="bin/net_4_5_$configuration$/*.dll" target="lib/net45" /> |
173 |
+ </files> |
174 |
+ </package> |
175 |
|
176 |
diff --git a/dev-dotnet/cecil/metadata.xml b/dev-dotnet/cecil/metadata.xml |
177 |
index 481fc5e..c006382 100644 |
178 |
--- a/dev-dotnet/cecil/metadata.xml |
179 |
+++ b/dev-dotnet/cecil/metadata.xml |
180 |
@@ -14,8 +14,8 @@ |
181 |
</use> |
182 |
<longdescription lang="en"> |
183 |
System.Reflection alternative to generate and inspect .NET executables and libraries (.NET over PE/COFF+) |
184 |
- </use> |
185 |
+ </longdescription> |
186 |
<longdescription lang="ru"> |
187 |
Альтернатива библиотеке System.Reflection для создания и анализа .NET сборок (.NET поверх PE/COFF+) |
188 |
- </longdescription> |
189 |
+ </longdescription> |
190 |
</pkgmetadata> |