icecream-0.9.7-r1.ebuild 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit autotools base user
  5. MY_P=icecc-${PV}
  6. DESCRIPTION="icecc is a program for distributed compiling of C(++) code across several machines; based on distcc"
  7. HOMEPAGE="http://en.opensuse.org/Icecream"
  8. SRC_URI="ftp://ftp.suse.com/pub/projects/${PN}/${MY_P}.tar.bz2"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86"
  12. IUSE=""
  13. S=${WORKDIR}/${MY_P}
  14. PATCHES=(
  15. "${FILESDIR}/0.9.6-symlinks.patch"
  16. "${FILESDIR}/0.9.6-crosscompile.patch"
  17. "${FILESDIR}/${PV}-automake.patch"
  18. "${FILESDIR}/${PV}-glibc2.16.patch"
  19. "${FILESDIR}/${PN}-conf.d-verbosity.patch"
  20. "${FILESDIR}/${PN}-gentoo-multilib.patch"
  21. )
  22. pkg_setup() {
  23. enewgroup icecream
  24. enewuser icecream -1 -1 /var/cache/icecream icecream
  25. }
  26. src_prepare() {
  27. base_src_prepare
  28. sed -i -e "s/Defaut/Default/g" suse/sysconfig.icecream || die #275761
  29. eautoreconf
  30. }
  31. src_install() {
  32. default
  33. dosbin "${FILESDIR}"/icecream-config
  34. dosbin "${FILESDIR}"/icecream-create-env
  35. newconfd suse/sysconfig.icecream icecream
  36. doinitd "${FILESDIR}"/icecream
  37. diropts -m0755
  38. keepdir /usr/lib/icecc/bin
  39. }
  40. pkg_postinst() {
  41. ebegin "Scanning for compiler front-ends..."
  42. /usr/sbin/icecream-config --install-links
  43. /usr/sbin/icecream-config --install-links "${CHOST}"
  44. eend ${?}
  45. elog
  46. elog "If you have compiled binutils/gcc/glibc with processor-specific flags"
  47. elog "(as normal using Gentoo), there is a greater chance that your compiler"
  48. elog "won't work on other machines. The best would be to build gcc, glibc and"
  49. elog "binutils without those flags and then copy the needed files into your"
  50. elog "tarball for distribution to other machines. This tarball can be created"
  51. elog "by running /usr/bin/icecc --build-native, and used by setting"
  52. elog "ICECC_VERSION in /etc/conf.d/icecream"
  53. elog ' ICECC_VERSION=<filename_of_archive_containing_your_environment>'
  54. elog
  55. elog "To use icecream with portage add the following line to /etc/make.conf"
  56. elog ' PREROOTPATH=/usr/lib/icecc/bin'
  57. elog
  58. elog "To use icecream with normal make use (e.g. in /etc/profile)"
  59. elog ' PATH=/usr/lib/icecc/bin:$PATH'
  60. elog
  61. elog "N.B. To use icecream with ccache, the ccache PATH should come first:"
  62. elog ' PATH=/usr/lib/ccache/bin:/usr/lib/icecc/bin:$PATH'
  63. elog
  64. elog "Don't forget to open the following ports in your firewall(s):"
  65. elog " TCP/10245 on the daemon computers (required)"
  66. elog " TCP/8765 for the the scheduler computer (required)"
  67. elog " TCP/8766 for the telnet interface to the scheduler (optional)"
  68. elog " UDP/8765 for broadcast to find the scheduler (optional)"
  69. elog
  70. elog "Further usage instructions: ${HOMEPAGE}"
  71. }