psi-plugin.eclass 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: $
  4. # @ECLASS: psi-plugin.eclass
  5. # @MAINTAINER:
  6. # Rion <rion4ik@gmail.com>
  7. # @BLURB: This eclass provides functions for build all plugin to net-im/psi
  8. # package
  9. # @DESCRIPTION:
  10. # This eclass provides functions build all plugin to net-im/psi
  11. # Original Author: Sergey Ilinykh <rion4ik@gmail.com>
  12. # Purpose:
  13. ###
  14. # variable declarations
  15. ###
  16. MY_PN="${PN#psi-}plugin"
  17. ###
  18. # Use scm or not ?
  19. ###
  20. SCM=""
  21. if [ "${PV#9999}" != "${PV}" ] ; then
  22. SCM="git-r3"
  23. PLUGIN_DIR="${PLUGIN_DIR:-generic}"
  24. EGIT_REPO_URI="https://github.com/psi-im/plugins.git"
  25. EGIT_CHECKOUT_DIR="${WORKDIR}/plugins"
  26. fi
  27. inherit cmake ${SCM}
  28. # general common
  29. HOMEPAGE="https://github.com/psi-im/"
  30. if [ "${PV#9999}" != "${PV}" ] ; then
  31. SRC_URI=""
  32. S="${WORKDIR}/plugins/${PLUGIN_DIR}/${MY_PN}"
  33. else
  34. SRC_URI="http://rion-overlay.googlecode.com/files/${P}.tar.xz"
  35. fi
  36. LICENSE="GPL-2"
  37. SLOT="0"
  38. IUSE="qt6 ${IUSE}"
  39. DEPEND="net-im/psi[qt6?]"
  40. RDEPEND="${DEPEND}"
  41. # Eclass exported functions
  42. EXPORT_FUNCTIONS src_unpack src_configure
  43. psi-plugin_src_unpack() {
  44. if [ -n "$SCM" ]; then
  45. git-r3_src_unpack
  46. else
  47. default
  48. fi
  49. }
  50. psi-plugin_src_configure() {
  51. local mycmakeargs=(
  52. -DQT_DEFAULT_MAJOR_VERSION=$(usex qt6 6 5)
  53. )
  54. cmake_src_configure
  55. }