1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils flag-o-matic toolchain-funcs autotools
9 DESCRIPTION="A freely available and fully compliant implementation of the CORBA standard"
10 HOMEPAGE="http://www.mico.org/"
11 SRC_URI="http://www.mico.org/${P}.tar.gz"
15 LICENSE="GPL-2 LGPL-2"
17 KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~ppc-aix ~ia64-hpux ~amd64-linux ~x86-linux ~sparc-solaris ~x86-winnt"
18 IUSE="gtk postgres qt4 ssl tcl threads X"
19 RESTRICT="test" #298101
21 [[ -z ${PATCH_VER} ]] || \
22 SRC_URI="${SRC_URI} https://dev.gentoo.org/~haubi/distfiles/${P}-gentoo-patches-${PATCH_VER}.tar.bz2"
25 # bluetooth? ( net-wireless/bluez )
28 gtk? ( x11-libs/gtk+:2 )
29 postgres? ( dev-db/postgresql )
30 qt4? ( dev-qt/qtgui:4[qt3support] )
31 ssl? ( dev-libs/openssl )
32 tcl? ( dev-lang/tcl:0 )
36 >=sys-devel/flex-2.5.2
37 >=sys-devel/bison-1.22
43 EPATCH_SUFFIX=patch epatch "${WORKDIR}"/patches
47 # cannot use big TOC (AIX only), gdb doesn't like it.
48 # This assumes that the compiler (or -wrapper) uses
49 # gcc flag '-mminimal-toc' for compilation.
50 sed -i -e 's/,-bbigtoc//' "${S}"/configure
53 sed -i -e "s, -lqt\", $(pkg-config --libs Qt3Support)\"," configure ||
54 die "cannot update to use Qt3Support of qt4"
62 # need gtk-1 wrapper for gtk-2
63 export PATH="${WORKDIR}"/helpers:${PATH}
66 # Don't know which version of JavaCUP would suffice, but there is no
67 # configure argument to disable checking for JavaCUP.
68 # So we override the configure check to not find 'javac'.
69 export ac_cv_path_JAVAC=no
71 # '--without-ssl' just does not add another search path - the only way
72 # to disable openssl utilization seems to override the configure check.
73 use ssl || export ac_cv_lib_ssl_open=no
75 # CFLAGS aren't used when checking for <qapplication.h>, but CPPFLAGS are.
76 use qt4 && append-cppflags $(pkg-config --cflags Qt3Support)
83 myconf --disable-mini-stl
84 myconf $(use_enable threads)
86 # '--without-*' or '--with-*=no' does not disable some features,
87 # the value needs to be empty instead.
88 # This applies to: gtk, pgsql, qt, tcl, bluetooth.
89 myconf --with-gtk=$( use gtk && echo "${EPREFIX}"/usr)
90 myconf --with-pgsql=$(use postgres && echo "${EPREFIX}"/usr)
91 myconf --with-qt=$( use qt4 && echo "${EPREFIX}"/usr)
92 myconf --with-tcl=$( use tcl && echo "${EPREFIX}"/usr)
93 # bluetooth and wireless both don't compile cleanly
94 myconf --with-bluetooth=''
95 myconf --disable-wireless
96 # But --without-x works.
97 myconf $(use_with X x "${EPREFIX}"/usr)
99 # http://www.mico.org/pipermail/mico-devel/2009-April/010285.html
100 [[ ${CHOST} == *-hpux* ]] && append-cppflags -D_XOPEN_SOURCE_EXTENDED
102 if [[ ${CHOST} == *-winnt* ]]; then
103 # disabling static libs, since ar on interix takes nearly
104 # one hour per library, thanks to mico's monster objects.
106 ewarn "disabling USE='threads', does not work on ${CHOST}"
107 myconf --disable-threads --disable-static --enable-final
108 append-flags -D__STDC__
115 emake INSTDIR="${ED}"usr SHARED_INSTDIR="${ED}"usr install LDCONFIG=: || die "install failed"
116 if [[ $(get_libdir) != lib ]]; then #500744
117 mv "${ED}"usr/lib "${ED}"usr/$(get_libdir) || die
120 dodir /usr/share || die
121 mv "${ED}"usr/man "${ED}"usr/share || die
122 dodir /usr/share/doc/${PF} || die
123 mv "${ED}"usr/doc "${ED}"usr/share/doc/${PF} || die
125 dodoc BUGS CHANGES* CONVERT FAQ README* ROADMAP TODO VERSION WTODO || die