hidapi-0.8.0_rc1_p20140719.ebuild 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. AUTOTOOLS_AUTORECONF=yes
  5. inherit eutils versionator autotools-multilib #git-2
  6. # If github is desired, the following may be used.
  7. #EGIT_REPO_URI="git://github.com/signal11/hidapi.git"
  8. #EGIT_BRANCH="master"
  9. EGIT_COMMIT="d17db57b9d4354752e0af42f5f33007a42ef2906"
  10. # S is only needed for the debian_package
  11. S=${WORKDIR}/${PN}-${DEBIAN_PV}
  12. DESCRIPTION="A multi-platform library for USB and Bluetooth HID-Class devices"
  13. HOMEPAGE="http://www.signal11.us/oss/hidapi/"
  14. SRC_URI="https://github.com/signal11/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tgz"
  15. # When 0.8.0 is officially available the following link should be used.
  16. #SRC_URI="mirror://github/signal11/${PN}/${P}.zip"
  17. LICENSE="|| ( BSD GPL-3 HIDAPI )"
  18. SLOT="0"
  19. KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86"
  20. IUSE="doc fox static-libs"
  21. RDEPEND="virtual/libusb:1[${MULTILIB_USEDEP}]
  22. virtual/libudev:0[${MULTILIB_USEDEP}]"
  23. DEPEND="${RDEPEND}
  24. doc? ( app-doc/doxygen )
  25. virtual/pkgconfig
  26. fox? ( x11-libs/fox )"
  27. S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
  28. src_prepare() {
  29. if ! use fox; then
  30. sed -i -e 's:PKG_CHECK_MODULES(\[fox\], .*):AC_SUBST(fox_CFLAGS,[ ])AC_SUBST(fox_LIBS,[ ]):' configure.ac || die
  31. fi
  32. # Fix bashisms in the configure.ac file.
  33. sed -i -e 's:\([A-Z_]\+\)+="\(.*\)":\1="${\1}\2":g' \
  34. -e 's:\([A-Z_]\+\)+=`\(.*\)`:\1="${\1}\2":g' configure.ac || die
  35. # Portage handles license texts itself, no need to install them
  36. sed -i -e 's/LICENSE.*/ # blank/' Makefile.am || die
  37. autotools-multilib_src_prepare
  38. }
  39. multilib_src_configure() {
  40. local myeconfargs=(
  41. $(multilib_native_use_enable fox testgui)
  42. )
  43. autotools-utils_src_configure
  44. }
  45. src_compile() {
  46. autotools-multilib_src_compile
  47. if use doc; then
  48. doxygen doxygen/Doxyfile || die
  49. fi
  50. }
  51. src_install() {
  52. autotools-multilib_src_install
  53. if use doc; then
  54. dohtml -r html/.
  55. fi
  56. }