diff options
author | Vadim A. Misbakh-Soloviov <git@mva.name> | 2017-05-10 01:29:42 +0700 |
---|---|---|
committer | Vadim A. Misbakh-Soloviov <git@mva.name> | 2017-05-10 01:29:42 +0700 |
commit | ac4f2f02d69159918cdf7aaa5f4a1272163cb3f0 (patch) | |
tree | 12e7240cd2d44c52243c6ccfd1288a6e6e6745be | |
parent | srlua: added (diff) | |
download | lua-ac4f2f02d69159918cdf7aaa5f4a1272163cb3f0.tar.gz lua-ac4f2f02d69159918cdf7aaa5f4a1272163cb3f0.tar.bz2 lua-ac4f2f02d69159918cdf7aaa5f4a1272163cb3f0.zip |
lyaml: fix
-rw-r--r-- | dev-lua/lyaml/files/Makefile | 4 | ||||
-rw-r--r-- | dev-lua/lyaml/lyaml-9999.ebuild | 63 |
2 files changed, 31 insertions, 36 deletions
diff --git a/dev-lua/lyaml/files/Makefile b/dev-lua/lyaml/files/Makefile new file mode 100644 index 0000000..d1f3027 --- /dev/null +++ b/dev-lua/lyaml/files/Makefile @@ -0,0 +1,4 @@ +all: + $(LUA) build-aux/luke package=$(package) version=$(version) LUA_INCDIR="$(LUA_INCDIR)" +doc: + ldoc -c build-aux/config.ld.in . diff --git a/dev-lua/lyaml/lyaml-9999.ebuild b/dev-lua/lyaml/lyaml-9999.ebuild index bd276f5..30e956c 100644 --- a/dev-lua/lyaml/lyaml-9999.ebuild +++ b/dev-lua/lyaml/lyaml-9999.ebuild @@ -19,55 +19,46 @@ IUSE="doc" RDEPEND=" dev-libs/libyaml " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + dev-lua/lua-stdlib + dev-lua/ldoc +" DOCS=(README.md NEWS.md) HTML_DOCS=(html/.) all_lua_prepare() { sed -r \ - -e "s/@PACKAGE_STRING@/${P}/" \ - -e '/^dir/s@"."@"../html"@' \ - build-aux/config.ld.in > build-aux/config.ld - - gawk \ - '/^AC_INIT/{print gensub(/[^0-9.]*([0-9.]*)[^0-9.]*/,"#define VERSION \"\\1\"","g",$2)}' \ - configure.ac > config.h -} + -e "s/@package@/${PN}/" \ + -e "s/@version@/${PV}/" \ + -e '/^dir/s@../doc@../html@' \ + -i build-aux/config.ld.in -each_lua_compile() { - _lua_setFLAGS + sed -r \ + -e '/^ldocs/d' \ + -e '/^external_dependencies/,/\}/s@checksymbol[^ ]*@@' \ + -i lukefile - # CRAZY buildsystem, no thanks - for c in ext/yaml/*.c; do - "${CC}" ${CFLAGS} -I. -c -o "${c/.c/.o}" "${c}" || die - done; + cp "${FILESDIR}"/Makefile "${S}" - "${CC}" ${LDFLAGS} $(${PKG_CONFIG} --libs yaml-0.1) -o "${PN:1}.so" ext/yaml/*.o || die + lua_default } - -all_lua_compile() { - use doc && ( - pushd build-aux &>/dev/null - ldoc . - popd +each_lua_configure() { + local ver="${PV}"; + if [[ "${PV}" == "9999" ]]; then + ver="git:$(git rev-parse --short @)" + fi + local myeconfargs=( + package="${PN}" + version="${ver}" + LUA_INCDIR="$(lua_get_incdir)" ) + lua_default } each_lua_install() { - dolua "${PN:1}.so" + dolua lib/"${PN}" + dolua linux/"${PN:1}".so } - -#each_lua_configure() { -# myeconfargs=( -# LUA="$(lua_get_lua)" -# LUA_INCLUDE="$(lua_get_pkgvar --cflags --cflags-only-I)" -# ax_cv_lua_luadir="$(lua_get_pkgvar INSTALL_LMOD)" -# ax_cv_lua_luaexecdir="$(lua_get_pkgvar INSTALL_CMOD)" -# --datadir="$(lua_get_pkgvar INSTALL_LMOD)" -# --libdir="$(lua_get_pkgvar INSTALL_CMOD)" -# ) -# lua_default -# econf ${myeconfargs[@]} -#} |