From 5464c98cdee5a7e6db3dd6debf49e67465f34fbe Mon Sep 17 00:00:00 2001 From: "Vadim A. Misbakh-Soloviov" Date: Wed, 1 Nov 2017 13:16:46 +0700 Subject: luajit: fix min_clone_type --- dev-lang/luajit/luajit-2.0.9999.ebuild | 23 +++++++------ dev-lang/luajit/luajit-2.1.9999.ebuild | 23 +++++++------ dev-lang/luajit/metadata.xml | 13 ++++---- eclass/patches.eclass | 60 ++++++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+), 26 deletions(-) create mode 100644 eclass/patches.eclass 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 @@ - - rafaelmartins@gentoo.org - Rafael G. Martins - - - mva@mva.name + + gentoo.overlay@mva.name Vadim A. Misbakh-Soloviov @@ -15,5 +11,10 @@ LuaJIT — это Just-In-Time компилятор для языка программирования Lua. + + Enable support for debugging under Valgrind + Enable some Lua:5.2+ features + Use "Amalgamation" compilation mode + 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 +} -- cgit v1.2.3-65-gdbad