openbsd-ports/databases/freetds/Makefile
sthen 0dbcb43036 Drop separate OpenSSL flavour for FreeTDS. Change main package to using
OpenSSL rather than GnuTLS. Permit packages to be distributed. Bump shared
library versions to make sure they get updated.

As researched by jasper@, the GPL has a special exception when something
depends on software provided with the base OS, so it *is* ok for us to
distribute this.

This is preferred over using GnuTLS because GnuTLS pulls in a pthread
dependency; pthread overrides libc functions, so it is necessary
that a program using this is itself linked with pthread, causing a
problem if you want to use the FreeTDS library to connect to servers
using encryption from programs which aren't themselves linked with
pthread (e.g. /usr/sbin/httpd with mod_php, or perl with DBD::Sybase).

ok jasper@ ajacoutot@
2012-05-11 09:57:02 +00:00

78 lines
2.3 KiB
Makefile

# $OpenBSD: Makefile,v 1.55 2012/05/11 09:57:02 sthen Exp $
COMMENT= database drivers for Sybase/Microsoft SQL Server
DISTNAME= freetds-0.91
REVISION= 1
SHARED_LIBS += ct 5.0 # .4.0
SHARED_LIBS += sybdb 7.0 # .5.0
SHARED_LIBS += tdsodbc 1.0 # .0.0
CATEGORIES= databases
HOMEPAGE= http://www.freetds.org/
# also http://freetds.schemamania.org/ http://freetds.sourceforge.net/
# LGPLv2+ (most things) GPLv2+ (fisql, tdspool) FDL (docs)
# No specific exception for OpenSSL, however the GPL has a special
# exception for "anything that is normally distributed...with the major
# components...of the operating system on which the executable runs,
# unless that component itself accompanies the executable."
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
WANTLIB += c crypto iodbc iodbcinst ncurses pthread readline ssl
MASTER_SITES= http://www.ibiblio.org/pub/Linux/ALPHA/freetds/stable/
AUTOCONF_VERSION=2.65
AUTOMAKE_VERSION=1.11
MODULES= devel/gettext
BUILD_DEPENDS= devel/doxygen,no_gui,bootstrap>=1.7.2 \
devel/libtool,-ltdl \
textproc/docbook-dsssl \
textproc/openjade \
${MODGNU_AUTOCONF_DEPENDS} \
${MODGNU_AUTOMAKE_DEPENDS}
LIB_DEPENDS= databases/iodbc,-main
# requires database server
REGRESS_IS_INTERACTIVE=Yes
USE_LIBTOOL= Yes
USE_GROFF= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--disable-threadsafe \
--enable-static \
--with-iodbc="${LOCALBASE}" \
--with-libiconv-prefix="${LOCALBASE}" \
--with-openssl \
--with-tdsver=7.1
CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib"
MAKE_ENV= RM=rm \
DOCBOOK_DSL=${LOCALBASE}/share/sgml/docbook/dsssl/modular/html/docbook.dsl \
SGML_CATALOG_FILES=${LOCALBASE}/share/sgml/catalog:${LOCALBASE}/share/sgml/openjade/catalog
FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/freetds
DOC= share/doc/freetds
SUBST_VARS= DOC V
pre-configure:
cd ${WRKSRC}; \
AUTOCONF_VERSION=${AUTOCONF_VERSION} \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
NOCONFIGURE=1 ./autogen.sh
@${SUBST_CMD} ${WRKSRC}/src/odbc/connectparams.c
post-install:
cd ${PREFIX}/lib && ln -s libtdsodbc.so.${LIBtdsodbc_VERSION} \
libtdsodbc.so; \
mv ${PREFIX}/share/doc/freetds-* ${PREFIX}/share/doc/freetds
.include <bsd.port.mk>