bluefish-2.2.9.ebuild 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit autotools eutils fdo-mime python-single-r1
  6. MY_P=${P/_/-}
  7. DESCRIPTION="A GTK HTML editor for the experienced web designer or programmer"
  8. SRC_URI="http://www.bennewitz.com/bluefish/stable/source/${MY_P}.tar.bz2"
  9. HOMEPAGE="http://bluefish.openoffice.nl/"
  10. LICENSE="GPL-2"
  11. KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
  12. SLOT="0"
  13. IUSE="+gtk3 gucharmap nls python spell"
  14. RDEPEND="
  15. gnome-extra/gucharmap:2.90
  16. sys-libs/zlib
  17. !gtk3? ( x11-libs/gtk+:2 )
  18. gtk3? (
  19. x11-libs/gtk+:3
  20. gucharmap? ( gnome-extra/gucharmap:2.90 )
  21. )
  22. python? ( ${PYTHON_DEPS} )
  23. spell? ( app-text/enchant )"
  24. DEPEND="${RDEPEND}
  25. dev-libs/libxml2:2
  26. >=dev-libs/glib-2.24:2
  27. virtual/pkgconfig
  28. x11-libs/pango
  29. nls? (
  30. sys-devel/gettext
  31. dev-util/intltool
  32. )"
  33. S="${WORKDIR}/${MY_P}"
  34. # there actually is just some broken manpage checkup -> not bother
  35. RESTRICT="test"
  36. pkg_setup() {
  37. if ! use gtk3 && use gucharmap ; then
  38. ewarn "gucharmap USE flag requires the gtk3 USE flag being enabled."
  39. ewarn "Disabling charmap plugin."
  40. fi
  41. use python && python-single-r1_pkg_setup
  42. }
  43. PATCHES=(
  44. "${FILESDIR}/${PN}-2.2.9-charmap_configure.patch"
  45. )
  46. # eautoreconf seems to no longer kill translation files.
  47. src_prepare() {
  48. default
  49. eautoreconf
  50. sed -i 's:gzip -n $< -c:gzip -n -c $<:' data/bflib/Makefile.* || die "Cannot fix makefile"
  51. }
  52. src_configure() {
  53. econf \
  54. --disable-dependency-tracking \
  55. --disable-update-databases \
  56. --disable-xml-catalog-update \
  57. $(use_with !gtk3 gtk2) \
  58. $(usex gtk3 "$(use_with gucharmap charmap)" '--without-charmap') \
  59. $(use_enable nls) \
  60. $(use_enable spell spell-check) \
  61. $(use_enable python)
  62. }
  63. src_install() {
  64. default
  65. prune_libtool_files
  66. }
  67. pkg_postinst() {
  68. fdo-mime_desktop_database_update
  69. fdo-mime_mime_database_update
  70. einfo "Adding XML catalog entries..."
  71. /usr/bin/xmlcatalog --noout \
  72. --add 'public' 'Bluefish/DTD/Bflang' 'bflang.dtd' \
  73. --add 'system' 'http://bluefish.openoffice.nl/DTD/bflang.dtd' 'bflang.dtd' \
  74. --add 'rewriteURI' 'http://bluefish.openoffice.nl/DTD' '/usr/share/xml/bluefish-unstable' \
  75. /etc/xml/catalog \
  76. || ewarn "Failed to add XML catalog entries."
  77. }
  78. pkg_postrm() {
  79. fdo-mime_desktop_database_update
  80. fdo-mime_mime_database_update
  81. einfo "Removing XML catalog entries..."
  82. /usr/bin/xmlcatalog --noout \
  83. --del 'Bluefish/DTD/Bflang' \
  84. --del 'http://bluefish.openoffice.nl/DTD/bflang.dtd' \
  85. --del 'http://bluefish.openoffice.nl/DTD' \
  86. /etc/xml/catalog \
  87. || ewarn "Failed to remove XML catalog entries."
  88. }