[BACK]Return to Makefile.common CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / databases / unixodbc

File: [cvs.NetBSD.org] / pkgsrc / databases / unixodbc / Attic / Makefile.common (download)

Revision 1.19, Mon Dec 5 23:55:05 2005 UTC (17 years, 1 month ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2005Q4-base, pkgsrc-2005Q4
Changes since 1.18: +3 -3 lines

Ran "pkglint --autofix", which corrected some of the quoting issues in
CONFIGURE_ARGS.

# $NetBSD: Makefile.common,v 1.19 2005/12/05 23:55:05 rillig Exp $

DISTNAME=	unixODBC-${ODBC_DIST_VERS}
CATEGORIES=	databases
MASTER_SITES=	http://www.unixodbc.org/

MAINTAINER?=	tech-pkg@NetBSD.org
HOMEPAGE?=	http://www.unixodbc.org/

# Version numbering scheme:
#
# ODBC_DIST_VERS	version number on the php distfile
# ODBC_BASE_VERS	pkgsrc-mangled version number (convert pl -> .)
#
ODBC_DIST_VERS=		2.0.11
ODBC_BASE_VERS=		${ODBC_DIST_VERS}

USE_LIBTOOL=		YES

GNU_CONFIGURE=		YES
CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+=	--enable-threads
PTHREAD_OPTS+=		require

# Override the local definitions that point to the self-contained libtool
# convenience library.  We want the one installed by pkgsrc.  Also override
# 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+=		LIBLTDL="-lltdl"
MAKE_FLAGS+=		INCLTDL="-I${BUILDLINK_PREFIX.ltdl}/include"
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} ODBCConfig 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 "../../devel/libltdl/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"

.if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} == "pth")
CONFIGURE_ARGS+=	--enable-gnuthreads
CONFIGURE_ARGS+=	--with-pth=${PTHREADBASE:Q}
.endif