aboutsummaryrefslogtreecommitdiffstats
path: root/databases/unixODBC/Makefile
blob: 7e09882daaa8ef8776134b5fa8c6c93f6ea7faed (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
# New ports collection makefile for:    unixODBC
# Date created:         May 11, 2000
# Whom:                 Nick Sayer <nsayer@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   unixODBC
PORTVERSION=    2.0.7
PORTREVISION=   1
CATEGORIES= databases
MASTER_SITES=   http://www.unixodbc.org/

MAINTAINER= ports@FreeBSD.org

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --enable-static --enable-shared
INSTALLS_SHLIB= yes

.if defined(WITH_GUI)
USE_QT_VER= 2
QT_NONSTANDARD= yes
CONFIGURE_ENV=  MOC="${MOC}" LIBQT="-l${QTNAME}" \
        USER_INCLUDES="${QTCPPFLAGS}" \
        USER_LDFLAGS="${QTCFGLIBS}"
CONFIGURE_ARGS+=    --enable-gui \
            --with-qt-includes=${X11BASE}/include/qt2 \
            --with-qt-libraries=${X11BASE}/lib \
            --with-extra-includes=${LOCALBASE}/include \
            --with-extra-libs=${LOCALBASE}/lib
PLIST_SUB=  GUI:=""
.else
CONFIGURE_ARGS+=    --disable-gui
PLIST_SUB=  GUI:="@comment "
.endif

.if defined(WITH_PTHREAD)
CONFIGURE_ARGS+=    --enable-threads=yes
.else
CONFIGURE_ARGS+=    --enable-threads=no
.endif

pre-patch:
.if defined(WITH_PTHREAD)
    @${PERL} -pi -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
             s|-lqt|-lqt2-mt|g' ${WRKSRC}/configure
.else
    @${PERL} -pi -e 's|-lqt|-lqt2|g' ${WRKSRC}/configure
.endif
    @${PERL} -pi -e 's| -lc||g' ${WRKSRC}/ltmain.sh

post-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${PREFIX}/share/doc/unixODBC
    ${TAR} -C ${WRKSRC}/doc --exclude '*Makefile*' -cf - . \
        | ${TAR} -C ${PREFIX}/share/doc/unixODBC --unlink -xf -
    @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/doc/unixODBC
.endif

.include <bsd.port.mk>