luasocket-3.0_rc1-r3.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit multilib multilib-minimal flag-o-matic
  5. DESCRIPTION="Networking support library for the Lua language"
  6. HOMEPAGE="http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/"
  7. SRC_URI="https://github.com/diegonehab/${PN}/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="amd64 arm hppa ~mips ppc ppc64 sparc x86"
  11. IUSE="debug"
  12. RDEPEND=">=dev-lang/lua-5.1.5-r2[deprecated,${MULTILIB_USEDEP}]"
  13. DEPEND="${RDEPEND}
  14. >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
  15. S=${WORKDIR}/${PN}-${PV/_/-}
  16. RESTRICT="test"
  17. src_prepare() {
  18. multilib_copy_sources
  19. }
  20. multilib_src_compile() {
  21. emake \
  22. CC="$(tc-getCC) ${CFLAGS}" \
  23. LD="$(tc-getCC) ${LDFLAGS}"\
  24. $(usex debug DEBUG="DEBUG" "")
  25. }
  26. multilib_src_install() {
  27. local luav=$($(tc-getPKG_CONFIG) --variable V lua)
  28. emake \
  29. DESTDIR="${D}" \
  30. LUAPREFIX_linux=/usr \
  31. LUAV=${luav} \
  32. CDIR_linux=$(get_libdir)/lua/${luav} \
  33. install-unix
  34. }
  35. multilib_src_install_all() {
  36. dodoc NEW README
  37. dohtml -r doc/.
  38. }