New package: ctpp2-2.8.3

This commit is contained in:
John 2017-09-30 21:23:47 +02:00 committed by Jürgen Buchmüller
parent 30ab8754ff
commit 5cadeb1f02
7 changed files with 182 additions and 0 deletions

View File

@ -2411,6 +2411,8 @@ libobsglad.so.0 obs-0.14.1_2
libobs-opengl.so.0 obs-0.14.1_2
libobs-frontend-api.so.0 obs-20.1.3_1
libzimg.so.2 zimg-2.0.4_1
libkiwix.so.1 kiwix-lib-1.0.1_1
libctpp2.so.2 ctpp2-2.8.3_1
libvapoursynth.so vapoursynth-R32_2
libvapoursynth-script.so.0 vapoursynth-R32_1
libtwolame.so.0 twolame-0.3.13_1
@ -2942,6 +2944,8 @@ libKF5Kipi.so.32.0.0 libkipi5-17.04.3_1
libfswatch.so.9 fswatch-1.11.2_1
libhackrf.so.0 libhackrf-2017.02.1_1
libzim.so.3 libzim-3.0.0_1
libkiwix.so.1 kiwix-lib-1.0.1_1
libctpp2.so.2 ctpp2-2.8.3_1
librpm.so.7 rpm-4.13.0.2_1
librpmsign.so.7 rpm-4.13.0.2_1
librpmbuild.so.7 rpm-4.13.0.2_1

1
srcpkgs/ctpp2-devel Symbolic link
View File

@ -0,0 +1 @@
ctpp2

View File

@ -0,0 +1,11 @@
--- CMakeLists.txt.bak 2017-10-02 08:24:20.064257777 +0200
+++ CMakeLists.txt 2017-10-02 08:25:14.400254219 +0200
@@ -809,7 +809,7 @@
man/ctpp2i.1
man/ctpp2json.1
man/ctpp2vm.1
- DESTINATION man/man1
+ DESTINATION share/man/man1
PERMISSIONS OWNER_READ OWNER_WRITE
GROUP_READ
WORLD_READ)

View File

@ -0,0 +1,20 @@
--- CTPP2SysTypes.h 2017-09-30 19:03:34.762026248 +0200
+++ include/CTPP2SysTypes.h 2017-09-30 19:08:28.973037461 +0200
@@ -41,7 +41,7 @@
#include <sys/types.h>
#include <stdint.h>
-#if defined(__linux__) || defined(linux) || defined(CYGWIN) || defined(__CYGWIN__)
+#if defined(__linux__) && defined (__GLIBC__) || defined(linux) && defined (__GLIBC__) || defined(CYGWIN) || defined(__CYGWIN__)
/**
@var typedef __int16_t INT_16
@@ -134,7 +134,7 @@
typedef UCCHAR_8 * UCCHAR_P;
-#elif defined(__FreeBSD__) || defined(__APPLE__) /* Linux End, start of FreeBSD / Mac OS declarations */
+#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(linux) && !defined (__GLIBC__) || defined(__linux__) && !defined (__GLIBC__) /* Linux End, start of FreeBSD / Mac OS declarations */
/**
@var typedef int16_t INT_16

View File

@ -0,0 +1,10 @@
--- CTPP2FileSourceLoader.cpp 2017-09-30 17:45:16.712937712 +0200
+++ src/CTPP2FileSourceLoader.cpp 2017-09-30 17:45:42.048938678 +0200
@@ -38,6 +38,7 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#ifdef WIN32
#include <direct.h> /* getcwd */

View File

