git: 6dd648d6add8 - main - devel/hoel: Update to 1.4.18
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 20 Mar 2022 21:58:26 UTC
The branch main has been updated by dvl: URL: https://cgit.FreeBSD.org/ports/commit/?id=6dd648d6add8d9c393621eb5bfdf6e9dfc120786 commit 6dd648d6add8d9c393621eb5bfdf6e9dfc120786 Author: Dan Langille <dvl@FreeBSD.org> AuthorDate: 2022-03-20 21:43:32 +0000 Commit: Dan Langille <dvl@FreeBSD.org> CommitDate: 2022-03-20 21:54:51 +0000 devel/hoel: Update to 1.4.18 Include an upstream patch: Implement all dummy functions when a database backend is not supported https://github.com/babelouest/hoel/commit/9e414f145af2a3423eccee68acf23dcca9ca44a5 --- devel/hoel/Makefile | 2 +- devel/hoel/distinfo | 6 +-- devel/hoel/files/patch-src_hoel-mariadb.c | 51 ++++++++++++++++++++ devel/hoel/files/patch-src_hoel-pgsql.c | 54 +++++++++++++++++++++ devel/hoel/files/patch-src_hoel-sqlite.c | 80 +++++++++++++++++++++++++++++++ devel/hoel/pkg-plist | 2 +- 6 files changed, 190 insertions(+), 5 deletions(-) diff --git a/devel/hoel/Makefile b/devel/hoel/Makefile index 4c199b0150ce..aa25a6bc29ec 100644 --- a/devel/hoel/Makefile +++ b/devel/hoel/Makefile @@ -1,6 +1,6 @@ PORTNAME= hoel DISTVERSIONPREFIX= v -DISTVERSION= 1.4.14 +DISTVERSION= 1.4.18 CATEGORIES= devel MAINTAINER= dvl@FreeBSD.org diff --git a/devel/hoel/distinfo b/devel/hoel/distinfo index 66f3f80048e5..80a97667f61d 100644 --- a/devel/hoel/distinfo +++ b/devel/hoel/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1640726967 -SHA256 (babelouest-hoel-v1.4.14_GH0.tar.gz) = 613920cb9ab7cebb1435117f8f750b19b93b7eae2ce7204bef0564b882a2333d -SIZE (babelouest-hoel-v1.4.14_GH0.tar.gz) = 203595 +TIMESTAMP = 1647812219 +SHA256 (babelouest-hoel-v1.4.18_GH0.tar.gz) = 5013533001ac30f3b9f290a1f6de9de9e73d9ba2be21689f9963cafeeb779d30 +SIZE (babelouest-hoel-v1.4.18_GH0.tar.gz) = 84222 diff --git a/devel/hoel/files/patch-src_hoel-mariadb.c b/devel/hoel/files/patch-src_hoel-mariadb.c new file mode 100644 index 000000000000..9c74dc49fc79 --- /dev/null +++ b/devel/hoel/files/patch-src_hoel-mariadb.c @@ -0,0 +1,51 @@ +--- src/hoel-mariadb.c.orig 2020-02-11 23:34:18 UTC ++++ src/hoel-mariadb.c +@@ -435,4 +435,48 @@ void h_close_mariadb(struct _h_connection * conn) { + y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with MariaDB backend"); + } + ++char * h_escape_string_mariadb(const struct _h_connection * conn, const char * unsafe) { ++ UNUSED(conn); ++ UNUSED(unsafe); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with MariaDB backend"); ++ return NULL; ++} ++ ++char * h_escape_string_with_quotes_mariadb(const struct _h_connection * conn, const char * unsafe) { ++ UNUSED(conn); ++ UNUSED(unsafe); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with MariaDB backend"); ++ return NULL; ++} ++ ++long long int h_last_insert_id_mariadb(const struct _h_connection * conn) { ++ UNUSED(conn); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with MariaDB backend"); ++ return 0; ++} ++ ++int h_execute_query_mariadb(const struct _h_connection * conn, const char * query, struct _h_result * h_result) { ++ UNUSED(conn); ++ UNUSED(query); ++ UNUSED(h_result); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with MariaDB backend"); ++ return H_ERROR; ++} ++ ++int h_execute_query_json_mariadb(const struct _h_connection * conn, const char * query, json_t ** j_result) { ++ UNUSED(conn); ++ UNUSED(query); ++ UNUSED(j_result); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with MariaDB backend"); ++ return H_ERROR; ++} ++ ++struct _h_data * h_get_mariadb_value(const char * value, const unsigned long length, const int m_type) { ++ UNUSED(value); ++ UNUSED(length); ++ UNUSED(m_type); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with MariaDB backend"); ++ return NULL; ++} ++ + #endif diff --git a/devel/hoel/files/patch-src_hoel-pgsql.c b/devel/hoel/files/patch-src_hoel-pgsql.c new file mode 100644 index 000000000000..3db6b5bbeaea --- /dev/null +++ b/devel/hoel/files/patch-src_hoel-pgsql.c @@ -0,0 +1,54 @@ +--- src/hoel-pgsql.c.orig 2020-02-11 23:34:18 UTC ++++ src/hoel-pgsql.c +@@ -118,7 +118,7 @@ struct _h_connection * h_connect_pgsql(const char * co + pthread_mutexattr_init ( &mutexattr ); + pthread_mutexattr_settype( &mutexattr, PTHREAD_MUTEX_RECURSIVE ); + if (pthread_mutex_init(&(((struct _h_pgsql *)conn->connection)->lock), &mutexattr) != 0) { +- y_log_message(Y_LOG_LEVEL_ERROR, "Impossible to initialize Mutex Lock for MariaDB connection"); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Impossible to initialize Mutex Lock for PostgreSQL connection"); + } + pthread_mutexattr_destroy( &mutexattr ); + } else { +@@ -404,6 +404,42 @@ struct _h_connection * h_connect_pgsql(const char * co + void h_close_pgsql(struct _h_connection * conn) { + UNUSED(conn); + y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with PostgreSQL backend"); ++} ++ ++char * h_escape_string_pgsql(const struct _h_connection * conn, const char * unsafe) { ++ UNUSED(conn); ++ UNUSED(unsafe); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with PostgreSQL backend"); ++ return NULL; ++} ++ ++char * h_escape_string_with_quotes_pgsql(const struct _h_connection * conn, const char * unsafe) { ++ UNUSED(conn); ++ UNUSED(unsafe); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with PostgreSQL backend"); ++ return NULL; ++} ++ ++long long int h_last_insert_id_pgsql(const struct _h_connection * conn) { ++ UNUSED(conn); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with PostgreSQL backend"); ++ return 0; ++} ++ ++int h_execute_query_pgsql(const struct _h_connection * conn, const char * query, struct _h_result * h_result) { ++ UNUSED(conn); ++ UNUSED(query); ++ UNUSED(h_result); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with PostgreSQL backend"); ++ return H_ERROR; ++} ++ ++int h_execute_query_json_pgsql(const struct _h_connection * conn, const char * query, json_t ** j_result) { ++ UNUSED(conn); ++ UNUSED(query); ++ UNUSED(j_result); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with PostgreSQL backend"); ++ return H_ERROR; + } + + #endif diff --git a/devel/hoel/files/patch-src_hoel-sqlite.c b/devel/hoel/files/patch-src_hoel-sqlite.c new file mode 100644 index 000000000000..8224eb805882 --- /dev/null +++ b/devel/hoel/files/patch-src_hoel-sqlite.c @@ -0,0 +1,80 @@ +--- src/hoel-sqlite.c.orig 2020-02-11 23:34:18 UTC ++++ src/hoel-sqlite.c +@@ -212,6 +212,20 @@ int h_select_query_sqlite(const struct _h_connection * + * return H_OK on success + */ + int h_exec_query_sqlite(const struct _h_connection * conn, const char * query) { ++ return h_execute_query_sqlite(conn, query); ++} ++ ++/** ++ * h_execute_query_sqlite ++ * Execute a query on a sqlite connection ++ * This is an internal function, you should use h_exec_query instead ++ * Should not be executed by the user because all parameters are supposed to be correct ++ * No result is returned, useful for single INSERT, UPDATE or DELETE statements ++ * @param conn the connection to the database ++ * @param query the SQL query to execute ++ * @return H_OK on success ++ */ ++int h_execute_query_sqlite(const struct _h_connection * conn, const char * query) { + if (sqlite3_exec(((struct _h_sqlite *)conn->connection)->db_handle, query, NULL, NULL, NULL) == SQLITE_OK) { + return H_OK; + } else { +@@ -222,7 +236,6 @@ int h_exec_query_sqlite(const struct _h_connection * c + y_log_message(Y_LOG_LEVEL_DEBUG, "Query: \"%s\"", query); + return H_ERROR_QUERY; + } +- + } + + /** +@@ -309,6 +322,48 @@ struct _h_connection * h_connect_sqlite(const char * d + void h_close_sqlite(struct _h_connection * conn) { + UNUSED(conn); + y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with SQLite backend"); ++} ++ ++char * h_escape_string_sqlite(const struct _h_connection * conn, const char * unsafe) { ++ UNUSED(conn); ++ UNUSED(unsafe); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with SQLite backend"); ++ return NULL; ++} ++ ++char * h_escape_string_with_quotes_sqlite(const struct _h_connection * conn, const char * unsafe) { ++ UNUSED(conn); ++ UNUSED(unsafe); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with SQLite backend"); ++ return NULL; ++} ++ ++long long int h_last_insert_id_sqlite(const struct _h_connection * conn) { ++ UNUSED(conn); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with SQLite backend"); ++ return 0; ++} ++ ++int h_exec_query_sqlite(const struct _h_connection * conn, const char * query) { ++ UNUSED(conn); ++ UNUSED(query); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with SQLite backend"); ++ return H_ERROR; ++} ++ ++int h_execute_query_sqlite(const struct _h_connection * conn, const char * query) { ++ UNUSED(conn); ++ UNUSED(query); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with SQLite backend"); ++ return H_ERROR; ++} ++ ++int h_execute_query_json_sqlite(const struct _h_connection * conn, const char * query, json_t ** j_result) { ++ UNUSED(conn); ++ UNUSED(query); ++ UNUSED(j_result); ++ y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with SQLite backend"); ++ return H_ERROR; + } + + #endif diff --git a/devel/hoel/pkg-plist b/devel/hoel/pkg-plist index 75646e234adb..3dd4047bea0e 100644 --- a/devel/hoel/pkg-plist +++ b/devel/hoel/pkg-plist @@ -2,5 +2,5 @@ include/hoel-cfg.h include/hoel.h lib/libhoel.so lib/libhoel.so.1.4 -lib/libhoel.so.1.4.14 +lib/libhoel.so.1.4.18 libdata/pkgconfig/libhoel.pc