summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Barboza <bmg.andre@gmail.com>2017-02-08 10:21:55 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-02-10 07:16:25 +0700
commit1b6cf4e2f15329eaf209049b2fb6ce1ab769c199 (patch)
tree99ba237cb31f2aa9e5e9090bccbef0fc68386fbb
parenteed5a688468aca47af41b696ff4e3153eeaf13ea (diff)
downloadslackbuilds-1b6cf4e2f15329eaf209049b2fb6ce1ab769c199.tar.gz
libraries/cpp-netlib: Added (The C++ Network Library Project).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--libraries/cpp-netlib/OPENSSL_NO_SSL3.patch25
-rw-r--r--libraries/cpp-netlib/README20
-rw-r--r--libraries/cpp-netlib/cpp-netlib.SlackBuild100
-rw-r--r--libraries/cpp-netlib/cpp-netlib.info10
-rw-r--r--libraries/cpp-netlib/slack-desc19
5 files changed, 174 insertions, 0 deletions
diff --git a/libraries/cpp-netlib/OPENSSL_NO_SSL3.patch b/libraries/cpp-netlib/OPENSSL_NO_SSL3.patch
new file mode 100644
index 0000000000..816097d2fc
--- /dev/null
+++ b/libraries/cpp-netlib/OPENSSL_NO_SSL3.patch
@@ -0,0 +1,25 @@
+--- deps/asio/asio/include/asio/ssl/impl/context.ipp
++++ deps/asio/asio/include/asio/ssl/impl/context.ipp
+@@ -89,6 +89,14 @@ context::context(context::method m)
+ handle_ = ::SSL_CTX_new(::SSLv2_server_method());
+ break;
+ #endif // defined(OPENSSL_NO_SSL2)
++#if defined(OPENSSL_NO_SSL3)
++ case context::sslv3:
++ case context::sslv3_client:
++ case context::sslv3_server:
++ asio::detail::throw_error(
++ asio::error::invalid_argument, "context");
++ break;
++#else // defined(OPENSSL_NO_SSL3)
+ case context::sslv3:
+ handle_ = ::SSL_CTX_new(::SSLv3_method());
+ break;
+@@ -98,6 +106,7 @@ context::context(context::method m)
+ case context::sslv3_server:
+ handle_ = ::SSL_CTX_new(::SSLv3_server_method());
+ break;
++#endif // defined(OPENSSL_NO_SSL3)
+ case context::tlsv1:
+ handle_ = ::SSL_CTX_new(::TLSv1_method());
+ break;
diff --git a/libraries/cpp-netlib/README b/libraries/cpp-netlib/README
new file mode 100644
index 0000000000..2ec60fd340
--- /dev/null
+++ b/libraries/cpp-netlib/README
@@ -0,0 +1,20 @@
+cpp-netlib is a collection of network related routines/implementations
+geared towards providing a robust cross-platform networking library.
+cpp-netlib offers the following implementations:
+
+- Common Message Type:
+ A generic message type which can be used to
+ encapsulate and store message related information, used by all
+ network implementations as the primary means of data exchange.
+
+- Network protocol message parsers:
+ A collection of parsers which generate message objects from
+ strings.
+
+- Adapters and Wrappers:
+ A collection of Adapters and wrappers aimed towards making the
+ message type STL friendly.
+
+- Network protocol client and server implementations:
+ A collection of network protocol implementations that include
+ embeddable client and server types.
diff --git a/libraries/cpp-netlib/cpp-netlib.SlackBuild b/libraries/cpp-netlib/cpp-netlib.SlackBuild
new file mode 100644
index 0000000000..63f221d69d
--- /dev/null
+++ b/libraries/cpp-netlib/cpp-netlib.SlackBuild
@@ -0,0 +1,100 @@
+#!/bin/sh
+
+# Slackware build script for cpp-netlib
+
+# Copyright 2017 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=cpp-netlib
+VERSION=${VERSION:-0.12.0}
+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-final
+tar xvf $CWD/$PRGNAM-$VERSION-final.tar.gz
+cd $PRGNAM-$VERSION-final
+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 {} \;
+
+patch -Np0 < $CWD/OPENSSL_NO_SSL3.patch
+
+mkdir -p build
+cd build
+ cmake \
+ -DCPP-NETLIB_BUILD_TESTS=OFF \
+ -DCPP-NETLIB_BUILD_EXAMPLES=OFF \
+ -DCPP-NETLIB_BUILD_SHARED_LIBS=ON \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -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 LICENSE_1_0.txt RATIONALE.txt README.rst code_of_conduct.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/cpp-netlib/cpp-netlib.info b/libraries/cpp-netlib/cpp-netlib.info
new file mode 100644
index 0000000000..b09fe1ec2a
--- /dev/null
+++ b/libraries/cpp-netlib/cpp-netlib.info
@@ -0,0 +1,10 @@
+PRGNAM="cpp-netlib"
+VERSION="0.12.0"
+HOMEPAGE="http://cpp-netlib.org/"
+DOWNLOAD="http://downloads.cpp-netlib.org/0.12.0/cpp-netlib-0.12.0-final.tar.gz"
+MD5SUM="29b87c0e8c1a9e7fbdea5afcec947d53"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Andre Barboza"
+EMAIL="bmg.andre@gmail.com"
diff --git a/libraries/cpp-netlib/slack-desc b/libraries/cpp-netlib/slack-desc
new file mode 100644
index 0000000000..8aa1e33a1f
--- /dev/null
+++ b/libraries/cpp-netlib/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------------------------------------------------------|
+cpp-netlib: cpp-netlib (The C++ Network Library Project)
+cpp-netlib:
+cpp-netlib: cpp-netlib is a collection of network related routines geared
+cpp-netlib: towards providing a robust cross-platform networking library.
+cpp-netlib: cpp-netlib offers the following implementations: Common Message
+cpp-netlib: Type; Network protocol message parsers; Adapters and Wrappers,
+cpp-netlib: Network protocol client and server implementations.
+cpp-netlib:
+cpp-netlib:
+cpp-netlib: http://cpp-netlib.org/
+cpp-netlib: