Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=1ed2959fdf9f31967efbc141415f729088526991

commit 1ed2959fdf9f31967efbc141415f729088526991
Author: crazy <[email protected]>
Date:   Sun Jun 5 12:32:34 2016 +0200

mongodb-3.2.6-1-x86_64
* fix the build
* compiled with some system libs
* added TODO

diff --git a/source/apps-extra/mongodb/FrugalBuild 
b/source/apps-extra/mongodb/FrugalBuild
index 8d336f6..e6bdc35 100644
--- a/source/apps-extra/mongodb/FrugalBuild
+++ b/source/apps-extra/mongodb/FrugalBuild
@@ -9,20 +9,33 @@ url="http://www.mongodb.org";
up2date="lynx -dump $url/downloads | grep src- -m1 | sed 
's/.*-src-r\(.*\)\.tar.*/\1/'"
groups=('apps-extra')
archs=('i686' 'x86_64')
-depends=('libstdc++')
-makedepends+=('scons')
-source=(http://downloads.mongodb.org/src/mongodb-src-r$pkgver.tar.gz)
-sha1sums=('9619cedfdc3219232639e519a9128cdf4fa7c40c')
+depends=('libstdc++' 'openssl' 'pcre' 'zlib' 'yaml-cpp' 'snappy' 'libboost' 
'libpcap')
+makedepends+=('scons' 'boost')
+source=(http://downloads.mongodb.org/src/mongodb-src-r$pkgver.tar.gz 
boost.patch)
+sha1sums=('9619cedfdc3219232639e519a9128cdf4fa7c40c' \
+          '229f469533249e30e525482a17b69ed355bd2667')
options+=('static')

+## TODO: - some default conf ?
+##       - systemd service ?
+##       - fix C/CXX system flags
+
build()
{
-               ### also is possible to build with system libs but please don't
-               ## since they want the 'exact version' eg: 
--with-system-foo=1.2.3
-               ## and every changes to any system lib will trigger an rebuild 
for this one
+               ### F*** this scons
Fcd $pkgname-src-r$pkgver
-               scons --disable-warnings-as-errors all || Fdie
-               scons --prefix $Fdestdir/usr install || Fdie
+               Fpatchall
+               export SCONSFLAGS="$MAKEFLAGS"
+               OPT="--disable-warnings-as-errors --ssl --use-system-zlib 
--use-system-pcre \
+                               --use-system-yaml --use-system-snappy 
--use-system-boost"
+
+               if [ "$CARCH" == "i686" ]; then
+                       ## 32bit won't compile with this on
+                       OPT+=" --wiredtiger=off"
+               fi
+
+               scons all $OPT || Fdie
+               scons --prefix $Fdestdir/usr $OPT --nostrip install || Fdie
}

# optimization OK
diff --git a/source/apps-extra/mongodb/boost.patch 
b/source/apps-extra/mongodb/boost.patch
new file mode 100644
index 0000000..3567c65
--- /dev/null
+++ b/source/apps-extra/mongodb/boost.patch
@@ -0,0 +1,11 @@
+diff -uprb mongodb-src-r3.2.0.orig/SConstruct mongodb-src-r3.2.0/SConstruct
+--- mongodb-src-r3.2.0.orig/SConstruct 2015-12-02 21:01:34.000000000 +0200
++++ mongodb-src-r3.2.0/SConstruct      2015-12-22 11:18:23.613216445 +0200
+@@ -2245,6 +2245,7 @@ def doConfigure(myenv):
+             # permit more than four parameters.
+             "BOOST_THREAD_DONT_PROVIDE_VARIADIC_THREAD",
+             "BOOST_SYSTEM_NO_DEPRECATED",
++            "BOOST_OPTIONAL_USE_SINGLETON_DEFINITION_OF_NONE",
+         ]
+     )
+
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to