luaexpat-1.3.0-r1.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit multilib toolchain-funcs flag-o-matic eutils multilib-minimal
  5. DESCRIPTION="LuaExpat is a SAX XML parser based on the Expat library"
  6. HOMEPAGE="http://www.keplerproject.org/luaexpat/"
  7. SRC_URI="http://matthewwild.co.uk/projects/${PN}/${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86"
  11. IUSE=""
  12. RDEPEND=">=dev-lang/lua-5.1.5-r2[deprecated,${MULTILIB_USEDEP}]
  13. >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]"
  14. DEPEND="${RDEPEND}
  15. >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
  16. src_prepare() {
  17. multilib_copy_sources
  18. append-flags -fPIC
  19. }
  20. multilib_src_compile() {
  21. emake \
  22. CFLAGS="${CFLAGS}" \
  23. LDFLAGS="${LDFLAGS}" \
  24. CC="$(tc-getCC)" \
  25. LD="$(tc-getCC) -shared" \
  26. LUA_LDIR="$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD lua)" \
  27. LUA_CDIR="$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD lua)" \
  28. LUA_INC="-I$($(tc-getPKG_CONFIG) --variable INSTALL_INC lua)"
  29. }
  30. multilib_src_install() {
  31. emake \
  32. DESTDIR="${D}" \
  33. LUA_LDIR="$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD lua)" \
  34. LUA_CDIR="$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD lua)" \
  35. LUA_INC="-I$($(tc-getPKG_CONFIG) --variable INSTALL_INC lua)" \
  36. install
  37. }
  38. multilib_src_install_all() {
  39. dodoc README
  40. dohtml -r doc/*
  41. }