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 if [[ ${PV} == 9999 ]]; then
10 EDARCS_REPOSITORY="http://mico.org/mico-darcs-repository"
16 DESCRIPTION="A freely available and fully compliant implementation of the CORBA standard"
17 HOMEPAGE="http://www.mico.org/"
18 SRC_URI="http://www.mico.org/${P}.tar.gz"
20 [[ ${PV} == 9999 ]] &&
23 [[ -n ${PATCH_VER} ]] &&
24 SRC_URI="${SRC_URI} https://dev.gentoo.org/~haubi/distfiles/${P}-gentoo-patches-${PATCH_VER}.tar.bz2"
26 LICENSE="GPL-2 LGPL-2"
29 IUSE="gtk postgres qt4 ssl tcl threads X"
30 RESTRICT="test" #298101
33 # bluetooth? ( net-wireless/bluez )
36 gtk? ( x11-libs/gtk+:2 )
37 postgres? ( dev-db/postgresql )
38 qt4? ( dev-qt/qtgui:4[qt3support] )
39 ssl? ( dev-libs/openssl )
40 tcl? ( dev-lang/tcl:0 )
44 >=sys-devel/flex-2.5.2
45 >=sys-devel/bison-1.22
48 if [[ ${PV} == 9999 ]]; then
56 EPATCH_SUFFIX=patch epatch "${WORKDIR}"/patches
60 # cannot use big TOC (AIX only), gdb doesn't like it.
61 # This assumes that the compiler (or -wrapper) uses
62 # gcc flag '-mminimal-toc' for compilation.
63 sed -i -e 's/,-bbigtoc//' "${S}"/configure
66 sed -i -e "s, -lqt\", $(pkg-config --libs Qt3Support)\"," configure ||
67 die "cannot update to use Qt3Support of qt4"
74 # Don't know which version of JavaCUP would suffice, but there is no
75 # configure argument to disable checking for JavaCUP.
76 # So we override the configure check to not find 'javac'.
77 export ac_cv_path_JAVAC=no
79 # '--without-ssl' just does not add another search path - the only way
80 # to disable openssl utilization seems to override the configure check.
81 use ssl || export ac_cv_lib_ssl_open=no
83 # CFLAGS aren't used when checking for <qapplication.h>, but CPPFLAGS are.
84 use qt4 && append-cppflags $(pkg-config --cflags Qt3Support)
91 myconf --disable-mini-stl
92 myconf $(use_enable threads)
94 # '--without-*' or '--with-*=no' does not disable some features,
95 # the value needs to be empty instead.
96 # This applies to: pgsql, qt, tcl, bluetooth.
97 myconf --with-pgsql=$(use postgres && echo "${EPREFIX}"/usr)
98 myconf --with-qt=$( use qt4 && echo "${EPREFIX}"/usr)
99 myconf --with-tcl=$( use tcl && echo "${EPREFIX}"/usr)
100 # bluetooth and wireless both don't compile cleanly
101 myconf --with-bluetooth=''
102 myconf --disable-wireless
103 # But --without-x works.
104 myconf $(use_with X x "${EPREFIX}"/usr)
105 # Same for gtk after patch 013, searches for gtk release.
106 myconf $(use_with gtk gtk 2)
108 # http://www.mico.org/pipermail/mico-devel/2009-April/010285.html
109 [[ ${CHOST} == *-hpux* ]] && append-cppflags -D_XOPEN_SOURCE_EXTENDED
111 if [[ ${CHOST} == *-winnt* ]]; then
112 # disabling static libs, since ar on interix takes nearly
113 # one hour per library, thanks to mico's monster objects.
115 ewarn "disabling USE='threads', does not work on ${CHOST}"
116 myconf --disable-threads --disable-static --enable-final
117 append-flags -D__STDC__
124 emake INSTDIR="${ED}"usr SHARED_INSTDIR="${ED}"usr install LDCONFIG=: || die "install failed"
125 if [[ $(get_libdir) != lib ]]; then #500744
126 mv "${ED}"usr/lib "${ED}"usr/$(get_libdir) || die
129 dodir /usr/share || die
130 mv "${ED}"usr/man "${ED}"usr/share || die
131 dodir /usr/share/doc/${PF} || die
132 mv "${ED}"usr/doc "${ED}"usr/share/doc/${PF} || die
134 dodoc BUGS CHANGES* CONVERT README* ROADMAP TODO VERSION WTODO || die