leechcraft.eclass 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. #
  4. # @ECLASS: leechcraft.eclass
  5. # @MAINTAINER:
  6. # 0xd34df00d@gmail.com
  7. # @AUTHOR:
  8. # 0xd34df00d@gmail.com
  9. # NightNord@niifaq.ru
  10. # @BLURB: Common functions and setup utilities for the LeechCraft app
  11. # @DESCRIPTION:
  12. # The leechcraft eclass contains a common set of functions and steps
  13. # needed to build LeechCraft core or its plugins.
  14. #
  15. # Though this eclass seems to be small at the moment, it seems like a
  16. # good idea to make all plugins inherit from it, since all plugins
  17. # have mostly the same configuring/build process.
  18. #
  19. # Thanks for original eclass to Andrian Nord <NightNord@niifaq.ru>.
  20. #
  21. # Only EAPI >4 supported
  22. case ${EAPI:-0} in
  23. 6) ;;
  24. *) die "EAPI not supported, bug ebuild mantainer" ;;
  25. esac
  26. inherit cmake-utils
  27. if [[ ${PV} == 9999 ]]; then
  28. EGIT_REPO_URI="git://github.com/0xd34df00d/leechcraft.git
  29. https://github.com/0xd34df00d/leechcraft.git"
  30. inherit git-r3
  31. else
  32. DEPEND="app-arch/xz-utils"
  33. SRC_URI="https://dist.leechcraft.org/LeechCraft/${PV}/leechcraft-${PV}.tar.xz"
  34. S="${WORKDIR}/leechcraft-${PV}"
  35. fi
  36. HOMEPAGE="https://leechcraft.org/"
  37. LICENSE="Boost-1.0"
  38. # @ECLASS-VARIABLE: LEECHCRAFT_PLUGIN_CATEGORY
  39. # @DEFAULT_UNSET
  40. # @DESCRIPTION:
  41. # Set this to the category of the plugin, if any.
  42. : ${LEECHCRAFT_PLUGIN_CATEGORY:=}
  43. if [[ "${LEECHCRAFT_PLUGIN_CATEGORY}" ]]; then
  44. CMAKE_USE_DIR="${S}"/src/plugins/${LEECHCRAFT_PLUGIN_CATEGORY}/${PN#lc-}
  45. elif [[ ${PN} != lc-core ]]; then
  46. CMAKE_USE_DIR="${S}"/src/plugins/${PN#lc-}
  47. else
  48. CMAKE_USE_DIR="${S}"/src
  49. fi