vlfeat-9999.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Copyright 1999-2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit toolchain-funcs
  5. DESCRIPTION="VisionLab Features Library for SFM applications"
  6. HOMEPAGE="https://www.vlfeat.org"
  7. if [[ ${PV} = *9999 ]]; then
  8. inherit git-r3
  9. EGIT_REPO_URI="https://github.com/vlfeat/vlfeat"
  10. EGIT_BRANCH="master"
  11. KEYWORDS=""
  12. SLOT="0/0.9"
  13. else
  14. SRC_URI="https://www.vlfeat.org/download/${P}.tar.gz https://github.com/vlfeat/vlfeat/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  15. KEYWORDS="~amd64 ~x86 ~arm ~arm64"
  16. #S="${WORKDIR}/${P}"
  17. SLOT="0/$(ver_cut 1-2 ${PV})"
  18. fi
  19. LICENSE="BSD"
  20. IUSE="debug man mpi octave"
  21. RESTRICT="
  22. !test (test)
  23. mirror
  24. "
  25. DEPEND="
  26. octave? ( >=sci-mathematics/octave-3.4.0 )
  27. "
  28. BDEPEND="
  29. octave? ( dev-lang/swig )
  30. "
  31. PATCHES+=(
  32. "${FILESDIR}/vlfeat-fix-omp-build.patch"
  33. )
  34. pkg_setup() {
  35. use amd64 && ARCH=glnxa64
  36. use x86 && ARCH=glnx86
  37. }
  38. src_configure() {
  39. CC="$(tc-getBUILD_CC)" LD="$(tc-getLD)" \
  40. MEX=""
  41. use debug && DEBUG=true
  42. use octave && MKOCTFILE=${EPREFIX}/usr/bin/mkoctfile || MKOCTFILE=""
  43. use mpi && CC=mpicc
  44. }
  45. src_compile() {
  46. tc-export CC LD
  47. default
  48. }
  49. src_install() {
  50. dobin bin/${ARCH}/{sift,mser}
  51. use man && doman src/{vlfeat.7,mser.1,sift.1}
  52. dolib.so bin/${ARCH}/libvl.so
  53. insinto /usr/include
  54. doins -r vl
  55. dodoc README.md
  56. }