mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 17:06:58 +02:00
app-admin/perl-cleaner: Sync with gentoo
It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a.
This commit is contained in:
parent
bb99042961
commit
b8f63be75d
@ -1,2 +1 @@
|
||||
DIST perl-cleaner-2.25.tar.bz2 7435 BLAKE2B 348f5429874bf7b1db5c9ba5b1479c3d5fbce68fc9ef91aa44dad3325ab2287d4bfda9221063dd643ec3b6df465443bb9a024705ec46f15c50ccd618ef193ce6 SHA512 5ef5682872ce840c0df98de82a6cf622120435f542206a00bb8fe0f9d5e46fb9898a89ab576b08a74b0d69d57a90a930d9f8d7d0b527fa3a928a6e4ddbad6ee9
|
||||
DIST perl-cleaner-2.27.tar.bz2 7493 BLAKE2B 03d8bc336fd0a42bce16c4bf8b2272a7ff24d605b483af777ef7ab3d59accd0082709200705638ab116934f675b17c5cf109c40a3ab739654ff64abebd8c0558 SHA512 097d68dff30da198636f73fc44600f1863c7f69f87110315bb83297c96d826f2f101f56ab546fde94ff60ca00da0aaa569fefea3c2599155f3bd69c66fb42ed6
|
||||
DIST perl-cleaner-2.30.tar.bz2 6963 BLAKE2B 8983060c7a904266ac82a67eba7b5d2184803b59c077f947a35d07e9af3046953705d31840b9508116578b8f3e8a8b97d77cf21eeac3b70f1c3fb5c1d71ae64e SHA512 436d26727bbb598bcd3c4f31e6b81e415a797cdba82dccfd55e54ee179bd2d6c1dc443e865f6f0a05b59f47ffd231dd10e55d5ea97a9a6875235ea1b49b68898
|
||||
|
@ -1,111 +0,0 @@
|
||||
add Prefix and Darwin support
|
||||
|
||||
--- perl-cleaner
|
||||
+++ perl-cleaner
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!@GENTOO_PORTAGE_EPREFIX@/bin/bash
|
||||
# vim: set et sw=4 sts=4 tw=80:
|
||||
# Copyright 2005-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
@@ -22,13 +22,13 @@
|
||||
PKGS_EXCEPTIONS="dev-lang/perl sys-devel/libperl app-emulation/emul-linux-x86-baselibs"
|
||||
PKGS_MANUAL=""
|
||||
|
||||
-PKG_DBDIR=/var/db/pkg
|
||||
+PKG_DBDIR="@GENTOO_PORTAGE_EPREFIX@/var/db/pkg"
|
||||
|
||||
# See bug 504116 for details
|
||||
-if [ -e /lib/gentoo/functions.sh ]; then
|
||||
- . /lib/gentoo/functions.sh
|
||||
-elif [ -e /etc/init.d/functions.sh ]; then
|
||||
- . /etc/init.d/functions.sh
|
||||
+if [ -e "@GENTOO_PORTAGE_EPREFIX@/lib/gentoo/functions.sh" ]; then
|
||||
+ . "@GENTOO_PORTAGE_EPREFIX@/lib/gentoo/functions.sh"
|
||||
+elif [ -e "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/functions.sh" ]; then
|
||||
+ . "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/functions.sh"
|
||||
else
|
||||
echo "$0: Unable to find functions.sh"
|
||||
exit 1
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
veinfo 1 "Locating ph files for removal"
|
||||
eindent ""
|
||||
- for i in /usr/lib{,64,x32}/perl5 ; do
|
||||
+ for i in "@GENTOO_PORTAGE_EPREFIX@"/usr/lib{,64,x32}/perl5 ; do
|
||||
[[ ! -d ${i} ]] && continue
|
||||
veinfo 4 "...in ${i}"
|
||||
while IFS= read -r -d $'\0' file ; do
|
||||
@@ -183,13 +183,13 @@
|
||||
veinfo 1 "Pretend. Nothing to do."
|
||||
return
|
||||
fi
|
||||
- pushd /usr/include > /dev/null
|
||||
+ pushd "@GENTOO_PORTAGE_EPREFIX@"/usr/include > /dev/null
|
||||
if [[ ${version} =~ ^5.(8|10) ]] ; then
|
||||
eindent
|
||||
- veinfo 2 "...in /usr/include"
|
||||
+ veinfo 2 "...in @GENTOO_PORTAGE_EPREFIX@/usr/include"
|
||||
h2ph ${option} * 2>/dev/null
|
||||
for dir in sys arpa netinet bits security asm gnu linux ; do
|
||||
- veinfo 2 "...in /usr/include/$dir/"
|
||||
+ veinfo 2 "...in @GENTOO_PORTAGE_EPREFIX@/usr/include/$dir/"
|
||||
h2ph ${option} -r $dir/*
|
||||
done
|
||||
eoutdent
|
||||
@@ -220,13 +220,16 @@
|
||||
veinfo 1 "Locating ebuilds linked against libperl"
|
||||
fi
|
||||
|
||||
+ local scanelf=scanelf
|
||||
+ [[ -e "@GENTOO_PORTAGE_EPREFIX@"/usr/lib/libperl.dylib ]] \
|
||||
+ && scanelf=scanmacho
|
||||
if ${LIBPERL} ; then
|
||||
- if ! type -P scanelf >/dev/null 2>&1; then
|
||||
- ewarn "scanelf not found! Install app-misc/pax-utils."
|
||||
+ if ! type -P ${scanelf} >/dev/null 2>&1; then
|
||||
+ ewarn "${scanelf} not found! Install app-misc/pax-utils."
|
||||
ewarn "--libperl is disbled."
|
||||
LIBPERL=false
|
||||
else
|
||||
- SONAME="$(scanelf -qBS "$(realpath /usr/lib/libperl.so 2>/dev/null )" | awk '{ print $1 }')"
|
||||
+ SONAME="$(${scanelf} -qBS "$(realpath "@GENTOO_PORTAGE_EPREFIX@"/usr/lib/libperl.{so,dylib} 2>/dev/null )" | awk '{ print $1 }')"
|
||||
veinfo 4 SONAME="${SONAME}"
|
||||
fi
|
||||
fi
|
||||
@@ -268,7 +271,7 @@
|
||||
while read -r type file ; do
|
||||
shopt -s extglob
|
||||
[[ ${type} == obj ]] || [[ ${type} == sym ]] || continue
|
||||
- [[ ${file} =~ ^/usr/(share|lib(32|64|x32)?)/perl5 ]] || continue
|
||||
+ [[ ${file} =~ ^"@GENTOO_PORTAGE_EPREFIX@"/usr/(share|lib(32|64|x32)?)/perl5 ]] || continue
|
||||
file=${file% +(!([[:space:]])) +([[:digit:]])}
|
||||
shopt -u extglob
|
||||
if ${FORCE} || outdated_path "${file}" ; then
|
||||
@@ -302,7 +305,7 @@
|
||||
|
||||
if ${LIBPERL} ; then
|
||||
# We assume the broken libs have all bin or lib in their path
|
||||
- broken_libs="$(scanelf -qBn < <(awk '/^(obj|sym) [^ ]*\/(s?bin|lib(32|64|x32)?)\// && ! /^obj [^ ]*\/usr\/lib\/debug\//{ print $2 }' ${content} ) | grep -o 'libperl\.so\.[0-9.]*' | sort -u )"
|
||||
+ broken_libs="$(${scanelf} -qBn < <(awk '/^(obj|sym) [^ ]*\/(s?bin|lib(32|64|x32)?)\// && ! /^obj [^ ]*\/usr\/lib\/debug\//{ print $2 }' ${content} ) | grep -o 'libperl\.\(so\|dylib\)\.[0-9.]*' | sort -u )"
|
||||
if [[ -n "${broken_libs}" ]] ; then
|
||||
if ${FORCE} || [[ ${broken_libs} != ${SONAME} ]] ; then
|
||||
PKGS_TO_REMERGE+=" ${CATPKGVER}"
|
||||
@@ -327,7 +330,7 @@
|
||||
exit $?
|
||||
fi
|
||||
|
||||
- if [[ ${PMS_COMMAND[${PMS_INDEX}]} == emerge && -x /usr/bin/portageq ]] ; then
|
||||
+ if [[ ${PMS_COMMAND[${PMS_INDEX}]} == emerge && -x "@GENTOO_PORTAGE_EPREFIX@"/usr/bin/portageq ]] ; then
|
||||
# Filter out --getbinpkg, --getbinpkgonly, --usepkg and --usepkgonly options in EMERGE_DEFAULT_OPTS
|
||||
emerge_default_opts=""
|
||||
for option in $(portageq envvar EMERGE_DEFAULT_OPTS ) ; do
|
||||
@@ -383,7 +386,7 @@
|
||||
veinfo 1 "or edited. This script cannot deal with them."
|
||||
vecho 1
|
||||
|
||||
- for i in /usr/{share,lib{,32,64,x32}}/perl5 ; do
|
||||
+ for i in "@GENTOO_PORTAGE_EPREFIX@"/usr/{share,lib{,32,64,x32}}/perl5 ; do
|
||||
[[ -d $i ]] && perlpath[${#perlpath[*]}]="$(realpath $i 2>/dev/null )"
|
||||
done
|
||||
[[ ${#perlpath[*]} == 0 ]] && return
|
@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>perl@gentoo.org</email>
|
||||
<name>Gentoo Perl Project</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit prefix
|
||||
|
||||
DESCRIPTION="User land tool for cleaning up old perl installs"
|
||||
HOMEPAGE="https://www.gentoo.org/proj/en/perl/"
|
||||
|
||||
if [[ "${PV}" == "9999" ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/gentoo-perl/perl-cleaner.git"
|
||||
else
|
||||
SRC_URI="mirror://gentoo/${P}.tar.bz2 https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
[[ "${PV}" == "9999" ]] && DEPEND="sys-apps/help2man"
|
||||
|
||||
RDEPEND="app-shells/bash
|
||||
dev-lang/perl
|
||||
|| (
|
||||
( sys-apps/portage app-portage/portage-utils )
|
||||
( sys-apps/portage-mgorny app-portage/portage-utils )
|
||||
sys-apps/pkgcore
|
||||
)
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eprefixify ${PN}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dosbin perl-cleaner
|
||||
doman perl-cleaner.1
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
inherit prefix
|
||||
|
||||
@ -13,7 +13,7 @@ if [[ "${PV}" == "9999" ]] ; then
|
||||
EGIT_REPO_URI="https://github.com/gentoo-perl/perl-cleaner.git"
|
||||
else
|
||||
SRC_URI="mirror://gentoo/${P}.tar.bz2 https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
inherit prefix
|
||||
|
||||
@ -13,7 +13,7 @@ if [[ "${PV}" == "9999" ]] ; then
|
||||
EGIT_REPO_URI="https://github.com/gentoo-perl/perl-cleaner.git"
|
||||
else
|
||||
SRC_URI="mirror://gentoo/${P}.tar.bz2 https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
@ -26,7 +26,6 @@ RDEPEND="app-shells/bash
|
||||
dev-lang/perl
|
||||
|| (
|
||||
( sys-apps/portage app-portage/portage-utils )
|
||||
( sys-apps/portage-mgorny app-portage/portage-utils )
|
||||
sys-apps/pkgcore
|
||||
)
|
||||
"
|
||||
|
Loading…
Reference in New Issue
Block a user