mico-2.3.13-r7.ebuild 3.7 KB

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