summaryrefslogtreecommitdiff
path: root/community/mysql++
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/mysql++
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/mysql++')
-rw-r--r--community/mysql++/PKGBUILD41
-rw-r--r--community/mysql++/mysql++-fix-cstring.patch11
-rw-r--r--community/mysql++/mysql++-fix-size_t.patch21
3 files changed, 73 insertions, 0 deletions
diff --git a/community/mysql++/PKGBUILD b/community/mysql++/PKGBUILD
new file mode 100644
index 000000000..6b5364edf
--- /dev/null
+++ b/community/mysql++/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 93854 2013-07-11 12:03:32Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Markus Härer <markus.haerer@gmx.net>
+
+pkgname=mysql++
+pkgver=3.2.0
+pkgrel=1
+pkgdesc="A C++ wraper for MySQLs C API"
+arch=("i686" "x86_64")
+url="http://tangentsoft.net/mysql++/"
+license=("LGPL" "custom")
+depends=("libmariadbclient")
+options=('docs')
+source=("http://tangentsoft.net/mysql++/releases/$pkgname-$pkgver.tar.gz"
+ "mysql++-fix-cstring.patch"
+ "mysql++-fix-size_t.patch")
+md5sums=('d2220b74e000d8ede13f451fe99bad5a'
+ '72f85a1bdba9d5285f0baf1d973033f8'
+ '6dcfbf06072b81cf27530ca9a0df8a8e')
+
+build() {
+ unset LDFLAGS
+ cd "$srcdir/$pkgname-$pkgver/"
+ patch -p1 <$srcdir/mysql++-fix-cstring.patch
+ patch -p1 <$srcdir/mysql++-fix-size_t.patch
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver/"
+ make DESTDIR="$pkgdir" install
+
+ #install docs
+ mkdir -p $pkgdir/usr/share/doc/mysql++
+ cp -r doc/html $pkgdir/usr/share/doc/mysql++
+ cp -r doc/pdf $pkgdir/usr/share/doc/mysql++
+
+ #install doc licence
+ install -Dm0644 doc/userman/LICENSE.txt $pkgdir/usr/share/licenses/mysql++/LICENSE
+}
diff --git a/community/mysql++/mysql++-fix-cstring.patch b/community/mysql++/mysql++-fix-cstring.patch
new file mode 100644
index 000000000..2a9faeb07
--- /dev/null
+++ b/community/mysql++/mysql++-fix-cstring.patch
@@ -0,0 +1,11 @@
+diff -Naur mysql++-3.1.0.old/ssx/genv2.cpp mysql++-3.1.0/ssx/genv2.cpp
+--- mysql++-3.1.0.old/ssx/genv2.cpp 2010-06-12 11:12:11.574891331 +0200
++++ mysql++-3.1.0/ssx/genv2.cpp 2010-06-12 11:14:00.564881723 +0200
+@@ -35,6 +35,7 @@
+ #include <iostream>
+ #include <fstream>
+ #include <typeinfo>
++#include <cstring>
+
+ using namespace std;
+
diff --git a/community/mysql++/mysql++-fix-size_t.patch b/community/mysql++/mysql++-fix-size_t.patch
new file mode 100644
index 000000000..908141d5d
--- /dev/null
+++ b/community/mysql++/mysql++-fix-size_t.patch
@@ -0,0 +1,21 @@
+diff -Naur mysql++-3.1.0.old//lib/refcounted.h mysql++-3.1.0/lib/refcounted.h
+--- mysql++-3.1.0.old//lib/refcounted.h 2010-06-03 19:59:23.000000000 +0200
++++ mysql++-3.1.0/lib/refcounted.h 2011-04-23 12:35:39.943366970 +0200
+@@ -101,7 +101,7 @@
+ {
+ std::auto_ptr<T> exception_guard(counted_);
+ if (counted_) {
+- refs_ = new size_t(1);
++ refs_ = new std::size_t(1);
+ }
+ exception_guard.release(); // previous new didn't throw
+ }
+@@ -255,7 +255,7 @@
+ /// We can't keep this as a plain integer because this object
+ /// allows itself to be copied. All copies need to share this
+ /// reference count, not just the pointer to the counted object.
+- size_t* refs_;
++ std::size_t* refs_;
+ };
+
+