aboutsummaryrefslogtreecommitdiff
path: root/devel/mico/Makefile
blob: 2e85d72614252d5e6cd74efed0811507ef36f309 (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
# New ports collection makefile for:   mico
# Date created:        11 July 1998
# Whom:                Marc G. Fournier <scrappy@freebsd.org>
#
# $FreeBSD$
#

PORTNAME=	mico
PORTVERSION=	2.3.11
CATEGORIES=	devel
MASTER_SITES=	http://www.mico.org/:src \
		http://www.ciam.ru/~sem/FreeBSD/:docs
DISTFILES=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:src \
		doc-html.tar.gz:docs

MAINTAINER=	sem@ciam.ru
COMMENT=	Fully compliant implementation of CORBA2.4 with some CORBA3 features

WRKSRC=			${WRKDIR}/${PORTNAME}
INSTALLS_SHLIB=		yes
GNU_CONFIGURE=		yes
USE_REINPLACE=		yes
USE_GMAKE=		yes
USE_AUTOCONF_VER=	253
.if !defined(WITH_SYSTEM_GCC)
USE_GCC=		3.3
.endif

CONFIGURE_ARGS=		--enable-cd --disable-mini-stl --enable-threads
.if !defined(WITHOUT_SERVICES)
CONFIGURE_ARGS+=	--enable-ccm --enable-life --enable-externalize
.else
CONFIGURE_ARGS+=	--disable-coss
MICO_SERVICE=		"@comment "
.endif

CONFIGURE_ENV+=		CXXFLAGS=${CPPFLAGS}

.if defined(WITH_X11)
USE_XLIB=		yes
CONFIGURE_ARGS+=	--with-x
.else
CONFIGURE_ARGS+=	--without-x
MICO_X11=		"@comment "
.endif
.if defined(WITH_QT)
USE_QT_VER=			3
CONFIGURE_ARGS+=	--with-qt=${LOCALBASE}
QTCPPFLAGS+=		${CPPFLAGS}
.else
MICO_QT=		"@comment "
.endif
.if defined(WITH_GTK)
USE_GNOME=		gtk12
CONFIGURE_ARGS+=	--with-gtk=${LOCALBASE}
.else
MICO_GTK=		"@comment "
.endif
.if defined(WITH_TCL)
LIB_DEPENDS=		tcl83:${PORTSDIR}/lang/tcl83
CONFIGURE_ARGS+=	--with-tcl
CPPFLAGS+=		-I${LOCALBASE}/include/tcl8.3
CONFIGURE_ENV+=		CPPFLAGS=${CPPFLAGS}
.else
MICO_TCL=		"@comment "
.endif

.if defined(WITHOUT_SSL) || defined(WITHOUT_SERVICES)
MICO_SSL=		"@comment "
.else
USE_OPENSSL=		yes
CONFIGURE_ARGS+=	--enable-ssl=${OPENSSLBASE}
CONFIGURE_ARGS+=	--enable-csiv2 --enable-csl2
.endif

.include <bsd.port.pre.mk>

PLIST_SUB+=	MICO_X11=${MICO_X11} MICO_QT=${MICO_QT} MICO_GTK=${MICO_GTK} \
		MICO_TCL=${MICO_TCL} MICO_SSL=${MICO_SSL} \
		MICO_SERVICE=${MICO_SERVICE}

MAN1=		idl.1 imr.1 nsadmin.1
MAN5=		micorc.5
MAN8=		ird.8 micod.8 nsd.8

pre-fetch:
	@${ECHO_MSG} "============================================================================"
.if ${OSVERSION} < 500035
	@${ECHO_MSG} "Use WITH_SYSTEM_GCC=yes to build Mico with system gcc."
	@${ECHO_MSG} ""
.endif
	@${ECHO_MSG} "Following options are allowed:"
	@${ECHO_MSG} ""
	@${ECHO_MSG} "WITHOUT_SERVICES=yes  - build without services, only ORB"
	@${ECHO_MSG} "WITHOUT_SSL=yes       - build without SSL and security services"
	@${ECHO_MSG} "WITH_X11=yes, WITH_QT=yes, WITH_GTK=yes, WITH_TCL=yes"
	@${ECHO_MSG} "============================================================================"

post-extract:
	@${TAR} xzf ${DISTDIR}/doc-html.tar.gz -C ${WRKDIR}

post-patch:
	@${REINPLACE_CMD} -e "s#\"-O2\"#\"${CFLAGS}\"#;s#\"-pthread#\"${PTHREAD_LIBS}#" ${WRKSRC}/configure.in
.if ${OSVERSION} < 500035
	@${LN} -s /usr/include/g++/FlexLexer.h ${WRKSRC}/include
.endif

post-configure:
	@${FIND} ${WRKSRC}/demo -name Makefile | ${XARGS} \
		${REINPLACE_CMD} -e "s#/doc/mico/examples#${EXAMPLESDIR:S#^${PREFIX}##}#"
	@${REINPLACE_CMD} -e "s#/doc/mico/examples#${EXAMPLESDIR:S#^${PREFIX}##}#" ${WRKSRC}/demo/MakeVars
	@${REINPLACE_CMD} -e "s#ministl##" ${WRKSRC}/include/Makefile
	@${RM} -f ${WRKSRC}/include/mico/*.orig ${WRKSRC}/include/coss/*.orig

post-install:
	@for i in `${GREP} '^lib/lib.*so$$' ${TMPPLIST}`; do \
		${LN} -fs ${PREFIX}/$$i ${PREFIX}/$$i.1; \
	done; \
	for i in `${GREP} ^bin/ ${TMPPLIST}`; do \
		(${STRIP_CMD} ${PREFIX}/$$i || ${TRUE}) 2> /dev/null; \
	done
.if !defined(NOPORTDOCS)
	${GMAKE} -C ${WRKSRC} install-doc
	${MKDIR} ${DOCSDIR}/html
	${INSTALL_DATA} ${WRKDIR}/doc/doc/* ${DOCSDIR}/html
.endif

.include <bsd.port.post.mk>