git: d04baab6f500 - main - databases/ejdb: new port had been added (+)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 01 May 2022 13:36:21 UTC
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=d04baab6f5007e2e427c8026cc148eb0b5192b31 commit d04baab6f5007e2e427c8026cc148eb0b5192b31 Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2022-05-01 13:35:10 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2022-05-01 13:35:10 +0000 databases/ejdb: new port had been added (+) Embeddable JSON database engine C library which supports simple XPath-like query language (JQL). WWW: https://ejdb.org/ --- databases/Makefile | 1 + databases/ejdb/Makefile | 31 +++++++++++++ databases/ejdb/distinfo | 3 ++ databases/ejdb/files/patch-src_CMakeLists.txt | 56 +++++++++++++++++++++++ databases/ejdb/files/patch-src_jbs_CMakeLists.txt | 11 +++++ databases/ejdb/pkg-descr | 4 ++ databases/ejdb/pkg-plist | 19 ++++++++ 7 files changed, 125 insertions(+) diff --git a/databases/Makefile b/databases/Makefile index 6ec124117f74..451eca18c7ee 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -53,6 +53,7 @@ SUBDIR += dbow SUBDIR += dbtool SUBDIR += dbview + SUBDIR += ejdb SUBDIR += elixir-calecto SUBDIR += elixir-db_connection SUBDIR += elixir-ecto diff --git a/databases/ejdb/Makefile b/databases/ejdb/Makefile new file mode 100644 index 000000000000..95da44a575e9 --- /dev/null +++ b/databases/ejdb/Makefile @@ -0,0 +1,31 @@ +# Created by: Alexey Dokuchaev <danfe@FreeBSD.org> + +PORTNAME= ejdb +PORTVERSION= 2.72 +DISTVERSIONPREFIX= v +CATEGORIES= databases + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Embeddable JSON database engine library + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libiowow.so:databases/iowow \ + libiwnet.so:net/iwnet + +USES= cmake compiler:c11 +USE_GITHUB= yes +GH_ACCOUNT= Softmotions +USE_LDCONFIG= yes + +CMAKE_ARGS= -DCMAKE_LOCALBASE:PATH="${LOCALBASE}" \ + -DBUILD_EXAMPLES:BOOL=OFF + +OPTIONS_DEFINE= DOCS + +post-patch: + @${GREP} -Rl --null '#include <ejdb2/iowow/' ${WRKSRC}/src | \ + ${XARGS} -0 ${REINPLACE_CMD} -e 's,ejdb2/iowow,iowow,' + +.include <bsd.port.mk> diff --git a/databases/ejdb/distinfo b/databases/ejdb/distinfo new file mode 100644 index 000000000000..8976800f6267 --- /dev/null +++ b/databases/ejdb/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1645610423 +SHA256 (Softmotions-ejdb-v2.72_GH0.tar.gz) = 295ed40c67cfcbf7cae369cbea87a2d636d73c005dd3a3352159650e9b2423c6 +SIZE (Softmotions-ejdb-v2.72_GH0.tar.gz) = 905396 diff --git a/databases/ejdb/files/patch-src_CMakeLists.txt b/databases/ejdb/files/patch-src_CMakeLists.txt new file mode 100644 index 000000000000..eca6d095e812 --- /dev/null +++ b/databases/ejdb/files/patch-src_CMakeLists.txt @@ -0,0 +1,56 @@ +--- src/CMakeLists.txt.orig 2022-02-23 10:00:23 UTC ++++ src/CMakeLists.txt +@@ -15,6 +15,7 @@ set(PROJECT_GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR}/ + + list(APPEND PROJECT_INCLUDE_DIRS "${PROJECT_GENERATED_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/include") ++list(APPEND PROJECT_INCLUDE_DIRS "${CMAKE_LOCALBASE}/include") + + if(APPLE) + option(BUILD_FRAMEWORK "Build an OS X framework" OFF) +@@ -34,13 +35,10 @@ include(CheckIncludeFiles) + include(CheckLibraryExists) + include(TestBigEndian) + +-include(AddIOWOW) +- + if(ENABLE_HTTP) + if(WIN32) + message(FATAL_ERROR "ENABLE_HTTP option cannot be used in Windows build") + endif() +- include(AddIWNET) + add_definitions(-DJB_HTTP) + list(APPEND MODULES jbr) + endif() +@@ -160,7 +158,7 @@ endif() + set(CMAKE_C_FLAGS_DEBUG + "${CMAKE_C_ASAN} -O0 -g -ggdb -Werror -DDEBUG -D_DEBUG -UNDEBUG -Wno-unused-variable" + ) +-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_ASAN} -O3 -DNDEBUG") ++set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_ASAN} -DNDEBUG") + # set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-Wl,-s") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} -g") + set(CMAKE_C_FLAGS_RELEASEWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") +@@ -174,7 +172,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tmpl/ejdb2c + file(GLOB PROJECT_GENERATED_HDRS ${PROJECT_GENERATED_DIR}/*.h) + list(APPEND ALL_HDRS ${PROJECT_GENERATED_HDRS}) + +-set(PCLIBS "-liowow -lm") ++set(PCLIBS "-liwnet -liowow -lm") + if(DEFINED IWNET_INCLUDE_DIR) + set(PCLIBS "-liwnet ${PCLIBS}") + endif() +@@ -349,13 +347,6 @@ if(DO_INSTALL_CORE) + FILES_MATCHING + PATTERN "*.h") + endif() +- +- install( +- DIRECTORY ${IOWOW_INCLUDE_DIR}/iowow +- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} +- COMPONENT headers +- FILES_MATCHING +- PATTERN "*.h") + + install(FILES ${CMAKE_SOURCE_DIR}/LICENSE ${CMAKE_SOURCE_DIR}/Changelog + DESTINATION ${CMAKE_INSTALL_DOCDIR}) diff --git a/databases/ejdb/files/patch-src_jbs_CMakeLists.txt b/databases/ejdb/files/patch-src_jbs_CMakeLists.txt new file mode 100644 index 000000000000..af4b9e4c37e0 --- /dev/null +++ b/databases/ejdb/files/patch-src_jbs_CMakeLists.txt @@ -0,0 +1,11 @@ +--- src/jbs/CMakeLists.txt.orig 2022-02-23 10:00:23 UTC ++++ src/jbs/CMakeLists.txt +@@ -1,6 +1,7 @@ + # Executables + add_executable(jbs jbs.c) +-target_link_libraries(jbs ejdb2_s) ++target_link_libraries(jbs ejdb2_s iowow iwnet) ++target_link_directories(jbs PRIVATE "${CMAKE_LOCALBASE}/lib") + + if(CMAKE_BUILD_TYPE STREQUAL "Release") + add_custom_command( diff --git a/databases/ejdb/pkg-descr b/databases/ejdb/pkg-descr new file mode 100644 index 000000000000..b443f116f5c3 --- /dev/null +++ b/databases/ejdb/pkg-descr @@ -0,0 +1,4 @@ +Embeddable JSON database engine C library which supports simple XPath-like +query language (JQL). + +WWW: https://ejdb.org/ diff --git a/databases/ejdb/pkg-plist b/databases/ejdb/pkg-plist new file mode 100644 index 000000000000..4f28a3c960de --- /dev/null +++ b/databases/ejdb/pkg-plist @@ -0,0 +1,19 @@ +bin/jbs +include/ejdb2/ejdb2.h +include/ejdb2/jbl.h +include/ejdb2/jbr.h +include/ejdb2/jql.h +lib/libejdb2-2.a +lib/libejdb2.so +lib/libejdb2.so.2 +lib/libejdb2.so.2.72 +libdata/pkgconfig/libejdb2.pc +man/man1/jbs.1.gz +man/man3/ejdb2.3.gz +%%PORTDOCS%%%%DOCSDIR%%2/Changelog +%%PORTDOCS%%%%DOCSDIR%%2/LICENSE +%%PORTDOCS%%%%DOCSDIR%%2/README +%%DATADIR%%2/ejdb2-exports-%%CMAKE_BUILD_TYPE%%.cmake +%%DATADIR%%2/ejdb2-exports.cmake +%%DATADIR%%2/ejdb2-static-exports-%%CMAKE_BUILD_TYPE%%.cmake +%%DATADIR%%2/ejdb2-static-exports.cmake