ace-5.8.3.ebuild 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib toolchain-funcs
  5. DESCRIPTION="The Adaptive Communications Environment"
  6. HOMEPAGE="http://www.cs.wustl.edu/~schmidt/ACE.html"
  7. SRC_URI="!tao? ( http://download.dre.vanderbilt.edu/previous_versions/ACE-${PV}.tar.bz2 )
  8. tao? (
  9. !ciao? ( http://download.dre.vanderbilt.edu/previous_versions/ACE+TAO-${PV}.tar.bz2 )
  10. ciao? ( http://download.dre.vanderbilt.edu/previous_versions/ACE+TAO+CIAO-${PV}.tar.bz2 )
  11. )"
  12. LICENSE="ACE BSD BSD-4 BSD-2 tao? ( sun-iiop RSA )"
  13. SLOT="0/${PV}"
  14. KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
  15. IUSE="X ciao ipv6 libressl static-libs tao"
  16. COMMON_DEPEND="
  17. !libressl? ( dev-libs/openssl:0= )
  18. libressl? ( dev-libs/libressl:0= )"
  19. # TODO probably more
  20. RDEPEND="${COMMON_DEPEND}
  21. X? ( x11-libs/libXt x11-libs/libXaw )"
  22. DEPEND="${COMMON_DEPEND}
  23. X? ( x11-proto/xproto )"
  24. S="${WORKDIR}/ACE_wrappers"
  25. src_prepare() {
  26. sed -i \
  27. -e 's:SSL_METHOD:const SSL_METHOD:' \
  28. -e 's/-O3//' \
  29. configure || die "sed on configure failed"
  30. mkdir build || die
  31. export ACE_ROOT="${S}"
  32. epatch_user
  33. }
  34. src_configure() {
  35. pushd build >/dev/null || die
  36. ECONF_SOURCE="${S}"
  37. econf \
  38. --enable-lib-all \
  39. $(use_with X) \
  40. $(use_enable ipv6) \
  41. $(use_enable static-libs static)
  42. popd >/dev/null || die
  43. }
  44. src_compile() {
  45. # --with-qos needs ACE_HAS_RAPI
  46. emake -C build
  47. }
  48. src_install() {
  49. emake -C build ACE_ROOT="${S}" DESTDIR="${D}" install
  50. # punt gperf stuff
  51. rm -rf "${D}/usr/bin" "${D}/usr/share"
  52. # remove PACKAGE_* definitions from installed config.h (#192676)
  53. sed -i -e "s:^[ \t]*#define[ \t]\+PACKAGE_.*$:/\* & \*/:g" "${D}/usr/include/ace/config.h" || die
  54. # Install some docs
  55. dodoc README NEWS ChangeLog AUTHORS VERSION
  56. prune_libtool_files
  57. }
  58. src_test() {
  59. emake -C build ACE_ROOT="${S}" check
  60. }
  61. pkg_postinst() {
  62. local CC_MACHINE=$($(tc-getCC) -dumpmachine)
  63. if [ -d "/usr/$(get_libdir)/gcc-lib/${CC_MACHINE}/$(gcc-fullversion)/include/ace" ]; then
  64. ewarn "moving /usr/$(get_libdir)/gcc-lib/${CC_MACHINE}/$(gcc-fullversion)/include/ace to"
  65. ewarn "ace.old"
  66. ewarn "This is required, as anything trying to compile against ACE will"
  67. ewarn "have problems with conflicting OS.h files if this is not done."
  68. mv "/usr/$(get_libdir)/gcc-lib/${CC_MACHINE}/$(gcc-fullversion)/include/ace" \
  69. "/usr/$(get_libdir)/gcc-lib/${CC_MACHINE}/$(gcc-fullversion)/include/ace.old"
  70. fi
  71. }