commit:     7d264df43026c84477ef3ff98e930d34e56be814
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Tue Dec 29 16:34:34 2015 +0000
Commit:     Heather Cynede <cynede <AT> gentoo <DOT> org>
CommitDate: Tue Dec 29 16:34:34 2015 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=7d264df4

icon added

 ...ebuild => deveel-math-1.5.66-r201512290.ebuild} |  74 +++++++++++++++++----
 .../deveel-math/files/Deveel.Math.csproj.patch     |  32 +++++++++
 dev-dotnet/deveel-math/files/Deveel.Math.png       | Bin 0 -> 4934 bytes
 dev-dotnet/deveel-math/files/Deveel.Math.sln.patch |  28 ++++++++
 .../deveel-math/files/Deveel.Math.sln.test.patch   |  30 +++++++++
 dev-dotnet/deveel-math/metadata.xml                |  22 ++++++
 6 files changed, 174 insertions(+), 12 deletions(-)

diff --git a/dev-dotnet/deveel-math/deveel-math-1.5.66-r20150728.ebuild 
b/dev-dotnet/deveel-math/deveel-math-1.5.66-r201512290.ebuild
similarity index 52%
rename from dev-dotnet/deveel-math/deveel-math-1.5.66-r20150728.ebuild
rename to dev-dotnet/deveel-math/deveel-math-1.5.66-r201512290.ebuild
index f7fdd10..dc8fd69 100644
--- a/dev-dotnet/deveel-math/deveel-math-1.5.66-r20150728.ebuild
+++ b/dev-dotnet/deveel-math/deveel-math-1.5.66-r201512290.ebuild
@@ -11,7 +11,13 @@ DESCRIPTION="A library for handling big numbers and decimals 
under Mono/.NET fra
 LICENSE="Apache-2.0"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="net45 +gac +nupkg +pkg-config debug developer"
+# debug = debug configuration (symbols and defines for debugging)
+# developer = generate symbols information (to view line numbers in stack 
traces, either in debug or release configuration)
+# test = allow NUnit tests to run
+# nupkg = create .nupkg file from .nuspec
+# gac = install into gac
+# pkg-config = register in pkg-config database
+IUSE="net45 debug developer test +nupkg +gac +pkg-config"
 USE_DOTNET="net45"
 
 COMMON_DEPEND=">=dev-lang/mono-4.0.2.5
@@ -21,34 +27,40 @@ RDEPEND="${COMMON_DEPEND}
 "
 
 DEPEND="${COMMON_DEPEND}
+       test? ( dev-dotnet/nunit:2[nupkg] )
        virtual/pkgconfig
 "
 
 NAME="deveel-math"
 REPOSITORY_NAME="ArsenShnurkov/${NAME}"
 REPOSITORY_URL="https://github.com/${REPOSITORY_NAME}";
+EGIT_BRANCH="portage-packaging"
+EGIT_COMMIT="4635fb321ac931d0b381547d06ca6625a57ea343"
 
 # PV   Package version (excluding revision, if any), for example 6.3
 # PF   Full package name, ${PN}-${PVR}, for example vim-6.3-r1
-SRC_URI="${REPOSITORY_URL}/archive/dmath-${PV}.tar.gz -> ${PF}.tar.gz
+#SRC_URI="${REPOSITORY_URL}/archive/dmath-${PV}.tar.gz -> ${PF}.tar.gz
+SRC_URI="${REPOSITORY_URL}/archive/${EGIT_BRANCH}/${EGIT_COMMIT}.zip -> 
${PF}.zip
        mirror://gentoo/mono.snk.bz2"
-S="${WORKDIR}/dmath-${PV}"
+#S="${WORKDIR}/dmath-${PV}"
+S="${WORKDIR}/${NAME}-${EGIT_BRANCH}"
 
 METAFILETOBUILD=src/Deveel.Math.sln
 
-NUSPEC_FILE_NAME=nuget/dmath.tmpl.nuspec
+#NUSPEC_FILE_NAME=nuget/dmath.tmpl.nuspec
+NUSPEC_FILE_NAME=nuget/dmath.noplatform.tmpl.nuspec
 
 # PVR  Package version and revision (if any), for example 6.3, 6.3-r1
 # for 4-parts version this will not work properly:
 #NUSPEC_VERSION="${PVR//-r/.}"
 # that is why we use "inherit versionator"
 #if revision matches the tag exactly, we can omit revision:
-NUSPEC_VERSION=$(get_version_component_range 1-3)
+#NUSPEC_VERSION=$(get_version_component_range 1-3)
 # The same version of package can be build from later commits, then we append 
revision:
 # PR   Package revision, or r0 if no revision exists.
