mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-31 19:31:07 +02:00
Merge pull request #305 from flatcar-linux/krnowak/pkg-updates-2019
Update packages and eclasses from 2019
This commit is contained in:
commit
50680cda4d
@ -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
|
||||
)
|
||||
"
|
||||
|
@ -1,2 +1,2 @@
|
||||
DIST gzip-1.10.tar.xz 775144 BLAKE2B 431dc0fd11061eabd9db86594777b86510b124b124fd74799eacd67334631af60f638be2638413bee0153a9da35528d0aecc5b5083152c395223705400c9103b SHA512 e6ba9e3906cdb6a6235b213515093d02afa1722686f73eddacbacae628542b586b449829783b6a1701e9b9e0c4d4dfa6845904d3b6b010f5cf21aec4997c9299
|
||||
DIST gzip-1.9.tar.xz 762516 BLAKE2B 4001fc7a770634916d52b026dab1b621fc96275bfb61ec2df2d0e7d7ec1c81414270d3c866034e6ef758870f38e9d4396a25832abe558915a7ded1f1511eb4b0 SHA512 c0852e7f7662141e79d14bc36e50f1940dba3e804feff3b0b8fa084ffec720ac245352282d2f1db117fadc95758424dd418d192b94621dac4367834ccf101fad
|
||||
DIST gzip-1.11.tar.xz 804096 BLAKE2B c251066f0bded6a6557a5cbfe5d20090c6446051c31fad610af4f9f7b2537c28fed1cfab424a459452db73b7d1df1361e5aeba163a9e980fc611faf408cac128 SHA512 af297c173297d588722f4d0f140a2ae4d3ea3861464191772fb2e11e47be43644b5ae01ed63f0051d6eb4751666284de53e14c4dd9f0c1d25f61cf676fbf11f3
|
||||
|
@ -1,134 +0,0 @@
|
||||
fix build failure against glibc-2.28
|
||||
|
||||
https://bugs.gentoo.org/663928
|
||||
|
||||
Adopted gnulib's upstream patch:
|
||||
|
||||
From 4af4a4a71827c0bc5e0ec67af23edef4f15cee8e Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Mon, 5 Mar 2018 10:56:29 -0800
|
||||
Subject: [PATCH] fflush: adjust to glibc 2.28 libio.h removal
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Problem reported by Daniel P. Berrangé in:
|
||||
https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
|
||||
* lib/fflush.c (clear_ungetc_buffer_preserving_position)
|
||||
(disable_seek_optimization, rpl_fflush):
|
||||
* lib/fpurge.c (fpurge):
|
||||
* lib/freadahead.c (freadahead):
|
||||
* lib/freading.c (freading):
|
||||
* lib/fseeko.c (fseeko):
|
||||
* lib/fseterr.c (fseterr):
|
||||
Check _IO_EOF_SEEN instead of _IO_ftrylockfile.
|
||||
* lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]:
|
||||
Define if not already defined.
|
||||
---
|
||||
lib/fflush.c | 6 +++---
|
||||
lib/fpurge.c | 2 +-
|
||||
lib/freading.c | 2 +-
|
||||
lib/fseeko.c | 4 ++--
|
||||
lib/fseterr.c | 2 +-
|
||||
lib/stdio-impl.h | 6 ++++++
|
||||
|
||||
--- a/lib/fflush.c
|
||||
+++ b/lib/fflush.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#undef fflush
|
||||
|
||||
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
|
||||
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
|
||||
static void
|
||||
@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
|
||||
|
||||
#endif
|
||||
|
||||
-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
|
||||
+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
|
||||
|
||||
# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
|
||||
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
|
||||
@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
|
||||
if (stream == NULL || ! freading (stream))
|
||||
return fflush (stream);
|
||||
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
|
||||
clear_ungetc_buffer_preserving_position (stream);
|
||||
|
||||
--- a/lib/fpurge.c
|
||||
+++ b/lib/fpurge.c
|
||||
@@ -62,7 +62,7 @@ fpurge (FILE *fp)
|
||||
/* Most systems provide FILE as a struct and the necessary bitmask in
|
||||
<stdio.h>, because they need it for implementing getc() and putc() as
|
||||
fast macros. */
|
||||
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
fp->_IO_read_end = fp->_IO_read_ptr;
|
||||
fp->_IO_write_ptr = fp->_IO_write_base;
|
||||
/* Avoid memory leak when there is an active ungetc buffer. */
|
||||
--- a/lib/freading.c
|
||||
+++ b/lib/freading.c
|
||||
@@ -31,7 +31,7 @@ freading (FILE *fp)
|
||||
/* Most systems provide FILE as a struct and the necessary bitmask in
|
||||
<stdio.h>, because they need it for implementing getc() and putc() as
|
||||
fast macros. */
|
||||
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
return ((fp->_flags & _IO_NO_WRITES) != 0
|
||||
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
|
||||
&& fp->_IO_read_base != NULL));
|
||||
--- a/lib/fseeko.c
|
||||
+++ b/lib/fseeko.c
|
||||
@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence)
|
||||
#endif
|
||||
|
||||
/* These tests are based on fpurge.c. */
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
if (fp->_IO_read_end == fp->_IO_read_ptr
|
||||
&& fp->_IO_write_ptr == fp->_IO_write_base
|
||||
&& fp->_IO_save_base == NULL)
|
||||
@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence)
|
||||
return -1;
|
||||
}
|
||||
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
fp->_flags &= ~_IO_EOF_SEEN;
|
||||
fp->_offset = pos;
|
||||
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
||||
--- a/lib/fseterr.c
|
||||
+++ b/lib/fseterr.c
|
||||
@@ -29,7 +29,7 @@ fseterr (FILE *fp)
|
||||
/* Most systems provide FILE as a struct and the necessary bitmask in
|
||||
<stdio.h>, because they need it for implementing getc() and putc() as
|
||||
fast macros. */
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
fp->_flags |= _IO_ERR_SEEN;
|
||||
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
||||
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
|
||||
--- a/lib/stdio-impl.h
|
||||
+++ b/lib/stdio-impl.h
|
||||
@@ -18,6 +18,12 @@
|
||||
the same implementation of stdio extension API, except that some fields
|
||||
have different naming conventions, or their access requires some casts. */
|
||||
|
||||
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
|
||||
+ problem by defining it ourselves. FIXME: Do not rely on glibc
|
||||
+ internals. */
|
||||
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
|
||||
+# define _IO_IN_BACKUP 0x100
|
||||
+#endif
|
||||
|
||||
/* BSD stdio derived implementations. */
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
@ -1,19 +1,19 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic
|
||||
|
||||
DESCRIPTION="Standard GNU compressor"
|
||||
HOMEPAGE="https://www.gnu.org/software/gzip/"
|
||||
SRC_URI="mirror://gnu/gzip/${P}.tar.xz
|
||||
mirror://gnu-alpha/gzip/${P}.tar.xz
|
||||
https://alpha.gnu.org/gnu/gzip/${P}.tar.xz
|
||||
mirror://gentoo/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~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"
|
||||
IUSE="pic static"
|
||||
|
||||
PATCHES=(
|
||||
@ -34,6 +34,6 @@ src_install() {
|
||||
|
||||
# keep most things in /usr, just the fun stuff in /
|
||||
dodir /bin
|
||||
mv "${ED%/}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${ED%/}"/bin/ || die
|
||||
sed -e "s:${EPREFIX}/usr:${EPREFIX}:" -i "${ED%/}"/bin/gunzip || die
|
||||
mv "${ED}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${ED}"/bin/ || die
|
||||
sed -e "s:${EPREFIX}/usr:${EPREFIX}:" -i "${ED}"/bin/gunzip || die
|
||||
}
|
||||
|
@ -1,24 +1,23 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic
|
||||
|
||||
DESCRIPTION="Standard GNU compressor"
|
||||
HOMEPAGE="https://www.gnu.org/software/gzip/"
|
||||
SRC_URI="mirror://gnu/gzip/${P}.tar.xz
|
||||
mirror://gnu-alpha/gzip/${P}.tar.xz
|
||||
https://alpha.gnu.org/gnu/gzip/${P}.tar.xz
|
||||
mirror://gentoo/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
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"
|
||||
IUSE="pic static"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.3.8-install-symlinks.patch"
|
||||
"${FILESDIR}/${PN}-1.9-gnulib-glibc-2.28.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
@ -35,6 +34,6 @@ src_install() {
|
||||
|
||||
# keep most things in /usr, just the fun stuff in /
|
||||
dodir /bin
|
||||
mv "${ED%/}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${ED%/}"/bin/ || die
|
||||
sed -e "s:${EPREFIX}/usr:${EPREFIX}:" -i "${ED%/}"/bin/gunzip || die
|
||||
mv "${ED}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${ED}"/bin/ || die
|
||||
sed -e "s:${EPREFIX}/usr:${EPREFIX}:" -i "${ED}"/bin/gunzip || die
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<?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>base-system@gentoo.org</email>
|
||||
|
@ -1 +1,2 @@
|
||||
DIST eclass-manpages-20190329.tar.xz 428068 BLAKE2B 630f6ba06bef6e4aed7713776b8a0ce737dcba4441309ed326b6eb87a5515f5fbd2f95db4a12385788a1dbf1ff6bc3c09620f4564c0bba201f48f6aa31520b41 SHA512 8088078334c2b7f35301bd75dc2505a366d030cb1d28bf47c387ba0c727cf5a58e1f279708d4a32ecf47ceec543c287ea5ad8c76ce4bbd9c45f039be2924d7ee
|
||||
DIST eclass-manpages-20210712.tar.xz 410588 BLAKE2B 776da6b26db95791401d562d3d550e1ab71dc19f54124fa37e78ab2595835fb05e7382b98007e58131698710b978dd87cbc10df1ea98c6ef01ec866418d6f9a6 SHA512 fb2bdc790d96f0662d84eddd01f291b4a3cac638c1e3df8975755e81d2d64dda14b0f60a77387da8544672080711d5047dda777d27a8cf2ded2634c47ecfee4b
|
||||
DIST eclass-manpages-20211002.tar.xz 410056 BLAKE2B 6ac900aaa2718d838af7f069766e2e818276c80d1819f38ca0bc09d3815487083dfe64781331d9b0049c474fc6cec9381daea9c7961f14b208cd3372c79b7564 SHA512 bcea1bcae107df73c72c37dd65c5414833ad59e9d6088f806cb06512b53cdbcad10fb50fe23ede02ccfcda17ae86c70879f496929ef0f54aa799179f9ef0d869
|
||||
|
@ -1,20 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
DESCRIPTION="Collection of Gentoo eclass manpages"
|
||||
HOMEPAGE="https://github.com/mgorny/eclass-to-manpage"
|
||||
SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
# Keep the keywords stable. No need to change to ~arch.
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
|
||||
|
||||
DEPEND="app-arch/xz-utils
|
||||
sys-apps/gawk"
|
||||
|
||||
src_install() {
|
||||
emake install DESTDIR="${D}" PREFIX=/usr
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Collection of Gentoo eclass manpages"
|
||||
HOMEPAGE="https://github.com/mgorny/eclass-to-manpage"
|
||||
SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
# Keep the keywords stable. No need to change to ~arch.
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
|
||||
|
||||
BDEPEND="app-arch/xz-utils
|
||||
sys-apps/gawk"
|
||||
|
||||
src_install() {
|
||||
emake install DESTDIR="${D}" PREFIX="${EPREFIX}/usr"
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Collection of Gentoo eclass manpages"
|
||||
HOMEPAGE="https://github.com/mgorny/eclass-to-manpage"
|
||||
SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
# Keep the keywords stable. No need to change to ~arch.
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
|
||||
|
||||
BDEPEND="app-arch/xz-utils
|
||||
sys-apps/gawk
|
||||
sys-apps/groff"
|
||||
|
||||
src_install() {
|
||||
emake install DESTDIR="${D}" PREFIX="${EPREFIX}/usr"
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
EAPI=8
|
||||
|
||||
inherit git-r3
|
||||
|
||||
@ -14,9 +14,9 @@ EGIT_REPO_URI="https://anongit.gentoo.org/git/repo/gentoo.git
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE=""
|
||||
|
||||
DEPEND="sys-apps/gawk"
|
||||
BDEPEND="sys-apps/gawk
|
||||
sys-apps/groff"
|
||||
|
||||
src_unpack() {
|
||||
git-r3_fetch
|
||||
@ -31,5 +31,5 @@ src_compile() {
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake install ECLASSDIR=eclass DESTDIR="${D}" PREFIX=/usr
|
||||
emake install ECLASSDIR=eclass DESTDIR="${D}" PREFIX="${EPREFIX}/usr"
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?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="person">
|
||||
<email>mgorny@gentoo.org</email>
|
||||
|
@ -1 +1,2 @@
|
||||
DIST jq-1.6.tar.gz 1750584 BLAKE2B c9be1314e9d027247de63492ee362e996ef85faf45a47ee421cad95ebde9188bff8d3fc7db64e717ab922e1052f3b1c1500f5589fc5b2199ab66effb000e442d SHA512 5da71f53c325257f1f546a2520fe47828b495c953270df25ea0e37741463fdda72f0ba4d5b05b25114ec30f27a559344c2b024bacabf610759f4e3e9efadb480
|
||||
DIST jq-1.7_pre20201109.tar.gz 1181867 BLAKE2B 9db187ab927b635c43fbc6191aeffa00451b12253ae023bbabe6fba5fdf8fb393f8450ee2011ef58cb93e2f27994d454fac967984a721439aaac93259c02f7f1 SHA512 f2997d70edb36d0a23b71a7d933a763cedd7c74ffa3129c2a6cb7189aaff1c5095cdc51062b7cd119324ec2c83ebae6ff0b7da3941315303b7a31146b9eb285a
|
||||
|
17
sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-runpath.patch
vendored
Normal file
17
sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-runpath.patch
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0441d4a..8f1aa23 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -283,4 +283,11 @@ AC_SUBST([BUNDLER], ["$bundle_cmd"])
|
||||
AC_CONFIG_MACRO_DIR([config/m4])
|
||||
AC_CONFIG_FILES([Makefile libjq.pc])
|
||||
AC_OUTPUT
|
||||
-
|
||||
+AC_ARG_ENABLE([rpathhack],
|
||||
+ [AC_HELP_STRING([--enable-rpathhack], [patch libtool to remove RPATH])],
|
||||
+ [
|
||||
+AC_MSG_RESULT([patching libtool to fix rpath])
|
||||
+sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
+ ],
|
||||
+ [])
|
41
sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-visible-null.patch
vendored
Normal file
41
sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-visible-null.patch
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
diff --git a/src/jv_print.c b/src/jv_print.c
|
||||
index 2e781bb..e621b31 100644
|
||||
--- a/src/jv_print.c
|
||||
+++ b/src/jv_print.c
|
||||
@@ -32,7 +32,7 @@ static const jv_kind color_kinds[] =
|
||||
static char color_bufs[sizeof(color_kinds)/sizeof(color_kinds[0])][16];
|
||||
static const char *color_bufps[8];
|
||||
static const char* def_colors[] =
|
||||
- {COL("1;30"), COL("0;37"), COL("0;37"), COL("0;37"),
|
||||
+ {COL("1;90"), COL("0;37"), COL("0;37"), COL("0;37"),
|
||||
COL("0;32"), COL("1;37"), COL("1;37")};
|
||||
#define FIELD_COLOR COL("34;1")
|
||||
|
||||
diff --git a/tests/shtest b/tests/shtest
|
||||
index 8ed62b2..2d3f0da 100755
|
||||
--- a/tests/shtest
|
||||
+++ b/tests/shtest
|
||||
@@ -280,12 +280,12 @@ fi
|
||||
|
||||
# Check $JQ_COLORS
|
||||
$JQ -Ccn . > $d/color
|
||||
-printf '\033[1;30mnull\033[0m\n' > $d/expect
|
||||
+printf '\033[1;90mnull\033[0m\n' > $d/expect
|
||||
cmp $d/color $d/expect
|
||||
JQ_COLORS='4;31' $JQ -Ccn . > $d/color
|
||||
printf '\033[4;31mnull\033[0m\n' > $d/expect
|
||||
cmp $d/color $d/expect
|
||||
-JQ_COLORS='1;30:0;31:0;32:0;33:0;34:1;35:1;36' \
|
||||
+JQ_COLORS='1;90:0;31:0;32:0;33:0;34:1;35:1;36' \
|
||||
$JQ -Ccn '[{"a":true,"b":false},123,null]' > $d/color
|
||||
(
|
||||
printf '\033[1;35m[\033[1;36m{'
|
||||
@@ -298,7 +298,7 @@ printf '[0m\033[0;31mfalse\033'
|
||||
printf '[0m\033[1;36m\033[1;36'
|
||||
printf 'm}\033[0m\033[1;35m,\033['
|
||||
printf '0;33m123\033[0m\033[1;'
|
||||
-printf '35m,\033[1;30mnull\033'
|
||||
+printf '35m,\033[1;90mnull\033'
|
||||
printf '[0m\033[1;35m\033[1;35'
|
||||
printf 'm]\033[0m\n'
|
||||
) > $d/expect
|
44
sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-warnings.patch
vendored
Normal file
44
sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-warnings.patch
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
diff --git a/src/builtin.c b/src/builtin.c
|
||||
index bf80c7b..12db573 100644
|
||||
--- a/src/builtin.c
|
||||
+++ b/src/builtin.c
|
||||
@@ -1,5 +1,6 @@
|
||||
#define _BSD_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
+#define _DEFAULT_SOURCE
|
||||
#ifndef __sun__
|
||||
# define _XOPEN_SOURCE
|
||||
# define _XOPEN_SOURCE_EXTENDED 1
|
||||
diff --git a/src/jv_dtoa.c b/src/jv_dtoa.c
|
||||
index 33feb99..fcbd902 100644
|
||||
--- a/src/jv_dtoa.c
|
||||
+++ b/src/jv_dtoa.c
|
||||
@@ -2327,7 +2327,7 @@ retlow1:
|
||||
jvp_strtod
|
||||
(struct dtoa_context* C, const char *s00, char **se)
|
||||
{
|
||||
- int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, e, e1, test_scale;
|
||||
+ int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, e, e1;
|
||||
int esign, i, j, k, nd, nd0, nf, nz, nz0, nz1, sign;
|
||||
CONST char *s, *s0, *s1;
|
||||
double aadj, aadj1;
|
||||
diff --git a/src/jv_dtoa_tsd.c b/src/jv_dtoa_tsd.c
|
||||
index 0f95df4..e5209dd 100644
|
||||
--- a/src/jv_dtoa_tsd.c
|
||||
+++ b/src/jv_dtoa_tsd.c
|
||||
@@ -24,7 +24,7 @@ static void tsd_dtoa_ctx_fini() {
|
||||
}
|
||||
|
||||
static void tsd_dtoa_ctx_init() {
|
||||
- if (pthread_key_create(&dtoa_ctx_key, tsd_dtoa_ctx_dtor) != 0) {
|
||||
+ if (pthread_key_create(&dtoa_ctx_key, (void (*)(void *))tsd_dtoa_ctx_dtor) != 0) {
|
||||
fprintf(stderr, "error: cannot create thread specific key");
|
||||
abort();
|
||||
}
|
||||
@@ -43,4 +43,4 @@ inline struct dtoa_context *tsd_dtoa_context_get() {
|
||||
}
|
||||
}
|
||||
return ctx;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
@ -0,0 +1,13 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0441d4a..592ceb9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1,8 +1,3 @@
|
||||
-m4_define([jq_version],
|
||||
- m4_esyscmd_s([(git rev-parse --verify -q jq-1.0 > /dev/null &&
|
||||
- (git describe --tags --dirty --match 'jq-*'|sed 's/^jq-//')) ||
|
||||
- echo `git rev-parse --abbrev-ref HEAD`-`git describe --always --dirty`])))
|
||||
-
|
||||
AC_INIT([jq], [jq_version], [https://github.com/stedolan/jq/issues],
|
||||
[jq], [https://stedolan.github.io/jq])
|
||||
|
87
sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.7_pre20201109.ebuild
vendored
Normal file
87
sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.7_pre20201109.ebuild
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools
|
||||
|
||||
COMMIT_HASH="a17dd3248a666d01be75f6b16be37e80e20b0954"
|
||||
|
||||
DESCRIPTION="A lightweight and flexible command-line JSON processor"
|
||||
HOMEPAGE="https://stedolan.github.io/jq/"
|
||||
#SRC_URI="https://github.com/stedolan/jq/releases/download/${P}/${P}.tar.gz"
|
||||
SRC_URI="https://github.com/stedolan/jq/archive/${COMMIT_HASH}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${COMMIT_HASH}"
|
||||
|
||||
LICENSE="MIT CC-BY-3.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~ppc ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
|
||||
IUSE="+oniguruma static-libs test"
|
||||
|
||||
ONIGURUMA_MINPV='>=dev-libs/oniguruma-6.1.3' # Keep this in sync with bundled modules/oniguruma/
|
||||
DEPEND="
|
||||
>=sys-devel/bison-3.0
|
||||
sys-devel/flex
|
||||
oniguruma? ( ${ONIGURUMA_MINPV}:=[static-libs?] )
|
||||
"
|
||||
RDEPEND="
|
||||
!static-libs? (
|
||||
oniguruma? ( ${ONIGURUMA_MINPV}[static-libs?] )
|
||||
)
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/jq-1.6-r3-never-bundle-oniguruma.patch
|
||||
"${FILESDIR}"/jq-1.7-runpath.patch
|
||||
"${FILESDIR}"/jq-1.7-warnings.patch
|
||||
"${FILESDIR}"/jq-1.7-visible-null.patch
|
||||
# https://bugs.gentoo.org/776385
|
||||
"${FILESDIR}"/jq-1.7_pre20201109-no-git-bdep.patch
|
||||
)
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="test? ( oniguruma )"
|
||||
|
||||
src_prepare() {
|
||||
sed -e '/^dist_doc_DATA/d; s:-Wextra ::' -i Makefile.am || die
|
||||
sed -r -e "s:(m4_define\(\[jq_version\],) .+\):\1 \[${PV}\]):" \
|
||||
-i configure.ac || die
|
||||
|
||||
# jq-1.6-r3-never-bundle-oniguruma makes sure we build with the system oniguruma,
|
||||
# but the bundled copy of oniguruma still gets eautoreconf'd since it
|
||||
# exists; save the cycles by nuking it.
|
||||
sed -e '/modules\/oniguruma/d' -i Makefile.am || die
|
||||
rm -rf "${S}"/modules/oniguruma || die
|
||||
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local econfargs=(
|
||||
# don't try to rebuild docs
|
||||
--disable-docs
|
||||
--disable-valgrind
|
||||
--disable-maintainer-mode
|
||||
--enable-rpathhack
|
||||
$(use_enable static-libs static)
|
||||
$(use_with oniguruma oniguruma yes)
|
||||
)
|
||||
econf "${econfargs[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if ! LD_LIBRARY_PATH="${S}/.libs" nonfatal emake check; then
|
||||
if [[ -r "${S}/test-suite.log" ]]; then
|
||||
eerror "Tests failed, outputting testsuite log"
|
||||
cat "${S}/test-suite.log"
|
||||
fi
|
||||
die "Tests failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=( AUTHORS NEWS README.md )
|
||||
default
|
||||
|
||||
use static-libs || { find "${D}" -name '*.la' -delete || die; }
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>vpayno+gentoo@gmail.com</email>
|
||||
<name>Victor Payno</name>
|
||||
</maintainer>
|
||||
|
@ -0,0 +1 @@
|
||||
- gzip ([1.11](https://lists.gnu.org/archive/html/info-gnu/2021-09/msg00002.html))
|
@ -1 +1 @@
|
||||
DIST nasm-2.14.02.tar.xz 827620 BLAKE2B deb1f3c806ffbe48eefe4163271c68f02a782f75f21980331cb03e64de20da61c118621536c1c869c1629e558cab45ce98fed8443d29c1126fb4255cd6a36ce4 SHA512 c7a228095f37321d57f2813d04f58ee66949e8f81fc49ef6c4ecd391301e308217583ce1a265d4fe8c13d54b5b9c72aeb132caa3caee36e31b6555fbfff34c81
|
||||
DIST nasm-2.15.05.tar.xz 995732 BLAKE2B a41434965c2125577b762d907a0a3c251c75d9f9beac230fba4099182c7f7beb08c6d2c05c2432b0dc8ba829f24077f44c3096faea9bd0a533250e6dbbfaef35 SHA512 512f90a2584f1c5811429274b97c64a2cedf37b9fdeffb1bcd0ea64afd9ecc19a2d7877ca8f1e05393aa324153fc9f39ea51dacbf8d25a7d5a2d7728c925dba7
|
||||
|
@ -4,12 +4,10 @@ In this case we can unconditionally copy files.
|
||||
|
||||
Reported-by: Michał Górny
|
||||
Bug: https://bugs.gentoo.org/655444
|
||||
diff --git a/doc/Makefile.in b/doc/Makefile.in
|
||||
index 261a791..bc9da1e 100644
|
||||
--- a/doc/Makefile.in
|
||||
+++ b/doc/Makefile.in
|
||||
@@ -28,3 +28,3 @@ RM_RF = rm -rf
|
||||
CP_F = cp -f
|
||||
-CP_UF = cp -ufv
|
||||
+CP_UF = cp -fv
|
||||
-CP_UF = cp -uf
|
||||
+CP_UF = cp -f
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?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="person">
|
||||
<email>slyfox@gentoo.org</email>
|
||||
<name>Sergei Trofimovich</name>
|
||||
<email>matthew@gentoo.org</email>
|
||||
<name>Matthew Smith</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
The Netwide Assembler, NASM, is an 80x86 assembler designed for portability
|
||||
@ -14,7 +14,7 @@ and easy to understand, similar to Intel's but less complex. It supports
|
||||
Pentium, P6, MMX, 3DNow!, SSE and SSE2 opcodes, and has macro capability.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="sourceforge">nasm</remote-id>
|
||||
<remote-id type="github">netwide-assembler/nasm</remote-id>
|
||||
<bugs-to>https://bugzilla.nasm.us/</bugs-to>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
@ -1,21 +1,18 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic
|
||||
|
||||
DESCRIPTION="groovy little assembler"
|
||||
HOMEPAGE="https://www.nasm.us/"
|
||||
SRC_URI="https://www.nasm.us/pub/nasm/releasebuilds/${PV/_}/${P/_}.tar.xz"
|
||||
S="${WORKDIR}"/${P/_}
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~ia64 x86 ~x64-cygwin ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos"
|
||||
KEYWORDS="amd64 ~arm64 ~ia64 ~ppc64 ~riscv x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND=""
|
||||
# [fonts note] doc/psfonts.ph defines ordered list of font preference.
|
||||
# Currently 'media-fonts/source-pro' is most preferred and is able to
|
||||
# satisfy all 6 font flavours: tilt, chapter, head, etc.
|
||||
@ -30,17 +27,10 @@ BDEPEND="
|
||||
)
|
||||
"
|
||||
|
||||
S=${WORKDIR}/${P/_}
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.13.03-bsd-cp-doc.patch
|
||||
"${FILESDIR}"/${PN}-2.15-bsd-cp-doc.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
strip-flags
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
use doc && emake doc
|
@ -1 +1,2 @@
|
||||
DIST libunistring-0.9.10.tar.gz 3744814 BLAKE2B 3ddc55b8021c0f4822beb83b807bb21dbbf10bbb866747f64e060df3ab822a4143528855e1ce6a13144630bc8daa14f1fa830db77fb605e57cae21d46de804d6 SHA512 690082732fbbd47ab4ffbd6f21d85afece0f8e2ded24982f949f4ae52bf0a981b75ea9bc14ab289e0954cde07f31a7a4c2bb65615a8eb5b2bfa65720310b6fc9
|
||||
DIST libunistring-1.0.tar.gz 4214306 BLAKE2B 177f21d9fb6d81ea6bb2fd05f9ca31cd6cecb5a16be273de8817a8fb6ffac997421ebf108acebcb3392b8df423b7e3e150f24a731e0909e2ba171b4bae2fb53d SHA512 6125e3911d15bea8fea5c0b97864f928eab8c8476f1a24c7349b0552e2d11d9b73c1fa0fcb354917e42407d4e5adea55d0c8012121fa0a53c60faa7b0911aef3
|
||||
|
15
sdk_container/src/third_party/portage-stable/dev-libs/libunistring/files/libunistring-test.patch
vendored
Normal file
15
sdk_container/src/third_party/portage-stable/dev-libs/libunistring/files/libunistring-test.patch
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=cca32830b57e91f837c01d15b8732f23ff97fc36
|
||||
|
||||
Author: Bruno Haible <bruno@clisp.org>
|
||||
|
||||
--- a/tests/glthread/thread.h
|
||||
+++ b/tests/glthread/thread.h
|
||||
@@ -133,8 +133,6 @@ extern int glthread_in_use (void);
|
||||
call to foo(...) in the same function. To avoid this, we test the
|
||||
address of a function in libpthread that we don't use. */
|
||||
|
||||
-# pragma weak pthread_create
|
||||
-
|
||||
# ifndef pthread_sigmask /* Do not declare rpl_pthread_sigmask weak. */
|
||||
# pragma weak pthread_sigmask
|
||||
# endif
|
@ -1,21 +1,22 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
inherit eutils multilib-minimal libtool
|
||||
inherit multilib-minimal libtool
|
||||
|
||||
DESCRIPTION="Library for manipulating Unicode and C strings according to Unicode standard"
|
||||
HOMEPAGE="https://www.gnu.org/software/libunistring/"
|
||||
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-3 GPL-3"
|
||||
LICENSE="|| ( LGPL-3+ GPL-2+ ) || ( FDL-1.2 GPL-3+ )"
|
||||
SLOT="0/2"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~x64-cygwin ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~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"
|
||||
IUSE="doc static-libs"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-nodocs.patch
|
||||
"${FILESDIR}"/${PN}-test.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
@ -28,17 +29,14 @@ multilib_src_configure() {
|
||||
econf $(use_enable static-libs static)
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
default
|
||||
|
||||
prune_libtool_files
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
default
|
||||
|
||||
if use doc; then
|
||||
dohtml doc/*.html
|
||||
docinto html
|
||||
dodoc doc/*.html
|
||||
doinfo doc/*.info
|
||||
fi
|
||||
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
}
|
40
sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-1.0.ebuild
vendored
Normal file
40
sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-1.0.ebuild
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit multilib-minimal libtool
|
||||
|
||||
DESCRIPTION="Library for manipulating Unicode and C strings according to Unicode standard"
|
||||
HOMEPAGE="https://www.gnu.org/software/libunistring/"
|
||||
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( LGPL-3+ GPL-2+ ) || ( FDL-1.2 GPL-3+ )"
|
||||
SLOT="0/2"
|
||||
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"
|
||||
IUSE="doc static-libs"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-nodocs.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
elibtoolize # for Solaris shared libraries
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
ECONF_SOURCE="${S}" econf $(use_enable static-libs static)
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
default
|
||||
|
||||
if use doc ; then
|
||||
docinto html
|
||||
dodoc doc/*.html
|
||||
doinfo doc/*.info
|
||||
fi
|
||||
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
}
|
@ -1,19 +1,20 @@
|
||||
<?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>scheme@gentoo.org</email>
|
||||
<name>Gentoo Scheme Project</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
Text files are nowadays usually encoded in Unicode, and may consist of very
|
||||
different scripts – from Latin letters to Chinese Hanzi –, with many kinds
|
||||
of special characters – accents, right-to-left writing marks, hyphens, Roman
|
||||
numbers, and much more. But the POSIX platform APIs for text do not contain
|
||||
adequate functions for dealing with particular properties of many Unicode
|
||||
characters. In fact, the POSIX APIs for text have several assumptions at
|
||||
their base which don't hold for Unicode text.
|
||||
This library provides functions for manipulating Unicode strings and for
|
||||
manipulating C strings according to the Unicode standard.
|
||||
</longdescription>
|
||||
<maintainer type="project">
|
||||
<email>scheme@gentoo.org</email>
|
||||
<name>Gentoo Scheme Project</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
Text files are nowadays usually encoded in Unicode, and may consist of very
|
||||
different scripts – from Latin letters to Chinese Hanzi –, with many kinds
|
||||
of special characters – accents, right-to-left writing marks, hyphens, Roman
|
||||
numbers, and much more. But the POSIX platform APIs for text do not contain
|
||||
adequate functions for dealing with particular properties of many Unicode
|
||||
characters. In fact, the POSIX APIs for text have several assumptions at
|
||||
their base which don't hold for Unicode text.
|
||||
This library provides functions for manipulating Unicode strings and for
|
||||
manipulating C strings according to the Unicode standard.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
||||
|
@ -1,8 +1,9 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
CMAKE_ECLASS=cmake
|
||||
inherit cmake-multilib
|
||||
|
||||
DESCRIPTION="Unit testing framework for C"
|
||||
@ -11,8 +12,9 @@ SRC_URI="https://cmocka.org/files/1.1/${P}.tar.xz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc examples static-libs test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="
|
||||
doc? ( app-doc/doxygen[dot] )
|
||||
@ -23,16 +25,16 @@ multilib_src_configure() {
|
||||
-DWITH_EXAMPLES=$(usex examples)
|
||||
-DWITH_STATIC_LIB=$(usex static-libs)
|
||||
-DUNIT_TESTING=$(usex test)
|
||||
$(multilib_is_native_abi && cmake-utils_use_find_package doc Doxygen \
|
||||
$(multilib_is_native_abi && cmake_use_find_package doc Doxygen \
|
||||
|| echo -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON)
|
||||
)
|
||||
|
||||
cmake-utils_src_configure
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
cmake-utils_src_compile
|
||||
multilib_is_native_abi && use doc && cmake-utils_src_compile docs
|
||||
cmake_src_compile
|
||||
multilib_is_native_abi && use doc && cmake_src_compile docs
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
@ -40,5 +42,5 @@ multilib_src_install() {
|
||||
local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
|
||||
fi
|
||||
|
||||
cmake-utils_src_install
|
||||
cmake_src_install
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?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>kde@gentoo.org</email>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: cargo.eclass
|
||||
@ -6,49 +6,201 @@
|
||||
# rust@gentoo.org
|
||||
# @AUTHOR:
|
||||
# Doug Goldstein <cardoe@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 6 7
|
||||
# Georgy Yakovlev <gyakovlev@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 7 8
|
||||
# @BLURB: common functions and variables for cargo builds
|
||||
|
||||
if [[ -z ${_CARGO_ECLASS} ]]; then
|
||||
_CARGO_ECLASS=1
|
||||
|
||||
CARGO_DEPEND=""
|
||||
[[ ${CATEGORY}/${PN} != dev-util/cargo ]] && CARGO_DEPEND="virtual/rust"
|
||||
# check and document RUST_DEPEND and options we need below in case conditions.
|
||||
# https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md
|
||||
RUST_DEPEND="virtual/rust"
|
||||
|
||||
case ${EAPI} in
|
||||
6) DEPEND="${CARGO_DEPEND}";;
|
||||
7) BDEPEND="${CARGO_DEPEND}";;
|
||||
*) die "EAPI=${EAPI:-0} is not supported" ;;
|
||||
case "${EAPI:-0}" in
|
||||
0|1|2|3|4|5|6)
|
||||
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
|
||||
;;
|
||||
7)
|
||||
# 1.37 added 'cargo vendor' subcommand and net.offline config knob
|
||||
RUST_DEPEND=">=virtual/rust-1.37.0"
|
||||
;;
|
||||
|
||||
8)
|
||||
# 1.39 added --workspace
|
||||
# 1.46 added --target dir
|
||||
# 1.48 added term.progress config option
|
||||
# 1.51 added split-debuginfo profile option
|
||||
# 1.52 may need setting RUSTC_BOOTSTRAP envvar for some crates
|
||||
# 1.53 added cargo update --offline, can be used to update vulnerable crates from pre-fetched registry without editing toml
|
||||
RUST_DEPEND=">=virtual/rust-1.53"
|
||||
|
||||
if [[ -z ${CRATES} && "${PV}" != *9999* ]]; then
|
||||
eerror "undefined CRATES variable in non-live EAPI=8 ebuild"
|
||||
die "CRATES variable not defined"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
|
||||
;;
|
||||
esac
|
||||
|
||||
inherit multiprocessing
|
||||
inherit multiprocessing toolchain-funcs
|
||||
|
||||
EXPORT_FUNCTIONS src_unpack src_compile src_install src_test
|
||||
if [[ ! ${CARGO_OPTIONAL} ]]; then
|
||||
BDEPEND="${RUST_DEPEND}"
|
||||
EXPORT_FUNCTIONS src_unpack src_configure src_compile src_install src_test
|
||||
fi
|
||||
|
||||
IUSE="${IUSE} debug"
|
||||
|
||||
ECARGO_HOME="${WORKDIR}/cargo_home"
|
||||
ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
|
||||
|
||||
# @ECLASS-VARIABLE: CRATES
|
||||
# @DEFAULT_UNSET
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# bash string containing all crates package wants to download
|
||||
# used by cargo_crate_uris()
|
||||
# Example:
|
||||
# @CODE
|
||||
# CRATES="
|
||||
# metal-1.2.3
|
||||
# bar-4.5.6
|
||||
# iron_oxide-0.0.1
|
||||
# "
|
||||
# inherit cargo
|
||||
# ...
|
||||
# SRC_URI="$(cargo_crate_uris)"
|
||||
# @CODE
|
||||
|
||||
# @ECLASS-VARIABLE: CARGO_OPTIONAL
|
||||
# @DEFAULT_UNSET
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# If set to a non-null value, before inherit cargo part of the ebuild will
|
||||
# be considered optional. No dependencies will be added and no phase
|
||||
# functions will be exported.
|
||||
#
|
||||
# If you enable CARGO_OPTIONAL, you have to set BDEPEND on virtual/rust
|
||||
# for your package and call at least cargo_gen_config manually before using
|
||||
# other src_ functions of this eclass.
|
||||
# note that cargo_gen_config is automatically called by cargo_src_unpack.
|
||||
|
||||
# @ECLASS_VARIABLE: myfeatures
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Optional cargo features defined as bash array.
|
||||
# Should be defined before calling cargo_src_configure().
|
||||
#
|
||||
# Example package that has x11 and wayland as features, and disables default.
|
||||
# @CODE
|
||||
# src_configure() {
|
||||
# local myfeatures=(
|
||||
# $(usex X x11 '')
|
||||
# $(usev wayland)
|
||||
# )
|
||||
# cargo_src_configure --no-default-features
|
||||
# }
|
||||
# @CODE
|
||||
|
||||
# @ECLASS-VARIABLE: ECARGO_REGISTRY_DIR
|
||||
# @USER_VARIABLE
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Storage directory for cargo registry.
|
||||
# Used by cargo_live_src_unpack to cache downloads.
|
||||
# This is intended to be set by users.
|
||||
# Ebuilds must not set it.
|
||||
#
|
||||
# Defaults to "${DISTDIR}/cargo-registry" it not set.
|
||||
|
||||
# @ECLASS-VARIABLE: ECARGO_OFFLINE
|
||||
# @USER_VARIABLE
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# If non-empty, this variable prevents online operations in
|
||||
# cargo_live_src_unpack.
|
||||
# Inherits value of EVCS_OFFLINE if not set explicitly.
|
||||
|
||||
# @ECLASS-VARIABLE: EVCS_UMASK
|
||||
# @USER_VARIABLE
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Set this variable to a custom umask. This is intended to be set by
|
||||
# users. By setting this to something like 002, it can make life easier
|
||||
# for people who use cargo in a home directory, but are in the portage
|
||||
# group, and then switch over to building with FEATURES=userpriv.
|
||||
# Or vice-versa.
|
||||
|
||||
# @FUNCTION: cargo_crate_uris
|
||||
# @DESCRIPTION:
|
||||
# Generates the URIs to put in SRC_URI to help fetch dependencies.
|
||||
# Uses first argument as crate list.
|
||||
# If no argument provided, uses CRATES variable.
|
||||
cargo_crate_uris() {
|
||||
local crate
|
||||
for crate in "$@"; do
|
||||
local name version url pretag
|
||||
name="${crate%-*}"
|
||||
version="${crate##*-}"
|
||||
pretag="^[a-zA-Z]+"
|
||||
if [[ $version =~ $pretag ]]; then
|
||||
version="${name##*-}-${version}"
|
||||
name="${name%-*}"
|
||||
fi
|
||||
local -r regex='^([a-zA-Z0-9_\-]+)-([0-9]+\.[0-9]+\.[0-9]+.*)$'
|
||||
local crate crates
|
||||
|
||||
if [[ -n ${@} ]]; then
|
||||
crates="$@"
|
||||
elif [[ -n ${CRATES} ]]; then
|
||||
crates="${CRATES}"
|
||||
else
|
||||
eerror "CRATES variable is not defined and nothing passed as argument"
|
||||
die "Can't generate SRC_URI from empty input"
|
||||
fi
|
||||
|
||||
for crate in ${crates}; do
|
||||
local name version url
|
||||
[[ $crate =~ $regex ]] || die "Could not parse name and version from crate: $crate"
|
||||
name="${BASH_REMATCH[1]}"
|
||||
version="${BASH_REMATCH[2]}"
|
||||
url="https://crates.io/api/v1/crates/${name}/${version}/download -> ${crate}.crate"
|
||||
echo "${url}"
|
||||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: cargo_gen_config
|
||||
# @DESCRIPTION:
|
||||
# Generate the $CARGO_HOME/config necessary to use our local registry and settings.
|
||||
# Cargo can also be configured through environment variables in addition to the TOML syntax below.
|
||||
# For each configuration key below of the form foo.bar the environment variable CARGO_FOO_BAR
|
||||
# can also be used to define the value.
|
||||
# Environment variables will take precedence over TOML configuration,
|
||||
# and currently only integer, boolean, and string keys are supported.
|
||||
# For example the build.jobs key can also be defined by CARGO_BUILD_JOBS.
|
||||
# Or setting CARGO_TERM_VERBOSE=false in make.conf will make build quieter.
|
||||
cargo_gen_config() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
mkdir -p "${ECARGO_HOME}" || die
|
||||
|
||||
cat > "${ECARGO_HOME}/config" <<- _EOF_ || die "Failed to create cargo config"
|
||||
[source.gentoo]
|
||||
directory = "${ECARGO_VENDOR}"
|
||||
|
||||
[source.crates-io]
|
||||
replace-with = "gentoo"
|
||||
local-registry = "/nonexistant"
|
||||
|
||||
[net]
|
||||
offline = true
|
||||
|
||||
[build]
|
||||
jobs = $(makeopts_jobs)
|
||||
incremental = false
|
||||
|
||||
[term]
|
||||
verbose = true
|
||||
$([[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo "color = 'never'")
|
||||
_EOF_
|
||||
|
||||
export CARGO_HOME="${ECARGO_HOME}"
|
||||
_CARGO_GEN_CONFIG_HAS_RUN=1
|
||||
}
|
||||
|
||||
# @FUNCTION: cargo_src_unpack
|
||||
# @DESCRIPTION:
|
||||
# Unpacks the package and the cargo registry
|
||||
@ -80,15 +232,6 @@ cargo_src_unpack() {
|
||||
fi
|
||||
eend $?
|
||||
;;
|
||||
cargo-snapshot*)
|
||||
ebegin "Unpacking ${archive}"
|
||||
mkdir -p "${S}"/target/snapshot
|
||||
tar -xzf "${DISTDIR}"/${archive} -C "${S}"/target/snapshot --strip-components 2 || die
|
||||
# cargo's makefile needs this otherwise it will try to
|
||||
# download it
|
||||
touch "${S}"/target/snapshot/bin/cargo || die
|
||||
eend $?
|
||||
;;
|
||||
*)
|
||||
unpack ${archive}
|
||||
;;
|
||||
@ -98,20 +241,140 @@ cargo_src_unpack() {
|
||||
cargo_gen_config
|
||||
}
|
||||
|
||||
# @FUNCTION: cargo_gen_config
|
||||
# @FUNCTION: cargo_live_src_unpack
|
||||
# @DESCRIPTION:
|
||||
# Generate the $CARGO_HOME/config necessary to use our local registry
|
||||
cargo_gen_config() {
|
||||
# Runs 'cargo fetch' and vendors downloaded crates for offline use, used in live ebuilds
|
||||
cargo_live_src_unpack() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
cat <<- EOF > "${ECARGO_HOME}/config"
|
||||
[source.gentoo]
|
||||
directory = "${ECARGO_VENDOR}"
|
||||
[[ "${PV}" == *9999* ]] || die "${FUNCNAME} only allowed in live/9999 ebuilds"
|
||||
[[ "${EBUILD_PHASE}" == unpack ]] || die "${FUNCNAME} only allowed in src_unpack"
|
||||
|
||||
[source.crates-io]
|
||||
replace-with = "gentoo"
|
||||
local-registry = "/nonexistant"
|
||||
EOF
|
||||
mkdir -p "${S}" || die
|
||||
mkdir -p "${ECARGO_VENDOR}" || die
|
||||
mkdir -p "${ECARGO_HOME}" || die
|
||||
|
||||
local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
|
||||
: ${ECARGO_REGISTRY_DIR:=${distdir}/cargo-registry}
|
||||
|
||||
local offline="${ECARGO_OFFLINE:-${EVCS_OFFLINE}}"
|
||||
|
||||
if [[ ! -d ${ECARGO_REGISTRY_DIR} && ! ${offline} ]]; then
|
||||
(
|
||||
addwrite "${ECARGO_REGISTRY_DIR}"
|
||||
mkdir -p "${ECARGO_REGISTRY_DIR}"
|
||||
) || die "Unable to create ${ECARGO_REGISTRY_DIR}"
|
||||
fi
|
||||
|
||||
if [[ ${offline} ]]; then
|
||||
local subdir
|
||||
for subdir in cache index src; do
|
||||
if [[ ! -d ${ECARGO_REGISTRY_DIR}/registry/${subdir} ]]; then
|
||||
eerror "Networking activity has been disabled via ECARGO_OFFLINE or EVCS_OFFLINE"
|
||||
eerror "However, no valid cargo registry available at ${ECARGO_REGISTRY_DIR}"
|
||||
die "Unable to proceed with ECARGO_OFFLINE/EVCS_OFFLINE."
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ ${EVCS_UMASK} ]]; then
|
||||
local saved_umask=$(umask)
|
||||
umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}"
|
||||
fi
|
||||
|
||||
pushd "${S}" > /dev/null || die
|
||||
|
||||
# Respect user settings befire cargo_gen_config is called.
|
||||
if [[ ! ${CARGO_TERM_COLOR} ]]; then
|
||||
[[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && export CARGO_TERM_COLOR=never
|
||||
local unset_color=true
|
||||
fi
|
||||
if [[ ! ${CARGO_TERM_VERBOSE} ]]; then
|
||||
export CARGO_TERM_VERBOSE=true
|
||||
local unset_verbose=true
|
||||
fi
|
||||
|
||||
# Let cargo fetch to system-wide location.
|
||||
# It will keep directory organized by itself.
|
||||
addwrite "${ECARGO_REGISTRY_DIR}"
|
||||
export CARGO_HOME="${ECARGO_REGISTRY_DIR}"
|
||||
|
||||
# Absence of quotes around offline arg is intentional, as cargo bails out if it encounters ''
|
||||
einfo "cargo fetch ${offline:+--offline}"
|
||||
cargo fetch ${offline:+--offline} || die #nowarn
|
||||
|
||||
# Let cargo copy all required crates to "${WORKDIR}" for offline use in later phases.
|
||||
einfo "cargo vendor ${offline:+--offline} ${ECARGO_VENDOR}"
|
||||
cargo vendor ${offline:+--offline} "${ECARGO_VENDOR}" || die #nowarn
|
||||
|
||||
# Users may have git checkouts made by cargo.
|
||||
# While cargo vendors the sources, it still needs git checkout to be present.
|
||||
# Copying full dir is an overkill, so just symlink it.
|
||||
if [[ -d ${ECARGO_REGISTRY_DIR}/git ]]; then
|
||||
ln -sv "${ECARGO_REGISTRY_DIR}/git" "${ECARGO_HOME}/git" || die
|
||||
fi
|
||||
|
||||
popd > /dev/null || die
|
||||
|
||||
# Restore settings if needed.
|
||||
[[ ${unset_color} ]] && unset CARGO_TERM_COLOR
|
||||
[[ ${unset_verbose} ]] && unset CARGO_TERM_VERBOSE
|
||||
if [[ ${saved_umask} ]]; then
|
||||
umask "${saved_umask}" || die
|
||||
fi
|
||||
|
||||
# After following calls, cargo will no longer use ${ECARGO_REGISTRY_DIR} as CARGO_HOME
|
||||
# It will be forced into offline mode to prevent network access.
|
||||
# But since we already vendored crates and symlinked git, it has all it needs to build.
|
||||
unset CARGO_HOME
|
||||
cargo_gen_config
|
||||
}
|
||||
|
||||
# @FUNCTION: cargo_src_configure
|
||||
# @DESCRIPTION:
|
||||
# Configure cargo package features and arguments.
|
||||
# Extra positional arguments supplied to this function
|
||||
# will be passed to cargo in all phases.
|
||||
# Make sure all cargo subcommands support flags passed here.
|
||||
#
|
||||
# Example for package that explicitly builds only 'baz' binary and
|
||||
# enables 'barfeature' and optional 'foo' feature.
|
||||
# will pass '--features barfeature --features foo --bin baz'
|
||||
# in src_{compile,test,install}
|
||||
#
|
||||
# @CODE
|
||||
# src_configure() {
|
||||
# local myfeatures=(
|
||||
# barfeature
|
||||
# $(usev foo)
|
||||
# )
|
||||
# cargo_src_configure --bin baz
|
||||
# }
|
||||
# @CODE
|
||||
#
|
||||
# In some cases crates may need '--no-default-features' option,
|
||||
# as there is no way to disable single feature, except disabling all.
|
||||
# It can be passed directly to cargo_src_configure().
|
||||
cargo_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
[[ -z ${myfeatures} ]] && declare -a myfeatures=()
|
||||
local myfeaturestype=$(declare -p myfeatures 2>&-)
|
||||
if [[ "${myfeaturestype}" != "declare -a myfeatures="* ]]; then
|
||||
die "myfeatures must be declared as array"
|
||||
fi
|
||||
|
||||
# transform array from simple feature list
|
||||
# to multiple cargo args:
|
||||
# --features feature1 --features feature2 ...
|
||||
# this format is chosen because 2 other methods of
|
||||
# listing features (space OR comma separated) require
|
||||
# more fiddling with strings we'd like to avoid here.
|
||||
myfeatures=( ${myfeatures[@]/#/--features } )
|
||||
|
||||
readonly ECARGO_ARGS=( ${myfeatures[@]} ${@} ${ECARGO_EXTRA_ARGS} )
|
||||
|
||||
[[ ${ECARGO_ARGS[@]} ]] && einfo "Configured with: ${ECARGO_ARGS[@]}"
|
||||
}
|
||||
|
||||
# @FUNCTION: cargo_src_compile
|
||||
@ -120,24 +383,48 @@ cargo_gen_config() {
|
||||
cargo_src_compile() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
export CARGO_HOME="${ECARGO_HOME}"
|
||||
[[ ${_CARGO_GEN_CONFIG_HAS_RUN} ]] || \
|
||||
die "FATAL: please call cargo_gen_config before using ${FUNCNAME}"
|
||||
|
||||
cargo build -j $(makeopts_jobs) $(usex debug "" --release) "$@" \
|
||||
|| die "cargo build failed"
|
||||
tc-export AR CC CXX PKG_CONFIG
|
||||
|
||||
set -- cargo build $(usex debug "" --release) ${ECARGO_ARGS[@]} "$@"
|
||||
einfo "${@}"
|
||||
"${@}" || die "cargo build failed"
|
||||
}
|
||||
|
||||
# @FUNCTION: cargo_src_install
|
||||
# @DESCRIPTION:
|
||||
# Installs the binaries generated by cargo
|
||||
# In come case workspaces need alternative --path parameter
|
||||
# default is '--path ./' if nothing specified.
|
||||
# '--path ./somedir' can be passed directly to cargo_src_install()
|
||||
cargo_src_install() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
cargo install -j $(makeopts_jobs) --root="${D}/usr" $(usex debug --debug "") "$@" \
|
||||
|| die "cargo install failed"
|
||||
rm -f "${ED}/usr/.crates.toml"
|
||||
rm -f "${ED}/usr/.crates2.json"
|
||||
[[ ${_CARGO_GEN_CONFIG_HAS_RUN} ]] || \
|
||||
die "FATAL: please call cargo_gen_config before using ${FUNCNAME}"
|
||||
|
||||
[ -d "${S}/man" ] && doman "${S}/man" || return 0
|
||||
set -- cargo install $(has --path ${@} || echo --path ./) \
|
||||
--root "${ED}/usr" \
|
||||
$(usex debug --debug "") \
|
||||
${ECARGO_ARGS[@]} "$@"
|
||||
einfo "${@}"
|
||||
"${@}" || die "cargo install failed"
|
||||
|
||||
rm -f "${ED}/usr/.crates.toml" || die
|
||||
rm -f "${ED}/usr/.crates2.json" || die
|
||||
|
||||
# it turned out to be non-standard dir, so get rid of it future EAPI
|
||||
# and only run for EAPI=7
|
||||
# https://bugs.gentoo.org/715890
|
||||
case ${EAPI:-0} in
|
||||
7)
|
||||
if [ -d "${S}/man" ]; then
|
||||
doman "${S}/man" || return 0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# @FUNCTION: cargo_src_test
|
||||
@ -146,8 +433,12 @@ cargo_src_install() {
|
||||
cargo_src_test() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
cargo test -j $(makeopts_jobs) $(usex debug "" --release) "$@" \
|
||||
|| die "cargo test failed"
|
||||
[[ ${_CARGO_GEN_CONFIG_HAS_RUN} ]] || \
|
||||
die "FATAL: please call cargo_gen_config before using ${FUNCNAME}"
|
||||
|
||||
set -- cargo test $(usex debug "" --release) ${ECARGO_ARGS[@]} "$@"
|
||||
einfo "${@}"
|
||||
"${@}" || die "cargo test failed"
|
||||
}
|
||||
|
||||
fi
|
||||
|
@ -1,160 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: cron.eclass
|
||||
# @MAINTAINER:
|
||||
# maintainer-needed@gentoo.org
|
||||
# @AUTHOR:
|
||||
# Original Author: Aaron Walker <ka0ttic@gentoo.org>
|
||||
# @BLURB: Some functions for cron
|
||||
# @DESCRIPTION:
|
||||
# Purpose: The main motivation for this eclass was to simplify
|
||||
# the jungle known as src_install() in cron ebuilds. Using these
|
||||
# functions also ensures that permissions are *always* reset,
|
||||
# preventing the accidental installation of files with wrong perms.
|
||||
#
|
||||
# NOTE on defaults: the default settings in the below functions were
|
||||
# chosen based on the most common setting among cron ebuilds.
|
||||
#
|
||||
# Please assign any bugs regarding this eclass to cron-bugs@gentoo.org.
|
||||
|
||||
inherit eutils flag-o-matic
|
||||
|
||||
EXPORT_FUNCTIONS pkg_postinst
|
||||
|
||||
SLOT="0"
|
||||
|
||||
DEPEND=">=sys-apps/sed-4.0.5"
|
||||
|
||||
RDEPEND=">=sys-process/cronbase-0.3.2"
|
||||
for pn in vixie-cron bcron cronie dcron fcron; do
|
||||
[[ ${pn} == "${PN}" ]] || RDEPEND="${RDEPEND} !sys-process/${pn}"
|
||||
done
|
||||
|
||||
# @FUNCTION: docrondir
|
||||
# @USAGE: [ dir ] [ perms ]
|
||||
# @DESCRIPTION:
|
||||
# Creates crontab directory
|
||||
#
|
||||
# Both arguments are optional. Everything after 'dir' is considered
|
||||
# the permissions (same format as insopts).
|
||||
#
|
||||
# ex: docrondir /some/dir -m 0770 -o root -g cron
|
||||
# docrondir /some/dir (uses default perms)
|
||||
# docrondir -m0700 (uses default dir)
|
||||
|
||||
docrondir() {
|
||||
# defaults
|
||||
local perms="-m0750 -o root -g cron" dir="/var/spool/cron/crontabs"
|
||||
|
||||
if [[ -n $1 ]] ; then
|
||||
case "$1" in
|
||||
*/*)
|
||||
dir=$1
|
||||
shift
|
||||
[[ -n $1 ]] && perms="$@"
|
||||
;;
|
||||
*)
|
||||
perms="$@"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
diropts ${perms}
|
||||
keepdir ${dir}
|
||||
|
||||
# reset perms to default
|
||||
diropts -m0755
|
||||
}
|
||||
|
||||
# @FUNCTION: docron
|
||||
# @USAGE: [ exe ] [ perms ]
|
||||
# @DESCRIPTION:
|
||||
# Install cron executable
|
||||
#
|
||||
# Both arguments are optional.
|
||||
#
|
||||
# ex: docron -m 0700 -o root -g root ('exe' defaults to "cron")
|
||||
# docron crond -m 0110
|
||||
|
||||
docron() {
|
||||
local cron="cron" perms="-m 0750 -o root -g wheel"
|
||||
|
||||
if [[ -n $1 ]] ; then
|
||||
case "$1" in
|
||||
-*)
|
||||
perms="$@"
|
||||
;;
|
||||
*)
|
||||
cron=$1
|
||||
shift
|
||||
[[ -n $1 ]] && perms="$@"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
exeopts ${perms}
|
||||
exeinto /usr/sbin
|
||||
doexe ${cron} || die "failed to install ${cron}"
|
||||
|
||||
# reset perms to default
|
||||
exeopts -m0755
|
||||
}
|
||||
|
||||
# @FUNCTION: docrontab
|
||||
# @USAGE: [ exe ] [ perms ]
|
||||
# @DESCRIPTION:
|
||||
# Install crontab executable
|
||||
#
|
||||
# Uses same semantics as docron.
|
||||
|
||||
docrontab() {
|
||||
local crontab="crontab" perms="-m 4750 -o root -g cron"
|
||||
|
||||
if [[ -n $1 ]] ; then
|
||||
case "$1" in
|
||||
-*)
|
||||
perms="$@"
|
||||
;;
|
||||
*)
|
||||
crontab=$1
|
||||
shift
|
||||
[[ -n $1 ]] && perms="$@"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
exeopts ${perms}
|
||||
exeinto /usr/bin
|
||||
doexe ${crontab} || die "failed to install ${crontab}"
|
||||
|
||||
# reset perms to default
|
||||
exeopts -m0755
|
||||
|
||||
# users expect /usr/bin/crontab to exist...
|
||||
if [[ "${crontab##*/}" != "crontab" ]] ; then
|
||||
dosym ${crontab##*/} /usr/bin/crontab || \
|
||||
die "failed to create /usr/bin/crontab symlink"
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: cron_pkg_postinst
|
||||
# @DESCRIPTION:
|
||||
# Outputs a message about system crontabs
|
||||
# daemons that have a true system crontab set CRON_SYSTEM_CRONTAB="yes"
|
||||
cron_pkg_postinst() {
|
||||
echo
|
||||
# daemons that have a true system crontab set CRON_SYSTEM_CRONTAB="yes"
|
||||
if [ "${CRON_SYSTEM_CRONTAB:-no}" != "yes" ] ; then
|
||||
einfo "To activate /etc/cron.{hourly|daily|weekly|monthly} please run:"
|
||||
einfo " crontab /etc/crontab"
|
||||
einfo
|
||||
einfo "!!! That will replace root's current crontab !!!"
|
||||
einfo
|
||||
fi
|
||||
|
||||
einfo "You may wish to read the Gentoo Linux Cron Guide, which can be"
|
||||
einfo "found online at:"
|
||||
einfo " https://wiki.gentoo.org/wiki/Cron"
|
||||
echo
|
||||
}
|
@ -1,164 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: emboss-r2.eclass
|
||||
# @MAINTAINER:
|
||||
# sci-biology@gentoo.org
|
||||
# jlec@gentoo.org
|
||||
# ted.tanberry@gmail.com
|
||||
# @AUTHOR:
|
||||
# Original author: Author Olivier Fisette <ofisette@gmail.com>
|
||||
# Next gen author: Justin Lecher <jlec@gentoo.org>
|
||||
# Next gen author: Ted Tanberry <ted.tanberry@gmail.com>
|
||||
# @SUPPORTED_EAPIS: 6
|
||||
# @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
|
||||
# @DESCRIPTION:
|
||||
# The inheriting ebuild must set at least EAPI=6 and provide EBO_DESCRIPTION before the inherit line.
|
||||
# KEYWORDS should be set. Additionally "(R|P)DEPEND"encies and other standard
|
||||
# ebuild variables can be extended (FOO+=" bar").
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# EAPI=6
|
||||
#
|
||||
# EBO_DESCRIPTION="applications from the CBS group"
|
||||
#
|
||||
# inherit emboss-r2
|
||||
|
||||
# @ECLASS-VARIABLE: EBO_DESCRIPTION
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Should be set. Completes the generic description of the embassy module as follows:
|
||||
#
|
||||
# EMBOSS integrated version of ${EBO_DESCRIPTION}, e.g.
|
||||
#
|
||||
# "EMBOSS integrated version of applications from the CBS group"
|
||||
#
|
||||
# Defaults to the upstream name of the module.
|
||||
|
||||
if [[ ! ${_EMBOSS_R2} ]]; then
|
||||
|
||||
case ${EAPI:-0} in
|
||||
6) ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
inherit autotools flag-o-matic
|
||||
|
||||
EXPORT_FUNCTIONS src_prepare src_configure src_install
|
||||
|
||||
HOMEPAGE="http://emboss.sourceforge.net/"
|
||||
LICENSE="LGPL-2 GPL-2"
|
||||
|
||||
SLOT="0"
|
||||
IUSE="mysql pdf png postgres static-libs X"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/expat
|
||||
dev-libs/libpcre:3
|
||||
sci-libs/plplot:=
|
||||
sys-libs/zlib
|
||||
mysql? ( dev-db/mysql-connector-c:0= )
|
||||
pdf? ( media-libs/libharu:= )
|
||||
png? ( media-libs/gd:2=[png] )
|
||||
postgres? ( dev-db/postgresql:= )
|
||||
X? ( x11-libs/libXt )"
|
||||
|
||||
if [[ ${PN} == embassy-* ]]; then
|
||||
EMBASSY_PACKAGE=yes
|
||||
# The EMBASSY package name, retrieved from the inheriting ebuild's name
|
||||
EN=${PN:8}
|
||||
# The full name and version of the EMBASSY package (excluding the Gentoo
|
||||
# revision number)
|
||||
EF="${EN^^}-${PV}"
|
||||
|
||||
[[ ${EBO_DESCRIPTION} ]] || die "EBO_DESCRIPTION was not set before inheriting emboss-r2.eclass"
|
||||
|
||||
DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
|
||||
SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EN}-${PV}.tar.gz"
|
||||
RDEPEND+=" >=sci-biology/emboss-6.6.0-r1[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
|
||||
|
||||
S="${WORKDIR}/${EF}"
|
||||
fi
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
# @ECLASS-VARIABLE: EBO_EAUTORECONF
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# If set, run eautoreconf from autotools.eclass after applying patches
|
||||
# in emboss-r2_src_prepare.
|
||||
|
||||
# @FUNCTION: emboss-r2_src_prepare
|
||||
# @DESCRIPTION:
|
||||
# Does the following things
|
||||
#
|
||||
# 1. Renames configure.in to configure.ac, if possible
|
||||
# 2. Calls default_src_prepare (i.e.
|
||||
# applies Gentoo and user patches in EAPI>=6)
|
||||
# 3. If EBO_EAUTORECONF is set, run eautoreconf
|
||||
#
|
||||
|
||||
emboss-r2_src_prepare() {
|
||||
if [[ -e configure.in ]]; then
|
||||
mv configure.{in,ac} || die
|
||||
fi
|
||||
|
||||
default
|
||||
[[ ${EBO_EAUTORECONF} ]] && eautoreconf
|
||||
}
|
||||
|
||||
# @FUNCTION: emboss-r2_src_configure
|
||||
# @DESCRIPTION:
|
||||
# runs econf with following options.
|
||||
#
|
||||
# --enable-shared
|
||||
# $(use_enable static-libs static)
|
||||
# $(use_with X x)
|
||||
# $(use_with png pngdriver)
|
||||
# $(use_with pdf hpdf)
|
||||
# $(use_with mysql mysql)
|
||||
# $(use_with postgres postgresql)
|
||||
# --enable-large
|
||||
# --without-java
|
||||
# --enable-systemlibs
|
||||
#
|
||||
# can be appended to like econf, e.g.
|
||||
# emboss-r2_src_configure --disable-shared
|
||||
|
||||
emboss-r2_src_configure() {
|
||||
local myconf=(
|
||||
--enable-shared
|
||||
$(use_enable static-libs static)
|
||||
$(use_with X x)
|
||||
$(use_with png pngdriver "${EPREFIX}/usr")
|
||||
$(use_with pdf hpdf "${EPREFIX}/usr")
|
||||
$(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
|
||||
$(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")
|
||||
--enable-large
|
||||
--without-java
|
||||
--enable-systemlibs
|
||||
)
|
||||
|
||||
[[ ${EMBASSY_PACKAGE} == yes ]] && \
|
||||
append-cppflags "-I${EPREFIX}/usr/include/emboss"
|
||||
|
||||
econf "${myconf[@]}" "$@"
|
||||
}
|
||||
|
||||
# @FUNCTION: emboss-r2_src_install
|
||||
# @DESCRIPTION:
|
||||
# Installs the package into the staging area and removes
|
||||
# extraneous .la files, if USE="-static-libs"
|
||||
|
||||
emboss-r2_src_install() {
|
||||
default
|
||||
|
||||
# delete .la files
|
||||
if ! use static-libs; then
|
||||
find "${D}" -name '*.la' -delete || die
|
||||
fi
|
||||
}
|
||||
|
||||
_EMBOSS_R2=1
|
||||
fi
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: gnome.org.eclass
|
||||
@ -7,29 +7,34 @@
|
||||
# @AUTHOR:
|
||||
# Authors: Spidler <spidler@gentoo.org> with help of carparski.
|
||||
# eclass variable additions and documentation: Gilles Dartiguelongue <eva@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 5 6 7 8
|
||||
# @BLURB: Helper eclass for gnome.org hosted archives
|
||||
# @DESCRIPTION:
|
||||
# Provide a default SRC_URI for tarball hosted on gnome.org mirrors.
|
||||
|
||||
case ${EAPI} in
|
||||
5|6|7|8) ;;
|
||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||
esac
|
||||
|
||||
if [[ -z ${_GNOME_ORG_ECLASS} ]] ; then
|
||||
_GNOME_ORG_ECLASS=1
|
||||
|
||||
# versionator inherit kept for older EAPIs due to ebuilds (potentially) relying on it
|
||||
[[ ${EAPI} == [0123456] ]] && inherit eapi7-ver versionator
|
||||
[[ ${EAPI} == [56] ]] && inherit eapi7-ver versionator
|
||||
|
||||
# @ECLASS-VARIABLE: GNOME_TARBALL_SUFFIX
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# Most projects hosted on gnome.org mirrors provide tarballs as tar.bz2 or
|
||||
# tar.xz. This eclass defaults to bz2 for EAPI 0, 1, 2, 3 and defaults to xz for
|
||||
# everything else. This is because the gnome mirrors are moving to only have xz
|
||||
# tarballs for new releases.
|
||||
if has "${EAPI:-0}" 0 1 2 3; then
|
||||
: ${GNOME_TARBALL_SUFFIX:="bz2"}
|
||||
else
|
||||
: ${GNOME_TARBALL_SUFFIX:="xz"}
|
||||
fi
|
||||
# tar.xz. This eclass defaults to xz. This is because the GNOME mirrors are
|
||||
# moving to only have xz tarballs for new releases.
|
||||
: ${GNOME_TARBALL_SUFFIX:="xz"}
|
||||
|
||||
# Even though xz-utils are in @system, they must still be added to DEPEND; see
|
||||
# Even though xz-utils are in @system, they must still be added to BDEPEND; see
|
||||
# https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
|
||||
if [[ ${GNOME_TARBALL_SUFFIX} == "xz" ]]; then
|
||||
if [[ ${EAPI:-0} != [0123456] ]]; then
|
||||
if [[ ${EAPI} != [56] ]]; then
|
||||
BDEPEND="app-arch/xz-utils"
|
||||
else
|
||||
DEPEND="app-arch/xz-utils"
|
||||
@ -45,9 +50,15 @@ fi
|
||||
# @ECLASS-VARIABLE: GNOME_ORG_PVP
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# Major and minor numbers of the version number.
|
||||
: ${GNOME_ORG_PVP:=$(ver_cut 1-2)}
|
||||
# Components of the version number that correspond to a 6 month release.
|
||||
if ver_test -ge 40.0; then
|
||||
: ${GNOME_ORG_PVP:=$(ver_cut 1)}
|
||||
else
|
||||
: ${GNOME_ORG_PVP:=$(ver_cut 1-2)}
|
||||
fi
|
||||
|
||||
SRC_URI="mirror://gnome/sources/${GNOME_ORG_MODULE}/${GNOME_ORG_PVP}/${GNOME_ORG_MODULE}-${PV}.tar.${GNOME_TARBALL_SUFFIX}"
|
||||
|
||||
S="${WORKDIR}/${GNOME_ORG_MODULE}-${PV}"
|
||||
|
||||
fi
|
||||
|
@ -1,10 +1,11 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: gnome2-utils.eclass
|
||||
# @MAINTAINER:
|
||||
# gnome@gentoo.org
|
||||
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
|
||||
# @SUPPORTED_EAPIS: 5 6 7 8
|
||||
# @PROVIDES: xdg-utils
|
||||
# @BLURB: Auxiliary functions commonly used by Gnome packages.
|
||||
# @DESCRIPTION:
|
||||
# This eclass provides a set of auxiliary functions needed by most Gnome
|
||||
@ -14,13 +15,14 @@
|
||||
# * GConf schemas management
|
||||
# * scrollkeeper (old Gnome help system) management
|
||||
|
||||
[[ ${EAPI:-0} == [012345] ]] && inherit multilib
|
||||
[[ ${EAPI:-0} == [0123456] ]] && inherit eutils
|
||||
inherit xdg-utils
|
||||
[[ ${EAPI} == 5 ]] && inherit multilib
|
||||
# toolchain-funs.eclass: tc-is-cross-compiler
|
||||
# xdg-utils.eclass: xdg_environment_reset, xdg_icon_cache_update
|
||||
inherit toolchain-funcs xdg-utils
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
0|1|2|3|4|5|6|7) ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
case ${EAPI} in
|
||||
5|6|7|8) ;;
|
||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||
esac
|
||||
|
||||
# @ECLASS-VARIABLE: GCONFTOOL_BIN
|
||||
@ -94,7 +96,7 @@ gnome2_environment_reset() {
|
||||
# Ensure we don't rely on dconf/gconf while building, bug #511946
|
||||
export GSETTINGS_BACKEND="memory"
|
||||
|
||||
if has ${EAPI:-0} 6 7; then
|
||||
if has ${EAPI} 6 7; then
|
||||
# Try to cover the packages honoring this variable, bug #508124
|
||||
export GST_INSPECT="$(type -P true)"
|
||||
|
||||
@ -109,7 +111,6 @@ gnome2_environment_reset() {
|
||||
# in the GNOME2_ECLASS_SCHEMAS environment variable.
|
||||
# This function should be called from pkg_preinst.
|
||||
gnome2_gconf_savelist() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
|
||||
pushd "${ED}" > /dev/null || die
|
||||
export GNOME2_ECLASS_SCHEMAS=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)
|
||||
popd > /dev/null || die
|
||||
@ -121,30 +122,37 @@ gnome2_gconf_savelist() {
|
||||
# using gconftool-2.
|
||||
# This function should be called from pkg_postinst.
|
||||
gnome2_gconf_install() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
|
||||
local updater="${EROOT}${GCONFTOOL_BIN}"
|
||||
|
||||
if [[ ! -x "${updater}" ]]; then
|
||||
debug-print "${updater} is not executable"
|
||||
return
|
||||
fi
|
||||
local updater="${EROOT%/}${GCONFTOOL_BIN}"
|
||||
|
||||
if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
|
||||
debug-print "No GNOME 2 GConf schemas found"
|
||||
return
|
||||
fi
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
ewarn "Updating of GNOME 2 GConf schemas skipped due to cross-compilation."
|
||||
ewarn "You might want to run gconftool-2 manually on the target for"
|
||||
ewarn "your final image and re-run it when packages installing"
|
||||
ewarn "GNOME 2 GConf schemas get upgraded or added to the image."
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ! -x "${updater}" ]]; then
|
||||
debug-print "${updater} is not executable"
|
||||
return
|
||||
fi
|
||||
|
||||
# We are ready to install the GCONF Scheme now
|
||||
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
|
||||
export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT};")"
|
||||
export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT%/}/;")"
|
||||
|
||||
einfo "Installing GNOME 2 GConf schemas"
|
||||
|
||||
local F
|
||||
for F in ${GNOME2_ECLASS_SCHEMAS}; do
|
||||
if [[ -e "${EROOT}${F}" ]]; then
|
||||
if [[ -e "${EROOT%/}/${F}" ]]; then
|
||||
debug-print "Installing schema: ${F}"
|
||||
"${updater}" --makefile-install-rule "${EROOT}${F}" 1>/dev/null
|
||||
"${updater}" --makefile-install-rule "${EROOT%/}/${F}" 1>/dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
@ -162,29 +170,35 @@ gnome2_gconf_install() {
|
||||
# Removes schema files previously installed by the current ebuild from Gconf's
|
||||
# database.
|
||||
gnome2_gconf_uninstall() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
|
||||
local updater="${EROOT}${GCONFTOOL_BIN}"
|
||||
|
||||
if [[ ! -x "${updater}" ]]; then
|
||||
debug-print "${updater} is not executable"
|
||||
return
|
||||
fi
|
||||
local updater="${EROOT%/}${GCONFTOOL_BIN}"
|
||||
|
||||
if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
|
||||
debug-print "No GNOME 2 GConf schemas found"
|
||||
return
|
||||
fi
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
ewarn "Removal of GNOME 2 GConf schemas skipped due to cross-compilation."
|
||||
ewarn "You might want to run gconftool-2 manually on the target for"
|
||||
ewarn "your final image to uninstall this package's schemas."
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ! -x "${updater}" ]]; then
|
||||
debug-print "${updater} is not executable"
|
||||
return
|
||||
fi
|
||||
|
||||
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
|
||||
export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT};")"
|
||||
export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT%/}/;")"
|
||||
|
||||
einfo "Uninstalling GNOME 2 GConf schemas"
|
||||
|
||||
local F
|
||||
for F in ${GNOME2_ECLASS_SCHEMAS}; do
|
||||
if [[ -e "${EROOT}${F}" ]]; then
|
||||
if [[ -e "${EROOT%/}/${F}" ]]; then
|
||||
debug-print "Uninstalling gconf schema: ${F}"
|
||||
"${updater}" --makefile-uninstall-rule "${EROOT}${F}" 1>/dev/null
|
||||
"${updater}" --makefile-uninstall-rule "${EROOT%/}/${F}" 1>/dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
@ -254,7 +268,6 @@ gnome2_omf_fix() {
|
||||
# in the GNOME2_ECLASS_SCROLLS environment variable.
|
||||
# This function should be called from pkg_preinst.
|
||||
gnome2_scrollkeeper_savelist() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
|
||||
pushd "${ED}" > /dev/null || die
|
||||
export GNOME2_ECLASS_SCROLLS=$(find 'usr/share/omf' -type f -name "*.omf" 2> /dev/null)
|
||||
popd > /dev/null || die
|
||||
@ -265,21 +278,28 @@ gnome2_scrollkeeper_savelist() {
|
||||
# Updates the global scrollkeeper database.
|
||||
# This function should be called from pkg_postinst and pkg_postrm.
|
||||
gnome2_scrollkeeper_update() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
|
||||
local updater="${EROOT}${SCROLLKEEPER_UPDATE_BIN}"
|
||||
|
||||
if [[ ! -x "${updater}" ]] ; then
|
||||
debug-print "${updater} is not executable"
|
||||
return
|
||||
fi
|
||||
local updater="${EROOT%/}${SCROLLKEEPER_UPDATE_BIN}"
|
||||
|
||||
if [[ -z "${GNOME2_ECLASS_SCROLLS}" ]]; then
|
||||
debug-print "No scroll cache to update"
|
||||
return
|
||||
fi
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
ewarn "Updating of scrollkeeper database skipped due to cross-compilation."
|
||||
ewarn "You might want to run scrollkeeper-update manually on the target"
|
||||
ewarn "for your final image and re-run it when packages installing"
|
||||
ewarn "scrollkeeper OMF files get upgraded or added to the image."
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ! -x "${updater}" ]] ; then
|
||||
debug-print "${updater} is not executable"
|
||||
return
|
||||
fi
|
||||
|
||||
ebegin "Updating scrollkeeper database ..."
|
||||
"${updater}" -q -p "${EROOT}${SCROLLKEEPER_DIR}"
|
||||
"${updater}" -q -p "${EROOT%/}${SCROLLKEEPER_DIR}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
@ -290,20 +310,25 @@ gnome2_scrollkeeper_update() {
|
||||
# implementations that call gnome2_schemas_update conditionally.
|
||||
# This function should be called from pkg_preinst.
|
||||
gnome2_schemas_savelist() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
|
||||
pushd "${ED}" > /dev/null || die
|
||||
export GNOME2_ECLASS_GLIB_SCHEMAS=$(find 'usr/share/glib-2.0/schemas' -name '*.gschema.xml' 2>/dev/null)
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_schemas_update
|
||||
# @USAGE: gnome2_schemas_update
|
||||
# @DESCRIPTION:
|
||||
# Updates GSettings schemas.
|
||||
# This function should be called from pkg_postinst and pkg_postrm.
|
||||
gnome2_schemas_update() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
|
||||
local updater="${EROOT}${GLIB_COMPILE_SCHEMAS}"
|
||||
local updater="${EROOT%/}${GLIB_COMPILE_SCHEMAS}"
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
ewarn "Updating of GSettings schemas skipped due to cross-compilation."
|
||||
ewarn "You might want to run glib-compile-schemas manually on the target"
|
||||
ewarn "for your final image and re-run it when packages installing"
|
||||
ewarn "GSettings schemas get upgraded or added to the image."
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ! -x ${updater} ]]; then
|
||||
debug-print "${updater} is not executable"
|
||||
@ -321,23 +346,30 @@ gnome2_schemas_update() {
|
||||
# GNOME2_ECLASS_GDK_PIXBUF_LOADERS variable.
|
||||
# This function should be called from pkg_preinst.
|
||||
gnome2_gdk_pixbuf_savelist() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
|
||||
pushd "${ED}" > /dev/null || die
|
||||
export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find usr/lib*/gdk-pixbuf-2.0 -type f 2>/dev/null)
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_gdk_pixbuf_update
|
||||
# @USAGE: gnome2_gdk_pixbuf_update
|
||||
# @DESCRIPTION:
|
||||
# Updates gdk-pixbuf loader cache if GNOME2_ECLASS_GDK_PIXBUF_LOADERS has some.
|
||||
# This function should be called from pkg_postinst and pkg_postrm.
|
||||
gnome2_gdk_pixbuf_update() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
|
||||
local updater="${EROOT}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders"
|
||||
local updater="${EROOT%/}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders"
|
||||
[[ -x ${updater} ]] || updater="${EROOT%/}/usr/bin/gdk-pixbuf-query-loaders"
|
||||
|
||||
if [[ ! -x ${updater} ]]; then
|
||||
updater="${EROOT}/usr/bin/gdk-pixbuf-query-loaders"
|
||||
if [[ -z ${GNOME2_ECLASS_GDK_PIXBUF_LOADERS} ]]; then
|
||||
debug-print "gdk-pixbuf loader cache does not need an update"
|
||||
return
|
||||
fi
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
ewarn "Updating of gdk-pixbuf loader cache skipped due to cross-compilation."
|
||||
ewarn "You might want to run gdk-pixbuf-query-loaders manually on the target"
|
||||
ewarn "for your final image and re-run it when packages installing"
|
||||
ewarn "gdk-pixbuf loaders get upgraded or added to the image."
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ! -x ${updater} ]]; then
|
||||
@ -345,59 +377,65 @@ gnome2_gdk_pixbuf_update() {
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -z ${GNOME2_ECLASS_GDK_PIXBUF_LOADERS} ]]; then
|
||||
debug-print "gdk-pixbuf loader cache does not need an update"
|
||||
return
|
||||
fi
|
||||
|
||||
ebegin "Updating gdk-pixbuf loader cache"
|
||||
local tmp_file=$(emktemp)
|
||||
local tmp_file=$(mktemp "${T}"/tmp.XXXXXXXXXX) || die "Failed to create temporary file"
|
||||
${updater} 1> "${tmp_file}" &&
|
||||
chmod 0644 "${tmp_file}" &&
|
||||
cp -f "${tmp_file}" "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" &&
|
||||
cp -f "${tmp_file}" "${EROOT%/}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" &&
|
||||
rm "${tmp_file}" # don't replace this with mv, required for SELinux support
|
||||
eend $?
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_query_immodules_gtk2
|
||||
# @USAGE: gnome2_query_immodules_gtk2
|
||||
# @DESCRIPTION:
|
||||
# Updates gtk2 immodules/gdk-pixbuf loaders listing.
|
||||
gnome2_query_immodules_gtk2() {
|
||||
local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-2.0
|
||||
[[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-2.0
|
||||
[[ -x ${updater} ]] || updater=${EPREFIX}/usr/bin/gtk-query-immodules-2.0
|
||||
|
||||
if [[ ! -x ${updater} ]]; then
|
||||
debug-print "${updater} is not executable"
|
||||
return
|
||||
fi
|
||||
|
||||
ebegin "Updating gtk2 input method module cache"
|
||||
GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \
|
||||
GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \
|
||||
"${updater}" --update-cache
|
||||
eend $?
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_query_immodules_gtk3
|
||||
# @USAGE: gnome2_query_immodules_gtk3
|
||||
# @DESCRIPTION:
|
||||
# Updates gtk3 immodules/gdk-pixbuf loaders listing.
|
||||
gnome2_query_immodules_gtk3() {
|
||||
local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-3.0
|
||||
[[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-3.0
|
||||
[[ -x ${updater} ]] || updater=${EPREFIX}/usr/bin/gtk-query-immodules-3.0
|
||||
|
||||
if [[ ! -x ${updater} ]]; then
|
||||
debug-print "${updater} is not executable"
|
||||
return
|
||||
fi
|
||||
|
||||
ebegin "Updating gtk3 input method module cache"
|
||||
GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \
|
||||
GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \
|
||||
"${updater}" --update-cache
|
||||
eend $?
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_giomodule_cache_update
|
||||
# @USAGE: gnome2_giomodule_cache_update
|
||||
# @DESCRIPTION:
|
||||
# Updates glib's gio modules cache.
|
||||
# This function should be called from pkg_postinst and pkg_postrm.
|
||||
gnome2_giomodule_cache_update() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
|
||||
local updater="${EROOT}/usr/bin/${CHOST}-gio-querymodules"
|
||||
local updater="${EROOT%/}/usr/bin/${CHOST}-gio-querymodules"
|
||||
[[ -x ${updater} ]] || updater="${EROOT%/}/usr/bin/gio-querymodules"
|
||||
|
||||
if [[ ! -x ${updater} ]]; then
|
||||
updater="${EROOT}/usr/bin/gio-querymodules"
|
||||
if tc-is-cross-compiler ; then
|
||||
ewarn "Updating of GIO modules cache skipped due to cross-compilation."
|
||||
ewarn "You might want to run gio-querymodules manually on the target for"
|
||||
ewarn "your final image for performance reasons and re-run it when packages"
|
||||
ewarn "installing GIO modules get upgraded or added to the image."
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ! -x ${updater} ]]; then
|
||||
@ -450,8 +488,8 @@ gnome2_disable_deprecation_warning() {
|
||||
done
|
||||
}
|
||||
|
||||
case ${EAPI:-0} in
|
||||
0|1|2|3|4|5|6)
|
||||
case ${EAPI} in
|
||||
5|6)
|
||||
|
||||
# @FUNCTION: gnome2_icon_savelist
|
||||
# @DESCRIPTION:
|
||||
@ -461,7 +499,6 @@ case ${EAPI:-0} in
|
||||
# gnome2_icon_cache_update conditionally.
|
||||
# This function should be called from pkg_preinst.
|
||||
gnome2_icon_savelist() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
|
||||
pushd "${ED}" > /dev/null || die
|
||||
export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)
|
||||
popd > /dev/null || die
|
||||
|
@ -1,369 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: gnome2.eclass
|
||||
# @MAINTAINER:
|
||||
# gnome@gentoo.org
|
||||
# @SUPPORTED_EAPIS: 4 5 6
|
||||
# @BLURB: Provides phases for Gnome/Gtk+ based packages.
|
||||
# @DESCRIPTION:
|
||||
# Exports portage base functions used by ebuilds written for packages using the
|
||||
# GNOME framework. For additional functions, see gnome2-utils.eclass.
|
||||
|
||||
# @ECLASS-VARIABLE: GNOME2_EAUTORECONF
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Run eautoreconf instead of only elibtoolize
|
||||
GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""}
|
||||
|
||||
[[ ${GNOME2_EAUTORECONF} == 'yes' ]] && inherit autotools
|
||||
inherit eutils libtool gnome.org gnome2-utils xdg
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
4|5)
|
||||
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
|
||||
;;
|
||||
6)
|
||||
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
|
||||
;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
# @ECLASS-VARIABLE: DOCS
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# String containing documents passed to dodoc command for eapi4.
|
||||
# In eapi5 we rely on einstalldocs (from eutils.eclass) and for newer EAPIs we
|
||||
# follow PMS spec.
|
||||
|
||||
# @ECLASS-VARIABLE: ELTCONF
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Extra options passed to elibtoolize
|
||||
ELTCONF=${ELTCONF:-""}
|
||||
|
||||
# @ECLASS-VARIABLE: G2CONF
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Extra configure opts passed to econf.
|
||||
# Deprecated, pass extra arguments to gnome2_src_configure.
|
||||
# Banned in eapi6 and newer.
|
||||
if has ${EAPI:-0} 4 5; then
|
||||
G2CONF=${G2CONF:-""}
|
||||
fi
|
||||
|
||||
# @ECLASS-VARIABLE: GCONF_DEBUG
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Whether to handle debug or not.
|
||||
# Some gnome applications support various levels of debugging (yes, no, minimum,
|
||||
# etc), but using --disable-debug also removes g_assert which makes debugging
|
||||
# harder. This variable should be set to yes for such packages for the eclass
|
||||
# to handle it properly. It will enable minimal debug with USE=-debug.
|
||||
# Note that this is most commonly found in configure.ac as GNOME_DEBUG_CHECK.
|
||||
#
|
||||
# Banned since eapi6 as upstream is moving away from this obsolete macro in favor
|
||||
# of autoconf-archive macros, that do not expose this issue (bug #270919)
|
||||
if has ${EAPI:-0} 4 5; then
|
||||
if [[ ${GCONF_DEBUG} != "no" ]]; then
|
||||
IUSE="debug"
|
||||
fi
|
||||
fi
|
||||
|
||||
# @ECLASS-VARIABLE: GNOME2_ECLASS_GIO_MODULES
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# Array containing glib GIO modules
|
||||
|
||||
# @ECLASS-VARIABLE: GNOME2_LA_PUNT
|
||||
# @DESCRIPTION:
|
||||
# For eapi4 it sets if we should delete ALL or none of the .la files
|
||||
# For eapi5 and newer it relies on prune_libtool_files (from eutils.eclass)
|
||||
# for this. Available values for GNOME2_LA_PUNT:
|
||||
# - "no": will not clean any .la files
|
||||
# - "yes": will run prune_libtool_files --modules
|
||||
# - If it is not set, it will run prune_libtool_files
|
||||
if has ${EAPI:-0} 4; then
|
||||
GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"}
|
||||
else
|
||||
GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
|
||||
fi
|
||||
|
||||
# @FUNCTION: gnome2_src_unpack
|
||||
# @DESCRIPTION:
|
||||
# Stub function for old EAPI.
|
||||
gnome2_src_unpack() {
|
||||
if has ${EAPI:-0} 4 5; then
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
else
|
||||
die "gnome2_src_unpack is banned from eapi6"
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_src_prepare
|
||||
# @DESCRIPTION:
|
||||
# Prepare environment for build, fix build of scrollkeeper documentation,
|
||||
# run elibtoolize.
|
||||
gnome2_src_prepare() {
|
||||
xdg_src_prepare
|
||||
|
||||
# Prevent assorted access violations and test failures
|
||||
gnome2_environment_reset
|
||||
|
||||
# Prevent scrollkeeper access violations
|
||||
# We stop to run it from eapi6 as scrollkeeper helpers from
|
||||
# rarian are not running anything and, then, access violations
|
||||
# shouldn't occur.
|
||||
has ${EAPI:-0} 4 5 && gnome2_omf_fix
|
||||
|
||||
# Disable all deprecation warnings
|
||||
gnome2_disable_deprecation_warning
|
||||
|
||||
# Run libtoolize or eautoreconf, bug #591584
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=655517
|
||||
if [[ ${GNOME2_EAUTORECONF} == 'yes' ]]; then
|
||||
eautoreconf
|
||||
else
|
||||
elibtoolize ${ELTCONF}
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_src_configure
|
||||
# @DESCRIPTION:
|
||||
# Gnome specific configure handling
|
||||
gnome2_src_configure() {
|
||||
# Deprecated for a long time now and banned since eapi6, see Gnome team policies
|
||||
if [[ -n ${G2CONF} ]] ; then
|
||||
if has ${EAPI:-0} 4 5; then
|
||||
eqawarn "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure"
|
||||
else
|
||||
die "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure"
|
||||
fi
|
||||
fi
|
||||
|
||||
local g2conf=()
|
||||
|
||||
if has ${EAPI:-0} 4 5; then
|
||||
if [[ ${GCONF_DEBUG} != 'no' ]] ; then
|
||||
if use debug ; then
|
||||
g2conf+=( --enable-debug=yes )
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [[ -n ${GCONF_DEBUG} ]] ; then
|
||||
die "GCONF_DEBUG is banned since eapi6 in favor of each ebuild taking care of the proper handling of debug configure option"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Starting with EAPI=5, we consider packages installing gtk-doc to be
|
||||
# handled by adding DEPEND="dev-util/gtk-doc-am" which provides tools to
|
||||
# relink URLs in documentation to already installed documentation.
|
||||
# This decision also greatly helps with constantly broken doc generation.
|
||||
# Remember to drop 'doc' USE flag from your package if it was only used to
|
||||
# rebuild docs.
|
||||
# Preserve old behavior for older EAPI.
|
||||
if grep -q "enable-gtk-doc" "${ECONF_SOURCE:-.}"/configure ; then
|
||||
if has ${EAPI:-0} 4 && in_iuse doc ; then
|
||||
g2conf+=( $(use_enable doc gtk-doc) )
|
||||
else
|
||||
g2conf+=( --disable-gtk-doc )
|
||||
fi
|
||||
fi
|
||||
|
||||
# Pass --disable-maintainer-mode when needed
|
||||
if grep -q "^[[:space:]]*AM_MAINTAINER_MODE(\[enable\])" \
|
||||
"${ECONF_SOURCE:-.}"/configure.*; then
|
||||
g2conf+=( --disable-maintainer-mode )
|
||||
fi
|
||||
|
||||
# Pass --disable-scrollkeeper when possible
|
||||
if grep -q "disable-scrollkeeper" "${ECONF_SOURCE:-.}"/configure; then
|
||||
g2conf+=( --disable-scrollkeeper )
|
||||
fi
|
||||
|
||||
# Pass --disable-silent-rules when possible (not needed since eapi5), bug #429308
|
||||
if has ${EAPI:-0} 4; then
|
||||
if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then
|
||||
g2conf+=( --disable-silent-rules )
|
||||
fi
|
||||
fi
|
||||
|
||||
# Pass --disable-schemas-install when possible
|
||||
if grep -q "disable-schemas-install" "${ECONF_SOURCE:-.}"/configure; then
|
||||
g2conf+=( --disable-schemas-install )
|
||||
fi
|
||||
|
||||
# Pass --disable-schemas-compile when possible
|
||||
if grep -q "disable-schemas-compile" "${ECONF_SOURCE:-.}"/configure; then
|
||||
g2conf+=( --disable-schemas-compile )
|
||||
fi
|
||||
|
||||
# Pass --disable-update-mimedb when possible
|
||||
if grep -q "disable-update-mimedb" "${ECONF_SOURCE:-.}"/configure; then
|
||||
g2conf+=( --disable-update-mimedb )
|
||||
fi
|
||||
|
||||
# Pass --enable-compile-warnings=minimum as we don't want -Werror* flags, bug #471336
|
||||
if grep -q "enable-compile-warnings" "${ECONF_SOURCE:-.}"/configure; then
|
||||
g2conf+=( --enable-compile-warnings=minimum )
|
||||
fi
|
||||
|
||||
# Pass --docdir with proper directory, bug #482646 (not needed since eapi6)
|
||||
if has ${EAPI:-0} 4 5; then
|
||||
if grep -q "^ *--docdir=" "${ECONF_SOURCE:-.}"/configure; then
|
||||
g2conf+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} )
|
||||
fi
|
||||
fi
|
||||
|
||||
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
|
||||
if has ${EAPI:-0} 4 5; then
|
||||
addwrite "$(unset HOME; echo ~)/.gnome2"
|
||||
else
|
||||
addpredict "$(unset HOME; echo ~)/.gnome2"
|
||||
fi
|
||||
|
||||
if has ${EAPI:-0} 4 5; then
|
||||
econf ${g2conf[@]} ${G2CONF} "$@"
|
||||
else
|
||||
econf ${g2conf[@]} "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_src_compile
|
||||
# @DESCRIPTION:
|
||||
# Only default src_compile for now
|
||||
gnome2_src_compile() {
|
||||
if has ${EAPI:-0} 4 5; then
|
||||
emake
|
||||
else
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_src_install
|
||||
# @DESCRIPTION:
|
||||
# Gnome specific install. Handles typical GConf and scrollkeeper setup
|
||||
# in packages and removal of .la files if requested
|
||||
gnome2_src_install() {
|
||||
# we must delay gconf schema installation due to sandbox
|
||||
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1"
|
||||
|
||||
local sk_tmp_dir="/var/lib/scrollkeeper"
|
||||
# scrollkeeper-update from rarian doesn't do anything. Then, since eapi6
|
||||
# we stop taking care of it
|
||||
#
|
||||
# if this is not present, scrollkeeper-update may segfault and
|
||||
# create bogus directories in /var/lib/
|
||||
if has ${EAPI:-0} 4 5; then
|
||||
dodir "${sk_tmp_dir}" || die "dodir failed"
|
||||
emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed"
|
||||
else
|
||||
default
|
||||
fi
|
||||
|
||||
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
|
||||
|
||||
# Handle documentation as 'default' for eapi5, bug #373131
|
||||
# Since eapi6 this is handled by default on its own plus MAINTAINERS and HACKING
|
||||
# files that are really common in gnome packages (bug #573390)
|
||||
if has ${EAPI:-0} 4; then
|
||||
# Manual document installation
|
||||
if [[ -n "${DOCS}" ]]; then
|
||||
dodoc ${DOCS} || die "dodoc failed"
|
||||
fi
|
||||
elif has ${EAPI:-0} 5; then
|
||||
einstalldocs
|
||||
else
|
||||
local d
|
||||
for d in HACKING MAINTAINERS; do
|
||||
[[ -s "${d}" ]] && dodoc "${d}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Do not keep /var/lib/scrollkeeper because:
|
||||
# 1. The scrollkeeper database is regenerated at pkg_postinst()
|
||||
# 2. ${ED}/var/lib/scrollkeeper contains only indexes for the current pkg
|
||||
# thus it makes no sense if pkg_postinst ISN'T run for some reason.
|
||||
rm -rf "${ED}${sk_tmp_dir}"
|
||||
rmdir "${ED}/var/lib" 2>/dev/null
|
||||
rmdir "${ED}/var" 2>/dev/null
|
||||
|
||||
# Make sure this one doesn't get in the portage db
|
||||
rm -fr "${ED}/usr/share/applications/mimeinfo.cache"
|
||||
|
||||
# Delete all .la files
|
||||
if has ${EAPI:-0} 4; then
|
||||
if [[ "${GNOME2_LA_PUNT}" != "no" ]]; then
|
||||
ebegin "Removing .la files"
|
||||
if ! use_if_iuse static-libs ; then
|
||||
find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
|
||||
fi
|
||||
eend
|
||||
fi
|
||||
else
|
||||
case "${GNOME2_LA_PUNT}" in
|
||||
yes) prune_libtool_files --modules;;
|
||||
no) ;;
|
||||
*) prune_libtool_files;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_pkg_preinst
|
||||
# @DESCRIPTION:
|
||||
# Finds Icons, GConf and GSettings schemas for later handling in pkg_postinst
|
||||
gnome2_pkg_preinst() {
|
||||
xdg_pkg_preinst
|
||||
gnome2_gconf_savelist
|
||||
gnome2_schemas_savelist
|
||||
gnome2_scrollkeeper_savelist
|
||||
gnome2_gdk_pixbuf_savelist
|
||||
|
||||
local f
|
||||
|
||||
GNOME2_ECLASS_GIO_MODULES=()
|
||||
while IFS= read -r -d '' f; do
|
||||
GNOME2_ECLASS_GIO_MODULES+=( ${f} )
|
||||
done < <(cd "${D}" && find usr/$(get_libdir)/gio/modules -type f -print0 2>/dev/null)
|
||||
|
||||
export GNOME2_ECLASS_GIO_MODULES
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_pkg_postinst
|
||||
# @DESCRIPTION:
|
||||
# Handle scrollkeeper, GConf, GSettings, Icons, desktop and mime
|
||||
# database updates.
|
||||
gnome2_pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
gnome2_gconf_install
|
||||
if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
|
||||
gnome2_schemas_update
|
||||
fi
|
||||
gnome2_scrollkeeper_update
|
||||
gnome2_gdk_pixbuf_update
|
||||
|
||||
if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then
|
||||
gnome2_giomodule_cache_update
|
||||
fi
|
||||
}
|
||||
|
||||
# # FIXME Handle GConf schemas removal
|
||||
#gnome2_pkg_prerm() {
|
||||
# gnome2_gconf_uninstall
|
||||
#}
|
||||
|
||||
# @FUNCTION: gnome2_pkg_postrm
|
||||
# @DESCRIPTION:
|
||||
# Handle scrollkeeper, GSettings, Icons, desktop and mime database updates.
|
||||
gnome2_pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
|
||||
gnome2_schemas_update
|
||||
fi
|
||||
gnome2_scrollkeeper_update
|
||||
|
||||
if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then
|
||||
gnome2_giomodule_cache_update
|
||||
fi
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: llvm.eclass
|
||||
@ -6,7 +6,7 @@
|
||||
# Michał Górny <mgorny@gentoo.org>
|
||||
# @AUTHOR:
|
||||
# Michał Górny <mgorny@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 6 7
|
||||
# @SUPPORTED_EAPIS: 6 7 8
|
||||
# @BLURB: Utility functions to build against slotted LLVM
|
||||
# @DESCRIPTION:
|
||||
# The llvm.eclass provides utility functions that can be used to build
|
||||
@ -17,21 +17,21 @@
|
||||
# a proper dependency string yourself to guarantee that appropriate
|
||||
# version of LLVM is installed.
|
||||
#
|
||||
# Example use for a package supporting LLVM 5 to 7:
|
||||
# Example use for a package supporting LLVM 9 to 11:
|
||||
# @CODE
|
||||
# inherit cmake-utils llvm
|
||||
# inherit cmake llvm
|
||||
#
|
||||
# RDEPEND="
|
||||
# <sys-devel/llvm-8:=
|
||||
# <sys-devel/llvm-11:=
|
||||
# || (
|
||||
# sys-devel/llvm:7
|
||||
# sys-devel/llvm:6
|
||||
# sys-devel/llvm:5
|
||||
# sys-devel/llvm:9
|
||||
# sys-devel/llvm:10
|
||||
# sys-devel/llvm:11
|
||||
# )
|
||||
# "
|
||||
# DEPEND=${RDEPEND}
|
||||
#
|
||||
# LLVM_MAX_SLOT=7
|
||||
# LLVM_MAX_SLOT=11
|
||||
#
|
||||
# # only if you need to define one explicitly
|
||||
# pkg_setup() {
|
||||
@ -42,12 +42,12 @@
|
||||
#
|
||||
# Example for a package needing LLVM+clang w/ a specific target:
|
||||
# @CODE
|
||||
# inherit cmake-utils llvm
|
||||
# inherit cmake llvm
|
||||
#
|
||||
# # note: do not use := on both clang and llvm, it can match different
|
||||
# # slots then. clang pulls llvm in, so we can skip the latter.
|
||||
# RDEPEND="
|
||||
# >=sys-devel/clang-6:=[llvm_targets_AMDGPU(+)]
|
||||
# >=sys-devel/clang-9:=[llvm_targets_AMDGPU(+)]
|
||||
# "
|
||||
# DEPEND=${RDEPEND}
|
||||
#
|
||||
@ -60,7 +60,7 @@ case "${EAPI:-0}" in
|
||||
0|1|2|3|4|5)
|
||||
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
|
||||
;;
|
||||
6|7)
|
||||
6|7|8)
|
||||
;;
|
||||
*)
|
||||
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
|
||||
@ -71,6 +71,10 @@ EXPORT_FUNCTIONS pkg_setup
|
||||
|
||||
if [[ ! ${_LLVM_ECLASS} ]]; then
|
||||
|
||||
# make sure that the versions installing straight into /usr/bin
|
||||
# are uninstalled
|
||||
DEPEND="!!sys-devel/llvm:0"
|
||||
|
||||
# @ECLASS-VARIABLE: LLVM_MAX_SLOT
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
@ -81,7 +85,7 @@ if [[ ! ${_LLVM_ECLASS} ]]; then
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# Correct values of LLVM slots, newest first.
|
||||
declare -g -r _LLVM_KNOWN_SLOTS=( 9 8 7 6 5 4 )
|
||||
declare -g -r _LLVM_KNOWN_SLOTS=( {15..8} )
|
||||
|
||||
# @FUNCTION: get_llvm_prefix
|
||||
# @USAGE: [-b|-d] [<max_slot>]
|
||||
@ -173,14 +177,7 @@ get_llvm_prefix() {
|
||||
die "${FUNCNAME}: invalid max_slot=${max_slot}"
|
||||
fi
|
||||
|
||||
# fallback to :0
|
||||
# assume it's always <= 4 (the lower max_slot allowed)
|
||||
if has_version ${hv_switch} "sys-devel/llvm:0"; then
|
||||
echo "${prefix}/usr"
|
||||
return
|
||||
fi
|
||||
|
||||
die "No LLVM slot${1:+ <= ${1}} found installed!"
|
||||
die "No LLVM slot${1:+ <= ${1}} satisfying the package's dependencies found installed!"
|
||||
}
|
||||
|
||||
# @FUNCTION: llvm_pkg_setup
|
||||
@ -201,13 +198,29 @@ llvm_pkg_setup() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
local llvm_prefix=$(get_llvm_prefix "${LLVM_MAX_SLOT}")
|
||||
local llvm_path=$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin
|
||||
local IFS=:
|
||||
local split_path=( ${PATH} )
|
||||
local new_path=()
|
||||
local x added=
|
||||
|
||||
# do not prepend /usr/bin, it's not necessary and breaks other
|
||||
# prepends, https://bugs.gentoo.org/622866
|
||||
if [[ ${llvm_prefix} != ${EPREFIX}/usr ]]; then
|
||||
export PATH=${llvm_prefix}/bin:${PATH}
|
||||
fi
|
||||
# prepend new path before first LLVM version found
|
||||
for x in "${split_path[@]}"; do
|
||||
if [[ ${x} == */usr/lib/llvm/*/bin ]]; then
|
||||
if [[ ${x} != ${llvm_path} ]]; then
|
||||
new_path+=( "${llvm_path}" )
|
||||
elif [[ ${added} && ${x} == ${llvm_path} ]]; then
|
||||
# deduplicate
|
||||
continue
|
||||
fi
|
||||
added=1
|
||||
fi
|
||||
new_path+=( "${x}" )
|
||||
done
|
||||
# ...or to the end of PATH
|
||||
[[ ${added} ]] || new_path+=( "${llvm_path}" )
|
||||
|
||||
export PATH=${new_path[*]}
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -1,240 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: office-ext-r1.eclass
|
||||
# @MAINTAINER:
|
||||
# The office team <office@gentoo.org>
|
||||
# @AUTHOR:
|
||||
# Tomáš Chvátal <scarabeus@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 5 6 7
|
||||
# @BLURB: Eclass for installing libreoffice/openoffice extensions
|
||||
# @DESCRIPTION:
|
||||
# Eclass for easing maintenance of libreoffice/openoffice extensions.
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
5|6) inherit eutils multilib ;;
|
||||
7) ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
OEXT_EXPORTED_FUNCTIONS="src_unpack src_install pkg_postinst pkg_prerm"
|
||||
|
||||
# @ECLASS-VARIABLE: OFFICE_REQ_USE
|
||||
# @DESCRIPTION:
|
||||
# Useflags required on office implementation for the extension.
|
||||
#
|
||||
# Example:
|
||||
# @CODE
|
||||
# OFFICE_REQ_USE="java,jemalloc(-)?"
|
||||
# @CODE
|
||||
if [[ ${OFFICE_REQ_USE} ]]; then
|
||||
# Append the brackets for the depend bellow
|
||||
OFFICE_REQ_USE="[${OFFICE_REQ_USE}]"
|
||||
fi
|
||||
|
||||
# @ECLASS-VARIABLE: OFFICE_IMPLEMENTATIONS
|
||||
# @DESCRIPTION:
|
||||
# List of implementations supported by the extension.
|
||||
# Some work only for libreoffice and vice versa.
|
||||
# Default value is all implementations.
|
||||
#
|
||||
# Example:
|
||||
# @CODE
|
||||
# OFFICE_IMPLEMENTATIONS=( "libreoffice" "openoffice" )
|
||||
# @CODE
|
||||
[[ -z ${OFFICE_IMPLEMENTATIONS} ]] && OFFICE_IMPLEMENTATIONS=( "libreoffice" "openoffice" )
|
||||
|
||||
# @ECLASS-VARIABLE: OFFICE_EXTENSIONS
|
||||
# @REQUIRED
|
||||
# @DESCRIPTION:
|
||||
# Array containing list of extensions to install.
|
||||
#
|
||||
# Example:
|
||||
# @CODE
|
||||
# OFFICE_EXTENSIONS=( ${PN}_${PV}.oxt )
|
||||
# @CODE
|
||||
[[ -z ${OFFICE_EXTENSIONS} ]] && die "OFFICE_EXTENSIONS variable is unset."
|
||||
if [[ "$(declare -p OFFICE_EXTENSIONS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
|
||||
die "OFFICE_EXTENSIONS variable is not an array."
|
||||
fi
|
||||
|
||||
# @ECLASS-VARIABLE: OFFICE_EXTENSIONS_LOCATION
|
||||
# @DESCRIPTION:
|
||||
# Path to the extensions location. Defaults to ${DISTDIR}.
|
||||
#
|
||||
# Example:
|
||||
# @CODE
|
||||
# OFFICE_EXTENSIONS_LOCATION="${S}/unpacked/"
|
||||
# @CODE
|
||||
: ${OFFICE_EXTENSIONS_LOCATION:=${DISTDIR}}
|
||||
|
||||
IUSE=""
|
||||
RDEPEND=""
|
||||
|
||||
for i in ${OFFICE_IMPLEMENTATIONS[@]}; do
|
||||
IUSE+=" office_implementation_${i}"
|
||||
if [[ ${i} == "openoffice" ]]; then
|
||||
# special only binary
|
||||
RDEPEND+="
|
||||
office_implementation_openoffice? (
|
||||
app-office/openoffice-bin${OFFICE_REQ_USE}
|
||||
)
|
||||
"
|
||||
else
|
||||
RDEPEND+="
|
||||
office_implementation_${i}? (
|
||||
|| (
|
||||
app-office/${i}${OFFICE_REQ_USE}
|
||||
app-office/${i}-bin${OFFICE_REQ_USE}
|
||||
)
|
||||
)
|
||||
"
|
||||
fi
|
||||
done
|
||||
|
||||
REQUIRED_USE="|| ( "
|
||||
for i in ${OFFICE_IMPLEMENTATIONS[@]}; do
|
||||
REQUIRED_USE+=" office_implementation_${i} "
|
||||
done
|
||||
REQUIRED_USE+=" )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
app-arch/unzip
|
||||
"
|
||||
|
||||
# Most projects actually do not provide any relevant sourcedir as they are oxt.
|
||||
S="${WORKDIR}"
|
||||
|
||||
# @FUNCTION: office-ext-r1_src_unpack
|
||||
# @DESCRIPTION:
|
||||
# Flush the cache after removal of an extension.
|
||||
office-ext-r1_src_unpack() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
local i
|
||||
|
||||
default
|
||||
|
||||
for i in ${OFFICE_EXTENSIONS[@]}; do
|
||||
# Unpack the extensions where required and add case for oxt
|
||||
# which should be most common case for the extensions.
|
||||
if [[ -f "${OFFICE_EXTENSIONS_LOCATION}/${i}" ]] ; then
|
||||
case ${i} in
|
||||
*.oxt)
|
||||
mkdir -p "${WORKDIR}/${i}/"
|
||||
pushd "${WORKDIR}/${i}/" > /dev/null
|
||||
echo ">>> Unpacking "${OFFICE_EXTENSIONS_LOCATION}/${i}" to ${PWD}"
|
||||
unzip -qo ${OFFICE_EXTENSIONS_LOCATION}/${i}
|
||||
assert "failed unpacking ${OFFICE_EXTENSIONS_LOCATION}/${i}"
|
||||
popd > /dev/null
|
||||
;;
|
||||
*) unpack ${i} ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: office-ext-r1_src_install
|
||||
# @DESCRIPTION:
|
||||
# Install the extension source to the proper location.
|
||||
office-ext-r1_src_install() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
debug-print "Extensions: ${OFFICE_EXTENSIONS[@]}"
|
||||
|
||||
local i j
|
||||
|
||||
for i in ${OFFICE_IMPLEMENTATIONS[@]}; do
|
||||
if use office_implementation_${i}; then
|
||||
if [[ ${i} == openoffice ]]; then
|
||||
# OOO needs to use uno because direct deployment segfaults.
|
||||
# This is bug by their side, but i don't want to waste time
|
||||
# fixing it myself.
|
||||
insinto /usr/$(get_libdir)/${i}/share/extension/install
|
||||
for j in ${OFFICE_EXTENSIONS[@]}; do
|
||||
doins ${OFFICE_EXTENSIONS_LOCATION}/${j}
|
||||
done
|
||||
else
|
||||
for j in ${OFFICE_EXTENSIONS[@]}; do
|
||||
pushd "${WORKDIR}/${j}/" > /dev/null
|
||||
insinto /usr/$(get_libdir)/${i}/share/extensions/${j/.oxt/}
|
||||
doins -r *
|
||||
popd > /dev/null
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
#### OPENOFFICE COMPAT CODE
|
||||
|
||||
UNOPKG_BINARY="/usr/lib64/openoffice/program/unopkg"
|
||||
|
||||
# @FUNCTION: office-ext-r1_add_extension
|
||||
# @DESCRIPTION:
|
||||
# Install the extension into the libreoffice/openoffice.
|
||||
office-ext-r1_add_extension() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
local ext=$1
|
||||
local tmpdir=$(emktemp -d)
|
||||
|
||||
debug-print "${FUNCNAME}: ${UNOPKG_BINARY} add --shared \"${ext}\""
|
||||
ebegin "Adding office extension: \"${ext}\""
|
||||
${UNOPKG_BINARY} add --suppress-license \
|
||||
--shared "${ext}" \
|
||||
"-env:UserInstallation=file:///${tmpdir}" \
|
||||
"-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
|
||||
eend $?
|
||||
${UNOPKG_BINARY} list --shared > /dev/null
|
||||
rm -r "${tmpdir}" || dir "failed to clean up"
|
||||
}
|
||||
|
||||
# @FUNCTION: office-ext-r1_remove_extension
|
||||
# @DESCRIPTION:
|
||||
# Remove the extension from the libreoffice/openoffice.
|
||||
office-ext-r1_remove_extension() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
local ext=$1
|
||||
local tmpdir=$(mktemp -d --tmpdir="${T}")
|
||||
|
||||
debug-print "${FUNCNAME}: ${UNOPKG_BINARY} remove --shared \"${ext}\""
|
||||
ebegin "Removing office extension: \"${ext}\""
|
||||
${UNOPKG_BINARY} remove --suppress-license \
|
||||
--shared "${ext}" \
|
||||
"-env:UserInstallation=file:///${tmpdir}" \
|
||||
"-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
|
||||
eend $?
|
||||
${UNOPKG_BINARY} list --shared > /dev/null
|
||||
rm -r "${tmpdir}" || dir "failed to clean up"
|
||||
}
|
||||
|
||||
# @FUNCTION: office-ext-r1_pkg_postinst
|
||||
# @DESCRIPTION:
|
||||
# Add the extensions to the openoffice.
|
||||
office-ext-r1_pkg_postinst() {
|
||||
if in_iuse office_implementation_openoffice && use office_implementation_openoffice; then
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
debug-print "Extensions: ${OFFICE_EXTENSIONS[@]}"
|
||||
local i
|
||||
|
||||
for i in ${OFFICE_EXTENSIONS[@]}; do
|
||||
office-ext-r1_add_extension "/usr/lib64/openoffice/share/extension/install/${i}"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: office-ext-r1_pkg_prerm
|
||||
# @DESCRIPTION:
|
||||
# Remove the extensions from the openoffice.
|
||||
office-ext-r1_pkg_prerm() {
|
||||
if in_iuse office_implementation_openoffice && use office_implementation_openoffice; then
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
debug-print "Extensions: ${OFFICE_EXTENSIONS[@]}"
|
||||
local i
|
||||
|
||||
for i in ${OFFICE_EXTENSIONS[@]}; do
|
||||
office-ext-r1_remove_extension "${i}"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
EXPORT_FUNCTIONS ${OEXT_EXPORTED_FUNCTIONS}
|
||||
unset OEXT_EXPORTED_FUNCTIONS
|
@ -1,20 +1,26 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: pam.eclass
|
||||
# @MAINTAINER:
|
||||
# zlogene@gentoo.org
|
||||
# Mikle Kolyada <zlogene@gentoo.org>
|
||||
# @AUTHOR:
|
||||
# Diego Pettenò <flameeyes@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 6 7 8
|
||||
# @BLURB: Handles pam related tasks
|
||||
# @DESCRIPTION:
|
||||
# This eclass contains functions to install pamd configuration files and
|
||||
# pam modules.
|
||||
|
||||
case ${EAPI:-0} in
|
||||
[678]) ;;
|
||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||
esac
|
||||
|
||||
if [[ -z ${_PAM_ECLASS} ]]; then
|
||||
_PAM_ECLASS=1
|
||||
|
||||
inherit flag-o-matic multilib
|
||||
inherit flag-o-matic
|
||||
|
||||
# @FUNCTION: dopamd
|
||||
# @USAGE: <file> [more files]
|
||||
@ -94,12 +100,7 @@ newpamsecurity() {
|
||||
# @DESCRIPTION:
|
||||
# Returns the pam modules' directory for current implementation
|
||||
getpam_mod_dir() {
|
||||
if has_version sys-libs/pam || has_version sys-libs/openpam; then
|
||||
PAM_MOD_DIR=/$(get_libdir)/security
|
||||
else
|
||||
# Unable to find PAM implementation... defaulting
|
||||
PAM_MOD_DIR=/$(get_libdir)/security
|
||||
fi
|
||||
PAM_MOD_DIR=/$(get_libdir)/security
|
||||
|
||||
echo ${PAM_MOD_DIR}
|
||||
}
|
||||
@ -182,11 +183,7 @@ pamd_mimic() {
|
||||
originalstack=$1
|
||||
authlevels="auth account password session"
|
||||
|
||||
if has_version '<sys-libs/pam-0.78'; then
|
||||
mimic="\trequired\t\tpam_stack.so service=${originalstack}"
|
||||
else
|
||||
mimic="\tinclude\t\t${originalstack}"
|
||||
fi
|
||||
mimic="\tsubstack\t\t${originalstack}"
|
||||
|
||||
shift; shift
|
||||
|
||||
@ -207,54 +204,11 @@ pamd_mimic() {
|
||||
cleanpamd() {
|
||||
while [[ -n $1 ]]; do
|
||||
if ! has_version sys-libs/pam; then
|
||||
sed -i -e '/pam_shells\|pam_console/s:^:#:' "${D}/etc/pam.d/$1"
|
||||
sed -i -e '/pam_shells\|pam_console/s:^:#:' "${D}/etc/pam.d/$1" || die
|
||||
fi
|
||||
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: pam_epam_expand
|
||||
# @USAGE: <pamd file>
|
||||
# @DESCRIPTION:
|
||||
# Steer clear, deprecated, don't use, bad experiment
|
||||
pam_epam_expand() {
|
||||
sed -n -e 's|#%EPAM-\([[:alpha:]-]\+\):\([-+<>=/.![:alnum:]]\+\)%#.*|\1 \2|p' \
|
||||
"$@" | sort -u | while read condition parameter; do
|
||||
|
||||
disable="yes"
|
||||
|
||||
case "$condition" in
|
||||
If-Has)
|
||||
message="This can be used only if you have ${parameter} installed"
|
||||
has_version "$parameter" && disable="no"
|
||||
;;
|
||||
Use-Flag)
|
||||
message="This can be used only if you enabled the ${parameter} USE flag"
|
||||
use "$parameter" && disable="no"
|
||||
;;
|
||||
*)
|
||||
eerror "Unknown EPAM condition '${condition}' ('${parameter}')"
|
||||
die "Unknown EPAM condition '${condition}' ('${parameter}')"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "${disable}" = "yes" ]; then
|
||||
sed -i -e "/#%EPAM-${condition}:${parameter/\//\\/}%#/d" "$@"
|
||||
else
|
||||
sed -i -e "s|#%EPAM-${condition}:${parameter}%#||" "$@"
|
||||
fi
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
# Think about it before uncommenting this one, for now run it by hand
|
||||
# pam_pkg_preinst() {
|
||||
# eshopts_push -o noglob # so that bash doen't expand "*"
|
||||
#
|
||||
# pam_epam_expand "${D}"/etc/pam.d/*
|
||||
#
|
||||
# eshopts_pop # reset old shell opts
|
||||
# }
|
||||
|
||||
fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2019 Gentoo Foundation
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: pax-utils.eclass
|
||||
@ -7,6 +7,7 @@
|
||||
# @AUTHOR:
|
||||
# Author: Kevin F. Quinn <kevquinn@gentoo.org>
|
||||
# Author: Anthony G. Basile <blueness@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 5 6 7 8
|
||||
# @BLURB: functions to provide PaX markings for hardened kernels
|
||||
# @DESCRIPTION:
|
||||
#
|
||||
@ -20,6 +21,11 @@
|
||||
# To control what markings are made, set PAX_MARKINGS in /etc/portage/make.conf
|
||||
# to contain either "PT", "XT" or "none". The default is none
|
||||
|
||||
case ${EAPI:-0} in
|
||||
5|6|7|8) ;;
|
||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||
esac
|
||||
|
||||
if [[ -z ${_PAX_UTILS_ECLASS} ]]; then
|
||||
_PAX_UTILS_ECLASS=1
|
||||
|
||||
@ -176,6 +182,10 @@ host-is-pax() {
|
||||
# them elsewhere as they are not supported (i.e. they may be removed
|
||||
# or their function may change arbitrarily).
|
||||
|
||||
# @FUNCTION: _pax_list_files
|
||||
# @INTERNAL
|
||||
# @USAGE: <command to display items> [items]
|
||||
# @DESCRIPTION:
|
||||
# Display a list of things, one per line, indented a bit, using the
|
||||
# display command in $1.
|
||||
_pax_list_files() {
|
||||
|
@ -1,452 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: php-ext-source-r3.eclass
|
||||
# @MAINTAINER:
|
||||
# Gentoo PHP team <php-bugs@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 6 7
|
||||
# @BLURB: Compile and install standalone PHP extensions.
|
||||
# @DESCRIPTION:
|
||||
# A unified interface for compiling and installing standalone PHP
|
||||
# extensions.
|
||||
|
||||
inherit autotools
|
||||
|
||||
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
|
||||
|
||||
case ${EAPI:-0} in
|
||||
6|7) ;;
|
||||
*)
|
||||
die "${ECLASS} is not compatible with EAPI=${EAPI}"
|
||||
esac
|
||||
|
||||
# @ECLASS-VARIABLE: PHP_EXT_NAME
|
||||
# @REQUIRED
|
||||
# @DESCRIPTION:
|
||||
# The extension name. This must be set, otherwise the eclass dies.
|
||||
# Only automagically set by php-ext-pecl-r3.eclass, so unless your ebuild
|
||||
# inherits that eclass, you must set this manually before inherit.
|
||||
[[ -z "${PHP_EXT_NAME}" ]] && \
|
||||
die "no extension name specified for the php-ext-source-r3 eclass"
|
||||
|
||||
# @ECLASS-VARIABLE: PHP_EXT_INI
|
||||
# @DESCRIPTION:
|
||||
# Controls whether or not to add a line to php.ini for the extension.
|
||||
# Defaults to "yes" and should not be changed in most cases.
|
||||
[[ -z "${PHP_EXT_INI}" ]] && PHP_EXT_INI="yes"
|
||||
|
||||
# @ECLASS-VARIABLE: PHP_EXT_ZENDEXT
|
||||
# @DESCRIPTION:
|
||||
# Controls whether the extension is a ZendEngine extension or not.
|
||||
# Defaults to "no". If you don't know what this is, you don't need it.
|
||||
[[ -z "${PHP_EXT_ZENDEXT}" ]] && PHP_EXT_ZENDEXT="no"
|
||||
|
||||
# @ECLASS-VARIABLE: USE_PHP
|
||||
# @REQUIRED
|
||||
# @DESCRIPTION:
|
||||
# Lists the PHP slots compatible the extension is compatible with.
|
||||
# Example:
|
||||
# @CODE
|
||||
# USE_PHP="php5-6 php7-0"
|
||||
# @CODE
|
||||
[[ -z "${USE_PHP}" ]] && \
|
||||
die "USE_PHP is not set for the php-ext-source-r3 eclass"
|
||||
|
||||
# @ECLASS-VARIABLE: PHP_EXT_OPTIONAL_USE
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# If set, all of the dependencies added by this eclass will be
|
||||
# conditional on USE=${PHP_EXT_OPTIONAL_USE}. This is needed when
|
||||
# ebuilds have to inherit this eclass unconditionally, but only
|
||||
# actually use it when (for example) the user has USE=php.
|
||||
|
||||
# @ECLASS-VARIABLE: PHP_EXT_S
|
||||
# @DESCRIPTION:
|
||||
# The relative location of the temporary build directory for the PHP
|
||||
# extension within the source package. This is useful for packages that
|
||||
# bundle the PHP extension. Defaults to ${S}.
|
||||
[[ -z "${PHP_EXT_S}" ]] && PHP_EXT_S="${S}"
|
||||
|
||||
# @ECLASS-VARIABLE: PHP_EXT_SAPIS
|
||||
# @DESCRIPTION:
|
||||
# A list of SAPIs for which we will install this extension. Formerly
|
||||
# called PHPSAPILIST. The default includes every SAPI currently used in
|
||||
# the tree.
|
||||
[[ -z "${PHP_EXT_SAPIS}" ]] && PHP_EXT_SAPIS="apache2 cli cgi fpm embed phpdbg"
|
||||
|
||||
# @ECLASS-VARIABLE: PHP_INI_NAME
|
||||
# @DESCRIPTION:
|
||||
# An optional file name of the saved ini file minis the ini extension
|
||||
# This allows ordering of extensions such that one is loaded before
|
||||
# or after another. Defaults to the PHP_EXT_NAME.
|
||||
# Example (produces 40-foo.ini file):
|
||||
# @CODE@
|
||||
# PHP_INI_NAME="40-foo"
|
||||
# @CODE@
|
||||
: ${PHP_INI_NAME:=${PHP_EXT_NAME}}
|
||||
|
||||
# @ECLASS-VARIABLE: PHP_EXT_NEEDED_USE
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# A list of USE flags to append to each PHP target selected
|
||||
# as a valid USE-dependency string. The value should be valid
|
||||
# for all targets so USE defaults may be necessary.
|
||||
# Example:
|
||||
# @CODE
|
||||
# PHP_EXT_NEEDED_USE="mysql?,pdo,pcre(+)"
|
||||
# @CODE
|
||||
#
|
||||
# The PHP dependencies will result in:
|
||||
# @CODE
|
||||
# php_targets_php7-0? ( dev-lang/php:7.0[mysql?,pdo,pcre(+)] )
|
||||
# @CODE
|
||||
|
||||
|
||||
# Make sure at least one target is installed. First, start a USE
|
||||
# conditional like "php?", but only when PHP_EXT_OPTIONAL_USE is
|
||||
# non-null. The option group "|| (..." is always started here.
|
||||
REQUIRED_USE="${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( }|| ( "
|
||||
PHPDEPEND="${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( } "
|
||||
for _php_target in ${USE_PHP}; do
|
||||
# Now loop through each USE_PHP target and add the corresponding
|
||||
# dev-lang/php slot to PHPDEPEND.
|
||||
IUSE+=" php_targets_${_php_target}"
|
||||
REQUIRED_USE+="php_targets_${_php_target} "
|
||||
_php_slot=${_php_target/php}
|
||||
_php_slot=${_php_slot/-/.}
|
||||
if [[ ${PHP_EXT_NEEDED_USE} ]] ; then
|
||||
_php_slot+=[${PHP_EXT_NEEDED_USE}]
|
||||
fi
|
||||
PHPDEPEND+=" php_targets_${_php_target}? ( dev-lang/php:${_php_slot} )"
|
||||
done
|
||||
|
||||
# Don't pollute the environment with our loop variables.
|
||||
unset _php_slot _php_target
|
||||
|
||||
# Finally, end the optional group that we started before the loop. Close
|
||||
# the USE-conditional if PHP_EXT_OPTIONAL_USE is non-null.
|
||||
REQUIRED_USE+=") ${PHP_EXT_OPTIONAL_USE:+ )}"
|
||||
PHPDEPEND+=" ${PHP_EXT_OPTIONAL_USE:+ )}"
|
||||
TOOLDEPS="sys-devel/m4 sys-devel/libtool"
|
||||
|
||||
RDEPEND="${PHPDEPEND}"
|
||||
|
||||
case ${EAPI:-0} in
|
||||
6) DEPEND="${TOOLDEPS} ${PHPDEPEND}" ;;
|
||||
7) DEPEND="${PHPDEPEND}" ; BDEPEND="${TOOLDEPS} ${PHPDEPEND}" ;;
|
||||
esac
|
||||
|
||||
unset PHPDEPEND TOOLDEPS
|
||||
|
||||
# @ECLASS-VARIABLE: PHP_EXT_SKIP_PHPIZE
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# By default, we run "phpize" in php-ext-source-r3_src_prepare(). Set
|
||||
# PHP_EXT_SKIP_PHPIZE="yes" in your ebuild if you do not want to run
|
||||
# phpize (and the autoreconf that becomes necessary afterwards).
|
||||
|
||||
# @ECLASS-VARIABLE: PHP_EXT_SKIP_PATCHES
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# By default, we run default_src_prepare to PHP_EXT_S.
|
||||
# Set PHP_EXT_SKIP_PATCHES="yes" in your ebuild if you
|
||||
# want to apply patches yourself.
|
||||
|
||||
# @FUNCTION: php-ext-source-r3_src_prepare
|
||||
# @DESCRIPTION:
|
||||
# Runs the default src_prepare() for PATCHES/eapply_user() support (optional),
|
||||
# and for each PHP slot, makes a copy of sources, initializes the environment,
|
||||
# and calls php-ext-source-r3_phpize().
|
||||
php-ext-source-r3_src_prepare() {
|
||||
local slot orig_s="${PHP_EXT_S}"
|
||||
if [[ "${PHP_EXT_SKIP_PATCHES}" != 'yes' ]] ; then
|
||||
pushd "${orig_s}" > /dev/null || die
|
||||
default
|
||||
popd > /dev/null || die
|
||||
fi
|
||||
for slot in $(php_get_slots); do
|
||||
cp --recursive --preserve "${orig_s}" "${WORKDIR}/${slot}" || \
|
||||
die "failed to copy sources from ${orig_s} to ${WORKDIR}/${slot}"
|
||||
php_init_slot_env "${slot}"
|
||||
php-ext-source-r3_phpize
|
||||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: php-ext-source-r3_phpize
|
||||
# @DESCRIPTION:
|
||||
# Subject to PHP_EXT_SKIP_PHPIZE, this function runs phpize and
|
||||
# autoreconf in a manner that avoids warnings.
|
||||
php-ext-source-r3_phpize() {
|
||||
if [[ "${PHP_EXT_SKIP_PHPIZE}" != 'yes' ]] ; then
|
||||
# Create configure out of config.m4. We use autotools_run_tool
|
||||
# to avoid some warnings about WANT_AUTOCONF and
|
||||
# WANT_AUTOMAKE (see bugs #329071 and #549268).
|
||||
autotools_run_tool "${PHPIZE}"
|
||||
|
||||
# Force libtoolize to run and regenerate autotools files (bug
|
||||
# #220519).
|
||||
rm aclocal.m4 || die "failed to remove aclocal.m4"
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# @ECLASS-VARIABLE: PHP_EXT_ECONF_ARGS
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Set this in the ebuild to pass additional configure options to
|
||||
# econf. Formerly called my_conf. Either a string or an array of
|
||||
# --flag=value parameters is supported.
|
||||
|
||||
# @FUNCTION: php-ext-source-r3_src_configure
|
||||
# @DESCRIPTION:
|
||||
# Takes care of standard configure for PHP extensions (modules).
|
||||
php-ext-source-r3_src_configure() {
|
||||
# net-snmp creates these, bug #385403.
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
# Support either a string or an array for PHP_EXT_ECONF_ARGS.
|
||||
local econf_args
|
||||
if [[ -n "${PHP_EXT_ECONF_ARGS}" && $(declare -p PHP_EXT_ECONF_ARGS) == "declare -a"* ]]; then
|
||||
econf_args=( "${PHP_EXT_ECONF_ARGS[@]}" )
|
||||
else
|
||||
econf_args=( ${PHP_EXT_ECONF_ARGS} )
|
||||
fi
|
||||
|
||||
local slot
|
||||
for slot in $(php_get_slots); do
|
||||
php_init_slot_env "${slot}"
|
||||
econf --with-php-config="${PHPCONFIG}" "${econf_args[@]}"
|
||||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: php-ext-source-r3_src_compile
|
||||
# @DESCRIPTION:
|
||||
# Compile a standard standalone PHP extension.
|
||||
php-ext-source-r3_src_compile() {
|
||||
# net-snmp creates these, bug #324739.
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
# shm extension creates a semaphore file, bug #173574.
|
||||
addpredict /session_mm_cli0.sem
|
||||
local slot
|
||||
for slot in $(php_get_slots); do
|
||||
php_init_slot_env "${slot}"
|
||||
emake
|
||||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: php-ext-source-r3_src_install
|
||||
# @DESCRIPTION:
|
||||
# Install a standard standalone PHP extension. Uses einstalldocs()
|
||||
# to support the DOCS variable/array.
|
||||
php-ext-source-r3_src_install() {
|
||||
local slot
|
||||
for slot in $(php_get_slots); do
|
||||
php_init_slot_env "${slot}"
|
||||
|
||||
# Strip $EPREFIX from $EXT_DIR before calling doexe (which
|
||||
# handles EPREFIX itself). Shared libs are +x by convention,
|
||||
# although nothing seems to depend on that.
|
||||
exeinto "${EXT_DIR#$EPREFIX}"
|
||||
doexe "modules/${PHP_EXT_NAME}.so"
|
||||
|
||||
INSTALL_ROOT="${D}" emake install-headers
|
||||
done
|
||||
einstalldocs
|
||||
php-ext-source-r3_createinifiles
|
||||
}
|
||||
|
||||
# @FUNCTION: php-ext-source-r3_src_test
|
||||
# @DESCRIPTION:
|
||||
# Run tests delivered with the standalone PHP extension. Phpize will have generated
|
||||
# a run-tests.php file to be executed by `make test`. We only need to
|
||||
# force the test suite to run in non-interactive mode.
|
||||
php-ext-source-r3_src_test() {
|
||||
local slot
|
||||
for slot in $(php_get_slots); do
|
||||
php_init_slot_env "${slot}"
|
||||
NO_INTERACTION="yes" emake test
|
||||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: php_get_slots
|
||||
# @DESCRIPTION:
|
||||
# Get a list of PHP slots contained in both the ebuild's USE_PHP and the
|
||||
# user's PHP_TARGETS.
|
||||
php_get_slots() {
|
||||
local s=""
|
||||
local slot
|
||||
for slot in ${USE_PHP}; do
|
||||
use php_targets_${slot} && s+=" ${slot/-/.}"
|
||||
done
|
||||
echo $s
|
||||
}
|
||||
|
||||
# @FUNCTION: php_init_slot_env
|
||||
# @USAGE: <slot>
|
||||
# @DESCRIPTION:
|
||||
# Takes a slot name, and initializes some global variables to values
|
||||
# corresponding to that slot. For example, it sets the path to the "php"
|
||||
# and "phpize" binaries, which will differ for each slot. This function
|
||||
# is intended to be called while looping through a list of slots
|
||||
# obtained from php_get_slots().
|
||||
#
|
||||
# Calling this function will change the working directory to the
|
||||
# temporary build directory for the given slot.
|
||||
php_init_slot_env() {
|
||||
local libdir=$(get_libdir)
|
||||
local slot="${1}"
|
||||
|
||||
PHPPREFIX="${EPREFIX}/usr/${libdir}/${slot}"
|
||||
PHPIZE="${PHPPREFIX}/bin/phpize"
|
||||
PHPCONFIG="${PHPPREFIX}/bin/php-config"
|
||||
PHPCLI="${PHPPREFIX}/bin/php"
|
||||
PHPCGI="${PHPPREFIX}/bin/php-cgi"
|
||||
PHP_PKG="$(best_version =dev-lang/php-${1:3}*)"
|
||||
|
||||
EXT_DIR="$(${PHPCONFIG} --extension-dir 2>/dev/null)"
|
||||
PHP_CURRENTSLOT=${1:3}
|
||||
|
||||
PHP_EXT_S="${WORKDIR}/${slot}"
|
||||
cd "${PHP_EXT_S}" || die "failed to change directory to ${PHP_EXT_S}"
|
||||
}
|
||||
|
||||
# @FUNCTION: php_slot_ini_files
|
||||
# @USAGE: <slot>
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# Output a list of relative paths to INI files for the given
|
||||
# slot. Usually there will be one INI file per SAPI.
|
||||
php_slot_ini_files() {
|
||||
local slot_ini_files=""
|
||||
local x
|
||||
for x in ${PHP_EXT_SAPIS} ; do
|
||||
if [[ -f "${EPREFIX}/etc/php/${x}-${1}/php.ini" ]] ; then
|
||||
slot_ini_files+=" etc/php/${x}-${1}/ext/${PHP_INI_NAME}.ini"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "${slot_ini_files}"
|
||||
}
|
||||
|
||||
# @FUNCTION: php-ext-source-r3_createinifiles
|
||||
# @DESCRIPTION:
|
||||
# Builds INI files for every enabled slot and SAPI.
|
||||
php-ext-source-r3_createinifiles() {
|
||||
local slot
|
||||
for slot in $(php_get_slots); do
|
||||
php_init_slot_env "${slot}"
|
||||
|
||||
local file
|
||||
for file in $(php_slot_ini_files "${slot}") ; do
|
||||
if [[ "${PHP_EXT_INI}" = "yes" ]] ; then
|
||||
# Add the needed lines to the <ext>.ini files
|
||||
php-ext-source-r3_addextension "${PHP_EXT_NAME}.so" "${file}"
|
||||
fi
|
||||
|
||||
if [[ -n "${PHP_EXT_INIFILE}" ]] ; then
|
||||
cat "${FILESDIR}/${PHP_EXT_INIFILE}" >> "${ED}/${file}" \
|
||||
|| die "failed to append to ${ED}/${file}"
|
||||
|
||||
einfo "Added contents of ${FILESDIR}/${PHP_EXT_INIFILE}" \
|
||||
"to ${file}"
|
||||
fi
|
||||
inidir="${file/${PHP_INI_NAME}.ini/}"
|
||||
inidir="${inidir/ext/ext-active}"
|
||||
dodir "/${inidir}"
|
||||
dosym "/${file}" "/${file/ext/ext-active}"
|
||||
done
|
||||
done
|
||||
|
||||
# A location where PHP code for this extension can be stored,
|
||||
# independent of the PHP or extension versions. This will be part of
|
||||
# PHP's include_path, configured in php.ini. For example, pecl-apcu
|
||||
# installs an "apc.php" file which you are supposed to load with
|
||||
#
|
||||
# require('apcu/apc.php');
|
||||
#
|
||||
PHP_EXT_SHARED_DIR="${EPREFIX}/usr/share/php/${PHP_EXT_NAME}"
|
||||
}
|
||||
|
||||
# @FUNCTION: php-ext-source-r3_addextension
|
||||
# @USAGE: <extension-path> <ini-file>
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# Add a line to an INI file that will enable the given extension. The
|
||||
# first parameter is the path to the extension (.so) file, and the
|
||||
# second parameter is the name of the INI file in which it should be
|
||||
# loaded. This function determines the setting name (either
|
||||
# "extension=..." or "zend_extension=...") and then calls
|
||||
# php-ext-source-r3_addtoinifile to do the actual work.
|
||||
php-ext-source-r3_addextension() {
|
||||
local ext_type="extension"
|
||||
local ext_file="${1}"
|
||||
|
||||
if [[ "${PHP_EXT_ZENDEXT}" = "yes" ]] ; then
|
||||
ext_type="zend_extension"
|
||||
ext_file="${EXT_DIR}/${1}" # Zend extensions need the path...
|
||||
fi
|
||||
|
||||
php-ext-source-r3_addtoinifile "${2}" "${ext_type}" "${ext_file}"
|
||||
}
|
||||
|
||||
# @FUNCTION: php-ext-source-r3_addtoinifile
|
||||
# @USAGE: <relative-ini-path> <setting-or-section-name> [setting-value]
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# Add a setting=value to one INI file. The first argument is the
|
||||
# relative path to the INI file. The second argument is the setting
|
||||
# name, and the third argument is its value.
|
||||
#
|
||||
# You can also pass "[Section]" as the second parameter, to create a new
|
||||
# section in the INI file. In that case, the third parameter (which
|
||||
# would otherwise be the value of the setting) is ignored.
|
||||
php-ext-source-r3_addtoinifile() {
|
||||
local inifile="${WORKDIR}/${1}"
|
||||
local inidir="${inifile%/*}"
|
||||
|
||||
mkdir -p "${inidir}" || die "failed to create INI directory ${inidir}"
|
||||
|
||||
# Are we adding the name of a section? Assume not by default.
|
||||
local my_added="${2}=${3}"
|
||||
if [[ ${2:0:1} == "[" ]] ; then
|
||||
# Ok, it's a section name.
|
||||
my_added="${2}"
|
||||
fi
|
||||
echo "${my_added}" >> "${inifile}" || die "failed to append to ${inifile}"
|
||||
einfo "Added '${my_added}' to /${1}"
|
||||
|
||||
insinto "/${1%/*}"
|
||||
doins "${inifile}"
|
||||
}
|
||||
|
||||
# @FUNCTION: php-ext-source-r3_addtoinifiles
|
||||
# @USAGE: <setting-or-section-name> [setting-value] [message]
|
||||
# @DESCRIPTION:
|
||||
# Add settings to every php.ini file installed by this extension.
|
||||
# You can also add new [Section]s -- see the example below.
|
||||
#
|
||||
# @CODE
|
||||
# Add some settings for the extension:
|
||||
#
|
||||
# php-ext-source-r3_addtoinifiles "zend_optimizer.optimization_level" "15"
|
||||
# php-ext-source-r3_addtoinifiles "zend_optimizer.enable_loader" "0"
|
||||
# php-ext-source-r3_addtoinifiles "zend_optimizer.disable_licensing" "0"
|
||||
#
|
||||
# Adding values to a section in php.ini file installed by the extension:
|
||||
#
|
||||
# php-ext-source-r3_addtoinifiles "[Debugger]"
|
||||
# php-ext-source-r3_addtoinifiles "debugger.enabled" "on"
|
||||
# php-ext-source-r3_addtoinifiles "debugger.profiler_enabled" "on"
|
||||
# @CODE
|
||||
php-ext-source-r3_addtoinifiles() {
|
||||
local slot
|
||||
for slot in $(php_get_slots); do
|
||||
for file in $(php_slot_ini_files "${slot}") ; do
|
||||
php-ext-source-r3_addtoinifile "${file}" "${1}" "${2}"
|
||||
done
|
||||
done
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: rust-toolchain.eclass
|
||||
# @MAINTAINER:
|
||||
# Rust Project <rust@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 6 7
|
||||
# @SUPPORTED_EAPIS: 6 7 8
|
||||
# @BLURB: helps map gentoo arches to rust ABIs
|
||||
# @DESCRIPTION:
|
||||
# This eclass contains a src_unpack default phase function, and
|
||||
@ -14,6 +14,7 @@
|
||||
case ${EAPI} in
|
||||
6) : ;;
|
||||
7) : ;;
|
||||
8) : ;;
|
||||
*) die "EAPI=${EAPI:-0} is not supported" ;;
|
||||
esac
|
||||
|
||||
@ -33,22 +34,25 @@ inherit multilib-build
|
||||
# environment if none is specified.
|
||||
|
||||
rust_abi() {
|
||||
local CTARGET=${1:-${CHOST}}
|
||||
case ${CTARGET%%*-} in
|
||||
aarch64*) echo aarch64-unknown-linux-gnu;;
|
||||
mips64*) echo mips64-unknown-linux-gnuabi64;;
|
||||
powerpc64le*) echo powerpc64le-unknown-linux-gnu;;
|
||||
powerpc64*) echo powerpc64-unknown-linux-gnu;;
|
||||
x86_64*) echo x86_64-unknown-linux-gnu;;
|
||||
armv6j*s*) echo arm-unknown-linux-gnueabi;;
|
||||
armv6j*h*) echo arm-unknown-linux-gnueabihf;;
|
||||
armv7a*h*) echo armv7-unknown-linux-gnueabihf;;
|
||||
i?86*) echo i686-unknown-linux-gnu;;
|
||||
mipsel*) echo mipsel-unknown-linux-gnu;;
|
||||
mips*) echo mips-unknown-linux-gnu;;
|
||||
powerpc*) echo powerpc-unknown-linux-gnu;;
|
||||
s390x*) echo s390x-unknown-linux-gnu;;
|
||||
*) echo ${CTARGET};;
|
||||
local CTARGET=${1:-${CHOST}}
|
||||
case ${CTARGET%%*-} in
|
||||
aarch64*gnu) echo aarch64-unknown-linux-gnu;;
|
||||
aarch64*musl) echo aarch64-unknown-linux-musl;;
|
||||
mips64*) echo mips64-unknown-linux-gnuabi64;;
|
||||
powerpc64le*) echo powerpc64le-unknown-linux-gnu;;
|
||||
powerpc64*) echo powerpc64-unknown-linux-gnu;;
|
||||
x86_64*gnu) echo x86_64-unknown-linux-gnu;;
|
||||
x86_64*musl) echo x86_64-unknown-linux-musl;;
|
||||
armv6j*s*) echo arm-unknown-linux-gnueabi;;
|
||||
armv6j*h*) echo arm-unknown-linux-gnueabihf;;
|
||||
armv7a*h*) echo armv7-unknown-linux-gnueabihf;;
|
||||
i?86*) echo i686-unknown-linux-gnu;;
|
||||
mipsel*) echo mipsel-unknown-linux-gnu;;
|
||||
mips*) echo mips-unknown-linux-gnu;;
|
||||
powerpc*) echo powerpc-unknown-linux-gnu;;
|
||||
s390x*) echo s390x-unknown-linux-gnu;;
|
||||
riscv64*) echo riscv64gc-unknown-linux-gnu;;
|
||||
*) echo ${CTARGET};;
|
||||
esac
|
||||
}
|
||||
|
||||
@ -56,18 +60,18 @@ rust_abi() {
|
||||
# @DESCRIPTION:
|
||||
# Outputs a list of all the enabled Rust ABIs
|
||||
rust_all_abis() {
|
||||
if use multilib; then
|
||||
local abi
|
||||
local ALL_ABIS=()
|
||||
for abi in $(multilib_get_enabled_abis); do
|
||||
ALL_ABIS+=( $(rust_abi $(get_abi_CHOST ${abi})) )
|
||||
done
|
||||
local abi_list
|
||||
IFS=, eval 'abi_list=${ALL_ABIS[*]}'
|
||||
echo ${abi_list}
|
||||
else
|
||||
rust_abi
|
||||
fi
|
||||
if use multilib; then
|
||||
local abi
|
||||
local ALL_ABIS=()
|
||||
for abi in $(multilib_get_enabled_abis); do
|
||||
ALL_ABIS+=( $(rust_abi $(get_abi_CHOST ${abi})) )
|
||||
done
|
||||
local abi_list
|
||||
IFS=, eval 'abi_list=${ALL_ABIS[*]}'
|
||||
echo ${abi_list}
|
||||
else
|
||||
rust_abi
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: rust_arch_uri
|
||||
@ -79,22 +83,23 @@ rust_all_abis() {
|
||||
#
|
||||
# @EXAMPLE:
|
||||
# SRC_URI="amd64? (
|
||||
# $(rust_arch_uri x86_64-unknown-linux-gnu rustc-${STAGE0_VERSION})
|
||||
# $(rust_arch_uri x86_64-unknown-linux-gnu rustc-${STAGE0_VERSION})
|
||||
# )"
|
||||
#
|
||||
rust_arch_uri() {
|
||||
if [ -n "$3" ]; then
|
||||
echo "${RUST_TOOLCHAIN_BASEURL}${2}-${1}.tar.xz -> ${3}-${1}.tar.xz"
|
||||
else
|
||||
echo "${RUST_TOOLCHAIN_BASEURL}${2}-${1}.tar.xz"
|
||||
fi
|
||||
if [ -n "$3" ]; then
|
||||
echo "${RUST_TOOLCHAIN_BASEURL}${2}-${1}.tar.xz -> ${3}-${1}.tar.xz"
|
||||
else
|
||||
echo "${RUST_TOOLCHAIN_BASEURL}${2}-${1}.tar.xz"
|
||||
echo "verify-sig? ( ${RUST_TOOLCHAIN_BASEURL}${2}-${1}.tar.xz.asc )"
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: rust_all_arch_uris
|
||||
# @USAGE: <base-uri> [alt-distfile-basename]
|
||||
# @DESCRIPTION:
|
||||
# Outputs the URIs for SRC_URI to help fetch dependencies, using a base URI
|
||||
# provided as an argument. Optionally allows for distfile renaming via a specified
|
||||
# provided as an argument. Optionally allows for distfile renaming via a specified
|
||||
# basename.
|
||||
#
|
||||
# @EXAMPLE:
|
||||
@ -103,18 +108,21 @@ rust_arch_uri() {
|
||||
rust_all_arch_uris()
|
||||
{
|
||||
local uris=""
|
||||
uris+="amd64? ( $(rust_arch_uri x86_64-unknown-linux-gnu "$@") ) "
|
||||
uris+="arm? ( $(rust_arch_uri arm-unknown-linux-gnueabi "$@")
|
||||
$(rust_arch_uri arm-unknown-linux-gnueabihf "$@")
|
||||
$(rust_arch_uri armv7-unknown-linux-gnueabihf "$@") ) "
|
||||
uris+="arm64? ( $(rust_arch_uri aarch64-unknown-linux-gnu "$@") ) "
|
||||
uris+="mips? ( $(rust_arch_uri mips-unknown-linux-gnu "$@")
|
||||
$(rust_arch_uri mipsel-unknown-linux-gnu "$@")
|
||||
$(rust_arch_uri mips64-unknown-linux-gnuabi64 "$@") ) "
|
||||
uris+="ppc? ( $(rust_arch_uri powerpc-unknown-linux-gnu "$@") ) "
|
||||
uris+="ppc64? ( $(rust_arch_uri powerpc64-unknown-linux-gnu "$@")
|
||||
$(rust_arch_uri powerpc64le-unknown-linux-gnu "$@") ) "
|
||||
uris+="s390? ( $(rust_arch_uri s390x-unknown-linux-gnu "$@") ) "
|
||||
uris+="x86? ( $(rust_arch_uri i686-unknown-linux-gnu "$@") ) "
|
||||
uris+="abi_x86_64? ( elibc_glibc? ( $(rust_arch_uri x86_64-unknown-linux-gnu "$@") )
|
||||
elibc_musl? ( $(rust_arch_uri x86_64-unknown-linux-musl "$@") ) ) "
|
||||
uris+="arm? ( $(rust_arch_uri arm-unknown-linux-gnueabi "$@")
|
||||
$(rust_arch_uri arm-unknown-linux-gnueabihf "$@")
|
||||
$(rust_arch_uri armv7-unknown-linux-gnueabihf "$@") ) "
|
||||
uris+="arm64? ( elibc_glibc? ( $(rust_arch_uri aarch64-unknown-linux-gnu "$@") )
|
||||
elibc_musl? ( $(rust_arch_uri aarch64-unknown-linux-musl "$@") ) ) "
|
||||
uris+="mips? ( $(rust_arch_uri mips-unknown-linux-gnu "$@")
|
||||
$(rust_arch_uri mipsel-unknown-linux-gnu "$@")
|
||||
$(rust_arch_uri mips64-unknown-linux-gnuabi64 "$@") ) "
|
||||
uris+="ppc? ( $(rust_arch_uri powerpc-unknown-linux-gnu "$@") ) "
|
||||
uris+="ppc64? ( $(rust_arch_uri powerpc64-unknown-linux-gnu "$@")
|
||||
$(rust_arch_uri powerpc64le-unknown-linux-gnu "$@") ) "
|
||||
uris+="s390? ( $(rust_arch_uri s390x-unknown-linux-gnu "$@") ) "
|
||||
uris+="abi_x86_32? ( $(rust_arch_uri i686-unknown-linux-gnu "$@") ) "
|
||||
uris+="riscv? ( $(rust_arch_uri riscv64gc-unknown-linux-gnu "$@") ) "
|
||||
echo "${uris}"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 2019 Gentoo Authors
|
||||
# Copyright 2019-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: sgml-catalog-r1.eclass
|
||||
@ -9,9 +9,8 @@
|
||||
# @SUPPORTED_EAPIS: 7
|
||||
# @BLURB: Functions for installing SGML catalogs
|
||||
# @DESCRIPTION:
|
||||
# This eclass regenerates /etc/sgml/catalog, /etc/sgml.{,c}env
|
||||
# and /etc/env.d/93sgmltools-lite as necessary for the DocBook tooling.
|
||||
# This is done via exported pkg_postinst and pkg_postrm phases.
|
||||
# This eclass regenerates /etc/sgml/catalog as necessary for the DocBook
|
||||
# tooling. This is done via exported pkg_postinst and pkg_postrm phases.
|
||||
|
||||
case ${EAPI:-0} in
|
||||
7) ;;
|
||||
@ -50,16 +49,9 @@ sgml-catalog-r1_update_catalog() {
|
||||
|
||||
# @FUNCTION: sgml-catalog-r1_update_env
|
||||
# @DESCRIPTION:
|
||||
# Regenerate environment variables and copy them to env.d.
|
||||
# Remove obsolete environment files. They can break tools such as asciidoc.
|
||||
sgml-catalog-r1_update_env() {
|
||||
# gensgmlenv doesn't support overriding root
|
||||
if [[ -z ${ROOT} && -x "${EPREFIX}/usr/bin/gensgmlenv" ]]; then
|
||||
ebegin "Regenerating SGML environment variables"
|
||||
gensgmlenv &&
|
||||
grep -v export "${EPREFIX}/etc/sgml/sgml.env" > "${T}"/93sgmltools-lite &&
|
||||
mv "${T}"/93sgmltools-lite "${EPREFIX}/etc/env.d/93sgmltools-lite"
|
||||
eend "${?}"
|
||||
fi
|
||||
rm -f "${EROOT}"/etc/env.d/93sgmltools-lite "${EROOT}"/etc/sgml/sgml.{,c}env
|
||||
}
|
||||
|
||||
sgml-catalog-r1_pkg_postinst() {
|
||||
|
@ -1,10 +1,10 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: vcs-snapshot.eclass
|
||||
# @MAINTAINER:
|
||||
# mgorny@gentoo.org
|
||||
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
|
||||
# @SUPPORTED_EAPIS: 6 7 8
|
||||
# @BLURB: support eclass for unpacking VCS snapshot tarballs
|
||||
# @DESCRIPTION:
|
||||
# THIS ECLASS IS NOT NECESSARY FOR MODERN GITHUB AND GITLAB SNAPSHOTS.
|
||||
@ -42,12 +42,13 @@
|
||||
# and however the tarballs were originally packed, all files will appear
|
||||
# in ${WORKDIR}/${P} and ${WORKDIR}/${P}-otherstuff respectively.
|
||||
|
||||
case ${EAPI:-0} in
|
||||
0|1|2|3|4|5|6|7) ;;
|
||||
*) die "vcs-snapshot.eclass API in EAPI ${EAPI} not yet established."
|
||||
case ${EAPI} in
|
||||
6|7|8) ;;
|
||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||
esac
|
||||
|
||||
EXPORT_FUNCTIONS src_unpack
|
||||
if [[ ! ${_VCS_SNAPSHOT_ECLASS} ]]; then
|
||||
_VCS_SNAPSHOT_ECLASS=1
|
||||
|
||||
# @FUNCTION: vcs-snapshot_src_unpack
|
||||
# @DESCRIPTION:
|
||||
@ -102,7 +103,7 @@ vcs-snapshot_src_unpack() {
|
||||
|
||||
if [[ ! ${renamed_any} ]]; then
|
||||
local w=eerror
|
||||
[[ ${EAPI} == [0123456] ]] && w=eqawarn
|
||||
[[ ${EAPI} == 6 ]] && w=eqawarn
|
||||
"${w}" "${FUNCNAME} did not find any archives that needed renaming."
|
||||
"${w}" "Please verify that its usage is really necessary, and remove"
|
||||
"${w}" "the inherit if it is not."
|
||||
@ -110,3 +111,7 @@ vcs-snapshot_src_unpack() {
|
||||
[[ ${w} == eerror ]] && die "${FUNCNAME}: Unnecessary usage detected"
|
||||
fi
|
||||
}
|
||||
|
||||
fi
|
||||
|
||||
EXPORT_FUNCTIONS src_unpack
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: waf-utils.eclass
|
||||
@ -8,22 +8,22 @@
|
||||
# Original Author: Gilles Dartiguelongue <eva@gentoo.org>
|
||||
# Various improvements based on cmake-utils.eclass: Tomáš Chvátal <scarabeus@gentoo.org>
|
||||
# Proper prefix support: Jonathan Callen <jcallen@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 4 5 6 7
|
||||
# @SUPPORTED_EAPIS: 6 7
|
||||
# @BLURB: common ebuild functions for waf-based packages
|
||||
# @DESCRIPTION:
|
||||
# The waf-utils eclass contains functions that make creating ebuild for
|
||||
# waf-based packages much easier.
|
||||
# Its main features are support of common portage default settings.
|
||||
|
||||
[[ ${EAPI} == [45] ]] && inherit eutils
|
||||
inherit multilib toolchain-funcs multiprocessing
|
||||
|
||||
case ${EAPI:-0} in
|
||||
4|5|6|7) EXPORT_FUNCTIONS src_configure src_compile src_install ;;
|
||||
6|7) EXPORT_FUNCTIONS src_configure src_compile src_install ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
# @ECLASS-VARIABLE: WAF_VERBOSE
|
||||
# @USER_VARIABLE
|
||||
# @DESCRIPTION:
|
||||
# Set to OFF to disable verbose messages during compilation
|
||||
# this is _not_ meant to be set in ebuilds
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: xdg.eclass
|
||||
@ -6,7 +6,8 @@
|
||||
# freedesktop-bugs@gentoo.org
|
||||
# @AUTHOR:
|
||||
# Original author: Gilles Dartiguelongue <eva@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 4 5 6 7
|
||||
# @SUPPORTED_EAPIS: 5 6 7 8
|
||||
# @PROVIDES: xdg-utils
|
||||
# @BLURB: Provides phases for XDG compliant packages.
|
||||
# @DESCRIPTION:
|
||||
# Utility eclass to update the desktop, icon and shared mime info as laid
|
||||
@ -14,29 +15,47 @@
|
||||
|
||||
inherit xdg-utils
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
4|5|6|7)
|
||||
EXPORT_FUNCTIONS src_prepare pkg_preinst pkg_postinst pkg_postrm
|
||||
_DEFINE_XDG_SRC_PREPARE=false
|
||||
case "${EAPI}" in
|
||||
5|6|7)
|
||||
# src_prepare is only exported in EAPI < 8.
|
||||
EXPORT_FUNCTIONS src_prepare
|
||||
_DEFINE_XDG_SRC_PREPARE=true
|
||||
;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
8)
|
||||
;;
|
||||
*) die "${ECLASS}: EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm
|
||||
|
||||
# Avoid dependency loop as both depend on glib-2
|
||||
if [[ ${CATEGORY}/${P} != dev-libs/glib-2.* ]] ; then
|
||||
DEPEND="
|
||||
_XDG_DEPEND="
|
||||
dev-util/desktop-file-utils
|
||||
x11-misc/shared-mime-info
|
||||
"
|
||||
|
||||
case "${EAPI}" in
|
||||
5|6|7)
|
||||
DEPEND="${_XDG_DEPEND}"
|
||||
;;
|
||||
*)
|
||||
IDEPEND="${_XDG_DEPEND}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ${_DEFINE_XDG_SRC_PREPARE}; then
|
||||
# @FUNCTION: xdg_src_prepare
|
||||
# @DESCRIPTION:
|
||||
# Prepare sources to work with XDG standards.
|
||||
# Note that this function is only defined and exported in EAPIs < 8.
|
||||
xdg_src_prepare() {
|
||||
xdg_environment_reset
|
||||
|
||||
[[ ${EAPI:-0} != [45] ]] && default
|
||||
[[ ${EAPI} != 5 ]] && default
|
||||
}
|
||||
fi
|
||||
|
||||
# @FUNCTION: xdg_pkg_preinst
|
||||
# @DESCRIPTION:
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: xorg-3.eclass
|
||||
@ -9,6 +9,7 @@
|
||||
# Author: Donnie Berkholz <dberkholz@gentoo.org>
|
||||
# Author: Matt Turner <mattst88@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 7
|
||||
# @PROVIDES: multilib-minimal
|
||||
# @BLURB: Reduces code duplication in the modularized X11 ebuilds.
|
||||
# @DESCRIPTION:
|
||||
# This eclass makes trivial X ebuilds possible for apps, drivers,
|
||||
@ -24,23 +25,39 @@
|
||||
GIT_ECLASS=""
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
GIT_ECLASS="git-r3"
|
||||
XORG_EAUTORECONF="yes"
|
||||
: ${XORG_EAUTORECONF:="yes"}
|
||||
fi
|
||||
|
||||
# If we're a font package, but not the font.alias one
|
||||
FONT_ECLASS=""
|
||||
if [[ ${CATEGORY} = media-fonts ]]; then
|
||||
case ${PN} in
|
||||
font-alias|font-util)
|
||||
;;
|
||||
font*)
|
||||
# Activate font code in the rest of the eclass
|
||||
FONT="yes"
|
||||
FONT_ECLASS="font"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# @ECLASS-VARIABLE: XORG_MULTILIB
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# If set to 'yes', the multilib support for package will be enabled. Set
|
||||
# before inheriting this eclass.
|
||||
: ${XORG_MULTILIB:="no"}
|
||||
|
||||
# we need to inherit autotools first to get the deps
|
||||
inherit autotools libtool multilib toolchain-funcs flag-o-matic ${GIT_ECLASS}
|
||||
inherit autotools libtool multilib toolchain-funcs flag-o-matic \
|
||||
${FONT_ECLASS} ${GIT_ECLASS}
|
||||
|
||||
if [[ ${XORG_MULTILIB} == yes ]]; then
|
||||
inherit multilib-minimal
|
||||
fi
|
||||
|
||||
EXPORTED_FUNCTIONS="src_prepare src_configure src_unpack src_compile src_install"
|
||||
EXPORTED_FUNCTIONS="src_prepare src_configure src_unpack src_compile src_install pkg_postinst pkg_postrm"
|
||||
case "${EAPI:-0}" in
|
||||
7) ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
@ -52,36 +69,42 @@ EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
|
||||
IUSE=""
|
||||
|
||||
# @ECLASS-VARIABLE: XORG_EAUTORECONF
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# If set to 'yes' and configure.ac exists, eautoreconf will run. Set
|
||||
# before inheriting this eclass.
|
||||
: ${XORG_EAUTORECONF:="no"}
|
||||
|
||||
# @ECLASS-VARIABLE: XORG_BASE_INDIVIDUAL_URI
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# Set up SRC_URI for individual modular releases. If set to an empty
|
||||
# string, no SRC_URI will be provided by the eclass.
|
||||
: ${XORG_BASE_INDIVIDUAL_URI="https://www.x.org/releases/individual"}
|
||||
|
||||
# @ECLASS-VARIABLE: XORG_MODULE
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# The subdirectory to download source from. Possible settings are app,
|
||||
# doc, data, util, driver, lib, proto, xserver. Set above the
|
||||
# doc, data, util, driver, font, lib, proto, xserver. Set above the
|
||||
# inherit to override the default autoconfigured module.
|
||||
: ${XORG_MODULE:="auto"}
|
||||
if [[ ${XORG_MODULE} == auto ]]; then
|
||||
case ${CATEGORY} in
|
||||
app-doc) XORG_MODULE=doc/ ;;
|
||||
x11-apps|x11-wm) XORG_MODULE=app/ ;;
|
||||
x11-misc|x11-themes) XORG_MODULE=util/ ;;
|
||||
x11-base) XORG_MODULE=xserver/ ;;
|
||||
x11-drivers) XORG_MODULE=driver/ ;;
|
||||
x11-libs) XORG_MODULE=lib/ ;;
|
||||
*) XORG_MODULE= ;;
|
||||
case "${CATEGORY}/${P}" in
|
||||
app-doc/*) XORG_MODULE=doc/ ;;
|
||||
media-fonts/*) XORG_MODULE=font/ ;;
|
||||
x11-apps/*|x11-wm/*) XORG_MODULE=app/ ;;
|
||||
x11-misc/*|x11-themes/*) XORG_MODULE=util/ ;;
|
||||
x11-base/*) XORG_MODULE=xserver/ ;;
|
||||
x11-drivers/*) XORG_MODULE=driver/ ;;
|
||||
x11-libs/xcb-util-*) XORG_MODULE=xcb/ ;;
|
||||
x11-libs/*) XORG_MODULE=lib/ ;;
|
||||
*) XORG_MODULE= ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# @ECLASS-VARIABLE: XORG_PACKAGE_NAME
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# For git checkout the git repository might differ from package name.
|
||||
# This variable can be used for proper directory specification
|
||||
@ -89,10 +112,17 @@ fi
|
||||
|
||||
HOMEPAGE="https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}"
|
||||
|
||||
# @ECLASS-VARIABLE: XORG_TARBALL_SUFFIX
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# Most X11 projects provide tarballs as tar.bz2 or tar.xz. This eclass defaults
|
||||
# to bz2.
|
||||
: ${XORG_TARBALL_SUFFIX:="bz2"}
|
||||
|
||||
if [[ -n ${GIT_ECLASS} ]]; then
|
||||
: ${EGIT_REPO_URI:="https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}.git"}
|
||||
elif [[ -n ${XORG_BASE_INDIVIDUAL_URI} ]]; then
|
||||
SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.bz2"
|
||||
SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.${XORG_TARBALL_SUFFIX}"
|
||||
fi
|
||||
|
||||
: ${SLOT:=0}
|
||||
@ -109,44 +139,48 @@ EAUTORECONF_DEPEND+="
|
||||
>=sys-devel/libtool-2.2.6a
|
||||
sys-devel/m4"
|
||||
if [[ ${PN} != util-macros ]] ; then
|
||||
EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.18 >=media-fonts/font-util-1.2.0"
|
||||
EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.18"
|
||||
# Required even by xorg-server
|
||||
[[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0"
|
||||
fi
|
||||
WANT_AUTOCONF="latest"
|
||||
WANT_AUTOMAKE="latest"
|
||||
for arch in ${XORG_EAUTORECONF_ARCHES}; do
|
||||
EAUTORECONF_DEPENDS+=" ${arch}? ( ${EAUTORECONF_DEPEND} )"
|
||||
done
|
||||
DEPEND+=" ${EAUTORECONF_DEPENDS}"
|
||||
unset arch
|
||||
BDEPEND+=" ${EAUTORECONF_DEPENDS}"
|
||||
[[ ${XORG_EAUTORECONF} != no ]] && BDEPEND+=" ${EAUTORECONF_DEPEND}"
|
||||
unset EAUTORECONF_DEPENDS
|
||||
unset EAUTORECONF_DEPEND
|
||||
|
||||
# @ECLASS-VARIABLE: XORG_STATIC
|
||||
# @DESCRIPTION:
|
||||
# Enables static-libs useflag. Set to no, if your package gets:
|
||||
#
|
||||
# QA: configure: WARNING: unrecognized options: --disable-static
|
||||
: ${XORG_STATIC:="yes"}
|
||||
if [[ ${FONT} == yes ]]; then
|
||||
RDEPEND+=" media-fonts/encodings
|
||||
>=x11-apps/mkfontscale-1.2.0"
|
||||
PDEPEND+=" media-fonts/font-alias"
|
||||
DEPEND+=" >=media-fonts/font-util-1.2.0
|
||||
>=x11-apps/mkfontscale-1.2.0"
|
||||
BDEPEND+=" x11-apps/bdftopcf"
|
||||
|
||||
# Add static-libs useflag where useful.
|
||||
if [[ ${XORG_STATIC} == yes \
|
||||
&& ${CATEGORY} != app-doc \
|
||||
&& ${CATEGORY} != x11-apps \
|
||||
&& ${CATEGORY} != x11-drivers \
|
||||
&& ${PN} != util-macros \
|
||||
&& ${PN} != xbitmaps \
|
||||
&& ${PN} != xorg-cf-files \
|
||||
&& ${PN/xcursor} = ${PN} ]]; then
|
||||
IUSE+=" static-libs"
|
||||
fi
|
||||
# @ECLASS-VARIABLE: FONT_DIR
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# If you're creating a font package and the suffix of PN is not equal to
|
||||
# the subdirectory of /usr/share/fonts/ it should install into, set
|
||||
# FONT_DIR to that directory or directories. Set before inheriting this
|
||||
# eclass.
|
||||
[[ -z ${FONT_DIR} ]] && FONT_DIR=${PN##*-}
|
||||
|
||||
if [[ ${XORG_MULTILIB} == yes ]]; then
|
||||
BDEPEND+=" virtual/pkgconfig[${MULTILIB_USEDEP}]"
|
||||
else
|
||||
BDEPEND+=" virtual/pkgconfig"
|
||||
# Fix case of font directories
|
||||
FONT_DIR=${FONT_DIR/ttf/TTF}
|
||||
FONT_DIR=${FONT_DIR/otf/OTF}
|
||||
FONT_DIR=${FONT_DIR/type1/Type1}
|
||||
FONT_DIR=${FONT_DIR/speedo/Speedo}
|
||||
fi
|
||||
BDEPEND+=" virtual/pkgconfig"
|
||||
|
||||
# @ECLASS-VARIABLE: XORG_DRI
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# Possible values are "always" or the value of the useflag DRI capabilities
|
||||
# are required for. Default value is "no"
|
||||
@ -180,6 +214,7 @@ fi
|
||||
|
||||
|
||||
# @ECLASS-VARIABLE: XORG_DOC
|
||||
# @PRE_INHERIT
|
||||
# @DESCRIPTION:
|
||||
# Possible values are "always" or the value of the useflag doc packages
|
||||
# are required for. Default value is "no"
|
||||
@ -219,6 +254,15 @@ debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND=${RDEPEND}"
|
||||
debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: PDEPEND=${PDEPEND}"
|
||||
debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: BDEPEND=${BDEPEND}"
|
||||
|
||||
# @FUNCTION: xorg-3_pkg_setup
|
||||
# @DESCRIPTION:
|
||||
# Setup prefix compat
|
||||
xorg-3_pkg_setup() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
[[ ${FONT} == yes ]] && font_pkg_setup "$@"
|
||||
}
|
||||
|
||||
# @FUNCTION: xorg-3_src_unpack
|
||||
# @DESCRIPTION:
|
||||
# Simply unpack source code.
|
||||
@ -230,6 +274,8 @@ xorg-3_src_unpack() {
|
||||
else
|
||||
unpack ${A}
|
||||
fi
|
||||
|
||||
[[ -n ${FONT} ]] && einfo "Detected font directory: ${FONT_DIR}"
|
||||
}
|
||||
|
||||
# @FUNCTION: xorg-3_reconf_source
|
||||
@ -265,6 +311,26 @@ xorg-3_src_prepare() {
|
||||
xorg-3_reconf_source
|
||||
}
|
||||
|
||||
# @FUNCTION: xorg-3_font_configure
|
||||
# @DESCRIPTION:
|
||||
# If a font package, perform any necessary configuration steps
|
||||
xorg-3_font_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
# Pass --with-fontrootdir to override pkgconf SYSROOT behavior.
|
||||
# https://bugs.gentoo.org/815520
|
||||
if grep -q -s "with-fontrootdir" "${ECONF_SOURCE:-.}"/configure; then
|
||||
FONT_OPTIONS+=( --with-fontrootdir="${EPREFIX}"/usr/share/fonts )
|
||||
fi
|
||||
|
||||
if has nls ${IUSE//+} && ! use nls; then
|
||||
if ! grep -q -s "disable-all-encodings" ${ECONF_SOURCE:-.}/configure; then
|
||||
die "--disable-all-encodings option not available in configure"
|
||||
fi
|
||||
FONT_OPTIONS+=( --disable-all-encodings --enable-iso8859-1 )
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: xorg-3_flags_setup
|
||||
# @DESCRIPTION:
|
||||
# Set up CFLAGS for a debug build
|
||||
@ -303,6 +369,9 @@ xorg-3_src_configure() {
|
||||
# @DEFAULT_UNSET
|
||||
local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}")
|
||||
|
||||
local FONT_OPTIONS=()
|
||||
[[ -n "${FONT}" ]] && xorg-3_font_configure
|
||||
|
||||
# Check if package supports disabling of dep tracking
|
||||
# Fixes warnings like:
|
||||
# WARNING: unrecognized options: --disable-dependency-tracking
|
||||
@ -315,9 +384,16 @@ xorg-3_src_configure() {
|
||||
local selective_werror="--disable-selective-werror"
|
||||
fi
|
||||
|
||||
# Check if package supports disabling of static libraries
|
||||
if grep -q -s "able-static" ${ECONF_SOURCE:-.}/configure; then
|
||||
local no_static="--disable-static"
|
||||
fi
|
||||
|
||||
local econfargs=(
|
||||
${dep_track}
|
||||
${selective_werror}
|
||||
${no_static}
|
||||
"${FONT_OPTIONS[@]}"
|
||||
"${xorgconfadd[@]}"
|
||||
)
|
||||
|
||||
@ -369,6 +445,7 @@ xorg-3_src_install() {
|
||||
multilib-minimal_src_install "$@"
|
||||
else
|
||||
emake DESTDIR="${D}" "${install_args[@]}" "$@" install || die "emake install failed"
|
||||
einstalldocs
|
||||
fi
|
||||
|
||||
# Many X11 libraries unconditionally install developer documentation
|
||||
@ -383,4 +460,81 @@ xorg-3_src_install() {
|
||||
|
||||
# Don't install libtool archives (even for modules)
|
||||
find "${D}" -type f -name '*.la' -delete || die
|
||||
|
||||
[[ -n ${FONT} ]] && remove_font_metadata
|
||||
}
|
||||
|
||||
# @FUNCTION: xorg-3_pkg_postinst
|
||||
# @DESCRIPTION:
|
||||
# Run X-specific post-installation tasks on the live filesystem. The
|
||||
# only task right now is some setup for font packages.
|
||||
xorg-3_pkg_postinst() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
if [[ -n ${FONT} ]]; then
|
||||
create_fonts_scale
|
||||
create_fonts_dir
|
||||
font_pkg_postinst "$@"
|
||||
|
||||
ewarn "Installed fonts changed. Run 'xset fp rehash' if you are using non-fontconfig applications."
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: xorg-3_pkg_postrm
|
||||
# @DESCRIPTION:
|
||||
# Run X-specific post-removal tasks on the live filesystem. The only
|
||||
# task right now is some cleanup for font packages.
|
||||
xorg-3_pkg_postrm() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
if [[ -n ${FONT} ]]; then
|
||||
# if we're doing an upgrade, postinst will do
|
||||
if [[ -z ${REPLACED_BY_VERSION} ]]; then
|
||||
create_fonts_scale
|
||||
create_fonts_dir
|
||||
font_pkg_postrm "$@"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: remove_font_metadata
|
||||
# @DESCRIPTION:
|
||||
# Don't let the package install generated font files that may overlap
|
||||
# with other packages. Instead, they're generated in pkg_postinst().
|
||||
remove_font_metadata() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then
|
||||
einfo "Removing font metadata"
|
||||
rm -rf "${ED}"/usr/share/fonts/${FONT_DIR}/fonts.{scale,dir,cache-1}
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: create_fonts_scale
|
||||
# @DESCRIPTION:
|
||||
# Create fonts.scale file, used by the old server-side fonts subsystem.
|
||||
create_fonts_scale() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then
|
||||
ebegin "Generating fonts.scale"
|
||||
mkfontscale \
|
||||
-a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \
|
||||
-- "${EROOT}/usr/share/fonts/${FONT_DIR}"
|
||||
eend $?
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: create_fonts_dir
|
||||
# @DESCRIPTION:
|
||||
# Create fonts.dir file, used by the old server-side fonts subsystem.
|
||||
create_fonts_dir() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
ebegin "Generating fonts.dir"
|
||||
mkfontdir \
|
||||
-e "${EROOT}"/usr/share/fonts/encodings \
|
||||
-e "${EROOT}"/usr/share/fonts/encodings/large \
|
||||
-- "${EROOT}/usr/share/fonts/${FONT_DIR}"
|
||||
eend $?
|
||||
}
|
||||
|
@ -1,5 +1,2 @@
|
||||
DIST libpng-1.2.59.tar.xz 657424 BLAKE2B a64a8e5c914a20b1f16a219b508b06d12ff28903083792cf07dae841ad13b3636b9d715d9bbfc459a134dfdf2a9b37bac1fbcff14a91c214340325ba8266431e SHA512 bfdc51eca72a76697f1396611a08aa4ce6a169837197699c55d845fdef17850e8f7665b7b81ba815c277453737f12eeb41409ff9c7eca1ac0c0d134c44492a6e
|
||||
DIST libpng-1.5.30-apng.patch.gz 10272 BLAKE2B 335b99e30a476b358483b0ca44d895580bddad05d18ab7f47b4cfa383a04c53c1db7d5773919445c281b0b0921485b946cb67c36db07aad494f051d4db19e4e1 SHA512 1c06e2e1b2420580d4399b7b752df9ed193c81febcc9983351fc72ce3900dc43a433780e7a0184b612b7723d8870a514db7398ec0c081dabe6cb4ea824880236
|
||||
DIST libpng-1.5.30.tar.xz 756992 BLAKE2B 02813c7cf06e61d429fe963ae2c1e68bfb390b8eeea52147f582729b4a86c73055c2c79eb3d0b533587dd5a16dc0abf7afd986794c01ec59ae0a7dfe3333a989 SHA512 8716c6720c1ddbb38f439df42dbb472d37490fd207efe59bd872ce9adec7359025dc84544efddd19c8e339ecc28389a746e6987ff41ac6e76915c1e1d2c6f20d
|
||||
DIST libpng-1.6.37-apng.patch.gz 10334 BLAKE2B 98660f2c13a78c93f937adf2859447cb0e6fa014b2ef6f0571c910593d94cc0a50137d271dbded0b571a3bc0ce4e9f765be48130ee4ae89884fb7292a1b0cf6e SHA512 a9365257a33d67d7e7284494a37747bb1f3ab89f42a1730f2745c604538f59861828dc91d9bc1d08a5b79ab2f4eef1bb9e438dda1774b3548a1c56be77f8435f
|
||||
DIST libpng-1.6.37.tar.xz 1012272 BLAKE2B 48e8f48a88e0db6fcbc0c0f1a4d5bda6e6c8b03255bacdc60e353256ae41ccc01b5b2a7e0e7b0dea236c53a3b9d1dd89d4bb19445afbebc37bf0f92691452424 SHA512 59e8c1059013497ae616a14c3abbe239322d3873c6ded0912403fc62fb260561768230b6ab997e2cccc3b868c09f539fd13635616b9fa0dd6279a3f63ec7e074
|
||||
|
@ -1,41 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
# this ebuild is only for the libpng12.so.0 SONAME for ABI compat
|
||||
|
||||
inherit libtool multilib-minimal
|
||||
|
||||
DESCRIPTION="Portable Network Graphics library"
|
||||
HOMEPAGE="http://www.libpng.org/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
|
||||
|
||||
LICENSE="libpng"
|
||||
SLOT="1.2"
|
||||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
|
||||
!=media-libs/libpng-1.2*:0"
|
||||
DEPEND="${RDEPEND}
|
||||
app-arch/xz-utils"
|
||||
|
||||
DOCS=""
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
elibtoolize
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
ECONF_SOURCE=${S} econf --disable-static
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
emake libpng12.la
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
newlib.so .libs/libpng12.so.0.* libpng12.so.0
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
# this ebuild is only for the libpng15.so.15 SONAME for ABI compat
|
||||
|
||||
inherit eutils libtool multilib-minimal
|
||||
|
||||
DESCRIPTION="Portable Network Graphics library"
|
||||
HOMEPAGE="http://www.libpng.org/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz
|
||||
apng? ( https://dev.gentoo.org/~polynomial-c/${P}-apng.patch.gz )"
|
||||
|
||||
LICENSE="libpng"
|
||||
SLOT="1.5"
|
||||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
|
||||
IUSE="apng neon"
|
||||
|
||||
RDEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
|
||||
!=media-libs/libpng-1.5*:0"
|
||||
DEPEND="${RDEPEND}
|
||||
app-arch/xz-utils"
|
||||
|
||||
DOCS=""
|
||||
|
||||
pkg_setup() {
|
||||
local _preserved_lib=${EROOT}/usr/$(get_libdir)/libpng15.so.15
|
||||
[[ -e ${_preserved_lib} ]] && rm -f "${_preserved_lib}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
if use apng; then
|
||||
# fix windows path in patch file. Please check for each release if this can be removed again.
|
||||
sed 's@scripts\\symbols.def@scripts/symbols.def@' \
|
||||
-i "${WORKDIR}"/${PN}-*-apng.patch || die
|
||||
eapply "${WORKDIR}"/${PN}-*-apng.patch
|
||||
# Don't execute symbols check with apng patch wrt #378111
|
||||
sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
|
||||
fi
|
||||
elibtoolize
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
ECONF_SOURCE="${S}" \
|
||||
econf \
|
||||
--disable-static \
|
||||
--enable-arm-neon=$(usex neon)
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
emake libpng15.la
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
newlib.so .libs/libpng15.so.15.* libpng15.so.15
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
inherit libtool multilib-minimal
|
||||
|
||||
@ -12,12 +12,13 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz
|
||||
|
||||
LICENSE="libpng2"
|
||||
SLOT="0/16"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv 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 ~x86-winnt"
|
||||
IUSE="apng cpu_flags_x86_sse neon static-libs"
|
||||
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 ~x86-winnt"
|
||||
IUSE="apng cpu_flags_arm_neon cpu_flags_x86_sse static-libs"
|
||||
|
||||
RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]"
|
||||
DEPEND="${RDEPEND}
|
||||
app-arch/xz-utils"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
DOCS=( ANNOUNCE CHANGES libpng-manual.txt README TODO )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
@ -31,15 +32,15 @@ src_prepare() {
|
||||
|
||||
multilib_src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_enable cpu_flags_arm_neon arm-neon check)
|
||||
$(use_enable cpu_flags_x86_sse intel-sse)
|
||||
$(use_enable static-libs static)
|
||||
--enable-arm-neon=$(usex neon)
|
||||
)
|
||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
DOCS=( ANNOUNCE CHANGES libpng-manual.txt README TODO )
|
||||
einstalldocs
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
default
|
||||
|
||||
find "${ED}" \( -type f -o -type l \) -name '*.la' -delete || die
|
||||
}
|
@ -1,24 +1,23 @@
|
||||
<?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>base-system@gentoo.org</email>
|
||||
<name>Gentoo Base System</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>codec@gentoo.org</email>
|
||||
<name>Codec project</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="apng">support unofficial APNG (Animated PNG) spec</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:libpng:libpng</remote-id>
|
||||
<remote-id type="sourceforge">apng</remote-id>
|
||||
<remote-id type="github">glennrp/libpng</remote-id>
|
||||
<remote-id type="sourceforge">libpng</remote-id>
|
||||
</upstream>
|
||||
<slots>
|
||||
<slot name="0">For building against. This is the only slot
|
||||
that provides headers and command line tools.</slot>
|
||||
<slot name="1.2">For binary compatibility, provides libpng12.so.0
|
||||
only.</slot>
|
||||
<slot name="1.5">For binary compatibility, provides libpng15.so.15
|
||||
only.</slot>
|
||||
<subslots>Reflect ABI compatibility for libpng.so.</subslots>
|
||||
</slots>
|
||||
</pkgmetadata>
|
||||
|
@ -1,2 +1 @@
|
||||
DIST libssh2-1.8.0.tar.gz 854916 BLAKE2B 618c4a19789f2e5eda85852760dffff5672d420d2fa50393b05b7398a1913f74e5f6695f078628050ac9851965d6e45cf410b7c4590a8f18d67c718c829ab352 SHA512 289aa45c4f99653bebf5f99565fe9c519abc204feb2084b47b7cc3badc8bf4ecdedd49ea6acdce8eb902b3c00995d5f92a3ca77b2508b92f04ae0e7de7287558
|
||||
DIST libssh2-1.8.2.tar.gz 859587 BLAKE2B 58e0854e83001c424a767ceb4ddfb535373320d8319aa632244dc14434276db7c8b7a77d4a5f22fe8e397f1050b33516d2fca1162658a9f414166f560bc1f358 SHA512 390ab4ad93bb738415ec11a6eb92806c9b9e9e5d8ee7c442d841a58b4292c1c447a9bc99e153ba464e2e11f9c0d1913469303598c3046722d1ae821991e8cb93
|
||||
DIST libssh2-1.10.0.tar.gz 965044 BLAKE2B 0e6f571cc723e0050bf7ba7492f361ef222547dcbc311019cb6762f01405b4906e0418207a7d484c5170bee5e6f666827a7ea0d0cf233f684f999f896ce0b415 SHA512 e064ee1089eb8e6cd5fa2617f4fd8ff56c2721c5476775a98bdb68c6c4ee4d05c706c3bb0eb479a27a8ec0b17a8a5ef43e1d028ad3f134519aa582d3981a3a30
|
||||
|
@ -1,30 +0,0 @@
|
||||
--- a/acinclude.m4
|
||||
+++ b/acinclude.m4
|
||||
@@ -412,9 +412,9 @@ AC_DEFUN([LIBSSH2_CHECKFOR_GCRYPT], [
|
||||
|
||||
old_LDFLAGS=$LDFLAGS
|
||||
old_CFLAGS=$CFLAGS
|
||||
- if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then
|
||||
- LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib"
|
||||
- CFLAGS="$CFLAGS -I$use_libgcrypt/include"
|
||||
+ if test -n "$with_libgcrypt_prefix" && test "$use_libgcrypt" != "no"; then
|
||||
+ LDFLAGS="$LDFLAGS -L$with_libgcrypt_prefix/lib"
|
||||
+ CFLAGS="$CFLAGS -I$with_libgcrypt_prefix/include"
|
||||
fi
|
||||
AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [
|
||||
#include <gcrypt.h>
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -14250,9 +14235,9 @@
|
||||
|
||||
old_LDFLAGS=$LDFLAGS
|
||||
old_CFLAGS=$CFLAGS
|
||||
- if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then
|
||||
- LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib"
|
||||
- CFLAGS="$CFLAGS -I$use_libgcrypt/include"
|
||||
+ if test -n "$with_libgcrypt_prefix" && test "$use_libgcrypt" != "no"; then
|
||||
+ LDFLAGS="$LDFLAGS -L$with_libgcrypt_prefix/lib"
|
||||
+ CFLAGS="$CFLAGS -I$with_libgcrypt_prefix/include"
|
||||
fi
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
From 97518ca8bda91ce12c503197a98fa71690cb67f9 Mon Sep 17 00:00:00 2001
|
||||
From: Will Cosgrove <will@panic.com>
|
||||
Date: Fri, 12 May 2017 16:34:26 -0700
|
||||
Subject: [PATCH] Fix memory leak of crypt_ctx->h using openSSL 1.1+ (#177)
|
||||
|
||||
Need to use EVP_CIPHER_CTX_free instead of EVP_CIPHER_CTX_reset.
|
||||
---
|
||||
src/openssl.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/openssl.h b/src/openssl.h
|
||||
index 6aa12192..2bd80b96 100644
|
||||
--- a/src/openssl.h
|
||||
+++ b/src/openssl.h
|
||||
@@ -267,7 +267,7 @@ int _libssh2_md5_init(libssh2_md5_ctx *ctx);
|
||||
#define _libssh2_cipher_3des EVP_des_ede3_cbc
|
||||
|
||||
#ifdef HAVE_OPAQUE_STRUCTS
|
||||
-#define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_reset(*(ctx))
|
||||
+#define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_free(*(ctx))
|
||||
#else
|
||||
#define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_cleanup(ctx)
|
||||
#endif
|
@ -1,70 +0,0 @@
|
||||
From c423b543ca45d6caca7b94763bf65ff79d07e811 Mon Sep 17 00:00:00 2001
|
||||
From: Marcel Raad <MarcelRaad@users.noreply.github.com>
|
||||
Date: Wed, 24 May 2017 19:21:22 +0200
|
||||
Subject: [PATCH] openssl: fix build with OpenSSL 1.1 API (#176)
|
||||
|
||||
When building with OPENSSL_API_COMPAT=0x10100000L, OpenSSL_add_all_algorithms
|
||||
and OpenSSL_add_all_ciphers don't exist. The corresponding functionality is
|
||||
handled automatically with OpenSSL 1.1.
|
||||
---
|
||||
src/openssl.c | 4 ++++
|
||||
src/openssl.h | 6 ++++++
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/src/openssl.c b/src/openssl.c
|
||||
index f10f2921..25cef082 100644
|
||||
--- a/src/openssl.c
|
||||
+++ b/src/openssl.c
|
||||
@@ -1056,6 +1056,7 @@ _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session,
|
||||
"Unable to extract public key from private key "
|
||||
"file: Unable to open private key file");
|
||||
}
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
if (!EVP_get_cipherbyname("des")) {
|
||||
/* If this cipher isn't loaded it's a pretty good indication that none
|
||||
* are. I have *NO DOUBT* that there's a better way to deal with this
|
||||
@@ -1064,6 +1065,7 @@ _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session,
|
||||
*/
|
||||
OpenSSL_add_all_ciphers();
|
||||
}
|
||||
+#endif
|
||||
BIO_reset(bp);
|
||||
pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase);
|
||||
BIO_free(bp);
|
||||
@@ -1132,6 +1134,7 @@ _libssh2_pub_priv_keyfilememory(LIBSSH2_SESSION *session,
|
||||
if (!bp) {
|
||||
return -1;
|
||||
}
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
if (!EVP_get_cipherbyname("des")) {
|
||||
/* If this cipher isn't loaded it's a pretty good indication that none
|
||||
* are. I have *NO DOUBT* that there's a better way to deal with this
|
||||
@@ -1140,6 +1143,7 @@ _libssh2_pub_priv_keyfilememory(LIBSSH2_SESSION *session,
|
||||
*/
|
||||
OpenSSL_add_all_ciphers();
|
||||
}
|
||||
+#endif
|
||||
BIO_reset(bp);
|
||||
pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase);
|
||||
BIO_free(bp);
|
||||
diff --git a/src/openssl.h b/src/openssl.h
|
||||
index 2bd80b96..d8874286 100644
|
||||
--- a/src/openssl.h
|
||||
+++ b/src/openssl.h
|
||||
@@ -226,10 +226,16 @@ int _libssh2_md5_init(libssh2_md5_ctx *ctx);
|
||||
#define libssh2_hmac_cleanup(ctx) HMAC_cleanup(ctx)
|
||||
#endif
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+#define libssh2_crypto_init() \
|
||||
+ ENGINE_load_builtin_engines(); \
|
||||
+ ENGINE_register_all_complete()
|
||||
+#else
|
||||
#define libssh2_crypto_init() \
|
||||
OpenSSL_add_all_algorithms(); \
|
||||
ENGINE_load_builtin_engines(); \
|
||||
ENGINE_register_all_complete()
|
||||
+#endif
|
||||
|
||||
#define libssh2_crypto_exit()
|
||||
|
@ -1,27 +1,28 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
CMAKE_ECLASS=cmake
|
||||
inherit cmake-multilib
|
||||
|
||||
DESCRIPTION="Library implementing the SSH2 protocol"
|
||||
HOMEPAGE="https://www.libssh2.org"
|
||||
SRC_URI="https://www.${PN}.org/download/${P}.tar.gz"
|
||||
SRC_URI="https://www.libssh2.org/download/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
|
||||
IUSE="gcrypt libressl mbedtls zlib"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
|
||||
IUSE="gcrypt mbedtls zlib"
|
||||
REQUIRED_USE="?? ( gcrypt mbedtls )"
|
||||
# Tests try to set containers up using docker (and fail for some reason).
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
|
||||
!gcrypt? (
|
||||
mbedtls? ( net-libs/mbedtls[${MULTILIB_USEDEP}] )
|
||||
mbedtls? ( net-libs/mbedtls:0=[${MULTILIB_USEDEP}] )
|
||||
!mbedtls? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
|
||||
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
|
||||
>=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
)
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
|
||||
@ -30,13 +31,6 @@ DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch
|
||||
"${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch
|
||||
"${FILESDIR}"/${PN}-1.8.0-openssl11-memleak.patch
|
||||
"${FILESDIR}"/${PN}-1.8.0-openssl11.patch
|
||||
)
|
||||
|
||||
multilib_src_configure() {
|
||||
local crypto_backend=OpenSSL
|
||||
if use gcrypt; then
|
||||
@ -50,12 +44,10 @@ multilib_src_configure() {
|
||||
-DCRYPTO_BACKEND=${crypto_backend}
|
||||
-DENABLE_ZLIB_COMPRESSION=$(usex zlib)
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
mv "${ED}"/usr/share/doc/${PN}/* "${ED}"/usr/share/doc/${PF}/ || die
|
||||
rm -r "${ED}"/usr/share/doc/${PN}/ || die
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit multilib-minimal
|
||||
|
||||
DESCRIPTION="Library implementing the SSH2 protocol"
|
||||
HOMEPAGE="https://www.libssh2.org"
|
||||
SRC_URI="https://www.${PN}.org/download/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
|
||||
IUSE="gcrypt libressl static-libs test zlib"
|
||||
|
||||
RDEPEND="
|
||||
!gcrypt? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
|
||||
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch
|
||||
"${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch
|
||||
"${FILESDIR}"/${PN}-1.8.0-openssl11.patch
|
||||
"${FILESDIR}"/${PN}-1.8.0-openssl11-memleak.patch
|
||||
)
|
||||
|
||||
multilib_src_configure() {
|
||||
# Disable tests that require extra permissions (bug #333319)
|
||||
use test && local -x ac_cv_path_SSHD=
|
||||
|
||||
ECONF_SOURCE=${S} econf \
|
||||
$(use_with zlib libz) \
|
||||
$(usex gcrypt --with-libgcrypt --with-openssl) \
|
||||
$(use_enable static-libs static)
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
find "${D}" -name '*.la' -delete || die
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit cmake-multilib
|
||||
|
||||
DESCRIPTION="Library implementing the SSH2 protocol"
|
||||
HOMEPAGE="https://www.libssh2.org"
|
||||
SRC_URI="https://www.${PN}.org/download/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
|
||||
IUSE="gcrypt libressl mbedtls zlib"
|
||||
REQUIRED_USE="?? ( gcrypt mbedtls )"
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
|
||||
!gcrypt? (
|
||||
mbedtls? ( net-libs/mbedtls[${MULTILIB_USEDEP}] )
|
||||
!mbedtls? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
|
||||
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
)
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch
|
||||
"${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch
|
||||
"${FILESDIR}"/${PN}-1.8.0-openssl11-memleak.patch
|
||||
"${FILESDIR}"/${PN}-1.8.0-openssl11.patch
|
||||
)
|
||||
|
||||
multilib_src_configure() {
|
||||
local crypto_backend=OpenSSL
|
||||
if use gcrypt; then
|
||||
crypto_backend=Libgcrypt
|
||||
elif use mbedtls; then
|
||||
crypto_backend=mbedTLS
|
||||
fi
|
||||
|
||||
local mycmakeargs=(
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DCRYPTO_BACKEND=${crypto_backend}
|
||||
-DENABLE_ZLIB_COMPRESSION=$(usex zlib)
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
mv "${ED}"/usr/share/doc/${PN}/* "${ED}"/usr/share/doc/${PF}/ || die
|
||||
rm -r "${ED}"/usr/share/doc/${PN}/ || die
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
CMAKE_ECLASS=cmake
|
||||
inherit git-r3 cmake-multilib
|
||||
|
||||
DESCRIPTION="Library implementing the SSH2 protocol"
|
||||
@ -11,17 +12,16 @@ EGIT_REPO_URI="https://github.com/libssh2/libssh2"
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE="gcrypt libressl mbedtls zlib"
|
||||
IUSE="gcrypt mbedtls zlib"
|
||||
REQUIRED_USE="?? ( gcrypt mbedtls )"
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
|
||||
!gcrypt? (
|
||||
mbedtls? ( net-libs/mbedtls[${MULTILIB_USEDEP}] )
|
||||
mbedtls? ( net-libs/mbedtls:0=[${MULTILIB_USEDEP}] )
|
||||
!mbedtls? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
|
||||
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
|
||||
>=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
)
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
|
||||
@ -47,12 +47,10 @@ multilib_src_configure() {
|
||||
-DCRYPTO_BACKEND=${crypto_backend}
|
||||
-DENABLE_ZLIB_COMPRESSION=$(usex zlib)
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
mv "${ED}"/usr/share/doc/${PN}/* "${ED}"/usr/share/doc/${PF}/ || die
|
||||
rm -r "${ED}"/usr/share/doc/${PN}/ || die
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?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>netmon@gentoo.org</email>
|
||||
@ -10,7 +10,6 @@
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> instead of <pkg>dev-libs/openssl</pkg></flag>
|
||||
<flag name="libressl">Use <pkg>dev-libs/libressl</pkg> instead of <pkg>dev-libs/openssl</pkg></flag>
|
||||
<flag name="mbedtls">Use <pkg>net-libs/mbedtls</pkg> instead of <pkg>dev-libs/openssl</pkg></flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
@ -1,2 +1,2 @@
|
||||
DIST m4-1.4.17.tar.xz 1149088 BLAKE2B ccba6a1cd80de241bc2e755addbf4876b00ab776e0a3c85691998e3e84e8a091d57d8c3e9b43a115e52e416450de791662a54ca8e64e1603a166029164f140ce SHA512 406e6e97c3f5c5f3c8055bac748d4fe8c2e861d97e84ab6d840a2caa7df04f523cc662d6d51f6afae7d6c219d03693c7ae0c1e669a80246a3ceb5e8342b82389
|
||||
DIST m4-1.4.18.tar.xz 1207688 BLAKE2B debfaa4d25af6f583e2cd703e77b73775790f48f34e878eddd820c6b244a065c69495473ce5067be1f20ca07b2d6af9f90cffd33e12c18fd719c0d234eb5462a SHA512 06f583efc3855cd8477d8347544f4ae5153a3e50aea74d21968afa7214784ea3ddfc02d0a2b11324120d76a19f2e804d20de11a456b5da929eb6ae469519b174
|
||||
DIST m4-1.4.19-test-198-sysval-r1.patch.gz 6292 BLAKE2B 62f52c8bb75e7b8f11e487906f1ce47069ea6d3095fd6532aa6b47bcd8109b7cd733fde26915d449a1cfc326f27f5ed83ba29a5a80687b8b9bdb73c8d87e96b8 SHA512 c3e7d4c1631e401c6b5477c22fd5de837188acf9d72551b116c665a927d1799b1fb249e90c9fb4f6f2f328ee84b2e4dd0bf54f684139997c19ee5b69a3e9284d
|
||||
DIST m4-1.4.19.tar.xz 1654908 BLAKE2B 08694485a49c542761fa9a7db4d7609f4dfb08a5c6b785b57f2e14cf1f696c2a1c788bb5eb934e8159a632b63ff071dfe42511d0109d7b1828f46d33c8bf416a SHA512 47f595845c89709727bda0b3fc78e3188ef78ec818965b395532e7041cabe9e49677ee4aca3d042930095a7f8df81de3da1026b23b6897be471f6cf13ddd512b
|
||||
|
@ -1,111 +0,0 @@
|
||||
This fixes the search for posix_spawn() to use AC_SEARCH_LIBS which
|
||||
is needed for uClibc which puts the function in librt [1]. The fix
|
||||
is in gnulib commit d6eab2e [2], but we can't just apply that patch
|
||||
and autoreconf because that means we must depend on autotools.eclass
|
||||
and this leads to a circular dependency. So we have to patch
|
||||
configure directlly.
|
||||
|
||||
[1] https://bugs.gentoo.org/show_bug.cgi?id=580688
|
||||
[2] http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=d6eab2e70fc5ccc82a73e5c988b76a229e4cd3d5
|
||||
[3] https://bugs.gentoo.org/show_bug.cgi?id=581086
|
||||
|
||||
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
||||
|
||||
diff -Naur m4-1.4.17.orig/configure m4-1.4.17/configure
|
||||
--- m4-1.4.17.orig/configure 2013-09-22 06:38:28.000000000 +0000
|
||||
+++ m4-1.4.17/configure 2016-04-25 22:27:12.774118561 +0000
|
||||
@@ -808,6 +808,7 @@
|
||||
GNULIB_SIGNAL_H_SIGPIPE
|
||||
GNULIB_RAISE
|
||||
GNULIB_PTHREAD_SIGMASK
|
||||
+LIB_POSIX_SPAWN
|
||||
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
|
||||
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
|
||||
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
|
||||
@@ -3590,7 +3591,6 @@
|
||||
as_fn_append ac_func_list " mkstemp"
|
||||
as_fn_append ac_func_list " nl_langinfo"
|
||||
as_fn_append ac_func_list " pipe2"
|
||||
-as_fn_append ac_func_list " posix_spawn"
|
||||
gl_printf_safe=yes
|
||||
as_fn_append ac_func_list " isblank"
|
||||
as_fn_append ac_func_list " iswctype"
|
||||
@@ -15877,8 +15881,78 @@
|
||||
|
||||
|
||||
|
||||
+ LIB_POSIX_SPAWN=
|
||||
+
|
||||
+ gl_saved_libs=$LIBS
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5
|
||||
+$as_echo_n "checking for library containing posix_spawn... " >&6; }
|
||||
+if ${ac_cv_search_posix_spawn+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ ac_func_search_save_LIBS=$LIBS
|
||||
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
+/* Override any GCC internal prototype to avoid an error.
|
||||
+ Use char because int might match the return type of a GCC
|
||||
+ builtin and then its argument prototype would still apply. */
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+#endif
|
||||
+char posix_spawn ();
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+return posix_spawn ();
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+for ac_lib in '' rt; do
|
||||
+ if test -z "$ac_lib"; then
|
||||
+ ac_res="none required"
|
||||
+ else
|
||||
+ ac_res=-l$ac_lib
|
||||
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||
+ fi
|
||||
+ if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ ac_cv_search_posix_spawn=$ac_res
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext
|
||||
+ if ${ac_cv_search_posix_spawn+:} false; then :
|
||||
+ break
|
||||
+fi
|
||||
+done
|
||||
+if ${ac_cv_search_posix_spawn+:} false; then :
|
||||
+
|
||||
+else
|
||||
+ ac_cv_search_posix_spawn=no
|
||||
+fi
|
||||
+rm conftest.$ac_ext
|
||||
+LIBS=$ac_func_search_save_LIBS
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5
|
||||
+$as_echo "$ac_cv_search_posix_spawn" >&6; }
|
||||
+ac_res=$ac_cv_search_posix_spawn
|
||||
+if test "$ac_res" != no; then :
|
||||
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
+ test "$ac_cv_search_posix_spawn" = "none required" ||
|
||||
+ LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn
|
||||
+fi
|
||||
+
|
||||
+ for ac_func in posix_spawn
|
||||
+do :
|
||||
+ ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
|
||||
+if test "x$ac_cv_func_posix_spawn" = xyes; then :
|
||||
+ cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_POSIX_SPAWN 1
|
||||
+_ACEOF
|
||||
|
||||
+fi
|
||||
+done
|
||||
|
||||
+ LIBS=$gl_saved_libs
|
||||
|
||||
if test $ac_cv_func_posix_spawn != yes; then
|
||||
HAVE_POSIX_SPAWN=0
|
@ -1,30 +0,0 @@
|
||||
http://lists.gnu.org/archive/html/bug-gnulib/2017-07/txtmumXtpD69v.txt
|
||||
|
||||
extract of only the relevant hunk to avoid irrelevant conflicts
|
||||
|
||||
From c41f233c4c38e84023a16339782ee306f03e7f59 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <address@hidden>
|
||||
Date: Fri, 7 Jul 2017 14:10:20 -0700
|
||||
Subject: [PATCH] vasnprintf: port to macOS 10.13
|
||||
|
||||
Problem reported by comex in:
|
||||
http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00056.html
|
||||
* lib/vasnprintf.c (VASNPRINTF): Donât use %n on macOS.
|
||||
|
||||
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
|
||||
index 9c2af0e..fecaf27 100644
|
||||
--- a/lib/vasnprintf.c
|
||||
+++ b/lib/vasnprintf.c
|
||||
@@ -4869,7 +4869,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
|
||||
#endif
|
||||
*fbp = dp->conversion;
|
||||
#if USE_SNPRINTF
|
||||
-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
|
||||
+# if ! (((__GLIBC__ > 2 \
|
||||
+ || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
|
||||
+ && !defined __UCLIBC__) \
|
||||
+ || (defined __APPLE__ && defined __MACH__) \
|
||||
+ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
|
||||
fbp[1] = '%';
|
||||
fbp[2] = 'n';
|
||||
fbp[3] = '\0';
|
@ -1,310 +0,0 @@
|
||||
Fix build failure on glibc-2.28:
|
||||
fseeko.c: In function 'rpl_fseeko':
|
||||
fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
|
||||
#error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
|
||||
|
||||
Patch by milan hodoscek.
|
||||
|
||||
https://bugs.gentoo.org/663924
|
||||
--- a/old/stdio-impl.h
|
||||
+++ b/lib/stdio-impl.h
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Implementation details of FILE streams.
|
||||
- Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2007-2008, 2010-2018 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -12,12 +12,18 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Many stdio implementations have the same logic and therefore can share
|
||||
the same implementation of stdio extension API, except that some fields
|
||||
have different naming conventions, or their access requires some casts. */
|
||||
|
||||
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
|
||||
+ problem by defining it ourselves. FIXME: Do not rely on glibc
|
||||
+ internals. */
|
||||
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
|
||||
+# define _IO_IN_BACKUP 0x100
|
||||
+#endif
|
||||
|
||||
/* BSD stdio derived implementations. */
|
||||
|
||||
@@ -29,10 +35,10 @@
|
||||
#include <errno.h> /* For detecting Plan9. */
|
||||
|
||||
#if defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
||||
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
|
||||
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
|
||||
|
||||
# if defined __DragonFly__ /* DragonFly */
|
||||
- /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
|
||||
+ /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/lib/libc/stdio/priv_stdio.h>. */
|
||||
# define fp_ ((struct { struct __FILE_public pub; \
|
||||
struct { unsigned char *_base; int _size; } _bf; \
|
||||
void *cookie; \
|
||||
@@ -49,30 +55,84 @@
|
||||
fpos_t _offset; \
|
||||
/* More fields, not relevant here. */ \
|
||||
} *) fp)
|
||||
- /* See <http://www.dragonflybsd.org/cvsweb/src/include/stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
|
||||
+ /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/include/stdio.h>. */
|
||||
# define _p pub._p
|
||||
# define _flags pub._flags
|
||||
# define _r pub._r
|
||||
# define _w pub._w
|
||||
+# elif defined __ANDROID__ /* Android */
|
||||
+ /* Up to this commit from 2015-10-12
|
||||
+ <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a>
|
||||
+ the innards of FILE were public, and fp_ub could be defined like for OpenBSD,
|
||||
+ see <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/fileext.h>
|
||||
+ and <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/local.h>.
|
||||
+ After this commit, the innards of FILE are hidden. */
|
||||
+# define fp_ ((struct { unsigned char *_p; \
|
||||
+ int _r; \
|
||||
+ int _w; \
|
||||
+ int _flags; \
|
||||
+ int _file; \
|
||||
+ struct { unsigned char *_base; size_t _size; } _bf; \
|
||||
+ int _lbfsize; \
|
||||
+ void *_cookie; \
|
||||
+ void *_close; \
|
||||
+ void *_read; \
|
||||
+ void *_seek; \
|
||||
+ void *_write; \
|
||||
+ struct { unsigned char *_base; size_t _size; } _ext; \
|
||||
+ unsigned char *_up; \
|
||||
+ int _ur; \
|
||||
+ unsigned char _ubuf[3]; \
|
||||
+ unsigned char _nbuf[1]; \
|
||||
+ struct { unsigned char *_base; size_t _size; } _lb; \
|
||||
+ int _blksize; \
|
||||
+ fpos_t _offset; \
|
||||
+ /* More fields, not relevant here. */ \
|
||||
+ } *) fp)
|
||||
# else
|
||||
# define fp_ fp
|
||||
# endif
|
||||
|
||||
-# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Android */
|
||||
+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix /* NetBSD >= 1.5ZA, OpenBSD, Minix 3 */
|
||||
/* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
|
||||
- and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
|
||||
+ and <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
|
||||
+ and <https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/master/lib/libc/stdio/fileext.h> */
|
||||
struct __sfileext
|
||||
{
|
||||
struct __sbuf _ub; /* ungetc buffer */
|
||||
/* More fields, not relevant here. */
|
||||
};
|
||||
# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
|
||||
-# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin, Android */
|
||||
+# elif defined __ANDROID__ /* Android */
|
||||
+ struct __sfileext
|
||||
+ {
|
||||
+ struct { unsigned char *_base; size_t _size; } _ub; /* ungetc buffer */
|
||||
+ /* More fields, not relevant here. */
|
||||
+ };
|
||||
+# define fp_ub ((struct __sfileext *) fp_->_ext._base)->_ub
|
||||
+# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */
|
||||
# define fp_ub fp_->_ub
|
||||
# endif
|
||||
|
||||
# define HASUB(fp) (fp_ub._base != NULL)
|
||||
|
||||
+# if defined __ANDROID__ /* Android */
|
||||
+ /* Needed after this commit from 2016-01-25
|
||||
+ <https://android.googlesource.com/platform/bionic.git/+/e70e0e9267d069bf56a5078c99307e08a7280de7> */
|
||||
+# ifndef __SEOF
|
||||
+# define __SLBF 1
|
||||
+# define __SNBF 2
|
||||
+# define __SRD 4
|
||||
+# define __SWR 8
|
||||
+# define __SRW 0x10
|
||||
+# define __SEOF 0x20
|
||||
+# define __SERR 0x40
|
||||
+# endif
|
||||
+# ifndef __SOFF
|
||||
+# define __SOFF 0x1000
|
||||
+# endif
|
||||
+# endif
|
||||
+
|
||||
#endif
|
||||
|
||||
|
||||
@@ -81,7 +141,7 @@
|
||||
#ifdef __TANDEM /* NonStop Kernel */
|
||||
# ifndef _IOERR
|
||||
/* These values were determined by the program 'stdioext-flags' at
|
||||
- <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */
|
||||
+ <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>. */
|
||||
# define _IOERR 0x40
|
||||
# define _IOREAD 0x80
|
||||
# define _IOWRT 0x4
|
||||
@@ -99,6 +159,8 @@
|
||||
int _file; \
|
||||
unsigned int _flag; \
|
||||
} *) fp)
|
||||
+# elif defined __VMS /* OpenVMS */
|
||||
+# define fp_ ((struct _iobuf *) fp)
|
||||
# else
|
||||
# define fp_ fp
|
||||
# endif
|
||||
@@ -110,7 +172,7 @@
|
||||
# define _flag __flag
|
||||
# endif
|
||||
|
||||
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */
|
||||
+#elif defined _WIN32 && ! defined __CYGWIN__ /* newer Windows with MSVC */
|
||||
|
||||
/* <stdio.h> does not define the innards of FILE any more. */
|
||||
# define WINDOWS_OPAQUE_FILE
|
||||
@@ -130,7 +192,7 @@ struct _gl_real_FILE
|
||||
# define fp_ ((struct _gl_real_FILE *) fp)
|
||||
|
||||
/* These values were determined by a program similar to the one at
|
||||
- <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */
|
||||
+ <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>. */
|
||||
# define _IOREAD 0x1
|
||||
# define _IOWRT 0x2
|
||||
# define _IORW 0x4
|
||||
--- a/old/fseeko.c
|
||||
+++ b/lib/fseeko.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* An fseeko() function that, together with fflush(), is POSIX compliant.
|
||||
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
- with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -33,9 +33,9 @@ fseeko (FILE *fp, off_t offset, int whence)
|
||||
#endif
|
||||
#if _GL_WINDOWS_64_BIT_OFF_T
|
||||
# undef fseeko
|
||||
-# if HAVE__FSEEKI64 /* msvc, mingw64 */
|
||||
+# if HAVE__FSEEKI64 && HAVE_DECL__FSEEKI64 /* msvc, mingw since msvcrt8.0, mingw64 */
|
||||
# define fseeko _fseeki64
|
||||
-# else /* mingw */
|
||||
+# else /* mingw before msvcrt8.0 */
|
||||
# define fseeko fseeko64
|
||||
# endif
|
||||
#endif
|
||||
@@ -47,12 +47,13 @@ fseeko (FILE *fp, off_t offset, int whence)
|
||||
#endif
|
||||
|
||||
/* These tests are based on fpurge.c. */
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
|
||||
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
if (fp->_IO_read_end == fp->_IO_read_ptr
|
||||
&& fp->_IO_write_ptr == fp->_IO_write_base
|
||||
&& fp->_IO_save_base == NULL)
|
||||
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
||||
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
|
||||
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
|
||||
# if defined __SL64 && defined __SCLE /* Cygwin */
|
||||
if ((fp->_flags & __SL64) == 0)
|
||||
{
|
||||
@@ -80,7 +81,7 @@ fseeko (FILE *fp, off_t offset, int whence)
|
||||
#elif defined __minix /* Minix */
|
||||
if (fp_->_ptr == fp_->_buf
|
||||
&& (fp_->_ptr == NULL || fp_->_count == 0))
|
||||
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
|
||||
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
|
||||
if (fp_->_ptr == fp_->_base
|
||||
&& (fp_->_ptr == NULL || fp_->_cnt == 0))
|
||||
#elif defined __UCLIBC__ /* uClibc */
|
||||
@@ -117,18 +118,19 @@ fseeko (FILE *fp, off_t offset, int whence)
|
||||
if (pos == -1)
|
||||
{
|
||||
#if defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
||||
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
|
||||
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
|
||||
fp_->_flags &= ~__SOFF;
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
|
||||
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
fp->_flags &= ~_IO_EOF_SEEN;
|
||||
fp->_offset = pos;
|
||||
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
||||
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
|
||||
-# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000)
|
||||
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
|
||||
+# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) || defined __minix
|
||||
/* fp_->_offset is typed as an integer. */
|
||||
fp_->_offset = pos;
|
||||
# else
|
||||
@@ -150,7 +152,7 @@ fseeko (FILE *fp, off_t offset, int whence)
|
||||
fp_->_flags &= ~__SEOF;
|
||||
#elif defined __EMX__ /* emx+gcc */
|
||||
fp->_flags &= ~_IOEOF;
|
||||
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
|
||||
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
|
||||
fp_->_flag &= ~_IOEOF;
|
||||
#elif defined __MINT__ /* Atari FreeMiNT */
|
||||
fp->__offset = pos;
|
||||
--- a/old/freadahead.c
|
||||
+++ b/lib/freadahead.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Retrieve information about a FILE stream.
|
||||
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -22,17 +22,26 @@
|
||||
#include <stdlib.h>
|
||||
#include "stdio-impl.h"
|
||||
|
||||
+#if defined __DragonFly__
|
||||
+/* Defined in libc, but not declared in <stdio.h>. */
|
||||
+extern size_t __sreadahead (FILE *);
|
||||
+#endif
|
||||
+
|
||||
+/* This file is not used on systems that have the __freadahead function,
|
||||
+ namely musl libc. */
|
||||
+
|
||||
size_t
|
||||
freadahead (FILE *fp)
|
||||
{
|
||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
|
||||
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
if (fp->_IO_write_ptr > fp->_IO_write_base)
|
||||
return 0;
|
||||
return (fp->_IO_read_end - fp->_IO_read_ptr)
|
||||
+ (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base :
|
||||
0);
|
||||
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
||||
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
|
||||
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
|
||||
if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
|
||||
return 0;
|
||||
# if defined __DragonFly__
|
18
sdk_container/src/third_party/portage-stable/sys-devel/m4/files/ppc-musl.patch
vendored
Normal file
18
sdk_container/src/third_party/portage-stable/sys-devel/m4/files/ppc-musl.patch
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
Needed to fix build on ppc + musl. Doesn't seem to yet be in upstream gnulib.
|
||||
|
||||
https://www.openwall.com/lists/musl/2017/11/05/2
|
||||
https://github.com/void-linux/void-packages/blob/master/srcpkgs/grep/patches/ppc-musl.patch
|
||||
--- a/lib/sigsegv.c
|
||||
+++ b/lib/sigsegv.c
|
||||
@@ -221,8 +221,10 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
|
||||
/* both should be equivalent */
|
||||
# if 0
|
||||
# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1]
|
||||
-# else
|
||||
+# elif defined(__GLIBC__)
|
||||
# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
|
||||
+# else
|
||||
+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[1]
|
||||
# endif
|
||||
# endif
|
||||
|
@ -1,54 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="GNU macro processor"
|
||||
HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
|
||||
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="examples"
|
||||
|
||||
# remember: cannot dep on autoconf since it needs us
|
||||
DEPEND="app-arch/xz-utils"
|
||||
RDEPEND=""
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${P}-posix_spawn.patch #580688, 581086
|
||||
|
||||
# Disable gnulib build test that has no impact on the source.
|
||||
# Re-enable w/next version bump (and gnulib is updated). #554728
|
||||
[[ ${PV} != "1.4.17" ]] && die "re-enable test #554728"
|
||||
echo 'exit 0' > tests/test-update-copyright.sh || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Disable automagic dependency over libsigsegv; see bug #278026
|
||||
export ac_cv_libsigsegv=no
|
||||
|
||||
local myconf=""
|
||||
[[ ${USERLAND} != "GNU" ]] && myconf="--program-prefix=g"
|
||||
econf --enable-changeword ${myconf}
|
||||
}
|
||||
|
||||
src_test() {
|
||||
[[ -d /none ]] && die "m4 tests will fail with /none/" #244396
|
||||
emake check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
# autoconf-2.60 for instance, first checks gm4, then m4. If we don't have
|
||||
# gm4, it might find gm4 from outside the prefix on for instance Darwin
|
||||
use prefix && dosym /usr/bin/m4 /usr/bin/gm4
|
||||
if use examples ; then
|
||||
docinto examples
|
||||
dodoc examples/*
|
||||
rm -f "${ED}"/usr/share/doc/${PF}/examples/Makefile*
|
||||
fi
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
DESCRIPTION="GNU macro processor"
|
||||
HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
|
||||
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv 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"
|
||||
IUSE="examples"
|
||||
|
||||
# remember: cannot dep on autoconf since it needs us
|
||||
DEPEND="app-arch/xz-utils"
|
||||
RDEPEND=""
|
||||
|
||||
src_prepare() {
|
||||
eapply "${FILESDIR}"/${P}-darwin17-printf-n.patch
|
||||
eapply "${FILESDIR}"/${P}-glibc228.patch #663924
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Disable automagic dependency over libsigsegv; see bug #278026
|
||||
export ac_cv_libsigsegv=no
|
||||
|
||||
local myconf=""
|
||||
[[ ${USERLAND} != "GNU" ]] && myconf="--program-prefix=g"
|
||||
econf --enable-changeword ${myconf}
|
||||
}
|
||||
|
||||
src_test() {
|
||||
[[ -d /none ]] && die "m4 tests will fail with /none/" #244396
|
||||
emake check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
# autoconf-2.60 for instance, first checks gm4, then m4. If we don't have
|
||||
# gm4, it might find gm4 from outside the prefix on for instance Darwin
|
||||
use prefix && dosym /usr/bin/m4 /usr/bin/gm4
|
||||
if use examples ; then
|
||||
docinto examples
|
||||
dodoc -r examples/
|
||||
rm -f "${ED}"/usr/share/doc/${PF}/examples/Makefile*
|
||||
fi
|
||||
}
|
74
sdk_container/src/third_party/portage-stable/sys-devel/m4/m4-1.4.19.ebuild
vendored
Normal file
74
sdk_container/src/third_party/portage-stable/sys-devel/m4/m4-1.4.19.ebuild
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="GNU macro processor"
|
||||
HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
|
||||
if [[ "${PV}" == *_beta* ]] ; then
|
||||
MY_P="${PN}-1.4.18d"
|
||||
#SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz"
|
||||
SRC_URI="https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
else
|
||||
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
|
||||
SRC_URI+=" https://dev.gentoo.org/~floppym/dist/${P}-test-198-sysval-r1.patch.gz"
|
||||
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-3"
|
||||
SLOT="0"
|
||||
IUSE="examples nls"
|
||||
|
||||
RDEPEND="
|
||||
virtual/libiconv
|
||||
nls? (
|
||||
sys-devel/gettext
|
||||
virtual/libintl
|
||||
)"
|
||||
DEPEND="${RDEPEND}"
|
||||
# Remember: cannot dep on autoconf since it needs us
|
||||
BDEPEND="app-arch/xz-utils
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/ppc-musl.patch
|
||||
"${WORKDIR}"/${P}-test-198-sysval-r1.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local -a myeconfargs=(
|
||||
--enable-changeword
|
||||
|
||||
--with-packager="Gentoo Linux"
|
||||
--with-packager-version="${PVR}"
|
||||
--with-packager-bug-reports="https://bugs.gentoo.org/"
|
||||
|
||||
$(usex nls '' '--disable-nls')
|
||||
|
||||
# Disable automagic dependency over libsigsegv; see bug #278026
|
||||
ac_cv_libsigsegv=no
|
||||
)
|
||||
|
||||
[[ ${USERLAND} != GNU ]] && myeconfargs+=( --program-prefix=g )
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
[[ -d /none ]] && die "m4 tests will fail with /none/" #244396
|
||||
emake check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
# autoconf-2.60 for instance, first checks gm4, then m4. If we don't have
|
||||
# gm4, it might find gm4 from outside the prefix on for instance Darwin
|
||||
use prefix && dosym m4 /usr/bin/gm4
|
||||
|
||||
if use examples ; then
|
||||
dodoc -r examples
|
||||
rm -f "${ED}"/usr/share/doc/${PF}/examples/Makefile*
|
||||
fi
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<?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>base-system@gentoo.org</email>
|
||||
|
@ -1,5 +1,6 @@
|
||||
http://git.savannah.gnu.org/cgit/patch.git/commit/?id=f6bc5b14bd193859851d15a049bafb1007acd288
|
||||
http://git.savannah.gnu.org/cgit/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c228c70b49db72e5
|
||||
https://git.savannah.gnu.org/cgit/patch.git/commit/?id=f6bc5b14bd193859851d15a049bafb1007acd288
|
||||
https://git.savannah.gnu.org/cgit/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c228c70b49db72e5
|
||||
https://git.savannah.gnu.org/cgit/patch.git/commit/?id=7623b2dc0d1837ecfd58f32efc78e35834deeb38
|
||||
|
||||
--- a/tests/crlf-handling
|
||||
+++ b/tests/crlf-handling
|
||||
@ -117,4 +118,16 @@ http://git.savannah.gnu.org/cgit/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c2
|
||||
while test $# -gt 0 ; do
|
||||
echo "$1"
|
||||
shift
|
||||
--
|
||||
|
||||
--- a/tests/test-lib.sh
|
||||
+++ b/tests/test-lib.sh
|
||||
@@ -113,7 +113,7 @@ cleanup() {
|
||||
exit $status
|
||||
}
|
||||
|
||||
-if eval 'test -n "${BASH_LINENO[0]}" 2>/dev/null'; then
|
||||
+if ( eval 'test -n "${BASH_LINENO[0]}"' 2>/dev/null ); then
|
||||
eval '
|
||||
_start_test() {
|
||||
printf "[${BASH_LINENO[2]}] %s -- " "$*"
|
||||
|
||||
|
@ -1,8 +1,11 @@
|
||||
<?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>base-system@gentoo.org</email>
|
||||
<name>Gentoo Base System</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:gnu:patch</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
@ -1,40 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit flag-o-matic
|
||||
|
||||
DESCRIPTION="Utility to apply diffs to files"
|
||||
HOMEPAGE="https://www.gnu.org/software/patch/patch.html"
|
||||
SRC_URI="mirror://gnu/patch/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv 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"
|
||||
IUSE="static test xattr"
|
||||
|
||||
RDEPEND="xattr? ( sys-apps/attr )"
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( sys-apps/ed )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-fix-test-suite.patch
|
||||
"${FILESDIR}"/${PN}-2.7.6-fix-error-handling-with-git-style-patches.patch
|
||||
"${FILESDIR}"/${PN}-2.7.6-CVE-2018-6951.patch
|
||||
"${FILESDIR}"/${PN}-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch
|
||||
"${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156.patch
|
||||
"${FILESDIR}"/${PN}-2.7.6-CVE-2018-6952.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
use static && append-ldflags -static
|
||||
|
||||
local myeconfargs=(
|
||||
$(use_enable xattr)
|
||||
--program-prefix="$(use userland_BSD && echo g)"
|
||||
)
|
||||
# Do not let $ED mess up the search for `ed` 470210.
|
||||
ac_cv_path_ED=$(type -P ed) \
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
@ -11,8 +11,9 @@ SRC_URI="mirror://gnu/patch/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 ~arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv ~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"
|
||||
IUSE="static test xattr"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="xattr? ( sys-apps/attr )"
|
||||
DEPEND="${RDEPEND}
|
||||
@ -38,7 +39,6 @@ src_configure() {
|
||||
|
||||
local myeconfargs=(
|
||||
$(use_enable xattr)
|
||||
--program-prefix="$(use userland_BSD && echo g)"
|
||||
)
|
||||
# Do not let $ED mess up the search for `ed` 470210.
|
||||
ac_cv_path_ED=$(type -P ed) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user