git: b64244312f5d - main - databases/odbc-cpp-wrapper: Add odbc-cpp-wrapper 1.1

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 03 Oct 2022 02:24:22 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b64244312f5d906f3a32dab2b1c2917feccbf280

commit b64244312f5d906f3a32dab2b1c2917feccbf280
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-10-03 02:10:12 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-10-03 02:10:12 +0000

    databases/odbc-cpp-wrapper: Add odbc-cpp-wrapper 1.1
    
    odbc-cpp-wrapper is an object-oriented C++-wrapper of the ODBC API. It takes
    care of
    - managing the lifetime of ODBC resources,
    - allocating and managing resources needed for ODBC operations and
    - converting ODBC errors to exceptions and throwing them.
    
    The odbc-cpp-wrapper API attempts to make usage of ODBC as simple as possible.
    The API was designed to make wrong usage almost impossible and to ensure proper
    object lifetime management.
    
    odbc-cpp-wrapper was originally developed for exchanging spatial data with
    databases. It focuses on batch operations of variable-sized data, which is not
    very well supported by other ODBC wrappers.
---
 databases/Makefile                                 |  1 +
 databases/odbc-cpp-wrapper/Makefile                | 20 ++++++++++++++++++++
 databases/odbc-cpp-wrapper/distinfo                |  3 +++
 .../odbc-cpp-wrapper/files/patch-CMakeLists.txt    | 20 ++++++++++++++++++++
 .../files/patch-src-odbc-CMakeLists.txt            | 10 ++++++++++
 databases/odbc-cpp-wrapper/pkg-descr               | 13 +++++++++++++
 databases/odbc-cpp-wrapper/pkg-plist               | 22 ++++++++++++++++++++++
 7 files changed, 89 insertions(+)

diff --git a/databases/Makefile b/databases/Makefile
index 57c8e618cd87..1d1a0f4ef5d9 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -228,6 +228,7 @@
     SUBDIR += ocaml-dbm
     SUBDIR += ocaml-mysql
     SUBDIR += ocaml-sqlite3
+    SUBDIR += odbc-cpp-wrapper
     SUBDIR += ods2sql
     SUBDIR += opendbviewer
     SUBDIR += opendbx
