mico-9999.ebuild 3.7 KB

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