blob: 2e17e6ace0d3f6c7cdd135a0a364c732f8e0e7d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# $NetBSD: Makefile.common,v 1.2 2001/11/07 06:12:19 jlam Exp $
DISTNAME= unixODBC-${ODBC_DIST_VERS}
CATEGORIES= databases
MASTER_SITES= http://www.unixodbc.org/
MAINTAINER?= jlam@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_PKG_VERS pkgsrc revisions of php (nbX, etc.)
# ODBC_VERS pkgsrc version number of package
#
ODBC_DIST_VERS= 2.0.11
ODBC_BASE_VERS= ${ODBC_DIST_VERS}
ODBC_PKG_VERS?= # empty
ODBC_VERS= ${ODBC_BASE_VERS}${ODBC_PKG_VERS}
USE_LIBTOOL= YES
LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --sysconfdir=/etc
CONFIGURE_ARGS+= --enable-threads
CONFIGURE_ARGS+= --enable-gnuthreads
CONFIGURE_ARGS+= --with-pth=${BUILDLINK_DIR}
# 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_DIR}/include"
MAKE_FLAGS+= LEXLIB=""
MAKE_ENV+= AM_MAKEFLAGS="${MAKE_FLAGS}"
UNIXODBC_DRIVERS_DIR= lib/unixodbc
post-patch: fix-ltdl-and-lexlib
fix-driver-installation:
cd ${WRKSRC}; \
files=`${FIND} ODBCConfig DRVConfig Drivers -name Makefile.in`; \
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`; \
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/libtool/buildlink.mk"
.include "../../devel/pth/buildlink.mk"
|