luaossl-20150727.ebuild 1008 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="Most comprehensive OpenSSL module in the Lua universe."
  6. HOMEPAGE="https://github.com/wahern/luaossl"
  7. SRC_URI="https://github.com/wahern/luaossl/archive/rel-${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="luajit"
  12. RDEPEND="
  13. luajit? ( dev-lang/luajit:2 )
  14. !luajit? ( >=dev-lang/lua-5.1:0 )
  15. dev-libs/openssl:0[-bindist]
  16. !dev-lua/lua-openssl"
  17. DEPEND="${RDEPEND}
  18. virtual/pkgconfig"
  19. S="${WORKDIR}/${PN}-rel-${PV}"
  20. src_prepare() {
  21. local version_var=
  22. local engine=
  23. use luajit && engine=luajit || engine=lua
  24. use luajit && version_var=abiver || version_var=V
  25. LUA_VERSION="$($(tc-getPKG_CONFIG) --variable=${version_var} ${engine})"
  26. }
  27. src_compile() {
  28. emake CC="$(tc-getCC)" prefix="${EPREFIX}/usr" openssl${LUA_VERSION}
  29. }
  30. src_install() {
  31. emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install${LUA_VERSION}
  32. }