-#NUSPEC_VERSION=$(get_version_component_range 1-3)"${PR//r/.}"
+NUSPEC_VERSION=$(get_version_component_range 1-3)"${PR//r/.}"
 
-ICON_URL="https://raw.githubusercontent.com/${REPOSITORY_NAME}/master/nuget/deveel-math.svg";
+ICON_URL="https://raw.githubusercontent.com/ArsenShnurkov/dotnet/master/dev-dotnet/deveel-math/files/Deveel.Math.png";
 
 # rm -rf /var/tmp/portage/dev-dotnet/deveel-math-*
 # emerge =deveel-math-1.5.66-r201507280
@@ -57,39 +69,77 @@ 
ICON_URL="https://raw.githubusercontent.com/${REPOSITORY_NAME}/master/nuget/deve
 src_unpack()
 {
        default
-       rm nuget/NuGet.exe || die
+       rm ${S}/src/.nuget/NuGet.exe || die
 }
 
 src_prepare() {
+       # 
/var/tmp/portage/dev-dotnet/deveel-math-1.5.66-r201512290/work/deveel-math-portage-packaging
        einfo "patching project files"
+       epatch "${FILESDIR}/Deveel.Math.csproj.patch"
        epatch "${FILESDIR}/Deveel.Math.sln.patch"
+       if ! use test ; then
+               epatch "${FILESDIR}/Deveel.Math.sln.test.patch"
+       fi
 
        einfo "restoring packages (NUnit)"
        enuget_restore "${METAFILETOBUILD}"
+
+       patch_nuspec_file "${S}/${NUSPEC_FILE_NAME}"
 }
 
 src_configure() {
        :;
 }
 
-PLATFORM="mono4"
+#PLATFORM="mono4"
 
 src_compile() {
        exbuild /p:SignAssembly=true 
"/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}"
 
        # run nuget_pack
        einfo "setting .nupkg version to ${NUSPEC_VERSION}"
-       enuspec -Prop 
"platform=${PLATFORM};version=${NUSPEC_VERSION};package_iconUrl=${ICON_URL}" 
"${S}/${NUSPEC_FILE_NAME}"
+       enuspec -Prop "version=${NUSPEC_VERSION};package_iconUrl=${ICON_URL}" 
"${S}/${NUSPEC_FILE_NAME}"
+}
+
+src_test() {
+       default
 }
 
 src_install() {
-       enupkg "${WORKDIR}/dmath-${PLATFORM}.${NUSPEC_VERSION}.nupkg"
+       enupkg "${WORKDIR}/dmath.${NUSPEC_VERSION}.nupkg"
 
-       egacinstall "src/Deveel.Math/bin/${DIR}/Deveel.Math.dll"
+       egacinstall "src/Deveel.Math/bin/AnyCPU/${DIR}/Deveel.Math.dll"
 
        install_pc_file
 }
 
+patch_nuspec_file()
+{
+       if use nupkg; then
+               if use debug; then
+                       DIR="Debug"
+FILES_STRING=`cat <<-EOF || die "${DIR} files at patch_nuspec_file()"
+       <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
+               <file src="src/Deveel.Math/bin/AnyCPU/${DIR}/Deveel.Math.dll" 
target="lib\net45\" />
+               <file 
src="src/Deveel.Math/bin/AnyCPU/${DIR}/Deveel.Math.dll.mdb" target="lib\net45\" 
/>
+       </files>
+EOF
+`
+       else
+               DIR="Release"
+FILES_STRING=`cat <<-EOF || die "${DIR} files at patch_nuspec_file()"
+       <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
+               <file src="src/Deveel.Math/bin/AnyCPU/${DIR}/Deveel.Math.dll" 
target="lib\net45\" />
+       </files>
+EOF
+`
+               fi
+
+               einfo ${FILES_STRING}
+               replace "</package>" "${FILES_STRING}</package>" -- $1 || die 
"replace at patch_nuspec_file()"
+       fi
+}
+
 PC_FILE_NAME=${PN}
 
 install_pc_file()

