luaexpat-1.2.0-r1.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2014 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
  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 ~mips x86"
  11. IUSE=""
  12. RDEPEND=">=dev-lang/lua-5.1[deprecated]
  13. dev-libs/expat"
  14. DEPEND="${RDEPEND}
  15. virtual/pkgconfig"
  16. src_prepare() {
  17. sed -i -e "s#^LUA_LIBDIR=.*#LUA_LIBDIR=$(pkg-config --variable INSTALL_CMOD lua)#" "${S}/config"
  18. sed -i -e "s#^LUA_DIR=.*#LUA_DIR=$(pkg-config --variable INSTALL_LMOD lua)#" "${S}/config"
  19. sed -i -e "s#^LUA_INC=.*#LUA_INC=$(pkg-config --variable INSTALL_INC lua)#" "${S}/config"
  20. sed -i -e "s#^EXPAT_INC=.*#EXPAT_INC=/usr/include#" "${S}/config"
  21. sed -i -e "s#^LUA_VERSION_NUM=.*#LUA_VERSION_NUM=501#" "${S}/config"
  22. epatch "${FILESDIR}/${PV}-destdir-ldflags.patch"
  23. }
  24. src_compile() {
  25. append-flags -fPIC
  26. emake \
  27. CFLAGS="${CFLAGS}" \
  28. LDFLAGS="${LDFLAGS}" \
  29. CC="$(tc-getCC)" \
  30. LD="$(tc-getCC) -shared"
  31. }
  32. src_install() {
  33. emake DESTDIR="${D}" install
  34. dodoc README
  35. dohtml -r doc/*
  36. }