logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

gnustep-make-2.7.0.ebuild (2249B)


  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit gnustep-base prefix toolchain-funcs
  5. DESCRIPTION="GNUstep Makefile Package"
  6. HOMEPAGE="http://www.gnustep.org"
  7. SRC_URI="ftp://ftp.gnustep.org/pub/gnustep/core/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
  11. IUSE="libobjc2 native-exceptions"
  12. DEPEND="${GNUSTEP_CORE_DEPEND}
  13. >=sys-devel/make-3.75
  14. libobjc2? ( gnustep-base/libobjc2
  15. sys-devel/clang )
  16. !libobjc2? ( !!gnustep-base/libobjc2
  17. || (
  18. >=sys-devel/gcc-3.3[objc]
  19. sys-devel/clang
  20. ) )"
  21. RDEPEND="${DEPEND}"
  22. src_prepare() {
  23. # Multilib-strict
  24. sed -e "s#/lib#/$(get_libdir)#" -i FilesystemLayouts/fhs-system || die "sed failed"
  25. cp "${FILESDIR}"/gnustep-5.{csh,sh} "${T}"/
  26. eprefixify "${T}"/gnustep-5.{csh,sh}
  27. default
  28. }
  29. src_configure() {
  30. #--enable-objc-nonfragile-abi: only working in clang for now
  31. econf \
  32. INSTALL="${EPREFIX}"/usr/bin/install \
  33. --with-layout=fhs-system \
  34. --with-config-file="${EPREFIX}"/etc/GNUstep/GNUstep.conf \
  35. --with-objc-lib-flag=-l:${libobjc_version} \
  36. $(use_enable libobjc2 objc-nonfragile-abi) \
  37. $(use_enable native-exceptions native-objc-exceptions)
  38. }
  39. src_compile() {
  40. emake
  41. if use doc ; then
  42. emake -C Documentation
  43. fi
  44. }
  45. src_install() {
  46. # Get GNUSTEP_* variables
  47. . ./GNUstep.conf
  48. local make_eval
  49. use debug || make_eval="${make_eval} debug=no"
  50. make_eval="${make_eval} verbose=yes"
  51. emake ${make_eval} DESTDIR="${D}" install
  52. # Copy the documentation
  53. if use doc ; then
  54. emake -C Documentation ${make_eval} DESTDIR="${D}" install
  55. fi
  56. dodoc FAQ README RELEASENOTES
  57. exeinto /etc/profile.d
  58. doexe "${T}"/gnustep-?.sh
  59. doexe "${T}"/gnustep-?.csh
  60. }
  61. pkg_postinst() {
  62. # Warn about new layout if old GNUstep directory is still here
  63. if [ -e /usr/GNUstep/System ]; then
  64. ewarn "Old layout directory detected (/usr/GNUstep/System)"
  65. ewarn "Gentoo has switched to FHS layout for GNUstep packages"
  66. ewarn "You must first update the configuration files from this package,"
  67. ewarn "then remerge all packages still installed with the old layout"
  68. ewarn "You can use gnustep-base/gnustep-updater for this task"
  69. fi
  70. }