[packages/mongodb/DEVEL-4.0-WIP] - WIP on 4.0.x, saving work; x86_64 only?

qboosh qboosh at pld-linux.org
Sun Apr 28 21:08:23 CEST 2019


commit 1e36cdec051e42d1ad0727a539174b3f0aef22c4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Apr 28 21:08:33 2019 +0200

    - WIP on 4.0.x, saving work; x86_64 only?

 mongodb-cflags.patch | 25 +++++++++++++----------
 mongodb.spec         | 57 +++++++++++++++++++++++++++-------------------------
 2 files changed, 44 insertions(+), 38 deletions(-)
---
diff --git a/mongodb.spec b/mongodb.spec
index a383d92..92fcd09 100644
--- a/mongodb.spec
+++ b/mongodb.spec
@@ -7,24 +7,21 @@
 Summary:	MongoDB client shell and tools
 Summary(pl.UTF-8):	Powłoka kliencka i narzędzia dla bazy danych MongoDB
 Name:		mongodb
-Version:	2.2.4
-Release:	9
+Version:	4.0.5
+Release:	1
 License:	AGPL v3
 Group:		Applications/Databases
-Source0:	http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
-# Source0-md5:	033354c543c053f5d539b573ac8c28b0
+#Source0Download: https://www.mongodb.com/download-center/community
+Source0:	https://fastdl.mongodb.org/src/%{name}-src-r%{version}.tar.gz
+# Source0-md5:	091b73764d0d88cfcc91f397efd362e5
 Source1:	%{name}.logrotate
 Source2:	%{name}.init
 Source3:	mongod-default.conf
 Source4:	mongod at .service
 Patch0:		%{name}-cflags.patch
-Patch1:		%{name}-system-libs.patch
-Patch2:		boost-1.50.patch
-Patch3:		%{name}-install.patch
-Patch4:		%{name}-shared.patch
-Patch5:		gcc4.patch
-Patch6:		no-Werror.patch
-Patch7:		gcc6.patch
+Patch1:		%{name}-pld.patch
+#Patch6:		no-Werror.patch
+#Patch7:		gcc6.patch
 URL:		http://www.mongodb.org/
 BuildRequires:	boost-devel >= 1.50
 BuildRequires:	libpcap-devel
@@ -32,11 +29,12 @@ BuildRequires:	libstdc++-devel >= 6:4.0
 %ifarch %{x8664}
 BuildRequires:	libtcmalloc-devel
 %endif
+#BuildRequires:	mozjs45-devel
 BuildRequires:	pcre-cxx-devel
 BuildRequires:	pcre-devel >= 8.30
 BuildRequires:	readline-devel
 BuildRequires:	rpmbuild(macros) >= 1.644
-BuildRequires:	scons >= 1.2
+BuildRequires:	scons >= 2.5
 BuildRequires:	sed >= 4.0
 BuildRequires:	snappy-devel
 BuildRequires:	v8-devel
@@ -150,29 +148,29 @@ konfiguracji oraz skrypty init.d.
 %setup -q -n %{name}-src-r%{version}
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
 
 # Fix permissions
 find -type f -executable | xargs chmod a-x
 
 # force system pcre/js/snappy
-%{__rm} -r src/third_party/{js-1.7,pcre-8.30,snappy,boost}
+%{__rm} -r src/third_party/{asio-master,boost-1.60.0,gperftools-2.5,icu4c-57.1,libstemmer_c,mozjs-45,pcre-8.41,scons-2.5.0,snappy-1.1.3,sqlite-amalgamation-3190300,tomcrypt-1.18.1,valgrind-3.11.0,yaml-cpp-0.5.3,zlib-1.2.11}
 
 %build
+# wiredtiger requires 64-bit platform
 %scons \
-	CPPFLAGS="%{rpmcppflags} -DXP_UNIX" \
-	--use-system-all=yes \
-	--extralib=pcrecpp,pcre,snappy \
+	CCFLAGS="%{rpmcflags}" \
+	CPPDEFINES="%{rpmcppflags}" \
 	--prefix=$RPM_BUILD_ROOT%{_prefix} \
+	--cxx=%{__cxx} \
+	--disable-warnings-as-errors \
+	--extralib=pcrecpp,pcre,snappy \
 	--full=all \
 	--sharedclient \
+	--use-system-all=yes \
 	--usev8 \
-	--cxx=%{__cxx}
+%ifnarch %{x8664}
+	--wiredtiger=off
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -183,14 +181,19 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
 
 # XXX: scons is so great, recompiles everything here!
 %scons install \
-	CPPFLAGS="%{rpmcppflags} -DXP_UNIX" \
-	--use-system-all=yes \
-	--extralib=pcrecpp,pcre,snappy \
+	CCFLAGS="%{rpmcflags}" \
+	CPPDEFINES="%{rpmcppflags}" \
 	--prefix=$RPM_BUILD_ROOT%{_prefix} \
+	--cxx=%{__cxx} \
+	--disable-warnings-as-errors \
+	--extralib=pcrecpp,pcre,snappy \
 	--full=all \
 	--sharedclient \
+	--use-system-all=yes \
 	--usev8 \
-	--cxx=%{__cxx}
+%ifnarch %{x8664}
+	--wiredtiger=off
+%endif
 
 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
diff --git a/mongodb-cflags.patch b/mongodb-cflags.patch
index c58001c..9c514bd 100644
--- a/mongodb-cflags.patch
+++ b/mongodb-cflags.patch
@@ -1,12 +1,15 @@
---- mongodb-src-r2.2.0.orig/SConstruct	2012-08-28 07:28:11.000000000 +0200
-+++ mongodb-src-r2.2.0/SConstruct	2012-09-28 13:17:32.000000000 +0200
-@@ -712,7 +712,8 @@
-         env.Append( CCFLAGS=["-O0", "-fstack-protector"] )
-         env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
-     else:
--        env.Append( CCFLAGS=["-O3"] )
-+        env.Append( CCFLAGS=ARGUMENTS.get("CXXFLAGS", "-O3").split() )
-+        env.Append( CPPDEFINES=ARGUMENTS.get("CPPFLAGS", "").split() )
+--- mongodb-src-r4.0.5/SConstruct.orig	2018-12-31 09:58:59.358465265 +0100
++++ mongodb-src-r4.0.5/SConstruct	2018-12-31 10:36:23.448439637 +0100
+@@ -1820,12 +1820,6 @@
+         env.Append( CCFLAGS=["-fprofile-arcs", "-ftest-coverage"] )
+         env.Append( LINKFLAGS=["-fprofile-arcs", "-ftest-coverage"] )
  
-     if debugLogging:
-         env.Append( CPPDEFINES=["_DEBUG"] );
+-    if optBuild and not optBuildForSize:
+-        env.Append( CCFLAGS=["-O2"] )
+-    elif optBuild and optBuildForSize: 
+-        env.Append( CCFLAGS=["-Os"] )
+-    else:
+-        env.Append( CCFLAGS=["-O0"] )
+ 
+     # Promote linker warnings into errors. We can't yet do this on OS X because its linker considers
+     # noall_load obsolete and warns about it.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mongodb.git/commitdiff/1e36cdec051e42d1ad0727a539174b3f0aef22c4



More information about the pld-cvs-commit mailing list