luaevent-0.4.4.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit toolchain-funcs
  5. DESCRIPTION="libevent bindings for Lua"
  6. HOMEPAGE="http://luaforge.net/projects/luaevent"
  7. SRC_URI="https://github.com/harningt/luaevent/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="LGPL-2.1"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~arm ~x86"
  11. IUSE=""
  12. RDEPEND="dev-lang/lua:0
  13. dev-libs/libevent:0="
  14. DEPEND="${RDEPEND}
  15. virtual/pkgconfig"
  16. src_prepare() {
  17. sed -i "s:^CFLAGS =:CFLAGS +=:" "${S}/Makefile" \
  18. || die "sed failed"
  19. sed -i "s:^LDFLAGS =:LDFLAGS +=:" "${S}/Makefile" \
  20. || die "sed failed"
  21. sed -i "/^LDFLAGS/a CC = $(tc-getCC)" "${S}/Makefile" \
  22. || die "sed failed"
  23. sed -i "s:^LUA_INC_DIR ?=.*:LUA_INC_DIR ?= $(pkg-config --variable INSTALL_INC lua):" "${S}/Makefile" \
  24. || die "sed failed"
  25. sed -i "s:^INSTALL_DIR_LUA ?=.*:INSTALL_DIR_LUA ?= $(pkg-config --variable INSTALL_LMOD lua):" "${S}/Makefile" \
  26. || die "sed failed"
  27. sed -i "s:^INSTALL_DIR_BIN ?=.*:INSTALL_DIR_BIN ?= $(pkg-config --variable INSTALL_CMOD lua):" "${S}/Makefile" \
  28. || die "sed failed"
  29. }
  30. src_install() {
  31. emake DESTDIR="${D}" install || die "Install failed"
  32. }