diff --git a/dev-dotnet/deveel-math/files/Deveel.Math.csproj.patch 
b/dev-dotnet/deveel-math/files/Deveel.Math.csproj.patch
new file mode 100644
index 0000000..eaaf457
--- /dev/null
+++ b/dev-dotnet/deveel-math/files/Deveel.Math.csproj.patch
@@ -0,0 +1,32 @@
+--- a/src/Deveel.Math/Deveel.Math.csproj
++++ b/src/Deveel.Math/Deveel.Math.csproj
+@@ -1,10 +1,8 @@
+ <?xml version="1.0" encoding="utf-8"?>
+-<Project ToolsVersion="12.0" DefaultTargets="Build" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
++<Project ToolsVersion="4.0" DefaultTargets="Build" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+   <PropertyGroup>
+     <Configuration Condition=" '$(Configuration)' == '' 
">Debug</Configuration>
+     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+-    <ProductVersion>9.0.30729</ProductVersion>
+-    <SchemaVersion>2.0</SchemaVersion>
+     <ProjectGuid>{DAB16486-ED07-4D2D-8E09-DB259C583F02}</ProjectGuid>
+     <OutputType>Library</OutputType>
+     <AppDesignerFolder>Properties</AppDesignerFolder>
+@@ -209,15 +220,11 @@
+     <MonoDevelop>
+       <Properties>
+         <Policies>
+-          <StandardHeader inheritsSet="Apache2License" />
++          <StandardHeader Text="&#xA; Copyright ${Year}  
${CopyrightHolder}&#xA;&#xA;   Licensed under the Apache License, Version 2.0 
(the &quot;License&quot;);&#xA;   you may not use this file except in 
compliance with the License.&#xA;   You may obtain a copy of the License 
at&#xA;&#xA;       http://www.apache.org/licenses/LICENSE-2.0&#xA;&#xA;   
Unless required by applicable law or agreed to in writing, software&#xA;   
distributed under the License is distributed on an &quot;AS IS&quot; 
BASIS,&#xA;   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.&#xA;   See the License for the specific language governing permissions 
and&#xA;   limitations under the License." IncludeInNewFiles="True" />
+           <ChangeLogPolicy inheritsSet="Mono" />
+         </Policies>
+       </Properties>
+     </MonoDevelop>
+     <VisualStudio />
+   </ProjectExtensions>
+-  <PropertyGroup>
+-    <PostBuildEvent>IF NOT EXIST "$(SolutionDir)..\dist\$(PlatformName)" 
MKDIR "$(SolutionDir)..\dist\$(PlatformName)"
+-COPY "$(TargetDir)" "$(SolutionDir)..\dist\$(PlatformName)"</PostBuildEvent>
+-  </PropertyGroup>
+ </Project>
+\ No newline at end of file

diff --git a/dev-dotnet/deveel-math/files/Deveel.Math.png 
b/dev-dotnet/deveel-math/files/Deveel.Math.png
new file mode 100644
index 0000000..ab27695
Binary files /dev/null and b/dev-dotnet/deveel-math/files/Deveel.Math.png differ

diff --git a/dev-dotnet/deveel-math/files/Deveel.Math.sln.patch 
b/dev-dotnet/deveel-math/files/Deveel.Math.sln.patch
new file mode 100644
index 0000000..229a34c
--- /dev/null
+++ b/dev-dotnet/deveel-math/files/Deveel.Math.sln.patch
@@ -0,0 +1,28 @@
+--- a/src/Deveel.Math.sln
++++ b/src/Deveel.Math.sln
+@@ -14,8 +14,6 @@ Global
+ EndProject
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Deveel.Math.NUnit", 
"Deveel.Math.NUnit\Deveel.Math.NUnit.csproj", 
"{473247F5-FDF7-41D2-96DC-B550903227F0}"
+ EndProject
+-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Deveel.Math.Portable", 
"Deveel.Math\Deveel.Math.Portable.csproj", 
"{A70E4F11-A520-4145-8D8E-3743B3A3BC3B}"
+-EndProject
+ Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Any CPU = Debug|Any CPU
+@@ -50,16 +48,6 @@
+               {473247F5-FDF7-41D2-96DC-B550903227F0}.Release|x64.Build.0 = 
Release|x64
+               {473247F5-FDF7-41D2-96DC-B550903227F0}.Release|x86.ActiveCfg = 
Release|x86
+               {473247F5-FDF7-41D2-96DC-B550903227F0}.Release|x86.Build.0 = 
Release|x86
+-              {A70E4F11-A520-4145-8D8E-3743B3A3BC3B}.Debug|Any CPU.ActiveCfg 
= Debug|Any CPU
+-              {A70E4F11-A520-4145-8D8E-3743B3A3BC3B}.Debug|Any CPU.Build.0 = 
Debug|Any CPU
+-              {A70E4F11-A520-4145-8D8E-3743B3A3BC3B}.Debug|x64.ActiveCfg = 
Debug|Any CPU
+-              {A70E4F11-A520-4145-8D8E-3743B3A3BC3B}.Debug|x86.ActiveCfg = 
Debug|Any CPU
+-              {A70E4F11-A520-4145-8D8E-3743B3A3BC3B}.Debug|x86.Build.0 = 
Debug|Any CPU
+-              {A70E4F11-A520-4145-8D8E-3743B3A3BC3B}.Release|Any 
CPU.ActiveCfg = Release|Any CPU
+-              {A70E4F11-A520-4145-8D8E-3743B3A3BC3B}.Release|Any CPU.Build.0 
= Release|Any CPU
+-              {A70E4F11-A520-4145-8D8E-3743B3A3BC3B}.Release|x64.ActiveCfg = 
Release|x64
+-              {A70E4F11-A520-4145-8D8E-3743B3A3BC3B}.Release|x64.Build.0 = 
Release|x64
+-              {A70E4F11-A520-4145-8D8E-3743B3A3BC3B}.Release|x86.ActiveCfg = 
Release|x86
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE

