libcmis-0.5.2_pre20160820.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. EGIT_REPO_URI="https://github.com/tdf/libcmis.git"
  5. [[ ${PV} == 9999 ]] && SCM_ECLASS="git-r3"
  6. inherit alternatives autotools ${SCM_ECLASS}
  7. unset SCM_ECLASS
  8. DESCRIPTION="C++ client library for the CMIS interface"
  9. HOMEPAGE="https://github.com/tdf/libcmis"
  10. if [[ ${PV} = *_pre* ]]; then
  11. snapshot=da8c3fdc281a0cb3753a6bb9eaa63ac6385e2963
  12. SRC_URI="https://github.com/tdf/${PN}/archive/${snapshot}.tar.gz -> ${P}.tar.gz"
  13. S="${WORKDIR}/${PN}-${snapshot}"
  14. unset snapshot
  15. elif [[ ${PV} != 9999 ]] ; then
  16. SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  17. fi
  18. LICENSE="|| ( GPL-2 LGPL-2 MPL-1.1 )"
  19. SLOT="0.5"
  20. # Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
  21. [[ ${PV} == 9999 ]] || \
  22. KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
  23. IUSE="static-libs man test"
  24. COMMON_DEPEND="
  25. dev-libs/boost:=
  26. dev-libs/libxml2
  27. net-misc/curl
  28. "
  29. DEPEND="${COMMON_DEPEND}
  30. virtual/pkgconfig
  31. man? (
  32. app-text/docbook2X
  33. dev-libs/libxslt
  34. )
  35. test? (
  36. dev-util/cppcheck
  37. dev-util/cppunit
  38. )
  39. "
  40. RDEPEND="${COMMON_DEPEND}
  41. !<dev-cpp/libcmis-0.5.0
  42. "
  43. src_prepare() {
  44. default
  45. [[ ${PV} = *_pre* || ${PV} = 9999 ]] && eautoreconf
  46. }
  47. src_configure() {
  48. econf \
  49. --program-suffix=-${SLOT} \
  50. --disable-werror \
  51. $(use_with man) \
  52. $(use_enable static-libs static) \
  53. $(use_enable test tests) \
  54. --enable-client
  55. }
  56. src_install() {
  57. default
  58. find "${D}" -name '*.la' -delete || die
  59. }
  60. pkg_postinst() {
  61. alternatives_auto_makesym /usr/bin/cmis-client "/usr/bin/cmis-client-[0-9].[0-9]"
  62. }
  63. pkg_postrm() {
  64. alternatives_auto_makesym /usr/bin/cmis-client "/usr/bin/cmis-client-[0-9].[0-9]"
  65. }