1 |
commit: edc8534e9687515d654a36b1db4b38c53a4ec5ab |
2 |
Author: ArsenShnurkov <ArsenShnurkov <AT> users <DOT> noreply <DOT> github <DOT> com> |
3 |
AuthorDate: Fri Oct 13 11:26:24 2017 +0000 |
4 |
Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 13 11:26:24 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=edc8534e |
7 |
|
8 |
digest added |
9 |
|
10 |
dev-dotnet/irony-daxnet/files/template.csproj | 47 ++++++++ |
11 |
.../irony-daxnet-1.0.0_p2017083101.ebuild | 130 +++++++++------------ |
12 |
dev-dotnet/irony-daxnet/metadata.xml | 5 +- |
13 |
3 files changed, 101 insertions(+), 81 deletions(-) |
14 |
|
15 |
diff --git a/dev-dotnet/irony-daxnet/files/template.csproj b/dev-dotnet/irony-daxnet/files/template.csproj |
16 |
new file mode 100644 |
17 |
index 0000000..9c49b91 |
18 |
--- /dev/null |
19 |
+++ b/dev-dotnet/irony-daxnet/files/template.csproj |
20 |
@@ -0,0 +1,47 @@ |
21 |
+<?xml version="1.0" encoding="utf-8"?> |
22 |
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
23 |
+ <PropertyGroup> |
24 |
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
25 |
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
26 |
+ <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> |
27 |
+ <AssemblyName>$(AssemblyName)</AssemblyName> |
28 |
+ <OutputType>$(OutputType)</OutputType> |
29 |
+ </PropertyGroup> |
30 |
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
31 |
+ <OutputPath>bin\Debug</OutputPath> |
32 |
+ <DebugSymbols>true</DebugSymbols> |
33 |
+ <DebugType>full</DebugType> |
34 |
+ <Optimize>false</Optimize> |
35 |
+ <DefineConstants>DEBUG</DefineConstants> |
36 |
+ </PropertyGroup> |
37 |
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
38 |
+ <OutputPath>bin\Release</OutputPath> |
39 |
+ <DebugSymbols>true</DebugSymbols> |
40 |
+ <DebugType>pdbonly</DebugType> |
41 |
+ <Optimize>true</Optimize> |
42 |
+ </PropertyGroup> |
43 |
+ <ItemGroup> |
44 |
+ <Reference Include="System" /> |
45 |
+ <Reference Include="System.Core" /> |
46 |
+ <!-- Reference --> |
47 |
+ </ItemGroup> |
48 |
+ <ItemGroup> |
49 |
+ <Compile Include="**/*.cs" /> |
50 |
+ <Compile Include="AssemblyVersion.cs" /> |
51 |
+ </ItemGroup> |
52 |
+ <ItemGroup> |
53 |
+ <!-- ProjectReference --> |
54 |
+ </ItemGroup> |
55 |
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
56 |
+ <Import Project="$(MSBuildExtensionsPath)\MSBuild.Community.Tasks.Targets" /> |
57 |
+ <Target Name="BeforeBuild"> |
58 |
+ <PropertyGroup Condition=" '$(VersionNumber)' == '' "> |
59 |
+ <VersionNumber>1.0.0.0</VersionNumber> |
60 |
+ </PropertyGroup> |
61 |
+ <AssemblyInfo CodeLanguage="C#" |
62 |
+ OutputFile="AssemblyVersion.cs" |
63 |
+ AssemblyVersion="$(VersionNumber)" |
64 |
+ AssemblyFileVersion="$(VersionNumber)" |
65 |
+ /> |
66 |
+ </Target> |
67 |
+</Project> |
68 |
|
69 |
diff --git a/dev-dotnet/irony-daxnet/irony-daxnet-1.0.0_p2017083101.ebuild b/dev-dotnet/irony-daxnet/irony-daxnet-1.0.0_p2017083101.ebuild |
70 |
index b823640..ead9db2 100644 |
71 |
--- a/dev-dotnet/irony-daxnet/irony-daxnet-1.0.0_p2017083101.ebuild |
72 |
+++ b/dev-dotnet/irony-daxnet/irony-daxnet-1.0.0_p2017083101.ebuild |
73 |
@@ -16,102 +16,76 @@ SLOT="0" |
74 |
# gac = install into gac |
75 |
# pkg-config = register in pkg-config database |
76 |
USE_DOTNET="net45" |
77 |
-IUSE="+{USE_DOTNET} debug developer test +nupkg +gac +pkg-config" |
78 |
+inherit msbuild gac |
79 |
+IUSE="+{USE_DOTNET}" |
80 |
|
81 |
+NAME="irony" |
82 |
+HOMEPAGE="https://github.com/daxnet/${NAME}" |
83 |
|
84 |
-inherit versionator vcs-snapshot gac nupkg |
85 |
+EGIT_COMMIT="ed2aa3ed74b53b1655a2b196d34a1bc20d4e6ce1" |
86 |
+SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${PF}.tar.gz |
87 |
+ https://github.com/mono/mono/raw/master/mcs/class/mono.snk" |
88 |
+S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" |
89 |
|
90 |
-NAME=irony |
91 |
-EHG_REVISION=09918247d378a0e3deedae2af563fa5f402530f9 |
92 |
-SRC_URI="http://download-codeplex.sec.s-msft.com/Download/SourceControlFileDownload.ashx?ProjectName=${NAME}&changeSetId=${EHG_REVISION} -> ${PN}-${PV}.zip |
93 |
- mirror://gentoo/mono.snk.bz2" |
94 |
+DESCRIPTION="parsing framework for C# on LALR(1)" |
95 |
+LICENSE="MIT" |
96 |
|
97 |
-# /var/tmp/portage/dev-dotnet/irony-framework-1.0.0_p20131212-r1/work/irony_09918247d378a0e3deedae2af563fa5f402530f9 |
98 |
-S="${WORKDIR}/${NAME}_${EHG_REVISION}" |
99 |
+CDEPEND="|| ( >=dev-lang/mono-5.4.0.167 <dev-lang/mono-9999 ) |
100 |
+ " |
101 |
|
102 |
-METAFILETOBUILD="Irony/010.Irony.2012.csproj" |
103 |
+RDEPEND="${CDEPEND} |
104 |
+ " |
105 |
|
106 |
-src_unpack() |
107 |
-{ |
108 |
- default |
109 |
- # delete untrusted binaries |
110 |
- find "${S}" -iname "*.exe" -print -delete || die |
111 |
- find "${S}" -iname "*.dll" -print -delete || die |
112 |
- # Libraries/FastColoredTextBox/FastColoredTextBox.dll |
113 |
-} |
114 |
+DEPEND="${CDEPEND} |
115 |
+ " |
116 |
|
117 |
-src_prepare() { |
118 |
- default |
119 |
- einfo "patching project files" |
120 |
- eapply "${FILESDIR}/csproj.patch" |
121 |
- if ! use test ; then |
122 |
- einfo "removing unit tests from solution" |
123 |
- fi |
124 |
+PROJECT_PATH="src/Irony" |
125 |
+PROJECT_FILE=Irony |
126 |
+PROJECT_OUT=Irony |
127 |
|
128 |
- cp "${FILESDIR}/${NUSPEC_FILE_NAME}" "${S}/${NUSPEC_FILE_NAME}" || die |
129 |
- epatch_nuspec_file "${S}/${NUSPEC_FILE_NAME}" |
130 |
+KEY2="${DISTDIR}/mono.snk" |
131 |
+ASSEMBLY_VERSION="1.0.2017.0831" |
132 |
+ |
133 |
+function output_filename ( ) { |
134 |
+ local DIR="" |
135 |
+ if use debug; then |
136 |
+ DIR="Debug" |
137 |
+ else |
138 |
+ DIR="Release" |
139 |
+ fi |
140 |
+ echo "${PROJECT_PATH}/bin/${DIR}/${PROJECT_OUT}.dll" |
141 |
} |
142 |
|
143 |
-# PR Package revision, or r0 if no revision exists. |
144 |
-NUSPEC_VERSION=$(get_version_component_range 1-3)"${PR//r/.}" |
145 |
-ICON_URL=https://raw.githubusercontent.com/ArsenShnurkov/dotnet/irony-framework/dev-dotnet/irony-framework/files/irony.png |
146 |
-NUSPEC_FILE_NAME="Irony.nuspec" |
147 |
-NUSPEC_ID="Irony" |
148 |
+src_prepare() { |
149 |
+ cp "${FILESDIR}/template.csproj" "${S}/${PROJECT_PATH}/${PROJECT_FILE}.csproj" || die |
150 |
+ eapply_user |
151 |
+} |
152 |
|
153 |
src_compile() { |
154 |
- exbuild /p:SignAssembly=true "/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}" |
155 |
+ emsbuild /p:SignAssembly=true /p:PublicSign=true "/p:AssemblyOriginatorKeyFile=${KEY2}" "/p:AssemblyName=${PROJECT_OUT}" "/p:ProjectType=Library" "/p:AssemblyVersion=${ASSEMBLY_VERSION}""${S}/${PROJECT_PATH}/${PROJECT_FILE}.csproj" |
156 |
+} |
157 |
|
158 |
- # run nuget_pack |
159 |
- einfo ".nuspec version is ${NUSPEC_VERSION}" |
160 |
- enuspec -Prop "version=${NUSPEC_VERSION};package_iconUrl=${ICON_URL}" "${S}/${NUSPEC_FILE_NAME}" |
161 |
- # /var/tmp/portage/dev-dotnet/irony-framework-1.0.0_p20131212-r1/work/Irony.1.0.0.1.nupkg |
162 |
+src_install() { |
163 |
+ insinto "/gac" |
164 |
+ doins "$(output_filename)" |
165 |
} |
166 |
|
167 |
-epatch_nuspec_file() |
168 |
+pkg_preinst() |
169 |
{ |
170 |
- if use nupkg; then |
171 |
- if use debug; then |
172 |
- DIR="Debug" |
173 |
- FILES_STRING=`sed 's/[\/&]/\\\\&/g' <<-EOF || die "escaping replacement string characters" |
174 |
- <files> <!-- https://docs.nuget.org/create/nuspec-reference --> |
175 |
- <file src="Irony/bin/${DIR}/Irony.dll" target="lib\net45\" /> |
176 |
- <file src="Irony/bin/${DIR}/Irony.dll.mdb" target="lib\net45\" /> |
177 |
- </files> |
178 |
- EOF |
179 |
- ` |
180 |
- else |
181 |
- DIR="Release" |
182 |
- FILES_STRING=`sed 's/[\/&]/\\\\&/g' <<-EOF || die "escaping replacement string characters" |
183 |
- <files> <!-- https://docs.nuget.org/create/nuspec-reference --> |
184 |
- <file src="Irony/bin/${DIR}/Irony.dll" target="lib\net45\" /> |
185 |
- </files> |
186 |
- EOF |
187 |
- ` |
188 |
- fi |
189 |
- sed -i 's/<\/package>/'"${FILES_STRING//$'\n'/\\$'\n'}"'\n&/g' $1 || die "escaping line endings" |
190 |
- fi |
191 |
+ echo mv "${D}/gac/${PROJECT_OUT}.dll" "${T}/${PROJECT_OUT}.dll" |
192 |
+ mv "${D}/gac/${PROJECT_OUT}.dll" "${T}/${PROJECT_OUT}.dll" || die |
193 |
+ echo rm -rf "${D}/gac" |
194 |
+ rm -rf "${D}/gac" || die |
195 |
} |
196 |
|
197 |
-src_install() { |
198 |
- enupkg "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg" |
199 |
- |
200 |
- egacinstall "Irony/bin/${DIR}/Irony.dll" |
201 |
- |
202 |
- einstall_pc_file "${PN}" "1.0" "Irony" |
203 |
+pkg_postinst() |
204 |
+{ |
205 |
+ egacadd "${T}/${PROJECT_OUT}.dll" |
206 |
+ rm "${T}/${PROJECT_OUT}.dll" || die |
207 |
} |
208 |
|
209 |
-LICENSE="MIT" |
210 |
- |
211 |
-COMMON_DEPEND=">=dev-lang/mono-4.0.2.5 |
212 |
-" |
213 |
- |
214 |
-RDEPEND="${COMMON_DEPEND} |
215 |
-" |
216 |
- |
217 |
-DEPEND="${COMMON_DEPEND} |
218 |
- test? ( dev-util/nunit:2[nupkg] ) |
219 |
- virtual/pkgconfig |
220 |
-" |
221 |
+pkg_prerm() |
222 |
+{ |
223 |
+ egacdel "${PROJECT_OUT}, Version=${ASSEMBLY_VERSION}, Culture=neutral, PublicKeyToken=0738eb9f132ed756" |
224 |
+} |
225 |
|
226 |
-HOMEPAGE="https://irony.codeplex.com" |
227 |
-DESCRIPTION="parsing framework for C# on LALR(1)" |
228 |
|
229 |
diff --git a/dev-dotnet/irony-daxnet/metadata.xml b/dev-dotnet/irony-daxnet/metadata.xml |
230 |
index 1b73ac8..6d8a541 100644 |
231 |
--- a/dev-dotnet/irony-daxnet/metadata.xml |
232 |
+++ b/dev-dotnet/irony-daxnet/metadata.xml |
233 |
@@ -14,12 +14,11 @@ |
234 |
<!-- remote-id type="codeplex">irony</remote-id --> |
235 |
</upstream> |
236 |
<use> |
237 |
- <flag name='pkg-config'>create .pc file(s) for .dll(s) installed to gac</flag> |
238 |
</use> |
239 |
<longdescription lang="en"> |
240 |
- parsing framework for C# on LALR(1) |
241 |
+ parsing framework for C# |
242 |
</longdescription> |
243 |
<longdescription lang="ru"> |
244 |
- фреймворк для написания LALR(1) парсеров на C# |
245 |
+ фреймворк для написания парсеров на C# |
246 |
</longdescription> |
247 |
</pkgmetadata> |