summaryrefslogtreecommitdiff
path: root/libraries/sqlpp11-connector-sqlite3
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/sqlpp11-connector-sqlite3')
-rw-r--r--libraries/sqlpp11-connector-sqlite3/README13
-rw-r--r--libraries/sqlpp11-connector-sqlite3/slack-desc19
-rw-r--r--libraries/sqlpp11-connector-sqlite3/sqlpp11-connector-sqlite3.SlackBuild98
-rw-r--r--libraries/sqlpp11-connector-sqlite3/sqlpp11-connector-sqlite3.info10
-rw-r--r--libraries/sqlpp11-connector-sqlite3/sqlpp11-connector-sqlite3.patch21
5 files changed, 161 insertions, 0 deletions
diff --git a/libraries/sqlpp11-connector-sqlite3/README b/libraries/sqlpp11-connector-sqlite3/README
new file mode 100644
index 0000000000..0fdcc921e9
--- /dev/null
+++ b/libraries/sqlpp11-connector-sqlite3/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-sqlite3 is a SQL connector for
+the Sqlite3 database.
diff --git a/libraries/sqlpp11-connector-sqlite3/slack-desc b/libraries/sqlpp11-connector-sqlite3/slack-desc
new file mode 100644
index 0000000000..9d424ebb78
--- /dev/null
+++ b/libraries/sqlpp11-connector-sqlite3/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-sqlite3: sqlpp11-connector-sqlite3 (sqlpp11 connector for Sqlite3)
+sqlpp11-connector-sqlite3:
+sqlpp11-connector-sqlite3: A C++ wrapper for sqlite3 meant to be used in combination with
+sqlpp11-connector-sqlite3: sqlpp11.
+sqlpp11-connector-sqlite3:
+sqlpp11-connector-sqlite3:
+sqlpp11-connector-sqlite3:
+sqlpp11-connector-sqlite3:
+sqlpp11-connector-sqlite3:
+sqlpp11-connector-sqlite3: https://github.com/rbock/sqlpp11-connector-sqlite3
+sqlpp11-connector-sqlite3:
diff --git a/libraries/sqlpp11-connector-sqlite3/sqlpp11-connector-sqlite3.SlackBuild b/libraries/sqlpp11-connector-sqlite3/sqlpp11-connector-sqlite3.SlackBuild
new file mode 100644
index 0000000000..9d674f9d84
--- /dev/null
+++ b/libraries/sqlpp11-connector-sqlite3/sqlpp11-connector-sqlite3.SlackBuild
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+# Slackware build script for sqlpp11-connector-sqlite3
+
+# 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-sqlite3
+VERSION=${VERSION:-0.23}
+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-sqlite3.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-sqlite3/sqlpp11-connector-sqlite3.info b/libraries/sqlpp11-connector-sqlite3/sqlpp11-connector-sqlite3.info
new file mode 100644
index 0000000000..700cad31fa
--- /dev/null
+++ b/libraries/sqlpp11-connector-sqlite3/sqlpp11-connector-sqlite3.info
@@ -0,0 +1,10 @@
+PRGNAM="sqlpp11-connector-sqlite3"
+VERSION="0.23"
+HOMEPAGE="https://github.com/rbock/sqlpp11-connector-sqlite3"
+DOWNLOAD="https://github.com/rbock/sqlpp11-connector-sqlite3/archive/0.23/sqlpp11-connector-sqlite3-0.23.tar.gz"
+MD5SUM="d49dbe891a9cb806ab88803e08a9d6b9"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="sqlpp11"
+MAINTAINER="Andre Barboza"
+EMAIL="bmg.andre@gmail.com"
diff --git a/libraries/sqlpp11-connector-sqlite3/sqlpp11-connector-sqlite3.patch b/libraries/sqlpp11-connector-sqlite3/sqlpp11-connector-sqlite3.patch
new file mode 100644
index 0000000000..779b066d34
--- /dev/null
+++ b/libraries/sqlpp11-connector-sqlite3/sqlpp11-connector-sqlite3.patch
@@ -0,0 +1,21 @@
+diff -ur sqlpp11-connector-sqlite3-0.23.old/CMakeLists.txt sqlpp11-connector-sqlite3-0.23/CMakeLists.txt
+--- sqlpp11-connector-sqlite3-0.23.old/CMakeLists.txt 2016-09-03 08:37:59.000000000 -0300
++++ sqlpp11-connector-sqlite3-0.23/CMakeLists.txt 2016-12-15 17:13:47.022040304 -0200
+@@ -75,7 +75,6 @@
+ include_directories("${DATE_INCLUDE_DIR}")
+ include_directories("${SQLITE3_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-sqlite3-0.23/src: .CMakeLists.txt.un~
+diff -ur sqlpp11-connector-sqlite3-0.23.old/src/CMakeLists.txt sqlpp11-connector-sqlite3-0.23/src/CMakeLists.txt
+--- sqlpp11-connector-sqlite3-0.23.old/src/CMakeLists.txt 2016-09-03 08:37:59.000000000 -0300
++++ sqlpp11-connector-sqlite3-0.23/src/CMakeLists.txt 2016-12-15 17:15:24.270043748 -0200
+@@ -4,4 +4,4 @@
+ prepared_statement.cpp
+ detail/connection_handle.cpp)
+
+-install(TARGETS sqlpp11-connector-sqlite3 DESTINATION lib)
++install(TARGETS sqlpp11-connector-sqlite3 DESTINATION lib${LIB_SUFFIX})