toluapp-1.0.93.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="2"
  4. inherit toolchain-funcs
  5. MY_P=${P/pp/++}
  6. DESCRIPTION="A tool to integrate C/C++ code with Lua"
  7. HOMEPAGE="http://www.codenix.com/~tolua/"
  8. SRC_URI="http://www.codenix.com/~tolua/${MY_P}.tar.bz2"
  9. LICENSE="MIT"
  10. SLOT="0"
  11. KEYWORDS="alpha amd64 ppc ppc64 sparc x86"
  12. IUSE=""
  13. RDEPEND=">=dev-lang/lua-5.1.1[deprecated]"
  14. DEPEND="${RDEPEND}
  15. dev-util/scons"
  16. S=${WORKDIR}/${MY_P}
  17. src_compile() {
  18. echo "## BEGIN gentoo.py
  19. LIBS = ['lua', 'dl', 'm']
  20. ## END gentoo.py" > ${S}/custom.py
  21. scons \
  22. CC="$(tc-getCC)" \
  23. CCFLAGS="${CFLAGS} -ansi -Wall" \
  24. CXX="$(tc-getCXX)" \
  25. LINK="$(tc-getCC)" \
  26. LINKFLAGS="${LDFLAGS}" \
  27. shared=1 || die "scons failed"
  28. }
  29. src_install() {
  30. dobin bin/tolua++ || die "dobin failed"
  31. # dobin bin/tolua++_bootstrap || die "dobin failed"
  32. # dolib.a lib/libtolua++_static.a || die "dolib.a failed"
  33. dolib.so lib/libtolua++.so || die "dolib.so failed"
  34. insinto /usr/include
  35. doins include/tolua++.h || die "doins failed"
  36. dodoc README
  37. dohtml doc/*
  38. }