diff --git a/dev-dotnet/deveel-math/files/Deveel.Math.sln.test.patch 
b/dev-dotnet/deveel-math/files/Deveel.Math.sln.test.patch
new file mode 100644
index 0000000..d82b6da
--- /dev/null
+++ b/dev-dotnet/deveel-math/files/Deveel.Math.sln.test.patch
@@ -0,0 +1,30 @@
+--- a/src/Deveel.Math.sln
++++ b/src/Deveel.Math.sln
+@@ -4,8 +4,6 @@
+ MinimumVisualStudioVersion = 10.0.40219.1
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Deveel.Math", 
"Deveel.Math\Deveel.Math.csproj", "{DAB16486-ED07-4D2D-8E09-DB259C583F02}"
+ EndProject
+-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Deveel.Math.NUnit", 
"Deveel.Math.NUnit\Deveel.Math.NUnit.csproj", 
"{473247F5-FDF7-41D2-96DC-B550903227F0}"
+-EndProject
+ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", 
"{83B688C3-528C-4BA3-A9AD-8A3D62B1D3AB}"
+       ProjectSection(SolutionItems) = preProject
+               .nuget\NuGet.Config = .nuget\NuGet.Config
+@@ -36,18 +34,6 @@ Global
+               {DAB16486-ED07-4D2D-8E09-DB259C583F02}.Release|x64.Build.0 = 
Release|x64
+               {DAB16486-ED07-4D2D-8E09-DB259C583F02}.Release|x86.ActiveCfg = 
Release|x86
+               {DAB16486-ED07-4D2D-8E09-DB259C583F02}.Release|x86.Build.0 = 
Release|x86
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Debug|Any CPU.ActiveCfg 
= Debug|Any CPU
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Debug|Any CPU.Build.0 = 
Debug|Any CPU
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Debug|x64.ActiveCfg = 
Debug|Any CPU
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Debug|x64.Build.0 = 
Debug|Any CPU
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Debug|x86.ActiveCfg = 
Debug|Any CPU
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Debug|x86.Build.0 = 
Debug|Any CPU
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Release|Any 
CPU.ActiveCfg = Release|Any CPU
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Release|Any CPU.Build.0 
= Release|Any CPU
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Release|x64.ActiveCfg = 
Release|x64
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Release|x64.Build.0 = 
Release|x64
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Release|x86.ActiveCfg = 
Release|x86
+-              {473247F5-FDF7-41D2-96DC-B550903227F0}.Release|x86.Build.0 = 
Release|x86
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE

diff --git a/dev-dotnet/deveel-math/metadata.xml 
b/dev-dotnet/deveel-math/metadata.xml
new file mode 100644
index 0000000..2dff91f
--- /dev/null
+++ b/dev-dotnet/deveel-math/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <herd>dotnet</herd>
+       <maintainer> <!-- https://wiki.gentoo.org/wiki/User:Cynede -->
+               <email>[email protected]</email>
+               <name>Heather Cynede</name>
+       </maintainer>
+       <upstream>
+               <bugs-to>https://github.com/deveel/deveel-math/issues/</bugs-to>
+               <remote-id type="github">deveel/deveel-math</remote-id>
+       </upstream>
+       <use>
+               <flag name='pkg-config'>create .pc file(s) for .dll(s) 
installed to gac</flag>
+       </use>
+       <longdescription lang="en">Deveel Math is the port to .NET/Mono of the 
Apache Harmony Math component, that is used to handle operations on big numbers 
in a fast and secure way.
+
+       This package supports all the processor architectures (Any 
CPU).</longdescription>
+       <longdescription lang="ru">
+                .NET-версия библиотека Apache Harmony Math. Содержит класс 
BigNumeric в дополнение к BigInteger. Может быть использована на платформа v 
&lt; 4 (AnuCPU)
+        </longdescription>
+</pkgmetadata>

Reply via email to