@ -0,0 +1,109 @@
--- CMakeLists.txt.orig 2017-10-06 13:15:21.282961157 +0200
+++ CMakeLists.txt 2017-10-06 13:17:15.567953674 +0200
@@ -462,61 +462,61 @@
#
# CTPP Compiler
-ADD_EXECUTABLE(ctpp2c tests/CTPP2Compiler.cpp)
-TARGET_LINK_LIBRARIES(ctpp2c ctpp2)
+ADD_EXECUTABLE(ctpp2c tests/CTPP2Compiler.cpp)
+TARGET_LINK_LIBRARIES(ctpp2c ctpp2)
# CTPP2 Interpreter
-ADD_EXECUTABLE(ctpp2i tests/CTPP2Interpreter.cpp)
-TARGET_LINK_LIBRARIES(ctpp2i ctpp2)
+ADD_EXECUTABLE(ctpp2i tests/CTPP2Interpreter.cpp)
+TARGET_LINK_LIBRARIES(ctpp2i ctpp2)
# CTPP2 virtual machine
-ADD_EXECUTABLE(ctpp2vm tests/CTPP2Emulator.cpp)
-TARGET_LINK_LIBRARIES(ctpp2vm ctpp2)
+ADD_EXECUTABLE(ctpp2vm tests/CTPP2Emulator.cpp)
+TARGET_LINK_LIBRARIES(ctpp2vm ctpp2)
# CTPP2 JSON parser
-ADD_EXECUTABLE(ctpp2json tests/CTPP2JSONParser.cpp)
-TARGET_LINK_LIBRARIES(ctpp2json ctpp2)
+ADD_EXECUTABLE(ctpp2json tests/CTPP2JSONParser.cpp)
+TARGET_LINK_LIBRARIES(ctpp2json ctpp2)
# ################################################################################
# Test suite
#
ENABLE_TESTING()
-ADD_EXECUTABLE(CDTTest tests/CDTTest.cpp)
-TARGET_LINK_LIBRARIES(CDTTest ctpp2)
+#ADD_EXECUTABLE(CDTTest tests/CDTTest.cpp)
+#TARGET_LINK_LIBRARIES(CDTTest ctpp2)
-ADD_EXECUTABLE(CDTPerfTest tests/CDTPerfTest.cpp)
-TARGET_LINK_LIBRARIES(CDTPerfTest ctpp2)
+#ADD_EXECUTABLE(CDTPerfTest tests/CDTPerfTest.cpp)
+#TARGET_LINK_LIBRARIES(CDTPerfTest ctpp2)
-ADD_EXECUTABLE(BitIndexTest tests/BitIndexText.cpp)
-TARGET_LINK_LIBRARIES(BitIndexTest ctpp2)
+#ADD_EXECUTABLE(BitIndexTest tests/BitIndexText.cpp)
+#TARGET_LINK_LIBRARIES(BitIndexTest ctpp2)
-ADD_EXECUTABLE(HashTest tests/HashTest.cpp)
-TARGET_LINK_LIBRARIES(HashTest ctpp2)
+#ADD_EXECUTABLE(HashTest tests/HashTest.cpp)
+#TARGET_LINK_LIBRARIES(HashTest ctpp2)
-ADD_EXECUTABLE(StaticTextTest tests/StaticTextTest.cpp)
-TARGET_LINK_LIBRARIES(StaticTextTest ctpp2)
+#ADD_EXECUTABLE(StaticTextTest tests/StaticTextTest.cpp)
+#TARGET_LINK_LIBRARIES(StaticTextTest ctpp2)
#ADD_EXECUTABLE(StaticDataTest tests/StaticDataTest.cpp)
#TARGET_LINK_LIBRARIES(StaticDataTest ctpp2)
-ADD_EXECUTABLE(VMArgStackTest tests/VMArgStackTest.cpp)
-TARGET_LINK_LIBRARIES(VMArgStackTest ctpp2)
+#ADD_EXECUTABLE(VMArgStackTest tests/VMArgStackTest.cpp)
+#TARGET_LINK_LIBRARIES(VMArgStackTest ctpp2)
-ADD_EXECUTABLE(VMCodeStackTest tests/VMCodeStackTest.cpp)
-TARGET_LINK_LIBRARIES(VMCodeStackTest ctpp2)
+#ADD_EXECUTABLE(VMCodeStackTest tests/VMCodeStackTest.cpp)
+#TARGET_LINK_LIBRARIES(VMCodeStackTest ctpp2)
-ADD_EXECUTABLE(CTPP2VMTest tests/CTPP2VMTest.cpp)
-TARGET_LINK_LIBRARIES(CTPP2VMTest ctpp2)
+#ADD_EXECUTABLE(CTPP2VMTest tests/CTPP2VMTest.cpp)
+#TARGET_LINK_LIBRARIES(CTPP2VMTest ctpp2)
-ADD_EXECUTABLE(CTPP2DTOATest tests/CTPP2DTOA.cpp)
-TARGET_LINK_LIBRARIES(CTPP2DTOATest ctpp2)
+#ADD_EXECUTABLE(CTPP2DTOATest tests/CTPP2DTOA.cpp)
+#TARGET_LINK_LIBRARIES(CTPP2DTOATest ctpp2)
-ADD_EXECUTABLE(simple-compiler tests/SimpleCompilerTest.cpp)
-TARGET_LINK_LIBRARIES(simple-compiler ctpp2)
+#ADD_EXECUTABLE(simple-compiler tests/SimpleCompilerTest.cpp)
+#TARGET_LINK_LIBRARIES(simple-compiler ctpp2)
-ADD_EXECUTABLE(simple-vm tests/SimpleVMTest.cpp)
-TARGET_LINK_LIBRARIES(simple-vm ctpp2)
+#ADD_EXECUTABLE(simple-vm tests/SimpleVMTest.cpp)
+#TARGET_LINK_LIBRARIES(simple-vm ctpp2)
ADD_TEST(CDT_performance_test CDTPerfTest)
ADD_TEST(CDT_ops_test CDTTest)
--- CMakeLists.txt.orig 2017-10-06 13:17:51.168951343 +0200
+++ CMakeLists.txt 2017-10-06 13:18:07.934950245 +0200
@@ -530,8 +530,8 @@
ADD_TEST(VM_self_test ctpp2vm selftest.ct2)
SET_TESTS_PROPERTIES(VM_self_test PROPERTIES DEPENDS Create_executable_file)
-ADD_EXECUTABLE(CDT2JSONBenchmark benchmarks/CDT2JSON.cpp)
-TARGET_LINK_LIBRARIES(CDT2JSONBenchmark ctpp2)
+#ADD_EXECUTABLE(CDT2JSONBenchmark benchmarks/CDT2JSON.cpp)
+#TARGET_LINK_LIBRARIES(CDT2JSONBenchmark ctpp2)
ADD_TEST(StreamLikeJsonDump_1 CDT2JSONBenchmark -t ${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/data/test.json)
ADD_TEST(StreamLikeJsonDump_2 CDT2JSONBenchmark -t ${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/data/lebowski-bench.json)
--- CMakeLists.txt.orig 2017-10-06 13:18:43.220947934 +0200
+++ CMakeLists.txt 2017-10-06 13:19:29.463944906 +0200

27
srcpkgs/ctpp2/template Normal file
View File

@ -0,0 +1,27 @@
# Template file for 'ctpp2'
pkgname=ctpp2
version=2.8.3
revision=1
build_style=cmake
configure_args="-DENABLE_OPTIMIZATION=OFF -DSKIP_RELINK_RPATH=ON -DBUILD_TESTING=OFF"
makedepends="libressl-devel"
short_desc="HTML template engine for c++"
maintainer="John <johnz@posteo.net>"
license="BSD-3-clause"
homepage="http://ctpp.havoc.ru"
distfiles="http://ctpp.havoc.ru/download/ctpp2-${version}.tar.gz"
checksum=a83ffd07817adb575295ef40fbf759892512e5a63059c520f9062d9ab8fb42fc
post_install() {
vlicense LICENSE
}
ctpp2-devel_package() {
short_desc+=" - development package"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/*.so
}
}