diff --git a/databases/odbc-cpp-wrapper/Makefile b/databases/odbc-cpp-wrapper/Makefile
new file mode 100644
index 000000000000..93dfca02f7b8
--- /dev/null
+++ b/databases/odbc-cpp-wrapper/Makefile
@@ -0,0 +1,20 @@
+PORTNAME=	odbc-cpp-wrapper
+PORTVERSION=	1.1
+DISTVERSIONPREFIX=	v
+CATEGORIES=	databases
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Object-oriented C++-wrapper of the ODBC API
+WWW=		https://github.com/SAP/odbc-cpp-wrapper
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libodbc.so:databases/unixODBC
+
+USES=		cmake compiler:c++11-lang localbase
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	SAP
+
+.include <bsd.port.mk>
diff --git a/databases/odbc-cpp-wrapper/distinfo b/databases/odbc-cpp-wrapper/distinfo
new file mode 100644
index 000000000000..35781d125c79
--- /dev/null
+++ b/databases/odbc-cpp-wrapper/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1663672720
+SHA256 (SAP-odbc-cpp-wrapper-v1.1_GH0.tar.gz) = 27b45ff65e2f2963bb642c91864892570a6a3867932a53db3b59d4179a650904
+SIZE (SAP-odbc-cpp-wrapper-v1.1_GH0.tar.gz) = 60600
diff --git a/databases/odbc-cpp-wrapper/files/patch-CMakeLists.txt b/databases/odbc-cpp-wrapper/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..699579b03eb3
--- /dev/null
+++ b/databases/odbc-cpp-wrapper/files/patch-CMakeLists.txt
@@ -0,0 +1,20 @@
+--- CMakeLists.txt.orig	2022-09-13 10:33:43 UTC
++++ CMakeLists.txt
+@@ -5,17 +5,9 @@ SET(CMAKE_CXX_STANDARD 11)
+ PROJECT(odbccpp)
+ 
+ FIND_PACKAGE(ODBC REQUIRED)
+-FIND_PACKAGE(Doxygen)
+-FIND_PACKAGE(GTest)
+ 
+ FILE(STRINGS cfg/VERSION version)
+ 
+ ENABLE_TESTING()
+ 
+ ADD_SUBDIRECTORY(src)
+-IF (GTEST_FOUND)
+-    ADD_SUBDIRECTORY(test)
+-ENDIF()
+-IF (DOXYGEN_FOUND)
+-    ADD_SUBDIRECTORY(doc)
+-ENDIF()
diff --git a/databases/odbc-cpp-wrapper/files/patch-src-odbc-CMakeLists.txt b/databases/odbc-cpp-wrapper/files/patch-src-odbc-CMakeLists.txt
new file mode 100644
index 000000000000..a9fa081c1b2d
--- /dev/null
+++ b/databases/odbc-cpp-wrapper/files/patch-src-odbc-CMakeLists.txt
@@ -0,0 +1,10 @@
+--- src/odbc/CMakeLists.txt.orig	2022-08-05 08:39:29 UTC
++++ src/odbc/CMakeLists.txt
+@@ -57,6 +57,7 @@ TARGET_COMPILE_DEFINITIONS(odbccpp_static
+         ODBC_STATIC
+ )
+ SET_PROPERTY(TARGET odbccpp_static PROPERTY POSITION_INDEPENDENT_CODE ON)
++SET_TARGET_PROPERTIES(odbccpp_static PROPERTIES OUTPUT_NAME "odbccpp")
+ 
+ # Shared library
+ ADD_LIBRARY(odbccpp
diff --git a/databases/odbc-cpp-wrapper/pkg-descr b/databases/odbc-cpp-wrapper/pkg-descr
new file mode 100644
index 000000000000..2b09872d7025
--- /dev/null
+++ b/databases/odbc-cpp-wrapper/pkg-descr
@@ -0,0 +1,13 @@
+odbc-cpp-wrapper is an object-oriented C++-wrapper of the ODBC API. It takes
+care of
+- managing the lifetime of ODBC resources,
+- allocating and managing resources needed for ODBC operations and
+- converting ODBC errors to exceptions and throwing them.
+
+The odbc-cpp-wrapper API attempts to make usage of ODBC as simple as possible.
+The API was designed to make wrong usage almost impossible and to ensure proper
+object lifetime management.
+
+odbc-cpp-wrapper was originally developed for exchanging spatial data with
+databases. It focuses on batch operations of variable-sized data, which is not
+very well supported by other ODBC wrappers.
diff --git a/databases/odbc-cpp-wrapper/pkg-plist b/databases/odbc-cpp-wrapper/pkg-plist
new file mode 100644
index 000000000000..188f59f948f9
--- /dev/null
+++ b/databases/odbc-cpp-wrapper/pkg-plist
@@ -0,0 +1,22 @@
+include/odbc/Config.h
+include/odbc/Connection.h
+include/odbc/DatabaseMetaData.h
+include/odbc/DatabaseMetaDataBase.h
+include/odbc/DatabaseMetaDataUnicode.h
+include/odbc/Environment.h
+include/odbc/Exception.h
+include/odbc/Forwards.h
+include/odbc/ParameterMetaData.h
+include/odbc/PreparedStatement.h
+include/odbc/RefCounted.h
+include/odbc/ResultSet.h
+include/odbc/ResultSetMetaData.h
+include/odbc/ResultSetMetaDataBase.h
+include/odbc/ResultSetMetaDataUnicode.h
+include/odbc/Statement.h
+include/odbc/StatementBase.h
+include/odbc/StringConverter.h
+include/odbc/Types.h
+include/odbc/Util.h
+lib/libodbccpp.a
+lib/libodbccpp.so