summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorMatthew Budd <mjbudd77@yahoo.com>2016-08-22 13:22:48 +0100
committerDavid Spencer <idlemoor@slackbuilds.org>2016-08-28 00:22:59 +0100
commit91acfe52e6fa8a49ca35dd2ac2d137d5d61bf4a2 (patch)
treee0d5b29f23779f2ab7dd702402d36ba68a3d529c /libraries
parentff30d05f395e16eef302411f0596e2f454d8a037 (diff)
downloadslackbuilds-91acfe52e6fa8a49ca35dd2ac2d137d5d61bf4a2.tar.gz
libraries/ptypes: Added (C++ Portable Types Library).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/ptypes/README5
-rw-r--r--libraries/ptypes/ptypes.SlackBuild97
-rw-r--r--libraries/ptypes/ptypes.info10
-rw-r--r--libraries/ptypes/ptypes.patch11
-rw-r--r--libraries/ptypes/ptypes.pc5
-rw-r--r--libraries/ptypes/slack-desc19
6 files changed, 147 insertions, 0 deletions
diff --git a/libraries/ptypes/README b/libraries/ptypes/README
new file mode 100644
index 0000000000..9dc76c90c1
--- /dev/null
+++ b/libraries/ptypes/README
@@ -0,0 +1,5 @@
+C++ Portable Types Library (PTypes)
+
+PTypes is a simple alternative to the STL that includes multithreading and networking.
+It defines dynamic strings, character sets, lists and other basic data types along
+with threads, synchronization primitives, named pipes and IP sockets.
diff --git a/libraries/ptypes/ptypes.SlackBuild b/libraries/ptypes/ptypes.SlackBuild
new file mode 100644
index 0000000000..75617a7d2b
--- /dev/null
+++ b/libraries/ptypes/ptypes.SlackBuild
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+# Slackware build script for ptypes
+
+# Copyright 2016 Matthew Budd Tampa, FL USA
+# 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=ptypes
+VERSION=${VERSION:-2.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 {} \;
+
+# Fix up a to-be-installed header and the pkgconfig file
+sed -i "s|/usr|${PKG}/usr|" src/Makefile.Linux
+sed -i "s|PREFIX}/lib|PREFIX}/lib${LIBDIRSUFFIX}|g" src/Makefile.common
+
+# Apply Patch to fix build for GCC 5.x
+patch -p0 < $CWD/ptypes.patch
+
+make all
+make install
+
+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
+
+# Install the pkgconfig file
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+cat $CWD/ptypes.pc > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/ptypes.pc
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/{extras,html}
+cp -a LICENSE $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/ptypes/ptypes.info b/libraries/ptypes/ptypes.info
new file mode 100644
index 0000000000..8afcf7d0c9
--- /dev/null
+++ b/libraries/ptypes/ptypes.info
@@ -0,0 +1,10 @@
+PRGNAM="ptypes"
+VERSION="2.1.1"
+HOMEPAGE="https://sourceforge.net/projects/ptypes"
+DOWNLOAD="https://sourceforge.net/projects/ptypes/files/ptypes/ptypes-2.1.1/ptypes-2.1.1.tar.gz"
+MD5SUM="f7ed34b09d5b764294e93382f18a0ed3"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Matthew Budd"
+EMAIL="mjbudd77@yahoo.com"
diff --git a/libraries/ptypes/ptypes.patch b/libraries/ptypes/ptypes.patch
new file mode 100644
index 0000000000..c235ec03d0
--- /dev/null
+++ b/libraries/ptypes/ptypes.patch
@@ -0,0 +1,11 @@
+--- include/ptypes.h.orig 2016-08-20 00:40:10.316942041 -0400
++++ include/ptypes.h 2016-08-20 00:40:17.052941703 -0400
+@@ -42,7 +42,7 @@
+ { return (T*)pexchange((void**)target, (void*)value); }
+
+
+-#if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ == 4) || defined(__hpux)
++#if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ >= 4) || defined(__hpux)
+ # define VARIANT_TYPECAST_HACK
+ #endif
+
diff --git a/libraries/ptypes/ptypes.pc b/libraries/ptypes/ptypes.pc
new file mode 100644
index 0000000000..9ea8d47672
--- /dev/null
+++ b/libraries/ptypes/ptypes.pc
@@ -0,0 +1,5 @@
+Name: ptypes
+Description: C++ Portable Types Library (PTypes)
+Version: 2.1.1
+Libs: -lptypes
+Cflags:
diff --git a/libraries/ptypes/slack-desc b/libraries/ptypes/slack-desc
new file mode 100644
index 0000000000..2146b697e0
--- /dev/null
+++ b/libraries/ptypes/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------------------------------------------------------|
+ptypes: PTypes (C++ Portable Types Library)
+ptypes:
+ptypes: Is a simple alternative to the STL that includes multithreading
+ptypes: and networking. It defines dynamic strings, character sets, lists
+ptypes: and other basic data types along with threads, synchronization
+ptypes: primitives, named pipes and IP sockets.
+ptypes:
+ptypes:
+ptypes:
+ptypes:
+ptypes: