summaryrefslogtreecommitdiff
path: root/pcr/ctpp2
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-01-18 17:24:33 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-01-18 20:55:33 -0300
commita2153fc23092d3b54b8ce7e65cf356e4cf76a1e6 (patch)
tree5ec35490006e945db9ef8cfc5b0502eb1faadcb4 /pcr/ctpp2
parente7f5fdc5cc92e0fce79a1e2c7ade45de37800711 (diff)
ctpp2: add new package to [pcr]
Diffstat (limited to 'pcr/ctpp2')
-rw-r--r--pcr/ctpp2/CTPP2FileSourceLoader.patch11
-rw-r--r--pcr/ctpp2/PKGBUILD47
2 files changed, 58 insertions, 0 deletions
diff --git a/pcr/ctpp2/CTPP2FileSourceLoader.patch b/pcr/ctpp2/CTPP2FileSourceLoader.patch
new file mode 100644
index 000000000..185d0679c
--- /dev/null
+++ b/pcr/ctpp2/CTPP2FileSourceLoader.patch
@@ -0,0 +1,11 @@
+--- src/CTPP2FileSourceLoader.cpp.orig 2012-08-02 16:22:44.000000000 +0900
++++ src/CTPP2FileSourceLoader.cpp 2013-01-13 01:04:57.993727806 +0900
+@@ -38,7 +38,7 @@
+ #include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-
++#include <unistd.h>
+ #ifdef WIN32
+ #include <direct.h> /* getcwd */
+ #include <windows.h>
diff --git a/pcr/ctpp2/PKGBUILD b/pcr/ctpp2/PKGBUILD
new file mode 100644
index 000000000..213a811a2
--- /dev/null
+++ b/pcr/ctpp2/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer (Arch): Daichi Shinozaki <dsdseg@gmail.com>
+# Contributor (Arch): Valentin V. Bartenev <ne@vbart.ru> http://vbart.info/
+
+pkgname=ctpp2
+pkgver=2.8.3
+pkgrel=2
+pkgdesc='CTPP (or CT++) is the fastest template engine which completely written in C++'
+arch=(i686 x86_64)
+url='http://ctpp.havoc.ru/en/'
+optdepends=(
+ 'md5: md5 support'
+)
+makedepends=(cmake make)
+source=("http://ctpp.havoc.ru/download/ctpp2-$pkgver.tar.gz"
+ 'CTPP2FileSourceLoader.patch')
+license=('custom:BSD-like')
+md5sums=('1155b65e8ca8b844c631831e4a3e5644'
+ 'ed067af369dd96ce80647071081eeefd')
+sha256sums=('a83ffd07817adb575295ef40fbf759892512e5a63059c520f9062d9ab8fb42fc'
+ '93a23e1e5ae294c009a5457116a6b40d4af64c2b1ef6bdcdf2d80e272012cbc4')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p0 -i $srcdir/CTPP2FileSourceLoader.patch
+ if [ ! -d build ]; then
+ mkdir build
+ fi
+ cd build
+ cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/usr -DSKIP_RELINK_RPATH:BOOL=ON ..
+ make VERBOSE=1
+}
+
+#check() {
+# NOTE: test 26 fail (2.8.2, 2.8.3)
+# cd "$_srcdir/build"
+# env LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" make test
+#}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"/build
+ make DESTDIR="$pkgdir" install
+ mkdir -p $pkgdir/usr/share
+ mv $pkgdir/usr/man $pkgdir/usr/share/
+ install -Dm 644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# Enjoy! ;)