aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-shells/pash/files/template.csproj8
-rw-r--r--app-shells/pash/pash-0.0_p2016060606.ebuild59
2 files changed, 35 insertions, 32 deletions
diff --git a/app-shells/pash/files/template.csproj b/app-shells/pash/files/template.csproj
index 9c49b91..c6ed1aa 100644
--- a/app-shells/pash/files/template.csproj
+++ b/app-shells/pash/files/template.csproj
@@ -26,8 +26,7 @@
<!-- Reference -->
</ItemGroup>
<ItemGroup>
- <Compile Include="**/*.cs" />
- <Compile Include="AssemblyVersion.cs" />
+ <Compile Include="**/*.cs" Exclude="AssemblyVersion.cs" />
</ItemGroup>
<ItemGroup>
<!-- ProjectReference -->
@@ -39,9 +38,12 @@
<VersionNumber>1.0.0.0</VersionNumber>
</PropertyGroup>
<AssemblyInfo CodeLanguage="C#"
- OutputFile="AssemblyVersion.cs"
+ OutputFile="$(MSBuildThisFileDirectory)/AssemblyVersion.cs"
AssemblyVersion="$(VersionNumber)"
AssemblyFileVersion="$(VersionNumber)"
/>
+ <CreateItem Include="$(MSBuildThisFileDirectory)/AssemblyVersion.cs">
+ <Output TaskParameter="Include" ItemName="Compile"/>
+ </CreateItem>
</Target>
</Project>
diff --git a/app-shells/pash/pash-0.0_p2016060606.ebuild b/app-shells/pash/pash-0.0_p2016060606.ebuild
index 2afadef..dc9136e 100644
--- a/app-shells/pash/pash-0.0_p2016060606.ebuild
+++ b/app-shells/pash/pash-0.0_p2016060606.ebuild
@@ -10,7 +10,7 @@ SLOT="0"
USE_DOTNET="net45"
IUSE="+${USE_DOTNET}"
-inherit msbuild eutils
+inherit dotnet msbuild eutils
DESCRIPTION="An Open Source reimplementation of Windows PowerShell"
@@ -31,13 +31,13 @@ RDEPEND="${CDEPEND}
DEPEND="${CDEPEND}
"
-PROJECT1_PATH=Source/Microsoft.PowerShell.Security
-PROJECT1_NAME=Microsoft.PowerShell.Security
-PROJECT1_OUT=Microsoft.PowerShell.Security
+PROJECT1_PATH=Source/System.Management
+PROJECT1_NAME=System.Management
+PROJECT1_OUT=System.Management
-PROJECT2_PATH=Source/System.Management
-PROJECT2_NAME=System.Management
-PROJECT2_OUT=System.Management
+PROJECT2_PATH=Source/Microsoft.PowerShell.Security
+PROJECT2_NAME=Microsoft.PowerShell.Security
+PROJECT2_OUT=Microsoft.PowerShell.Security
PROJECT3_PATH=Source/Microsoft.PowerShell.Commands.Utility
PROJECT3_NAME=Microsoft.PowerShell.Commands.Utility
@@ -49,7 +49,7 @@ PROJECT4_OUT=Microsoft.PowerShell.Commands.Management
PROJECT5_PATH=Source/PashConsole
PROJECT5_NAME=PashConsole
-PROJECT5_OUT=PashConsole
+PROJECT5_OUT=Pash
src_prepare() {
sed -i "/Version/d" "${S}/${PROJECT1_PATH}/Properties/AssemblyInfo.cs" || die
@@ -57,37 +57,38 @@ src_prepare() {
sed -i "/Version/d" "${S}/${PROJECT3_PATH}/Properties/AssemblyInfo.cs" || die
sed -i "/Version/d" "${S}/${PROJECT4_PATH}/Properties/AssemblyInfo.cs" || die
sed -i "/Version/d" "${S}/${PROJECT5_PATH}/Properties/AssemblyInfo.cs" || die
- cp "${FILESDIR}/template.csproj" "${S}/${PROJECT1_PATH}/${PROJECT1_NAME}.csproj" || die
- cp "${FILESDIR}/template.csproj" "${S}/${PROJECT2_PATH}/${PROJECT2_NAME}.csproj" || die
- sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="Irony" />#' "${S}/${PROJECT2_PATH}/${PROJECT2_NAME}.csproj" || die
- sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="Microsoft.CSharp" />#' "${S}/${PROJECT2_PATH}/${PROJECT2_NAME}.csproj" || die
- sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.Data" />#' "${S}/${PROJECT2_PATH}/${PROJECT2_NAME}.csproj" || die
- sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.Xml" />#' "${S}/${PROJECT2_PATH}/${PROJECT2_NAME}.csproj" || die
- sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.Configuration" />#' "${S}/${PROJECT2_PATH}/${PROJECT2_NAME}.csproj" || die
- cp "${FILESDIR}/template.csproj" "${S}/${PROJECT3_PATH}/${PROJECT3_NAME}.csproj" || die
+ sed "s/\$(OutputType)/Library/; s/\$(AssemblyName)/${PROJECT1_OUT}/" "${FILESDIR}/template.csproj" > "${S}/${PROJECT1_PATH}/${PROJECT1_NAME}.csproj" || die
+ sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="Irony" />#' "${S}/${PROJECT1_PATH}/${PROJECT1_NAME}.csproj" || die
+ sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="Microsoft.CSharp" />#' "${S}/${PROJECT1_PATH}/${PROJECT1_NAME}.csproj" || die
+ sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.Data" />#' "${S}/${PROJECT1_PATH}/${PROJECT1_NAME}.csproj" || die
+ sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.Xml" />#' "${S}/${PROJECT1_PATH}/${PROJECT1_NAME}.csproj" || die
+ sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.Configuration" />#' "${S}/${PROJECT1_PATH}/${PROJECT1_NAME}.csproj" || die
+ sed "s/\$(OutputType)/Library/; s/\$(AssemblyName)/${PROJECT2_OUT}/" "${FILESDIR}/template.csproj" > "${S}/${PROJECT2_PATH}/${PROJECT2_NAME}.csproj" || die
+ sed -i "s#^.*-- ProjectReference --.*\$#&\\n<ProjectReference Include=\"../../${PROJECT1_PATH}/${PROJECT1_NAME}.csproj\" />#" "${S}/${PROJECT2_PATH}/${PROJECT2_NAME}.csproj" || die
+ sed "s/\$(OutputType)/Library/; s/\$(AssemblyName)/${PROJECT3_OUT}/" "${FILESDIR}/template.csproj" > "${S}/${PROJECT3_PATH}/${PROJECT3_NAME}.csproj" || die
sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.Data" />#' "${S}/${PROJECT3_PATH}/${PROJECT3_NAME}.csproj" || die
sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.Xml" />#' "${S}/${PROJECT3_PATH}/${PROJECT3_NAME}.csproj" || die
sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.Net" />#' "${S}/${PROJECT3_PATH}/${PROJECT3_NAME}.csproj" || die
- sed -i 's#^.*-- ProjectReference --.*$#&\n<ProjectReference Include="../${PROJECT1_PATH}/${PROJECT1_NAME}.csproj" />#' "${S}/${PROJECT3_PATH}/${PROJECT3_NAME}.csproj" || die
- cp "${FILESDIR}/template.csproj" "${S}/${PROJECT4_PATH}/${PROJECT4_NAME}.csproj" || die
+ sed -i "s#^.*-- ProjectReference --.*\$#&\\n<ProjectReference Include=\"../../${PROJECT1_PATH}/${PROJECT1_NAME}.csproj\" />#" "${S}/${PROJECT3_PATH}/${PROJECT3_NAME}.csproj" || die
+ sed "s/\$(OutputType)/Library/; s/\$(AssemblyName)/${PROJECT4_OUT}/" "${FILESDIR}/template.csproj" > "${S}/${PROJECT4_PATH}/${PROJECT4_NAME}.csproj" || die
sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.Data" />#' "${S}/${PROJECT4_PATH}/${PROJECT4_NAME}.csproj" || die
sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.Xml" />#' "${S}/${PROJECT4_PATH}/${PROJECT4_NAME}.csproj" || die
sed -i 's#^.*-- Reference --.*$#&\n<Reference Include="System.ServiceProcess" />#' "${S}/${PROJECT4_PATH}/${PROJECT4_NAME}.csproj" || die
- sed -i 's#^.*-- ProjectReference --.*$#&\n<ProjectReference Include="../${PROJECT1_PATH}/${PROJECT1_NAME}.csproj" />#' "${S}/${PROJECT4_PATH}/${PROJECT4_NAME}.csproj" || die
- cp "${FILESDIR}/template.csproj" "${S}/${PROJECT5_PATH}/${PROJECT5_NAME}.csproj" || die
- sed -i 's#^.*-- ProjectReference --.*$#&\n<ProjectReference Include="../${PROJECT1_PATH}/${PROJECT1_NAME}.csproj" />#' "${S}/${PROJECT5_PATH}/${PROJECT5_NAME}.csproj" || die
- sed -i 's#^.*-- ProjectReference --.*$#&\n<ProjectReference Include="../${PROJECT2_PATH}/${PROJECT2_NAME}.csproj" />#' "${S}/${PROJECT5_PATH}/${PROJECT5_NAME}.csproj" || die
- sed -i 's#^.*-- ProjectReference --.*$#&\n<ProjectReference Include="../${PROJECT3_PATH}/${PROJECT3_NAME}.csproj" />#' "${S}/${PROJECT5_PATH}/${PROJECT5_NAME}.csproj" || die
- sed -i 's#^.*-- ProjectReference --.*$#&\n<ProjectReference Include="../${PROJECT4_PATH}/${PROJECT4_NAME}.csproj" />#' "${S}/${PROJECT5_PATH}/${PROJECT5_NAME}.csproj" || die
+ sed -i "s#^.*-- ProjectReference --.*\$#&\\n<ProjectReference Include=\"../../${PROJECT1_PATH}/${PROJECT1_NAME}.csproj\" />#" "${S}/${PROJECT4_PATH}/${PROJECT4_NAME}.csproj" || die
+ sed "s/\$(OutputType)/Exe/; s/\$(AssemblyName)/${PROJECT5_OUT}/" "${FILESDIR}/template.csproj" > "${S}/${PROJECT5_PATH}/${PROJECT5_NAME}.csproj" || die
+ sed -i "s#^.*-- ProjectReference --.*\$#&\\n<ProjectReference Include=\"../../${PROJECT1_PATH}/${PROJECT1_NAME}.csproj\" />#" "${S}/${PROJECT5_PATH}/${PROJECT5_NAME}.csproj" || die
+ sed -i "s#^.*-- ProjectReference --.*\$#&\\n<ProjectReference Include=\"../../${PROJECT2_PATH}/${PROJECT2_NAME}.csproj\" />#" "${S}/${PROJECT5_PATH}/${PROJECT5_NAME}.csproj" || die
+ sed -i "s#^.*-- ProjectReference --.*\$#&\\n<ProjectReference Include=\"../../${PROJECT3_PATH}/${PROJECT3_NAME}.csproj\" />#" "${S}/${PROJECT5_PATH}/${PROJECT5_NAME}.csproj" || die
+ sed -i "s#^.*-- ProjectReference --.*\$#&\\n<ProjectReference Include=\"../../${PROJECT4_PATH}/${PROJECT4_NAME}.csproj\" />#" "${S}/${PROJECT5_PATH}/${PROJECT5_NAME}.csproj" || die
eapply_user
}
src_compile() {
- emsbuild "/p:AssemblyName=${PROJECT1_OUT}" "/p:OutputType=Library" "${S}/${PROJECT1_PATH}/${PROJECT1_NAME}.csproj"
- emsbuild "/p:AssemblyName=${PROJECT1_OUT}" "/p:OutputType=Library" "${S}/${PROJECT1_PATH}/${PROJECT2_NAME}.csproj"
- emsbuild "/p:AssemblyName=${PROJECT1_OUT}" "/p:OutputType=Library" "${S}/${PROJECT1_PATH}/${PROJECT3_NAME}.csproj"
- emsbuild "/p:AssemblyName=${PROJECT1_OUT}" "/p:OutputType=Library" "${S}/${PROJECT1_PATH}/${PROJECT4_NAME}.csproj"
- emsbuild "/p:AssemblyName=${PROJECT1_OUT}" "/p:OutputType=Exe" "${S}/${PROJECT1_PATH}/${PROJECT5_NAME}.csproj"
+ #emsbuild "/p:AssemblyName=${PROJECT1_OUT}" "${S}/${PROJECT1_PATH}/${PROJECT1_NAME}.csproj"
+ #emsbuild "/p:AssemblyName=${PROJECT2_OUT}" "${S}/${PROJECT2_PATH}/${PROJECT2_NAME}.csproj"
+ #emsbuild "/p:AssemblyName=${PROJECT3_OUT}" "${S}/${PROJECT3_PATH}/${PROJECT3_NAME}.csproj"
+ #emsbuild "/p:AssemblyName=${PROJECT4_OUT}" "${S}/${PROJECT4_PATH}/${PROJECT4_NAME}.csproj"
+ emsbuild "/p:VersionNumber=1.0.2016.606" "${S}/${PROJECT5_PATH}/${PROJECT5_NAME}.csproj"
}
src_install() {