[mongodb] Add pkg-config enablement patch
Nathaniel McCallum
npmccallum at fedoraproject.org
Mon Jan 16 19:00:57 UTC 2012
commit ba23d6bc6eeb382c0edb2665347af182c709bbf0
Author: Nathaniel McCallum <nathaniel at themccallums.org>
Date: Mon Jan 16 14:00:53 2012 -0500
Add pkg-config enablement patch
mongodb-sm-pkgconfig.patch | 19 +++++++++++++++++++
mongodb.spec | 7 ++++++-
2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/mongodb-sm-pkgconfig.patch b/mongodb-sm-pkgconfig.patch
new file mode 100644
index 0000000..be5fdf3
--- /dev/null
+++ b/mongodb-sm-pkgconfig.patch
@@ -0,0 +1,19 @@
+diff --git a/src/third_party/sm.py b/src/third_party/sm.py
+index 19a4dcb..f7608ed 100644
+--- a/src/third_party/sm.py
++++ b/src/third_party/sm.py
+@@ -111,4 +111,14 @@ def configureSystem( env , fileLists , options ):
+
+ configureBasics( env , fileLists , options )
+
++ # Try to use pkg-config to get our cflags and libs
++ cflags = os.popen("pkg-config --cflags libjs").read().split()
++ libs = os.popen("pkg-config --libs libjs").read().split()
++ libs = filter(lambda x: x.startswith("-l"), libs)
++ libs = map(lambda x: x[2:], libs)
++ if cflags or libs:
++ env.Append( CFLAGS=cflags )
++ env.Append( LIBS=libs )
++ return
++
+ env.Append( LIBS=[ "js" ] )
diff --git a/mongodb.spec b/mongodb.spec
index 930be12..a7b9f4e 100644
--- a/mongodb.spec
+++ b/mongodb.spec
@@ -1,7 +1,7 @@
%global daemon mongod
Name: mongodb
Version: 2.0.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: High-performance, schema-free document-oriented database
Group: Applications/Databases
License: AGPLv3 and zlib and ASL 2.0
@@ -20,6 +20,7 @@ Patch1: mongodb-no-term.patch
Patch2: mongodb-src-r2.0.2-js.patch
Patch3: mongodb-fix-fork.patch
Patch4: mongodb-fix-pcre.patch
+Patch5: mongodb-sm-pkgconfig.patch
BuildRequires: python-devel
BuildRequires: scons
@@ -94,6 +95,7 @@ software, default configuration files, and init scripts.
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
# spurious permissions
chmod -x README
@@ -215,6 +217,9 @@ fi
%{_includedir}/mongo
%changelog
+* Mon Jan 16 2012 Nathaniel McCallum <nathaniel at natemccallum.com> - 2.0.2-2
+- Add pkg-config enablement patch
+
* Thu Jan 14 2012 Nathaniel McCallum <nathaniel at natemccallum.com> - 2.0.2-1
- Update to 2.0.2
- Add new files (mongotop and bsondump manpage)
More information about the scm-commits
mailing list