aboutsummaryrefslogtreecommitdiffstats
path: root/databases/libiodbc/Makefile
blob: 9a7d418a2665266ae266fefc61b9e25a3d7a4c45 (plain) (blame)
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
67
68
# New ports collection makefile for:    libiodbc
# Date created:             24 Mar 2000
# Whom:                 erikhb@bgnett.no
#
# $FreeBSD$
#
# Note:  The location of ${INIDIR} and the installed name of the "odbctest"
#        binary were chosen such that this port does not conflict with
#        databases/unixODBC.

PORTNAME=   libiodbc
PORTVERSION=    3.52.4
PORTREVISION=   1
CATEGORIES= databases
MASTER_SITES=   http://www.iodbc.org/downloads/iODBC/ \
        ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= iodbc

MAINTAINER= ports@FreeBSD.org
COMMENT=    An ODBC 3.x driver manager, for universal data source access

CONFLICTS=  unixODBC-[0-9]*

USE_GNOME=  gnomehack gnometarget pkgconfig
USE_GMAKE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --with-iodbc-inidir=${INIDIR}
USE_LDCONFIG=   yes

MAN1=       iodbc-config.1 iodbctest.1 iodbctestw.1

CPPFLAGS=   ${PTHREAD_CFLAGS} -D_BSD_WCHAR_T_DEFINED_
LDFLAGS=    ${PTHREAD_LIBS}
INIDIR=     ${PREFIX}/etc/${PORTNAME}

.if !defined(WITHOUT_GUI) && !defined(WITHOUT_X11)
USE_GNOME+= gtk12
MAN1+=      iodbcadm-gtk.1
PLIST_SUB+= GUI=""
.else
CONFIGURE_ARGS+=    --disable-gui
PLIST_SUB+= GUI="@comment "
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        's|$$CFLAGS -pthread|$$CFLAGS|g' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e \
        '/^SUBDIRS/s|samples||' ${WRKSRC}/Makefile.in
    @${REINPLACE_CMD} -e \
        's|-ldl||g' ${WRKSRC}/admin/libiodbc.pc.in

post-install:
    @${MKDIR} ${INIDIR}
    ${INSTALL_DATA} ${WRKSRC}/etc/odbc*.ini.sample ${INIDIR}
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for f in AUTHORS ChangeLog NEWS README
    ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
    @${MKDIR} ${EXAMPLESDIR}
.for f in Makefile iodbctest.c
    ${INSTALL_DATA} ${WRKSRC}/samples/${f} ${EXAMPLESDIR}
.endfor
.endif

.include <bsd.port.mk>