commit: edc8534e9687515d654a36b1db4b38c53a4ec5ab Author: ArsenShnurkov <ArsenShnurkov <AT> users <DOT> noreply <DOT> github <DOT> com> AuthorDate: Fri Oct 13 11:26:24 2017 +0000 Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> CommitDate: Fri Oct 13 11:26:24 2017 +0000 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=edc8534e
digest added dev-dotnet/irony-daxnet/files/template.csproj | 47 ++++++++ .../irony-daxnet-1.0.0_p2017083101.ebuild | 130 +++++++++------------ dev-dotnet/irony-daxnet/metadata.xml | 5 +- 3 files changed, 101 insertions(+), 81 deletions(-) diff --git a/dev-dotnet/irony-daxnet/files/template.csproj b/dev-dotnet/irony-daxnet/files/template.csproj new file mode 100644 index 0000000..9c49b91 --- /dev/null +++ b/dev-dotnet/irony-daxnet/files/template.csproj @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> + <AssemblyName>$(AssemblyName)</AssemblyName> + <OutputType>$(OutputType)</OutputType> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>bin\Debug</OutputPath> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <DefineConstants>DEBUG</DefineConstants> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>bin\Release</OutputPath> + <DebugSymbols>true</DebugSymbols> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <!-- Reference --> + </ItemGroup> + <ItemGroup> + <Compile Include="**/*.cs" /> + <Compile Include="AssemblyVersion.cs" /> + </ItemGroup> + <ItemGroup> + <!-- ProjectReference --> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <Import Project="$(MSBuildExtensionsPath)\MSBuild.Community.Tasks.Targets" /> + <Target Name="BeforeBuild"> + <PropertyGroup Condition=" '$(VersionNumber)' == '' "> + <VersionNumber>1.0.0.0</VersionNumber> + </PropertyGroup> + <AssemblyInfo CodeLanguage="C#" + OutputFile="AssemblyVersion.cs" + AssemblyVersion="$(VersionNumber)" + AssemblyFileVersion="$(VersionNumber)" + /> + </Target> +</Project> 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 index b823640..ead9db2 100644 --- a/dev-dotnet/irony-daxnet/irony-daxnet-1.0.0_p2017083101.ebuild +++ b/dev-dotnet/irony-daxnet/irony-daxnet-1.0.0_p2017083101.ebuild @@ -16,102 +16,76 @@ SLOT="0" # gac = install into gac # pkg-config = register in pkg-config database USE_DOTNET="net45" -IUSE="+{USE_DOTNET} debug developer test +nupkg +gac +pkg-config" +inherit msbuild gac +IUSE="+{USE_DOTNET}" +NAME="irony" +HOMEPAGE="https://github.com/daxnet/${NAME}" -inherit versionator vcs-snapshot gac nupkg +EGIT_COMMIT="ed2aa3ed74b53b1655a2b196d34a1bc20d4e6ce1" +SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${PF}.tar.gz + https://github.com/mono/mono/raw/master/mcs/class/mono.snk" +S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" -NAME=irony -EHG_REVISION=09918247d378a0e3deedae2af563fa5f402530f9 -SRC_URI="http://download-codeplex.sec.s-msft.com/Download/SourceControlFileDownload.ashx?ProjectName=${NAME}&changeSetId=${EHG_REVISION} -> ${PN}-${PV}.zip - mirror://gentoo/mono.snk.bz2" +DESCRIPTION="parsing framework for C# on LALR(1)" +LICENSE="MIT" -# /var/tmp/portage/dev-dotnet/irony-framework-1.0.0_p20131212-r1/work/irony_09918247d378a0e3deedae2af563fa5f402530f9 -S="${WORKDIR}/${NAME}_${EHG_REVISION}" +CDEPEND="|| ( >=dev-lang/mono-5.4.0.167 <dev-lang/mono-9999 ) + " -METAFILETOBUILD="Irony/010.Irony.2012.csproj" +RDEPEND="${CDEPEND} + " -src_unpack() -{ - default - # delete untrusted binaries - find "${S}" -iname "*.exe" -print -delete || die - find "${S}" -iname "*.dll" -print -delete || die - # Libraries/FastColoredTextBox/FastColoredTextBox.dll -} +DEPEND="${CDEPEND} + " -src_prepare() { - default - einfo "patching project files" - eapply "${FILESDIR}/csproj.patch" - if ! use test ; then - einfo "removing unit tests from solution" - fi +PROJECT_PATH="src/Irony" +PROJECT_FILE=Irony +PROJECT_OUT=Irony - cp "${FILESDIR}/${NUSPEC_FILE_NAME}" "${S}/${NUSPEC_FILE_NAME}" || die - epatch_nuspec_file "${S}/${NUSPEC_FILE_NAME}" +KEY2="${DISTDIR}/mono.snk" +ASSEMBLY_VERSION="1.0.2017.0831" + +function output_filename ( ) { + local DIR="" + if use debug; then + DIR="Debug" + else + DIR="Release" + fi + echo "${PROJECT_PATH}/bin/${DIR}/${PROJECT_OUT}.dll" } -# PR Package revision, or r0 if no revision exists. -NUSPEC_VERSION=$(get_version_component_range 1-3)"${PR//r/.}" -ICON_URL=https://raw.githubusercontent.com/ArsenShnurkov/dotnet/irony-framework/dev-dotnet/irony-framework/files/irony.png -NUSPEC_FILE_NAME="Irony.nuspec" -NUSPEC_ID="Irony" +src_prepare() { + cp "${FILESDIR}/template.csproj" "${S}/${PROJECT_PATH}/${PROJECT_FILE}.csproj" || die + eapply_user +} src_compile() { - exbuild /p:SignAssembly=true "/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}" + 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" +} - # run nuget_pack - einfo ".nuspec version is ${NUSPEC_VERSION}" - enuspec -Prop "version=${NUSPEC_VERSION};package_iconUrl=${ICON_URL}" "${S}/${NUSPEC_FILE_NAME}" - # /var/tmp/portage/dev-dotnet/irony-framework-1.0.0_p20131212-r1/work/Irony.1.0.0.1.nupkg +src_install() { + insinto "/gac" + doins "$(output_filename)" } -epatch_nuspec_file() +pkg_preinst() { - if use nupkg; then - if use debug; then - DIR="Debug" - FILES_STRING=`sed 's/[\/&]/\\\\&/g' <<-EOF || die "escaping replacement string characters" - <files> <!-- https://docs.nuget.org/create/nuspec-reference --> - <file src="Irony/bin/${DIR}/Irony.dll" target="lib\net45\" /> - <file src="Irony/bin/${DIR}/Irony.dll.mdb" target="lib\net45\" /> - </files> - EOF - ` - else - DIR="Release" - FILES_STRING=`sed 's/[\/&]/\\\\&/g' <<-EOF || die "escaping replacement string characters" - <files> <!-- https://docs.nuget.org/create/nuspec-reference --> - <file src="Irony/bin/${DIR}/Irony.dll" target="lib\net45\" /> - </files> - EOF - ` - fi - sed -i 's/<\/package>/'"${FILES_STRING//$'\n'/\\$'\n'}"'\n&/g' $1 || die "escaping line endings" - fi + echo mv "${D}/gac/${PROJECT_OUT}.dll" "${T}/${PROJECT_OUT}.dll" + mv "${D}/gac/${PROJECT_OUT}.dll" "${T}/${PROJECT_OUT}.dll" || die + echo rm -rf "${D}/gac" + rm -rf "${D}/gac" || die } -src_install() { - enupkg "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg" - - egacinstall "Irony/bin/${DIR}/Irony.dll" - - einstall_pc_file "${PN}" "1.0" "Irony" +pkg_postinst() +{ + egacadd "${T}/${PROJECT_OUT}.dll" + rm "${T}/${PROJECT_OUT}.dll" || die } -LICENSE="MIT" - -COMMON_DEPEND=">=dev-lang/mono-4.0.2.5 -" - -RDEPEND="${COMMON_DEPEND} -" - -DEPEND="${COMMON_DEPEND} - test? ( dev-util/nunit:2[nupkg] ) - virtual/pkgconfig -" +pkg_prerm() +{ + egacdel "${PROJECT_OUT}, Version=${ASSEMBLY_VERSION}, Culture=neutral, PublicKeyToken=0738eb9f132ed756" +} -HOMEPAGE="https://irony.codeplex.com" -DESCRIPTION="parsing framework for C# on LALR(1)" diff --git a/dev-dotnet/irony-daxnet/metadata.xml b/dev-dotnet/irony-daxnet/metadata.xml index 1b73ac8..6d8a541 100644 --- a/dev-dotnet/irony-daxnet/metadata.xml +++ b/dev-dotnet/irony-daxnet/metadata.xml @@ -14,12 +14,11 @@ <!-- remote-id type="codeplex">irony</remote-id --> </upstream> <use> - <flag name='pkg-config'>create .pc file(s) for .dll(s) installed to gac</flag> </use> <longdescription lang="en"> - parsing framework for C# on LALR(1) + parsing framework for C# </longdescription> <longdescription lang="ru"> - фреймворк для написания LALR(1) парсеров на C# + фреймворк для написания парсеров на C# </longdescription> </pkgmetadata>
