pbrobinson pushed to log4net (master). "- Build with mono 4 (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon May 18 12:52:18 UTC 2015
From ddb0d74ea39272266a5aeef705b427efb7db202d Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson at gmail.com>
Date: Mon, 18 May 2015 13:51:36 +0100
Subject: - Build with mono 4 - Use mono_arches - Use xbuild insted nant for
prevent recursive required. Nant need log4net. - Fix uppercase name problem
diff --git a/log4net-1.2.10-mono-2.0.patch b/log4net-1.2.10-mono-2.0.patch
deleted file mode 100644
index 549c9ae..0000000
--- a/log4net-1.2.10-mono-2.0.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -up log4net-1.2.10/log4net.build.mono-2.0 log4net-1.2.10/log4net.build
---- log4net-1.2.10/log4net.build.mono-2.0 2006-03-30 13:19:26.000000000 +0300
-+++ log4net-1.2.10/log4net.build 2011-04-08 12:32:08.000000000 +0300
-@@ -479,6 +479,7 @@ limitations under the License.
- <if test="${not temp.build.skip}">
- <csc keyfile="${path::combine(log4net.basedir, 'log4net.snk')}" nostdlib="false" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.dll" doc="${current.bin.dir}/log4net.xml">
- <nowarn>
-+ <warning number="0419" />
- <!-- workaround for Mono bug #61902 -->
- <warning number="0618" />
- <!-- warning CS1058: A previous catch clause already catches all exceptions. All non-exceptions thrown will be wrapped in a System.Runtime.CompilerServices.RuntimeWrappedException -->
diff --git a/log4net-1.2.13-mono-2.0.patch b/log4net-1.2.13-mono-2.0.patch
deleted file mode 100644
index d8b05b4..0000000
--- a/log4net-1.2.13-mono-2.0.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -up log4net-1.2.13/log4net.build.mono-2.0 log4net-1.2.13/log4net.build
---- log4net-1.2.13/log4net.build.mono-2.0 2014-06-02 13:42:07.022980722 -0400
-+++ log4net-1.2.13/log4net.build 2014-06-02 13:43:05.364645903 -0400
-@@ -984,6 +984,7 @@ limitations under the License.
- </if>
- <csc if="${current.build.config.release}" keyfile="${path::combine(log4net.basedir, 'log4net.snk')}" nostdlib="false" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.dll" doc="${current.bin.dir}/log4net.xml">
- <nowarn>
-+ <warning number="0419" />
- <!-- workaround for Mono bug #61902 -->
- <warning number="0618" />
- </nowarn>
diff --git a/log4net.spec b/log4net.spec
index cbfeecf..808cb71 100644
--- a/log4net.spec
+++ b/log4net.spec
@@ -3,6 +3,12 @@
#
# Please submit bugfixes or comments via http://bugzilla.redhat.com
+%if 0%{?rhel}%{?el6}%{?el7}
+# see https://fedorahosted.org/fpc/ticket/395
+%define _monodir %{_prefix}/lib/mono
+%define _monogacdir %{_monodir}/gac
+%endif
+
Name: log4net
URL: http://logging.apache.org/log4net/
License: ASL 2.0
@@ -10,13 +16,12 @@ Group: System Environment/Libraries
Version: 1.2.13
Release: 4%{?dist}
Summary: A .NET framework for logging
-Source: http://mirror.reverse.net/pub/apache/logging/log4net/source/log4net-1.2.13-src.zip
-Patch0: log4net-1.2.13-mono-2.0.patch
+Source: http://mirror.reverse.net/pub/apache/logging/log4net/source/%{name}-%{version}-src.zip
BuildRequires: mono-data-sqlite
BuildRequires: mono-devel
-BuildRequires: unzip
BuildRequires: nant
+
# Mono only available on these:
ExclusiveArch: %mono_arches
@@ -41,19 +46,28 @@ framework to the .NET runtime
%prep
%setup -q
-%patch0 -p1 -b .mono-2.0
sed -i 's/\r//' NOTICE
sed -i 's/\r//' README.txt
sed -i 's/\r//' LICENSE
# Remove prebuilt dll files
rm -rf bin/
-%build
+mv src/Layout/XMLLayout.cs src/Layout/XmlLayout.cs
+mv src/Layout/XMLLayoutBase.cs src/Layout/XmlLayoutBase.cs
+
+# Fix for mono 4
+find . -name "*.sln" -print -exec sed -i 's/Format Version 10.00/Format Version 11.00/g' {} \;
+find . -name "*.csproj" -print -exec sed -i 's#ToolsVersion="3.5"#ToolsVersion="4.0"#g; s#<TargetFrameworkVersion>.*</TargetFrameworkVersion>##g; s#<PropertyGroup>#<PropertyGroup><TargetFrameworkVersion>v4.5</TargetFrameworkVersion>#g' {} \;
+
# Use system mono.snk key
-rm -rf log4net.snk
-ln -s /etc/pki/mono/mono.snk log4net.snk
+sed -i -e 's!"..\\..\\..\\log4net.snk")]!"/etc/pki/mono/mono.snk")]!' src/AssemblyInfo.cs
+sed -i -e 's!|| SSCLI)!|| SSCLI || MONO)!' src/AssemblyInfo.cs
+
+
+%build
# ASF recommend using nant to build log4net
-nant -buildfile:log4net.build compile-all
+xbuild /property:Configuration=Debug /property:DefineConstants=DEBUG,MONO,STRONG src/log4net.vs2010.csproj
+#nant -buildfile:log4net.build compile-all
%install
# install pkgconfig file
@@ -61,28 +75,30 @@ cat > %{name}.pc <<EOF
Name: log4net
Description: log4net - .Net logging framework
Version: %{version}
-Libs: -r:%{_prefix}/lib/mono/log4net/log4net.dll
+Libs: -r:%{_monodir}/log4net/log4net.dll
EOF
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
cp %{name}.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
-mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/mono/gac/
-echo $PWD
-gacutil -i bin/mono/2.0/release/log4net.dll -f -package log4net -root ${RPM_BUILD_ROOT}/%{_prefix}/lib
+mkdir -p $RPM_BUILD_ROOT/%{_monogacdir}
+#gacutil -i bin/mono/2.0/release/log4net.dll -f -package log4net -root ${RPM_BUILD_ROOT}/%{_prefix}/lib
+gacutil -i build/bin/net/2.0/debug/log4net.dll -f -package log4net -root ${RPM_BUILD_ROOT}/%{_prefix}/lib
%files
-%{_prefix}/lib/mono/gac/log4net
-%{_prefix}/lib/mono/log4net
+%{_monogacdir}/log4net
+%{_monodir}/log4net
%doc LICENSE NOTICE README.txt
%files devel
%{_libdir}/pkgconfig/log4net.pc
-
%changelog
-* Mon May 18 2015 Peter Robinson <pbrobinson at fedoraproject.org> 1.2.13-4
-- Rebuild (mono4)
+* Wed May 13 2015 Claudio Rodrigo Pereyra Diaz <elsupergomez at fedoraproject.org> - 1.2.13-4
+- Build with mono 4
+- Use mono_arches
+- Use xbuild insted nant for prevent recursive required. Nant need log4net.
+- Fix uppercase name problem
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/log4net.git/commit/?h=master&id=ddb0d74ea39272266a5aeef705b427efb7db202d
More information about the scm-commits
mailing list