summaryrefslogtreecommitdiff
path: root/libraries/mongo-cxx-driver
diff options
context:
space:
mode:
authorJames Axl <axlrose112@gmail.com>2017-03-14 13:08:59 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-03-18 06:58:31 +0700
commite240daab2acc8aa3a6e38c5a3948e6b2f9d450e9 (patch)
treecfe788ae2bb5c1da752e8ac39964c3e5010d9856 /libraries/mongo-cxx-driver
parent7c68076d28dc9f778806367335fa0523dd613e26 (diff)
downloadslackbuilds-e240daab2acc8aa3a6e38c5a3948e6b2f9d450e9.tar.gz
libraries/mongo-cxx-driver: Added (C++ driver for MongoDB).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'libraries/mongo-cxx-driver')
-rw-r--r--libraries/mongo-cxx-driver/README1
-rw-r--r--libraries/mongo-cxx-driver/mongo-cxx-driver.SlackBuild100
-rw-r--r--libraries/mongo-cxx-driver/mongo-cxx-driver.info10
-rw-r--r--libraries/mongo-cxx-driver/mongo-cxx-driver_libdir-fixups.patch162
-rw-r--r--libraries/mongo-cxx-driver/slack-desc19
5 files changed, 292 insertions, 0 deletions
diff --git a/libraries/mongo-cxx-driver/README b/libraries/mongo-cxx-driver/README
new file mode 100644
index 0000000000..ae4d57fd73
--- /dev/null
+++ b/libraries/mongo-cxx-driver/README
@@ -0,0 +1 @@
+mongo-cxx-driver is the official C++ driver for MongoDB.
diff --git a/libraries/mongo-cxx-driver/mongo-cxx-driver.SlackBuild b/libraries/mongo-cxx-driver/mongo-cxx-driver.SlackBuild
new file mode 100644
index 0000000000..3208d89de6
--- /dev/null
+++ b/libraries/mongo-cxx-driver/mongo-cxx-driver.SlackBuild
@@ -0,0 +1,100 @@
+#!/bin/sh
+
+# Slackware build script for mongo-cxx-driver
+
+# Copyright 2017 James Axl <axlrose112@gmail.com>
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for any purpose
+# with or without fee is hereby granted, provided that the above copyright
+# notice and this permission notice appear in all copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# AUTHORS AND COPYRIGHT HOLDERS AND THEIR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=mongo-cxx-driver
+VERSION=${VERSION:-r3.1.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Upstream doesn't support LIB_SUFFIX
+patch -p1 < $CWD/mongo-cxx-driver_libdir-fixups.patch
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DBSONCXX_POLY_USE_BOOST=1 \
+ -DCMAKE_BUILD_TYPE=Release ..
+
+ make
+ make install DESTDIR=$PKG
+cd ..
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CONTRIBUTING.md CREDITS.json Doxyfile LICENSE README.md THIRD-PARTY-NOTICES TODO.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/libraries/mongo-cxx-driver/mongo-cxx-driver.info b/libraries/mongo-cxx-driver/mongo-cxx-driver.info
new file mode 100644
index 0000000000..6512e3e2f6
--- /dev/null
+++ b/libraries/mongo-cxx-driver/mongo-cxx-driver.info
@@ -0,0 +1,10 @@
+PRGNAM="mongo-cxx-driver"
+VERSION="r3.1.1"
+HOMEPAGE="https://mongodb.github.io/mongo-cxx-driver/"
+DOWNLOAD="https://github.com/mongodb/mongo-cxx-driver/archive/r3.1.1/mongo-cxx-driver-r3.1.1.tar.gz"
+MD5SUM="166847a9d84b9fbab4c907f0ed5632fe"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="mongo-c-driver"
+MAINTAINER="James Axl"
+EMAIL="axlrose112@gmail.com"
diff --git a/libraries/mongo-cxx-driver/mongo-cxx-driver_libdir-fixups.patch b/libraries/mongo-cxx-driver/mongo-cxx-driver_libdir-fixups.patch
new file mode 100644
index 0000000000..1a0a6abbc7
--- /dev/null
+++ b/libraries/mongo-cxx-driver/mongo-cxx-driver_libdir-fixups.patch
@@ -0,0 +1,162 @@
+diff -u -r mongo-cxx-driver-r3.1.1-orig/examples/mongocxx/CMakeLists.txt mongo-cxx-driver-r3.1.1-patched/examples/mongocxx/CMakeLists.txt
+--- mongo-cxx-driver-r3.1.1-orig/examples/mongocxx/CMakeLists.txt 2016-12-20 20:23:11.000000000 +0000
++++ mongo-cxx-driver-r3.1.1-patched/examples/mongocxx/CMakeLists.txt 2017-03-14 12:06:28.955217844 +0000
+@@ -18,7 +18,7 @@
+ )
+
+ link_directories(
+- ${CMAKE_INSTALL_PREFIX}/lib
++ ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
+ )
+
+ set(MONGOCXX_EXAMPLES
+diff -u -r mongo-cxx-driver-r3.1.1-orig/src/bsoncxx/CMakeLists.txt mongo-cxx-driver-r3.1.1-patched/src/bsoncxx/CMakeLists.txt
+--- mongo-cxx-driver-r3.1.1-orig/src/bsoncxx/CMakeLists.txt 2016-12-20 20:23:11.000000000 +0000
++++ mongo-cxx-driver-r3.1.1-patched/src/bsoncxx/CMakeLists.txt 2017-03-14 12:04:02.763279762 +0000
+@@ -114,7 +114,7 @@
+ # library names
+ if (WIN32)
+ set_target_properties(bsoncxx_static PROPERTIES
+- PREFIX lib
++ PREFIX lib${LIB_SUFFIX}
+ )
+ endif()
+
+@@ -172,25 +172,25 @@
+ install(TARGETS
+ bsoncxx
+ RUNTIME DESTINATION bin COMPONENT runtime
+- LIBRARY DESTINATION lib COMPONENT runtime
+- ARCHIVE DESTINATION lib COMPONENT dev
++ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT runtime
++ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT dev
+ )
+ endif()
+
+ install(TARGETS
+ bsoncxx_static
+- ARCHIVE DESTINATION lib COMPONENT dev
++ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT dev
+ )
+
+ set(PACKAGE_INCLUDE_INSTALL_DIRS ${BSONCXX_HEADER_INSTALL_DIR})
+-set(PACKAGE_LIBRARY_INSTALL_DIRS lib)
++set(PACKAGE_LIBRARY_INSTALL_DIRS lib${LIB_SUFFIX})
+ set(PACKAGE_LIBRARIES bsoncxx)
+
+ include(CMakePackageConfigHelpers)
+
+ configure_package_config_file(
+ cmake/libbsoncxx-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libbsoncxx-config.cmake
+- INSTALL_DESTINATION lib/cmake/libbsoncxx-${BSONCXX_VERSION}
++ INSTALL_DESTINATION lib${LIB_SUFFIX}/cmake/libbsoncxx-${BSONCXX_VERSION}
+ PATH_VARS PACKAGE_INCLUDE_INSTALL_DIRS PACKAGE_LIBRARY_INSTALL_DIRS
+ )
+
+@@ -202,7 +202,7 @@
+
+ install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/libbsoncxx-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/libbsoncxx-config-version.cmake
+- DESTINATION lib/cmake/libbsoncxx-${BSONCXX_VERSION}
++ DESTINATION lib${LIB_SUFFIX}/cmake/libbsoncxx-${BSONCXX_VERSION}
+ )
+
+ add_subdirectory(test)
+diff -u -r mongo-cxx-driver-r3.1.1-orig/src/bsoncxx/config/CMakeLists.txt mongo-cxx-driver-r3.1.1-patched/src/bsoncxx/config/CMakeLists.txt
+--- mongo-cxx-driver-r3.1.1-orig/src/bsoncxx/config/CMakeLists.txt 2016-12-20 20:23:11.000000000 +0000
++++ mongo-cxx-driver-r3.1.1-patched/src/bsoncxx/config/CMakeLists.txt 2017-03-14 12:05:42.959495804 +0000
+@@ -42,6 +42,6 @@
+
+ install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/libbsoncxx.pc"
+- DESTINATION lib/pkgconfig
++ DESTINATION lib${LIB_SUFFIX}/pkgconfig
+ COMPONENT dev
+ )
+diff -u -r mongo-cxx-driver-r3.1.1-orig/src/bsoncxx/config/libbsoncxx.pc.in mongo-cxx-driver-r3.1.1-patched/src/bsoncxx/config/libbsoncxx.pc.in
+--- mongo-cxx-driver-r3.1.1-orig/src/bsoncxx/config/libbsoncxx.pc.in 2016-12-20 20:23:11.000000000 +0000
++++ mongo-cxx-driver-r3.1.1-patched/src/bsoncxx/config/libbsoncxx.pc.in 2017-03-14 12:38:29.143868341 +0000
+@@ -14,7 +14,7 @@
+
+ prefix=@CMAKE_INSTALL_PREFIX@
+ includedir=${prefix}/include
+-libdir=${prefix}/lib
++libdir=${prefix}/lib@LIB_SUFFIX@
+
+ Name: libbsoncxx
+ Description: The MongoDB C++11 BSON Library
+diff -u -r mongo-cxx-driver-r3.1.1-orig/src/mongocxx/CMakeLists.txt mongo-cxx-driver-r3.1.1-patched/src/mongocxx/CMakeLists.txt
+--- mongo-cxx-driver-r3.1.1-orig/src/mongocxx/CMakeLists.txt 2016-12-20 20:23:11.000000000 +0000
++++ mongo-cxx-driver-r3.1.1-patched/src/mongocxx/CMakeLists.txt 2017-03-14 12:01:22.963720065 +0000
+@@ -120,7 +120,7 @@
+ # library names
+ if (WIN32)
+ set_target_properties(mongocxx_static PROPERTIES
+- PREFIX lib
++ PREFIX lib${LIB_SUFFIX}
+ )
+ endif()
+
+@@ -183,25 +183,25 @@
+ install(TARGETS
+ mongocxx
+ RUNTIME DESTINATION bin COMPONENT runtime
+- LIBRARY DESTINATION lib COMPONENT runtime
+- ARCHIVE DESTINATION lib COMPONENT dev
++ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT runtime
++ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT dev
+ )
+ endif()
+
+ install(TARGETS
+ mongocxx_static
+- ARCHIVE DESTINATION lib COMPONENT dev
++ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT dev
+ )
+
+ set(PACKAGE_INCLUDE_INSTALL_DIRS ${MONGOCXX_HEADER_INSTALL_DIR})
+-set(PACKAGE_LIBRARY_INSTALL_DIRS lib)
++set(PACKAGE_LIBRARY_INSTALL_DIRS lib${LIB_SUFFIX})
+ set(PACKAGE_LIBRARIES mongocxx)
+
+ include(CMakePackageConfigHelpers)
+
+ configure_package_config_file(
+ cmake/libmongocxx-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libmongocxx-config.cmake
+- INSTALL_DESTINATION lib/cmake/libmongocxx-${MONGOCXX_VERSION}
++ INSTALL_DESTINATION lib${LIB_SUFFIX}/cmake/libmongocxx-${MONGOCXX_VERSION}
+ PATH_VARS PACKAGE_INCLUDE_INSTALL_DIRS PACKAGE_LIBRARY_INSTALL_DIRS
+ )
+
+@@ -213,7 +213,7 @@
+
+ install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/libmongocxx-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/libmongocxx-config-version.cmake
+- DESTINATION lib/cmake/libmongocxx-${MONGOCXX_VERSION}
++ DESTINATION lib${LIB_SUFFIX}/cmake/libmongocxx-${MONGOCXX_VERSION}
+ )
+
+ add_subdirectory(test)
+diff -u -r mongo-cxx-driver-r3.1.1-orig/src/mongocxx/config/CMakeLists.txt mongo-cxx-driver-r3.1.1-patched/src/mongocxx/config/CMakeLists.txt
+--- mongo-cxx-driver-r3.1.1-orig/src/mongocxx/config/CMakeLists.txt 2016-12-20 20:23:11.000000000 +0000
++++ mongo-cxx-driver-r3.1.1-patched/src/mongocxx/config/CMakeLists.txt 2017-03-14 12:02:27.633923054 +0000
+@@ -42,6 +42,6 @@
+
+ install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/libmongocxx.pc"
+- DESTINATION lib/pkgconfig
++ DESTINATION lib${LIB_SUFFIX}/pkgconfig
+ COMPONENT dev
+ )
+diff -u -r mongo-cxx-driver-r3.1.1-orig/src/mongocxx/config/libmongocxx.pc.in mongo-cxx-driver-r3.1.1-patched/src/mongocxx/config/libmongocxx.pc.in
+--- mongo-cxx-driver-r3.1.1-orig/src/mongocxx/config/libmongocxx.pc.in 2016-12-20 20:23:11.000000000 +0000
++++ mongo-cxx-driver-r3.1.1-patched/src/mongocxx/config/libmongocxx.pc.in 2017-03-14 12:38:14.955262043 +0000
+@@ -14,7 +14,7 @@
+
+ prefix=@CMAKE_INSTALL_PREFIX@
+ includedir=${prefix}/include
+-libdir=${prefix}/lib
++libdir=${prefix}/lib@LIB_SUFFIX@
+
+ Name: libmongocxx
+ Description: The MongoDB C++11 Driver Library
diff --git a/libraries/mongo-cxx-driver/slack-desc b/libraries/mongo-cxx-driver/slack-desc
new file mode 100644
index 0000000000..82bfd708b8
--- /dev/null
+++ b/libraries/mongo-cxx-driver/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+mongo-cxx-driver: mongo-cxx-driver (C++ driver for MongoDB)
+mongo-cxx-driver:
+mongo-cxx-driver: mongo-cxx-driver is the official C++ driver for MongoDB.
+mongo-cxx-driver:
+mongo-cxx-driver: If you are writing software in C++ that needs to access databases
+mongo-cxx-driver: managed by MongoDB on just about any platform, then mongo-cxx-driver
+mongo-cxx-driver: is the library you use. It is the standard C++ language binding
+mongo-cxx-driver: for MongoDB.
+mongo-cxx-driver:
+mongo-cxx-driver:
+mongo-cxx-driver: