pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Bump freetds to 1.4.12



Module Name:	pkgsrc-wip
Committed By:	Bartosz Kuzma <bartosz.kuzma%gmail.com@localhost>
Pushed By:	bartosz.kuzma
Date:		Fri May 10 02:07:44 2024 +0000
Changeset:	6301090ec6d1f4db7b5d9530a0050c1aa3761995

Modified Files:
	Makefile
Added Files:
	freetds/DESCR
	freetds/Makefile
	freetds/PLIST
	freetds/buildlink3.mk
	freetds/distinfo
	freetds/options.mk
	freetds/patches/patch-include_freetds_thread.h
	freetds/patches/patch-src_apps_Makefile.in
	freetds/patches/patch-src_tds_tls.c

Log Message:
Bump freetds to 1.4.12

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6301090ec6d1f4db7b5d9530a0050c1aa3761995

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                       |  1 +
 freetds/DESCR                                  |  7 +++
 freetds/Makefile                               | 52 ++++++++++++++++++++
 freetds/PLIST                                  | 53 +++++++++++++++++++++
 freetds/buildlink3.mk                          | 25 ++++++++++
 freetds/distinfo                               |  8 ++++
 freetds/options.mk                             | 66 ++++++++++++++++++++++++++
 freetds/patches/patch-include_freetds_thread.h | 15 ++++++
 freetds/patches/patch-src_apps_Makefile.in     | 33 +++++++++++++
 freetds/patches/patch-src_tds_tls.c            | 15 ++++++
 10 files changed, 275 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 930a738acd..c5c593c2a8 100644
--- a/Makefile
+++ b/Makefile
@@ -967,6 +967,7 @@ SUBDIR+=	freeswitch-core
 SUBDIR+=	freeswitch-music
 SUBDIR+=	freesynd
 SUBDIR+=	freetalk
+SUBDIR+=	freetds
 SUBDIR+=	freevrrpd
 SUBDIR+=	fribid
 SUBDIR+=	fricas-svn
diff --git a/freetds/DESCR b/freetds/DESCR
new file mode 100644
index 0000000000..71c9bb3a27
--- /dev/null
+++ b/freetds/DESCR
@@ -0,0 +1,7 @@
+FreeTDS is a set of libraries that allows programs to natively talk
+to Microsoft SQL Server and Sybase databases.
+
+Technically speaking, FreeTDS is an open source implementation of the
+TDS (Tabular Data Stream) protocol used by these databases for their
+own clients.  It supports many different flavors of the protocol and
+three APIs -- DB-Lib, CT-Lib, and ODBC -- to access it.
diff --git a/freetds/Makefile b/freetds/Makefile
new file mode 100644
index 0000000000..86af87a73a
--- /dev/null
+++ b/freetds/Makefile
@@ -0,0 +1,52 @@
+# $NetBSD$
+
+DISTNAME=	freetds-1.4.12
+PKGREVISION=
+CATEGORIES=	databases
+MASTER_SITES=	ftp://ftp.freetds.org/pub/freetds/stable/
+EXTRACT_SUFX=	.tar.bz2
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://www.freetds.org/
+COMMENT=	Implementation of TDS protocol used by Sybase and MS-SQL servers
+LICENSE=	gnu-lgpl-v2
+
+USE_LIBTOOL=		yes
+GNU_CONFIGURE=		yes
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+=	--datadir=${PREFIX}/share
+CONFIGURE_ARGS+=	--with-libiconv-prefix=${BUILDLINK_PREFIX.iconv}
+# CONFIGURE_ARGS+=	--with-tdsver=7.0
+# no thread-safe resolver functions on NetBSD
+# CONFIGURE_ARGS+=	--disable-threadsafe
+TEST_TARGET=		check
+
+# Fails to build the shared lib on SunOS with -O2 or greater
+BUILDLINK_TRANSFORM.SunOS+=	rm:-O[23]
+
+EGDIR=		${PREFIX}/share/examples/freetds
+CONF_FILES+=	${EGDIR}/freetds.conf ${PKG_SYSCONFDIR}/freetds.conf
+CONF_FILES+=	${EGDIR}/locales.conf ${PKG_SYSCONFDIR}/locales.conf
+CONF_FILES+=	${EGDIR}/pool.conf ${PKG_SYSCONFDIR}/pool.conf
+
+# doc/Makefile ignores TARGET_DOCDIR for the files listed in
+# nobase_data_DATA.  Make the Makefiles think the documentation is
+# in doc/freetds through symlinks and by overriding DOCDIR.
+MAKE_FLAGS+=		DOCDIR=doc/freetds
+INSTALL_MAKE_FLAGS+=	${MAKE_FLAGS} ETC=${DESTDIR}${EGDIR}
+
+SUBST_CLASSES+=			visibility
+SUBST_STAGE.visibility=		pre-configure
+SUBST_MESSAGE.visibility=	Turn off visibility for GCC 4.2
+SUBST_FILES.visibility+=	include/freetds/odbc.h \
+				include/freetds/popvis.h \
+				include/freetds/pushvis.h
+SUBST_SED.visibility+=		-e 's,!defined(__MINGW32__),!defined(__MINGW32__) \&\& !(__GNUC__ == 4 \&\& __GNUC_MINOR__ == 2),g'
+
+.include "options.mk"
+
+.include "../../converters/libiconv/buildlink3.mk"
+# rl_on_new_line, rl_reset_line_state
+.include "../../devel/readline/buildlink3.mk"
+.include "../../devel/libltdl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/freetds/PLIST b/freetds/PLIST
new file mode 100644
index 0000000000..005116366a
--- /dev/null
+++ b/freetds/PLIST
@@ -0,0 +1,53 @@
+@comment $NetBSD$
+bin/bsqldb
+${PLIST.odbc}bin/bsqlodbc
+bin/datacopy
+bin/defncopy
+bin/fisql
+bin/freebcp
+bin/osql
+bin/tdspool
+bin/tsql
+include/bkpublic.h
+include/cspublic.h
+include/cstypes.h
+include/ctpublic.h
+include/odbcss.h
+include/sqldb.h
+include/sqlfront.h
+include/sybdb.h
+include/syberror.h
+include/sybfront.h
+include/tds_sysdep_public.h
+lib/libct.la
+lib/libsybdb.la
+${PLIST.odbc}lib/libtdsodbc.la
+man/man1/bsqldb.1
+man/man1/bsqlodbc.1
+man/man1/datacopy.1
+man/man1/defncopy.1
+man/man1/fisql.1
+man/man1/freebcp.1
+man/man1/osql.1
+man/man1/tsql.1
+man/man5/freetds.conf.5
+share/doc/freetds/images/callouts/1.gif
+share/doc/freetds/images/callouts/10.gif
+share/doc/freetds/images/callouts/2.gif
+share/doc/freetds/images/callouts/3.gif
+share/doc/freetds/images/callouts/4.gif
+share/doc/freetds/images/callouts/5.gif
+share/doc/freetds/images/callouts/6.gif
+share/doc/freetds/images/callouts/7.gif
+share/doc/freetds/images/callouts/8.gif
+share/doc/freetds/images/callouts/9.gif
+share/doc/freetds/images/caution.gif
+share/doc/freetds/images/important.gif
+share/doc/freetds/images/note.gif
+share/doc/freetds/images/tip.gif
+share/doc/freetds/images/warning.gif
+share/doc/freetds/reference/index.html
+share/doc/freetds/userguide/index.html
+share/examples/freetds/freetds.conf
+share/examples/freetds/locales.conf
+share/examples/freetds/pool.conf
diff --git a/freetds/buildlink3.mk b/freetds/buildlink3.mk
new file mode 100644
index 0000000000..8ef4e53ec9
--- /dev/null
+++ b/freetds/buildlink3.mk
@@ -0,0 +1,25 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	freetds
+
+.if !defined(FREETDS_BUILDLINK3_MK)
+FREETDS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.freetds+=	freetds>=1.4
+BUILDLINK_PKGSRCDIR.freetds?=	../../databases/freetds
+
+.include "../../converters/libiconv/buildlink3.mk"
+
+pkgbase := freetds
+.include "../../mk/pkg-build-options.mk"
+
+.if ${PKG_BUILD_OPTIONS.freetds:Mgnutls}
+.  include "../../security/gnutls/buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.freetds:Mopenssl}
+.  include "../../security/openssl/buildlink3.mk"
+.endif
+.endif # FREETDS_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-freetds
diff --git a/freetds/distinfo b/freetds/distinfo
new file mode 100644
index 0000000000..1c6432de77
--- /dev/null
+++ b/freetds/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+BLAKE2s (freetds-1.4.12.tar.bz2) = 2dfa41a40026e3f349aa2518f8ba848d3db166102aba9c6218296d2f8ee31a2a
+SHA512 (freetds-1.4.12.tar.bz2) = cb537490a06c12aa25ce02e1c3b474ad8d6a2be0737719c1b9f83d51245d275abcbd6f4a32dec158cac964ea924458609e253bf9c1497572e386a7436506df8c
+Size (freetds-1.4.12.tar.bz2) = 2401192 bytes
+SHA1 (patch-include_freetds_thread.h) = a96ed1514cb91beca978bcb1d758d1fe0d6a611b
+SHA1 (patch-src_apps_Makefile.in) = 0826569571ff16473964f8651bbdeae27f496842
+SHA1 (patch-src_tds_tls.c) = 015c2637a84a44b11cc11ba5685d90f1c5a4739f
diff --git a/freetds/options.mk b/freetds/options.mk
new file mode 100644
index 0000000000..795e90c75e
--- /dev/null
+++ b/freetds/options.mk
@@ -0,0 +1,66 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.freetds
+PKG_OPTIONS_OPTIONAL_GROUPS+=	odbc tls
+PKG_OPTIONS_GROUP.odbc=		iodbc unixodbc
+PKG_OPTIONS_GROUP.tls=		gnutls openssl
+PKG_SUPPORTED_OPTIONS=		kerberos
+PKG_SUGGESTED_OPTIONS=		openssl
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=			odbc
+
+###
+### Kerberos5 support
+###
+.if !empty(PKG_OPTIONS:Mkerberos)
+CONFIGURE_ARGS+=	--enable-krb5
+.include "../../mk/krb5.buildlink3.mk"
+.endif
+
+###
+### Whether to build with iODBC to enable ODBC access to TDS servers.
+###
+.if !empty(PKG_OPTIONS:Miodbc)
+ODBC_DRIVER=		yes
+.  include "../../databases/iodbc/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-odbc
+CONFIGURE_ARGS+=	--with-iodbc=${BUILDLINK_PREFIX.iodbc}
+PLIST.odbc=		yes
+.endif
+
+###
+### Whether to build with unixODBC to enable ODBC access to TDS servers.
+###
+.if !empty(PKG_OPTIONS:Munixodbc)
+.  include "../../databases/unixodbc/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-odbc
+CONFIGURE_ARGS+=	--with-unixodbc=${BUILDLINK_PREFIX.unixodbc}
+PLIST.odbc=		yes
+.endif
+
+.if empty(PKG_OPTIONS:Miodbc) && empty(PKG_OPTIONS:Munixodbc)
+CONFIGURE_ARGS+=	--disable-odbc
+.endif
+
+###
+### Use GNU TLS for TLSv1 encrypted session to MSSQL servers.
+###
+.if !empty(PKG_OPTIONS:Mgnutls)
+USE_TOOLS+=	pkg-config
+.include "../../security/gnutls/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-gnutls
+.else
+CONFIGURE_ARGS+=	--without-gnutls
+.endif
+
+###
+### Use OpenSSL for TLSv1 encrypted session to MSSQL servers.
+###
+.if !empty(PKG_OPTIONS:Mopenssl)
+.include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-openssl=${BUILDLINK_PREFIX.openssl}
+.else
+CONFIGURE_ARGS+=	--without-openssl
+.endif
diff --git a/freetds/patches/patch-include_freetds_thread.h b/freetds/patches/patch-include_freetds_thread.h
new file mode 100644
index 0000000000..27830738b2
--- /dev/null
+++ b/freetds/patches/patch-include_freetds_thread.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* Check _REENTRANT, too.
+
+--- include/freetds/thread.h.orig	2023-09-12 12:07:40.000000000 +0000
++++ include/freetds/thread.h
+@@ -24,7 +24,7 @@
+ 
+ #undef TDS_HAVE_MUTEX
+ 
+-#if defined(_THREAD_SAFE) && defined(TDS_HAVE_PTHREAD_MUTEX)
++#if (defined(_REENTRANT) || defined(_THREAD_SAFE)) && defined(TDS_HAVE_PTHREAD_MUTEX)
+ 
+ #include <tds_sysdep_public.h>
+ #include <freetds/sysdep_types.h>
diff --git a/freetds/patches/patch-src_apps_Makefile.in b/freetds/patches/patch-src_apps_Makefile.in
new file mode 100644
index 0000000000..2a6d5dc16e
--- /dev/null
+++ b/freetds/patches/patch-src_apps_Makefile.in
@@ -0,0 +1,33 @@
+$NetBSD$
+
+Also link libtds
+
+--- src/apps/Makefile.in.orig	2024-04-01 09:55:29.000000000 +0000
++++ src/apps/Makefile.in
+@@ -142,7 +142,7 @@ bsqlodbc_LINK = $(LIBTOOL) $(AM_V_lt) --
+ 	$(bsqlodbc_LDFLAGS) $(LDFLAGS) -o $@
+ am_datacopy_OBJECTS = datacopy.$(OBJEXT)
+ datacopy_OBJECTS = $(am_datacopy_OBJECTS)
+-datacopy_DEPENDENCIES = ../dblib/libsybdb.la \
++datacopy_DEPENDENCIES = ../dblib/libsybdb.la ../tds/libtds.la \
+ 	../replacements/libreplacements.la $(am__DEPENDENCIES_1)
+ defncopy_SOURCES = defncopy.c
+ defncopy_OBJECTS = defncopy.$(OBJEXT)
+@@ -150,7 +150,7 @@ defncopy_DEPENDENCIES = ../dblib/libsybd
+ 	../replacements/libreplacements.la $(am__DEPENDENCIES_1)
+ am_freebcp_OBJECTS = freebcp.$(OBJEXT)
+ freebcp_OBJECTS = $(am_freebcp_OBJECTS)
+-freebcp_DEPENDENCIES = ../dblib/libsybdb.la \
++freebcp_DEPENDENCIES = ../dblib/libsybdb.la  ../tds/libtds.la \
+ 	../replacements/libreplacements.la $(am__DEPENDENCIES_1)
+ tsql_SOURCES = tsql.c
+ tsql_OBJECTS = tsql.$(OBJEXT)
+@@ -470,7 +470,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include 
+ SUBDIRS = fisql . unittests
+ DIST_SUBDIRS = $(SUBDIRS)
+ dist_bin_SCRIPTS = osql
+-freebcp_LDADD = ../dblib/libsybdb.la ../replacements/libreplacements.la $(LTLIBICONV)
++freebcp_LDADD = ../dblib/libsybdb.la ../tds/libtds.la ../replacements/libreplacements.la $(LTLIBICONV)
+ freebcp_SOURCES = freebcp.c freebcp.h
+ tsql_LDADD = ../tds/libtds.la \
+ 		  ../replacements/libreplacements.la \
diff --git a/freetds/patches/patch-src_tds_tls.c b/freetds/patches/patch-src_tds_tls.c
new file mode 100644
index 0000000000..68da8cdd2e
--- /dev/null
+++ b/freetds/patches/patch-src_tds_tls.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Allow building with LibreSSL 3.7.0
+
+--- src/tds/tls.c.orig	2018-04-03 09:00:03.000000000 +0000
++++ src/tds/tls.c
+@@ -594,7 +594,7 @@ tds_ssl_free(BIO *a)
+ 	return 1;
+ }
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x1010000FL || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x1010000FL || (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER - 0 < 0x3070000fL))
+ static BIO_METHOD tds_method_login[1] = {
+ {
+ 	BIO_TYPE_MEM,


Home | Main Index | Thread Index | Old Index