aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/sqlpp11-connector-mysql/README13
-rw-r--r--libraries/sqlpp11-connector-mysql/slack-desc19
-rw-r--r--libraries/sqlpp11-connector-mysql/sqlpp11-connector-mysql.SlackBuild98
-rw-r--r--libraries/sqlpp11-connector-mysql/sqlpp11-connector-mysql.info10
-rw-r--r--libraries/sqlpp11-connector-mysql/sqlpp11-connector-mysql.patch21
5 files changed, 161 insertions, 0 deletions
diff --git a/libraries/sqlpp11-connector-mysql/README b/libraries/sqlpp11-connector-mysql/README
new file mode 100644
index 0000000000000..0adb77f89528a
--- /dev/null
+++ b/libraries/sqlpp11-connector-mysql/README
@@ -0,0 +1,13 @@
+sqlpp11 offers you to code SQL in C++ almost naturally. You can
+use tables, columns and functions. Everything has strong types
+which allow the compiler to help you a lot. At compile time, it
+will tell about most of those pesky oversight errors you can
+make (typos, comparing apples with oranges, forgetting tables
+in a select statement, etc). And it does not stop at query
+construction. Results have ranges, and strongly typed members,
+so that you can browse through results in a type-safe manner,
+worthy of modern C++.
+
+sqlpp11 requires a certain api in order to connect with the
+database, sqlpp11-connector-mysql is a SQL connector for
+the MySql database.
diff --git a/libraries/sqlpp11-connector-mysql/slack-desc b/libraries/sqlpp11-connector-mysql/slack-desc
new file mode 100644
index 0000000000000..209f972bab901
--- /dev/null
+++ b/libraries/sqlpp11-connector-mysql/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------------------------------------------------------|
+sqlpp11-connector-mysql: sqlpp11-connector-mysql (sqlpp11 connector for MySql)
+sqlpp11-connector-mysql:
+sqlpp11-connector-mysql: A C++ wrapper for mysql meant to be used in combination with
+sqlpp11-connector-mysql: sqlpp11.
+sqlpp11-connector-mysql:
+sqlpp11-connector-mysql:
+sqlpp11-connector-mysql:
+sqlpp11-connector-mysql:
+sqlpp11-connector-mysql:
+sqlpp11-connector-mysql: https://github.com/rbock/sqlpp11-connector-mysql
+sqlpp11-connector-mysql:
diff --git a/libraries/sqlpp11-connector-mysql/sqlpp11-connector-mysql.SlackBuild b/libraries/sqlpp11-connector-mysql/sqlpp11-connector-mysql.SlackBuild
new file mode 100644
index 0000000000000..7cd2fcb18c7df
--- /dev/null
+++ b/libraries/sqlpp11-connector-mysql/sqlpp11-connector-mysql.SlackBuild
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+# Slackware build script for sqlpp11-connector-mysql
+
+# Copyright 2016 Andre Barboza, Belo Horizonte - Brazil
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS 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 AUTHOR 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=sqlpp11-connector-mysql
+VERSION=${VERSION:-0.20}
+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
+patch -p1 < $CWD/sqlpp11-connector-mysql.patch
+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 {} \;
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DDATE_INCLUDE_DIR=/usr/include \
+ -DSQLPP11_INCLUDE_DIR=/usr/include/ ..
+ 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 -ar LICENSE README.md tests $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/sqlpp11-connector-mysql/sqlpp11-connector-mysql.info b/libraries/sqlpp11-connector-mysql/sqlpp11-connector-mysql.info
new file mode 100644
index 0000000000000..8a60f7a914389
--- /dev/null
+++ b/libraries/sqlpp11-connector-mysql/sqlpp11-connector-mysql.info
@@ -0,0 +1,10 @@
+PRGNAM="sqlpp11-connector-mysql"
+VERSION="0.20"
+HOMEPAGE="https://github.com/rbock/sqlpp11-connector-mysql"
+DOWNLOAD="https://github.com/rbock/sqlpp11-connector-mysql/archive/0.20/sqlpp11-connector-mysql-0.20.tar.gz"
+MD5SUM="8ba37cdb5d3604cfa47057954f0f8ead"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="sqlpp11"
+MAINTAINER="Andre Barboza"
+EMAIL="bmg.andre@gmail.com"
diff --git a/libraries/sqlpp11-connector-mysql/sqlpp11-connector-mysql.patch b/libraries/sqlpp11-connector-mysql/sqlpp11-connector-mysql.patch
new file mode 100644
index 0000000000000..42ec5d67f3785
--- /dev/null
+++ b/libraries/sqlpp11-connector-mysql/sqlpp11-connector-mysql.patch
@@ -0,0 +1,21 @@
+diff -ur sqlpp11-connector-mysql-0.20.old/CMakeLists.txt sqlpp11-connector-mysql-0.20/CMakeLists.txt
+--- sqlpp11-connector-mysql-0.20.old/CMakeLists.txt 2016-09-03 08:51:52.000000000 -0300
++++ sqlpp11-connector-mysql-0.20/CMakeLists.txt 2016-12-15 20:50:56.302051737 -0200
+@@ -72,7 +72,6 @@
+ include_directories("${DATE_INCLUDE_DIR}")
+ include_directories("${MYSQL_INCLUDE_DIRS}")
+ set(include_dir "${PROJECT_SOURCE_DIR}/include")
+-file(GLOB_RECURSE sqlpp_headers ${include_dir}/*.h ${SQLPP11_INCLUDE_DIR}/*.h)
+ include_directories(${include_dir})
+
+ add_subdirectory(src)
+Only in sqlpp11-connector-mysql-0.20: build
+diff -ur sqlpp11-connector-mysql-0.20.old/src/CMakeLists.txt sqlpp11-connector-mysql-0.20/src/CMakeLists.txt
+--- sqlpp11-connector-mysql-0.20.old/src/CMakeLists.txt 2016-09-03 08:51:52.000000000 -0300
++++ sqlpp11-connector-mysql-0.20/src/CMakeLists.txt 2016-12-15 20:52:25.970056347 -0200
+@@ -9,4 +9,4 @@
+ target_link_libraries(sqlpp-mysql "${Boost_THREAD_LIBRARY}")
+ endif()
+
+-install(TARGETS sqlpp-mysql DESTINATION lib)
++install(TARGETS sqlpp-mysql DESTINATION lib${LIB_SUFFIX})