qthelp-4.8.7.ebuild 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit qt4-build-multilib
  5. DESCRIPTION="The Help module for the Qt toolkit"
  6. SRC_URI+="
  7. compat? (
  8. http://download.qt.io/archive/qt/4.6/qt-assistant-qassistantclient-library-compat-src-4.6.3.tar.gz
  9. https://dev.gentoo.org/~pesa/distfiles/qt-assistant-compat-headers-4.7.tar.gz
  10. )"
  11. if [[ ${QT4_BUILD_TYPE} == release ]]; then
  12. KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
  13. fi
  14. IUSE="compat doc"
  15. DEPEND="
  16. ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
  17. ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
  18. ~dev-qt/qtsql-${PV}[aqua=,debug=,sqlite,${MULTILIB_USEDEP}]
  19. compat? (
  20. ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
  21. >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
  22. )
  23. "
  24. RDEPEND="${DEPEND}"
  25. QT4_TARGET_DIRECTORIES="
  26. tools/assistant/lib/fulltextsearch
  27. tools/assistant/lib
  28. tools/assistant/tools/qhelpgenerator
  29. tools/assistant/tools/qcollectiongenerator
  30. tools/assistant/tools/qhelpconverter
  31. tools/qdoc3"
  32. pkg_setup() {
  33. use compat && QT4_TARGET_DIRECTORIES+="
  34. tools/assistant/compat
  35. tools/assistant/compat/lib"
  36. }
  37. src_unpack() {
  38. qt4-build-multilib_src_unpack
  39. # compat version
  40. # http://blog.qt.io/blog/2010/06/22/qt-assistant-compat-version-available-as-extra-source-package/
  41. if use compat; then
  42. mv "${WORKDIR}"/qt-assistant-qassistantclient-library-compat-version-4.6.3 "${S}"/tools/assistant/compat || die
  43. mv "${WORKDIR}"/QtAssistant "${S}"/include || die
  44. find "${S}"/tools/assistant/compat -type f -execdir chmod a-x '{}' + || die
  45. fi
  46. }
  47. src_prepare() {
  48. use compat && PATCHES+=(
  49. "${FILESDIR}/${PN}-4.8.6-compat-install.patch"
  50. "${FILESDIR}/${PN}-4.8.6-compat-syncqt.patch"
  51. )
  52. qt4-build-multilib_src_prepare
  53. # prevent rebuild of QtCore and QtXml (bug 348034)
  54. sed -i -e '/^sub-qdoc3\.depends/d' doc/doc.pri || die
  55. }
  56. multilib_src_configure() {
  57. local myconf=(
  58. -system-libpng -system-libjpeg -system-zlib
  59. -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite2 -no-sql-odbc
  60. -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
  61. -no-multimedia -no-opengl -no-phonon -no-qt3support -no-svg -no-webkit -no-xmlpatterns
  62. -no-nas-sound -no-cups -no-nis -fontconfig
  63. )
  64. qt4_multilib_src_configure
  65. }
  66. multilib_src_compile() {
  67. qt4_multilib_src_compile
  68. # release tarballs are shipped with prebuilt docs
  69. if [[ ${QT4_BUILD_TYPE} == live ]] && multilib_is_native_abi; then
  70. # qhelpgenerator needs libQtHelp.so.4
  71. export LD_LIBRARY_PATH=${BUILD_DIR}/lib
  72. export DYLD_LIBRARY_PATH=${BUILD_DIR}/lib:${BUILD_DIR}/lib/QtHelp.framework
  73. emake docs
  74. fi
  75. }
  76. multilib_src_install() {
  77. qt4_multilib_src_install
  78. if multilib_is_native_abi; then
  79. emake INSTALL_ROOT="${D}" install_qchdocs
  80. use doc && emake INSTALL_ROOT="${D}" install_htmldocs
  81. # do not compress .qch files
  82. docompress -x "${QT4_DOCDIR#${EPREFIX}}"/qch
  83. fi
  84. }
  85. multilib_src_install_all() {
  86. qt4_multilib_src_install_all
  87. if use compat; then
  88. insinto "${QT4_DATADIR#${EPREFIX}}"/mkspecs/features
  89. doins tools/assistant/compat/features/assistant.prf
  90. fi
  91. }