luasec-0.6.ebuild 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit multilib toolchain-funcs eutils
  5. DESCRIPTION="Lua binding for OpenSSL library to provide TLS/SSL communication"
  6. HOMEPAGE="https://github.com/brunoos/luasec http://www.inf.puc-rio.br/~brunoos/luasec/"
  7. SRC_URI="https://github.com/brunoos/luasec/archive/${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~arm ~x86"
  11. IUSE="libressl"
  12. RDEPEND="
  13. >=dev-lang/lua-5.1:0[deprecated]
  14. dev-lua/luasocket
  15. !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl:= )"
  16. DEPEND="${RDEPEND}
  17. virtual/pkgconfig"
  18. S=${WORKDIR}/${PN}-${P}
  19. src_prepare() {
  20. sed -i -e "s/-O2//" src/Makefile || die
  21. lua src/options.lua -g /usr/include/openssl/ssl.h > src/options.h || die
  22. }
  23. src_compile() {
  24. emake \
  25. CC="$(tc-getCC)" \
  26. LD="$(tc-getCC)" \
  27. linux
  28. }
  29. src_install() {
  30. emake \
  31. LUAPATH="${D}/$(pkg-config --variable INSTALL_LMOD lua)" \
  32. LUACPATH="${D}/$(pkg-config --variable INSTALL_CMOD lua)" \
  33. install
  34. }