Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.35 2015/04/26 11:37:07 ryoon Exp $
# $NetBSD: Makefile,v 1.37 2016/02/14 10:19:22 jperkin Exp $
DISTNAME= unixODBC-2.3.2
DISTNAME= unixODBC-2.3.4
PKGNAME= ${DISTNAME:S/ODBC/odbc/}
CATEGORIES= databases
MASTER_SITES= http://www.unixodbc.org/
MASTER_SITES= ftp://ftp.unixodbc.org/pub/unixODBC/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.unixodbc.org/
@@ -12,14 +12,22 @@ LICENSE= gnu-lgpl-v2.1
CONFLICTS+= iodbc<3.52.7nb2
USE_LIBTOOL= YES
GNU_CONFIGURE= YES
USE_LIBTOOL= yes
USE_TOOLS+= flex yacc # to get libodbctxt.la
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --disable-gui
CONFIGURE_ARGS+= --enable-driverc
CONFIGURE_ARGS+= --enable-drivers
CONFIGURE_ARGS+= --enable-threads
PTHREAD_OPTS+= require
.include "../../mk/pthread.buildlink3.mk"
.if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} == "pth")
CONFIGURE_ARGS+= --enable-gnuthreads
CONFIGURE_ARGS+= --with-pth=${PTHREADBASE:Q}
.endif
LIBS.SunOS+= -lsocket -lnsl
# Override the local definitions that point to the self-contained libtool
@@ -27,42 +35,11 @@ LIBS.SunOS+= -lsocket -lnsl
# the variable pointing to the (static) libfl.a, which won't link with a
# shared library. The sources define all the relevant symbols (yywrap), so
# libfl.a isn't needed.
#
MAKE_FLAGS+= LEXLIB=""
MAKE_ENV+= AM_MAKEFLAGS=${MAKE_FLAGS:Q}
UNIXODBC_DRIVERS_DIR= lib/unixodbc
post-patch: fix-ltdl-and-lexlib
fix-driver-installation:
cd ${WRKSRC}; \
files=`${FIND} DRVConfig Drivers -name Makefile.in -print`;\
for file in $${files}; do \
sed -e "s|^\(libdir =\).*|\1 ${PREFIX}/${UNIXODBC_DRIVERS_DIR}|g" \
$${file} >> $${file}.fixed; \
mv -f $${file}.fixed $${file}; \
done
fix-ltdl-and-lexlib:
cd ${WRKSRC}; \
files=`${FIND} . -name Makefile.in -print`; \
for file in $${files}; do \
sed -e "/DEPENDENCIES/s|\$$(LIBLTDL)||g" \
-e "/LIBADD/s|@LEXLIB@|\$$(LEXLIB)|g" \
$${file} >> $${file}.fixed; \
mv -f $${file}.fixed $${file}; \
done
.include "../../mk/pthread.buildlink3.mk"
.if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} == "pth")
CONFIGURE_ARGS+= --enable-gnuthreads
CONFIGURE_ARGS+= --with-pth=${PTHREADBASE:Q}
.endif
USE_TOOLS+= flex yacc # to get libodbctxt.la
CONFIGURE_ARGS+= --disable-gui
PLIST_SUBST+= UNIXODBC_DRIVERS_DIR=${UNIXODBC_DRIVERS_DIR}
FILES_SUBST+= UNIXODBC_DRIVERS_DIR=${UNIXODBC_DRIVERS_DIR}
@@ -72,18 +49,39 @@ CONF_FILES= ${EGDIR}/odbc.ini ${PKG_SYSCONFDIR}/odbc.ini
OWN_DIRS= ${PKG_SYSCONFDIR}/ODBCDataSources
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-configure
SUBST_FILES.paths= ${WRKDIR}/odbc.ini
SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
SUBST_SED.paths+= -e 's,@UNIXODBC_DRIVERS_DIR@,${UNIXODBC_DRIVERS_DIR},g'
SUBST_STAGE.paths= post-patch
SUBST_CLASSES+= mutex
SUBST_STAGE.mutex= pre-configure
SUBST_FILES.mutex= DriverManager/__handles.c odbcinst/_logging.c
SUBST_FILES.mutex+= odbcinst/SQLGetPrivateProfileString.c
SUBST_SED.mutex= -e 's,mutex_exit,odbc_mutex_exit,g'
INSTALLATION_DIRS= ${EGDIR}
post-patch: fix-driver-installation
post-extract:
${CP} ${FILESDIR}/odbcinst.ini.in ${WRKDIR}/odbc.ini
post-patch:
set -e; cd ${WRKSRC}; \
files=`${FIND} DRVConfig Drivers -name Makefile.in -print`;\
for file in $${files}; do \
sed -e "s|^\(libdir =\).*|\1 ${PREFIX}/${UNIXODBC_DRIVERS_DIR}|g" \
$${file} >> $${file}.fixed; \
mv -f $${file}.fixed $${file}; \
done
set -e; cd ${WRKSRC}; \
files=`${FIND} . -name Makefile.in -print`; \
for file in $${files}; do \
sed -e "/DEPENDENCIES/s|\$$(LIBLTDL)||g" \
-e "/LIBADD/s|@LEXLIB@|\$$(LEXLIB)|g" \
$${file} >> $${file}.fixed; \
mv -f $${file}.fixed $${file}; \
done
post-install:
${INSTALL_DATA} ${WRKDIR}/odbc.ini ${DESTDIR}${EGDIR}/odbc.ini