tk-8.5.17-r100.ebuild 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils flag-o-matic multilib prefix toolchain-funcs versionator virtualx
  5. MY_P="${PN}${PV/_beta/b}"
  6. DESCRIPTION="Tk Widget Set"
  7. HOMEPAGE="http://www.tcl.tk/"
  8. SRC_URI="
  9. mirror://sourceforge/tcl/${MY_P}-src.tar.gz
  10. mirror://sourceforge/tcl/${MY_P//tk/tcl}-src.tar.gz
  11. "
  12. LICENSE="tcltk"
  13. SLOT="8.5"
  14. KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  15. IUSE="debug threads truetype aqua xscreensaver"
  16. RDEPEND="
  17. !aqua? (
  18. media-libs/fontconfig
  19. media-libs/freetype:2
  20. x11-libs/libX11
  21. x11-libs/libXt
  22. truetype? ( x11-libs/libXft )
  23. xscreensaver? ( x11-libs/libXScrnSaver )
  24. )
  25. ~dev-lang/tcl-${PV}:8.5=
  26. !=dev-lang/tk-8.5:0"
  27. DEPEND="${RDEPEND}
  28. !aqua? ( x11-proto/xproto )"
  29. SPARENT="${WORKDIR}/${MY_P}"
  30. S="${SPARENT}"/unix
  31. DOCS=()
  32. src_prepare() {
  33. epatch \
  34. "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \
  35. "${FILESDIR}"/${PN}-8.5.13-multilib.patch
  36. epatch "${FILESDIR}"/${PN}-8.4.15-aqua.patch
  37. eprefixify Makefile.in
  38. # Bug 125971
  39. epatch "${FILESDIR}"/${PN}-8.5.14-conf.patch
  40. # Make sure we use the right pkg-config, and link against fontconfig
  41. # (since the code base uses Fc* functions).
  42. sed \
  43. -e 's/FT_New_Face/XftFontOpen/g' \
  44. -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
  45. -e 's:xft freetype2:xft freetype2 fontconfig:' \
  46. -i configure.in || die
  47. rm -f configure || die
  48. append-cppflags \
  49. -I"${WORKDIR}/${MY_P//tk/tcl}/generic" \
  50. -I"${WORKDIR}/${MY_P//tk/tcl}/unix"
  51. sed \
  52. -e '/chmod/s:555:755:g' \
  53. -i Makefile.in || die
  54. tc-export CC
  55. eautoconf
  56. }
  57. src_configure() {
  58. local v1=$(get_version_component_range 1-2)
  59. local mylibdir=$(get_libdir)
  60. econf \
  61. --with-tcl="${EPREFIX}/usr/${mylibdir}/tcl${v1}" \
  62. $(use_enable threads) \
  63. $(use_enable aqua) \
  64. $(use_enable truetype xft) \
  65. $(use_enable xscreensaver xss) \
  66. $(use_enable debug symbols)
  67. }
  68. src_test() {
  69. Xemake test
  70. }
  71. src_install() {
  72. dolib.so libtk8.5.so
  73. }