diff options
author | 2017-11-01 13:16:46 +0700 | |
---|---|---|
committer | 2017-11-01 13:16:46 +0700 | |
commit | 5464c98cdee5a7e6db3dd6debf49e67465f34fbe (patch) | |
tree | b681e40bc02b02e2cd090f0ac8aaa89400b3d738 | |
parent | luacheck: added (diff) | |
download | lua-5464c98cdee5a7e6db3dd6debf49e67465f34fbe.tar.gz lua-5464c98cdee5a7e6db3dd6debf49e67465f34fbe.tar.bz2 lua-5464c98cdee5a7e6db3dd6debf49e67465f34fbe.zip |
luajit: fix min_clone_type
-rw-r--r-- | dev-lang/luajit/luajit-2.0.9999.ebuild | 23 | ||||
-rw-r--r-- | dev-lang/luajit/luajit-2.1.9999.ebuild | 23 | ||||
-rw-r--r-- | dev-lang/luajit/metadata.xml | 13 | ||||
-rw-r--r-- | eclass/patches.eclass | 60 |
4 files changed, 93 insertions, 26 deletions
diff --git a/dev-lang/luajit/luajit-2.0.9999.ebuild b/dev-lang/luajit/luajit-2.0.9999.ebuild index f4aeeb2..9920ab5 100644 --- a/dev-lang/luajit/luajit-2.0.9999.ebuild +++ b/dev-lang/luajit/luajit-2.0.9999.ebuild @@ -1,13 +1,16 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=6 -inherit base eutils multilib multilib-minimal portability pax-utils toolchain-funcs versionator flag-o-matic check-reqs git-r3 +inherit eutils multilib multilib-minimal portability pax-utils toolchain-funcs versionator flag-o-matic check-reqs git-r3 patches DESCRIPTION="Just-In-Time Compiler for the Lua programming language" -HOMEPAGE="http://luajit.org/" -EGIT_REPO_URI="http://luajit.org/git/luajit-2.0.git" +HOMEPAGE="https://luajit.org/" +EGIT_REPO_URI="https://luajit.org/git/luajit-2.0.git" +EGIT_BRANCH="v2.0" +EGIT_MIN_CLONE_TYPE="single" + SLOT="2" LICENSE="MIT" @@ -30,10 +33,9 @@ PDEPEND=" HTML_DOCS=( "doc/" ) MULTILIB_WRAPPED_HEADERS=( - /usr/include/luajit-${SLOT}/luaconf.h + "/usr/include/luajit-${SLOT}/luaconf.h" ) - check_req() { if use optimization; then CHECKREQS_MEMORY="300M" @@ -49,7 +51,8 @@ pkg_setup() { check_req setup } -src_prepare(){ +src_prepare() { + patches_src_prepare # fixing prefix and version # sed -r \ # -e 's|^(VERSION)=.*|\1=$(MAJVER).$(MINVER)|' \ @@ -124,12 +127,12 @@ multilib_src_compile() { multilib_src_install() { emake DESTDIR="${D}" MULTILIB="$(get_libdir)" install - base_src_install_docs + einstalldocs host-is-pax && pax-mark m "${ED}usr/bin/${P}" newman "etc/${P}.1" "luacjit-${PV}.1" newbin "${FILESDIR}/luac.jit" "luacjit-${PV}" - ln -s "${P}" "${ED}usr/bin/${PN}-${SLOT}" + ln -fs "${P}" "${ED}usr/bin/${PN}-${SLOT}" } pkg_postinst() { diff --git a/dev-lang/luajit/luajit-2.1.9999.ebuild b/dev-lang/luajit/luajit-2.1.9999.ebuild index 906e226..31b5655 100644 --- a/dev-lang/luajit/luajit-2.1.9999.ebuild +++ b/dev-lang/luajit/luajit-2.1.9999.ebuild @@ -1,15 +1,17 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 -inherit eutils multilib multilib-minimal portability pax-utils toolchain-funcs versionator flag-o-matic check-reqs git-r3 +inherit eutils multilib multilib-minimal portability pax-utils toolchain-funcs versionator flag-o-matic check-reqs git-r3 patches DESCRIPTION="Just-In-Time Compiler for the Lua programming language" -HOMEPAGE="http://luajit.org/" -EGIT_REPO_URI="http://luajit.org/git/luajit-2.0.git" -SLOT="2" +HOMEPAGE="https://luajit.org/" +EGIT_REPO_URI="https://luajit.org/git/luajit-2.0.git" EGIT_BRANCH="v2.1" +EGIT_MIN_CLONE_TYPE="single" + +SLOT="2" LICENSE="MIT" KEYWORDS="" @@ -31,10 +33,9 @@ PDEPEND=" HTML_DOCS=( "doc/." ) MULTILIB_WRAPPED_HEADERS=( - /usr/include/luajit-${SLOT}/luaconf.h + "/usr/include/luajit-${SLOT}/luaconf.h" ) - check_req() { if use optimization; then CHECKREQS_MEMORY="300M" @@ -50,7 +51,9 @@ pkg_setup() { check_req setup } -src_prepare(){ +src_prepare() { + patches_src_prepare + # fixing prefix and version sed -r \ -e 's|^(VERSION)=.*|\1=${PV}|' \ @@ -111,12 +114,12 @@ multilib_src_compile() { multilib_src_install() { emake DESTDIR="${D}" MULTILIB="$(get_libdir)" install - base_src_install_docs + einstalldocs host-is-pax && pax-mark m "${ED}usr/bin/${P}" newman "etc/${P}.1" "luacjit-${PV}.1" newbin "${FILESDIR}/luac.jit" "luacjit-${PV}" - ln -s "${P}" "${ED}usr/bin/${PN}-${SLOT}" + ln -fs "${P}" "${ED}usr/bin/${PN}-${SLOT}" } pkg_postinst() { diff --git a/dev-lang/luajit/metadata.xml b/dev-lang/luajit/metadata.xml index 499c1c4..466a4c7 100644 --- a/dev-lang/luajit/metadata.xml +++ b/dev-lang/luajit/metadata.xml @@ -1,12 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer> - <email>rafaelmartins@gentoo.org</email> - <name>Rafael G. Martins</name> - </maintainer> - <maintainer> - <email>mva@mva.name</email> + <maintainer type="person"> + <email>gentoo.overlay@mva.name</email> <name>Vadim A. Misbakh-Soloviov</name> </maintainer> <longdescription lang="en"> @@ -15,5 +11,10 @@ <longdescription lang="ru"> LuaJIT — это Just-In-Time компилятор для языка программирования Lua. </longdescription> + <use> + <flag name="valgrind">Enable support for debugging under Valgrind</flag> + <flag name="lua52compat">Enable some Lua:5.2+ features</flag> + <flag name="optimization">Use "Amalgamation" compilation mode</flag> + </use> </pkgmetadata> diff --git a/eclass/patches.eclass b/eclass/patches.eclass new file mode 100644 index 0000000..d8173cd --- /dev/null +++ b/eclass/patches.eclass @@ -0,0 +1,60 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: patches.eclass +# @MAINTAINER: +# mva +# @AUTHOR: +# mva +# @BLURB: +# @DESCRIPTION: +# Eclass that checks for patches directories existance and auto-add them into PATCHES=() + +EXPORT_FUNCTIONS src_prepare + +PATCHDIR="${FILESDIR}/patches/${PV}" +[[ -z ${PATCHES[@]} ]] && PATCHES=() + +patches_src_prepare() { + if [[ -d "${PATCHDIR}" ]]; then + _patchdir_not_empty() { + local has_files + local LC_ALL=POSIX + local prev_shopt=$(shopt -p nullglob) + shopt -s nullglob + local f + for f in "${1:-${PATCHDIR}}"/*; do + if [[ "${f}" == *.diff || "${f}" == *.patch ]] && [[ -f "${f}" || -L "${f}" ]]; then + has_files=1 + elif [[ -d "${f}" ]]; then + # recursion + _patchdir_not_empty "${f}" && has_files=1 + fi + done + ${prev_shopt} + [[ -n "${has_files}" ]]; return $? + } + + _patchdir_not_empty && PATCHES+=("${PATCHDIR}") + + if [[ -d "${PATCHDIR}/conditional" ]]; then + pushd "${PATCHDIR}/conditional" &>/dev/null + for d in *; do + if [[ -d ${d} ]]; then + if [[ "${d##no-}" == ${d} ]]; then + (use "${d}" && _patchdir_not_empty "${d}") && PATCHES+=("${PATCHDIR}/conditional/${d}") + else + (use "${d##no-}" && _patchdir_not_empty "${d}") || PATCHES+=("${PATCHDIR}/conditional/${d}") + fi + fi + done + popd &>/dev/null + fi + fi + if declare -f cmake-utils_src_prepare &>/dev/null; then + # cmake-utils_src_prepare support (to decrease kludges in the ebuilds) + cmake-utils_src_prepare + else + default_src_prepare + fi +} |