Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 2023 16:00:27 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 833ccb4129f7 - main - databases/trilogy: Add trilogy 2.6.0
Message-ID:  <202310161600.39GG0Rb3031662@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

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

commit 833ccb4129f7a9938fea067a2db5f05854d86dab
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-10-16 15:17:25 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-10-16 15:59:38 +0000

    databases/trilogy: Add trilogy 2.6.0
    
    Trilogy is a client library for MySQL-compatible database servers, designed for
    performance, flexibility, and ease of embedding.
    
    It's currently in production use on github.com.
    
    Features:
    - Supports the most frequently used parts of the text protocol
      - Handshake
      - Password authentication
      - Query, ping, and quit commands
    - Support prepared statements (binary protocol)
    - Low-level protocol API completely decoupled from IO
    - Non-blocking client API wrapping the protocol API
    - Blocking client API wrapping the non-blocking API
    - No dependencies outside of POSIX, the C standard library & OpenSSL
    - Minimal dynamic allocation
    - MIT licensed
---
 databases/Makefile                     |  1 +
 databases/trilogy/Makefile             | 24 ++++++++++++++++++++++++
 databases/trilogy/distinfo             |  3 +++
 databases/trilogy/files/patch-Makefile | 24 ++++++++++++++++++++++++
 databases/trilogy/pkg-descr            | 17 +++++++++++++++++
 databases/trilogy/pkg-plist            | 16 ++++++++++++++++
 6 files changed, 85 insertions(+)

diff --git a/databases/Makefile b/databases/Makefile
index 59f7d3ab59ad..2ea92903b6f3 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -1059,6 +1059,7 @@
     SUBDIR += tinycdb
     SUBDIR += tokyocabinet
     SUBDIR += tokyotyrant
+    SUBDIR += trilogy
     SUBDIR += tsearch_extras
     SUBDIR += tuning-primer
     SUBDIR += twemproxy
diff --git a/databases/trilogy/Makefile b/databases/trilogy/Makefile
new file mode 100644
index 000000000000..aedeb5a9ba1c
--- /dev/null
+++ b/databases/trilogy/Makefile
@@ -0,0 +1,24 @@
+PORTNAME=	trilogy
+PORTVERSION=	2.6.0
+DISTVERSIONPREFIX=	v
+CATEGORIES=	databases
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Client library for MySQL-compatible database servers
+WWW=		https://github.com/trilogy-libraries/trilogy
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		gmake ssl
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	trilogy-libraries
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/example/trilogy_query ${STAGEDIR}${PREFIX}/bin/
+	cd ${WRKSRC}/inc/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include/
+	${INSTALL_DATA} ${WRKSRC}/libtrilogy.a ${STAGEDIR}${PREFIX}/lib/
+	${INSTALL_LIB} ${WRKSRC}/libtrilogy.so ${STAGEDIR}${PREFIX}/lib/
+
+.include <bsd.port.mk>
diff --git a/databases/trilogy/distinfo b/databases/trilogy/distinfo
new file mode 100644
index 000000000000..de186e94a2d1
--- /dev/null
+++ b/databases/trilogy/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1697463030
+SHA256 (trilogy-libraries-trilogy-v2.6.0_GH0.tar.gz) = 7439670bfaaf76fa88648c686b54a4db11308cc7cd2feedf86ade6732e6eaec6
+SIZE (trilogy-libraries-trilogy-v2.6.0_GH0.tar.gz) = 113662
diff --git a/databases/trilogy/files/patch-Makefile b/databases/trilogy/files/patch-Makefile
new file mode 100644
index 000000000000..591bd4280d91
--- /dev/null
+++ b/databases/trilogy/files/patch-Makefile
@@ -0,0 +1,24 @@
+--- Makefile.orig	2023-09-18 20:57:42 UTC
++++ Makefile
+@@ -21,16 +21,19 @@ else
+ endif
+ 
+ .PHONY: all
+-all: libtrilogy.a examples
++all: libtrilogy.a libtrilogy.so examples
+ 
+ .PHONY: examples
+ examples: $(EXAMPLES)
+ 
+-example/%: example/%.c libtrilogy.a
++example/%: example/%.c libtrilogy.so
+ 	$(CC) -o $@ $(CFLAGS) -pedantic $(LDFLAGS) $^ $(OPENSSL)
+ 
+ libtrilogy.a: $(OBJS)
+ 	$(AR) r $@ $^
++
++libtrilogy.so: $(OBJS)
++	$(CC) -shared $^ -o $@
+ 
+ %.o: %.c inc/trilogy/*.h
+ 	$(CC) -o $@ $(CFLAGS) -pedantic -c $<
diff --git a/databases/trilogy/pkg-descr b/databases/trilogy/pkg-descr
new file mode 100644
index 000000000000..3c677b5465ba
--- /dev/null
+++ b/databases/trilogy/pkg-descr
@@ -0,0 +1,17 @@
+Trilogy is a client library for MySQL-compatible database servers, designed for
+performance, flexibility, and ease of embedding.
+
+It's currently in production use on github.com.
+
+Features:
+- Supports the most frequently used parts of the text protocol
+  - Handshake
+  - Password authentication
+  - Query, ping, and quit commands
+- Support prepared statements (binary protocol)
+- Low-level protocol API completely decoupled from IO
+- Non-blocking client API wrapping the protocol API
+- Blocking client API wrapping the non-blocking API
+- No dependencies outside of POSIX, the C standard library & OpenSSL
+- Minimal dynamic allocation
+- MIT licensed
diff --git a/databases/trilogy/pkg-plist b/databases/trilogy/pkg-plist
new file mode 100644
index 000000000000..a75a94cfd941
--- /dev/null
+++ b/databases/trilogy/pkg-plist
@@ -0,0 +1,16 @@
+bin/trilogy_query
+include/trilogy.h
+include/trilogy/blocking.h
+include/trilogy/buffer.h
+include/trilogy/builder.h
+include/trilogy/charset.h
+include/trilogy/client.h
+include/trilogy/error.h
+include/trilogy/packet_parser.h
+include/trilogy/protocol.h
+include/trilogy/reader.h
+include/trilogy/socket.h
+include/trilogy/vendor/curl_hostcheck.h
+include/trilogy/vendor/openssl_hostname_validation.h
+lib/libtrilogy.a
+lib/libtrilogy.so



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310161600.39GG0Rb3031662>