aboutsummaryrefslogtreecommitdiffstats
path: root/devel/ace/Makefile
blob: 696d8f45d988c6f7bdfa6f7ad65fc1637ad63daa (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Ports collection makefile for:    ace
# Date created:             5 January 2004
# Whom:                 Sergey Matveychuk <sem@ciam.ru>
#
# $FreeBSD$
#

PORTNAME=   ace
PORTVERSION=    6.1.2
CATEGORIES= devel
MASTER_SITES=   ftp://download.dre.vanderbilt.edu/previous_versions/ \
        http://download.dre.vanderbilt.edu/previous_versions/
DISTNAME=   ACE-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    The Adaptive Communication Environment for C++

OPTIONS_DEFINE= SSL TRIO X11 FLTK TK QT4
OPTIONS_DEFAULT=SSL
TRIO_DESC=  Enable trio support
FLTK_DESC=  Enable FLTK support
TK_DESC=    Enable Tcl/Tk support

CONFLICTS=  ace+tao-5*

WRKSRC=     ${WRKDIR}/ACE_wrappers

USE_BZIP2=  yes
USE_GNOME=  pkgconfig
USE_PERL5_BUILD=yes
USE_GMAKE=  yes
MAKE_ENV=   LD_LIBRARY_PATH="${WRKSRC}/lib" ACE_ROOT="${WRKSRC}" \
        CROSS-COMPILE=1
MAKEFILE=   GNUmakefile
USE_LDCONFIG=   yes
MAKE_JOBS_SAFE= yes

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

PLIST_SUB=  VERSION="${PORTVERSION}"

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MSSL}
USE_OPENSSL=    yes
MAKE_ENV+=  ssl=1
PLIST_SUB+= OPENSSL=""
.else
PLIST_SUB+= OPENSSL="@comment "
.endif

.if ${PORT_OPTIONS:MTRIO}
BUILD_DEPENDS+= trio>=0:${PORTSDIR}/devel/trio
MAKE_ENV+=  trio=1
.endif

.if ${PORT_OPTIONS:MX11}
USE_XORG=   xt
MAKE_ENV+=  xt=1
PLIST_SUB+= X11=""
.else
PLIST_SUB+= X11="@comment "
.endif

.if ${PORT_OPTIONS:MFLTK}
LIB_DEPENDS+=   fltk:${PORTSDIR}/x11-toolkits/fltk
MAKE_ENV+=  fl=1
PLIST_SUB+= FLTK=""
.else
PLIST_SUB+= FLTK="@comment "
.endif

.if ${PORT_OPTIONS:MTK}
USE_TK_BUILD=   yes
USE_TK=     yes
MAKE_ENV+=  tk=1
PLIST_SUB+= TK=""
.else
PLIST_SUB+= TK="@comment "
.endif

.if ${PORT_OPTIONS:MQT4}
USE_QT4=    corelib gui moc_build
MAKE_ENV+=  qt=1 qt4=1 QTDIR="${QT_PREFIX}"
CPPFLAGS+=  -I${QT_INCDIR}
LDFLAGS+=   -L${QT_LIBDIR}
PLIST_SUB+= QT=""
.else
PLIST_SUB+= QT="@comment "
.endif

.include <bsd.port.pre.mk>

.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
BROKEN=     Does not compile on ia64, powerpc, or sparc64
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        's|/$$libdir/pkgconfig|/libdata/pkgconfig|g' ${WRKSRC}/bin/ace_install_pkgconfig.pl
    @${REINPLACE_CMD} -e \
        's|bin/moc)|bin/moc-qt4)|g ; \
         s|bin/moc,|bin/moc-qt4,|'g ${WRKSRC}/ace/QtReactor/GNUmakefile.ACE_Qt4Reactor_moc

do-configure:
    @cd ${WRKSRC}/ace \
        && ${ECHO_CMD} "#include <ace/config-${OPSYS:L}.h>" >> config.h
    @cd ${WRKSRC}/include/makeinclude \
        && ${ECHO_CMD} "include \$$(ACE_ROOT)/include/makeinclude/platform_${OPSYS:L}.GNU" >> platform_macros.GNU \
        && ${ECHO_CMD} "CC= ${CC}" >> platform_macros.GNU \
        && ${ECHO_CMD} "CXX=    ${CXX}" >> platform_macros.GNU \
        && ${ECHO_CMD} "CPPFLAGS=   ${CPPFLAGS}" >> platform_macros.GNU \
        && ${ECHO_CMD} "LDFLAGS=    ${LDFLAGS}" >> platform_macros.GNU \
        && ${ECHO_CMD} "DCFLAGS=" >> platform_macros.GNU \
        && ${ECHO_CMD} "OCFLAGS=    ${CFLAGS}" >> platform_macros.GNU \
        && ${ECHO_CMD} "INSTALL_PREFIX= ${PREFIX}" >> platform_macros.GNU

post-install:
    @for f in `${LS} -d \
        ${PREFIX}/lib/libACE*.so.${PORTVERSION} \
        ${PREFIX}/lib/libJAWS.so.${PORTVERSION} \
        ${PREFIX}/lib/libKokyu.so.${PORTVERSION} \
        | ${XARGS} ${BASENAME}`; do \
        n=`echo $${f}|sed -e 's/.so.${PORTVERSION}/.so/'`; \
        ${LN} -sf $${n}.${PORTVERSION} ${PREFIX}/lib/$${n}.6; \
    done

.include <bsd.port.post.mk>