diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2021-04-24 04:41:48 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2021-04-24 04:41:48 +0000 |
commit | 4f891b0688d48dce9e0c658961d78894a604deaa (patch) | |
tree | ae072ebd3003cc7ae4570641bc29fd5f563c4ac1 | |
parent | 220a773993790f1cf55b9f7d57fdbde0b5969b8c (diff) | |
download | ports-4f891b0688d48dce9e0c658961d78894a604deaa.tar.gz ports-4f891b0688d48dce9e0c658961d78894a604deaa.zip |
New port: textproc/cpp-peglib: C++ header-only PEG (Parsing Expression Grammars) library
-rw-r--r-- | textproc/Makefile | 1 | ||||
-rw-r--r-- | textproc/cpp-peglib/Makefile | 27 | ||||
-rw-r--r-- | textproc/cpp-peglib/distinfo | 3 | ||||
-rw-r--r-- | textproc/cpp-peglib/files/patch-CMakeLists.txt | 19 | ||||
-rw-r--r-- | textproc/cpp-peglib/pkg-descr | 6 |
5 files changed, 56 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile index a1b3714f497b..715568c4a47d 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -103,6 +103,7 @@ SUBDIR += confetti SUBDIR += confget SUBDIR += consul-template + SUBDIR += cpp-peglib SUBDIR += crex SUBDIR += crimson SUBDIR += crunch diff --git a/textproc/cpp-peglib/Makefile b/textproc/cpp-peglib/Makefile new file mode 100644 index 000000000000..ab37b067b3da --- /dev/null +++ b/textproc/cpp-peglib/Makefile @@ -0,0 +1,27 @@ +PORTNAME= cpp-peglib +DISTVERSIONPREFIX= v +DISTVERSION= 1.3.7 +CATEGORIES= textproc devel + +MAINTAINER= yuri@FreeBSD.org +COMMENT= C++ header-only PEG (Parsing Expression Grammars) library + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= cmake compiler:c++17-lang + +USE_GITHUB= yes +GH_ACCOUNT= yhirose + +NO_ARCH= yes + +PLIST_FILES= include/peglib.h + +do-test: + @cd ${BUILD_WRKSRC} && \ + ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DFREEBSD_BUILD_TESTS:BOOL=ON ${CMAKE_SOURCE_PATH} && \ + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \ + test/test-main + +.include <bsd.port.mk> diff --git a/textproc/cpp-peglib/distinfo b/textproc/cpp-peglib/distinfo new file mode 100644 index 000000000000..eace9f8324c2 --- /dev/null +++ b/textproc/cpp-peglib/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1619238419 +SHA256 (yhirose-cpp-peglib-v1.3.7_GH0.tar.gz) = 3f68843d442e5013ff927cadc6ae2e2364305fbf30dee287c798b094642124f8 +SIZE (yhirose-cpp-peglib-v1.3.7_GH0.tar.gz) = 289691 diff --git a/textproc/cpp-peglib/files/patch-CMakeLists.txt b/textproc/cpp-peglib/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..dfb2b7ffb390 --- /dev/null +++ b/textproc/cpp-peglib/files/patch-CMakeLists.txt @@ -0,0 +1,19 @@ +--- CMakeLists.txt.orig 2021-03-31 01:03:42 UTC ++++ CMakeLists.txt +@@ -17,10 +17,16 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(add_link_deps Threads::Threads) + endif() + ++if (FREEBSD_BUILD_EXAMPLES) + add_subdirectory(example) ++endif() ++if (FREEBSD_BUILD_LINT) + add_subdirectory(lint) ++endif() + ++if (FREEBSD_BUILD_TESTS) + add_subdirectory(test) + enable_testing() ++endif() + + install(FILES peglib.h DESTINATION include) diff --git a/textproc/cpp-peglib/pkg-descr b/textproc/cpp-peglib/pkg-descr new file mode 100644 index 000000000000..c4c5d4f1cdfb --- /dev/null +++ b/textproc/cpp-peglib/pkg-descr @@ -0,0 +1,6 @@ +cpp-peglib is a single file C++ header-only PEG (Parsing Expression Grammars) +library. + +This library supports the linear-time parsing known as the Packrat parsing. + +WWW: https://github.com/yhirose/cpp-peglib |