1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-17 08:01:36 +00:00

New port: devel/docopt.cpp: C++11 options parser based on help messages

This commit is contained in:
Yuri Victorovich 2018-11-15 08:17:31 +00:00
parent aeeb3c5db0
commit 9b3961da72
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=485006
6 changed files with 97 additions and 0 deletions

View File

@ -468,6 +468,7 @@
SUBDIR += dmake
SUBDIR += dmalloc
SUBDIR += dmucs
SUBDIR += docopt.cpp
SUBDIR += doctorj
SUBDIR += dolphin-plugins
SUBDIR += dolphin-plugins-kde4

27
devel/docopt.cpp/Makefile Normal file
View File

@ -0,0 +1,27 @@
# $FreeBSD$
PORTNAME= docopt.cpp
DISTVERSION= 0.6.2-6
DISTVERSIONSUFFIX= -g7476f8e
CATEGORIES= devel
MAINTAINER= yuri@FreeBSD.org
COMMENT= C++11 options parser based on help messages
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE-MIT
TEST_DEPENDS= python${PYTHON_DEFAULT}:lang/python${PYTHON_DEFAULT:S/.//}
USES= cmake:outsource compiler:c++11-lang
USE_GITHUB= yes
GH_ACCOUNT= docopt
USE_LDCONFIG= yes
do-test:
@cd ${BUILD_WRKSRC} && \
${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DWITH_TESTS=ON ${CMAKE_SOURCE_PATH} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
python${PYTHON_DEFAULT} run_tests
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1542265786
SHA256 (docopt-docopt.cpp-0.6.2-6-g7476f8e_GH0.tar.gz) = 6bb641a2b4502feba7302e7190f4a60537298134d334df6b1e27c5d85ad819bc
SIZE (docopt-docopt.cpp-0.6.2-6-g7476f8e_GH0.tar.gz) = 27080

View File

@ -0,0 +1,52 @@
--- CMakeLists.txt.orig 2018-11-15 07:15:24 UTC
+++ CMakeLists.txt
@@ -42,7 +42,7 @@ if(MSVC OR XCODE)
# Xcode does not support libraries with only object files as sources.
# See https://cmake.org/cmake/help/v3.0/command/add_library.html?highlight=add_library
add_library(docopt SHARED ${docopt_SOURCES} ${docopt_HEADERS})
- add_library(docopt_s STATIC ${docopt_SOURCES} ${docopt_HEADERS})
+ #add_library(docopt_s STATIC ${docopt_SOURCES} ${docopt_HEADERS})
else()
# If not using MSVC or Xcode, we will create an intermediate object target
# to avoid compiling the source code twice.
@@ -50,11 +50,11 @@ else()
set_target_properties(docopt_o PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_library(docopt SHARED $<TARGET_OBJECTS:docopt_o>)
- add_library(docopt_s STATIC $<TARGET_OBJECTS:docopt_o>)
+ #add_library(docopt_s STATIC $<TARGET_OBJECTS:docopt_o>)
endif()
target_include_directories(docopt PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> $<INSTALL_INTERFACE:include/docopt>)
-target_include_directories(docopt_s PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> $<INSTALL_INTERFACE:include/docopt>)
+#target_include_directories(docopt_s PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> $<INSTALL_INTERFACE:include/docopt>)
if(MSVC)
# DOCOPT_DLL: Must be specified when building *and* when using the DLL.
@@ -67,7 +67,7 @@ endif()
if(NOT MSVC)
set_target_properties(docopt PROPERTIES OUTPUT_NAME docopt)
- set_target_properties(docopt_s PROPERTIES OUTPUT_NAME docopt)
+ #set_target_properties(docopt_s PROPERTIES OUTPUT_NAME docopt)
endif()
if(USE_BOOST_REGEX)
@@ -79,7 +79,7 @@ if(USE_BOOST_REGEX)
include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(docopt ${Boost_LIBRARIES})
if(WITH_STATIC)
- target_link_libraries(docopt_s ${Boost_LIBRARIES})
+ #target_link_libraries(docopt_s ${Boost_LIBRARIES})
endif()
endif()
@@ -116,7 +116,7 @@ set(export_name "docopt-targets")
install(TARGETS docopt EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR})
# Development package
-install(TARGETS docopt_s EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+#install(TARGETS docopt_s EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES ${docopt_HEADERS} DESTINATION include/docopt)
# CMake Package

View File

@ -0,0 +1,5 @@
docopt.cpp generates an option parser based on help messages in man-like style.
It eliminates the need to write the repeatable parser code, and instead works
off of help messages.
WWW: https://github.com/docopt/docopt.cpp

View File

@ -0,0 +1,9 @@
include/docopt/docopt.h
include/docopt/docopt_private.h
include/docopt/docopt_util.h
include/docopt/docopt_value.h
lib/cmake/docopt/docopt-config-version.cmake
lib/cmake/docopt/docopt-config.cmake
lib/cmake/docopt/docopt-targets-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/docopt/docopt-targets.cmake
lib/libdocopt.so