commit:     d7b114e26e7177eb1c76ffb4d9ffbfdf5686cdf1
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Sun Nov 13 13:19:06 2016 +0000
Commit:     Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Sun Nov 13 13:19:06 2016 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=d7b114e2

.pc file added

 dev-dotnet/nlog/files/csproj.patch             | 45 ++++++++++++++++++++++++++
 dev-dotnet/nlog/nlog-4.3.11_p2016110901.ebuild | 14 ++++----
 eclass/gac.eclass                              |  3 +-
 3 files changed, 55 insertions(+), 7 deletions(-)

diff --git a/dev-dotnet/nlog/files/csproj.patch 
b/dev-dotnet/nlog/files/csproj.patch
new file mode 100644
index 0000000..f803c86
--- /dev/null
+++ b/dev-dotnet/nlog/files/csproj.patch
@@ -0,0 +1,45 @@
+--- b/src/NLog/NLog.mono.csproj
++++ a/src/NLog/NLog.mono.csproj
+@@ -435,6 +435,17 @@
+     <CodeAnalysisDictionary Include="CustomDictionary.xml" />
+   </ItemGroup>
+   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
++  <Import Project="/usr/lib/mono/4.5/MSBuild.Community.Tasks.Targets" />
++  <Target Name="BeforeBuild">
++    <PropertyGroup Condition=" '$(VersionNumber)' == '' ">
++      <VersionNumber>1.0.0.0</VersionNumber>
++    </PropertyGroup>
++    <AssemblyInfo CodeLanguage="C#"
++      OutputFile="Properties/AssemblyInfo.cs" 
++      AssemblyVersion="$(VersionNumber)" 
++      AssemblyFileVersion="$(VersionNumber)"
++    />
++  </Target>
+   <ItemGroup>
+     <None Include="Logger.tt">
+       <Generator>TextTemplatingFileGenerator</Generator>
+diff -r -u a/src/NLog.Extended/NLog.Extended.mono.csproj 
b/src/NLog.Extended/NLog.Extended.mono.csproj
+--- a/src/NLog.Extended/NLog.Extended.mono.csproj      2016-11-09 
01:54:55.000000000 +0300
++++ b/src/NLog.Extended/NLog.Extended.mono.csproj      2016-11-13 
15:54:01.909919749 +0300
+@@ -71,6 +71,7 @@
+     <CodeAnalysisDictionary Include="CustomDictionary.xml" />
+   </ItemGroup>
+   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
++  <Import Project="/usr/lib/mono/4.5/MSBuild.Community.Tasks.Targets" />
+   <ItemGroup>
+     <ProjectReference Include="..\NLog\NLog.mono.csproj">
+       <Project>{E7AB20BF-6920-442A-B876-CC05BC5CEC79}</Project>
+@@ -81,5 +82,13 @@
+     <ItemGroup Condition="Exists('$(BuildInfoFile)')">
+       <Compile Include="$(BuildInfoFile)" />
+     </ItemGroup>
++    <PropertyGroup Condition=" '$(VersionNumber)' == '' ">
++        <VersionNumber>1.0.0.0</VersionNumber>
++    </PropertyGroup>
++    <AssemblyInfo CodeLanguage="C#"
++      OutputFile="Properties/AssemblyInfo.cs" 
++      AssemblyVersion="$(VersionNumber)" 
++      AssemblyFileVersion="$(VersionNumber)"
++      />
+   </Target>
+ </Project>

diff --git a/dev-dotnet/nlog/nlog-4.3.11_p2016110901.ebuild 
b/dev-dotnet/nlog/nlog-4.3.11_p2016110901.ebuild
index be7e539..b8a561b 100644
--- a/dev-dotnet/nlog/nlog-4.3.11_p2016110901.ebuild
+++ b/dev-dotnet/nlog/nlog-4.3.11_p2016110901.ebuild
@@ -20,10 +20,11 @@ EGIT_COMMIT="71c8b60b25cab4cdb56c58ab042c68502e9dbbb0"
 SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${PN}-${PV}.tar.gz"
 S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
 
-DESCRIPTION=" NLog - Advanced .NET and Silverlight Logging 
http://nlog-project.org";
+DESCRIPTION=" NLog - Advanced .NET and Silverlight Logging"
 LICENSE="BSD" # https://github.com/NLog/NLog/blob/master/LICENSE.txt
 
 COMMON_DEPEND=">=dev-lang/mono-4.0.2.5
+       >=dev-dotnet/msbuildtasks-1.5.0.196
 "
 RDEPEND="${COMMON_DEPEND}
 "
@@ -36,11 +37,13 @@ METAFILETOBUILD="${S}/${FILE_TO_BUILD}"
 COMMIT_DATE_INDEX="$(get_version_component_count ${PV} )"
 COMMIT_DATEANDSEQ="$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )"
 NUSPEC_VERSION=$(get_version_component_range 1-3)"${COMMIT_DATEANDSEQ//p/.}"
+ASSEMBLY_VERSION=$(get_version_component_range 
1-3).$((${COMMIT_DATEANDSEQ//p/} % 65535))
 
 src_prepare() {
        chmod -R +rw "${S}" || die
 
        eapply "${FILESDIR}/NLog.nuspec.patch"
+       eapply "${FILESDIR}/csproj.patch"
 
        cd "${S}"
        mpt-sln --sln-file "${METAFILETOBUILD}" --remove-proj 
"NLog.UnitTests.mono" || die
@@ -49,7 +52,7 @@ src_prepare() {
 }
 
 src_compile() {
-       exbuild "${METAFILETOBUILD}"
+       exbuild_strong /p:VersionNumber=${ASSEMBLY_VERSION} "${METAFILETOBUILD}"
 
        NUSPEC_PROPERTIES="BuildVersion=${NUSPEC_VERSION};platform=Mono*"
        enuspec -Prop ${NUSPEC_PROPERTIES} ./src/NuGet/NLog/NLog.nuspec
@@ -62,10 +65,9 @@ src_install() {
                DIR="Release"
        fi
 
-       if use gac; then
-               egacinstall "${S}/build/bin/${DIR}/Mono 2.x/NLog.dll"
-               egacinstall "${S}/build/bin/${DIR}/Mono 2.x/NLog.Extended.dll"
-       fi
+       egacinstall "${S}/build/bin/${DIR}/Mono 2.x/NLog.dll"
+       egacinstall "${S}/build/bin/${DIR}/Mono 2.x/NLog.Extended.dll"
+       einstall_pc_file ${PN} ${ASSEMBLY_VERSION} NLog NLog.Extended
 
        if use doc; then
 #              doins xml comments file

diff --git a/eclass/gac.eclass b/eclass/gac.eclass
index 2be4356..fef0104 100644
--- a/eclass/gac.eclass
+++ b/eclass/gac.eclass
@@ -92,7 +92,8 @@ einstall_pc_file()
                        shift
                done
 
-               local PC_FILENAME="${PC_NAME}-${PC_VERSION}"
+#              local PC_FILENAME="${PC_NAME}-${PC_VERSION}"
+               local PC_FILENAME="${PN}-${PV}"
                local PC_DIRECTORY="/usr/$(get_libdir)/pkgconfig"
                #local PC_DIRECTORY_DELTA="${CATEGORY}/${PN}"
                local PC_DIRECTORY_VER="${PC_DIRECTORY}/${PC_DIRECTORY_DELTA}"

Reply via email to