Merge pull request #366 from flatcar/krnowak/update-and-fill

Refresh recently updated packages and add them to packages-list
This commit is contained in:
Krzesimir Nowak 2022-10-04 10:19:48 +02:00 committed by GitHub
commit d4bd5610d4
146 changed files with 5104 additions and 8959 deletions

View File

@ -1,3 +1,91 @@
# Please keep the list sorted! # Please keep the list sorted!
app-arch/bzip2
app-arch/unzip
app-crypt/adcli
app-portage/portage-utils
dev-lang/duktape
dev-lang/perl
dev-libs/boost
dev-libs/cyrus-sasl
dev-libs/expat dev-libs/expat
dev-libs/glib
dev-libs/gobject-introspection
dev-libs/gobject-introspection-common
dev-libs/libltdl
dev-libs/libpcre2
dev-libs/libtasn1
dev-libs/libxml2
dev-libs/libxslt
dev-libs/oniguruma
dev-util/boost-build
dev-util/gdbus-codegen
dev-util/glib-utils
dev-util/pkgconf
dev-vcs/git
eclass/alternatives.eclass
eclass/autotools.eclass
eclass/flag-o-matic.eclass
eclass/git-r3.eclass
eclass/gnuconfig.eclass
eclass/java-pkg-opt-2.eclass
eclass/java-utils-2.eclass
eclass/libtool.eclass
eclass/multilib-build.eclass
eclass/multilib-minimal.eclass
eclass/multilib.eclass
eclass/pax-utils.eclass
eclass/prefix.eclass
eclass/tmpfiles.eclass
eclass/toolchain-funcs.eclass
eclass/toolchain.eclass
eclass/verify-sig.eclass
eclass/vim-doc.eclass
eclass/vim-plugin.eclass
net-analyzer/nmap
net-fs/cifs-utils
net-libs/gnutls
net-misc/curl
net-misc/rsync
sys-apps/gentoo-functions
sys-apps/help2man
sys-devel/autoconf
sys-devel/autoconf-archive
sys-devel/autoconf-wrapper
sys-devel/automake
sys-devel/automake-wrapper
sys-devel/bc
sys-devel/binutils
sys-devel/binutils-config
sys-devel/bison
sys-devel/crossdev
sys-devel/flex
sys-devel/gcc
sys-devel/gcc-config
sys-devel/gettext
sys-devel/gnuconfig
sys-devel/libtool
sys-devel/m4
sys-devel/patch
sys-firmware/intel-microcode
sys-libs/binutils-libs
sys-libs/zlib
virtual/libcrypt
virtual/pkgconfig
virtual/yacc

View File

@ -9,10 +9,6 @@ EAPI=7
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bzip2.gpg VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bzip2.gpg
inherit toolchain-funcs multilib-minimal usr-ldscript verify-sig inherit toolchain-funcs multilib-minimal usr-ldscript verify-sig
if [[ ${PVR} != 1.0.8-r1 ]]; then
die "Please remove libbz2.so.1.0 logic from multilib_src_install"
fi
DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux" DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
HOMEPAGE="https://sourceware.org/bzip2/" HOMEPAGE="https://sourceware.org/bzip2/"
SRC_URI="https://sourceware.org/pub/${PN}/${P}.tar.gz" SRC_URI="https://sourceware.org/pub/${PN}/${P}.tar.gz"
@ -24,6 +20,8 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv
IUSE="static static-libs" IUSE="static static-libs"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-bzip2 )" BDEPEND="verify-sig? ( sec-keys/openpgp-keys-bzip2 )"
RDEPEND="!app-arch/lbzip2[symlink(-)]
!app-arch/pbzip2[symlink(-)]"
PATCHES=( PATCHES=(
"${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
@ -85,13 +83,6 @@ multilib_src_install() {
dosym libbz2.so.${PV} /usr/$(get_libdir)/${v} dosym libbz2.so.${PV} /usr/$(get_libdir)/${v}
done done
# Install libbz2.so.1.0 due to accidental soname change in 1.0.7.
# Reference: 98da0ad82192d21ad74ae52366ea8466e2acea24.
# OK to remove one year after 2020-04-11.
if [[ ! -L "${ED}/usr/$(get_libdir)/libbz2.so.1.0" ]]; then
dosym libbz2.so.${PV} "/usr/$(get_libdir)/libbz2.so.1.0"
fi
use static-libs && dolib.a libbz2.a use static-libs && dolib.a libbz2.a
if multilib_is_native_abi ; then if multilib_is_native_abi ; then

View File

@ -1,24 +1,29 @@
# Copyright 1999-2021 Gentoo Authors # Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=7 EAPI=8
inherit meson-multilib usr-ldscript inherit meson-multilib usr-ldscript
DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux" DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
HOMEPAGE="https://gitlab.com/federicomenaquintero/bzip2" HOMEPAGE="https://gitlab.com/bzip2/bzip2"
if [[ "${PV}" == 9999 ]] ; then if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://gitlab.com/bzip2/bzip2"
inherit git-r3 inherit git-r3
EGIT_REPO_URI="https://gitlab.com/federicomenaquintero/bzip2.git"
else else
SRC_URI=""
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi fi
LICENSE="BZIP2" LICENSE="BZIP2"
SLOT="0/1" # subslot = SONAME SLOT="0/1" # subslot = SONAME
IUSE="static-libs" IUSE="static-libs"
RDEPEND="
!app-arch/lbzip2[symlink(-)]
!app-arch/pbzip2[symlink(-)]
"
multilib_src_configure() { multilib_src_configure() {
local emesonargs=( local emesonargs=(
-Ddefault_library=$(usex static-libs both shared) -Ddefault_library=$(usex static-libs both shared)
@ -32,13 +37,6 @@ multilib_src_configure() {
multilib_src_install() { multilib_src_install() {
meson_src_install meson_src_install
# Install libbz2.so.1.0 due to accidental soname change in 1.0.7.
# Reference: 98da0ad82192d21ad74ae52366ea8466e2acea24.
# OK to remove one year after 2020-04-11.
if [[ ! -L "${ED}/usr/$(get_libdir)/libbz2.so.1.0" ]]; then
dosym libbz2.so.1 "/usr/$(get_libdir)/libbz2.so.1.0"
fi
if multilib_is_native_abi ; then if multilib_is_native_abi ; then
gen_usr_ldscript -a bz2 gen_usr_ldscript -a bz2
@ -48,7 +46,7 @@ multilib_src_install() {
} }
multilib_src_install_all() { multilib_src_install_all() {
# move "important" bzip2 binaries to /bin and use the shared libbz2.so # Move "important" bzip2 binaries to /bin and use the shared libbz2.so
dosym bzip2 /bin/bzcat dosym bzip2 /bin/bzcat
dosym bzip2 /bin/bunzip2 dosym bzip2 /bin/bunzip2

View File

@ -9,7 +9,4 @@
<email>proxy-maint@gentoo.org</email> <email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name> <name>Proxy Maintainers</name>
</maintainer> </maintainer>
<upstream>
<remote-id type="gitlab">https://gitlab.freedesktop.org/realmd/adcli</remote-id>
</upstream>
</pkgmetadata> </pkgmetadata>

View File

@ -1,5 +1,2 @@
DIST portage-utils-0.90.1.tar.xz 1779252 BLAKE2B 27c94694cab84970c0c92e835b9039d9420fbfa20f9f2e03f4f53d118df4dc243cddce33994095a3e41bd1027a42c9c29cda65cb7cf4f45279a028b21555f4f8 SHA512 67290a69ad6ac40da3ce0f41d2630096690e69bb97a1428af921ccc582dcfbf903bbf98259f68afdbe9e96aef81672ea3352a9266a649e75f99acec7fa00cd8a
DIST portage-utils-0.90.tar.xz 1776636 BLAKE2B bbacc05aa97c77705ae4fbdb5efde5f1d49a99ac8ed259e026c9a997f43a86551b3a10a397e0c5f1da161d2c0d88afe88e22870705ca39d911c4a98ad13f4928 SHA512 2077061dd7dfd444d4ad38faf5a87aa44392d7747f71d7283b5e2775ce3d714773cd642ea085aea3dd34a715f2c446d42fd64ba42fa99e716e8d843aae3d9682
DIST portage-utils-0.92.tar.xz 1819676 BLAKE2B 01798e3984745140bca1bcc1eda5c2aea7c517bee2656acfe1bd810fc8088ddcb474f2c64fee6832c5e1699e2ec8ad5a9c6d5afba8a2e2b6f1861d49fbf7fcb7 SHA512 7d36263c9c242c8e82786fa12e171a3f396f65520acb8caa91516862615bd71241699ab6c2232122f7009875aa0a10b06b614a842d45afc86e599b39711e12b3
DIST portage-utils-0.93.3.tar.xz 1796828 BLAKE2B cfad7ab27ff2d92f631f4e31012e8903c5fa6113485f727338812059379cdd4a9552d80dc3aef6bb91264c361c0554fe9054a12347e274c4c5c3db66fd36008b SHA512 c1245aa78d236263cd266fc8565312c2ac30cb992037a7b0f26da04ecf2dfeebc85bff653784e186cf2c7d7468e4772fb0bd93bcdb3a37d46e493d000933e5a1
DIST portage-utils-0.94.1.tar.xz 1871688 BLAKE2B bec5ddd514b397c157c3b1bff70d61730f15804a6751f56eb69c4030a35fc6a6b11fa1e2bde94332772660f02bf9428623210733ae9e2f1290f29aa3b31a1813 SHA512 29fdb4093997eb95703d407da6b00305c949f0a00ae3aa5cfb2c47b66bddc59e034fae114663b40b611f906332066b648018aa4e5bc1b935e61a64f4b4bf1088 DIST portage-utils-0.94.1.tar.xz 1871688 BLAKE2B bec5ddd514b397c157c3b1bff70d61730f15804a6751f56eb69c4030a35fc6a6b11fa1e2bde94332772660f02bf9428623210733ae9e2f1290f29aa3b31a1813 SHA512 29fdb4093997eb95703d407da6b00305c949f0a00ae3aa5cfb2c47b66bddc59e034fae114663b40b611f906332066b648018aa4e5bc1b935e61a64f4b4bf1088
DIST portage-utils-0.94.3.tar.xz 1804720 BLAKE2B b0239a26d878db6dd73c9ee54f586526f8812921775126ef74afbe089186fdc5ca7197847e204c6ecbf9d79b6e2a6173cb0c39d4a26653ed0db2d7f9b10e88c5 SHA512 bf8fcccc26bb985bf7664f6ab0227a5251c3f918199de0c4e4c95b7107eb72eee367d1d524b5d9608b3c7eea9b1fae789456390cbb0d375297b807bb98644e01

View File

@ -1,67 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
DESCRIPTION="Small and fast Portage helper tools written in C"
HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
LICENSE="GPL-2"
SLOT="0"
IUSE="nls static openmp +qmanifest +qtegrity"
if [[ ${PV} == *9999 ]]; then
inherit git-r3 autotools
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
KEYWORDS="hppa ppc sparc x86"
fi
RDEPEND="
qmanifest? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
app-crypt/libb2:=[static-libs]
dev-libs/openssl:0=[static-libs]
sys-libs/zlib:=[static-libs]
app-crypt/gpgme:=[static-libs]
)
!static? (
app-crypt/libb2:=
dev-libs/openssl:0=
sys-libs/zlib:=
app-crypt/gpgme:=
)
)
qtegrity? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
dev-libs/openssl:0=[static-libs]
)
!static? (
dev-libs/openssl:0=
)
)
"
DEPEND="${RDEPEND}"
src_configure() {
econf \
--disable-maintainer-mode \
--with-eprefix="${EPREFIX}" \
$(use_enable qmanifest) \
$(use_enable qtegrity) \
$(use_enable openmp) \
$(use_enable static)
}

View File

@ -1,67 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
DESCRIPTION="Small and fast Portage helper tools written in C"
HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
LICENSE="GPL-2"
SLOT="0"
IUSE="nls static openmp +qmanifest +qtegrity"
if [[ ${PV} == *9999 ]]; then
inherit git-r3 autotools
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
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
RDEPEND="
qmanifest? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
app-crypt/libb2:=[static-libs]
dev-libs/openssl:0=[static-libs]
sys-libs/zlib:=[static-libs]
app-crypt/gpgme:=[static-libs]
)
!static? (
app-crypt/libb2:=
dev-libs/openssl:0=
sys-libs/zlib:=
app-crypt/gpgme:=
)
)
qtegrity? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
dev-libs/openssl:0=[static-libs]
)
!static? (
dev-libs/openssl:0=
)
)
"
DEPEND="${RDEPEND}"
src_configure() {
econf \
--disable-maintainer-mode \
--with-eprefix="${EPREFIX}" \
$(use_enable qmanifest) \
$(use_enable qtegrity) \
$(use_enable openmp) \
$(use_enable static)
}

View File

@ -1,67 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
DESCRIPTION="Small and fast Portage helper tools written in C"
HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
LICENSE="GPL-2"
SLOT="0"
IUSE="nls static openmp +qmanifest +qtegrity"
if [[ ${PV} == *9999 ]]; then
inherit git-r3 autotools
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
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
RDEPEND="
qmanifest? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
app-crypt/libb2:=[static-libs]
dev-libs/openssl:0=[static-libs]
sys-libs/zlib:=[static-libs]
app-crypt/gpgme:=[static-libs]
)
!static? (
app-crypt/libb2:=
dev-libs/openssl:0=
sys-libs/zlib:=
app-crypt/gpgme:=
)
)
qtegrity? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
dev-libs/openssl:0=[static-libs]
)
!static? (
dev-libs/openssl:0=
)
)
"
DEPEND="${RDEPEND}"
src_configure() {
econf \
--disable-maintainer-mode \
--with-eprefix="${EPREFIX}" \
$(use_enable qmanifest) \
$(use_enable qtegrity) \
$(use_enable openmp) \
$(use_enable static)
}

View File

@ -1,67 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Small and fast Portage helper tools written in C"
HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
LICENSE="GPL-2"
SLOT="0"
IUSE="nls static openmp +qmanifest +qtegrity"
if [[ ${PV} == *9999 ]]; then
inherit git-r3 autotools
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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
RDEPEND="
qmanifest? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
app-crypt/libb2:=[static-libs]
dev-libs/openssl:0=[static-libs]
sys-libs/zlib:=[static-libs]
app-crypt/gpgme:=[static-libs]
)
!static? (
app-crypt/libb2:=
dev-libs/openssl:0=
sys-libs/zlib:=
app-crypt/gpgme:=
)
)
qtegrity? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
dev-libs/openssl:0=[static-libs]
)
!static? (
dev-libs/openssl:0=
)
)
"
DEPEND="${RDEPEND}"
src_configure() {
econf \
--disable-maintainer-mode \
--with-eprefix="${EPREFIX}" \
$(use_enable qmanifest) \
$(use_enable qtegrity) \
$(use_enable openmp) \
$(use_enable static)
}

View File

@ -15,7 +15,7 @@ if [[ ${PV} == *9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git" EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz" SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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 fi
RDEPEND=" RDEPEND="

View File

@ -0,0 +1,75 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic toolchain-funcs
DESCRIPTION="Small and fast Portage helper tools written in C"
HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
if [[ ${PV} == *9999 ]]; then
inherit git-r3 autotools
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
SLOT="0"
IUSE="openmp +qmanifest +qtegrity static"
RDEPEND="
qmanifest? (
!static? (
app-crypt/gpgme:=
app-crypt/libb2:=
dev-libs/openssl:=
sys-libs/zlib:=
)
)
qtegrity? (
!static? (
dev-libs/openssl:=
)
)"
DEPEND="${RDEPEND}
qmanifest? (
static? (
app-crypt/gpgme[static-libs]
app-crypt/libb2[static-libs]
dev-libs/openssl[static-libs]
sys-libs/zlib[static-libs]
)
)
qtegrity? (
static? (
dev-libs/openssl[static-libs]
)
)"
BDEPEND="virtual/pkgconfig"
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
src_prepare() {
default
[[ ${PV} == *9999 ]] && eautoreconf
}
src_configure() {
use static && append-ldflags -static
econf \
--disable-maintainer-mode \
--with-eprefix="${EPREFIX}" \
$(use_enable qmanifest) \
$(use_enable qtegrity) \
$(use_enable openmp)
}

View File

@ -1,15 +1,13 @@
# Copyright 1999-2022 Gentoo Authors # Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=7 EAPI=8
inherit flag-o-matic toolchain-funcs
DESCRIPTION="Small and fast Portage helper tools written in C" DESCRIPTION="Small and fast Portage helper tools written in C"
HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils" HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
LICENSE="GPL-2"
SLOT="0"
IUSE="nls static openmp +qmanifest +qtegrity"
if [[ ${PV} == *9999 ]]; then if [[ ${PV} == *9999 ]]; then
inherit git-r3 autotools inherit git-r3 autotools
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git" EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
@ -18,50 +16,60 @@ else
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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 fi
LICENSE="GPL-2"
SLOT="0"
IUSE="openmp +qmanifest +qtegrity static"
RDEPEND=" RDEPEND="
qmanifest? ( qmanifest? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
app-crypt/libb2:=[static-libs]
dev-libs/openssl:0=[static-libs]
sys-libs/zlib:=[static-libs]
app-crypt/gpgme:=[static-libs]
)
!static? ( !static? (
app-crypt/libb2:=
dev-libs/openssl:0=
sys-libs/zlib:=
app-crypt/gpgme:= app-crypt/gpgme:=
app-crypt/libb2:=
dev-libs/openssl:=
sys-libs/zlib:=
) )
) )
qtegrity? ( qtegrity? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
dev-libs/openssl:0=[static-libs]
)
!static? ( !static? (
dev-libs/openssl:0= dev-libs/openssl:=
)
)"
DEPEND="${RDEPEND}
qmanifest? (
static? (
app-crypt/gpgme[static-libs]
app-crypt/libb2[static-libs]
dev-libs/openssl[static-libs]
sys-libs/zlib[static-libs]
) )
) )
" qtegrity? (
DEPEND="${RDEPEND}" static? (
dev-libs/openssl[static-libs]
)
)"
BDEPEND="virtual/pkgconfig"
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
src_prepare() {
default
[[ ${PV} == *9999 ]] && eautoreconf
}
src_configure() { src_configure() {
use static && append-ldflags -static
econf \ econf \
--disable-maintainer-mode \ --disable-maintainer-mode \
--with-eprefix="${EPREFIX}" \ --with-eprefix="${EPREFIX}" \
$(use_enable qmanifest) \ $(use_enable qmanifest) \
$(use_enable qtegrity) \ $(use_enable qtegrity) \
$(use_enable openmp) \ $(use_enable openmp)
$(use_enable static)
} }

View File

@ -0,0 +1 @@
- git ([2.37.3](https://github.com/git/git/blob/v2.37.3/Documentation/RelNotes/2.37.3.txt))

View File

@ -17,6 +17,7 @@ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc
PATCHES=( PATCHES=(
"${FILESDIR}"/${PN}-2.7.0-respect-tc-env.patch "${FILESDIR}"/${PN}-2.7.0-respect-tc-env.patch
"${FILESDIR}"/${P}-underlinked-libm.patch
) )
src_prepare() { src_prepare() {
@ -26,11 +27,11 @@ src_prepare() {
} }
src_compile() { src_compile() {
emake CC="$(tc-getCC)" emake CC="$(tc-getCC)" INSTALL_PREFIX="${EPREFIX}"/usr LIBDIR="/$(get_libdir)"
} }
src_install() { src_install() {
dodir /usr/$(get_libdir) dodir /usr/$(get_libdir)
dodir /usr/include dodir /usr/include
emake INSTALL_PREFIX="${ED}"/usr LIBDIR="/$(get_libdir)" install emake DESTDIR="${D}" INSTALL_PREFIX="${EPREFIX}"/usr LIBDIR="/$(get_libdir)" install
} }

View File

@ -0,0 +1,25 @@
https://github.com/svaarala/duktape/commit/d898ad3920cb08d6918d11d9678bae28393a82d1
https://bugs.gentoo.org/870163
From d898ad3920cb08d6918d11d9678bae28393a82d1 Mon Sep 17 00:00:00 2001 (rebased)
From: tinywrkb <tinywrkb@gmail.com>
Date: Thu, 17 Mar 2022 03:55:51 +0200
Subject: [PATCH] Makefile.sharedlibrary: link against libm
Closes #2464.
--- a/Makefile.sharedlibrary
+++ b/Makefile.sharedlibrary
@@ -71,11 +71,11 @@ all: libduktape.$(SO_REALNAME_SUFFIX) libduktaped.$(SO_REALNAME_SUFFIX) duktape.
libduktape.$(SO_REALNAME_SUFFIX):
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC -Wall -Wextra -Wl,$(LD_SONAME_ARG),libduktape.$(SO_SONAME_SUFFIX) \
- -o $@ $(DUKTAPE_SRCDIR)/duktape.c
+ -o $@ $(DUKTAPE_SRCDIR)/duktape.c -lm
libduktaped.$(SO_REALNAME_SUFFIX):
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC -Wall -Wextra -Wl,$(LD_SONAME_ARG),libduktaped.$(SO_SONAME_SUFFIX) \
- -o $@ $(DUKTAPE_SRCDIR)/duktape.c
+ -o $@ $(DUKTAPE_SRCDIR)/duktape.c -lm
duktape.pc:
sed -e "s|@PREFIX@|$(INSTALL_PREFIX)|" \

View File

@ -1 +1,2 @@
DIST boost_1_79_0.tar.bz2 113456811 BLAKE2B 61f47ca022e60745868e6bdd3b5c75603dd68d878e126dcbb73de5b40fc03c0eec8eede3ec304ece58050435ef2fc1ed7eb763773c20673f85e32bbf4d5f978a SHA512 70909e0561c213d10a1fdd692f9ae7b293d3cdc63e925bdc207da9e9bba6e86474341100e7ee5de6d94f9561196b1a3a1597055a7b7382babf8931131170a312 DIST boost_1_79_0.tar.bz2 113456811 BLAKE2B 61f47ca022e60745868e6bdd3b5c75603dd68d878e126dcbb73de5b40fc03c0eec8eede3ec304ece58050435ef2fc1ed7eb763773c20673f85e32bbf4d5f978a SHA512 70909e0561c213d10a1fdd692f9ae7b293d3cdc63e925bdc207da9e9bba6e86474341100e7ee5de6d94f9561196b1a3a1597055a7b7382babf8931131170a312
DIST boost_1_80_0.tar.bz2 115869904 BLAKE2B 507e811be7659442c41bc2d99811bd02a236dc94932e1a7a8cf256243b479f2d2707819cd99e016a51c9dadc215713e803afdd9ea4c105af8d5d2d28d3d06a1f SHA512 829a95b463473d69ff79ea41799c68429bb79d3b2321fbdb71df079af237ab01de9ad7e9612d8783d925730acada010068d2d1aa856c34244ee5c0ece16f208f

View File

@ -0,0 +1,341 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
inherit flag-o-matic multiprocessing python-r1 toolchain-funcs multilib-minimal
MY_PV="$(ver_rs 1- _)"
DESCRIPTION="Boost Libraries for C++"
HOMEPAGE="https://www.boost.org/"
SRC_URI="https://boostorg.jfrog.io/artifactory/main/release/${PV}/source/boost_${MY_PV}.tar.bz2"
S="${WORKDIR}/${PN}_${MY_PV}"
LICENSE="Boost-1.0"
SLOT="0/${PV}" # ${PV} instead of the major version due to bug 486122
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="bzip2 context debug doc icu lzma +nls mpi numpy python tools zlib zstd"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
# the tests will never fail because these are not intended as sanity
# tests at all. They are more a way for upstream to check their own code
# on new compilers. Since they would either be completely unreliable
# (failing for no good reason) or completely useless (never failing)
# there is no point in having them in the ebuild to begin with.
RESTRICT="test"
RDEPEND="
!<dev-libs/leatherman-1.12.0-r1
bzip2? ( app-arch/bzip2:=[${MULTILIB_USEDEP}] )
icu? ( >=dev-libs/icu-3.6:=[${MULTILIB_USEDEP}] )
!icu? ( virtual/libiconv[${MULTILIB_USEDEP}] )
lzma? ( app-arch/xz-utils:=[${MULTILIB_USEDEP}] )
mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP},cxx,threads] )
python? (
${PYTHON_DEPS}
numpy? ( dev-python/numpy[${PYTHON_USEDEP}] )
)
zlib? ( sys-libs/zlib:=[${MULTILIB_USEDEP}] )
zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )"
DEPEND="${RDEPEND}"
BDEPEND=">=dev-util/b2-4.9.2"
PATCHES=(
"${FILESDIR}"/${PN}-1.80.0-disable_icu_rpath.patch
"${FILESDIR}"/${PN}-1.79.0-context-x32.patch
"${FILESDIR}"/${PN}-1.79.0-build-auto_index-tool.patch
# Boost.MPI's __init__.py doesn't work on Py3
"${FILESDIR}"/${PN}-1.79.0-boost-mpi-python-PEP-328.patch
"${FILESDIR}"/${PN}-1.80.0-fix-mips1-transition.patch
# (upstreamed)
"${FILESDIR}"/${PN}-1.80.0-unordered-fix.patch
"${FILESDIR}"/${PN}-1.80.0-unary-function.patch
)
python_bindings_needed() {
multilib_is_native_abi && use python
}
tools_needed() {
multilib_is_native_abi && use tools
}
create_user-config.jam() {
local user_config_jam="${BUILD_DIR}"/user-config.jam
if [[ -s ${user_config_jam} ]]; then
einfo "${user_config_jam} already exists, skipping configuration"
return
else
einfo "Creating configuration in ${user_config_jam}"
fi
local compiler compiler_version compiler_executable="$(tc-getCXX)"
if [[ ${CHOST} == *-darwin* ]]; then
compiler="darwin"
compiler_version="$(gcc-fullversion)"
else
compiler="gcc"
compiler_version="$(gcc-version)"
fi
if use mpi; then
local mpi_configuration="using mpi ;"
fi
cat > "${user_config_jam}" <<- __EOF__ || die
using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" <archiver>"$(tc-getAR)" <ranlib>"$(tc-getRANLIB)" ;
${mpi_configuration}
__EOF__
if python_bindings_needed; then
append_to_user_config() {
local py_config
if tc-is-cross-compiler; then
py_config="using python : ${EPYTHON#python} : : ${ESYSROOT}/usr/include/${EPYTHON} : ${ESYSROOT}/usr/$(get_libdir) ;"
else
py_config="using python : ${EPYTHON#python} : ${PYTHON} : $(python_get_includedir) ;"
fi
echo "${py_config}" >> "${user_config_jam}" || die
}
python_foreach_impl append_to_user_config
fi
if python_bindings_needed && use numpy; then
einfo "Enabling support for NumPy extensions in Boost.Python"
else
einfo "Disabling support for NumPy extensions in Boost.Python"
# Boost.Build does not allow for disabling of numpy
# extensions, thereby leading to automagic numpy
# https://github.com/boostorg/python/issues/111#issuecomment-280447482
sed \
-e 's/\[ unless \[ python\.numpy \] : <build>no \]/<build>no/g' \
-i "${BUILD_DIR}"/libs/python/build/Jamfile || die
fi
}
pkg_setup() {
# Bail out on unsupported build configuration, bug #456792
if [[ -f "${EROOT}"/etc/site-config.jam ]]; then
if ! grep -q 'gentoo\(debug\|release\)' "${EROOT}"/etc/site-config.jam; then
eerror "You are using custom ${EROOT}/etc/site-config.jam without defined gentoorelease/gentoodebug targets."
eerror "Boost can not be built in such configuration."
eerror "Please, either remove this file or add targets from ${EROOT}/usr/share/boost-build/site-config.jam to it."
die "Unsupported target in ${EROOT}/etc/site-config.jam"
fi
fi
}
src_prepare() {
default
multilib_copy_sources
}
ejam() {
create_user-config.jam
local b2_opts=( "--user-config=${BUILD_DIR}/user-config.jam" )
if python_bindings_needed; then
append_to_b2_opts() {
b2_opts+=( python="${EPYTHON#python}" )
}
python_foreach_impl append_to_b2_opts
else
b2_opts+=( --without-python )
fi
b2_opts+=( "$@" )
echo b2 "${b2_opts[@]}" >&2
b2 "${b2_opts[@]}"
}
src_configure() {
# Workaround for too many parallel processes requested, bug #506064
[[ "$(makeopts_jobs)" -gt 64 ]] && MAKEOPTS="${MAKEOPTS} -j64"
# We don't want to end up with -L/usr/lib on our linker lines
# which then gives us lots of
# skipping incompatible /usr/lib/libc.a when searching for -lc
# warnings
[[ -n ${ESYSROOT} ]] && local icuarg="-sICU_PATH=${ESYSROOT}/usr"
OPTIONS=(
$(usex debug gentoodebug gentoorelease)
"-j$(makeopts_jobs)"
-q
-d+2
pch=off
$(usex icu "${icuarg}" '--disable-icu boost.locale.icu=off')
$(usev !mpi --without-mpi)
$(usev !nls --without-locale)
$(usev !context '--without-context --without-coroutine --without-fiber')
--without-stacktrace
--boost-build="${BROOT}"/usr/share/b2/src
--layout=system
# building with threading=single is currently not possible
# https://svn.boost.org/trac/boost/ticket/7105
threading=multi
link=shared
# this seems to be the only way to disable compression algorithms
# https://www.boost.org/doc/libs/1_70_0/libs/iostreams/doc/installation.html#boost-build
-sNO_BZIP2=$(usex bzip2 0 1)
-sNO_LZMA=$(usex lzma 0 1)
-sNO_ZLIB=$(usex zlib 0 1)
-sNO_ZSTD=$(usex zstd 0 1)
)
if [[ ${CHOST} == *-darwin* ]]; then
# We need to add the prefix, and in two cases this exceeds, so prepare
# for the largest possible space allocation.
append-ldflags -Wl,-headerpad_max_install_names
fi
# Use C++17 globally as of 1.80
append-cxxflags -std=c++17
}
multilib_src_compile() {
ejam \
--prefix="${EPREFIX}"/usr \
"${OPTIONS[@]}" || die
if tools_needed; then
pushd tools >/dev/null || die
ejam \
--prefix="${EPREFIX}"/usr \
"${OPTIONS[@]}" \
|| die "Building of Boost tools failed"
popd >/dev/null || die
fi
}
multilib_src_install() {
ejam \
--prefix="${ED}"/usr \
--includedir="${ED}"/usr/include \
--libdir="${ED}"/usr/$(get_libdir) \
"${OPTIONS[@]}" install || die "Installation of Boost libraries failed"
if tools_needed; then
dobin dist/bin/*
insinto /usr/share
doins -r dist/share/boostbook
fi
# boost's build system truely sucks for not having a destdir. Because for
# this reason we are forced to build with a prefix that includes the
# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
# DESTROOT instread of the actual EPREFIX. There is no way out of here
# but to do it the dirty way of manually setting the right install_names.
if [[ ${CHOST} == *-darwin* ]]; then
einfo "Working around completely broken build-system(tm)"
local d
for d in "${ED}"/usr/lib/*.dylib; do
if [[ -f ${d} ]]; then
# fix the "soname"
ebegin " correcting install_name of ${d#${ED}}"
install_name_tool -id "/${d#${D}}" "${d}"
eend $?
# fix references to other libs
refs=$(otool -XL "${d}" | \
sed -e '1d' -e 's/^\t//' | \
grep "^libboost_" | \
cut -f1 -d' ')
local r
for r in ${refs}; do
ebegin " correcting reference to ${r}"
install_name_tool -change \
"${r}" \
"${EPREFIX}/usr/lib/${r}" \
"${d}"
eend $?
done
fi
done
fi
}
multilib_src_install_all() {
if ! use numpy; then
rm -r "${ED}"/usr/include/boost/python/numpy* || die
fi
if use python; then
if use mpi; then
move_mpi_py_into_sitedir() {
python_moduleinto boost
python_domodule "${S}"/libs/mpi/build/__init__.py
python_domodule "${ED}"/usr/$(get_libdir)/boost-${EPYTHON}/mpi.so
rm -r "${ED}"/usr/$(get_libdir)/boost-${EPYTHON} || die
python_optimize
}
python_foreach_impl move_mpi_py_into_sitedir
else
rm -r "${ED}"/usr/include/boost/mpi/python* || die
fi
else
rm -r "${ED}"/usr/include/boost/{python*,mpi/python*,parameter/aux_/python,parameter/python*} || die
fi
if ! use nls; then
rm -r "${ED}"/usr/include/boost/locale || die
fi
if ! use context; then
rm -r "${ED}"/usr/include/boost/context || die
rm -r "${ED}"/usr/include/boost/coroutine{,2} || die
rm "${ED}"/usr/include/boost/asio/spawn.hpp || die
fi
if use doc; then
# find extraneous files that shouldn't be installed
# as part of the documentation and remove them.
find libs/*/* \( -iname 'test' -o -iname 'src' \) -exec rm -rf '{}' + || die
find doc \( -name 'Jamfile.v2' -o -name 'build' -o -name '*.manifest' \) -exec rm -rf '{}' + || die
find tools \( -name 'Jamfile.v2' -o -name 'src' -o -name '*.cpp' -o -name '*.hpp' \) -exec rm -rf '{}' + || die
docinto html
dodoc *.{htm,html,png,css}
dodoc -r doc libs more tools
# To avoid broken links
dodoc LICENSE_1_0.txt
dosym ../../../../include/boost /usr/share/doc/${PF}/html/boost
fi
}
pkg_preinst() {
# Yay for having symlinks that are nigh-impossible to remove without
# resorting to dirty hacks like these. Removes lingering symlinks
# from the slotted versions.
local symlink
for symlink in "${EROOT}"/usr/include/boost "${EROOT}"/usr/share/boostbook; do
if [[ -L ${symlink} ]]; then
rm -f "${symlink}" || die
fi
done
# some ancient installs still have boost cruft lying around
# for unknown reasons, causing havoc for reverse dependencies
# Bug: 607734
rm -rf "${EROOT}"/usr/include/boost-1_[3-5]? || die
}
pkg_postinst() {
elog "Boost.Regex is *extremely* ABI sensitive. If you get errors such as"
elog
elog " undefined reference to \`boost::re_detail_$(ver_cut 1)0$(ver_cut 2)00::cpp_regex_traits_implementation"
elog " <char>::transform_primary[abi:cxx11](char const*, char const*) const'"
elog
elog "Then you need to recompile Boost and all its reverse dependencies"
elog "using the same toolchain. In general, *every* change of the C++ toolchain"
elog "requires a complete rebuild of the Boost-dependent ecosystem."
elog
elog "See for instance https://bugs.gentoo.org/638138"
}

View File

@ -0,0 +1,13 @@
--- a/libs/locale/build/Jamfile.v2
+++ b/libs/locale/build/Jamfile.v2
@@ -82,8 +82,8 @@ ICU_LINK ?= [ modules.peek : ICU_LINK_LOCALE ] ;
if $(ICU_LINK)
{
- ICU_OPTS = <include>$(icu-path)/include <linkflags>$(ICU_LINK) <dll-path>$(icu-path)/bin <runtime-link>shared ;
- ICU64_OPTS = <include>$(icu-path)/include <linkflags>$(ICU_LINK) <dll-path>$(icu-path)/bin64 <runtime-link>shared ;
+ ICU_OPTS = <include>$(icu_path)/include <linkflags>$(ICU_LINK) <runtime-link>shared ;
+ ICU64_OPTS = <include>$(icu_path)/include <linkflags>$(ICU_LINK) <runtime-link>shared ;
} else
{
searched-lib icuuc : : <name>icuuc

View File

@ -0,0 +1,24 @@
--- a/boostcpp.jam
+++ b/boostcpp.jam
@@ -634,7 +634,7 @@ rule address-model ( )
return <conditional>@boostcpp.deduce-address-model ;
}
-local deducable-architectures = arm mips1 power riscv s390x sparc x86 combined ;
+local deducable-architectures = arm mips power riscv s390x sparc x86 combined ;
feature.feature deduced-architecture : $(deducable-architectures) : propagated optional composite hidden ;
for a in $(deducable-architectures)
{
@@ -645,10 +645,10 @@ rule deduce-architecture ( properties * )
{
local result ;
local filtered = [ toolset-properties $(properties) ] ;
- local names = arm mips1 power riscv s390x sparc x86 combined ;
+ local names = arm mips power riscv s390x sparc x86 combined ;
local idx = [ configure.find-builds "default architecture" : $(filtered)
: /boost/architecture//arm
- : /boost/architecture//mips1
+ : /boost/architecture//mips
: /boost/architecture//power
: /boost/architecture//riscv
: /boost/architecture//s390x

View File

@ -0,0 +1,27 @@
https://bugs.gentoo.org/869401
https://github.com/boostorg/config/commit/f0af4a9184457939b89110795ae2d293582c5f66
https://github.com/boostorg/container_hash/issues/24
From: jzmaddock <john@johnmaddock.co.uk>
Date: Mon, 11 Jul 2022 18:26:07 +0100
Subject: [PATCH] The std lib unary/binary_function base classes are
deprecated/removed from libcpp15. Fixes
https://github.com/boostorg/container_hash/issues/24.
--- a/boost/config/stdlib/libcpp.hpp
+++ b/boost/config/stdlib/libcpp.hpp
@@ -168,4 +168,13 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
+#if _LIBCPP_VERSION >= 15000
+//
+// Unary function is now deprecated in C++11 and later:
+//
+#if __cplusplus >= 201103L
+#define BOOST_NO_CXX98_FUNCTION_BASE
+#endif
+#endif
+
// --- end ---

View File

@ -0,0 +1,192 @@
From f9eae4153f4ea9aac4b6c46e660ec92824d5827f Mon Sep 17 00:00:00 2001
From: Christian Mazakas <christian.mazakas@gmail.com>
Date: Tue, 16 Aug 2022 14:34:58 -0700
Subject: [PATCH] Update code to be valid when the internal `buckets_` data
member is moved-from
---
boost/unordered/detail/fca.hpp | 18 +++++--
.../boost/unordered/detail/implementation.hpp | 49 +++++++++++--------
boost/unordered/unordered_map.hpp | 8 +++
boost/unordered/unordered_set.hpp | 8 +++
4 files changed, 58 insertions(+), 25 deletions(-)
diff --git a/boost/unordered/detail/fca.hpp b/boost/unordered/detail/fca.hpp
index 19fafe739..a1d14d957 100644
--- a/boost/unordered/detail/fca.hpp
+++ b/boost/unordered/detail/fca.hpp
@@ -646,7 +646,7 @@ namespace boost {
size_type bucket_count() const { return size_; }
- iterator begin() const { return ++at(size_); }
+ iterator begin() const { return size_ == 0 ? end() : ++at(size_); }
iterator end() const
{
@@ -660,6 +660,10 @@ namespace boost {
local_iterator begin(size_type n) const
{
+ if (size_ == 0) {
+ return this->end(n);
+ }
+
return local_iterator(
(buckets + static_cast<difference_type>(n))->next);
}
@@ -670,12 +674,16 @@ namespace boost {
iterator at(size_type n) const
{
- std::size_t const N = group::N;
+ if (size_ > 0) {
+ std::size_t const N = group::N;
- iterator pbg(buckets + static_cast<difference_type>(n),
- groups + static_cast<difference_type>(n / N));
+ iterator pbg(buckets + static_cast<difference_type>(n),
+ groups + static_cast<difference_type>(n / N));
- return pbg;
+ return pbg;
+ } else {
+ return this->end();
+ }
}
span<Bucket> raw()
diff --git a/boost/unordered/detail/implementation.hpp b/boost/unordered/detail/implementation.hpp
index 2cc27c5d4..373236754 100644
--- a/boost/unordered/detail/implementation.hpp
+++ b/boost/unordered/detail/implementation.hpp
@@ -2054,12 +2054,14 @@ namespace boost {
std::size_t bucket_size(std::size_t index) const
{
- bucket_iterator itb = buckets_.at(index);
- node_pointer n = itb->next;
std::size_t count = 0;
- while (n) {
- ++count;
- n = n->next;
+ if (size_ > 0) {
+ bucket_iterator itb = buckets_.at(index);
+ node_pointer n = itb->next;
+ while (n) {
+ ++count;
+ n = n->next;
+ }
}
return count;
}
@@ -2420,11 +2422,14 @@ namespace boost {
node_pointer find_node_impl(
Key const& x, bucket_iterator itb) const
{
- key_equal const& pred = this->key_eq();
- node_pointer p = itb->next;
- for (; p; p = p->next) {
- if (pred(x, extractor::extract(p->value()))) {
- break;
+ node_pointer p = node_pointer();
+ if (itb != buckets_.end()) {
+ key_equal const& pred = this->key_eq();
+ p = itb->next;
+ for (; p; p = p->next) {
+ if (pred(x, extractor::extract(p->value()))) {
+ break;
+ }
}
}
return p;
@@ -2453,11 +2458,13 @@ namespace boost {
inline iterator transparent_find(
Key const& k, Hash const& h, Pred const& pred) const
{
- std::size_t const key_hash = h(k);
- bucket_iterator itb = buckets_.at(buckets_.position(key_hash));
- for (node_pointer p = itb->next; p; p = p->next) {
- if (BOOST_LIKELY(pred(k, extractor::extract(p->value())))) {
- return iterator(p, itb);
+ if (size_ > 0) {
+ std::size_t const key_hash = h(k);
+ bucket_iterator itb = buckets_.at(buckets_.position(key_hash));
+ for (node_pointer p = itb->next; p; p = p->next) {
+ if (BOOST_LIKELY(pred(k, extractor::extract(p->value())))) {
+ return iterator(p, itb);
+ }
}
}
@@ -2467,11 +2474,13 @@ namespace boost {
template <class Key>
node_pointer* find_prev(Key const& key, bucket_iterator itb)
{
- key_equal pred = this->key_eq();
- for (node_pointer* pp = boost::addressof(itb->next); *pp;
- pp = boost::addressof((*pp)->next)) {
- if (pred(key, extractor::extract((*pp)->value()))) {
- return pp;
+ if (size_ > 0) {
+ key_equal pred = this->key_eq();
+ for (node_pointer* pp = boost::addressof(itb->next); *pp;
+ pp = boost::addressof((*pp)->next)) {
+ if (pred(key, extractor::extract((*pp)->value()))) {
+ return pp;
+ }
}
}
typedef node_pointer* node_pointer_pointer;
diff --git a/boost/unordered/unordered_map.hpp b/boost/unordered/unordered_map.hpp
index 97908fb65..3e25a28a2 100644
--- a/boost/unordered/unordered_map.hpp
+++ b/boost/unordered/unordered_map.hpp
@@ -2069,6 +2069,10 @@ namespace boost {
template <class K, class T, class H, class P, class A>
float unordered_map<K, T, H, P, A>::load_factor() const BOOST_NOEXCEPT
{
+ if (table_.size_ == 0) {
+ return 0.0f;
+ }
+
BOOST_ASSERT(table_.bucket_count() != 0);
return static_cast<float>(table_.size_) /
static_cast<float>(table_.bucket_count());
@@ -2506,6 +2510,10 @@ namespace boost {
template <class K, class T, class H, class P, class A>
float unordered_multimap<K, T, H, P, A>::load_factor() const BOOST_NOEXCEPT
{
+ if (table_.size_ == 0) {
+ return 0.0f;
+ }
+
BOOST_ASSERT(table_.bucket_count() != 0);
return static_cast<float>(table_.size_) /
static_cast<float>(table_.bucket_count());
diff --git a/boost/unordered/unordered_set.hpp b/boost/unordered/unordered_set.hpp
index 8721a68a0..82d323c6e 100644
--- a/boost/unordered/unordered_set.hpp
+++ b/boost/unordered/unordered_set.hpp
@@ -1586,6 +1586,10 @@ namespace boost {
template <class T, class H, class P, class A>
float unordered_set<T, H, P, A>::load_factor() const BOOST_NOEXCEPT
{
+ if (table_.size_ == 0) {
+ return 0.0f;
+ }
+
BOOST_ASSERT(table_.bucket_count() != 0);
return static_cast<float>(table_.size_) /
static_cast<float>(table_.bucket_count());
@@ -1986,6 +1990,10 @@ namespace boost {
template <class T, class H, class P, class A>
float unordered_multiset<T, H, P, A>::load_factor() const BOOST_NOEXCEPT
{
+ if (table_.size_ == 0) {
+ return 0.0f;
+ }
+
BOOST_ASSERT(table_.bucket_count() != 0);
return static_cast<float>(table_.size_) /
static_cast<float>(table_.bucket_count());

View File

@ -15,7 +15,7 @@ SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_PATCH_VE
LICENSE="BSD-with-attribution" LICENSE="BSD-with-attribution"
SLOT="2" SLOT="2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="authdaemond berkdb gdbm kerberos ldapdb openldap mysql pam postgres sample selinux sqlite srp ssl static-libs urandom" IUSE="authdaemond berkdb gdbm kerberos ldapdb openldap mysql pam postgres sample selinux sqlite srp ssl static-libs urandom"
REQUIRED_USE="ldapdb? ( openldap )" REQUIRED_USE="ldapdb? ( openldap )"

View File

@ -1,2 +1,2 @@
DIST glib-2.72.2.tar.xz 4891264 BLAKE2B 932613e69edc302793c5db9fdff36fb4ec04df3820aaa3dc2ef6cc01b8124bee3fe2f96cabd9c44b49601425ba7af072f8ad6fd331f6247e00ab6fc94f7f2620 SHA512 9a1121be1d5b1de50fb732d55298a8deb6e6e7fe02e06ab18fdfbc51a0f0d77c13c5faf29a227b5746b0f8c1c0502fc79c36cef2b7a62c4701b9deffe5887e69
DIST glib-2.72.3.tar.xz 4893484 BLAKE2B 1360c887b07ede3de3a7d31589f3dfc07ada2fe3e7901d3f30048ab9a1379357753ae142c6c107b3fcd6dd61e1401fbe6db22f0e89ea617db2c1073f1900cbe6 SHA512 8834ab7498577c2f659d135b87c27b34e1157be27f6c1fe5af0d64a94654f78cbe6a87e6868966849674c34e88a9d51d2de8d89f78f86aa1e1af3482761f0638 DIST glib-2.72.3.tar.xz 4893484 BLAKE2B 1360c887b07ede3de3a7d31589f3dfc07ada2fe3e7901d3f30048ab9a1379357753ae142c6c107b3fcd6dd61e1401fbe6db22f0e89ea617db2c1073f1900cbe6 SHA512 8834ab7498577c2f659d135b87c27b34e1157be27f6c1fe5af0d64a94654f78cbe6a87e6868966849674c34e88a9d51d2de8d89f78f86aa1e1af3482761f0638
DIST glib-2.74.0.tar.xz 5183072 BLAKE2B b21e5a72e2ce3390cbf13601aa902104f1ac1cfbd75181d30cd340f24b5875753f898b229f99c71d47d499be86cddb0191a0072c0c2decc82956a46c16255905 SHA512 5cdadd2f4568c0c3d45083b4d39699abf651e42e020f7bc880cce3ff33d28943118388d17a0632777e843f48009c1f97d5634fde3cb8c69c7c7f35b278ac8225

View File

@ -0,0 +1,26 @@
https://gitlab.gnome.org/GNOME/glib/-/commit/37dba1c425f6c3254e9ce72f1c4b7d0f95c2be3e
https://bugs.gentoo.org/871174
From: Kjell Ahlstedt <kjellahlstedt@gmail.com>
Date: Thu, 15 Sep 2022 12:55:18 +0200
Subject: [PATCH] gio-launch-desktop: Fix the G_STATIC_ASSERT expressions for
clang
The clang compiler requires the static_assert expression to be an integral
constant expression. `"text"` is not, but `sizeof "text"` is.
Fixes #2740
--- a/gio/gio-launch-desktop.c
+++ b/gio/gio-launch-desktop.c
@@ -121,8 +121,8 @@ journal_stream_fd (const char *identifier,
/* Arbitrary large size for the sending buffer, from systemd */
int large_buffer_size = 8 * 1024 * 1024;
- G_STATIC_ASSERT (LOG_EMERG == 0 && "Linux ABI defines LOG_EMERG");
- G_STATIC_ASSERT (LOG_DEBUG == 7 && "Linux ABI defines LOG_DEBUG");
+ G_STATIC_ASSERT (LOG_EMERG == 0 && sizeof "Linux ABI defines LOG_EMERG");
+ G_STATIC_ASSERT (LOG_DEBUG == 7 && sizeof "Linux ABI defines LOG_DEBUG");
fd = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
GitLab

View File

@ -0,0 +1,27 @@
https://gitlab.gnome.org/GNOME/glib/-/commit/ea3f17d598d550345e94e4571130e429443e91cb
https://gitlab.gnome.org/GNOME/glib/-/issues/2770
From: Emmanuele Bassi <ebassi@gnome.org>
Date: Sun, 25 Sep 2022 14:20:24 +0100
Subject: [PATCH] Empty values are not valid GParamSpec
The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
which means the is_valid() vfunc should do the same.
This avoids a segfault when calling g_param_value_is_valid() on a
GParamSpecParam.
Fixes: #2770
--- a/gobject/gparamspecs.c
+++ b/gobject/gparamspecs.c
@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec *pspec,
{
GParamSpec *param = value->data[0].v_pointer;
+ if (param == NULL)
+ return FALSE;
+
return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
}
GitLab

View File

@ -16,7 +16,7 @@ IUSE="dbus debug +elf fam gtk-doc +mime selinux static-libs sysprof systemtap te
RESTRICT="!test? ( test )" RESTRICT="!test? ( test )"
REQUIRED_USE="gtk-doc? ( test )" # Bug #777636 REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded # * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from # within ELF binaries on that platform anyway and inspecting ELF binaries from

View File

@ -0,0 +1,289 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{8..11} )
inherit flag-o-matic gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
DESCRIPTION="The GLib library of C routines"
HOMEPAGE="https://www.gtk.org/"
LICENSE="LGPL-2.1+"
SLOT="2"
IUSE="dbus debug +elf gtk-doc +mime selinux static-libs sysprof systemtap test utils xattr"
RESTRICT="!test? ( test )"
REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from
# other platforms is not that useful so exclude the dependency in this case.
# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
# these are used by GIO, which glib[static-libs] consumers don't really seem
# to need at all, thus not imposing the deps for now and once some consumers
# are actually found to static link libgio-2.0.a, we can revisit and either add
# them or just put the (build) deps in that rare consumer instead of recursive
# RDEPEND here (due to lack of recursive DEPEND).
RDEPEND="
!<dev-util/gdbus-codegen-${PV}
>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
>=dev-libs/libpcre2-10.32:0=[${MULTILIB_USEDEP},static-libs?]
>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
elf? ( virtual/libelf:0= )
sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}"
# libxml2 used for optional tests that get automatically skipped
BDEPEND="
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
>=sys-devel/gettext-0.19.8
gtk-doc? ( >=dev-util/gtk-doc-1.33
app-text/docbook-xml-dtd:4.2
app-text/docbook-xml-dtd:4.5 )
systemtap? ( >=dev-util/systemtap-1.3 )
${PYTHON_DEPS}
test? ( >=sys-apps/dbus-1.2.14 )
virtual/pkgconfig
"
# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
PDEPEND="
dbus? ( gnome-base/dconf )
mime? ( x11-misc/shared-mime-info )
"
# shared-mime-info needed for gio/xdgmime, bug #409481
# dconf is needed to be able to save settings, bug #498436
MULTILIB_CHOST_TOOLS=(
/usr/bin/gio-querymodules$(get_exeext)
)
PATCHES=(
"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
"${FILESDIR}"/${P}-clang-build.patch
"${FILESDIR}"/${P}-crash-gparamspec.patch
)
pkg_setup() {
if use kernel_linux ; then
CONFIG_CHECK="~INOTIFY_USER"
if use test ; then
CONFIG_CHECK="~IPV6"
WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
fi
linux-info_pkg_setup
fi
python-any-r1_pkg_setup
}
src_prepare() {
if use test; then
# TODO: Review the test exclusions, especially now with meson
# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
if ! has_version dev-util/desktop-file-utils ; then
ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
ewarn "think on installing it to get these tests run."
sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
fi
# gdesktopappinfo requires existing terminal (gnome-terminal or any
# other), falling back to xterm if one doesn't exist
#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
# ewarn "Some tests will be skipped due to missing terminal program"
# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
# Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready for backport (or in a bump) and file new issue if still fails
sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
# desktop-app-info/launch* might fail similarly
sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
#fi
# https://bugzilla.gnome.org/show_bug.cgi?id=722604
sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
ewarn "Tests for search-utils have been skipped"
sed -i -e "/search-utils/d" glib/tests/meson.build || die
# Play nice with network-sandbox, but this approach would defeat the purpose of the test
#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
else
# Don't build tests, also prevents extra deps, bug #512022
sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
fi
# Don't build fuzzing binaries - not used
sed -i -e '/subdir.*fuzzing/d' meson.build || die
# gdbus-codegen is a separate package
sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
sed -i -e '/install_dir/d' gio/tests/meson.build || die
cat > "${T}/glib-test-ld-wrapper" <<-EOF
#!/usr/bin/env sh
exec \${LD:-ld} "\$@"
EOF
chmod a+x "${T}/glib-test-ld-wrapper" || die
sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
default
gnome2_environment_reset
# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
}
multilib_src_configure() {
if use debug; then
append-cflags -DG_ENABLE_DEBUG
else
append-cflags -DG_DISABLE_CAST_CHECKS # https://gitlab.gnome.org/GNOME/glib/issues/1833
fi
# TODO: figure a way to pass appropriate values for all cross properties that glib uses (search for get_cross_property)
#if tc-is-cross-compiler ; then
# https://bugzilla.gnome.org/show_bug.cgi?id=756473
# TODO-meson: This should be in meson cross file as 'growing_stack' property; and more, look at get_cross_property
#case ${CHOST} in
#hppa*|metag*) export glib_cv_stack_grows=yes ;;
#*) export glib_cv_stack_grows=no ;;
#esac
#fi
local emesonargs=(
-Ddefault_library=$(usex static-libs both shared)
$(meson_feature selinux)
$(meson_use xattr)
-Dlibmount=enabled # only used if host_system == 'linux'
-Dman=true
$(meson_use systemtap dtrace)
$(meson_use systemtap)
$(meson_feature sysprof)
$(meson_native_use_bool gtk-doc gtk_doc)
$(meson_use test tests)
-Dinstalled_tests=false
-Dnls=enabled
-Doss_fuzz=disabled
$(meson_native_use_feature elf libelf)
-Dmultiarch=false
)
meson_src_configure
}
multilib_src_test() {
export XDG_CONFIG_DIRS=/etc/xdg
export XDG_DATA_DIRS=/usr/local/share:/usr/share
export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
export LC_TIME=C # bug #411967
export TZ=UTC
unset GSETTINGS_BACKEND # bug #596380
python_setup
# https://bugs.gentoo.org/839807
local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
addpredict /usr/b
# Related test is a bit nitpicking
mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
meson_src_test --timeout-multiplier 2 --no-suite flaky
}
multilib_src_install() {
meson_src_install
keepdir /usr/$(get_libdir)/gio/modules
}
multilib_src_install_all() {
# These are installed by dev-util/glib-utils
# TODO: With patching we might be able to get rid of the python-any deps and removals, and test depend on glib-utils instead; revisit now with meson
rm "${ED}/usr/bin/glib-genmarshal" || die
rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
rm "${ED}/usr/bin/glib-mkenums" || die
rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
rm "${ED}/usr/bin/gtester-report" || die
rm "${ED}/usr/share/man/man1/gtester-report.1" || die
# gdbus-codegen manpage installed by dev-util/gdbus-codegen
rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
}
pkg_preinst() {
xdg_pkg_preinst
# Make gschemas.compiled belong to glib alone
local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"/${cache} || die
else
touch "${ED}"${cache} || die
fi
multilib_pkg_preinst() {
# Make giomodule.cache belong to glib alone
local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"${cache} || die
else
touch "${ED}"${cache} || die
fi
}
# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
# file due to inability to create it and GIO might not look at any of the modules there
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_preinst
fi
}
pkg_postinst() {
xdg_pkg_postinst
# glib installs no schemas itself, but we force update for fresh install in case
# something has dropped in a schemas file without direct glib dep; and for upgrades
# in case the compiled schema format could have changed
gnome2_schemas_update
multilib_pkg_postinst() {
gnome2_giomodule_cache_update \
|| die "Update GIO modules cache failed (for ${ABI})"
}
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_postinst
else
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."
fi
for v in ${REPLACING_VERSIONS}; do
if ver_test "$v" "-lt" "2.63.6"; then
ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
ewarn "to restart your session for \"Open With\" dialogs to work."
fi
done
}
pkg_postrm() {
xdg_pkg_postrm
gnome2_schemas_update
if [[ -z ${REPLACED_BY_VERSION} ]]; then
multilib_pkg_postrm() {
rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
}
multilib_foreach_abi multilib_pkg_postrm
rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
fi
}

View File

@ -12,11 +12,11 @@ HOMEPAGE="https://www.gtk.org/"
LICENSE="LGPL-2.1+" LICENSE="LGPL-2.1+"
SLOT="2" SLOT="2"
IUSE="dbus debug +elf fam gtk-doc +mime selinux static-libs sysprof systemtap test utils xattr" IUSE="dbus debug +elf gtk-doc +mime selinux static-libs sysprof systemtap test utils xattr"
RESTRICT="!test? ( test )" RESTRICT="!test? ( test )"
REQUIRED_USE="gtk-doc? ( test )" # Bug #777636 REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded # * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from # within ELF binaries on that platform anyway and inspecting ELF binaries from
@ -30,7 +30,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv
RDEPEND=" RDEPEND="
!<dev-util/gdbus-codegen-${PV} !<dev-util/gdbus-codegen-${PV}
>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
>=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?] >=dev-libs/libpcre2-10.32:0=[${MULTILIB_USEDEP},static-libs?]
>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}] >=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
>=virtual/libintl-0-r2[${MULTILIB_USEDEP}] >=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
@ -38,7 +38,6 @@ RDEPEND="
selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] ) selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) ) xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
elf? ( virtual/libelf:0= ) elf? ( virtual/libelf:0= )
fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] ) sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
" "
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"
@ -70,6 +69,7 @@ MULTILIB_CHOST_TOOLS=(
PATCHES=( PATCHES=(
"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch "${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
"${FILESDIR}"/${P}-clang-build.patch
) )
pkg_setup() { pkg_setup() {
@ -168,12 +168,12 @@ multilib_src_configure() {
$(meson_use systemtap) $(meson_use systemtap)
$(meson_feature sysprof) $(meson_feature sysprof)
$(meson_native_use_bool gtk-doc gtk_doc) $(meson_native_use_bool gtk-doc gtk_doc)
$(meson_use fam)
$(meson_use test tests) $(meson_use test tests)
-Dinstalled_tests=false -Dinstalled_tests=false
-Dnls=enabled -Dnls=enabled
-Doss_fuzz=disabled -Doss_fuzz=disabled
$(meson_native_use_feature elf libelf) $(meson_native_use_feature elf libelf)
-Dmultiarch=false
) )
meson_src_configure meson_src_configure
} }

View File

@ -1 +1,2 @@
DIST gobject-introspection-1.72.0.tar.xz 1040936 BLAKE2B fd7600a927e57d5a076c203a084afe56a738d3a93109055be7bee22a96d6d5b08892300260288e5b83f883e54ca658cb24ef5c862abe435820c963bbf0cf8496 SHA512 b8fba2bd12e93776c55228acf3487bef36ee40b1abdc7f681b827780ac94a8bfa1f59b0c30d60fa5a1fea2f610de78b9e52029f411128067808f17eb6374cdc5 DIST gobject-introspection-1.72.0.tar.xz 1040936 BLAKE2B fd7600a927e57d5a076c203a084afe56a738d3a93109055be7bee22a96d6d5b08892300260288e5b83f883e54ca658cb24ef5c862abe435820c963bbf0cf8496 SHA512 b8fba2bd12e93776c55228acf3487bef36ee40b1abdc7f681b827780ac94a8bfa1f59b0c30d60fa5a1fea2f610de78b9e52029f411128067808f17eb6374cdc5
DIST gobject-introspection-1.74.0.tar.xz 1044008 BLAKE2B 223bb9b8b452f03945f941086e47fb3b14f03f8353f4f903b21e3f494af728652a44de986752374057e90dd8111f21f5b0cd3e00bb0a8c3aa25c8261bb0b9247 SHA512 decff5dda0ec5ec0afda4d6bcd3bdadcbf34289002c0d9c0c77ecf8c5d3f15d196b24d8035041545031006acbdfe76af47c42da061c40e200c87f2c74cd301f0

View File

@ -0,0 +1,30 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GNOME_ORG_MODULE="gobject-introspection"
inherit gnome.org
DESCRIPTION="Build infrastructure for GObject Introspection"
HOMEPAGE="https://wiki.gnome.org/Projects/GObjectIntrospection"
LICENSE="HPND"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
RDEPEND="!<${CATEGORY}/${GNOME_ORG_MODULE}-${PV}"
# Use !<${PV} because mixing gobject-introspection with different version of -common can cause issues like:
# https://forums.gentoo.org/viewtopic-p-7421930.html
src_configure() { :; }
src_compile() { :; }
src_install() {
insinto /usr/share/aclocal
doins m4/introspection.m4
insinto /usr/share/gobject-introspection-1.0
doins Makefile.introspection
}

View File

@ -1 +1,2 @@
DIST gobject-introspection-1.72.0.tar.xz 1040936 BLAKE2B fd7600a927e57d5a076c203a084afe56a738d3a93109055be7bee22a96d6d5b08892300260288e5b83f883e54ca658cb24ef5c862abe435820c963bbf0cf8496 SHA512 b8fba2bd12e93776c55228acf3487bef36ee40b1abdc7f681b827780ac94a8bfa1f59b0c30d60fa5a1fea2f610de78b9e52029f411128067808f17eb6374cdc5 DIST gobject-introspection-1.72.0.tar.xz 1040936 BLAKE2B fd7600a927e57d5a076c203a084afe56a738d3a93109055be7bee22a96d6d5b08892300260288e5b83f883e54ca658cb24ef5c862abe435820c963bbf0cf8496 SHA512 b8fba2bd12e93776c55228acf3487bef36ee40b1abdc7f681b827780ac94a8bfa1f59b0c30d60fa5a1fea2f610de78b9e52029f411128067808f17eb6374cdc5
DIST gobject-introspection-1.74.0.tar.xz 1044008 BLAKE2B 223bb9b8b452f03945f941086e47fb3b14f03f8353f4f903b21e3f494af728652a44de986752374057e90dd8111f21f5b0cd3e00bb0a8c3aa25c8261bb0b9247 SHA512 decff5dda0ec5ec0afda4d6bcd3bdadcbf34289002c0d9c0c77ecf8c5d3f15d196b24d8035041545031006acbdfe76af47c42da061c40e200c87f2c74cd301f0

View File

@ -3,8 +3,8 @@
EAPI=7 EAPI=7
PYTHON_COMPAT=( python3_{8..10} ) PYTHON_COMPAT=( python3_{8..11} )
PYTHON_REQ_USE="xml" PYTHON_REQ_USE="xml(+)"
inherit gnome.org meson python-single-r1 xdg inherit gnome.org meson python-single-r1 xdg
DESCRIPTION="Introspection system for GObject-based libraries" DESCRIPTION="Introspection system for GObject-based libraries"

View File

@ -0,0 +1,79 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
PYTHON_REQ_USE="xml(+)"
inherit gnome.org meson python-single-r1 xdg
DESCRIPTION="Introspection system for GObject-based libraries"
HOMEPAGE="https://wiki.gnome.org/Projects/GObjectIntrospection"
LICENSE="LGPL-2+ GPL-2+"
SLOT="0"
IUSE="doctool gtk-doc test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
# virtual/pkgconfig needed at runtime, bug #505408
RDEPEND="
>=dev-libs/gobject-introspection-common-${PV}
>=dev-libs/glib-2.74.0:2
dev-libs/libffi:=
doctool? (
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
virtual/pkgconfig
${PYTHON_DEPS}
"
# Wants real bison, not virtual/yacc
DEPEND="${RDEPEND}"
BDEPEND="
gtk-doc? (
>=dev-util/gtk-doc-1.19
app-text/docbook-xml-dtd:4.3
app-text/docbook-xml-dtd:4.5
)
sys-devel/bison
sys-devel/flex
test? (
x11-libs/cairo[glib]
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
"
pkg_setup() {
python-single-r1_pkg_setup
}
src_configure() {
local emesonargs=(
$(meson_feature test cairo)
$(meson_feature doctool)
#-Dglib_src_dir
$(meson_use gtk-doc gtk_doc)
#-Dcairo_libname
-Dpython="${EPYTHON}"
#-Dgir_dir_prefix
)
meson_src_configure
}
src_install() {
meson_src_install
python_fix_shebang "${ED}"/usr/bin/
python_optimize "${ED}"/usr/$(get_libdir)/gobject-introspection/giscanner
# Prevent collision with gobject-introspection-common
rm -v "${ED}"/usr/share/aclocal/introspection.m4 \
"${ED}"/usr/share/gobject-introspection-1.0/Makefile.introspection || die
rmdir "${ED}"/usr/share/aclocal || die
}

View File

@ -1,4 +1,3 @@
DIST libpcre2-10.36-patchset-01.tar.xz 1364 BLAKE2B bfef3c876a092e06972107b44794c23b758a030181f3040c8b722db166789eac794783169b468fc71334fd660bc2f1c31422a8cb8e5bdc18a69b72654b1b59b2 SHA512 04324d1efa6d155fa3ffbc328638e4674bea305fef7f57d4369ab4a6399a0f489b4c0ecfb49643feff310d91872e1673e965c48a5c60f1bf54a319f0d275c306 DIST libpcre2-10.36-patchset-01.tar.xz 1364 BLAKE2B bfef3c876a092e06972107b44794c23b758a030181f3040c8b722db166789eac794783169b468fc71334fd660bc2f1c31422a8cb8e5bdc18a69b72654b1b59b2 SHA512 04324d1efa6d155fa3ffbc328638e4674bea305fef7f57d4369ab4a6399a0f489b4c0ecfb49643feff310d91872e1673e965c48a5c60f1bf54a319f0d275c306
DIST pcre2-10.39.tar.bz2 1730729 BLAKE2B 9ee01ac2704e9cb7a107d402fa0c32828fc66425b62270f6891667bde5fb00c1e779c9730df3522acbd62d11703343bf48265050c09d3754183de314baf7cddd SHA512 b3d898198f4b5ffc3453d2ba56fe2a7298c01c52e5f67d45f1e046fc0dee62e16a4024fcb65839ac9c367beedb531647affd6f8599fbeb102f19423c150d80d4
DIST pcre2-10.40.tar.bz2 1765440 BLAKE2B 627a204585b92238eda81b4befc88757a81d75b0d9fa26ea6d51afcdd93f7e2d102a2245bf3c8e1f5f9ddf69a316c419c948b741a64442bb567480015543e49b SHA512 00e7b48a6554b9127cb6fe24c5cacf72783416a9754ec88f62f73c52f46ed72c86c1869e62c91a31b2ff2cbafbbedabca44b3f1eb7670bc92f49d8401c7374e8 DIST pcre2-10.40.tar.bz2 1765440 BLAKE2B 627a204585b92238eda81b4befc88757a81d75b0d9fa26ea6d51afcdd93f7e2d102a2245bf3c8e1f5f9ddf69a316c419c948b741a64442bb567480015543e49b SHA512 00e7b48a6554b9127cb6fe24c5cacf72783416a9754ec88f62f73c52f46ed72c86c1869e62c91a31b2ff2cbafbbedabca44b3f1eb7670bc92f49d8401c7374e8
DIST pcre2-10.40.tar.bz2.sig 310 BLAKE2B 9609111a64b66893b12e36d1cbc77b64d6a0cc30b9288e52753785ddcab37cc3e169d0f117d94e4ad7d7ff897a6ba0a574c9a2e529c3c7e171f5a1bc6f64fe23 SHA512 faa4b47fdac1543cd323651f251b8abb94b31b5966b42d445b8cbb38c441df4742e3c3517c2bc6c0a4464e9fb5feab5d5beda1250a03d56bec2d8383be2f63ab DIST pcre2-10.40.tar.bz2.sig 310 BLAKE2B 9609111a64b66893b12e36d1cbc77b64d6a0cc30b9288e52753785ddcab37cc3e169d0f117d94e4ad7d7ff897a6ba0a574c9a2e529c3c7e171f5a1bc6f64fe23 SHA512 faa4b47fdac1543cd323651f251b8abb94b31b5966b42d445b8cbb38c441df4742e3c3517c2bc6c0a4464e9fb5feab5d5beda1250a03d56bec2d8383be2f63ab

View File

@ -1,92 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit libtool multilib-minimal usr-ldscript
PATCH_SET="${PN}-10.36-patchset-01.tar.xz"
DESCRIPTION="Perl-compatible regular expression library"
HOMEPAGE="https://www.pcre.org/"
MY_P="pcre2-${PV/_rc/-RC}"
if [[ ${PV} != *_rc* ]] ; then
# Only the final releases are available here.
SRC_URI="https://github.com/PhilipHazel/pcre2/releases/download/${MY_P}/${MY_P}.tar.bz2
https://ftp.pcre.org/pub/pcre/${MY_P}.tar.bz2"
else
SRC_URI="https://ftp.pcre.org/pub/pcre/Testing/${MY_P}.tar.bz2"
fi
if [[ -n "${PATCH_SET}" ]] ; then
SRC_URI+=" https://dev.gentoo.org/~whissi/dist/${PN}/${PATCH_SET}
https://dev.gentoo.org/~polynomial-c/dist/${PATCH_SET}"
fi
LICENSE="BSD"
SLOT="0/3" # libpcre2-posix.so version
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="bzip2 +jit libedit +pcre16 pcre32 +readline static-libs unicode zlib"
REQUIRED_USE="?? ( libedit readline )"
BDEPEND="
virtual/pkgconfig
"
RDEPEND="
bzip2? ( app-arch/bzip2 )
libedit? ( dev-libs/libedit )
readline? ( sys-libs/readline:0= )
zlib? ( sys-libs/zlib )
"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_P}"
MULTILIB_CHOST_TOOLS=(
/usr/bin/pcre2-config
)
src_prepare() {
if [[ -d "${WORKDIR}/patches" ]] ; then
rm "${WORKDIR}"/patches/pcre2-10.36-001-issue2698.patch || die
eapply "${WORKDIR}"/patches
fi
default
elibtoolize
}
multilib_src_configure() {
local myeconfargs=(
--enable-pcre2-8
--enable-shared
$(multilib_native_use_enable bzip2 pcre2grep-libbz2)
$(multilib_native_use_enable libedit pcre2test-libedit)
$(multilib_native_use_enable readline pcre2test-libreadline)
$(multilib_native_use_enable zlib pcre2grep-libz)
$(use_enable jit)
$(use_enable jit pcre2grep-jit)
$(use_enable pcre16 pcre2-16)
$(use_enable pcre32 pcre2-32)
$(use_enable static-libs static)
$(use_enable unicode)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_compile() {
emake V=1 $(multilib_is_native_abi || echo "bin_PROGRAMS=")
}
multilib_src_install() {
emake \
DESTDIR="${D}" \
$(multilib_is_native_abi || echo "bin_PROGRAMS= dist_html_DATA=") \
install
multilib_is_native_abi && gen_usr_ldscript -a pcre2-posix
}
multilib_src_install_all() {
find "${ED}" -type f -name "*.la" -delete || die
}

View File

@ -1,3 +1,2 @@
DIST libtasn1-4.18.0.tar.gz 1724441 BLAKE2B b5f93a7575dde46741b6fc97183105efbc934e44041735241ba40ecd578c94637741df193dfab0d97e0348e2dde34b8b89a33ed616afa0bf64db6dbddebf1786 SHA512 4f2f4afc7561fda7a1f1c6c525c3c3b08228a1a4aa8c3d3d5e02e993d8f83ccee1dd0f1b201cec0fbfc97043d4b1d7a95ffd34d65422a38b85b931ac7a015831
DIST libtasn1-4.19.0.tar.gz 1786576 BLAKE2B 6e8232590cd87da3bfd9182ed44eccdfbdfcc85e88d8cf19fffdb3d600e04694b77079b95bbd822d2c3fff29458ddae0f0440f9c1c19c711923a2507bd19270f SHA512 287f5eddfb5e21762d9f14d11997e56b953b980b2b03a97ed4cd6d37909bda1ed7d2cdff9da5d270a21d863ab7e54be6b85c05f1075ac5d8f0198997cf335ef4 DIST libtasn1-4.19.0.tar.gz 1786576 BLAKE2B 6e8232590cd87da3bfd9182ed44eccdfbdfcc85e88d8cf19fffdb3d600e04694b77079b95bbd822d2c3fff29458ddae0f0440f9c1c19c711923a2507bd19270f SHA512 287f5eddfb5e21762d9f14d11997e56b953b980b2b03a97ed4cd6d37909bda1ed7d2cdff9da5d270a21d863ab7e54be6b85c05f1075ac5d8f0198997cf335ef4
DIST libtasn1-4.19.0.tar.gz.sig 228 BLAKE2B f45b8c53844fad4d1044ef6915d88337affb0287973a0ffab2d77a6a61c850cebdea6904f077fcc13a8bc29ba7cbbef7cdf2a5e325c8180d574020eb3cb9f432 SHA512 e0417625f8df22c6421914bf2d4f19d7f27260c24c04f50e59669681f326debe06ddef9dc5a2e20fda50feb30bbbf3f41597e64961257304ec2c407aa76d107e DIST libtasn1-4.19.0.tar.gz.sig 228 BLAKE2B f45b8c53844fad4d1044ef6915d88337affb0287973a0ffab2d77a6a61c850cebdea6904f077fcc13a8bc29ba7cbbef7cdf2a5e325c8180d574020eb3cb9f432 SHA512 e0417625f8df22c6421914bf2d4f19d7f27260c24c04f50e59669681f326debe06ddef9dc5a2e20fda50feb30bbbf3f41597e64961257304ec2c407aa76d107e

View File

@ -1,53 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit multilib-minimal libtool
DESCRIPTION="ASN.1 library"
HOMEPAGE="https://www.gnu.org/software/libtasn1/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
LICENSE="GPL-3 LGPL-2.1"
SLOT="0/6" # subslot = libtasn1 soname version
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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-libs test valgrind"
RESTRICT="!test? ( test )"
BDEPEND="sys-apps/help2man
virtual/yacc
test? ( valgrind? ( dev-util/valgrind ) )"
DOCS=(
AUTHORS
ChangeLog
NEWS
README.md
THANKS
)
src_prepare() {
default
elibtoolize # for Solaris shared library
}
multilib_src_configure() {
# -fanalyzer substantially slows down the build and isn't useful for
# us. It's useful for upstream as it's static analysis, but it's not
# useful when just getting something built.
export gl_cv_warn_c__fanalyzer=no
local myeconfargs=(
$(use_enable static-libs static)
$(multilib_native_use_enable valgrind valgrind-tests)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_install_all() {
einstalldocs
find "${ED}" -type f -name '*.la' -delete || die
}

View File

@ -1,2 +1 @@
DIST onig-6.9.7.1.tar.gz 935705 BLAKE2B 1042d5b211f53ad8983eb6b4e53beb165bc948bbef9a85ad12578a9237a804e3dcd0a8105914156230ec30e11f2c8a0372c37919cdde7b2be104c66a8b22fb52 SHA512 17711e0d451c41e74cb3f8ab4e78b0181578ef42cb35dc64e87871c82a41909334cb4eeb03eccdccf6904f699e6e82b0dbb54077138225b9b95471fcdeb8c486
DIST onig-6.9.8.tar.gz 944148 BLAKE2B ee7d91f2d3a7a41d675bcbb9d18490aa3e5a9edb8f3c6e880d27f2218c476499bba21088def41fbb5d500bfb2916af85c2489fca5bd846594fab53ac492531af SHA512 5a3d220961c22cda981bbae06dc383401771362cdf67e4f0b5d2fa8951a03907362edae498f63226287e70715c0abe4acdd22ec3ceb74bbb226234a52c36a4d7 DIST onig-6.9.8.tar.gz 944148 BLAKE2B ee7d91f2d3a7a41d675bcbb9d18490aa3e5a9edb8f3c6e880d27f2218c476499bba21088def41fbb5d500bfb2916af85c2489fca5bd846594fab53ac492531af SHA512 5a3d220961c22cda981bbae06dc383401771362cdf67e4f0b5d2fa8951a03907362edae498f63226287e70715c0abe4acdd22ec3ceb74bbb226234a52c36a4d7

View File

@ -1,55 +0,0 @@
# Copyright 2003-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit multilib-minimal
if [[ "${PV}" == "9999" ]]; then
inherit autotools git-r3
EGIT_REPO_URI="https://github.com/kkos/oniguruma"
fi
DESCRIPTION="Regular expression library for different character encodings"
HOMEPAGE="https://github.com/kkos/oniguruma"
if [[ "${PV}" == "9999" ]]; then
SRC_URI=""
else
SRC_URI="https://github.com/kkos/${PN}/releases/download/v${PV}/onig-${PV}.tar.gz"
fi
LICENSE="BSD-2"
SLOT="0/5"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
IUSE="crnl-as-line-terminator static-libs"
BDEPEND=""
DEPEND=""
RDEPEND=""
if [[ "${PV}" != "9999" ]]; then
S="${WORKDIR}/onig-$(ver_cut 1-3)"
fi
DOCS=(AUTHORS HISTORY README{,_japanese} doc/{API,CALLOUTS.API,CALLOUTS.BUILTIN,FAQ,RE}{,.ja} doc/{SYNTAX.md,UNICODE_PROPERTIES})
src_prepare() {
default
if [[ "${PV}" == "9999" ]]; then
eautoreconf
fi
}
multilib_src_configure() {
ECONF_SOURCE="${S}" econf \
--enable-posix-api \
$(use_enable crnl-as-line-terminator) \
$(use_enable static-libs static)
}
multilib_src_install_all() {
einstalldocs
find "${ED}" -name "*.la" -delete || die
}

View File

@ -21,7 +21,7 @@ fi
LICENSE="BSD-2" LICENSE="BSD-2"
SLOT="0/5" SLOT="0/5"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
IUSE="crnl-as-line-terminator static-libs" IUSE="crnl-as-line-terminator static-libs"
BDEPEND="" BDEPEND=""

View File

@ -18,6 +18,8 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv
IUSE="examples" IUSE="examples"
RESTRICT="test" RESTRICT="test"
RDEPEND="!dev-util/b2"
PATCHES=( PATCHES=(
"${FILESDIR}"/${PN}-1.71.0-disable_python_rpath.patch "${FILESDIR}"/${PN}-1.71.0-disable_python_rpath.patch
"${FILESDIR}"/${PN}-1.78.0-darwin-gentoo-toolchain.patch "${FILESDIR}"/${PN}-1.78.0-darwin-gentoo-toolchain.patch

View File

@ -1,2 +1,2 @@
DIST glib-2.72.2.tar.xz 4891264 BLAKE2B 932613e69edc302793c5db9fdff36fb4ec04df3820aaa3dc2ef6cc01b8124bee3fe2f96cabd9c44b49601425ba7af072f8ad6fd331f6247e00ab6fc94f7f2620 SHA512 9a1121be1d5b1de50fb732d55298a8deb6e6e7fe02e06ab18fdfbc51a0f0d77c13c5faf29a227b5746b0f8c1c0502fc79c36cef2b7a62c4701b9deffe5887e69
DIST glib-2.72.3.tar.xz 4893484 BLAKE2B 1360c887b07ede3de3a7d31589f3dfc07ada2fe3e7901d3f30048ab9a1379357753ae142c6c107b3fcd6dd61e1401fbe6db22f0e89ea617db2c1073f1900cbe6 SHA512 8834ab7498577c2f659d135b87c27b34e1157be27f6c1fe5af0d64a94654f78cbe6a87e6868966849674c34e88a9d51d2de8d89f78f86aa1e1af3482761f0638 DIST glib-2.72.3.tar.xz 4893484 BLAKE2B 1360c887b07ede3de3a7d31589f3dfc07ada2fe3e7901d3f30048ab9a1379357753ae142c6c107b3fcd6dd61e1401fbe6db22f0e89ea617db2c1073f1900cbe6 SHA512 8834ab7498577c2f659d135b87c27b34e1157be27f6c1fe5af0d64a94654f78cbe6a87e6868966849674c34e88a9d51d2de8d89f78f86aa1e1af3482761f0638
DIST glib-2.74.0.tar.xz 5183072 BLAKE2B b21e5a72e2ce3390cbf13601aa902104f1ac1cfbd75181d30cd340f24b5875753f898b229f99c71d47d499be86cddb0191a0072c0c2decc82956a46c16255905 SHA512 5cdadd2f4568c0c3d45083b4d39699abf651e42e020f7bc880cce3ff33d28943118388d17a0632777e843f48009c1f97d5634fde3cb8c69c7c7f35b278ac8225

View File

@ -15,7 +15,7 @@ HOMEPAGE="https://www.gtk.org/"
LICENSE="LGPL-2+" LICENSE="LGPL-2+"
SLOT="0" SLOT="0"
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
RDEPEND="${PYTHON_DEPS}" RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"

View File

@ -5,8 +5,8 @@ EAPI=8
GNOME_ORG_MODULE="glib" GNOME_ORG_MODULE="glib"
PYTHON_COMPAT=( python3_{8..11} ) PYTHON_COMPAT=( python3_{8..11} )
PYTHON_REQ_USE="xml(+)" PYTHON_REQ_USE="xml(+)"
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_SINGLE_IMPL=1 DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_SETUPTOOLS=no
inherit gnome.org distutils-r1 inherit gnome.org distutils-r1
@ -15,7 +15,7 @@ HOMEPAGE="https://www.gtk.org/"
LICENSE="LGPL-2+" LICENSE="LGPL-2+"
SLOT="0" SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
RDEPEND="${PYTHON_DEPS}" RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"

View File

@ -1,2 +1,2 @@
DIST glib-2.72.2.tar.xz 4891264 BLAKE2B 932613e69edc302793c5db9fdff36fb4ec04df3820aaa3dc2ef6cc01b8124bee3fe2f96cabd9c44b49601425ba7af072f8ad6fd331f6247e00ab6fc94f7f2620 SHA512 9a1121be1d5b1de50fb732d55298a8deb6e6e7fe02e06ab18fdfbc51a0f0d77c13c5faf29a227b5746b0f8c1c0502fc79c36cef2b7a62c4701b9deffe5887e69
DIST glib-2.72.3.tar.xz 4893484 BLAKE2B 1360c887b07ede3de3a7d31589f3dfc07ada2fe3e7901d3f30048ab9a1379357753ae142c6c107b3fcd6dd61e1401fbe6db22f0e89ea617db2c1073f1900cbe6 SHA512 8834ab7498577c2f659d135b87c27b34e1157be27f6c1fe5af0d64a94654f78cbe6a87e6868966849674c34e88a9d51d2de8d89f78f86aa1e1af3482761f0638 DIST glib-2.72.3.tar.xz 4893484 BLAKE2B 1360c887b07ede3de3a7d31589f3dfc07ada2fe3e7901d3f30048ab9a1379357753ae142c6c107b3fcd6dd61e1401fbe6db22f0e89ea617db2c1073f1900cbe6 SHA512 8834ab7498577c2f659d135b87c27b34e1157be27f6c1fe5af0d64a94654f78cbe6a87e6868966849674c34e88a9d51d2de8d89f78f86aa1e1af3482761f0638
DIST glib-2.74.0.tar.xz 5183072 BLAKE2B b21e5a72e2ce3390cbf13601aa902104f1ac1cfbd75181d30cd340f24b5875753f898b229f99c71d47d499be86cddb0191a0072c0c2decc82956a46c16255905 SHA512 5cdadd2f4568c0c3d45083b4d39699abf651e42e020f7bc880cce3ff33d28943118388d17a0632777e843f48009c1f97d5634fde3cb8c69c7c7f35b278ac8225

View File

@ -14,7 +14,7 @@ LICENSE="LGPL-2.1+"
SLOT="0" # /usr/bin utilities that can't be parallel installed by their nature SLOT="0" # /usr/bin utilities that can't be parallel installed by their nature
REQUIRED_USE="${PYTHON_REQUIRED_USE}" REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~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" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
RDEPEND="${PYTHON_DEPS}" RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"

View File

@ -14,7 +14,7 @@ LICENSE="LGPL-2.1+"
SLOT="0" # /usr/bin utilities that can't be parallel installed by their nature SLOT="0" # /usr/bin utilities that can't be parallel installed by their nature
REQUIRED_USE="${PYTHON_REQUIRED_USE}" REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
RDEPEND="${PYTHON_DEPS}" RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"

View File

@ -1,30 +1,9 @@
DIST git-2.32.0.tar.xz 6551348 BLAKE2B 546203ce3f749ba806866a9e9767bc807794cec435fd0b60306ae6cd2b1b17a0159ef9774c79c4f59d0dba45b36941085b55f103e1820450d560bffa41d1058f SHA512 1ab3e7022ccee411d14a7da5c37d6259ef5c0f85ebed8f49698e25c65cbc7a46f8096919fcb6568360bfe284dd7475b596eee1a167db966096255a405853837c
DIST git-2.33.1.tar.xz 6558636 BLAKE2B f4959d5309f85e063448673a3f06f1d3cdd65ced5f5173cfe5a38df3b5547cae1c08275bda02e48307e8290628735e2ea1ff49222262e7cd29b252a6aa4d4a15 SHA512 16d417183232e1057bea754d59cdf4bbacc5f1527d1de6ee04cdd293a2512bfa7208e20f6130816605528b59cb1bc3188c5bddf1a42c1413095ee74e44dd2f91
DIST git-2.34.1.tar.xz 6623760 BLAKE2B 9b5d7a450ec495898bcc0e1f6ae87c0ad102d039cf7c4106cdfe3ada501d9bfaf22b83c522de383d3c01f7d5a29dbfd7fc44b371efa8fc3a418ab3c609a692c1 SHA512 a1a8e9e6f64b1da25508fbd2f783564dcdbe181fb5ff1ebab3bdac6db6094e18acc334479a1abf22ac17ce4f733cc3e10a664db9ab234cd523735a3f027b42db
DIST git-2.35.1.tar.xz 6874520 BLAKE2B 028ff97b47748871da145720d0d258a0dcf4acc60b10c787dee5703fcab5f6e621c5671ee9e7a25009e82a2830400f35fa232d88c62606a6687260c744680025 SHA512 926c6813ef61931e1a1c43dfd7b15e20dc5878c1752876bd08f039249c9ed09f20f096b2f01947de9c9522c942e9fa8c1363d7d31a488bbe3f93c0cff31fcbcb DIST git-2.35.1.tar.xz 6874520 BLAKE2B 028ff97b47748871da145720d0d258a0dcf4acc60b10c787dee5703fcab5f6e621c5671ee9e7a25009e82a2830400f35fa232d88c62606a6687260c744680025 SHA512 926c6813ef61931e1a1c43dfd7b15e20dc5878c1752876bd08f039249c9ed09f20f096b2f01947de9c9522c942e9fa8c1363d7d31a488bbe3f93c0cff31fcbcb
DIST git-2.35.2.tar.xz 6876028 BLAKE2B 2d59f0ef195770b3bd57ef8160ab24da5e14025316bb0cce30048116c71e9c45f0818a12a95a84f680071454ef80e3071b615c64a165771c1c8720c20ff4dba8 SHA512 fac143daf547f4f1952101bc0006b53ac50c1741394a8c75dc517f595ce58b183c7daabcb23a7f9fc87fe22250e298441b0b7cc7af93820110877d65c036b76a DIST git-2.37.3.tar.xz 6987464 BLAKE2B b672ed0a99532b2e2e69babbea9155e39f05590a76f55791ffed6ce4ef8b68d8e306a0a23819af26f34fcf3d16211c3a10ec58d86d81262f7a1261d0e51b1305 SHA512 9120050b01d8ac8d9f9e85f19cb84dc90c28f3beadc3ea94da94845f2eb5e35aa83eee8447a7ecef5190b8eb5d01be621be2e82bb3020e51e05037cd1fa9b58f
DIST git-2.35.3.tar.xz 6876328 BLAKE2B f584e9d94d167ba19bd2a00377f04eb4edf69cddbd2993a324178338b2e20e7fd126b51882ac7c7914c5118d0eab1ff9beddeb96a901a18fdfe027e21351ab61 SHA512 c92f8663988c57702bb5ee542ac8f36e8a43d377d16106ee462ce0b0a575b9d51baaafc654bf1821fbea2fe476ffd64d7fb87084c7de4dd8065b01d5083492c5 DIST git-2.38.0.rc1.tar.xz 7053024 BLAKE2B 40f734e30679694d9749741512eadd5b7ef42d47e40529cadaf5b8cba01ed5caf4534dbfc5c8ba13e4fee511cec8a7f4ffe844667b8930d660497764a6a8ad06 SHA512 2be15be5c687f7c65f9381ee34bfca00063ca2568981a9713a220f05cb16f7a1c4fdf628ab1971399e77d0b4b39d71b47d73e93b937d00efd965cf4c49e34af2
DIST git-2.36.0.tar.xz 7003024 BLAKE2B 72bb148fc5fded2976554788eaf599d20fe9f200ac1dd1ddd4ed89f7f5c8d6c1025907080620bab477b4efadf41d883e890dff73c80d0ff5f0becd83f13ebd88 SHA512 dce0d7dbe684af070271830a01bf1b9cc289182f5106f6e3303b1b3a0d5dc74bebf6ac0174373db05a28f5acc62acb095bc9385dabeeecc1d6e8567dce29b766
DIST git-2.36.1.tar.xz 7004044 BLAKE2B 99f54efb4ea1d8db0e3afd3dc9780cb37fc853e4757f4b37d68a6badd90eeed3e2943c97393eaed6adf61c82b97b5d01ca8d015784f5425072b1db14d39144ce SHA512 459432bd0c1d5a87c828a6fbf6d3473f14bf6b95783b3f27ea4f3af1ba9fd0e712a96a41276a16c6ebeb7ac3583a5f445eedd0a9e19fe160c2c8e309ec58818e
DIST git-2.37.0.tar.xz 6978796 BLAKE2B 204a06a6d35f4f1960d031c09eeef43273982e95c5825ab813899de3d30018c9e8d88425a51ce9447d4ae6183de1270017c6e0ecc9d601df897281e107def145 SHA512 2ae3c845c9d0e0f5245e47f95c958c86a4aa2c47dfe31bff6fc81b2434d2e9402b7eced18700c04ba7158ed6a72807a81c4cde6a26dd30c969b4267b8fce4d0a
DIST git-2.37.1.tar.xz 6980388 BLAKE2B b5423e4628f8c727aa74b3f7c7da12d46814eb45adfe84bf57e87a33e85a0a793ff690f4c1f7d2da4824bc8dd7d1df1c06cbe96adae857177d3fb204941b53ef SHA512 3c9cad6b4757f425ee53996d8d80db2226b246513cbcec9011022e02e4235d7ec38c7c1aada73bb3c9279a91d1aaf8664633356ce1dce847e0d371f702a5b766
DIST git-htmldocs-2.32.0.tar.xz 1381664 BLAKE2B d1b47aa99d32a252fd20df26eff44a558044f3a389379b161bb43621eb28375eb0621969849a31938ba7fc9fc58b140d27d703559ea5735d0a0ffd2e93cd9692 SHA512 12b84e342f0d19afe385ab8a685ae625e86c3295d1555992e0c427b361aa2cdfc89a679e7dbc468d3568a325dafbf699468aadcdb02f93e372eff3dd96a7cf7f
DIST git-htmldocs-2.33.1.tar.xz 1396744 BLAKE2B cbd65cf08fc7ea466fcd72820ba3e2135ade37f69c436a4ee7276dc71fb62f6270b71e2f46d981f5681a0fd3c30613d61680c2ef2460d0d7d292f7455e114128 SHA512 5b856b919067e1f644539d43a85aab6f602537ea0970b6248b471e3fa6756a8494f0525a69d22ad3795fcf9e106ff8439e0f6716ba0b8c895d7aad8c59e5bd74
DIST git-htmldocs-2.34.1.tar.xz 1406464 BLAKE2B 6ee2f58df3c1622d96ac4b1a70d4dc3d0c973635774dd6bb89fea3e502dd82d99d676e2f9cb33c14c429c3d4680cd6020213154099b3f7fe71ad67602ca9bc6c SHA512 cf9fa952d43e477528deece9f22d1bb63fa50b3a831fae20812c6af31c1dbaf193abe2fed48ac9966bcf1787442ceed19f00c00e524a1911f0ea31952a52fc8f
DIST git-htmldocs-2.35.1.tar.xz 1410148 BLAKE2B 68c3d12341271b861f42135bd4bd6e68ebcc6466931d383378b49aac42f77187f3fadc237974349cb0b50e4c5fb7a8ab185114341dd3012d159e420405d9ef91 SHA512 52a40644a7cd38caddecc43182863ca2f456644fff918ed4c8f826cbf269352c73d6bdc9119d25fcf537bc2fa38750791013329e4b0e32c8d14f0769dab85804 DIST git-htmldocs-2.35.1.tar.xz 1410148 BLAKE2B 68c3d12341271b861f42135bd4bd6e68ebcc6466931d383378b49aac42f77187f3fadc237974349cb0b50e4c5fb7a8ab185114341dd3012d159e420405d9ef91 SHA512 52a40644a7cd38caddecc43182863ca2f456644fff918ed4c8f826cbf269352c73d6bdc9119d25fcf537bc2fa38750791013329e4b0e32c8d14f0769dab85804
DIST git-htmldocs-2.35.2.tar.xz 1411248 BLAKE2B d4f318f6277015bb6aef3a556bbf7a9a6b02a7cf2f1ed696bb730b6a5fb32fe3dbdf01cf1737e2931f182bf451589349de53e7d02a868d40b013018973c5fe89 SHA512 118576bfeafd92b8b0dd92318504d74341a003358d937545c16fefcfde6b956fbaee0601e50b9a21719d2575a5a37585e36628b4ade8e42d9d0fec4ae616eaa0 DIST git-htmldocs-2.37.3.tar.xz 1447620 BLAKE2B 4efb86fb5431fd96ec4bcad7ecd9d5ae1d3f81f57f17dab4d8343948758f66b549b2442330b20cdb4ecd96f2029f4e7a376de5561fd9eda70acc46d2cffd7090 SHA512 ecc483a1fecf8c056a57e14a59950dc8a00f7940453dd5e2ccfd8dab966a9fee47178a7bbf8988e2c9a67ea6d84ffc33be790c49f812fb0ba661b57b7ff7b6ef
DIST git-htmldocs-2.35.3.tar.xz 1411664 BLAKE2B c7d849b9573a257de47fc8d654f7f791d21917cf65315b4ae6909ba2ebbe90970bc9e6c9949266913b1e529e662bfc375acee26ebf9304162eeccc87ce3da067 SHA512 52b97dab838fff1a865ae4d449fbb77fbac3c528666d1b936c73bffac856f16583d1b182379bc4e6851f78bccab519c3ea7e5902fc502b2e8ab7bb85043c7eea DIST git-htmldocs-2.38.0.rc1.tar.xz 1478420 BLAKE2B 1d1f8c961b637b24a7475880769e4b8d949912a7200c997269906fb06e133a6e8ed74cee340d559f072f48da46034ecfff6b806f7a9402fe25c2249585d19255 SHA512 c0c27f09fb2ac6a3108c0c9689539ffaab5fc3850a4f17aa90d7a13fbdec980778a62596041c9edcf1fa8ee256294ae3cd21af142d5a21e0ee1c46e4cabd97e5
DIST git-htmldocs-2.36.0.tar.xz 1426148 BLAKE2B ba121e8f7d6a232f3df2b5a50c0f4a798c80808562c710f306f26fa79c124e5e1580c0626a2fce04f4a17b96d40a2683809550f37028cbc436b359de91100599 SHA512 62ee14c2f1ff34c0fbdf281ea2bb08bf6a24850d1d8dc68ffb12ae15e343c167ac869559395769fb352bd441baa8f2d45d696923a04e2f04bca921c990d75a9d
DIST git-htmldocs-2.36.1.tar.xz 1426284 BLAKE2B 2213f870b7fe35cc76ce8654ed8c50c0e9694c58acac4aa2350f826422db6bf2fc238fbd12075f98e84539fdf6ca5624984e21844d1d1c1ceb90e3b090438a7d SHA512 3aa2ca197a789161571a6961dae8c2723ff5ba05a2d8ce7443f7fd9ef46fe5a3d001364831345f3fc4e028140022d20afefbabdf4a82cdeb311167793b292c1f
DIST git-htmldocs-2.37.0.tar.xz 1444540 BLAKE2B 9249de4b49d0812cf5f3ceb0a062b396ca4f9482232c69c75177201d19c4094ca79acb61d47c9a80f9db8749ac634bb2cc3bb2fa96bd6b4a34798cf1da2dd74c SHA512 8f9ff2bfdb55db41805f4366c6eb6f116e37774b7dbbac193c4a817357c47c44664eb69eb1b55acfaabc513dbbd2393d7a93295b4443630f65bd6791fc742a87
DIST git-htmldocs-2.37.1.tar.xz 1445040 BLAKE2B a2f748787f8008d67ae065b3efb34b04df76d2d96ec933f4e7af8d4d2580bf9d163c52a6bfe81c030af59a61ac8e02edfca30a988f1e24b1044271869e9426df SHA512 0aba312ff889875873f91e86689b7e02f4a9953e2f9339f84a94a41ba185503dbe265547c8b4bb7f128519ae8f9f0a288903e0490af23387a5bf81e7cf3b4ddd
DIST git-manpages-2.32.0.tar.xz 491868 BLAKE2B 7598a864246aed771371924604ee13d3f51b839b10b254bb1159dd47266513f5cd6484aab200a7b4ed427edc76538a98e39a040a17201483965175f5e1c5f484 SHA512 5c9950bd5d6904972cddf4afad534197d843c0dee8198d14ec5a3448873cab37dac88295b2a4df3658749f048bda4800b54fdc850517be7208906c911832c66e
DIST git-manpages-2.33.1.tar.xz 494288 BLAKE2B 1f8bd4f23de31a285d3f4327e562dddafdf9f28e8b36334e54f5e280c81fc8170e8b153ca42baa642d02d8e6fdfcac9a8fdd3cee1e32c29bcd53f689d1a6c463 SHA512 d465a7b491046b7a5da6ad1fc6c62b351c69905932e0672263de5a1d3abe1113660cff9fe30c7be1d1695c6170ceca5a11b3f65e9b2d1545f35cc653e4c6ad62
DIST git-manpages-2.34.1.tar.xz 497280 BLAKE2B aa3c67cec861eb40eda3e7827d3e380fdfb6f189027fb7e5618258b80ac33918cb3c2ca4d2f8dc5fbee959578766564137e9c4818672f5138304270c486658fe SHA512 8f3b56fa477e5aafec3ef29933234c362a372f59ed95694c4fb82ebb82d2a8ebc0ac17ae36caa9185964eef1700ea8732816e73df4ddd918afc949a8371fa0d8
DIST git-manpages-2.35.1.tar.xz 497284 BLAKE2B 2d0d633320982243316575cc278df6c6a9ef181bf45ea9c1c8288e2677e4e71a33af96bada9bd90b03310be7dd33f2762b6b95489e267e2c191dcc7d1a715fe7 SHA512 0f4c46880f0e6d493112dcd4753fbe3702c06aa68be09bcbfc90263a355deba080995a08916b1f2404e4e17d720ee0de46a55e450c6cabeb1c147dcb2cd919d5 DIST git-manpages-2.35.1.tar.xz 497284 BLAKE2B 2d0d633320982243316575cc278df6c6a9ef181bf45ea9c1c8288e2677e4e71a33af96bada9bd90b03310be7dd33f2762b6b95489e267e2c191dcc7d1a715fe7 SHA512 0f4c46880f0e6d493112dcd4753fbe3702c06aa68be09bcbfc90263a355deba080995a08916b1f2404e4e17d720ee0de46a55e450c6cabeb1c147dcb2cd919d5
DIST git-manpages-2.35.2.tar.xz 497548 BLAKE2B 5e7c9e85879e57e5b157dc8d0a8b836d86e56e91c512079e46869b6e251cfd40d3a7016996cdb2d2323ca47180e50eb5d5f4bc93ce87713d61b34dcf714ba90e SHA512 70d483f2b14f5957c0b71cfc1131b0cfd8038e824ed93dea4b866fa539d582eb531edc284d89b70c188c85d0bd74096c171bbe42f0be550c6c14711b101a4046 DIST git-manpages-2.37.3.tar.xz 510096 BLAKE2B 0bc0b8c1818a06a6c7126119c04d2936bd38e997027bb31be5ad6bea2b43d71c5e9a76a29c576d84bd00c11f09bca7a67aa78a72f0171b41b93f6322c3b23808 SHA512 b25d4925f64e4de220dc9133d6e3ed13a397b160c27550c8700b76226f2b3a1611aec9ee24110ae16ebaceedc6617c6a04aa1b44270c7a0f166dd40d8f2f1132
DIST git-manpages-2.35.3.tar.xz 497672 BLAKE2B aef5a7c579392f55fa63f1ce36c03579f4fcce443e867ac2a162a3d72344639ee11949748a51547315579b37e0fc6d5915ea203ddc556b2511125781428ce001 SHA512 25ac8f1690ccbc0e36b7d05115aebde1911909307ac29d930158b61ecd68972b8a9c3af018d73f34251d42cabf8d3d392173a448ec948df0a3119c2a2b87bd60 DIST git-manpages-2.38.0.rc1.tar.xz 553876 BLAKE2B b5805f3206daf93aa80ed9718ef21637eac6807594359fe1aa1ed42954d29e5b47fe7729a07ff560a67b29ac47a25f8ebb54538e595069d5626b52d9f972cfcb SHA512 dd1a25ec5a3ee62e9daac683d73d92745587d7a601a15be2db2bb331842488afaddffefc1631eecbb9a910804476eff61e9e2b5a6e4dd98219b98f97e4750403
DIST git-manpages-2.36.0.tar.xz 503604 BLAKE2B 438f533dce6628143c0ca348bc372017f049126933bf07a63ce9150114632a048778d8e0876970b406144aa584d512470ae4426be9c5bb8a3a581680ac9443a1 SHA512 67c2fb1c974ffe15aa09b9c36338f3ae9805573b35291e128210fc99c9fd97b1e26be571819d6b073c5adfe4c6f688c15e31790aa9eb62c1effacfb8aa21eb1c
DIST git-manpages-2.36.1.tar.xz 503680 BLAKE2B d43fc90584b2f9e3bae30460f0c545b4fb96a5c70ad03c73d655481e5737b75a8d7a293db5bfdd752aabfc835a4a11e77474a5a0f144c8791b2dd433a3e45b70 SHA512 dd2fd6c5186aac53d7834ccf0cb6c380758624bb4583c6c5703b5b7a24c65d4199403fbcf7033c69bd3dcfbe048baaef3e886b9ba99c8afeb375e18e5b3e6e40
DIST git-manpages-2.37.0.tar.xz 509992 BLAKE2B 67a1bc6e3a92b69d30b5e977b170cf11ac37d85dc318b35e12b728b8e17d6cfaaca7bbd343da8745be2547be8ad3dd9d930a24c0ba716dcb96aaf0610e25b11d SHA512 d739670caa11b70f3ed50665764e78a5b4c3d3d912976898d22d10d45ba3e2599b9e13d2a2502f97076a9d88b5f9e67bb11d204c8c43149b81e8243d28981711
DIST git-manpages-2.37.1.tar.xz 510044 BLAKE2B f1f79dcbb72d05258dd30ccaf76c2726de5400555d189a112786c2cecbe5cdd27879f27335ed48c84315c496bc28aa0f95e7498ee3c2672dea3071e274a1693b SHA512 5dec5aa33e707a3c3520c6391dddc8812c3c5d5f72c13a7a5f194dac08c5b73dd59b3ab777d699fba7ef5088767ee796b12de936f196224fee0ffdc31c8b8f62

View File

@ -1,455 +0,0 @@
From 0c5ced8704ce69d7c84c2cc7cb26335616464468 Mon Sep 17 00:00:00 2001
From: Robin Johnson <robbat2@gentoo.org>
Date: Tue, 14 May 2019 08:53:06 +0200
Subject: [PATCH] Makefile: Add NO_CVS define to disable all CVS interface
utilities
Forward-ported from 1.7.12 to current git.git v1.8.4
Forward-ported from v1.8.4 to v1.8.5.1
Forward-ported from v1.8.5.3 to v1.9.0_rc3
Forward-ported from 1.9.0_rc3 to current git.git v2.0.0_rc0
Forward-ported from v2.0.0_rc0 to v2.0.0
Forward-ported from v2.0.0 to v2.2.2
Forward-ported from v2.2.2 to v2.8.4
Forward-ported from v2.8.4 to v2.10.0
Forward-ported from v2.10.0 to v2.12.0
Forward-ported from v2.12.0 to v2.17.0-rc1
Forward-ported from v2.17.0-rc1 to v2.18.0-rc1
Forward-ported from v2.18.0-rc1 to v2.22.0-rc0
Forward-ported from v2.22.0-rc0 to v2.31.0-rc0
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
---
Makefile | 48 ++++++++++++++++++++++--------
t/t9200-git-cvsexportcommit.sh | 5 ++++
t/t9400-git-cvsserver-server.sh | 8 ++++-
t/t9401-git-cvsserver-crlf.sh | 15 ++++++----
t/t9600-cvsimport.sh | 41 +++++++++++++++----------
t/t9601-cvsimport-vendor-branch.sh | 11 +++++++
t/t9602-cvsimport-branches-tags.sh | 11 +++++++
t/t9603-cvsimport-patchsets.sh | 11 +++++++
t/test-lib.sh | 1 +
9 files changed, 118 insertions(+), 33 deletions(-)
diff --git a/Makefile b/Makefile
index 9b1bde2e0e..ae993a07fa 100644
--- a/Makefile
+++ b/Makefile
@@ -305,6 +305,8 @@ all::
# Define SANE_TEXT_GREP to "-a" if you use recent versions of GNU grep
# and egrep that are pickier when their input contains non-ASCII data.
#
+# Define NO_CVS if you do not want any CVS interface utilities.
+#
# The TCL_PATH variable governs the location of the Tcl interpreter
# used to optimize git-gui for your system. Only used if NO_TCLTK
# is not set. Defaults to the bare 'tclsh'.
@@ -580,6 +582,7 @@ PROGRAM_OBJS =
PROGRAMS =
EXCLUDED_PROGRAMS =
SCRIPT_PERL =
+SCRIPT_PERL_CVS =
SCRIPT_PYTHON =
SCRIPT_SH =
SCRIPT_LIB =
@@ -612,31 +615,33 @@ SCRIPT_LIB += git-sh-setup
SCRIPT_PERL += git-add--interactive.perl
SCRIPT_PERL += git-archimport.perl
-SCRIPT_PERL += git-cvsexportcommit.perl
-SCRIPT_PERL += git-cvsimport.perl
-SCRIPT_PERL += git-cvsserver.perl
SCRIPT_PERL += git-send-email.perl
SCRIPT_PERL += git-svn.perl
+SCRIPT_PERL_CVS += git-cvsexportcommit.perl
+SCRIPT_PERL_CVS += git-cvsimport.perl
+SCRIPT_PERL_CVS += git-cvsserver.perl
+
SCRIPT_PYTHON += git-p4.py
# Generated files for scripts
SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
+SCRIPT_PERL_CVS_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL_CVS))
SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
# Individual rules to allow e.g.
# "make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script"
# from subdirectories like contrib/*/
.PHONY: build-perl-script build-sh-script build-python-script
-build-perl-script: $(SCRIPT_PERL_GEN)
+build-perl-script: $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
build-sh-script: $(SCRIPT_SH_GEN)
build-python-script: $(SCRIPT_PYTHON_GEN)
.PHONY: install-perl-script install-sh-script install-python-script
install-sh-script: $(SCRIPT_SH_GEN)
$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
-install-perl-script: $(SCRIPT_PERL_GEN)
+install-perl-script: $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
install-python-script: $(SCRIPT_PYTHON_GEN)
$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
@@ -645,12 +650,13 @@ install-python-script: $(SCRIPT_PYTHON_GEN)
clean-sh-script:
$(RM) $(SCRIPT_SH_GEN)
clean-perl-script:
- $(RM) $(SCRIPT_PERL_GEN)
+ $(RM) $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
clean-python-script:
$(RM) $(SCRIPT_PYTHON_GEN)
SCRIPTS = $(SCRIPT_SH_GEN) \
$(SCRIPT_PERL_GEN) \
+ $(SCRIPT_PERL_CVS_GEN) \
$(SCRIPT_PYTHON_GEN) \
git-instaweb
@@ -2233,13 +2239,27 @@ git.res: git.rc GIT-VERSION-FILE GIT-PREFIX
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" -i $< -o $@
# This makes sure we depend on the NO_PERL setting itself.
-$(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
+$(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN): GIT-BUILD-OPTIONS
+
+_SCRIPT_PERL_GEN =
+_SCRIPT_PERL_NOGEN =
# Used for substitution in Perl modules. Disabled when using RUNTIME_PREFIX
# since the locale directory is injected.
perl_localedir_SQ = $(localedir_SQ)
ifndef NO_PERL
+_SCRIPT_PERL_GEN = $(SCRIPT_PERL_GEN)
+
+ifndef NO_CVS
+_SCRIPT_PERL_GEN += $(SCRIPT_PERL_CVS_GEN)
+else
+_SCRIPT_PERL_NOGEN += $(SCRIPT_PERL_CVS_GEN)
+_REASON = NO_CVS
+_REASON_CONTENT = $(NO_CVS)
+endif # NO_CVS
+
+$(_SCRIPT_PERL_GEN):
PERL_HEADER_TEMPLATE = perl/header_templates/fixed_prefix.template.pl
PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ):$(perllibdir_SQ)
@@ -2260,7 +2280,7 @@ endif
PERL_DEFINES += $(gitexecdir) $(perllibdir) $(localedir)
-$(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
+$(_SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
$(QUIET_GEN)$(RM) $@ $@+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \
@@ -2306,14 +2326,18 @@ git-instaweb: git-instaweb.sh GIT-SCRIPT-DEFINES
chmod +x $@+ && \
mv $@+ $@
else # NO_PERL
-$(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.sh
+_SCRIPT_PERL_NOGEN += $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN) git-instaweb
+_REASON = NO_PERL
+_REASON_CONTENT = $(NO_PERL)
+endif # NO_PERL
+
+$(_SCRIPT_PERL_NOGEN): % : unimplemented.sh
$(QUIET_GEN)$(RM) $@ $@+ && \
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
- -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
+ -e 's|@@REASON@@|$(_REASON)=$(_REASON_CONTENT)|g' \
unimplemented.sh >$@+ && \
chmod +x $@+ && \
mv $@+ $@
-endif # NO_PERL
# This makes sure we depend on the NO_PYTHON setting itself.
$(SCRIPT_PYTHON_GEN): GIT-BUILD-OPTIONS
@@ -2569,7 +2593,7 @@ LOCALIZED_C = $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H)
LOCALIZED_SH = $(SCRIPT_SH)
LOCALIZED_SH += git-rebase--preserve-merges.sh
LOCALIZED_SH += git-sh-setup.sh
-LOCALIZED_PERL = $(SCRIPT_PERL)
+LOCALIZED_PERL = $(SCRIPT_PERL) $(SCRIPT_PERL_CVS)
ifdef XGETTEXT_INCLUDE_TESTS
LOCALIZED_C += t/t0200/test.c
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index c5946cb0b8..223fd5409b 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -11,6 +11,11 @@ if ! test_have_prereq PERL; then
test_done
fi
+if ! test_have_prereq CVS; then
+ skip_all='skipping git cvsexportcommit tests, cvs not available'
+ test_done
+fi
+
cvs >/dev/null 2>&1
if test $? -ne 1
then
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index 2d29d486ee..2ca6db10e0 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -14,9 +14,15 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
if ! test_have_prereq PERL; then
- skip_all='skipping git cvsserver tests, perl not available'
+ skip_all='skipping git-cvsserver tests, perl not available'
test_done
fi
+
+if ! test_have_prereq CVS; then
+ skip_all='skipping git-cvsserver tests, cvs not available'
+ test_done
+fi
+
cvs >/dev/null 2>&1
if test $? -ne 1
then
diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
index a34805acdc..0d7759f73b 100755
--- a/t/t9401-git-cvsserver-crlf.sh
+++ b/t/t9401-git-cvsserver-crlf.sh
@@ -60,15 +60,20 @@ check_status_options() {
return $stat
}
-cvs >/dev/null 2>&1
-if test $? -ne 1
+if ! test_have_prereq PERL
then
- skip_all='skipping git-cvsserver tests, cvs not found'
+ skip_all='skipping git-cvsserver tests, perl not available'
test_done
fi
-if ! test_have_prereq PERL
+if ! test_have_prereq CVS
then
- skip_all='skipping git-cvsserver tests, perl not available'
+ skip_all='skipping git-cvsserver tests, cvs not available'
+ test_done
+fi
+cvs >/dev/null 2>&1
+if test $? -ne 1
+then
+ skip_all='skipping git-cvsserver tests, cvs not found'
test_done
fi
perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index 5680849218..7288db820b 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -11,14 +11,25 @@ if ! test_have_prereq NOT_ROOT; then
test_done
fi
-test_expect_success PERL 'setup cvsroot environment' '
+if ! test_have_prereq PERL
+then
+ skip_all='skipping git cvsimport tests, perl not available'
+ test_done
+fi
+if ! test_have_prereq CVS
+then
+ skip_all='skipping git cvsimport tests, cvs not available'
+ test_done
+fi
+
+test_expect_success 'setup cvsroot environment' '
CVSROOT=$(pwd)/cvsroot &&
export CVSROOT
'
-test_expect_success PERL 'setup cvsroot' '$CVS init'
+test_expect_success 'setup cvsroot' '$CVS init'
-test_expect_success PERL 'setup a cvs module' '
+test_expect_success 'setup a cvs module' '
mkdir "$CVSROOT/module" &&
$CVS co -d module-cvs module &&
@@ -50,23 +61,23 @@ EOF
)
'
-test_expect_success PERL 'import a trivial module' '
+test_expect_success 'import a trivial module' '
git cvsimport -a -R -z 0 -C module-git module &&
test_cmp module-cvs/o_fortuna module-git/o_fortuna
'
-test_expect_success PERL 'pack refs' '(cd module-git && git gc)'
+test_expect_success 'pack refs' '(cd module-git && git gc)'
-test_expect_success PERL 'initial import has correct .git/cvs-revisions' '
+test_expect_success 'initial import has correct .git/cvs-revisions' '
(cd module-git &&
git log --format="o_fortuna 1.1 %H" -1) > expected &&
test_cmp expected module-git/.git/cvs-revisions
'
-test_expect_success PERL 'update cvs module' '
+test_expect_success 'update cvs module' '
(cd module-cvs &&
cat <<EOF >o_fortuna &&
O Fortune,
@@ -94,7 +105,7 @@ EOF
)
'
-test_expect_success PERL 'update git module' '
+test_expect_success 'update git module' '
(cd module-git &&
git config cvsimport.trackRevisions true &&
@@ -105,7 +116,7 @@ test_expect_success PERL 'update git module' '
'
-test_expect_success PERL 'update has correct .git/cvs-revisions' '
+test_expect_success 'update has correct .git/cvs-revisions' '
(cd module-git &&
git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
@@ -113,7 +124,7 @@ test_expect_success PERL 'update has correct .git/cvs-revisions' '
test_cmp expected module-git/.git/cvs-revisions
'
-test_expect_success PERL 'update cvs module' '
+test_expect_success 'update cvs module' '
(cd module-cvs &&
echo 1 >tick &&
@@ -122,7 +133,7 @@ test_expect_success PERL 'update cvs module' '
)
'
-test_expect_success PERL 'cvsimport.module config works' '
+test_expect_success 'cvsimport.module config works' '
(cd module-git &&
git config cvsimport.module module &&
@@ -134,7 +145,7 @@ test_expect_success PERL 'cvsimport.module config works' '
'
-test_expect_success PERL 'second update has correct .git/cvs-revisions' '
+test_expect_success 'second update has correct .git/cvs-revisions' '
(cd module-git &&
git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
@@ -143,7 +154,7 @@ test_expect_success PERL 'second update has correct .git/cvs-revisions' '
test_cmp expected module-git/.git/cvs-revisions
'
-test_expect_success PERL 'import from a CVS working tree' '
+test_expect_success 'import from a CVS working tree' '
$CVS co -d import-from-wt module &&
(cd import-from-wt &&
@@ -156,12 +167,12 @@ test_expect_success PERL 'import from a CVS working tree' '
'
-test_expect_success PERL 'no .git/cvs-revisions created by default' '
+test_expect_success 'no .git/cvs-revisions created by default' '
! test -e import-from-wt/.git/cvs-revisions
'
-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree main'
+test_expect_success 'test entire HEAD' 'test_cmp_branch_tree main'
test_done
diff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh
index 116cddba3a..a7e7299c81 100755
--- a/t/t9601-cvsimport-vendor-branch.sh
+++ b/t/t9601-cvsimport-vendor-branch.sh
@@ -37,6 +37,17 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./lib-cvs.sh
+if ! test_have_prereq PERL
+then
+ skip_all='skipping git cvsimport tests, perl not available'
+ test_done
+fi
+if ! test_have_prereq CVS
+then
+ skip_all='skipping git cvsimport tests, cvs not available'
+ test_done
+fi
+
setup_cvs_test_repository t9601
test_expect_success PERL 'import a module with a vendor branch' '
diff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh
index e5266c9a87..0e1878ffd3 100755
--- a/t/t9602-cvsimport-branches-tags.sh
+++ b/t/t9602-cvsimport-branches-tags.sh
@@ -9,6 +9,17 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./lib-cvs.sh
+if ! test_have_prereq PERL
+then
+ skip_all='skipping git cvsimport tests, perl not available'
+ test_done
+fi
+if ! test_have_prereq CVS
+then
+ skip_all='skipping git cvsimport tests, cvs not available'
+ test_done
+fi
+
setup_cvs_test_repository t9602
test_expect_success PERL 'import module' '
diff --git a/t/t9603-cvsimport-patchsets.sh b/t/t9603-cvsimport-patchsets.sh
index 0e9daa5768..598c8595c5 100755
--- a/t/t9603-cvsimport-patchsets.sh
+++ b/t/t9603-cvsimport-patchsets.sh
@@ -17,6 +17,17 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./lib-cvs.sh
+if ! test_have_prereq PERL
+then
+ skip_all='skipping git cvsimport tests, perl not available'
+ test_done
+fi
+if ! test_have_prereq CVS
+then
+ skip_all='skipping git cvsimport tests, cvs not available'
+ test_done
+fi
+
setup_cvs_test_repository t9603
test_expect_failure PERL 'import with criss cross times on revisions' '
diff --git a/t/test-lib.sh b/t/test-lib.sh
index d3f6af6a65..588067bfd8 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1482,6 +1482,7 @@ parisc* | hppa*)
esac
( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
+test -z "$NO_CVS" && test_set_prereq CVS
test -z "$NO_PERL" && test_set_prereq PERL
test -z "$NO_PTHREADS" && test_set_prereq PTHREADS
test -z "$NO_PYTHON" && test_set_prereq PYTHON
--
2.30.1

View File

@ -1,22 +0,0 @@
https://www.spinics.net/lists/git/msg417169.html
https://bugs.gentoo.org/751907
The test fails when ${D} is exported in the environment. It actually _shouldn't_
be exported in src_test anyway, but Portage isn't yet fixed for this because
it'll break misbehaving ebuilds (see e.g. pkgcheck's VariableScope warnings).
Upstream are currently discussing other patches and work to find other cases
of environment contamination.
--- a/t/t5582-fetch-negative-refspec.sh
+++ b/t/t5582-fetch-negative-refspec.sh
@@ -105,7 +105,6 @@ test_expect_success "fetch with negative pattern refspec does not expand prefix"
'
test_expect_success "fetch with negative refspec avoids duplicate conflict" '
- cd "$D" &&
(
cd one &&
git branch dups/a &&
--
2.30.2

View File

@ -0,0 +1,22 @@
Don't examine outside of the prefix for gettext on macOS/Darwin.
https://bugs.gentoo.org/757309
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -148,17 +148,6 @@ ifeq ($(uname_S),Darwin)
HAVE_NS_GET_EXECUTABLE_PATH = YesPlease
CSPRNG_METHOD = arc4random
- # Workaround for `gettext` being keg-only and not even being linked via
- # `brew link --force gettext`, should be obsolete as of
- # https://github.com/Homebrew/homebrew-core/pull/53489
- ifeq ($(shell test -d /usr/local/opt/gettext/ && echo y),y)
- BASIC_CFLAGS += -I/usr/local/include -I/usr/local/opt/gettext/include
- BASIC_LDFLAGS += -L/usr/local/lib -L/usr/local/opt/gettext/lib
- ifeq ($(shell test -x /usr/local/opt/gettext/bin/msgfmt && echo y),y)
- MSGFMT = /usr/local/opt/gettext/bin/msgfmt
- endif
- endif
-
# The builtin FSMonitor on MacOS builds upon Simple-IPC. Both require
# Unix domain sockets and PThreads.
ifndef NO_PTHREADS

View File

@ -0,0 +1,14 @@
Neuter the "safe directory" feature, except for tests.
--- a/setup.c
+++ b/setup.c
@@ -1157,7 +1157,9 @@ static int ensure_valid_ownership(const char *gitfile,
*/
read_very_early_config(safe_directory_cb, &data);
- return data.is_safe;
+ if (git_env_bool("GIT_TEST_ASSUME_DIFFERENT_OWNER", 0))
+ return data.is_safe;
+ return 1;
}
enum discovery_result {

View File

@ -1,13 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
pidfile="/var/run/git-daemon.pid"
command="/usr/bin/git"
command_args="daemon ${GITDAEMON_OPTS}"
command_user="${GIT_USER:-nobody}:${GIT_GROUP:-nobody}"
start_stop_daemon_args="-e HOME= -e XDG_CONFIG_HOME= -b -m"
depend() {
use logger
}

View File

@ -1,644 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability:
# 9999-r0: maint
# 9999-r1: master
# 9999-r2: next
# 9999-r3: seen
case "${PVR}" in
9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;;
9999-r3) EGIT_BRANCH=seen ;;
esac
fi
MY_PV="${PV/_rc/.rc}"
MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? (
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
)"
[[ "${PV}" == *_rc* ]] || \
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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"
SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 subversion tk +threads +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND
DEPEND="
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? (
net-misc/curl
webdav? ( dev-libs/expat )
)
iconv? ( virtual/libiconv )
"
RDEPEND="${DEPEND}
gpg? ( app-crypt/gnupg )
perl? (
dev-perl/Error
dev-perl/MailTools
dev-perl/Authen-SASL
>=virtual/perl-libnet-3.110.0-r4[ssl]
cgi? (
dev-perl/CGI
highlight? ( app-text/highlight )
)
cvs? (
>=dev-vcs/cvsps-2.1:0
dev-perl/DBI
dev-perl/DBD-SQLite
)
mediawiki? (
dev-perl/DateTime-Format-ISO8601
dev-perl/HTML-Tree
dev-perl/MediaWiki-API
)
subversion? (
dev-vcs/subversion[-dso(-),perl]
dev-perl/libwww-perl
dev-perl/TermReadKey
)
)
perforce? ( ${PYTHON_DEPS} )
"
# This is how info docs are created with Git:
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
# .xml/docbook --(docbook2texi.pl)--> .texi
# .texi --(makeinfo)---------> .info
BDEPEND="
doc? (
app-text/asciidoc
app-text/docbook2X
app-text/xmlto
sys-apps/texinfo
)
gnome-keyring? ( virtual/pkgconfig )
nls? ( sys-devel/gettext )
test? ( app-crypt/gnupg )
"
# Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND}
app-text/asciidoc"
fi
SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE="
cgi? ( perl )
cvs? ( perl )
mediawiki? ( perl )
mediawiki-experimental? ( mediawiki )
perforce? ( ${PYTHON_REQUIRED_USE} )
subversion? ( perl )
webdav? ( curl )
"
RESTRICT="!test? ( test )"
PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad.
"${FILESDIR}"/git-2.31.0_rc0-optional-cvs.patch
# Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
# See bug #751907
# Test fails due to exported ${D} in src_test
"${FILESDIR}"/git-2.32.0-r1-test-t5582.patch
)
pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned."
fi
if use perforce ; then
python-single-r1_pkg_setup
fi
}
# This is needed because for some obscure reasons future calls to make don't
# pick up these exports if we export them in src_unpack()
exportmakeopts() {
local extlibs myopts
myopts=(
ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease)
)
if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi
if use curl ; then
use webdav || myopts+=( NO_EXPAT=YesPlease )
else
myopts+=( NO_CURL=YesPlease )
fi
# broken assumptions, because of static build system ...
myopts+=(
NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease
INSTALL=install
TAR=tar
SHELL_PATH="${EPREFIX}/bin/sh"
SANE_TOOL_PATH=
OLD_ICONV=
NO_EXTERNAL_GREP=
)
# can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 )
fi
if [[ ${CHOST} == *-solaris* ]]; then
myopts+=(
NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1
)
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 )
fi
fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}"
}
src_unpack() {
if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
popd &>/dev/null || die
fi
else
git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN .
fi
}
src_prepare() {
# add experimental patches to improve mediawiki support
# see patches for origin
if use mediawiki-experimental ; then
PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
)
fi
default
if use prefix ; then
# bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch
fi
sed -i \
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
Makefile || die
# Fix docbook2texi command
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
Documentation/Makefile || die
}
git_emake() {
# bug #320647: PYTHON_PATH
local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \
GIT_TEST_OPTS="--no-color" \
OPTAR="$(tc-getAR)" \
OPTCC="$(tc-getCC)" \
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \
PERL_PATH="${EPREFIX}/usr/bin/perl" \
PERL_MM_OPT="" \
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \
"$@"
}
src_configure() {
exportmakeopts
}
src_compile() {
git_emake || die "emake failed"
if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed"
fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi
pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed"
if use doc ; then
git_emake info html || die "emake info html failed"
fi
else
if use doc ; then
git_emake info || die "emake info html failed"
fi
fi
popd &>/dev/null || die
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi
pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die
# git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake || die
popd &>/dev/null || die
fi
}
src_install() {
git_emake DESTDIR="${D}" install || die "make install failed"
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
fi
# Depending on the tarball and manual rebuild of the documentation, the
# manpages may exist in either OR both of these directories.
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
use doc && dodir /usr/share/doc/${PF}/html
local d
for d in / /howto/ /technical/ ; do
docinto ${d}
dodoc Documentation${d}*.txt
if use doc ; then
docinto ${d}/html
dodoc Documentation${d}*.html
fi
done
docinto /
# Upstream does not ship this pre-built :-(
use doc && doinfo Documentation/{git,gitman}.info
newbashcomp contrib/completion/git-completion.bash ${PN}
bashcomp_alias git gitk
# Not really a bash-completion file (bug #477920)
# but still needed uncompressed (bug #507480)
insinto /usr/share/${PN}
doins contrib/completion/git-prompt.sh
#dobin contrib/fast-import/git-p4 # Moved upstream
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
newbin contrib/fast-import/import-tars.perl import-tars
exeinto /usr/libexec/git-core/
newexe contrib/git-resurrect.sh git-resurrect
# git-subtree
pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree"
if use doc ; then
# Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree"
fi
newdoc README README.git-subtree
dodoc git-subtree.txt
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi
# diff-highlight
dobin contrib/diff-highlight/diff-highlight
newdoc contrib/diff-highlight/README README.diff-highlight
# git-jump
exeinto /usr/libexec/git-core/
doexe contrib/git-jump/git-jump
newdoc contrib/git-jump/README git-jump.txt
# git-contacts
exeinto /usr/libexec/git-core/
doexe contrib/contacts/git-contacts
dodoc contrib/contacts/git-contacts.txt
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
dobin git-credential-libsecret
popd &>/dev/null || die
fi
dodir /usr/share/${PN}/contrib
# The following are excluded:
# completion - installed above
# diff-highlight - done above
# emacs - removed upstream
# examples - these are stuff that is not used in Git anymore actually
# git-jump - done above
# gitview - installed above
# p4import - excluded because fast-import has a better one
# patches - stuff the Git guys made to go upstream to other places
# persistent-https - TODO
# mw-to-git - TODO
# subtree - build seperately
# svnimport - use git-svn
# thunderbird-patch-inline - fixes thunderbird
local contrib_objects=(
buildsystems
fast-import
hg-to-git
hooks
remotes2config.sh
rerere-train.sh
stats
workdir
)
local i
for i in "${contrib_objects[@]}" ; do
cp -rf \
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done
if use perl && use cgi ; then
# We used to install in /usr/share/${PN}/gitweb
# but upstream installs in /usr/share/gitweb
# so we will install a symlink and use their location for compat with other
# distros
dosym ../gitweb /usr/share/${PN}/gitweb
# INSTALL discusses configuration issues, not just installation
docinto /
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
newdoc "${S}"/gitweb/README README.gitweb
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
if [[ -d "${d}" ]] ; then
find "${d}" -name .packlist -delete || die
fi
done
else
rm -rf "${ED}"/usr/share/gitweb
fi
if ! use subversion ; then
rm -f "${ED}"/usr/libexec/git-core/git-svn \
"${ED}"/usr/share/man/man1/git-svn.1*
fi
if use xinetd ; then
insinto /etc/xinetd.d
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
fi
if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket"
fi
perl_delete_localpod
# Remove disabled linguas
# we could remove sources in src_prepare, but install does not
# handle missing locale dir well
rm_loc() {
if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then
rm -r "${ED}/usr/share/locale/${1}" || die
fi
}
plocale_for_each_disabled_locale rm_loc
}
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() {
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:"
echo
showpkgdeps git-quiltimport "dev-util/quilt"
showpkgdeps git-instaweb \
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
}

View File

@ -1,640 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability:
# 9999-r0: maint
# 9999-r1: master
# 9999-r2: next
# 9999-r3: seen
case "${PVR}" in
9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;;
9999-r3) EGIT_BRANCH=seen ;;
esac
fi
MY_PV="${PV/_rc/.rc}"
MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? (
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
)"
[[ "${PV}" == *_rc* ]] || \
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"
SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 subversion tk +threads +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND
DEPEND="
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? (
net-misc/curl
webdav? ( dev-libs/expat )
)
iconv? ( virtual/libiconv )
"
RDEPEND="${DEPEND}
gpg? ( app-crypt/gnupg )
perl? (
dev-perl/Error
dev-perl/MailTools
dev-perl/Authen-SASL
>=virtual/perl-libnet-3.110.0-r4[ssl]
cgi? (
dev-perl/CGI
highlight? ( app-text/highlight )
)
cvs? (
>=dev-vcs/cvsps-2.1:0
dev-perl/DBI
dev-perl/DBD-SQLite
)
mediawiki? (
dev-perl/DateTime-Format-ISO8601
dev-perl/HTML-Tree
dev-perl/MediaWiki-API
)
subversion? (
dev-vcs/subversion[-dso(-),perl]
dev-perl/libwww-perl
dev-perl/TermReadKey
)
)
perforce? ( ${PYTHON_DEPS} )
"
# This is how info docs are created with Git:
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
# .xml/docbook --(docbook2texi.pl)--> .texi
# .texi --(makeinfo)---------> .info
BDEPEND="
doc? (
app-text/asciidoc
app-text/docbook2X
app-text/xmlto
sys-apps/texinfo
)
gnome-keyring? ( virtual/pkgconfig )
nls? ( sys-devel/gettext )
test? ( app-crypt/gnupg )
"
# Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND}
app-text/asciidoc"
fi
SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE="
cgi? ( perl )
cvs? ( perl )
mediawiki? ( perl )
mediawiki-experimental? ( mediawiki )
perforce? ( ${PYTHON_REQUIRED_USE} )
subversion? ( perl )
webdav? ( curl )
"
RESTRICT="!test? ( test )"
PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad.
"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch
# Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
)
pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned."
fi
if use perforce ; then
python-single-r1_pkg_setup
fi
}
# This is needed because for some obscure reasons future calls to make don't
# pick up these exports if we export them in src_unpack()
exportmakeopts() {
local extlibs myopts
myopts=(
ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease)
)
if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi
if use curl ; then
use webdav || myopts+=( NO_EXPAT=YesPlease )
else
myopts+=( NO_CURL=YesPlease )
fi
# broken assumptions, because of static build system ...
myopts+=(
NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease
INSTALL=install
TAR=tar
SHELL_PATH="${EPREFIX}/bin/sh"
SANE_TOOL_PATH=
OLD_ICONV=
NO_EXTERNAL_GREP=
)
# can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 )
fi
if [[ ${CHOST} == *-solaris* ]]; then
myopts+=(
NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1
)
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 )
fi
fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}"
}
src_unpack() {
if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
popd &>/dev/null || die
fi
else
git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN .
fi
}
src_prepare() {
# add experimental patches to improve mediawiki support
# see patches for origin
if use mediawiki-experimental ; then
PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
)
fi
default
if use prefix ; then
# bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch
fi
sed -i \
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
Makefile || die
# Fix docbook2texi command
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
Documentation/Makefile || die
}
git_emake() {
# bug #320647: PYTHON_PATH
local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \
GIT_TEST_OPTS="--no-color" \
OPTAR="$(tc-getAR)" \
OPTCC="$(tc-getCC)" \
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \
PERL_PATH="${EPREFIX}/usr/bin/perl" \
PERL_MM_OPT="" \
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \
"$@"
}
src_configure() {
exportmakeopts
}
src_compile() {
git_emake || die "emake failed"
if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed"
fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi
pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed"
if use doc ; then
git_emake info html || die "emake info html failed"
fi
else
if use doc ; then
git_emake info || die "emake info html failed"
fi
fi
popd &>/dev/null || die
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi
pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die
# git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake || die
popd &>/dev/null || die
fi
}
src_install() {
git_emake DESTDIR="${D}" install || die "make install failed"
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
fi
# Depending on the tarball and manual rebuild of the documentation, the
# manpages may exist in either OR both of these directories.
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
use doc && dodir /usr/share/doc/${PF}/html
local d
for d in / /howto/ /technical/ ; do
docinto ${d}
dodoc Documentation${d}*.txt
if use doc ; then
docinto ${d}/html
dodoc Documentation${d}*.html
fi
done
docinto /
# Upstream does not ship this pre-built :-(
use doc && doinfo Documentation/{git,gitman}.info
newbashcomp contrib/completion/git-completion.bash ${PN}
bashcomp_alias git gitk
# Not really a bash-completion file (bug #477920)
# but still needed uncompressed (bug #507480)
insinto /usr/share/${PN}
doins contrib/completion/git-prompt.sh
#dobin contrib/fast-import/git-p4 # Moved upstream
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
newbin contrib/fast-import/import-tars.perl import-tars
exeinto /usr/libexec/git-core/
newexe contrib/git-resurrect.sh git-resurrect
# git-subtree
pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree"
if use doc ; then
# Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree"
fi
newdoc README README.git-subtree
dodoc git-subtree.txt
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi
# diff-highlight
dobin contrib/diff-highlight/diff-highlight
newdoc contrib/diff-highlight/README README.diff-highlight
# git-jump
exeinto /usr/libexec/git-core/
doexe contrib/git-jump/git-jump
newdoc contrib/git-jump/README git-jump.txt
# git-contacts
exeinto /usr/libexec/git-core/
doexe contrib/contacts/git-contacts
dodoc contrib/contacts/git-contacts.txt
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
dobin git-credential-libsecret
popd &>/dev/null || die
fi
dodir /usr/share/${PN}/contrib
# The following are excluded:
# completion - installed above
# diff-highlight - done above
# emacs - removed upstream
# examples - these are stuff that is not used in Git anymore actually
# git-jump - done above
# gitview - installed above
# p4import - excluded because fast-import has a better one
# patches - stuff the Git guys made to go upstream to other places
# persistent-https - TODO
# mw-to-git - TODO
# subtree - build seperately
# svnimport - use git-svn
# thunderbird-patch-inline - fixes thunderbird
local contrib_objects=(
buildsystems
fast-import
hg-to-git
hooks
remotes2config.sh
rerere-train.sh
stats
workdir
)
local i
for i in "${contrib_objects[@]}" ; do
cp -rf \
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done
if use perl && use cgi ; then
# We used to install in /usr/share/${PN}/gitweb
# but upstream installs in /usr/share/gitweb
# so we will install a symlink and use their location for compat with other
# distros
dosym ../gitweb /usr/share/${PN}/gitweb
# INSTALL discusses configuration issues, not just installation
docinto /
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
newdoc "${S}"/gitweb/README README.gitweb
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
if [[ -d "${d}" ]] ; then
find "${d}" -name .packlist -delete || die
fi
done
else
rm -rf "${ED}"/usr/share/gitweb
fi
if ! use subversion ; then
rm -f "${ED}"/usr/libexec/git-core/git-svn \
"${ED}"/usr/share/man/man1/git-svn.1*
fi
if use xinetd ; then
insinto /etc/xinetd.d
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
fi
if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket"
fi
perl_delete_localpod
# Remove disabled linguas
# we could remove sources in src_prepare, but install does not
# handle missing locale dir well
rm_loc() {
if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then
rm -r "${ED}/usr/share/locale/${1}" || die
fi
}
plocale_for_each_disabled_locale rm_loc
}
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() {
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:"
echo
showpkgdeps git-quiltimport "dev-util/quilt"
showpkgdeps git-instaweb \
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
}

View File

@ -1,640 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability:
# 9999-r0: maint
# 9999-r1: master
# 9999-r2: next
# 9999-r3: seen
case "${PVR}" in
9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;;
9999-r3) EGIT_BRANCH=seen ;;
esac
fi
MY_PV="${PV/_rc/.rc}"
MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? (
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
)"
[[ "${PV}" == *_rc* ]] || \
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"
SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 subversion tk +threads +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND
DEPEND="
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? (
net-misc/curl
webdav? ( dev-libs/expat )
)
iconv? ( virtual/libiconv )
"
RDEPEND="${DEPEND}
gpg? ( app-crypt/gnupg )
perl? (
dev-perl/Error
dev-perl/MailTools
dev-perl/Authen-SASL
>=virtual/perl-libnet-3.110.0-r4[ssl]
cgi? (
dev-perl/CGI
highlight? ( app-text/highlight )
)
cvs? (
>=dev-vcs/cvsps-2.1:0
dev-perl/DBI
dev-perl/DBD-SQLite
)
mediawiki? (
dev-perl/DateTime-Format-ISO8601
dev-perl/HTML-Tree
dev-perl/MediaWiki-API
)
subversion? (
dev-vcs/subversion[-dso(-),perl]
dev-perl/libwww-perl
dev-perl/TermReadKey
)
)
perforce? ( ${PYTHON_DEPS} )
"
# This is how info docs are created with Git:
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
# .xml/docbook --(docbook2texi.pl)--> .texi
# .texi --(makeinfo)---------> .info
BDEPEND="
doc? (
app-text/asciidoc
app-text/docbook2X
app-text/xmlto
sys-apps/texinfo
)
gnome-keyring? ( virtual/pkgconfig )
nls? ( sys-devel/gettext )
test? ( app-crypt/gnupg )
"
# Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND}
app-text/asciidoc"
fi
SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE="
cgi? ( perl )
cvs? ( perl )
mediawiki? ( perl )
mediawiki-experimental? ( mediawiki )
perforce? ( ${PYTHON_REQUIRED_USE} )
subversion? ( perl )
webdav? ( curl )
"
RESTRICT="!test? ( test )"
PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad.
"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch
# Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
)
pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned."
fi
if use perforce ; then
python-single-r1_pkg_setup
fi
}
# This is needed because for some obscure reasons future calls to make don't
# pick up these exports if we export them in src_unpack()
exportmakeopts() {
local extlibs myopts
myopts=(
ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease)
)
if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi
if use curl ; then
use webdav || myopts+=( NO_EXPAT=YesPlease )
else
myopts+=( NO_CURL=YesPlease )
fi
# broken assumptions, because of static build system ...
myopts+=(
NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease
INSTALL=install
TAR=tar
SHELL_PATH="${EPREFIX}/bin/sh"
SANE_TOOL_PATH=
OLD_ICONV=
NO_EXTERNAL_GREP=
)
# can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 )
fi
if [[ ${CHOST} == *-solaris* ]]; then
myopts+=(
NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1
)
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 )
fi
fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}"
}
src_unpack() {
if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
popd &>/dev/null || die
fi
else
git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN .
fi
}
src_prepare() {
# add experimental patches to improve mediawiki support
# see patches for origin
if use mediawiki-experimental ; then
PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
)
fi
default
if use prefix ; then
# bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch
fi
sed -i \
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
Makefile || die
# Fix docbook2texi command
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
Documentation/Makefile || die
}
git_emake() {
# bug #320647: PYTHON_PATH
local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \
GIT_TEST_OPTS="--no-color" \
OPTAR="$(tc-getAR)" \
OPTCC="$(tc-getCC)" \
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \
PERL_PATH="${EPREFIX}/usr/bin/perl" \
PERL_MM_OPT="" \
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \
"$@"
}
src_configure() {
exportmakeopts
}
src_compile() {
git_emake || die "emake failed"
if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed"
fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi
pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed"
if use doc ; then
git_emake info html || die "emake info html failed"
fi
else
if use doc ; then
git_emake info || die "emake info html failed"
fi
fi
popd &>/dev/null || die
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi
pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die
# git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake || die
popd &>/dev/null || die
fi
}
src_install() {
git_emake DESTDIR="${D}" install || die "make install failed"
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
fi
# Depending on the tarball and manual rebuild of the documentation, the
# manpages may exist in either OR both of these directories.
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
use doc && dodir /usr/share/doc/${PF}/html
local d
for d in / /howto/ /technical/ ; do
docinto ${d}
dodoc Documentation${d}*.txt
if use doc ; then
docinto ${d}/html
dodoc Documentation${d}*.html
fi
done
docinto /
# Upstream does not ship this pre-built :-(
use doc && doinfo Documentation/{git,gitman}.info
newbashcomp contrib/completion/git-completion.bash ${PN}
bashcomp_alias git gitk
# Not really a bash-completion file (bug #477920)
# but still needed uncompressed (bug #507480)
insinto /usr/share/${PN}
doins contrib/completion/git-prompt.sh
#dobin contrib/fast-import/git-p4 # Moved upstream
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
newbin contrib/fast-import/import-tars.perl import-tars
exeinto /usr/libexec/git-core/
newexe contrib/git-resurrect.sh git-resurrect
# git-subtree
pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree"
if use doc ; then
# Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree"
fi
newdoc README README.git-subtree
dodoc git-subtree.txt
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi
# diff-highlight
dobin contrib/diff-highlight/diff-highlight
newdoc contrib/diff-highlight/README README.diff-highlight
# git-jump
exeinto /usr/libexec/git-core/
doexe contrib/git-jump/git-jump
newdoc contrib/git-jump/README git-jump.txt
# git-contacts
exeinto /usr/libexec/git-core/
doexe contrib/contacts/git-contacts
dodoc contrib/contacts/git-contacts.txt
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
dobin git-credential-libsecret
popd &>/dev/null || die
fi
dodir /usr/share/${PN}/contrib
# The following are excluded:
# completion - installed above
# diff-highlight - done above
# emacs - removed upstream
# examples - these are stuff that is not used in Git anymore actually
# git-jump - done above
# gitview - installed above
# p4import - excluded because fast-import has a better one
# patches - stuff the Git guys made to go upstream to other places
# persistent-https - TODO
# mw-to-git - TODO
# subtree - build seperately
# svnimport - use git-svn
# thunderbird-patch-inline - fixes thunderbird
local contrib_objects=(
buildsystems
fast-import
hg-to-git
hooks
remotes2config.sh
rerere-train.sh
stats
workdir
)
local i
for i in "${contrib_objects[@]}" ; do
cp -rf \
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done
if use perl && use cgi ; then
# We used to install in /usr/share/${PN}/gitweb
# but upstream installs in /usr/share/gitweb
# so we will install a symlink and use their location for compat with other
# distros
dosym ../gitweb /usr/share/${PN}/gitweb
# INSTALL discusses configuration issues, not just installation
docinto /
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
newdoc "${S}"/gitweb/README README.gitweb
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
if [[ -d "${d}" ]] ; then
find "${d}" -name .packlist -delete || die
fi
done
else
rm -rf "${ED}"/usr/share/gitweb
fi
if ! use subversion ; then
rm -f "${ED}"/usr/libexec/git-core/git-svn \
"${ED}"/usr/share/man/man1/git-svn.1*
fi
if use xinetd ; then
insinto /etc/xinetd.d
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
fi
if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket"
fi
perl_delete_localpod
# Remove disabled linguas
# we could remove sources in src_prepare, but install does not
# handle missing locale dir well
rm_loc() {
if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then
rm -r "${ED}/usr/share/locale/${1}" || die
fi
}
plocale_for_each_disabled_locale rm_loc
}
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() {
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:"
echo
showpkgdeps git-quiltimport "dev-util/quilt"
showpkgdeps git-instaweb \
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
}

View File

@ -1,640 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability:
# 9999-r0: maint
# 9999-r1: master
# 9999-r2: next
# 9999-r3: seen
case "${PVR}" in
9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;;
9999-r3) EGIT_BRANCH=seen ;;
esac
fi
MY_PV="${PV/_rc/.rc}"
MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? (
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
)"
[[ "${PV}" == *_rc* ]] || \
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"
SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 subversion tk +threads +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND
DEPEND="
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? (
net-misc/curl
webdav? ( dev-libs/expat )
)
iconv? ( virtual/libiconv )
"
RDEPEND="${DEPEND}
gpg? ( app-crypt/gnupg )
perl? (
dev-perl/Error
dev-perl/MailTools
dev-perl/Authen-SASL
>=virtual/perl-libnet-3.110.0-r4[ssl]
cgi? (
dev-perl/CGI
highlight? ( app-text/highlight )
)
cvs? (
>=dev-vcs/cvsps-2.1:0
dev-perl/DBI
dev-perl/DBD-SQLite
)
mediawiki? (
dev-perl/DateTime-Format-ISO8601
dev-perl/HTML-Tree
dev-perl/MediaWiki-API
)
subversion? (
dev-vcs/subversion[-dso(-),perl]
dev-perl/libwww-perl
dev-perl/TermReadKey
)
)
perforce? ( ${PYTHON_DEPS} )
"
# This is how info docs are created with Git:
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
# .xml/docbook --(docbook2texi.pl)--> .texi
# .texi --(makeinfo)---------> .info
BDEPEND="
doc? (
app-text/asciidoc
app-text/docbook2X
app-text/xmlto
sys-apps/texinfo
)
gnome-keyring? ( virtual/pkgconfig )
nls? ( sys-devel/gettext )
test? ( app-crypt/gnupg )
"
# Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND}
app-text/asciidoc"
fi
SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE="
cgi? ( perl )
cvs? ( perl )
mediawiki? ( perl )
mediawiki-experimental? ( mediawiki )
perforce? ( ${PYTHON_REQUIRED_USE} )
subversion? ( perl )
webdav? ( curl )
"
RESTRICT="!test? ( test )"
PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad.
"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch
# Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
)
pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned."
fi
if use perforce ; then
python-single-r1_pkg_setup
fi
}
# This is needed because for some obscure reasons future calls to make don't
# pick up these exports if we export them in src_unpack()
exportmakeopts() {
local extlibs myopts
myopts=(
ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease)
)
if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi
if use curl ; then
use webdav || myopts+=( NO_EXPAT=YesPlease )
else
myopts+=( NO_CURL=YesPlease )
fi
# broken assumptions, because of static build system ...
myopts+=(
NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease
INSTALL=install
TAR=tar
SHELL_PATH="${EPREFIX}/bin/sh"
SANE_TOOL_PATH=
OLD_ICONV=
NO_EXTERNAL_GREP=
)
# can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 )
fi
if [[ ${CHOST} == *-solaris* ]]; then
myopts+=(
NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1
)
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 )
fi
fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}"
}
src_unpack() {
if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
popd &>/dev/null || die
fi
else
git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN .
fi
}
src_prepare() {
# add experimental patches to improve mediawiki support
# see patches for origin
if use mediawiki-experimental ; then
PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
)
fi
default
if use prefix ; then
# bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch
fi
sed -i \
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
Makefile || die
# Fix docbook2texi command
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
Documentation/Makefile || die
}
git_emake() {
# bug #320647: PYTHON_PATH
local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \
GIT_TEST_OPTS="--no-color" \
OPTAR="$(tc-getAR)" \
OPTCC="$(tc-getCC)" \
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \
PERL_PATH="${EPREFIX}/usr/bin/perl" \
PERL_MM_OPT="" \
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \
"$@"
}
src_configure() {
exportmakeopts
}
src_compile() {
git_emake || die "emake failed"
if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed"
fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi
pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed"
if use doc ; then
git_emake info html || die "emake info html failed"
fi
else
if use doc ; then
git_emake info || die "emake info html failed"
fi
fi
popd &>/dev/null || die
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi
pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die
# git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake || die
popd &>/dev/null || die
fi
}
src_install() {
git_emake DESTDIR="${D}" install || die "make install failed"
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
fi
# Depending on the tarball and manual rebuild of the documentation, the
# manpages may exist in either OR both of these directories.
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
use doc && dodir /usr/share/doc/${PF}/html
local d
for d in / /howto/ /technical/ ; do
docinto ${d}
dodoc Documentation${d}*.txt
if use doc ; then
docinto ${d}/html
dodoc Documentation${d}*.html
fi
done
docinto /
# Upstream does not ship this pre-built :-(
use doc && doinfo Documentation/{git,gitman}.info
newbashcomp contrib/completion/git-completion.bash ${PN}
bashcomp_alias git gitk
# Not really a bash-completion file (bug #477920)
# but still needed uncompressed (bug #507480)
insinto /usr/share/${PN}
doins contrib/completion/git-prompt.sh
#dobin contrib/fast-import/git-p4 # Moved upstream
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
newbin contrib/fast-import/import-tars.perl import-tars
exeinto /usr/libexec/git-core/
newexe contrib/git-resurrect.sh git-resurrect
# git-subtree
pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree"
if use doc ; then
# Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree"
fi
newdoc README README.git-subtree
dodoc git-subtree.txt
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi
# diff-highlight
dobin contrib/diff-highlight/diff-highlight
newdoc contrib/diff-highlight/README README.diff-highlight
# git-jump
exeinto /usr/libexec/git-core/
doexe contrib/git-jump/git-jump
newdoc contrib/git-jump/README git-jump.txt
# git-contacts
exeinto /usr/libexec/git-core/
doexe contrib/contacts/git-contacts
dodoc contrib/contacts/git-contacts.txt
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
dobin git-credential-libsecret
popd &>/dev/null || die
fi
dodir /usr/share/${PN}/contrib
# The following are excluded:
# completion - installed above
# diff-highlight - done above
# emacs - removed upstream
# examples - these are stuff that is not used in Git anymore actually
# git-jump - done above
# gitview - installed above
# p4import - excluded because fast-import has a better one
# patches - stuff the Git guys made to go upstream to other places
# persistent-https - TODO
# mw-to-git - TODO
# subtree - build seperately
# svnimport - use git-svn
# thunderbird-patch-inline - fixes thunderbird
local contrib_objects=(
buildsystems
fast-import
hg-to-git
hooks
remotes2config.sh
rerere-train.sh
stats
workdir
)
local i
for i in "${contrib_objects[@]}" ; do
cp -rf \
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done
if use perl && use cgi ; then
# We used to install in /usr/share/${PN}/gitweb
# but upstream installs in /usr/share/gitweb
# so we will install a symlink and use their location for compat with other
# distros
dosym ../gitweb /usr/share/${PN}/gitweb
# INSTALL discusses configuration issues, not just installation
docinto /
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
newdoc "${S}"/gitweb/README README.gitweb
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
if [[ -d "${d}" ]] ; then
find "${d}" -name .packlist -delete || die
fi
done
else
rm -rf "${ED}"/usr/share/gitweb
fi
if ! use subversion ; then
rm -f "${ED}"/usr/libexec/git-core/git-svn \
"${ED}"/usr/share/man/man1/git-svn.1*
fi
if use xinetd ; then
insinto /etc/xinetd.d
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
fi
if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket"
fi
perl_delete_localpod
# Remove disabled linguas
# we could remove sources in src_prepare, but install does not
# handle missing locale dir well
rm_loc() {
if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then
rm -r "${ED}/usr/share/locale/${1}" || die
fi
}
plocale_for_each_disabled_locale rm_loc
}
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() {
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:"
echo
showpkgdeps git-quiltimport "dev-util/quilt"
showpkgdeps git-instaweb \
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
}

View File

@ -1,640 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability:
# 9999-r0: maint
# 9999-r1: master
# 9999-r2: next
# 9999-r3: seen
case "${PVR}" in
9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;;
9999-r3) EGIT_BRANCH=seen ;;
esac
fi
MY_PV="${PV/_rc/.rc}"
MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? (
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
)"
[[ "${PV}" == *_rc* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 subversion tk +threads +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND
DEPEND="
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? (
net-misc/curl
webdav? ( dev-libs/expat )
)
iconv? ( virtual/libiconv )
"
RDEPEND="${DEPEND}
gpg? ( app-crypt/gnupg )
perl? (
dev-perl/Error
dev-perl/MailTools
dev-perl/Authen-SASL
>=virtual/perl-libnet-3.110.0-r4[ssl]
cgi? (
dev-perl/CGI
highlight? ( app-text/highlight )
)
cvs? (
>=dev-vcs/cvsps-2.1:0
dev-perl/DBI
dev-perl/DBD-SQLite
)
mediawiki? (
dev-perl/DateTime-Format-ISO8601
dev-perl/HTML-Tree
dev-perl/MediaWiki-API
)
subversion? (
dev-vcs/subversion[-dso(-),perl]
dev-perl/libwww-perl
dev-perl/TermReadKey
)
)
perforce? ( ${PYTHON_DEPS} )
"
# This is how info docs are created with Git:
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
# .xml/docbook --(docbook2texi.pl)--> .texi
# .texi --(makeinfo)---------> .info
BDEPEND="
doc? (
app-text/asciidoc
app-text/docbook2X
app-text/xmlto
sys-apps/texinfo
)
gnome-keyring? ( virtual/pkgconfig )
nls? ( sys-devel/gettext )
test? ( app-crypt/gnupg )
"
# Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND}
app-text/asciidoc"
fi
SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE="
cgi? ( perl )
cvs? ( perl )
mediawiki? ( perl )
mediawiki-experimental? ( mediawiki )
perforce? ( ${PYTHON_REQUIRED_USE} )
subversion? ( perl )
webdav? ( curl )
"
RESTRICT="!test? ( test )"
PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad.
"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch
# Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
)
pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned."
fi
if use perforce ; then
python-single-r1_pkg_setup
fi
}
# This is needed because for some obscure reasons future calls to make don't
# pick up these exports if we export them in src_unpack()
exportmakeopts() {
local extlibs myopts
myopts=(
ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease)
)
if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi
if use curl ; then
use webdav || myopts+=( NO_EXPAT=YesPlease )
else
myopts+=( NO_CURL=YesPlease )
fi
# broken assumptions, because of static build system ...
myopts+=(
NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease
INSTALL=install
TAR=tar
SHELL_PATH="${EPREFIX}/bin/sh"
SANE_TOOL_PATH=
OLD_ICONV=
NO_EXTERNAL_GREP=
)
# can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 )
fi
if [[ ${CHOST} == *-solaris* ]]; then
myopts+=(
NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1
)
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 )
fi
fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}"
}
src_unpack() {
if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
popd &>/dev/null || die
fi
else
git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN .
fi
}
src_prepare() {
# add experimental patches to improve mediawiki support
# see patches for origin
if use mediawiki-experimental ; then
PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
)
fi
default
if use prefix ; then
# bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch
fi
sed -i \
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
Makefile || die
# Fix docbook2texi command
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
Documentation/Makefile || die
}
git_emake() {
# bug #320647: PYTHON_PATH
local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \
GIT_TEST_OPTS="--no-color" \
OPTAR="$(tc-getAR)" \
OPTCC="$(tc-getCC)" \
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \
PERL_PATH="${EPREFIX}/usr/bin/perl" \
PERL_MM_OPT="" \
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \
"$@"
}
src_configure() {
exportmakeopts
}
src_compile() {
git_emake || die "emake failed"
if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed"
fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi
pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed"
if use doc ; then
git_emake info html || die "emake info html failed"
fi
else
if use doc ; then
git_emake info || die "emake info html failed"
fi
fi
popd &>/dev/null || die
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi
pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die
# git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake || die
popd &>/dev/null || die
fi
}
src_install() {
git_emake DESTDIR="${D}" install || die "make install failed"
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
fi
# Depending on the tarball and manual rebuild of the documentation, the
# manpages may exist in either OR both of these directories.
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
use doc && dodir /usr/share/doc/${PF}/html
local d
for d in / /howto/ /technical/ ; do
docinto ${d}
dodoc Documentation${d}*.txt
if use doc ; then
docinto ${d}/html
dodoc Documentation${d}*.html
fi
done
docinto /
# Upstream does not ship this pre-built :-(
use doc && doinfo Documentation/{git,gitman}.info
newbashcomp contrib/completion/git-completion.bash ${PN}
bashcomp_alias git gitk
# Not really a bash-completion file (bug #477920)
# but still needed uncompressed (bug #507480)
insinto /usr/share/${PN}
doins contrib/completion/git-prompt.sh
#dobin contrib/fast-import/git-p4 # Moved upstream
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
newbin contrib/fast-import/import-tars.perl import-tars
exeinto /usr/libexec/git-core/
newexe contrib/git-resurrect.sh git-resurrect
# git-subtree
pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree"
if use doc ; then
# Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree"
fi
newdoc README README.git-subtree
dodoc git-subtree.txt
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi
# diff-highlight
dobin contrib/diff-highlight/diff-highlight
newdoc contrib/diff-highlight/README README.diff-highlight
# git-jump
exeinto /usr/libexec/git-core/
doexe contrib/git-jump/git-jump
newdoc contrib/git-jump/README git-jump.txt
# git-contacts
exeinto /usr/libexec/git-core/
doexe contrib/contacts/git-contacts
dodoc contrib/contacts/git-contacts.txt
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
dobin git-credential-libsecret
popd &>/dev/null || die
fi
dodir /usr/share/${PN}/contrib
# The following are excluded:
# completion - installed above
# diff-highlight - done above
# emacs - removed upstream
# examples - these are stuff that is not used in Git anymore actually
# git-jump - done above
# gitview - installed above
# p4import - excluded because fast-import has a better one
# patches - stuff the Git guys made to go upstream to other places
# persistent-https - TODO
# mw-to-git - TODO
# subtree - build seperately
# svnimport - use git-svn
# thunderbird-patch-inline - fixes thunderbird
local contrib_objects=(
buildsystems
fast-import
hg-to-git
hooks
remotes2config.sh
rerere-train.sh
stats
workdir
)
local i
for i in "${contrib_objects[@]}" ; do
cp -rf \
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done
if use perl && use cgi ; then
# We used to install in /usr/share/${PN}/gitweb
# but upstream installs in /usr/share/gitweb
# so we will install a symlink and use their location for compat with other
# distros
dosym ../gitweb /usr/share/${PN}/gitweb
# INSTALL discusses configuration issues, not just installation
docinto /
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
newdoc "${S}"/gitweb/README README.gitweb
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
if [[ -d "${d}" ]] ; then
find "${d}" -name .packlist -delete || die
fi
done
else
rm -rf "${ED}"/usr/share/gitweb
fi
if ! use subversion ; then
rm -f "${ED}"/usr/libexec/git-core/git-svn \
"${ED}"/usr/share/man/man1/git-svn.1*
fi
if use xinetd ; then
insinto /etc/xinetd.d
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
fi
if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket"
fi
perl_delete_localpod
# Remove disabled linguas
# we could remove sources in src_prepare, but install does not
# handle missing locale dir well
rm_loc() {
if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then
rm -r "${ED}/usr/share/locale/${1}" || die
fi
}
plocale_for_each_disabled_locale rm_loc
}
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() {
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:"
echo
showpkgdeps git-quiltimport "dev-util/quilt"
showpkgdeps git-instaweb \
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
}

View File

@ -1,641 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability:
# 9999-r0: maint
# 9999-r1: master
# 9999-r2: next
# 9999-r3: seen
case "${PVR}" in
9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;;
9999-r3) EGIT_BRANCH=seen ;;
esac
fi
MY_PV="${PV/_rc/.rc}"
MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? (
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
)"
[[ "${PV}" == *_rc* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 selinux subversion tk +threads +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND
DEPEND="
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? (
net-misc/curl
webdav? ( dev-libs/expat )
)
iconv? ( virtual/libiconv )
"
RDEPEND="${DEPEND}
gpg? ( app-crypt/gnupg )
perl? (
dev-perl/Error
dev-perl/MailTools
dev-perl/Authen-SASL
>=virtual/perl-libnet-3.110.0-r4[ssl]
cgi? (
dev-perl/CGI
highlight? ( app-text/highlight )
)
cvs? (
>=dev-vcs/cvsps-2.1:0
dev-perl/DBI
dev-perl/DBD-SQLite
)
mediawiki? (
dev-perl/DateTime-Format-ISO8601
dev-perl/HTML-Tree
dev-perl/MediaWiki-API
)
subversion? (
dev-vcs/subversion[-dso(-),perl]
dev-perl/libwww-perl
dev-perl/TermReadKey
)
)
perforce? ( ${PYTHON_DEPS} )
selinux? ( sec-policy/selinux-git )
"
# This is how info docs are created with Git:
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
# .xml/docbook --(docbook2texi.pl)--> .texi
# .texi --(makeinfo)---------> .info
BDEPEND="
doc? (
app-text/asciidoc
app-text/docbook2X
app-text/xmlto
sys-apps/texinfo
)
gnome-keyring? ( virtual/pkgconfig )
nls? ( sys-devel/gettext )
test? ( app-crypt/gnupg )
"
# Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND}
app-text/asciidoc"
fi
SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE="
cgi? ( perl )
cvs? ( perl )
mediawiki? ( perl )
mediawiki-experimental? ( mediawiki )
perforce? ( ${PYTHON_REQUIRED_USE} )
subversion? ( perl )
webdav? ( curl )
"
RESTRICT="!test? ( test )"
PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad.
"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch
# Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
)
pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned."
fi
if use perforce ; then
python-single-r1_pkg_setup
fi
}
# This is needed because for some obscure reasons future calls to make don't
# pick up these exports if we export them in src_unpack()
exportmakeopts() {
local extlibs myopts
myopts=(
ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease)
)
if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi
if use curl ; then
use webdav || myopts+=( NO_EXPAT=YesPlease )
else
myopts+=( NO_CURL=YesPlease )
fi
# broken assumptions, because of static build system ...
myopts+=(
NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease
INSTALL=install
TAR=tar
SHELL_PATH="${EPREFIX}/bin/sh"
SANE_TOOL_PATH=
OLD_ICONV=
NO_EXTERNAL_GREP=
)
# can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 )
fi
if [[ ${CHOST} == *-solaris* ]]; then
myopts+=(
NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1
)
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 )
fi
fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}"
}
src_unpack() {
if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
popd &>/dev/null || die
fi
else
git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN .
fi
}
src_prepare() {
# add experimental patches to improve mediawiki support
# see patches for origin
if use mediawiki-experimental ; then
PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
)
fi
default
if use prefix ; then
# bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch
fi
sed -i \
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
Makefile || die
# Fix docbook2texi command
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
Documentation/Makefile || die
}
git_emake() {
# bug #320647: PYTHON_PATH
local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \
GIT_TEST_OPTS="--no-color" \
OPTAR="$(tc-getAR)" \
OPTCC="$(tc-getCC)" \
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \
PERL_PATH="${EPREFIX}/usr/bin/perl" \
PERL_MM_OPT="" \
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \
"$@"
}
src_configure() {
exportmakeopts
}
src_compile() {
git_emake || die "emake failed"
if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed"
fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi
pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed"
if use doc ; then
git_emake info html || die "emake info html failed"
fi
else
if use doc ; then
git_emake info || die "emake info html failed"
fi
fi
popd &>/dev/null || die
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi
pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die
# git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake || die
popd &>/dev/null || die
fi
}
src_install() {
git_emake DESTDIR="${D}" install || die "make install failed"
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
fi
# Depending on the tarball and manual rebuild of the documentation, the
# manpages may exist in either OR both of these directories.
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
use doc && dodir /usr/share/doc/${PF}/html
local d
for d in / /howto/ /technical/ ; do
docinto ${d}
dodoc Documentation${d}*.txt
if use doc ; then
docinto ${d}/html
dodoc Documentation${d}*.html
fi
done
docinto /
# Upstream does not ship this pre-built :-(
use doc && doinfo Documentation/{git,gitman}.info
newbashcomp contrib/completion/git-completion.bash ${PN}
bashcomp_alias git gitk
# Not really a bash-completion file (bug #477920)
# but still needed uncompressed (bug #507480)
insinto /usr/share/${PN}
doins contrib/completion/git-prompt.sh
#dobin contrib/fast-import/git-p4 # Moved upstream
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
newbin contrib/fast-import/import-tars.perl import-tars
exeinto /usr/libexec/git-core/
newexe contrib/git-resurrect.sh git-resurrect
# git-subtree
pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree"
if use doc ; then
# Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree"
fi
newdoc README README.git-subtree
dodoc git-subtree.txt
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi
# diff-highlight
dobin contrib/diff-highlight/diff-highlight
newdoc contrib/diff-highlight/README README.diff-highlight
# git-jump
exeinto /usr/libexec/git-core/
doexe contrib/git-jump/git-jump
newdoc contrib/git-jump/README git-jump.txt
# git-contacts
exeinto /usr/libexec/git-core/
doexe contrib/contacts/git-contacts
dodoc contrib/contacts/git-contacts.txt
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
dobin git-credential-libsecret
popd &>/dev/null || die
fi
dodir /usr/share/${PN}/contrib
# The following are excluded:
# completion - installed above
# diff-highlight - done above
# emacs - removed upstream
# examples - these are stuff that is not used in Git anymore actually
# git-jump - done above
# gitview - installed above
# p4import - excluded because fast-import has a better one
# patches - stuff the Git guys made to go upstream to other places
# persistent-https - TODO
# mw-to-git - TODO
# subtree - build seperately
# svnimport - use git-svn
# thunderbird-patch-inline - fixes thunderbird
local contrib_objects=(
buildsystems
fast-import
hg-to-git
hooks
remotes2config.sh
rerere-train.sh
stats
workdir
)
local i
for i in "${contrib_objects[@]}" ; do
cp -rf \
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done
if use perl && use cgi ; then
# We used to install in /usr/share/${PN}/gitweb
# but upstream installs in /usr/share/gitweb
# so we will install a symlink and use their location for compat with other
# distros
dosym ../gitweb /usr/share/${PN}/gitweb
# INSTALL discusses configuration issues, not just installation
docinto /
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
newdoc "${S}"/gitweb/README README.gitweb
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
if [[ -d "${d}" ]] ; then
find "${d}" -name .packlist -delete || die
fi
done
else
rm -rf "${ED}"/usr/share/gitweb
fi
if ! use subversion ; then
rm -f "${ED}"/usr/libexec/git-core/git-svn \
"${ED}"/usr/share/man/man1/git-svn.1*
fi
if use xinetd ; then
insinto /etc/xinetd.d
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
fi
if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket"
fi
perl_delete_localpod
# Remove disabled linguas
# we could remove sources in src_prepare, but install does not
# handle missing locale dir well
rm_loc() {
if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then
rm -r "${ED}/usr/share/locale/${1}" || die
fi
}
plocale_for_each_disabled_locale rm_loc
}
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() {
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:"
echo
showpkgdeps git-quiltimport "dev-util/quilt"
showpkgdeps git-instaweb \
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
}

View File

@ -1,641 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability:
# 9999-r0: maint
# 9999-r1: master
# 9999-r2: next
# 9999-r3: seen
case "${PVR}" in
9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;;
9999-r3) EGIT_BRANCH=seen ;;
esac
fi
MY_PV="${PV/_rc/.rc}"
MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? (
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
)"
[[ "${PV}" == *_rc* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 selinux subversion tk +threads +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND
DEPEND="
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? (
net-misc/curl
webdav? ( dev-libs/expat )
)
iconv? ( virtual/libiconv )
"
RDEPEND="${DEPEND}
gpg? ( app-crypt/gnupg )
perl? (
dev-perl/Error
dev-perl/MailTools
dev-perl/Authen-SASL
>=virtual/perl-libnet-3.110.0-r4[ssl]
cgi? (
dev-perl/CGI
highlight? ( app-text/highlight )
)
cvs? (
>=dev-vcs/cvsps-2.1:0
dev-perl/DBI
dev-perl/DBD-SQLite
)
mediawiki? (
dev-perl/DateTime-Format-ISO8601
dev-perl/HTML-Tree
dev-perl/MediaWiki-API
)
subversion? (
dev-vcs/subversion[-dso(-),perl]
dev-perl/libwww-perl
dev-perl/TermReadKey
)
)
perforce? ( ${PYTHON_DEPS} )
selinux? ( sec-policy/selinux-git )
"
# This is how info docs are created with Git:
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
# .xml/docbook --(docbook2texi.pl)--> .texi
# .texi --(makeinfo)---------> .info
BDEPEND="
doc? (
app-text/asciidoc
app-text/docbook2X
app-text/xmlto
sys-apps/texinfo
)
gnome-keyring? ( virtual/pkgconfig )
nls? ( sys-devel/gettext )
test? ( app-crypt/gnupg )
"
# Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND}
app-text/asciidoc"
fi
SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE="
cgi? ( perl )
cvs? ( perl )
mediawiki? ( perl )
mediawiki-experimental? ( mediawiki )
perforce? ( ${PYTHON_REQUIRED_USE} )
subversion? ( perl )
webdav? ( curl )
"
RESTRICT="!test? ( test )"
PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad.
"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch
# Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
)
pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned."
fi
if use perforce ; then
python-single-r1_pkg_setup
fi
}
# This is needed because for some obscure reasons future calls to make don't
# pick up these exports if we export them in src_unpack()
exportmakeopts() {
local extlibs myopts
myopts=(
ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease)
)
if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi
if use curl ; then
use webdav || myopts+=( NO_EXPAT=YesPlease )
else
myopts+=( NO_CURL=YesPlease )
fi
# broken assumptions, because of static build system ...
myopts+=(
NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease
INSTALL=install
TAR=tar
SHELL_PATH="${EPREFIX}/bin/sh"
SANE_TOOL_PATH=
OLD_ICONV=
NO_EXTERNAL_GREP=
)
# can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 )
fi
if [[ ${CHOST} == *-solaris* ]]; then
myopts+=(
NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1
)
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 )
fi
fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}"
}
src_unpack() {
if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
popd &>/dev/null || die
fi
else
git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN .
fi
}
src_prepare() {
# add experimental patches to improve mediawiki support
# see patches for origin
if use mediawiki-experimental ; then
PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
)
fi
default
if use prefix ; then
# bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch
fi
sed -i \
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
Makefile || die
# Fix docbook2texi command
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
Documentation/Makefile || die
}
git_emake() {
# bug #320647: PYTHON_PATH
local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \
GIT_TEST_OPTS="--no-color" \
OPTAR="$(tc-getAR)" \
OPTCC="$(tc-getCC)" \
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \
PERL_PATH="${EPREFIX}/usr/bin/perl" \
PERL_MM_OPT="" \
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \
"$@"
}
src_configure() {
exportmakeopts
}
src_compile() {
git_emake || die "emake failed"
if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed"
fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi
pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed"
if use doc ; then
git_emake info html || die "emake info html failed"
fi
else
if use doc ; then
git_emake info || die "emake info html failed"
fi
fi
popd &>/dev/null || die
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi
pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die
# git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake || die
popd &>/dev/null || die
fi
}
src_install() {
git_emake DESTDIR="${D}" install || die "make install failed"
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
fi
# Depending on the tarball and manual rebuild of the documentation, the
# manpages may exist in either OR both of these directories.
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
use doc && dodir /usr/share/doc/${PF}/html
local d
for d in / /howto/ /technical/ ; do
docinto ${d}
dodoc Documentation${d}*.txt
if use doc ; then
docinto ${d}/html
dodoc Documentation${d}*.html
fi
done
docinto /
# Upstream does not ship this pre-built :-(
use doc && doinfo Documentation/{git,gitman}.info
newbashcomp contrib/completion/git-completion.bash ${PN}
bashcomp_alias git gitk
# Not really a bash-completion file (bug #477920)
# but still needed uncompressed (bug #507480)
insinto /usr/share/${PN}
doins contrib/completion/git-prompt.sh
#dobin contrib/fast-import/git-p4 # Moved upstream
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
newbin contrib/fast-import/import-tars.perl import-tars
exeinto /usr/libexec/git-core/
newexe contrib/git-resurrect.sh git-resurrect
# git-subtree
pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree"
if use doc ; then
# Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree"
fi
newdoc README README.git-subtree
dodoc git-subtree.txt
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi
# diff-highlight
dobin contrib/diff-highlight/diff-highlight
newdoc contrib/diff-highlight/README README.diff-highlight
# git-jump
exeinto /usr/libexec/git-core/
doexe contrib/git-jump/git-jump
newdoc contrib/git-jump/README git-jump.txt
# git-contacts
exeinto /usr/libexec/git-core/
doexe contrib/contacts/git-contacts
dodoc contrib/contacts/git-contacts.txt
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
dobin git-credential-libsecret
popd &>/dev/null || die
fi
dodir /usr/share/${PN}/contrib
# The following are excluded:
# completion - installed above
# diff-highlight - done above
# emacs - removed upstream
# examples - these are stuff that is not used in Git anymore actually
# git-jump - done above
# gitview - installed above
# p4import - excluded because fast-import has a better one
# patches - stuff the Git guys made to go upstream to other places
# persistent-https - TODO
# mw-to-git - TODO
# subtree - build seperately
# svnimport - use git-svn
# thunderbird-patch-inline - fixes thunderbird
local contrib_objects=(
buildsystems
fast-import
hg-to-git
hooks
remotes2config.sh
rerere-train.sh
stats
workdir
)
local i
for i in "${contrib_objects[@]}" ; do
cp -rf \
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done
if use perl && use cgi ; then
# We used to install in /usr/share/${PN}/gitweb
# but upstream installs in /usr/share/gitweb
# so we will install a symlink and use their location for compat with other
# distros
dosym ../gitweb /usr/share/${PN}/gitweb
# INSTALL discusses configuration issues, not just installation
docinto /
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
newdoc "${S}"/gitweb/README README.gitweb
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
if [[ -d "${d}" ]] ; then
find "${d}" -name .packlist -delete || die
fi
done
else
rm -rf "${ED}"/usr/share/gitweb
fi
if ! use subversion ; then
rm -f "${ED}"/usr/libexec/git-core/git-svn \
"${ED}"/usr/share/man/man1/git-svn.1*
fi
if use xinetd ; then
insinto /etc/xinetd.d
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
fi
if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket"
fi
perl_delete_localpod
# Remove disabled linguas
# we could remove sources in src_prepare, but install does not
# handle missing locale dir well
rm_loc() {
if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then
rm -r "${ED}/usr/share/locale/${1}" || die
fi
}
plocale_for_each_disabled_locale rm_loc
}
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() {
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:"
echo
showpkgdeps git-quiltimport "dev-util/quilt"
showpkgdeps git-instaweb \
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
}

View File

@ -1,641 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability:
# 9999-r0: maint
# 9999-r1: master
# 9999-r2: next
# 9999-r3: seen
case "${PVR}" in
9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;;
9999-r3) EGIT_BRANCH=seen ;;
esac
fi
MY_PV="${PV/_rc/.rc}"
MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? (
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
)"
[[ "${PV}" == *_rc* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 selinux subversion tk +threads +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND
DEPEND="
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? (
net-misc/curl
webdav? ( dev-libs/expat )
)
iconv? ( virtual/libiconv )
"
RDEPEND="${DEPEND}
gpg? ( app-crypt/gnupg )
perl? (
dev-perl/Error
dev-perl/MailTools
dev-perl/Authen-SASL
>=virtual/perl-libnet-3.110.0-r4[ssl]
cgi? (
dev-perl/CGI
highlight? ( app-text/highlight )
)
cvs? (
>=dev-vcs/cvsps-2.1:0
dev-perl/DBI
dev-perl/DBD-SQLite
)
mediawiki? (
dev-perl/DateTime-Format-ISO8601
dev-perl/HTML-Tree
dev-perl/MediaWiki-API
)
subversion? (
dev-vcs/subversion[-dso(-),perl]
dev-perl/libwww-perl
dev-perl/TermReadKey
)
)
perforce? ( ${PYTHON_DEPS} )
selinux? ( sec-policy/selinux-git )
"
# This is how info docs are created with Git:
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
# .xml/docbook --(docbook2texi.pl)--> .texi
# .texi --(makeinfo)---------> .info
BDEPEND="
doc? (
app-text/asciidoc
app-text/docbook2X
app-text/xmlto
sys-apps/texinfo
)
gnome-keyring? ( virtual/pkgconfig )
nls? ( sys-devel/gettext )
test? ( app-crypt/gnupg )
"
# Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND}
app-text/asciidoc"
fi
SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE="
cgi? ( perl )
cvs? ( perl )
mediawiki? ( perl )
mediawiki-experimental? ( mediawiki )
perforce? ( ${PYTHON_REQUIRED_USE} )
subversion? ( perl )
webdav? ( curl )
"
RESTRICT="!test? ( test )"
PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad.
"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch
# Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
)
pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned."
fi
if use perforce ; then
python-single-r1_pkg_setup
fi
}
# This is needed because for some obscure reasons future calls to make don't
# pick up these exports if we export them in src_unpack()
exportmakeopts() {
local extlibs myopts
myopts=(
ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease)
)
if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi
if use curl ; then
use webdav || myopts+=( NO_EXPAT=YesPlease )
else
myopts+=( NO_CURL=YesPlease )
fi
# broken assumptions, because of static build system ...
myopts+=(
NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease
INSTALL=install
TAR=tar
SHELL_PATH="${EPREFIX}/bin/sh"
SANE_TOOL_PATH=
OLD_ICONV=
NO_EXTERNAL_GREP=
)
# can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 )
fi
if [[ ${CHOST} == *-solaris* ]]; then
myopts+=(
NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1
)
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 )
fi
fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}"
}
src_unpack() {
if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
popd &>/dev/null || die
fi
else
git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN .
fi
}
src_prepare() {
# add experimental patches to improve mediawiki support
# see patches for origin
if use mediawiki-experimental ; then
PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
)
fi
default
if use prefix ; then
# bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch
fi
sed -i \
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
Makefile || die
# Fix docbook2texi command
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
Documentation/Makefile || die
}
git_emake() {
# bug #320647: PYTHON_PATH
local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \
GIT_TEST_OPTS="--no-color" \
OPTAR="$(tc-getAR)" \
OPTCC="$(tc-getCC)" \
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \
PERL_PATH="${EPREFIX}/usr/bin/perl" \
PERL_MM_OPT="" \
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \
"$@"
}
src_configure() {
exportmakeopts
}
src_compile() {
git_emake || die "emake failed"
if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed"
fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi
pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed"
if use doc ; then
git_emake info html || die "emake info html failed"
fi
else
if use doc ; then
git_emake info || die "emake info html failed"
fi
fi
popd &>/dev/null || die
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi
pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die
# git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake || die
popd &>/dev/null || die
fi
}
src_install() {
git_emake DESTDIR="${D}" install || die "make install failed"
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
fi
# Depending on the tarball and manual rebuild of the documentation, the
# manpages may exist in either OR both of these directories.
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
use doc && dodir /usr/share/doc/${PF}/html
local d
for d in / /howto/ /technical/ ; do
docinto ${d}
dodoc Documentation${d}*.txt
if use doc ; then
docinto ${d}/html
dodoc Documentation${d}*.html
fi
done
docinto /
# Upstream does not ship this pre-built :-(
use doc && doinfo Documentation/{git,gitman}.info
newbashcomp contrib/completion/git-completion.bash ${PN}
bashcomp_alias git gitk
# Not really a bash-completion file (bug #477920)
# but still needed uncompressed (bug #507480)
insinto /usr/share/${PN}
doins contrib/completion/git-prompt.sh
#dobin contrib/fast-import/git-p4 # Moved upstream
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
newbin contrib/fast-import/import-tars.perl import-tars
exeinto /usr/libexec/git-core/
newexe contrib/git-resurrect.sh git-resurrect
# git-subtree
pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree"
if use doc ; then
# Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree"
fi
newdoc README README.git-subtree
dodoc git-subtree.txt
popd &>/dev/null || die
if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi
# diff-highlight
dobin contrib/diff-highlight/diff-highlight
newdoc contrib/diff-highlight/README README.diff-highlight
# git-jump
exeinto /usr/libexec/git-core/
doexe contrib/git-jump/git-jump
newdoc contrib/git-jump/README git-jump.txt
# git-contacts
exeinto /usr/libexec/git-core/
doexe contrib/contacts/git-contacts
dodoc contrib/contacts/git-contacts.txt
if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die
dobin git-credential-libsecret
popd &>/dev/null || die
fi
dodir /usr/share/${PN}/contrib
# The following are excluded:
# completion - installed above
# diff-highlight - done above
# emacs - removed upstream
# examples - these are stuff that is not used in Git anymore actually
# git-jump - done above
# gitview - installed above
# p4import - excluded because fast-import has a better one
# patches - stuff the Git guys made to go upstream to other places
# persistent-https - TODO
# mw-to-git - TODO
# subtree - build seperately
# svnimport - use git-svn
# thunderbird-patch-inline - fixes thunderbird
local contrib_objects=(
buildsystems
fast-import
hg-to-git
hooks
remotes2config.sh
rerere-train.sh
stats
workdir
)
local i
for i in "${contrib_objects[@]}" ; do
cp -rf \
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done
if use perl && use cgi ; then
# We used to install in /usr/share/${PN}/gitweb
# but upstream installs in /usr/share/gitweb
# so we will install a symlink and use their location for compat with other
# distros
dosym ../gitweb /usr/share/${PN}/gitweb
# INSTALL discusses configuration issues, not just installation
docinto /
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
newdoc "${S}"/gitweb/README README.gitweb
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
if [[ -d "${d}" ]] ; then
find "${d}" -name .packlist -delete || die
fi
done
else
rm -rf "${ED}"/usr/share/gitweb
fi
if ! use subversion ; then
rm -f "${ED}"/usr/libexec/git-core/git-svn \
"${ED}"/usr/share/man/man1/git-svn.1*
fi
if use xinetd ; then
insinto /etc/xinetd.d
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
fi
if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket"
fi
perl_delete_localpod
# Remove disabled linguas
# we could remove sources in src_prepare, but install does not
# handle missing locale dir well
rm_loc() {
if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then
rm -r "${ED}/usr/share/locale/${1}" || die
fi
}
plocale_for_each_disabled_locale rm_loc
}
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() {
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:"
echo
showpkgdeps git-quiltimport "dev-util/quilt"
showpkgdeps git-instaweb \
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
}

View File

@ -51,7 +51,7 @@ fi
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 selinux subversion tk +threads +webdav xinetd cvs test" IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 +safe-directory selinux subversion tk +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND # Common to both DEPEND and RDEPEND
DEPEND=" DEPEND="
@ -173,7 +173,6 @@ exportmakeopts() {
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease) $(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease) $(usex subversion '' NO_SVN_TESTS=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease) $(usex tk '' NO_TCLTK=YesPlease)
) )
@ -253,12 +252,19 @@ src_prepare() {
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
) )
fi fi
if ! use safe-directory ; then
# This patch neuters the "safe directory" detection.
# bugs #838271, #838223
PATCHES+=(
"${FILESDIR}"/git-2.37.2-unsafe-directory.patch
)
fi
default default
if use prefix ; then if use prefix ; then
# bug #757309 # bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch eapply "${FILESDIR}"/git-2.37.2-darwin-prefix-gettext.patch
fi fi
sed -i \ sed -i \

View File

@ -8,12 +8,14 @@ GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware # bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} ) PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd inherit toolchain-funcs perl-module bash-completion-r1 optfeature plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git" EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
inherit git-r3
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation # See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability: # In order of stability:
@ -21,7 +23,7 @@ if [[ ${PV} == *9999 ]]; then
# 9999-r1: master # 9999-r1: master
# 9999-r2: next # 9999-r2: next
# 9999-r3: seen # 9999-r3: seen
case "${PVR}" in case ${PVR} in
9999) EGIT_BRANCH=maint ;; 9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;; 9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;; 9999-r2) EGIT_BRANCH=next;;
@ -34,44 +36,49 @@ MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}" DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency" DESCRIPTION="Stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/" HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz" SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git" SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} [[ ${PV/rc} != ${PV} ]] && SRC_URI_KORG+='/testing'
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? ( SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}"
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} SRC_URI+=" ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}"
)" SRC_URI+=" doc? ( ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} )"
[[ "${PV}" == *_rc* ]] || \
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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
fi fi
S="${WORKDIR}"/${MY_P}
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 selinux subversion tk +threads +webdav xinetd cvs test" IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +safe-directory selinux subversion tk +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND # Common to both DEPEND and RDEPEND
DEPEND=" DEPEND="
gnome-keyring? ( dev-libs/openssl:=
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? ( curl? (
net-misc/curl net-misc/curl
webdav? ( dev-libs/expat ) webdav? ( dev-libs/expat )
) )
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
iconv? ( virtual/libiconv ) iconv? ( virtual/libiconv )
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:= )
" "
RDEPEND="
RDEPEND="${DEPEND} ${DEPEND}
gpg? ( app-crypt/gnupg ) gpg? ( app-crypt/gnupg )
perl? ( perl? (
dev-perl/Error dev-perl/Error
@ -120,12 +127,10 @@ BDEPEND="
# Live ebuild builds man pages and HTML docs, additionally # Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND} BDEPEND+=" app-text/asciidoc"
app-text/asciidoc"
fi fi
SITEFILE="50${PN}-gentoo.el" SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE=" REQUIRED_USE="
cgi? ( perl ) cgi? ( perl )
@ -140,7 +145,7 @@ REQUIRED_USE="
RESTRICT="!test? ( test )" RESTRICT="!test? ( test )"
PATCHES=( PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad. # Avoid automagic CVS, bug #350330
"${FILESDIR}"/git-2.37.0_rc1-optional-cvs.patch "${FILESDIR}"/git-2.37.0_rc1-optional-cvs.patch
# Make submodule output quiet # Make submodule output quiet
@ -151,7 +156,7 @@ pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You" ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned." ewarn "have been warned!"
fi fi
if use perforce ; then if use perforce ; then
@ -166,21 +171,20 @@ exportmakeopts() {
myopts=( myopts=(
ASCIIDOC_NO_ROFF=YesPlease ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease) $(usev elibc_musl NO_REGEX=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease) $(usev !cvs NO_CVS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease) $(usev !iconv NO_ICONV=YesPlease)
$(usev !nls NO_GETTEXT=YesPlease)
$(usev !perforce NO_PYTHON=YesPlease)
$(usev !subversion NO_SVN_TESTS=YesPlease)
$(usev !tk NO_TCLTK=YesPlease)
) )
if use blksha1 ; then if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease ) myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi fi
if use curl ; then if use curl ; then
@ -189,7 +193,7 @@ exportmakeopts() {
myopts+=( NO_CURL=YesPlease ) myopts+=( NO_CURL=YesPlease )
fi fi
# broken assumptions, because of static build system ... # Broken assumptions because of static build system
myopts+=( myopts+=(
NO_FINK=YesPlease NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease NO_DARWIN_PORTS=YesPlease
@ -201,26 +205,26 @@ exportmakeopts() {
NO_EXTERNAL_GREP= NO_EXTERNAL_GREP=
) )
# can't define this to null, since the entire makefile depends on it # Can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease ) myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 ) extlibs+=( -lpcre2-8 )
fi fi
if [[ ${CHOST} == *-solaris* ]]; then if [[ ${CHOST} == *-solaris* ]]; then
myopts+=( myopts+=(
NEEDS_LIBICONV=YesPlease NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1 HAVE_CLOCK_MONOTONIC=1
) )
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
if grep -Fq getdelim "${ESYSROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 ) myopts+=( HAVE_GETDELIM=1 )
fi fi
fi fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease ) myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}" export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}" export EXTLIBS="${extlibs[@]}"
@ -229,8 +233,10 @@ exportmakeopts() {
src_unpack() { src_unpack() {
if [[ ${PV} != *9999 ]] ; then if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX} unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
@ -238,14 +244,14 @@ src_unpack() {
fi fi
else else
git-r3_src_unpack git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN . #cp "${FILESDIR}"/GIT-VERSION-GEN . || die
fi fi
} }
src_prepare() { src_prepare() {
# add experimental patches to improve mediawiki support # Add experimental patches to improve mediawiki support,
# see patches for origin # see patches for origin.
if use mediawiki-experimental ; then if use mediawiki-experimental ; then
PATCHES+=( PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
@ -254,11 +260,19 @@ src_prepare() {
) )
fi fi
if ! use safe-directory ; then
# This patch neuters the "safe directory" detection.
# bugs #838271, #838223
PATCHES+=(
"${FILESDIR}"/git-2.37.2-unsafe-directory.patch
)
fi
default default
if use prefix ; then if use prefix ; then
# bug #757309 # bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch eapply "${FILESDIR}"/git-2.37.2-darwin-prefix-gettext.patch
fi fi
sed -i \ sed -i \
@ -279,21 +293,37 @@ git_emake() {
# bug #320647: PYTHON_PATH # bug #320647: PYTHON_PATH
local PYTHON_PATH="" local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}" use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \ local mymakeargs=(
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ ${MY_MAKEOPTS}
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \ prefix="${EPREFIX}"/usr
GIT_TEST_OPTS="--no-color" \ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
OPTAR="$(tc-getAR)" \ perllibdir="$(use perl && perl_get_raw_vendorlib)"
OPTCC="$(tc-getCC)" \ sysconfdir="${EPREFIX}"/etc
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \ CC="$(tc-getCC)"
PERL_PATH="${EPREFIX}/usr/bin/perl" \ CFLAGS="${CFLAGS}"
PERL_MM_OPT="" \ PKG_CONFIG="$(tc-getPKG_CONFIG)"
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \ # TODO: --verbose?
GIT_TEST_OPTS="--no-color"
OPTAR="$(tc-getAR)"
OPTCC="$(tc-getCC)"
OPTCFLAGS="${CFLAGS}"
OPTLDFLAGS="${LDFLAGS}"
PERL_PATH="${EPREFIX}/usr/bin/perl"
PERL_MM_OPT=""
PYTHON_PATH="${PYTHON_PATH}"
V=1
"$@" "$@"
)
emake "${mymakeargs[@]}"
} }
src_configure() { src_configure() {
@ -301,58 +331,163 @@ src_configure() {
} }
src_compile() { src_compile() {
git_emake || die "emake failed" git_emake
if use perl && use cgi ; then if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed" git_emake gitweb
fi fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die git_emake -C contrib/credential/osxkeychain
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi fi
pushd Documentation &>/dev/null || die pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed" git_emake man
if use doc ; then if use doc ; then
git_emake info html || die "emake info html failed" git_emake info html
fi fi
else else
if use doc ; then if use doc ; then
git_emake info || die "emake info html failed" git_emake info
fi fi
fi fi
popd &>/dev/null || die popd &>/dev/null || die
if use gnome-keyring ; then if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die git_emake -C contrib/credential/libsecret
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi fi
pushd contrib/subtree &>/dev/null || die pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die git_emake git-subtree
# git-subtree.1 requires the full USE=doc dependency stack # git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1 use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die git_emake -C contrib/diff-highlight
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die git_emake -C contrib/mw-to-git
git_emake || die
popd &>/dev/null || die
fi fi
} }
src_test() {
local disabled=(
# We make safe-directory optional
t0033-safe-directory.sh
)
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
if [[ ${cvs} -gt 0 ]] && has_version dev-vcs/cvs ; then
let cvs=${cvs}+1
fi
if [[ ${cvs} -gt 1 ]] && has_version "dev-vcs/cvs[server]" ; then
let cvs=${cvs}+1
fi
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "Tests failed. Please file a bug!"
}
src_install() { src_install() {
git_emake DESTDIR="${D}" install || die "make install failed" git_emake DESTDIR="${D}" install
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain dobin contrib/credential/osxkeychain/git-credential-osxkeychain
@ -392,19 +527,17 @@ src_install() {
# git-subtree # git-subtree
pushd contrib/subtree &>/dev/null || die pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree" git_emake DESTDIR="${D}" install
if use doc ; then if use doc ; then
# Do not move git subtree install-man outside USE=doc! # Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree" git_emake DESTDIR="${D}" install-man install-html
fi fi
newdoc README README.git-subtree newdoc README README.git-subtree
dodoc git-subtree.txt dodoc git-subtree.txt
popd &>/dev/null || die popd &>/dev/null || die
if use mediawiki ; then if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die git_emake -C contrib/mw-to-git DESTDIR="${D}" install
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi fi
# diff-highlight # diff-highlight
@ -454,10 +587,7 @@ src_install() {
) )
local i local i
for i in "${contrib_objects[@]}" ; do for i in "${contrib_objects[@]}" ; do
cp -rf \ cp -rf "${S}"/contrib/${i} "${ED}"/usr/share/${PN}/contrib || die "Failed contrib ${i}"
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done done
if use perl && use cgi ; then if use perl && use cgi ; then
@ -494,8 +624,7 @@ src_install() {
if ! use prefix ; then if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \ systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket" systemd_dounit "${FILESDIR}/git-daemon.socket"
fi fi
@ -512,130 +641,17 @@ src_install() {
plocale_for_each_disabled_locale rm_loc plocale_for_each_disabled_locale rm_loc
} }
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() { pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "Please read /usr/share/bash-completion/completions/git for Git bash command" elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion." elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt" elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script" elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:" fi
echo
showpkgdeps git-quiltimport "dev-util/quilt" optfeature_header "Some scripts require additional dependencies:"
showpkgdeps git-instaweb \ optfeature git-quiltimport dev-util/quilt
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )" optfeature git-instaweb www-servers/lighttpd www-servers/apache www-servers/nginx
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
} }

View File

@ -8,12 +8,14 @@ GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware # bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} ) PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd inherit toolchain-funcs perl-module bash-completion-r1 optfeature plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git" EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
inherit git-r3
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation # See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability: # In order of stability:
@ -21,7 +23,7 @@ if [[ ${PV} == *9999 ]]; then
# 9999-r1: master # 9999-r1: master
# 9999-r2: next # 9999-r2: next
# 9999-r3: seen # 9999-r3: seen
case "${PVR}" in case ${PVR} in
9999) EGIT_BRANCH=maint ;; 9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;; 9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;; 9999-r2) EGIT_BRANCH=next;;
@ -34,44 +36,49 @@ MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}" DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency" DESCRIPTION="Stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/" HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz" SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git" SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} [[ ${PV/rc} != ${PV} ]] && SRC_URI_KORG+='/testing'
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? ( SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}"
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} SRC_URI+=" ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}"
)" SRC_URI+=" doc? ( ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} )"
[[ "${PV}" == *_rc* ]] || \
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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
fi fi
S="${WORKDIR}"/${MY_P}
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 selinux subversion tk +threads +webdav xinetd cvs test" IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +safe-directory selinux subversion tk +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND # Common to both DEPEND and RDEPEND
DEPEND=" DEPEND="
gnome-keyring? ( dev-libs/openssl:=
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? ( curl? (
net-misc/curl net-misc/curl
webdav? ( dev-libs/expat ) webdav? ( dev-libs/expat )
) )
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
iconv? ( virtual/libiconv ) iconv? ( virtual/libiconv )
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:= )
" "
RDEPEND="
RDEPEND="${DEPEND} ${DEPEND}
gpg? ( app-crypt/gnupg ) gpg? ( app-crypt/gnupg )
perl? ( perl? (
dev-perl/Error dev-perl/Error
@ -120,12 +127,10 @@ BDEPEND="
# Live ebuild builds man pages and HTML docs, additionally # Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND} BDEPEND+=" app-text/asciidoc"
app-text/asciidoc"
fi fi
SITEFILE="50${PN}-gentoo.el" SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE=" REQUIRED_USE="
cgi? ( perl ) cgi? ( perl )
@ -140,8 +145,8 @@ REQUIRED_USE="
RESTRICT="!test? ( test )" RESTRICT="!test? ( test )"
PATCHES=( PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad. # Avoid automagic CVS, bug #350330
"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch "${FILESDIR}"/git-2.37.0_rc1-optional-cvs.patch
# Make submodule output quiet # Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch "${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
@ -151,7 +156,7 @@ pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You" ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned." ewarn "have been warned!"
fi fi
if use perforce ; then if use perforce ; then
@ -166,21 +171,20 @@ exportmakeopts() {
myopts=( myopts=(
ASCIIDOC_NO_ROFF=YesPlease ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease) $(usev elibc_musl NO_REGEX=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease) $(usev !cvs NO_CVS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease) $(usev !iconv NO_ICONV=YesPlease)
$(usev !nls NO_GETTEXT=YesPlease)
$(usev !perforce NO_PYTHON=YesPlease)
$(usev !subversion NO_SVN_TESTS=YesPlease)
$(usev !tk NO_TCLTK=YesPlease)
) )
if use blksha1 ; then if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease ) myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi fi
if use curl ; then if use curl ; then
@ -189,7 +193,7 @@ exportmakeopts() {
myopts+=( NO_CURL=YesPlease ) myopts+=( NO_CURL=YesPlease )
fi fi
# broken assumptions, because of static build system ... # Broken assumptions because of static build system
myopts+=( myopts+=(
NO_FINK=YesPlease NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease NO_DARWIN_PORTS=YesPlease
@ -201,26 +205,26 @@ exportmakeopts() {
NO_EXTERNAL_GREP= NO_EXTERNAL_GREP=
) )
# can't define this to null, since the entire makefile depends on it # Can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease ) myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 ) extlibs+=( -lpcre2-8 )
fi fi
if [[ ${CHOST} == *-solaris* ]]; then if [[ ${CHOST} == *-solaris* ]]; then
myopts+=( myopts+=(
NEEDS_LIBICONV=YesPlease NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1 HAVE_CLOCK_MONOTONIC=1
) )
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
if grep -Fq getdelim "${ESYSROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 ) myopts+=( HAVE_GETDELIM=1 )
fi fi
fi fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease ) myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}" export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}" export EXTLIBS="${extlibs[@]}"
@ -229,8 +233,10 @@ exportmakeopts() {
src_unpack() { src_unpack() {
if [[ ${PV} != *9999 ]] ; then if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX} unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
@ -238,14 +244,14 @@ src_unpack() {
fi fi
else else
git-r3_src_unpack git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN . #cp "${FILESDIR}"/GIT-VERSION-GEN . || die
fi fi
} }
src_prepare() { src_prepare() {
# add experimental patches to improve mediawiki support # Add experimental patches to improve mediawiki support,
# see patches for origin # see patches for origin.
if use mediawiki-experimental ; then if use mediawiki-experimental ; then
PATCHES+=( PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
@ -254,11 +260,19 @@ src_prepare() {
) )
fi fi
if ! use safe-directory ; then
# This patch neuters the "safe directory" detection.
# bugs #838271, #838223
PATCHES+=(
"${FILESDIR}"/git-2.37.2-unsafe-directory.patch
)
fi
default default
if use prefix ; then if use prefix ; then
# bug #757309 # bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch eapply "${FILESDIR}"/git-2.37.2-darwin-prefix-gettext.patch
fi fi
sed -i \ sed -i \
@ -279,21 +293,37 @@ git_emake() {
# bug #320647: PYTHON_PATH # bug #320647: PYTHON_PATH
local PYTHON_PATH="" local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}" use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \ local mymakeargs=(
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ ${MY_MAKEOPTS}
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \ prefix="${EPREFIX}"/usr
GIT_TEST_OPTS="--no-color" \ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
OPTAR="$(tc-getAR)" \ perllibdir="$(use perl && perl_get_raw_vendorlib)"
OPTCC="$(tc-getCC)" \ sysconfdir="${EPREFIX}"/etc
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \ CC="$(tc-getCC)"
PERL_PATH="${EPREFIX}/usr/bin/perl" \ CFLAGS="${CFLAGS}"
PERL_MM_OPT="" \ PKG_CONFIG="$(tc-getPKG_CONFIG)"
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \ # TODO: --verbose?
GIT_TEST_OPTS="--no-color"
OPTAR="$(tc-getAR)"
OPTCC="$(tc-getCC)"
OPTCFLAGS="${CFLAGS}"
OPTLDFLAGS="${LDFLAGS}"
PERL_PATH="${EPREFIX}/usr/bin/perl"
PERL_MM_OPT=""
PYTHON_PATH="${PYTHON_PATH}"
V=1
"$@" "$@"
)
emake "${mymakeargs[@]}"
} }
src_configure() { src_configure() {
@ -301,58 +331,163 @@ src_configure() {
} }
src_compile() { src_compile() {
git_emake || die "emake failed" git_emake
if use perl && use cgi ; then if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed" git_emake gitweb
fi fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die git_emake -C contrib/credential/osxkeychain
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi fi
pushd Documentation &>/dev/null || die pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed" git_emake man
if use doc ; then if use doc ; then
git_emake info html || die "emake info html failed" git_emake info html
fi fi
else else
if use doc ; then if use doc ; then
git_emake info || die "emake info html failed" git_emake info
fi fi
fi fi
popd &>/dev/null || die popd &>/dev/null || die
if use gnome-keyring ; then if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die git_emake -C contrib/credential/libsecret
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi fi
pushd contrib/subtree &>/dev/null || die pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die git_emake git-subtree
# git-subtree.1 requires the full USE=doc dependency stack # git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1 use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die git_emake -C contrib/diff-highlight
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die git_emake -C contrib/mw-to-git
git_emake || die
popd &>/dev/null || die
fi fi
} }
src_test() {
local disabled=(
# We make safe-directory optional
t0033-safe-directory.sh
)
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
if [[ ${cvs} -gt 0 ]] && has_version dev-vcs/cvs ; then
let cvs=${cvs}+1
fi
if [[ ${cvs} -gt 1 ]] && has_version "dev-vcs/cvs[server]" ; then
let cvs=${cvs}+1
fi
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "Tests failed. Please file a bug!"
}
src_install() { src_install() {
git_emake DESTDIR="${D}" install || die "make install failed" git_emake DESTDIR="${D}" install
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain dobin contrib/credential/osxkeychain/git-credential-osxkeychain
@ -392,19 +527,17 @@ src_install() {
# git-subtree # git-subtree
pushd contrib/subtree &>/dev/null || die pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree" git_emake DESTDIR="${D}" install
if use doc ; then if use doc ; then
# Do not move git subtree install-man outside USE=doc! # Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree" git_emake DESTDIR="${D}" install-man install-html
fi fi
newdoc README README.git-subtree newdoc README README.git-subtree
dodoc git-subtree.txt dodoc git-subtree.txt
popd &>/dev/null || die popd &>/dev/null || die
if use mediawiki ; then if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die git_emake -C contrib/mw-to-git DESTDIR="${D}" install
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi fi
# diff-highlight # diff-highlight
@ -454,10 +587,7 @@ src_install() {
) )
local i local i
for i in "${contrib_objects[@]}" ; do for i in "${contrib_objects[@]}" ; do
cp -rf \ cp -rf "${S}"/contrib/${i} "${ED}"/usr/share/${PN}/contrib || die "Failed contrib ${i}"
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done done
if use perl && use cgi ; then if use perl && use cgi ; then
@ -494,8 +624,7 @@ src_install() {
if ! use prefix ; then if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \ systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket" systemd_dounit "${FILESDIR}/git-daemon.socket"
fi fi
@ -512,130 +641,17 @@ src_install() {
plocale_for_each_disabled_locale rm_loc plocale_for_each_disabled_locale rm_loc
} }
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() { pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "Please read /usr/share/bash-completion/completions/git for Git bash command" elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion." elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt" elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script" elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:" fi
echo
showpkgdeps git-quiltimport "dev-util/quilt" optfeature_header "Some scripts require additional dependencies:"
showpkgdeps git-instaweb \ optfeature git-quiltimport dev-util/quilt
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )" optfeature git-instaweb www-servers/lighttpd www-servers/apache www-servers/nginx
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
} }

View File

@ -8,12 +8,14 @@ GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware # bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} ) PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd inherit toolchain-funcs perl-module bash-completion-r1 optfeature plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git" EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
inherit git-r3
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation # See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability: # In order of stability:
@ -21,7 +23,7 @@ if [[ ${PV} == *9999 ]]; then
# 9999-r1: master # 9999-r1: master
# 9999-r2: next # 9999-r2: next
# 9999-r3: seen # 9999-r3: seen
case "${PVR}" in case ${PVR} in
9999) EGIT_BRANCH=maint ;; 9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;; 9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;; 9999-r2) EGIT_BRANCH=next;;
@ -34,44 +36,49 @@ MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}" DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency" DESCRIPTION="Stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/" HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz" SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git" SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} [[ ${PV/rc} != ${PV} ]] && SRC_URI_KORG+='/testing'
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? ( SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}"
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} SRC_URI+=" ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}"
)" SRC_URI+=" doc? ( ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} )"
[[ "${PV}" == *_rc* ]] || \
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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
fi fi
S="${WORKDIR}"/${MY_P}
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 selinux subversion tk +threads +webdav xinetd cvs test" IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +safe-directory selinux subversion tk +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND # Common to both DEPEND and RDEPEND
DEPEND=" DEPEND="
gnome-keyring? ( dev-libs/openssl:=
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? ( curl? (
net-misc/curl net-misc/curl
webdav? ( dev-libs/expat ) webdav? ( dev-libs/expat )
) )
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
iconv? ( virtual/libiconv ) iconv? ( virtual/libiconv )
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:= )
" "
RDEPEND="
RDEPEND="${DEPEND} ${DEPEND}
gpg? ( app-crypt/gnupg ) gpg? ( app-crypt/gnupg )
perl? ( perl? (
dev-perl/Error dev-perl/Error
@ -120,12 +127,10 @@ BDEPEND="
# Live ebuild builds man pages and HTML docs, additionally # Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND} BDEPEND+=" app-text/asciidoc"
app-text/asciidoc"
fi fi
SITEFILE="50${PN}-gentoo.el" SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE=" REQUIRED_USE="
cgi? ( perl ) cgi? ( perl )
@ -140,8 +145,8 @@ REQUIRED_USE="
RESTRICT="!test? ( test )" RESTRICT="!test? ( test )"
PATCHES=( PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad. # Avoid automagic CVS, bug #350330
"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch "${FILESDIR}"/git-2.37.0_rc1-optional-cvs.patch
# Make submodule output quiet # Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch "${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
@ -151,7 +156,7 @@ pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You" ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned." ewarn "have been warned!"
fi fi
if use perforce ; then if use perforce ; then
@ -166,21 +171,20 @@ exportmakeopts() {
myopts=( myopts=(
ASCIIDOC_NO_ROFF=YesPlease ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease) $(usev elibc_musl NO_REGEX=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease) $(usev !cvs NO_CVS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease) $(usev !iconv NO_ICONV=YesPlease)
$(usev !nls NO_GETTEXT=YesPlease)
$(usev !perforce NO_PYTHON=YesPlease)
$(usev !subversion NO_SVN_TESTS=YesPlease)
$(usev !tk NO_TCLTK=YesPlease)
) )
if use blksha1 ; then if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease ) myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi fi
if use curl ; then if use curl ; then
@ -189,7 +193,7 @@ exportmakeopts() {
myopts+=( NO_CURL=YesPlease ) myopts+=( NO_CURL=YesPlease )
fi fi
# broken assumptions, because of static build system ... # Broken assumptions because of static build system
myopts+=( myopts+=(
NO_FINK=YesPlease NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease NO_DARWIN_PORTS=YesPlease
@ -201,26 +205,26 @@ exportmakeopts() {
NO_EXTERNAL_GREP= NO_EXTERNAL_GREP=
) )
# can't define this to null, since the entire makefile depends on it # Can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease ) myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 ) extlibs+=( -lpcre2-8 )
fi fi
if [[ ${CHOST} == *-solaris* ]]; then if [[ ${CHOST} == *-solaris* ]]; then
myopts+=( myopts+=(
NEEDS_LIBICONV=YesPlease NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1 HAVE_CLOCK_MONOTONIC=1
) )
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
if grep -Fq getdelim "${ESYSROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 ) myopts+=( HAVE_GETDELIM=1 )
fi fi
fi fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease ) myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}" export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}" export EXTLIBS="${extlibs[@]}"
@ -229,8 +233,10 @@ exportmakeopts() {
src_unpack() { src_unpack() {
if [[ ${PV} != *9999 ]] ; then if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX} unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
@ -238,14 +244,14 @@ src_unpack() {
fi fi
else else
git-r3_src_unpack git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN . #cp "${FILESDIR}"/GIT-VERSION-GEN . || die
fi fi
} }
src_prepare() { src_prepare() {
# add experimental patches to improve mediawiki support # Add experimental patches to improve mediawiki support,
# see patches for origin # see patches for origin.
if use mediawiki-experimental ; then if use mediawiki-experimental ; then
PATCHES+=( PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
@ -254,11 +260,19 @@ src_prepare() {
) )
fi fi
if ! use safe-directory ; then
# This patch neuters the "safe directory" detection.
# bugs #838271, #838223
PATCHES+=(
"${FILESDIR}"/git-2.37.2-unsafe-directory.patch
)
fi
default default
if use prefix ; then if use prefix ; then
# bug #757309 # bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch eapply "${FILESDIR}"/git-2.37.2-darwin-prefix-gettext.patch
fi fi
sed -i \ sed -i \
@ -279,21 +293,37 @@ git_emake() {
# bug #320647: PYTHON_PATH # bug #320647: PYTHON_PATH
local PYTHON_PATH="" local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}" use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \ local mymakeargs=(
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ ${MY_MAKEOPTS}
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \ prefix="${EPREFIX}"/usr
GIT_TEST_OPTS="--no-color" \ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
OPTAR="$(tc-getAR)" \ perllibdir="$(use perl && perl_get_raw_vendorlib)"
OPTCC="$(tc-getCC)" \ sysconfdir="${EPREFIX}"/etc
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \ CC="$(tc-getCC)"
PERL_PATH="${EPREFIX}/usr/bin/perl" \ CFLAGS="${CFLAGS}"
PERL_MM_OPT="" \ PKG_CONFIG="$(tc-getPKG_CONFIG)"
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \ # TODO: --verbose?
GIT_TEST_OPTS="--no-color"
OPTAR="$(tc-getAR)"
OPTCC="$(tc-getCC)"
OPTCFLAGS="${CFLAGS}"
OPTLDFLAGS="${LDFLAGS}"
PERL_PATH="${EPREFIX}/usr/bin/perl"
PERL_MM_OPT=""
PYTHON_PATH="${PYTHON_PATH}"
V=1
"$@" "$@"
)
emake "${mymakeargs[@]}"
} }
src_configure() { src_configure() {
@ -301,58 +331,163 @@ src_configure() {
} }
src_compile() { src_compile() {
git_emake || die "emake failed" git_emake
if use perl && use cgi ; then if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed" git_emake gitweb
fi fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die git_emake -C contrib/credential/osxkeychain
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi fi
pushd Documentation &>/dev/null || die pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed" git_emake man
if use doc ; then if use doc ; then
git_emake info html || die "emake info html failed" git_emake info html
fi fi
else else
if use doc ; then if use doc ; then
git_emake info || die "emake info html failed" git_emake info
fi fi
fi fi
popd &>/dev/null || die popd &>/dev/null || die
if use gnome-keyring ; then if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die git_emake -C contrib/credential/libsecret
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi fi
pushd contrib/subtree &>/dev/null || die pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die git_emake git-subtree
# git-subtree.1 requires the full USE=doc dependency stack # git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1 use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die git_emake -C contrib/diff-highlight
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die git_emake -C contrib/mw-to-git
git_emake || die
popd &>/dev/null || die
fi fi
} }
src_test() {
local disabled=(
# We make safe-directory optional
t0033-safe-directory.sh
)
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
if [[ ${cvs} -gt 0 ]] && has_version dev-vcs/cvs ; then
let cvs=${cvs}+1
fi
if [[ ${cvs} -gt 1 ]] && has_version "dev-vcs/cvs[server]" ; then
let cvs=${cvs}+1
fi
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "Tests failed. Please file a bug!"
}
src_install() { src_install() {
git_emake DESTDIR="${D}" install || die "make install failed" git_emake DESTDIR="${D}" install
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain dobin contrib/credential/osxkeychain/git-credential-osxkeychain
@ -392,19 +527,17 @@ src_install() {
# git-subtree # git-subtree
pushd contrib/subtree &>/dev/null || die pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree" git_emake DESTDIR="${D}" install
if use doc ; then if use doc ; then
# Do not move git subtree install-man outside USE=doc! # Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree" git_emake DESTDIR="${D}" install-man install-html
fi fi
newdoc README README.git-subtree newdoc README README.git-subtree
dodoc git-subtree.txt dodoc git-subtree.txt
popd &>/dev/null || die popd &>/dev/null || die
if use mediawiki ; then if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die git_emake -C contrib/mw-to-git DESTDIR="${D}" install
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi fi
# diff-highlight # diff-highlight
@ -454,10 +587,7 @@ src_install() {
) )
local i local i
for i in "${contrib_objects[@]}" ; do for i in "${contrib_objects[@]}" ; do
cp -rf \ cp -rf "${S}"/contrib/${i} "${ED}"/usr/share/${PN}/contrib || die "Failed contrib ${i}"
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done done
if use perl && use cgi ; then if use perl && use cgi ; then
@ -494,8 +624,7 @@ src_install() {
if ! use prefix ; then if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \ systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket" systemd_dounit "${FILESDIR}/git-daemon.socket"
fi fi
@ -512,130 +641,17 @@ src_install() {
plocale_for_each_disabled_locale rm_loc plocale_for_each_disabled_locale rm_loc
} }
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() { pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "Please read /usr/share/bash-completion/completions/git for Git bash command" elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion." elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt" elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script" elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:" fi
echo
showpkgdeps git-quiltimport "dev-util/quilt" optfeature_header "Some scripts require additional dependencies:"
showpkgdeps git-instaweb \ optfeature git-quiltimport dev-util/quilt
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )" optfeature git-instaweb www-servers/lighttpd www-servers/apache www-servers/nginx
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
} }

View File

@ -8,12 +8,14 @@ GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware # bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} ) PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd inherit toolchain-funcs perl-module bash-completion-r1 optfeature plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git" EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
inherit git-r3
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation # See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability: # In order of stability:
@ -21,7 +23,7 @@ if [[ ${PV} == *9999 ]]; then
# 9999-r1: master # 9999-r1: master
# 9999-r2: next # 9999-r2: next
# 9999-r3: seen # 9999-r3: seen
case "${PVR}" in case ${PVR} in
9999) EGIT_BRANCH=maint ;; 9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;; 9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;; 9999-r2) EGIT_BRANCH=next;;
@ -34,44 +36,49 @@ MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}" DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency" DESCRIPTION="Stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/" HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz" SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git" SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} [[ ${PV/rc} != ${PV} ]] && SRC_URI_KORG+='/testing'
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? ( SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}"
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} SRC_URI+=" ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}"
)" SRC_URI+=" doc? ( ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} )"
[[ "${PV}" == *_rc* ]] || \
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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
fi fi
S="${WORKDIR}"/${MY_P}
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 selinux subversion tk +threads +webdav xinetd cvs test" IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +safe-directory selinux subversion tk +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND # Common to both DEPEND and RDEPEND
DEPEND=" DEPEND="
gnome-keyring? ( dev-libs/openssl:=
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? ( curl? (
net-misc/curl net-misc/curl
webdav? ( dev-libs/expat ) webdav? ( dev-libs/expat )
) )
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
iconv? ( virtual/libiconv ) iconv? ( virtual/libiconv )
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:= )
" "
RDEPEND="
RDEPEND="${DEPEND} ${DEPEND}
gpg? ( app-crypt/gnupg ) gpg? ( app-crypt/gnupg )
perl? ( perl? (
dev-perl/Error dev-perl/Error
@ -120,12 +127,10 @@ BDEPEND="
# Live ebuild builds man pages and HTML docs, additionally # Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND} BDEPEND+=" app-text/asciidoc"
app-text/asciidoc"
fi fi
SITEFILE="50${PN}-gentoo.el" SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE=" REQUIRED_USE="
cgi? ( perl ) cgi? ( perl )
@ -140,8 +145,8 @@ REQUIRED_USE="
RESTRICT="!test? ( test )" RESTRICT="!test? ( test )"
PATCHES=( PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad. # Avoid automagic CVS, bug #350330
"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch "${FILESDIR}"/git-2.37.0_rc1-optional-cvs.patch
# Make submodule output quiet # Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch "${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
@ -151,7 +156,7 @@ pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You" ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned." ewarn "have been warned!"
fi fi
if use perforce ; then if use perforce ; then
@ -166,21 +171,20 @@ exportmakeopts() {
myopts=( myopts=(
ASCIIDOC_NO_ROFF=YesPlease ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease) $(usev elibc_musl NO_REGEX=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease) $(usev !cvs NO_CVS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease) $(usev !iconv NO_ICONV=YesPlease)
$(usev !nls NO_GETTEXT=YesPlease)
$(usev !perforce NO_PYTHON=YesPlease)
$(usev !subversion NO_SVN_TESTS=YesPlease)
$(usev !tk NO_TCLTK=YesPlease)
) )
if use blksha1 ; then if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease ) myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi fi
if use curl ; then if use curl ; then
@ -189,7 +193,7 @@ exportmakeopts() {
myopts+=( NO_CURL=YesPlease ) myopts+=( NO_CURL=YesPlease )
fi fi
# broken assumptions, because of static build system ... # Broken assumptions because of static build system
myopts+=( myopts+=(
NO_FINK=YesPlease NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease NO_DARWIN_PORTS=YesPlease
@ -201,26 +205,26 @@ exportmakeopts() {
NO_EXTERNAL_GREP= NO_EXTERNAL_GREP=
) )
# can't define this to null, since the entire makefile depends on it # Can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease ) myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 ) extlibs+=( -lpcre2-8 )
fi fi
if [[ ${CHOST} == *-solaris* ]]; then if [[ ${CHOST} == *-solaris* ]]; then
myopts+=( myopts+=(
NEEDS_LIBICONV=YesPlease NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1 HAVE_CLOCK_MONOTONIC=1
) )
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
if grep -Fq getdelim "${ESYSROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 ) myopts+=( HAVE_GETDELIM=1 )
fi fi
fi fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease ) myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}" export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}" export EXTLIBS="${extlibs[@]}"
@ -229,8 +233,10 @@ exportmakeopts() {
src_unpack() { src_unpack() {
if [[ ${PV} != *9999 ]] ; then if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX} unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
@ -238,14 +244,14 @@ src_unpack() {
fi fi
else else
git-r3_src_unpack git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN . #cp "${FILESDIR}"/GIT-VERSION-GEN . || die
fi fi
} }
src_prepare() { src_prepare() {
# add experimental patches to improve mediawiki support # Add experimental patches to improve mediawiki support,
# see patches for origin # see patches for origin.
if use mediawiki-experimental ; then if use mediawiki-experimental ; then
PATCHES+=( PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
@ -254,11 +260,19 @@ src_prepare() {
) )
fi fi
if ! use safe-directory ; then
# This patch neuters the "safe directory" detection.
# bugs #838271, #838223
PATCHES+=(
"${FILESDIR}"/git-2.37.2-unsafe-directory.patch
)
fi
default default
if use prefix ; then if use prefix ; then
# bug #757309 # bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch eapply "${FILESDIR}"/git-2.37.2-darwin-prefix-gettext.patch
fi fi
sed -i \ sed -i \
@ -279,21 +293,37 @@ git_emake() {
# bug #320647: PYTHON_PATH # bug #320647: PYTHON_PATH
local PYTHON_PATH="" local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}" use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \ local mymakeargs=(
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ ${MY_MAKEOPTS}
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \ prefix="${EPREFIX}"/usr
GIT_TEST_OPTS="--no-color" \ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
OPTAR="$(tc-getAR)" \ perllibdir="$(use perl && perl_get_raw_vendorlib)"
OPTCC="$(tc-getCC)" \ sysconfdir="${EPREFIX}"/etc
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \ CC="$(tc-getCC)"
PERL_PATH="${EPREFIX}/usr/bin/perl" \ CFLAGS="${CFLAGS}"
PERL_MM_OPT="" \ PKG_CONFIG="$(tc-getPKG_CONFIG)"
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \ # TODO: --verbose?
GIT_TEST_OPTS="--no-color"
OPTAR="$(tc-getAR)"
OPTCC="$(tc-getCC)"
OPTCFLAGS="${CFLAGS}"
OPTLDFLAGS="${LDFLAGS}"
PERL_PATH="${EPREFIX}/usr/bin/perl"
PERL_MM_OPT=""
PYTHON_PATH="${PYTHON_PATH}"
V=1
"$@" "$@"
)
emake "${mymakeargs[@]}"
} }
src_configure() { src_configure() {
@ -301,58 +331,163 @@ src_configure() {
} }
src_compile() { src_compile() {
git_emake || die "emake failed" git_emake
if use perl && use cgi ; then if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed" git_emake gitweb
fi fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die git_emake -C contrib/credential/osxkeychain
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi fi
pushd Documentation &>/dev/null || die pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed" git_emake man
if use doc ; then if use doc ; then
git_emake info html || die "emake info html failed" git_emake info html
fi fi
else else
if use doc ; then if use doc ; then
git_emake info || die "emake info html failed" git_emake info
fi fi
fi fi
popd &>/dev/null || die popd &>/dev/null || die
if use gnome-keyring ; then if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die git_emake -C contrib/credential/libsecret
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi fi
pushd contrib/subtree &>/dev/null || die pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die git_emake git-subtree
# git-subtree.1 requires the full USE=doc dependency stack # git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1 use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die git_emake -C contrib/diff-highlight
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die git_emake -C contrib/mw-to-git
git_emake || die
popd &>/dev/null || die
fi fi
} }
src_test() {
local disabled=(
# We make safe-directory optional
t0033-safe-directory.sh
)
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
if [[ ${cvs} -gt 0 ]] && has_version dev-vcs/cvs ; then
let cvs=${cvs}+1
fi
if [[ ${cvs} -gt 1 ]] && has_version "dev-vcs/cvs[server]" ; then
let cvs=${cvs}+1
fi
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "Tests failed. Please file a bug!"
}
src_install() { src_install() {
git_emake DESTDIR="${D}" install || die "make install failed" git_emake DESTDIR="${D}" install
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain dobin contrib/credential/osxkeychain/git-credential-osxkeychain
@ -392,19 +527,17 @@ src_install() {
# git-subtree # git-subtree
pushd contrib/subtree &>/dev/null || die pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree" git_emake DESTDIR="${D}" install
if use doc ; then if use doc ; then
# Do not move git subtree install-man outside USE=doc! # Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree" git_emake DESTDIR="${D}" install-man install-html
fi fi
newdoc README README.git-subtree newdoc README README.git-subtree
dodoc git-subtree.txt dodoc git-subtree.txt
popd &>/dev/null || die popd &>/dev/null || die
if use mediawiki ; then if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die git_emake -C contrib/mw-to-git DESTDIR="${D}" install
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi fi
# diff-highlight # diff-highlight
@ -454,10 +587,7 @@ src_install() {
) )
local i local i
for i in "${contrib_objects[@]}" ; do for i in "${contrib_objects[@]}" ; do
cp -rf \ cp -rf "${S}"/contrib/${i} "${ED}"/usr/share/${PN}/contrib || die "Failed contrib ${i}"
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done done
if use perl && use cgi ; then if use perl && use cgi ; then
@ -494,8 +624,7 @@ src_install() {
if ! use prefix ; then if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \ systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket" systemd_dounit "${FILESDIR}/git-daemon.socket"
fi fi
@ -512,130 +641,17 @@ src_install() {
plocale_for_each_disabled_locale rm_loc plocale_for_each_disabled_locale rm_loc
} }
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() { pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "Please read /usr/share/bash-completion/completions/git for Git bash command" elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion." elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt" elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script" elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:" fi
echo
showpkgdeps git-quiltimport "dev-util/quilt" optfeature_header "Some scripts require additional dependencies:"
showpkgdeps git-instaweb \ optfeature git-quiltimport dev-util/quilt
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )" optfeature git-instaweb www-servers/lighttpd www-servers/apache www-servers/nginx
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
} }

View File

@ -8,12 +8,14 @@ GENTOO_DEPEND_ON_PERL=no
# bug #329479: git-remote-testgit is not multiple-version aware # bug #329479: git-remote-testgit is not multiple-version aware
PYTHON_COMPAT=( python3_{8..10} ) PYTHON_COMPAT=( python3_{8..10} )
inherit toolchain-funcs perl-module bash-completion-r1 plocale python-single-r1 systemd inherit toolchain-funcs perl-module bash-completion-r1 optfeature plocale python-single-r1 systemd
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
if [[ ${PV} == *9999 ]]; then if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git" EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
inherit git-r3
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
# See https://git-scm.com/docs/gitworkflows#_graduation # See https://git-scm.com/docs/gitworkflows#_graduation
# In order of stability: # In order of stability:
@ -21,7 +23,7 @@ if [[ ${PV} == *9999 ]]; then
# 9999-r1: master # 9999-r1: master
# 9999-r2: next # 9999-r2: next
# 9999-r3: seen # 9999-r3: seen
case "${PVR}" in case ${PVR} in
9999) EGIT_BRANCH=maint ;; 9999) EGIT_BRANCH=maint ;;
9999-r1) EGIT_BRANCH=master ;; 9999-r1) EGIT_BRANCH=master ;;
9999-r2) EGIT_BRANCH=next;; 9999-r2) EGIT_BRANCH=next;;
@ -34,44 +36,49 @@ MY_P="${PN}-${MY_PV}"
DOC_VER="${MY_PV}" DOC_VER="${MY_PV}"
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency" DESCRIPTION="Stupid content tracker: distributed VCS designed for speed and efficiency"
HOMEPAGE="https://www.git-scm.com/" HOMEPAGE="https://www.git-scm.com/"
if [[ ${PV} != *9999 ]]; then if [[ ${PV} != *9999 ]]; then
SRC_URI_SUFFIX="xz" SRC_URI_SUFFIX="xz"
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git" SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} [[ ${PV/rc} != ${PV} ]] && SRC_URI_KORG+='/testing'
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
doc? ( SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}"
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} SRC_URI+=" ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}"
)" SRC_URI+=" doc? ( ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} )"
[[ "${PV}" == *_rc* ]] || \
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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
fi fi
S="${WORKDIR}"/${MY_P}
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 selinux subversion tk +threads +webdav xinetd cvs test" IUSE="+blksha1 +curl cgi doc gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +safe-directory selinux subversion tk +webdav xinetd cvs test"
# Common to both DEPEND and RDEPEND # Common to both DEPEND and RDEPEND
DEPEND=" DEPEND="
gnome-keyring? ( dev-libs/openssl:=
app-crypt/libsecret
dev-libs/glib:2
)
dev-libs/openssl:0=
sys-libs/zlib sys-libs/zlib
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:0= )
curl? ( curl? (
net-misc/curl net-misc/curl
webdav? ( dev-libs/expat ) webdav? ( dev-libs/expat )
) )
gnome-keyring? (
app-crypt/libsecret
dev-libs/glib:2
)
iconv? ( virtual/libiconv ) iconv? ( virtual/libiconv )
pcre? ( dev-libs/libpcre2:= )
perl? ( dev-lang/perl:=[-build(-)] )
tk? ( dev-lang/tk:= )
" "
RDEPEND="
RDEPEND="${DEPEND} ${DEPEND}
gpg? ( app-crypt/gnupg ) gpg? ( app-crypt/gnupg )
perl? ( perl? (
dev-perl/Error dev-perl/Error
@ -120,12 +127,10 @@ BDEPEND="
# Live ebuild builds man pages and HTML docs, additionally # Live ebuild builds man pages and HTML docs, additionally
if [[ ${PV} == *9999 ]]; then if [[ ${PV} == *9999 ]]; then
BDEPEND="${BDEPEND} BDEPEND+=" app-text/asciidoc"
app-text/asciidoc"
fi fi
SITEFILE="50${PN}-gentoo.el" SITEFILE="50${PN}-gentoo.el"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE=" REQUIRED_USE="
cgi? ( perl ) cgi? ( perl )
@ -140,8 +145,8 @@ REQUIRED_USE="
RESTRICT="!test? ( test )" RESTRICT="!test? ( test )"
PATCHES=( PATCHES=(
# bug #350330 - automagic CVS when we don't want it is bad. # Avoid automagic CVS, bug #350330
"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch "${FILESDIR}"/git-2.37.0_rc1-optional-cvs.patch
# Make submodule output quiet # Make submodule output quiet
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch "${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
@ -151,7 +156,7 @@ pkg_setup() {
if use subversion && has_version "dev-vcs/subversion[dso]" ; then if use subversion && has_version "dev-vcs/subversion[dso]" ; then
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
ewarn "with USE=dso, there may be weird crashes in git-svn. You" ewarn "with USE=dso, there may be weird crashes in git-svn. You"
ewarn "have been warned." ewarn "have been warned!"
fi fi
if use perforce ; then if use perforce ; then
@ -166,21 +171,20 @@ exportmakeopts() {
myopts=( myopts=(
ASCIIDOC_NO_ROFF=YesPlease ASCIIDOC_NO_ROFF=YesPlease
$(usex cvs '' NO_CVS=YesPlease)
$(usex elibc_musl NO_REGEX=YesPlease '')
$(usex iconv '' NO_ICONV=YesPlease)
$(usex nls '' NO_GETTEXT=YesPlease)
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
$(usex perforce '' NO_PYTHON=YesPlease)
$(usex subversion '' NO_SVN_TESTS=YesPlease) $(usev elibc_musl NO_REGEX=YesPlease)
$(usex threads '' NO_PTHREADS=YesPlease) $(usev !cvs NO_CVS=YesPlease)
$(usex tk '' NO_TCLTK=YesPlease) $(usev !iconv NO_ICONV=YesPlease)
$(usev !nls NO_GETTEXT=YesPlease)
$(usev !perforce NO_PYTHON=YesPlease)
$(usev !subversion NO_SVN_TESTS=YesPlease)
$(usev !tk NO_TCLTK=YesPlease)
) )
if use blksha1 ; then if use blksha1 ; then
myopts+=( BLK_SHA1=YesPlease ) myopts+=( BLK_SHA1=YesPlease )
elif use ppcsha1 ; then
myopts+=( PPC_SHA1=YesPlease )
fi fi
if use curl ; then if use curl ; then
@ -189,7 +193,7 @@ exportmakeopts() {
myopts+=( NO_CURL=YesPlease ) myopts+=( NO_CURL=YesPlease )
fi fi
# broken assumptions, because of static build system ... # Broken assumptions because of static build system
myopts+=( myopts+=(
NO_FINK=YesPlease NO_FINK=YesPlease
NO_DARWIN_PORTS=YesPlease NO_DARWIN_PORTS=YesPlease
@ -201,26 +205,26 @@ exportmakeopts() {
NO_EXTERNAL_GREP= NO_EXTERNAL_GREP=
) )
# can't define this to null, since the entire makefile depends on it # Can't define this to null, since the entire makefile depends on it
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
if use pcre; then if use pcre; then
myopts+=( USE_LIBPCRE2=YesPlease ) myopts+=( USE_LIBPCRE2=YesPlease )
extlibs+=( -lpcre2-8 ) extlibs+=( -lpcre2-8 )
fi fi
if [[ ${CHOST} == *-solaris* ]]; then if [[ ${CHOST} == *-solaris* ]]; then
myopts+=( myopts+=(
NEEDS_LIBICONV=YesPlease NEEDS_LIBICONV=YesPlease
HAVE_CLOCK_MONOTONIC=1 HAVE_CLOCK_MONOTONIC=1
) )
if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
if grep -Fq getdelim "${ESYSROOT}"/usr/include/stdio.h ; then
myopts+=( HAVE_GETDELIM=1 ) myopts+=( HAVE_GETDELIM=1 )
fi fi
fi fi
if has_version '>=app-text/asciidoc-8.0' ; then
myopts+=( ASCIIDOC8=YesPlease ) myopts+=( ASCIIDOC8=YesPlease )
fi
export MY_MAKEOPTS="${myopts[@]}" export MY_MAKEOPTS="${myopts[@]}"
export EXTLIBS="${extlibs[@]}" export EXTLIBS="${extlibs[@]}"
@ -229,8 +233,10 @@ exportmakeopts() {
src_unpack() { src_unpack() {
if [[ ${PV} != *9999 ]] ; then if [[ ${PV} != *9999 ]] ; then
unpack ${MY_P}.tar.${SRC_URI_SUFFIX} unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
cd "${S}" || die cd "${S}" || die
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
if use doc ; then if use doc ; then
pushd "${S}"/Documentation &>/dev/null || die pushd "${S}"/Documentation &>/dev/null || die
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
@ -238,14 +244,14 @@ src_unpack() {
fi fi
else else
git-r3_src_unpack git-r3_src_unpack
#cp "${FILESDIR}"/GIT-VERSION-GEN . #cp "${FILESDIR}"/GIT-VERSION-GEN . || die
fi fi
} }
src_prepare() { src_prepare() {
# add experimental patches to improve mediawiki support # Add experimental patches to improve mediawiki support,
# see patches for origin # see patches for origin.
if use mediawiki-experimental ; then if use mediawiki-experimental ; then
PATCHES+=( PATCHES+=(
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
@ -254,11 +260,19 @@ src_prepare() {
) )
fi fi
if ! use safe-directory ; then
# This patch neuters the "safe directory" detection.
# bugs #838271, #838223
PATCHES+=(
"${FILESDIR}"/git-2.37.2-unsafe-directory.patch
)
fi
default default
if use prefix ; then if use prefix ; then
# bug #757309 # bug #757309
eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch eapply "${FILESDIR}"/git-2.37.2-darwin-prefix-gettext.patch
fi fi
sed -i \ sed -i \
@ -279,21 +293,37 @@ git_emake() {
# bug #320647: PYTHON_PATH # bug #320647: PYTHON_PATH
local PYTHON_PATH="" local PYTHON_PATH=""
use perforce && PYTHON_PATH="${PYTHON}" use perforce && PYTHON_PATH="${PYTHON}"
emake ${MY_MAKEOPTS} \
prefix="${EPREFIX}"/usr \ local mymakeargs=(
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ ${MY_MAKEOPTS}
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
sysconfdir="${EPREFIX}"/etc \ prefix="${EPREFIX}"/usr
GIT_TEST_OPTS="--no-color" \ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
OPTAR="$(tc-getAR)" \ perllibdir="$(use perl && perl_get_raw_vendorlib)"
OPTCC="$(tc-getCC)" \ sysconfdir="${EPREFIX}"/etc
OPTCFLAGS="${CFLAGS}" \
OPTLDFLAGS="${LDFLAGS}" \ CC="$(tc-getCC)"
PERL_PATH="${EPREFIX}/usr/bin/perl" \ CFLAGS="${CFLAGS}"
PERL_MM_OPT="" \ PKG_CONFIG="$(tc-getPKG_CONFIG)"
PYTHON_PATH="${PYTHON_PATH}" \
V=1 \ # TODO: --verbose?
GIT_TEST_OPTS="--no-color"
OPTAR="$(tc-getAR)"
OPTCC="$(tc-getCC)"
OPTCFLAGS="${CFLAGS}"
OPTLDFLAGS="${LDFLAGS}"
PERL_PATH="${EPREFIX}/usr/bin/perl"
PERL_MM_OPT=""
PYTHON_PATH="${PYTHON_PATH}"
V=1
"$@" "$@"
)
emake "${mymakeargs[@]}"
} }
src_configure() { src_configure() {
@ -301,58 +331,163 @@ src_configure() {
} }
src_compile() { src_compile() {
git_emake || die "emake failed" git_emake
if use perl && use cgi ; then if use perl && use cgi ; then
git_emake gitweb || die "emake gitweb (cgi) failed" git_emake gitweb
fi fi
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
pushd contrib/credential/osxkeychain &>/dev/null || die git_emake -C contrib/credential/osxkeychain
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|| die "emake credential-osxkeychain"
popd &>/dev/null || die
fi fi
pushd Documentation &>/dev/null || die pushd Documentation &>/dev/null || die
if [[ ${PV} == *9999 ]] ; then if [[ ${PV} == *9999 ]] ; then
git_emake man || die "emake man failed" git_emake man
if use doc ; then if use doc ; then
git_emake info html || die "emake info html failed" git_emake info html
fi fi
else else
if use doc ; then if use doc ; then
git_emake info || die "emake info html failed" git_emake info
fi fi
fi fi
popd &>/dev/null || die popd &>/dev/null || die
if use gnome-keyring ; then if use gnome-keyring ; then
pushd contrib/credential/libsecret &>/dev/null || die git_emake -C contrib/credential/libsecret
git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
popd &>/dev/null || die
fi fi
pushd contrib/subtree &>/dev/null || die pushd contrib/subtree &>/dev/null || die
git_emake git-subtree || die git_emake git-subtree
# git-subtree.1 requires the full USE=doc dependency stack # git-subtree.1 requires the full USE=doc dependency stack
use doc && git_emake git-subtree.html git-subtree.1 use doc && git_emake git-subtree.html git-subtree.1
popd &>/dev/null || die popd &>/dev/null || die
pushd contrib/diff-highlight &>/dev/null || die git_emake -C contrib/diff-highlight
git_emake || die
popd &>/dev/null || die
if use mediawiki ; then if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die git_emake -C contrib/mw-to-git
git_emake || die
popd &>/dev/null || die
fi fi
} }
src_test() {
local disabled=(
# We make safe-directory optional
t0033-safe-directory.sh
)
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
if [[ ${cvs} -gt 0 ]] && has_version dev-vcs/cvs ; then
let cvs=${cvs}+1
fi
if [[ ${cvs} -gt 1 ]] && has_version "dev-vcs/cvs[server]" ; then
let cvs=${cvs}+1
fi
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "Tests failed. Please file a bug!"
}
src_install() { src_install() {
git_emake DESTDIR="${D}" install || die "make install failed" git_emake DESTDIR="${D}" install
if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
dobin contrib/credential/osxkeychain/git-credential-osxkeychain dobin contrib/credential/osxkeychain/git-credential-osxkeychain
@ -392,19 +527,17 @@ src_install() {
# git-subtree # git-subtree
pushd contrib/subtree &>/dev/null || die pushd contrib/subtree &>/dev/null || die
git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree" git_emake DESTDIR="${D}" install
if use doc ; then if use doc ; then
# Do not move git subtree install-man outside USE=doc! # Do not move git subtree install-man outside USE=doc!
git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree" git_emake DESTDIR="${D}" install-man install-html
fi fi
newdoc README README.git-subtree newdoc README README.git-subtree
dodoc git-subtree.txt dodoc git-subtree.txt
popd &>/dev/null || die popd &>/dev/null || die
if use mediawiki ; then if use mediawiki ; then
pushd contrib/mw-to-git &>/dev/null || die git_emake -C contrib/mw-to-git DESTDIR="${D}" install
git_emake DESTDIR="${D}" install
popd &>/dev/null || die
fi fi
# diff-highlight # diff-highlight
@ -454,10 +587,7 @@ src_install() {
) )
local i local i
for i in "${contrib_objects[@]}" ; do for i in "${contrib_objects[@]}" ; do
cp -rf \ cp -rf "${S}"/contrib/${i} "${ED}"/usr/share/${PN}/contrib || die "Failed contrib ${i}"
"${S}"/contrib/${i} \
"${ED}"/usr/share/${PN}/contrib \
|| die "Failed contrib ${i}"
done done
if use perl && use cgi ; then if use perl && use cgi ; then
@ -494,8 +624,7 @@ src_install() {
if ! use prefix ; then if ! use prefix ; then
newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
newconfd "${FILESDIR}"/git-daemon.confd git-daemon newconfd "${FILESDIR}"/git-daemon.confd git-daemon
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \ systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
"git-daemon@.service"
systemd_dounit "${FILESDIR}/git-daemon.socket" systemd_dounit "${FILESDIR}/git-daemon.socket"
fi fi
@ -512,130 +641,17 @@ src_install() {
plocale_for_each_disabled_locale rm_loc plocale_for_each_disabled_locale rm_loc
} }
src_test() {
local disabled=()
local tests_cvs=(
t9200-git-cvsexportcommit.sh
t9400-git-cvsserver-server.sh
t9401-git-cvsserver-crlf.sh
t9402-git-cvsserver-refs.sh
t9600-cvsimport.sh
t9601-cvsimport-vendor-branch.sh
t9602-cvsimport-branches-tags.sh
t9603-cvsimport-patchsets.sh
t9604-cvsimport-timestamps.sh
)
local tests_perl=(
t3701-add-interactive.sh
t5502-quickfetch.sh
t5512-ls-remote.sh
t5520-pull.sh
t7106-reset-unborn-branch.sh
t7501-commit.sh
)
# Bug #225601 - t0004 is not suitable for root perm
# Bug #219839 - t1004 is not suitable for root perm
# t0001-init.sh - check for init notices EPERM* fails
local tests_nonroot=(
t0001-init.sh
t0004-unwritable.sh
t0070-fundamental.sh
t1004-read-tree-m-u-wf.sh
t3700-add.sh
t7300-clean.sh
)
# t9100 still fails with symlinks in SVN 1.7
local test_svn=( t9100-git-svn-basic.sh )
# Unzip is used only for the testcase code, not by any normal parts of Git.
if ! has_version app-arch/unzip ; then
einfo "Disabling tar-tree tests"
disabled+=( t5000-tar-tree.sh )
fi
local cvs=0
use cvs && let cvs=${cvs}+1
if [[ ${EUID} -eq 0 ]] ; then
if [[ ${cvs} -eq 1 ]] ; then
ewarn "Skipping CVS tests because CVS does not work as root!"
ewarn "You should retest with FEATURES=userpriv!"
disabled+=( ${tests_cvs[@]} )
fi
einfo "Skipping other tests that require being non-root"
disabled+=( ${tests_nonroot[@]} )
else
[[ ${cvs} -gt 0 ]] && \
has_version dev-vcs/cvs && \
let cvs=${cvs}+1
[[ ${cvs} -gt 1 ]] && \
has_version "dev-vcs/cvs[server]" && \
let cvs=${cvs}+1
if [[ ${cvs} -lt 3 ]] ; then
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
disabled+=( ${tests_cvs[@]} )
fi
fi
if ! use perl ; then
einfo "Disabling tests that need Perl"
disabled+=( ${tests_perl[@]} )
fi
einfo "Disabling tests that fail with SVN 1.7"
disabled+=( ${test_svn[@]} )
# Reset all previously disabled tests
pushd t &>/dev/null || die
local i
for i in *.sh.DISABLED ; do
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
done
einfo "Disabled tests:"
for i in ${disabled[@]} ; do
if [[ -f "${i}" ]] ; then
mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
fi
done
# Avoid the test system removing the results because we want them ourselves
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
# Clean old results first, must always run
nonfatal git_emake clean
popd &>/dev/null || die
# Now run the tests, keep going if we hit an error, and don't terminate on
# failure
local rc
einfo "Start test run"
#MAKEOPTS=-j1
nonfatal git_emake --keep-going test
rc=$?
# Display nice results, now print the results
pushd t &>/dev/null || die
nonfatal git_emake aggregate-results
# And bail if there was a problem
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
}
showpkgdeps() {
local pkg=$1
shift
elog " $(printf "%-17s:" ${pkg}) ${@}"
}
pkg_postinst() { pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "Please read /usr/share/bash-completion/completions/git for Git bash command" elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
elog "completion." elog "completion."
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt" elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
elog "Note that the prompt bash code is now in that separate script" elog "Note that the prompt bash code is now in that separate script"
elog "These additional scripts need some dependencies:" fi
echo
showpkgdeps git-quiltimport "dev-util/quilt" optfeature_header "Some scripts require additional dependencies:"
showpkgdeps git-instaweb \ optfeature git-quiltimport dev-util/quilt
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )" optfeature git-instaweb www-servers/lighttpd www-servers/apache www-servers/nginx
echo
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
} }

View File

@ -24,11 +24,12 @@
<flag name="cgi">Install gitweb too</flag> <flag name="cgi">Install gitweb too</flag>
<flag name="curl">Support fetching and pushing (requires webdav too) over http:// and https:// protocols</flag> <flag name="curl">Support fetching and pushing (requires webdav too) over http:// and https:// protocols</flag>
<flag name="gpg">Pull in gnupg for signing -- without gnupg, attempts at signing will fail at runtime!</flag> <flag name="gpg">Pull in gnupg for signing -- without gnupg, attempts at signing will fail at runtime!</flag>
<flag name="highlight">GitWeb support for app-text/highlight</flag> <flag name="highlight">GitWeb support for <pkg>app-text/highlight</pkg></flag>
<flag name="mediawiki">Support pulling and pushing from MediaWiki</flag> <flag name="mediawiki">Support pulling and pushing from MediaWiki</flag>
<flag name="mediawiki-experimental">Add experimental patches for improved MediaWiki support</flag> <flag name="mediawiki-experimental">Add experimental patches for improved MediaWiki support</flag>
<flag name="perforce">Add support for Perforce version control system (requires manual installation of Perforce client)</flag> <flag name="perforce">Add support for Perforce version control system (requires manual installation of Perforce client)</flag>
<flag name="ppcsha1">Make use of a bundled routine that is optimized for the PPC arch</flag> <flag name="ppcsha1">Make use of a bundled routine that is optimized for the PPC arch</flag>
<flag name="safe-directory">Respect the safe.directory setting</flag>
<flag name="subversion">Include git-svn for <pkg>dev-vcs/subversion</pkg> support</flag> <flag name="subversion">Include git-svn for <pkg>dev-vcs/subversion</pkg> support</flag>
<flag name="tk">Include the 'gitk' and 'git gui' tools</flag> <flag name="tk">Include the 'gitk' and 'git gui' tools</flag>
<flag name="webdav">Adds support for push'ing to HTTP/HTTPS repositories via DAV</flag> <flag name="webdav">Adds support for push'ing to HTTP/HTTPS repositories via DAV</flag>

View File

@ -601,11 +601,20 @@ _test-flag-PROG() {
# #
# We can add more selective detection of no-op flags via # We can add more selective detection of no-op flags via
# '-Werror=ignored-optimization-argument' and similar error options # '-Werror=ignored-optimization-argument' and similar error options
# similar to what we are doing with '-Qunused-arguments'. # or accept unused flags with '-Qunused-arguments' like we
# used to for bug #627474. Since we now invoke the linker
# for testing linker flags, unused argument warnings aren't
# ignored; linker flags may no longer be accepted in CFLAGS.
#
# However, warnings emitted by a compiler for a clean source
# can break feature detection by CMake or autoconf since
# many checks use -Werror internally. See e.g. bug #714742.
local cmdline=( local cmdline=(
"${comp[@]}" "${comp[@]}"
# Clang will warn about unknown gcc flags but exit 0. # Clang will warn about unknown gcc flags but exit 0.
# Need -Werror to force it to exit non-zero. # Need -Werror to force it to exit non-zero.
#
# See also bug #712488 and bug #714742.
-Werror -Werror
"$@" "$@"
# -x<lang> options need to go before first source file # -x<lang> options need to go before first source file
@ -614,16 +623,7 @@ _test-flag-PROG() {
"${test_in}" -o "${test_out}" "${test_in}" -o "${test_out}"
) )
if ! "${cmdline[@]}" &>/dev/null; then
# -Werror makes clang bail out on unused arguments as well;
# try to add -Qunused-arguments to work-around that
# other compilers don't support it but then, it's failure like
# any other.
#
# See also bug #712488 and bug #714742.
cmdline+=( -Qunused-arguments )
"${cmdline[@]}" &>/dev/null "${cmdline[@]}" &>/dev/null
fi
} }
# @FUNCTION: test-flag-CC # @FUNCTION: test-flag-CC

View File

@ -140,7 +140,7 @@ unset -f _multilib_build_set_globals
# If multilib is disabled, the default ABI will be returned # If multilib is disabled, the default ABI will be returned
# in order to enforce consistent testing with multilib code. # in order to enforce consistent testing with multilib code.
multilib_get_enabled_abis() { multilib_get_enabled_abis() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local pairs=( $(multilib_get_enabled_abi_pairs) ) local pairs=( $(multilib_get_enabled_abi_pairs) )
echo "${pairs[@]#*.}" echo "${pairs[@]#*.}"
@ -155,7 +155,7 @@ multilib_get_enabled_abis() {
# If multilib is disabled, the default ABI will be returned # If multilib is disabled, the default ABI will be returned
# along with empty <use-flag>. # along with empty <use-flag>.
multilib_get_enabled_abi_pairs() { multilib_get_enabled_abi_pairs() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local abis=( $(get_all_abis) ) local abis=( $(get_all_abis) )
@ -198,7 +198,7 @@ multilib_get_enabled_abi_pairs() {
# @DESCRIPTION: # @DESCRIPTION:
# Initialize the environment for ABI selected for multibuild. # Initialize the environment for ABI selected for multibuild.
_multilib_multibuild_wrapper() { _multilib_multibuild_wrapper() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local ABI=${MULTIBUILD_VARIANT#*.} local ABI=${MULTIBUILD_VARIANT#*.}
local -r MULTILIB_ABI_FLAG=${MULTIBUILD_VARIANT%.*} local -r MULTILIB_ABI_FLAG=${MULTIBUILD_VARIANT%.*}
@ -218,7 +218,7 @@ _multilib_multibuild_wrapper() {
# If multilib support is disabled, it just runs the commands. No setup # If multilib support is disabled, it just runs the commands. No setup
# is done. # is done.
multilib_foreach_abi() { multilib_foreach_abi() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) ) local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) )
multibuild_foreach_variant _multilib_multibuild_wrapper "${@}" multibuild_foreach_variant _multilib_multibuild_wrapper "${@}"
@ -237,7 +237,7 @@ multilib_foreach_abi() {
# This function used to run multiple commands in parallel. Now it's just # This function used to run multiple commands in parallel. Now it's just
# a deprecated alias to multilib_foreach_abi. # a deprecated alias to multilib_foreach_abi.
multilib_parallel_foreach_abi() { multilib_parallel_foreach_abi() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) ) local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) )
multibuild_foreach_variant _multilib_multibuild_wrapper "${@}" multibuild_foreach_variant _multilib_multibuild_wrapper "${@}"
@ -295,7 +295,7 @@ multilib_check_headers() {
# to ABI-specific build directory matching BUILD_DIR used by # to ABI-specific build directory matching BUILD_DIR used by
# multilib_foreach_abi(). # multilib_foreach_abi().
multilib_copy_sources() { multilib_copy_sources() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) ) local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) )
multibuild_copy_sources multibuild_copy_sources
@ -373,7 +373,7 @@ multilib_copy_sources() {
# After all wrappers are prepared, multilib_install_wrappers shall # After all wrappers are prepared, multilib_install_wrappers shall
# be called to commit them to the installation tree. # be called to commit them to the installation tree.
multilib_prepare_wrappers() { multilib_prepare_wrappers() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -le 1 ]] || die "${FUNCNAME}: too many arguments" [[ ${#} -le 1 ]] || die "${FUNCNAME}: too many arguments"
@ -537,7 +537,7 @@ _EOF_
# between the calls to multilib_prepare_wrappers # between the calls to multilib_prepare_wrappers
# and multilib_install_wrappers. # and multilib_install_wrappers.
multilib_install_wrappers() { multilib_install_wrappers() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -le 1 ]] || die "${FUNCNAME}: too many arguments" [[ ${#} -le 1 ]] || die "${FUNCNAME}: too many arguments"
@ -558,13 +558,31 @@ multilib_install_wrappers() {
# Determine whether the currently built ABI is the profile native. # Determine whether the currently built ABI is the profile native.
# Return true status (0) if that is true, otherwise false (1). # Return true status (0) if that is true, otherwise false (1).
multilib_is_native_abi() { multilib_is_native_abi() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 0 ]] || die "${FUNCNAME}: too many arguments" [[ ${#} -eq 0 ]] || die "${FUNCNAME}: too many arguments"
[[ ${COMPLETE_MULTILIB} == yes || ${ABI} == ${DEFAULT_ABI} ]] [[ ${COMPLETE_MULTILIB} == yes || ${ABI} == ${DEFAULT_ABI} ]]
} }
# @FUNCTION: multilib_native_use
# @USAGE: <flag>
# @DESCRIPTION:
# Like the standard use command, but only yields true if
# multilib_is_native_abi and use <flag> are true, otherwise false.
multilib_native_use() {
multilib_is_native_abi && use "$@"
}
# @FUNCTION: multilib_native_usev
# @USAGE: <flag> [<opt-value>]
# @DESCRIPTION:
# Like the standard usev command, but only prints output
# if multilib_is_native_abi and usev <flag> are true.
multilib_native_usev() {
multilib_is_native_abi && usev "$@"
}
# @FUNCTION: multilib_native_use_with # @FUNCTION: multilib_native_use_with
# @USAGE: <flag> [<opt-name> [<opt-value>]] # @USAGE: <flag> [<opt-name> [<opt-value>]]
# @DESCRIPTION: # @DESCRIPTION:

View File

@ -288,6 +288,13 @@ BDEPEND="
)" )"
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"
if [[ ${PN} == gcc && ${PV} == *_p* ]] ; then
# Snapshots don't contain info pages.
# If they start to, adjust gcc_cv_prog_makeinfo_modern logic in toolchain_src_configure.
# Needed unless/until https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106899 is fixed
BDEPEND+=" sys-apps/texinfo"
fi
if tc_has_feature gcj ; then if tc_has_feature gcj ; then
DEPEND+=" DEPEND+="
gcj? ( gcj? (
@ -324,11 +331,19 @@ if tc_has_feature zstd ; then
RDEPEND+=" zstd? ( app-arch/zstd:= )" RDEPEND+=" zstd? ( app-arch/zstd:= )"
fi fi
if tc_has_feature valgrind; then if tc_has_feature valgrind ; then
BDEPEND+=" valgrind? ( dev-util/valgrind )" BDEPEND+=" valgrind? ( dev-util/valgrind )"
fi fi
if tc_version_is_at_least 12.0 ; then # TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler
# supports Ada.
if tc_has_feature ada ; then
BDEPEND+=" ada? ( || ( sys-devel/gcc[ada] dev-lang/gnat-gpl[ada] ) )"
fi
# TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler
# supports D.
if tc_has_feature d && tc_version_is_at_least 12.0 ; then
# D in 12+ is self-hosting and needs D to bootstrap. # D in 12+ is self-hosting and needs D to bootstrap.
# TODO: package some binary we can use, like for Ada # TODO: package some binary we can use, like for Ada
# bug #840182 # bug #840182
@ -1187,8 +1202,6 @@ toolchain_src_configure() {
fi fi
done done
# Convert armv6m to armv6-m
[[ ${arm_arch} == armv6m ]] && arm_arch=armv6-m
# Convert armv7{a,r,m} to armv7-{a,r,m} # Convert armv7{a,r,m} to armv7-{a,r,m}
[[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-} [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
# See if this is a valid --with-arch flag # See if this is a valid --with-arch flag
@ -1213,6 +1226,17 @@ toolchain_src_configure() {
armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;; armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;;
esac esac
fi fi
# If multilib is used, make the compiler build multilibs
# for A or R and M architecture profiles. Do this only
# when no specific arch/mode/float is specified, e.g.
# for target arm-none-eabi, since doing this is
# incompatible with --with-arch/cpu/float/fpu.
if is_multilib && [[ ${arm_arch} == arm ]] && \
tc_version_is_at_least 7.1
then
confgcc+=( --with-multilib-list=aprofile,rmprofile )
fi
;; ;;
mips) mips)
# Add --with-abi flags to set default ABI # Add --with-abi flags to set default ABI
@ -1408,9 +1432,22 @@ toolchain_src_configure() {
) )
fi fi
if [[ ${PV} != *_p* && -f "${S}"/gcc/doc/gcc.info ]] ; then
# Disable gcc info regeneration -- it ships with generated info pages # Disable gcc info regeneration -- it ships with generated info pages
# already. Our custom version/urls/etc... trigger it. bug #464008 # already. Our custom version/urls/etc... trigger it. bug #464008
export gcc_cv_prog_makeinfo_modern=no export gcc_cv_prog_makeinfo_modern=no
else
# Allow a fallback so we don't accidentally install no docs
# bug #834845
ewarn "No pre-generated info pages in tarball. Allowing regeneration with texinfo..."
if [[ ${PV} == *_p* && -f "${S}"/gcc/doc/gcc.info ]] ; then
# Safeguard against https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106899 being fixed
# without corresponding ebuild changes.
eqawarn "Snapshot release with pre-generated info pages found!"
eqawarn "The BDEPEND in the ebuild should be updated to drop texinfo."
fi
fi
# Do not let the X detection get in our way. We know things can be found # Do not let the X detection get in our way. We know things can be found
# via system paths, so no need to hardcode things that'll break multilib. # via system paths, so no need to hardcode things that'll break multilib.

View File

@ -1,2 +1,4 @@
DIST nmap-7.92.tar.bz2 10498200 BLAKE2B 0f3022e797ffca7d1d3497990c86bb60ac9a80bb93cb4ec7fcfa4f51782cb8d79d4f0aca0fa6119bfd604cfe7b89af3d4223ce13ad3e6c948c021909aebd956b SHA512 7828367f9dc76ff4d1e8c821260e565fb0c3cb6aba0473d24759133a3006cdf2cb087574f0dd7d2ba47a63754ba4f72e0b78cdae1333a58f05c41d428b56ad59 DIST nmap-7.92.tar.bz2 10498200 BLAKE2B 0f3022e797ffca7d1d3497990c86bb60ac9a80bb93cb4ec7fcfa4f51782cb8d79d4f0aca0fa6119bfd604cfe7b89af3d4223ce13ad3e6c948c021909aebd956b SHA512 7828367f9dc76ff4d1e8c821260e565fb0c3cb6aba0473d24759133a3006cdf2cb087574f0dd7d2ba47a63754ba4f72e0b78cdae1333a58f05c41d428b56ad59
DIST nmap-7.92.tar.bz2.asc 195 BLAKE2B a8052138e58cd8009341a5f3fb3a31f55af9383b9dbb6c7ce858d80541e000b17953c053e9a3a6d86a5551244cf13f181e6e3943095b86335cbb5dae96e20bdd SHA512 300a22ab097bbff67de354de6b22a8e3287f95dd6318fcabd546ba52158e9589b19ede175587c6e31518c47bc118c7dd05db43755def075d810b16945b65e05a DIST nmap-7.92.tar.bz2.asc 195 BLAKE2B a8052138e58cd8009341a5f3fb3a31f55af9383b9dbb6c7ce858d80541e000b17953c053e9a3a6d86a5551244cf13f181e6e3943095b86335cbb5dae96e20bdd SHA512 300a22ab097bbff67de354de6b22a8e3287f95dd6318fcabd546ba52158e9589b19ede175587c6e31518c47bc118c7dd05db43755def075d810b16945b65e05a
DIST nmap-7.93.tar.bz2 10823114 BLAKE2B e9fa0fe0f219258ab29cf59a98f09142ce1e5e70395f6578d57e644d343ff95764a8208f2fd00a686a14217821adb038a1bb4cdf25f355696e68131773cc1995 SHA512 4ec9295e25bd7a215e718c3dbbf09bfe6339b60850f4a8d09b5ad0cbf41a0da8ece0168efc5ca91ba1ecbd83b1d31735d77dacd5f1ec1a9fd212454dd1f0f0fd
DIST nmap-7.93.tar.bz2.asc 195 BLAKE2B 0c18200507c8c0901df6f0fa3230330eff72dd5e54f2d862d35a1df26b9ff3b189cebe0b91cdf47c4f87fef523cc6d9c3bcc36a42d8fcc8be7830fc861c64b5f SHA512 9bd8e436a6f7010ba2e3578affc4174fae12e2e7b78e523ceeb94ba44ccd928ac2cf5da52d02a00c4f190f71425671cc817b44a6a2f8d0b42b10d535bb1af3a9

View File

@ -0,0 +1,287 @@
https://github.com/nmap/nmap/commit/d6bea8dcdee36a3902cece14097993350306f1b6
https://github.com/nmap/nmap/issues/2516
https://bugs.gentoo.org/868483
From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
Date: Tue, 6 Sep 2022 22:39:34 +0000
Subject: [PATCH] Build based on OpenSSL version, not API level. Fixes #2516
--- a/ncat/http_digest.c
+++ b/ncat/http_digest.c
@@ -133,7 +133,7 @@ int http_digest_init_secret(void)
return 0;
}
-#if OPENSSL_API_LEVEL < 10100
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
#define EVP_MD_CTX_new EVP_MD_CTX_create
#define EVP_MD_CTX_free EVP_MD_CTX_destroy
#endif
--- a/ncat/ncat_connect.c
+++ b/ncat/ncat_connect.c
@@ -82,8 +82,8 @@
#include <openssl/err.h>
/* Deprecated in OpenSSL 3.0 */
-#if OPENSSL_API_LEVEL >= 30000
-#define SSL_get_peer_certificate SSL_get1_peer_certificate
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+# define SSL_get_peer_certificate SSL_get1_peer_certificate
#endif
#endif
--- a/ncat/ncat_ssl.c
+++ b/ncat/ncat_ssl.c
@@ -80,7 +80,7 @@
#define FUNC_ASN1_STRING_data ASN1_STRING_data
#endif
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#include <openssl/provider.h>
/* Deprecated in OpenSSL 3.0 */
#define SSL_get_peer_certificate SSL_get1_peer_certificate
@@ -117,7 +117,7 @@ SSL_CTX *setup_ssl_listen(void)
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
SSL_load_error_strings();
-#elif OPENSSL_API_LEVEL >= 30000
+#elif OPENSSL_VERSION_NUMBER >= 0x30000000L
if (NULL == OSSL_PROVIDER_load(NULL, "legacy"))
{
loguser("OpenSSL legacy provider failed to load.\n");
@@ -477,7 +477,7 @@ static int ssl_gen_cert(X509 **cert, EVP_PKEY **key)
const char *commonName = "localhost";
char dNSName[128];
int rc;
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
int ret = 0;
RSA *rsa = NULL;
BIGNUM *bne = NULL;
--- a/ncat/ncat_ssl.h
+++ b/ncat/ncat_ssl.h
@@ -67,18 +67,6 @@
#include <openssl/ssl.h>
#include <openssl/err.h>
-/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
-#ifndef OPENSSL_API_LEVEL
-# if OPENSSL_API_COMPAT < 0x900000L
-# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
-# else
-# define OPENSSL_API_LEVEL \
- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
-# endif
-#endif
-
#define NCAT_CA_CERTS_FILE "ca-bundle.crt"
enum {
--- a/ncat/test/test-wildcard.c
+++ b/ncat/test/test-wildcard.c
@@ -20,7 +20,7 @@ are rejected. The SSL transactions happen over OpenSSL BIO pairs.
#include "ncat_core.h"
#include "ncat_ssl.h"
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
#include <openssl/bn.h>
#endif
@@ -294,7 +294,7 @@ static int set_dNSNames(X509 *cert, const struct lstr dNSNames[])
static int gen_cert(X509 **cert, EVP_PKEY **key,
const struct lstr commonNames[], const struct lstr dNSNames[])
{
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
int rc, ret=0;
RSA *rsa = NULL;
BIGNUM *bne = NULL;
--- a/nse_openssl.cc
+++ b/nse_openssl.cc
@@ -20,6 +20,9 @@
#define FUNC_EVP_CIPHER_CTX_init EVP_CIPHER_CTX_reset
#define FUNC_EVP_CIPHER_CTX_cleanup EVP_CIPHER_CTX_reset
#define PASS_EVP_CTX(ctx) (ctx)
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+# include <openssl/provider.h>
+#endif
#else
#define FUNC_EVP_MD_CTX_init EVP_MD_CTX_init
#define FUNC_EVP_MD_CTX_cleanup EVP_MD_CTX_cleanup
@@ -37,23 +40,6 @@ extern NmapOps o;
#include "nse_openssl.h"
-/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
-#ifndef OPENSSL_API_LEVEL
-# if OPENSSL_API_COMPAT < 0x900000L
-# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
-# else
-# define OPENSSL_API_LEVEL \
- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
-# endif
-#endif
-
-
-#if OPENSSL_API_LEVEL >= 30000
-#include <openssl/provider.h>
-#endif
-
#define NSE_SSL_LUA_ERR(_L) \
luaL_error(_L, "OpenSSL error: %s", ERR_error_string(ERR_get_error(), NULL))
@@ -184,7 +170,7 @@ static int l_bignum_is_prime( lua_State *L ) /** bignum_is_prime( BIGNUM p ) */
bignum_data_t * p = (bignum_data_t *) luaL_checkudata( L, 1, "BIGNUM" );
BN_CTX * ctx = BN_CTX_new();
int is_prime =
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
BN_is_prime_ex( p->bn, BN_prime_checks, ctx, NULL );
#else
BN_check_prime( p->bn, ctx, NULL );
@@ -199,7 +185,7 @@ static int l_bignum_is_safe_prime( lua_State *L ) /** bignum_is_safe_prime( BIGN
bignum_data_t * p = (bignum_data_t *) luaL_checkudata( L, 1, "BIGNUM" );
BN_CTX * ctx = BN_CTX_new();
int is_prime =
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
BN_is_prime_ex( p->bn, BN_prime_checks, ctx, NULL );
#else
BN_check_prime( p->bn, ctx, NULL );
@@ -210,7 +196,7 @@ static int l_bignum_is_safe_prime( lua_State *L ) /** bignum_is_safe_prime( BIGN
BN_sub_word( n, (BN_ULONG)1 );
BN_div_word( n, (BN_ULONG)2 );
is_safe =
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
BN_is_prime_ex( n, BN_prime_checks, ctx, NULL );
#else
BN_check_prime( n, ctx, NULL );
@@ -582,7 +568,7 @@ LUALIB_API int luaopen_openssl(lua_State *L) {
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
-#elif OPENSSL_API_LEVEL >= 30000
+#elif OPENSSL_VERSION_NUMBER >= 0x30000000L
if (NULL == OSSL_PROVIDER_load(NULL, "legacy") && o.debugging > 1)
{
// Legacy provider may not be available.
--- a/nse_ssl_cert.cc
+++ b/nse_ssl_cert.cc
@@ -89,19 +89,7 @@
#define X509_get0_notAfter X509_get_notAfter
#endif
-/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
-#ifndef OPENSSL_API_LEVEL
-# if OPENSSL_API_COMPAT < 0x900000L
-# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
-# else
-# define OPENSSL_API_LEVEL \
- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
-# endif
-#endif
-
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#include <openssl/core_names.h>
/* Deprecated in OpenSSL 3.0 */
#define SSL_get_peer_certificate SSL_get1_peer_certificate
@@ -459,7 +447,7 @@ static const char *pkey_type_to_string(int type)
}
int lua_push_ecdhparams(lua_State *L, EVP_PKEY *pubkey) {
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
char tmp[64] = {0};
size_t len = 0;
/* This structure (ecdhparams.curve_params) comes from tls.lua */
@@ -634,7 +622,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
else
#endif
if (pkey_type == EVP_PKEY_RSA) {
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
RSA *rsa = EVP_PKEY_get1_RSA(pubkey);
if (rsa) {
#endif
@@ -643,7 +631,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
luaL_getmetatable( L, "BIGNUM" );
lua_setmetatable( L, -2 );
#if HAVE_OPAQUE_STRUCTS
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
const BIGNUM *n = NULL, *e = NULL;
data->should_free = false;
RSA_get0_key(rsa, &n, &e, NULL);
@@ -663,7 +651,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
luaL_getmetatable( L, "BIGNUM" );
lua_setmetatable( L, -2 );
#if HAVE_OPAQUE_STRUCTS
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
data->should_free = false;
#else
data->should_free = true;
@@ -673,7 +661,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
data->bn = rsa->n;
#endif
lua_setfield(L, -2, "modulus");
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
RSA_free(rsa);
}
#endif
--- a/nsock/src/nsock_ssl.c
+++ b/nsock/src/nsock_ssl.c
@@ -64,7 +64,7 @@
#include "netutils.h"
#if HAVE_OPENSSL
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#include <openssl/provider.h>
#endif
@@ -120,7 +120,7 @@ static SSL_CTX *ssl_init_helper(const SSL_METHOD *method) {
SSL_library_init();
#else
OPENSSL_atexit(nsock_ssl_atexit);
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
if (NULL == OSSL_PROVIDER_load(NULL, "legacy"))
{
nsock_log_error("OpenSSL legacy provider failed to load.\n");
--- a/nsock/src/nsock_ssl.h
+++ b/nsock/src/nsock_ssl.h
@@ -69,20 +69,7 @@
#include <openssl/err.h>
#include <openssl/rand.h>
-/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
-#ifndef OPENSSL_API_LEVEL
-# if OPENSSL_API_COMPAT < 0x900000L
-# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
-# else
-# define OPENSSL_API_LEVEL \
- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
-# endif
-#endif
-
-
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
/* Deprecated in OpenSSL 3.0 */
#define SSL_get_peer_certificate SSL_get1_peer_certificate
#endif

View File

@ -21,4 +21,7 @@
<flag name="symlink">Install symlink to nc</flag> <flag name="symlink">Install symlink to nc</flag>
<flag name="system-lua">Use <pkg>dev-lang/lua</pkg> instead of the bundled liblua</flag> <flag name="system-lua">Use <pkg>dev-lang/lua</pkg> instead of the bundled liblua</flag>
</use> </use>
<upstream>
<remote-id type="github">nmap/nmap</remote-id>
</upstream>
</pkgmetadata> </pkgmetadata>

View File

@ -45,6 +45,10 @@ RDEPEND="
) )
nse? ( sys-libs/zlib ) nse? ( sys-libs/zlib )
ssl? ( dev-libs/openssl:0= ) ssl? ( dev-libs/openssl:0= )
symlink? (
!net-analyzer/netcat
!net-analyzer/openbsd-netcat
)
system-lua? ( ${LUA_DEPS} ) system-lua? ( ${LUA_DEPS} )
" "
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"

View File

@ -0,0 +1,151 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LUA_COMPAT=( lua5-3 )
LUA_REQ_USE="deprecated"
PYTHON_COMPAT=( python3_{8..11} )
inherit autotools lua-single python-any-r1 toolchain-funcs
DESCRIPTION="Network exploration tool and security / port scanner"
HOMEPAGE="https://nmap.org/"
if [[ ${PV} == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/nmap/nmap"
else
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/nmap.asc
inherit verify-sig
SRC_URI="https://nmap.org/dist/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( https://nmap.org/dist/sigs/${P}.tar.bz2.asc )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
fi
LICENSE="|| ( NPSL GPL-2 )"
SLOT="0"
IUSE="ipv6 libssh2 ncat nping +nse ssl symlink +system-lua"
REQUIRED_USE="
system-lua? ( nse ${LUA_REQUIRED_USE} )
symlink? ( ncat )
"
RDEPEND="
dev-libs/liblinear:=
dev-libs/libpcre
net-libs/libpcap
libssh2? (
net-libs/libssh2[zlib]
sys-libs/zlib
)
nse? ( sys-libs/zlib )
ssl? ( dev-libs/openssl:0= )
symlink? (
ncat? (
!net-analyzer/netcat
!net-analyzer/openbsd-netcat
)
)
system-lua? ( ${LUA_DEPS} )
"
DEPEND="${RDEPEND}"
BDEPEND="
${PYTHON_DEPS}
virtual/pkgconfig
"
if [[ ${PV} != *9999* ]] ; then
BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-nmap )"
fi
PATCHES=(
"${FILESDIR}"/${PN}-5.10_beta1-string.patch
"${FILESDIR}"/${PN}-5.21-python.patch
"${FILESDIR}"/${PN}-6.46-uninstaller.patch
"${FILESDIR}"/${PN}-6.25-liblua-ar.patch
"${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch
"${FILESDIR}"/${PN}-7.25-libpcre.patch
"${FILESDIR}"/${PN}-7.31-libnl.patch
"${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch
"${FILESDIR}"/${PN}-7.91-no-FORTIFY_SOURCE.patch
"${FILESDIR}"/${P}-openssl-1.1.patch
"${FILESDIR}"/${PN}-9999-netutil-else.patch
)
pkg_setup() {
python-any-r1_pkg_setup
use system-lua && lua-single_pkg_setup
}
src_prepare() {
rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
default
sed -i \
-e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
Makefile.in || die
cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die
eautoreconf
if [[ ${CHOST} == *-darwin* ]] ; then
# We need the original for a Darwin-specific fix, bug #604432
mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die
fi
}
src_configure() {
export ac_cv_path_PYTHON="${PYTHON}"
export am_cv_pathless_PYTHON="${EPYTHON}"
# The bundled libdnet is incompatible with the version available in the
# tree, so we cannot use the system library here.
econf \
$(use_enable ipv6) \
$(use_with libssh2) \
$(use_with ncat) \
$(use_with nping) \
$(use_with ssl openssl) \
$(usex libssh2 --with-zlib) \
$(usex nse --with-liblua=$(usex system-lua yes included '' '') --without-liblua) \
$(usex nse --with-zlib) \
--cache-file="${S}"/config.cache \
--with-libdnet=included \
--with-pcre="${ESYSROOT}"/usr \
--without-dpdk \
--without-ndiff \
--without-zenmap
}
src_compile() {
local directory
for directory in . libnetutil nsock/src $(usev ncat) $(usev nping) ; do
emake -C "${directory}" makefile.dep
done
emake \
AR="$(tc-getAR)" \
RANLIB="$(tc-getRANLIB)"
}
src_install() {
# See bug #831713 for return of -j1
LC_ALL=C emake \
-j1 \
DESTDIR="${D}" \
STRIP=: \
nmapdatadir="${EPREFIX}"/usr/share/nmap \
install
dodoc CHANGELOG HACKING docs/README docs/*.txt
use symlink && dosym /usr/bin/ncat /usr/bin/nc
}

View File

@ -1,11 +1,12 @@
# Copyright 1999-2022 Gentoo Authors # Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=7 EAPI=8
LUA_COMPAT=( lua5-3 ) LUA_COMPAT=( lua5-3 )
LUA_REQ_USE="deprecated" LUA_REQ_USE="deprecated"
inherit autotools lua-single toolchain-funcs PYTHON_COMPAT=( python3_{8..11} )
inherit autotools lua-single python-any-r1 toolchain-funcs
DESCRIPTION="Network exploration tool and security / port scanner" DESCRIPTION="Network exploration tool and security / port scanner"
HOMEPAGE="https://nmap.org/" HOMEPAGE="https://nmap.org/"
@ -14,8 +15,6 @@ if [[ ${PV} == *9999* ]] ; then
EGIT_REPO_URI="https://github.com/nmap/nmap" EGIT_REPO_URI="https://github.com/nmap/nmap"
# Just in case for now as future seems undecided.
LICENSE="NPSL"
else else
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/nmap.asc VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/nmap.asc
inherit verify-sig inherit verify-sig
@ -23,11 +22,10 @@ else
SRC_URI="https://nmap.org/dist/${P}.tar.bz2" SRC_URI="https://nmap.org/dist/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( https://nmap.org/dist/sigs/${P}.tar.bz2.asc )" SRC_URI+=" verify-sig? ( https://nmap.org/dist/sigs/${P}.tar.bz2.asc )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
LICENSE="|| ( NPSL GPL-2 )"
fi fi
LICENSE="|| ( NPSL GPL-2 )"
SLOT="0" SLOT="0"
IUSE="ipv6 libssh2 ncat nping +nse ssl symlink +system-lua" IUSE="ipv6 libssh2 ncat nping +nse ssl symlink +system-lua"
REQUIRED_USE=" REQUIRED_USE="
@ -45,12 +43,22 @@ RDEPEND="
) )
nse? ( sys-libs/zlib ) nse? ( sys-libs/zlib )
ssl? ( dev-libs/openssl:0= ) ssl? ( dev-libs/openssl:0= )
symlink? (
ncat? (
!net-analyzer/netcat
!net-analyzer/openbsd-netcat
)
)
system-lua? ( ${LUA_DEPS} ) system-lua? ( ${LUA_DEPS} )
" "
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"
BDEPEND="
${PYTHON_DEPS}
virtual/pkgconfig
"
if [[ ${PV} != *9999* ]] ; then if [[ ${PV} != *9999* ]] ; then
BDEPEND+="verify-sig? ( sec-keys/openpgp-keys-nmap )" BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-nmap )"
fi fi
PATCHES=( PATCHES=(
@ -67,6 +75,8 @@ PATCHES=(
) )
pkg_setup() { pkg_setup() {
python-any-r1_pkg_setup
use system-lua && lua-single_pkg_setup use system-lua && lua-single_pkg_setup
} }
@ -86,12 +96,15 @@ src_prepare() {
eautoreconf eautoreconf
if [[ ${CHOST} == *-darwin* ]] ; then if [[ ${CHOST} == *-darwin* ]] ; then
# we need the original for a Darwin-specific fix, bug #604432 # We need the original for a Darwin-specific fix, bug #604432
mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die
fi fi
} }
src_configure() { src_configure() {
export ac_cv_path_PYTHON="${PYTHON}"
export am_cv_pathless_PYTHON="${EPYTHON}"
# The bundled libdnet is incompatible with the version available in the # The bundled libdnet is incompatible with the version available in the
# tree, so we cannot use the system library here. # tree, so we cannot use the system library here.
econf \ econf \
@ -106,16 +119,14 @@ src_configure() {
--cache-file="${S}"/config.cache \ --cache-file="${S}"/config.cache \
--with-libdnet=included \ --with-libdnet=included \
--with-pcre="${ESYSROOT}"/usr \ --with-pcre="${ESYSROOT}"/usr \
--without-dpdk \
--without-ndiff \ --without-ndiff \
--without-zenmap --without-zenmap
} }
src_compile() { src_compile() {
local directory local directory
for directory in . libnetutil nsock/src \ for directory in . libnetutil nsock/src $(usev ncat) $(usev nping) ; do
$(usex ncat ncat '') \
$(usex nping nping '')
do
emake -C "${directory}" makefile.dep emake -C "${directory}" makefile.dep
done done

View File

@ -61,7 +61,7 @@ pkg_setup() {
ewarn "and recompile your kernel ..." ewarn "and recompile your kernel ..."
fi fi
python-single-r1_pkg_setup use python && python-single-r1_pkg_setup
} }
src_prepare() { src_prepare() {
@ -117,7 +117,7 @@ src_install() {
fi fi
dobashcomp bash-completion/smbinfo dobashcomp bash-completion/smbinfo
python_fix_shebang "${ED}" use python && python_fix_shebang "${ED}"
} }
pkg_postinst() { pkg_postinst() {

View File

@ -0,0 +1,142 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
inherit autotools bash-completion-r1 linux-info pam python-single-r1
DESCRIPTION="Tools for Managing Linux CIFS Client Filesystems"
HOMEPAGE="https://wiki.samba.org/index.php/LinuxCIFS_utils https://git.samba.org/cifs-utils.git/?p=cifs-utils.git"
SRC_URI="https://ftp.samba.org/pub/linux-cifs/${PN}/${P}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
IUSE="+acl +ads +caps creds pam +python systemd"
RDEPEND="
ads? (
sys-apps/keyutils:=
sys-libs/talloc
virtual/krb5
)
caps? ( sys-libs/libcap-ng )
creds? ( sys-apps/keyutils:= )
pam? (
sys-apps/keyutils:=
sys-libs/pam
)
python? ( ${PYTHON_DEPS} )
"
DEPEND="${RDEPEND}"
BDEPEND="dev-python/docutils"
PDEPEND="
acl? ( >=net-fs/samba-4.0.0_alpha1 )
"
REQUIRED_USE="
acl? ( ads )
python? ( ${PYTHON_REQUIRED_USE} )
"
DOCS="doc/linux-cifs-client-guide.odt"
PATCHES=(
"${FILESDIR}/${PN}-6.12-ln_in_destdir.patch" #766594
"${FILESDIR}/${PN}-6.15-musl.patch"
)
pkg_setup() {
linux-info_pkg_setup
if ! linux_config_exists || ! linux_chkconfig_present CIFS; then
ewarn "You must enable CIFS support in your kernel config, "
ewarn "to be able to mount samba shares. You can find it at"
ewarn
ewarn " File systems"
ewarn " Network File Systems"
ewarn " CIFS support"
ewarn
ewarn "and recompile your kernel ..."
fi
use python && python-single-r1_pkg_setup
}
src_prepare() {
default
if has_version app-crypt/heimdal ; then
# https://bugs.gentoo.org/612584
eapply "${FILESDIR}/${PN}-6.7-heimdal.patch"
fi
eautoreconf
}
src_configure() {
local myeconfargs=(
--enable-man
--enable-smbinfo
$(use_enable acl cifsacl cifsidmap)
$(use_enable ads cifsupcall)
$(use_with caps libcap)
$(use_enable creds cifscreds)
$(use_enable pam)
$(use_with pam pamdir $(getpam_mod_dir))
$(use_enable python pythontools)
# mount.cifs can get passwords from systemd
$(use_enable systemd)
)
ROOTSBINDIR="${EPREFIX}"/sbin \
econf "${myeconfargs[@]}"
}
src_install() {
default
# remove empty directories
find "${ED}" -type d -empty -delete || die
if use acl ; then
dodir /etc/cifs-utils
dosym ../../usr/$(get_libdir)/cifs-utils/idmapwb.so \
/etc/cifs-utils/idmap-plugin
dodir /etc/request-key.d
echo 'create cifs.idmap * * /usr/sbin/cifs.idmap %k' \
> "${ED}/etc/request-key.d/cifs.idmap.conf"
fi
if use ads ; then
dodir /etc/request-key.d
echo 'create dns_resolver * * /usr/sbin/cifs.upcall %k' \
> "${ED}/etc/request-key.d/cifs.upcall.conf"
echo 'create cifs.spnego * * /usr/sbin/cifs.upcall %k' \
> "${ED}/etc/request-key.d/cifs.spnego.conf"
fi
dobashcomp bash-completion/smbinfo
use python && python_fix_shebang "${ED}"
}
pkg_postinst() {
# Inform about set-user-ID bit of mount.cifs
ewarn "setuid use flag was dropped due to multiple security implications"
ewarn "such as CVE-2009-2948, CVE-2011-3585 and CVE-2012-1586"
ewarn "You are free to set setuid flags by yourself"
# Inform about upcall usage
if use acl ; then
einfo "The cifs.idmap utility has been enabled by creating the"
einfo "configuration file /etc/request-key.d/cifs.idmap.conf"
einfo "This enables you to get and set CIFS acls."
fi
if use ads ; then
einfo "The cifs.upcall utility has been enabled by creating the"
einfo "configuration file /etc/request-key.d/cifs.upcall.conf"
einfo "This enables you to mount DFS shares."
fi
}

View File

@ -13,7 +13,7 @@ SRC_URI="https://ftp.samba.org/pub/linux-cifs/${PN}/${P}.tar.bz2"
LICENSE="GPL-3" LICENSE="GPL-3"
SLOT="0" SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~x86-linux"
IUSE="+acl +ads +caps creds pam +python systemd" IUSE="+acl +ads +caps creds pam +python systemd"
RDEPEND=" RDEPEND="
@ -58,7 +58,7 @@ pkg_setup() {
ewarn "and recompile your kernel ..." ewarn "and recompile your kernel ..."
fi fi
python-single-r1_pkg_setup use python && python-single-r1_pkg_setup
} }
src_prepare() { src_prepare() {
@ -114,7 +114,7 @@ src_install() {
fi fi
dobashcomp bash-completion/smbinfo dobashcomp bash-completion/smbinfo
python_fix_shebang "${ED}" use python && python_fix_shebang "${ED}"
} }
pkg_postinst() { pkg_postinst() {

View File

@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( mirror://gnupg/gnutls/v$(ver_cut 1-2)/${P}.tar.xz.sig )
LICENSE="GPL-3 LGPL-2.1+" LICENSE="GPL-3 LGPL-2.1+"
SLOT="0/30.30" # <libgnutls.so number>.<libgnutlsxx.so number> SLOT="0/30.30" # <libgnutls.so number>.<libgnutlsxx.so number>
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~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" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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="brotli +cxx dane doc examples guile +idn nls +openssl pkcs11 seccomp sslv2 sslv3 static-libs test test-full +tls-heartbeat tools valgrind zlib zstd" IUSE="brotli +cxx dane doc examples guile +idn nls +openssl pkcs11 seccomp sslv2 sslv3 static-libs test test-full +tls-heartbeat tools valgrind zlib zstd"
REQUIRED_USE="test-full? ( cxx dane doc examples guile idn nls openssl pkcs11 seccomp tls-heartbeat tools )" REQUIRED_USE="test-full? ( cxx dane doc examples guile idn nls openssl pkcs11 seccomp tls-heartbeat tools )"

View File

@ -4,3 +4,5 @@ DIST curl-7.83.1.tar.xz 2474940 BLAKE2B 491427b12f082c2246ef6cb2a129340079db28bd
DIST curl-7.83.1.tar.xz.asc 488 BLAKE2B 78f7a6d9a32cab97e9ce26430eb2be2bc4e20552cf8c59238f30f127e9d7af5b4f9808c3fe0846c18c8f7a67b49f2f75d865d17b7760bb664872934799949441 SHA512 f0d29de315488c844eb81ed5a89ed6334910970224c8cac43e7e6f2d58c35ad0064c0b6122e69b3a34ce91f4b56873c63e2e8aea1c602ef40711bfd62a01b191 DIST curl-7.83.1.tar.xz.asc 488 BLAKE2B 78f7a6d9a32cab97e9ce26430eb2be2bc4e20552cf8c59238f30f127e9d7af5b4f9808c3fe0846c18c8f7a67b49f2f75d865d17b7760bb664872934799949441 SHA512 f0d29de315488c844eb81ed5a89ed6334910970224c8cac43e7e6f2d58c35ad0064c0b6122e69b3a34ce91f4b56873c63e2e8aea1c602ef40711bfd62a01b191
DIST curl-7.84.0.tar.xz 2477944 BLAKE2B 811a63285f39a598bc4fd73ae4b8e23e5146b93dcf3eea805345792b7dddd85bbd54240d9871a0dc9f058d58fd7ea7f4efbcb82727218e8afaaae3600bad55e1 SHA512 86231866a35593a1637fbc0c6af3b6761bdfd99fb35580cc52970c36f19604f93dce59fea67a1d5bb4b455f719307599c7916c77d14f2b661f6bf7fb1ca716ce DIST curl-7.84.0.tar.xz 2477944 BLAKE2B 811a63285f39a598bc4fd73ae4b8e23e5146b93dcf3eea805345792b7dddd85bbd54240d9871a0dc9f058d58fd7ea7f4efbcb82727218e8afaaae3600bad55e1 SHA512 86231866a35593a1637fbc0c6af3b6761bdfd99fb35580cc52970c36f19604f93dce59fea67a1d5bb4b455f719307599c7916c77d14f2b661f6bf7fb1ca716ce
DIST curl-7.84.0.tar.xz.asc 488 BLAKE2B d74dea89fa89b6ed0a928e01987669f7dde0bcbb30423ea0f3af9f31eea1e059d458629d80455d772264d744fab236d4f506545afa1bfbd6ded7e2b27192a7c8 SHA512 80ff5274277ad97448fa53511bab6e8a1c302bcb25fc0916d78b8dc6c6af43d944c37c4ed46668b651cc639ec4964780725117ca0e85168ea66ad7cc98d29702 DIST curl-7.84.0.tar.xz.asc 488 BLAKE2B d74dea89fa89b6ed0a928e01987669f7dde0bcbb30423ea0f3af9f31eea1e059d458629d80455d772264d744fab236d4f506545afa1bfbd6ded7e2b27192a7c8 SHA512 80ff5274277ad97448fa53511bab6e8a1c302bcb25fc0916d78b8dc6c6af43d944c37c4ed46668b651cc639ec4964780725117ca0e85168ea66ad7cc98d29702
DIST curl-7.85.0.tar.xz 2480648 BLAKE2B 7d0e0212541c05352040391b400e0314e0d38a96b199dfd70ccaaca3fd7f809b7ed96b877c4663c06fc05c483468521458255dcf025226f1bdf4d6c9dd9b8873 SHA512 b57cc31649a4f47cc4b482f56a85c86c8e8aaeaf01bc1b51b065fdb9145a9092bc52535e52a85a66432eb163605b2edbf5bc5c33ea6e40e50f26a69ad1365cbd
DIST curl-7.85.0.tar.xz.asc 488 BLAKE2B 8fb84955ee458af7f2cecef4b48c5375db2e8179e5c17a5215a4a92e28e5ec7dd59a9dc057563643016c683e547a04c494276e16d113dbd498f94b7a7183e1e3 SHA512 7022daf84b330b24112d595edee715cdeb881a4ba8a4fa7eec23aed28292e5d943af778f03aadd036d44d875f9e226096ea142d18afe516b6bdbd475fcd3aca6

View File

@ -0,0 +1,287 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
inherit autotools prefix multilib-minimal verify-sig
DESCRIPTION="A Client that groks URLs"
HOMEPAGE="https://curl.haxx.se/"
SRC_URI="https://curl.haxx.se/download/${P}.tar.xz
verify-sig? ( https://curl.haxx.se/download/${P}.tar.xz.asc )"
LICENSE="curl"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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="+adns alt-svc brotli +ftp gnutls gopher hsts +http2 idn +imap ipv6 kerberos ldap mbedtls nss +openssl +pop3 +progress-meter rtmp samba +smtp ssh ssl sslv3 static-libs test telnet +tftp zstd"
IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls curl_ssl_nss +curl_ssl_openssl"
IUSE+=" nghttp3 quiche"
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/danielstenberg.asc
# Only one default ssl provider can be enabled
REQUIRED_USE="
ssl? (
^^ (
curl_ssl_gnutls
curl_ssl_mbedtls
curl_ssl_nss
curl_ssl_openssl
)
)"
# lead to lots of false negatives, bug #285669
RESTRICT="!test? ( test )"
RDEPEND="ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] )
ssl? (
gnutls? (
net-libs/gnutls:0=[static-libs?,${MULTILIB_USEDEP}]
dev-libs/nettle:0=[${MULTILIB_USEDEP}]
app-misc/ca-certificates
)
mbedtls? (
net-libs/mbedtls:0=[${MULTILIB_USEDEP}]
app-misc/ca-certificates
)
openssl? (
dev-libs/openssl:0=[sslv3(-)=,static-libs?,${MULTILIB_USEDEP}]
)
nss? (
dev-libs/nss:0[${MULTILIB_USEDEP}]
dev-libs/nss-pem
app-misc/ca-certificates
)
)
http2? ( net-libs/nghttp2:=[${MULTILIB_USEDEP}] )
nghttp3? (
net-libs/nghttp3[${MULTILIB_USEDEP}]
net-libs/ngtcp2[ssl,${MULTILIB_USEDEP}]
)
quiche? ( >=net-libs/quiche-0.3.0[${MULTILIB_USEDEP}] )
idn? ( net-dns/libidn2:0=[static-libs?,${MULTILIB_USEDEP}] )
adns? ( net-dns/c-ares:0=[${MULTILIB_USEDEP}] )
kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
ssh? ( net-libs/libssh2[${MULTILIB_USEDEP}] )
sys-libs/zlib[${MULTILIB_USEDEP}]
zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )"
# Do we need to enforce the same ssl backend for curl and rtmpdump? Bug #423303
# rtmp? (
# media-video/rtmpdump
# curl_ssl_gnutls? ( media-video/rtmpdump[gnutls] )
# curl_ssl_openssl? ( media-video/rtmpdump[-gnutls,ssl] )
# )
DEPEND="${RDEPEND}"
BDEPEND="dev-lang/perl
virtual/pkgconfig
test? (
sys-apps/diffutils
)
verify-sig? ( sec-keys/openpgp-keys-danielstenberg )"
DOCS=( CHANGES README docs/{FEATURES.md,INTERNALS.md,FAQ,BUGS.md,CONTRIBUTE.md} )
MULTILIB_WRAPPED_HEADERS=(
/usr/include/curl/curlbuild.h
)
MULTILIB_CHOST_TOOLS=(
/usr/bin/curl-config
)
PATCHES=(
"${FILESDIR}"/${PN}-7.30.0-prefix.patch
"${FILESDIR}"/${PN}-respect-cflags-3.patch
)
src_prepare() {
default
eprefixify curl-config.in
eautoreconf
}
multilib_src_configure() {
# We make use of the fact that later flags override earlier ones
# So start with all ssl providers off until proven otherwise
# TODO: in the future, we may want to add wolfssl (https://www.wolfssl.com/)
local myconf=()
myconf+=( --without-gnutls --without-mbedtls --without-nss --without-ssl )
myconf+=( --without-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
#myconf+=( --without-default-ssl-backend )
if use ssl ; then
if use gnutls || use curl_ssl_gnutls; then
einfo "SSL provided by gnutls"
myconf+=( --with-gnutls --with-nettle )
fi
if use mbedtls || use curl_ssl_mbedtls; then
einfo "SSL provided by mbedtls"
myconf+=( --with-mbedtls )
fi
if use nss || use curl_ssl_nss; then
einfo "SSL provided by nss"
myconf+=( --with-nss --with-nss-deprecated )
fi
if use openssl || use curl_ssl_openssl; then
einfo "SSL provided by openssl"
myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
fi
if use curl_ssl_gnutls; then
einfo "Default SSL provided by gnutls"
myconf+=( --with-default-ssl-backend=gnutls )
elif use curl_ssl_mbedtls; then
einfo "Default SSL provided by mbedtls"
myconf+=( --with-default-ssl-backend=mbedtls )
elif use curl_ssl_nss; then
einfo "Default SSL provided by nss"
myconf+=( --with-default-ssl-backend=nss )
elif use curl_ssl_openssl; then
einfo "Default SSL provided by openssl"
myconf+=( --with-default-ssl-backend=openssl )
else
eerror "We can't be here because of REQUIRED_USE."
fi
else
einfo "SSL disabled"
fi
# These configuration options are organized alphabetically
# within each category. This should make it easier if we
# ever decide to make any of them contingent on USE flags:
# 1) protocols first. To see them all do
# 'grep SUPPORT_PROTOCOLS configure.ac'
# 2) --enable/disable options second.
# 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort
# 3) --with/without options third.
# grep -- --with configure | grep Check | awk '{ print $4 }' | sort
myconf+=(
$(use_enable alt-svc)
--enable-crypto-auth
--enable-dict
--disable-ech
--enable-file
$(use_enable ftp)
$(use_enable gopher)
$(use_enable hsts)
--enable-http
$(use_enable imap)
$(use_enable ldap)
$(use_enable ldap ldaps)
--enable-ntlm
--disable-ntlm-wb
$(use_enable pop3)
--enable-rt
--enable-rtsp
$(use_enable samba smb)
$(use_with ssh libssh2)
$(use_enable smtp)
$(use_enable telnet)
$(use_enable tftp)
--enable-tls-srp
$(use_enable adns ares)
--enable-cookies
--enable-dateparse
--enable-dnsshuffle
--enable-doh
--enable-symbol-hiding
--enable-http-auth
$(use_enable ipv6)
--enable-largefile
--enable-manual
--enable-mime
--enable-netrc
$(use_enable progress-meter)
--enable-proxy
--disable-sspi
$(use_enable static-libs static)
--enable-pthreads
--enable-threaded-resolver
--disable-versioned-symbols
--without-amissl
--without-bearssl
$(use_with brotli)
--without-fish-functions-dir
$(use_with http2 nghttp2)
--without-hyper
$(use_with idn libidn2)
$(use_with kerberos gssapi "${EPREFIX}"/usr)
--without-libgsasl
--without-libpsl
--without-msh3
$(use_with nghttp3)
$(use_with nghttp3 ngtcp2)
$(use_with quiche)
$(use_with rtmp librtmp)
--without-rustls
--without-schannel
--without-secure-transport
--without-winidn
--without-wolfssl
--with-zlib
$(use_with zstd)
)
ECONF_SOURCE="${S}" \
econf "${myconf[@]}"
if ! multilib_is_native_abi; then
# avoid building the client
sed -i -e '/SUBDIRS/s:src::' Makefile || die
sed -i -e '/SUBDIRS/s:scripts::' Makefile || die
fi
# Fix up the pkg-config file to be more robust.
# https://github.com/curl/curl/issues/864
local priv=() libs=()
# We always enable zlib.
libs+=( "-lz" )
priv+=( "zlib" )
if use http2; then
libs+=( "-lnghttp2" )
priv+=( "libnghttp2" )
fi
if use quiche; then
libs+=( "-lquiche" )
priv+=( "quiche" )
fi
if use nghttp3; then
libs+=( "-lnghttp3" "-lngtcp2" )
priv+=( "libnghttp3" "-libtcp2" )
fi
if use ssl && use curl_ssl_openssl; then
libs+=( "-lssl" "-lcrypto" )
priv+=( "openssl" )
fi
grep -q Requires.private libcurl.pc && die "need to update ebuild"
libs=$(printf '|%s' "${libs[@]}")
sed -i -r \
-e "/^Libs.private/s:(${libs#|})( |$)::g" \
libcurl.pc || die
echo "Requires.private: ${priv[*]}" >> libcurl.pc
}
multilib_src_test() {
# See https://github.com/curl/curl/blob/master/tests/runtests.pl#L5721
# -n: no valgrind (unreliable in sandbox and doesn't work correctly on all arches)
# -v: verbose
# -a: keep going on failure (so we see everything which breaks, not just 1st test)
# -k: keep test files after completion
# -am: automake style TAP output
# -p: print logs if test fails
# Note: if needed, we can disable tests. See e.g. Fedora's packaging
# or just read https://github.com/curl/curl/tree/master/tests#run.
multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p"
}
multilib_src_install_all() {
einstalldocs
find "${ED}" -type f -name '*.la' -delete || die
rm -rf "${ED}"/etc/ || die
}

View File

@ -36,5 +36,6 @@
<remote-id type="cpe">cpe:/a:curl:libcurl</remote-id> <remote-id type="cpe">cpe:/a:curl:libcurl</remote-id>
<remote-id type="cpe">cpe:/a:haxx:curl</remote-id> <remote-id type="cpe">cpe:/a:haxx:curl</remote-id>
<remote-id type="cpe">cpe:/a:haxx:libcurl</remote-id> <remote-id type="cpe">cpe:/a:haxx:libcurl</remote-id>
<remote-id type="github">curl/curl</remote-id>
</upstream> </upstream>
</pkgmetadata> </pkgmetadata>

View File

@ -1,4 +1 @@
DIST gentoo-functions-0.14.tar.gz 11330 BLAKE2B 72543941f2954e35d3671c1c482eda44ae00cf0c636a1d706c5b90c56dfbb985d20c156b6de650e5d33ff9fac0abaf9fc50b1172832c2bd5276f6adfe5baf3b8 SHA512 e1e0fee9f3e8b79478aaf2b9a54c8623c858e62f72f2885ea88f7006631cf513bdfaac7122f2a5fc97379bde57851793bf7d6c63a1c63a6923a7f13a73d803fc
DIST gentoo-functions-0.15.tar.gz 11236 BLAKE2B da3df4ee809c33a7aa275757380584abcc70dc5f54d32b2e9d3336a9453cfc935e932df065a65a7458b885a449774713fead5aea99ea5e7ee522e5493d35482b SHA512 b2a42e5b43c487d62e036eade88b5cc8e0f4eb249c783837a0293cdbba4ed8a1eea8742d531885bcc56eefa337853c41d257b6a9880fc0e7420b490bb6f98fd4
DIST gentoo-functions-0.16.tar.bz2 10769 BLAKE2B aa85c97bf07e86631f9d11fc93252099925fb798a12483bead1e270799f44d3107c28e370925c948484a3f490247caf4c17b0068a160af7f72bec0f941699c95 SHA512 aa1f1bfbdd1e7ea51b2cceaae36b15a457b726ecc4fbed5bb3e5475d88b8142642df97b729303085716b1e3c7c92da58fa3b6842af5a04152e9f4c563d3d4b12
DIST gentoo-functions-0.17.tar.bz2 10798 BLAKE2B 1b725945421ab36b1412f9addc22e9fe299c0e6460790ee2832b9f63d4c06b86bb0d054b01505640a5dc1e62f3cd257628717fec852116a4c8b2c9f9d2d149ee SHA512 6a3de93b5e4d761a53a622f41e6079606cc4ad8a964771d49dafdefbb632afdf722fd055d261e494aa0be956c4160c49a775ab40c927c5340b8e4da275ef51fb DIST gentoo-functions-0.17.tar.bz2 10798 BLAKE2B 1b725945421ab36b1412f9addc22e9fe299c0e6460790ee2832b9f63d4c06b86bb0d054b01505640a5dc1e62f3cd257628717fec852116a4c8b2c9f9d2d149ee SHA512 6a3de93b5e4d761a53a622f41e6079606cc4ad8a964771d49dafdefbb632afdf722fd055d261e494aa0be956c4160c49a775ab40c927c5340b8e4da275ef51fb

View File

@ -1,27 +0,0 @@
# Copyright 2014-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
else
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.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 ~x86-winnt"
fi
inherit toolchain-funcs flag-o-matic
DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2"
SLOT="0"
src_configure() {
tc-export CC
append-lfs-flags
export ROOTPREFIX="${EPREFIX}"
export PREFIX="${EPREFIX}/usr"
}

View File

@ -1,27 +0,0 @@
# Copyright 2014-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
else
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.gz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
fi
inherit toolchain-funcs flag-o-matic
DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2"
SLOT="0"
src_configure() {
tc-export CC
append-lfs-flags
export ROOTPREFIX="${EPREFIX}"
export PREFIX="${EPREFIX}/usr"
}

View File

@ -1,27 +0,0 @@
# Copyright 2014-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
else
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.bz2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
fi
inherit toolchain-funcs flag-o-matic
DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2"
SLOT="0"
src_configure() {
tc-export CC
append-lfs-flags
export ROOTPREFIX="${EPREFIX}"
export PREFIX="${EPREFIX}/usr"
}

View File

@ -8,7 +8,7 @@ if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git" EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
else else
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.bz2" SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.bz2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
fi fi
inherit toolchain-funcs flag-o-matic inherit toolchain-funcs flag-o-matic

View File

@ -1,2 +1,3 @@
DIST autoconf-archive-2021.02.19.tar.xz 667304 BLAKE2B bc99cfd2b507a0c7fc37a001cc9e090fa037cc3626f5f5201c9a62ef06ee8ca4532ca8f21e1422f9dff9f67f64409ae560117c3161809f2d3bc3a39469910485 SHA512 a968c355c3cf66d74dc5b452141afbdf763e84a6c43b12c25da9a08482910d6d57ba3952aaf270d8cd5fd8b9d2dadf2d7d943ae2e1b067d68b71d2738d881aa0 DIST autoconf-archive-2021.02.19.tar.xz 667304 BLAKE2B bc99cfd2b507a0c7fc37a001cc9e090fa037cc3626f5f5201c9a62ef06ee8ca4532ca8f21e1422f9dff9f67f64409ae560117c3161809f2d3bc3a39469910485 SHA512 a968c355c3cf66d74dc5b452141afbdf763e84a6c43b12c25da9a08482910d6d57ba3952aaf270d8cd5fd8b9d2dadf2d7d943ae2e1b067d68b71d2738d881aa0
DIST autoconf-archive-2022.02.11.tar.xz 675264 BLAKE2B b9ff928186312969ffd09fd0523367857e7072e867f6b43689a4a5130db9f5fe19a8337875f5186409e7b0bd200491e3d1f612739499c89547a47862c59ba07f SHA512 243e06a356ea2c0fddc527febd4241da49fe4c11fb64b548873744a54e079860739d7a1da842833b99540acde3f6a2ebfddc41897306cc2e61e2c6037a7d22ff DIST autoconf-archive-2022.02.11.tar.xz 675264 BLAKE2B b9ff928186312969ffd09fd0523367857e7072e867f6b43689a4a5130db9f5fe19a8337875f5186409e7b0bd200491e3d1f612739499c89547a47862c59ba07f SHA512 243e06a356ea2c0fddc527febd4241da49fe4c11fb64b548873744a54e079860739d7a1da842833b99540acde3f6a2ebfddc41897306cc2e61e2c6037a7d22ff
DIST autoconf-archive-2022.09.03.tar.xz 676144 BLAKE2B 9511b1bd2afee78209261d9757c3fc6bf079eb6ea82bc039530532cfaaea8a7d977f6310265c0af2fde377edc9bddfcabf1e81c426a9716d5bf4b4eb7bb64a4a SHA512 157b5b6a979d5ec5bfab6ddf34422da620fec1e95f4c901821abbb7361544af77747b4a449029b84750d75679d6130a591e98da8772de2c121ecdea163f0340b

View File

@ -0,0 +1,18 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="GNU Autoconf Macro Archive"
HOMEPAGE="https://www.gnu.org/software/autoconf-archive/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
# File collisions, bug #540246
RDEPEND="
!=gnome-base/gnome-common-3.14.0-r0
!>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]
"

View File

@ -0,0 +1,51 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="${PV:0:3}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
BDEPEND="
sys-devel/m4
dev-lang/perl"
RDEPEND="${BDEPEND}
sys-apps/texinfo
>=sys-devel/autoconf-wrapper-13"
PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
"${FILESDIR}"/${P}-destdir.patch
"${FILESDIR}"/${P}-test-fixes.patch #146592
"${FILESDIR}"/${P}-perl-5.26.patch
"${FILESDIR}"/${P}-K-R-decls-clang.patch
)
src_configure() {
# make sure configure is newer than configure.in
touch configure || die
# need to include --exec-prefix and --bindir or our
# DESTDIR patch will trigger sandbox hate :(
#
# need to force locale to C to avoid bugs in the old
# configure script breaking the install paths #351982
#
# force to `awk` so that we don't encode another awk that
# happens to currently be installed, but might later be
# uninstalled (like mawk). same for m4.
ac_cv_path_M4="m4" \
ac_cv_prog_AWK="awk" \
LC_ALL=C \
econf \
--exec-prefix="${EPREFIX}"/usr \
--bindir="${EPREFIX}"/usr/bin \
--program-suffix="-${PV}"
}

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors # Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=7 EAPI=7
@ -18,7 +18,7 @@ inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files" DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html" HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
LICENSE="GPL-3" LICENSE="GPL-3+"
SLOT="${PV}" SLOT="${PV}"
IUSE="emacs" IUSE="emacs"

View File

@ -18,7 +18,7 @@ inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files" DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html" HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
LICENSE="GPL-3" LICENSE="GPL-3+"
SLOT="${PV}" SLOT="${PV}"
IUSE="emacs" IUSE="emacs"
@ -41,6 +41,7 @@ PATCHES=(
"${FILESDIR}"/${P}-fix-libtool-test.patch "${FILESDIR}"/${P}-fix-libtool-test.patch
"${FILESDIR}"/${PN}-2.69-perl-5.26-2.patch "${FILESDIR}"/${PN}-2.69-perl-5.26-2.patch
"${FILESDIR}"/${P}-make-tests-bash5-compatible.patch "${FILESDIR}"/${P}-make-tests-bash5-compatible.patch
"${FILESDIR}"/${P}-K-R-decls-clang.patch
"${WORKDIR}"/patches/${P}-texinfo.patch "${WORKDIR}"/patches/${P}-texinfo.patch
) )

View File

@ -0,0 +1,87 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git"
inherit git-r3
else
# For _beta handling replace with real version number
MY_PV="${PV}"
MY_P="${PN}-${MY_PV}"
#PATCH_TARBALL_NAME="${PN}-2.70-patches-01"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
#SRC_URI+=" https://dev.gentoo.org/~polynomial-c/${PATCH_TARBALL_NAME}.tar.xz"
if ! [[ ${PV} == *_beta* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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
S="${WORKDIR}"/${MY_P}
fi
inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
LICENSE="GPL-3+"
SLOT="${PV/_*}"
IUSE="emacs"
# for 2.71, our Perl time resolution patch changes our min Perl from 5.6
# (vanilla upstream for 2.71) to 5.8.
BDEPEND=">=sys-devel/m4-1.4.16
>=dev-lang/perl-5.8"
RDEPEND="${BDEPEND}
>=sys-devel/autoconf-wrapper-15
sys-devel/gnuconfig
!~sys-devel/${P}:2.5"
[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"
PDEPEND="emacs? ( app-emacs/autoconf-mode )"
PATCHES=(
"${FILESDIR}"/${P}-AC_LANG_CALL_C_cxx.patch
"${FILESDIR}"/${P}-time.patch
"${FILESDIR}"/${P}-AC_C_BIGENDIAN-lto.patch
"${FILESDIR}"/${P}-K-R-decls-clang.patch
"${FILESDIR}"/${P}-make-4.4.patch
)
src_prepare() {
# usr/bin/libtool is provided by binutils-apple, need gnu libtool
if [[ ${CHOST} == *-darwin* ]] ; then
PATCHES+=( "${FILESDIR}"/${PN}-2.71-darwin.patch )
fi
# Save timestamp to avoid later makeinfo call
touch -r doc/{,old_}autoconf.texi || die
local pdir
for pdir in "${WORKDIR}"/{upstream_,}patches ; do
if [[ -d "${pdir}" ]] ; then
eapply ${pdir}
fi
done
toolchain-autoconf_src_prepare
# Restore timestamp to avoid makeinfo call
# We already have an up to date autoconf.info page at this point.
touch -r doc/{old_,}autoconf.texi || die
}
src_test() {
emake check
}
src_install() {
toolchain-autoconf_src_install
local f
for f in config.{guess,sub} ; do
ln -fs ../../gnuconfig/${f} \
"${ED}"/usr/share/autoconf-*/build-aux/${f} || die
done
}

View File

@ -17,7 +17,7 @@ inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files" DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html" HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
LICENSE="GPL-3" LICENSE="GPL-3+"
SLOT="${PV}" SLOT="${PV}"
IUSE="emacs" IUSE="emacs"

View File

@ -0,0 +1,346 @@
https://bugs.gentoo.org/870412
https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=8b5e2016c7ed2d67f31b03a3d2e361858ff5299b
Backport the K&R decls fix to 2.69 to avoid configure tests
failing (often "silently", i.e. doesn't fail the build of
the package overall, just leads to wrong results) with
newer compilers like the upcoming Clang 16.
From d8ad1096be4352c588b9bc1e16b6758f4f32b96a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
Date: Mon, 19 Sep 2022 01:38:29 +0200
Subject: [PATCH] ac{general,specific}: declare void param lists, where apt
--- a/acgeneral.m4
+++ b/acgeneral.m4
@@ -1542,7 +1542,7 @@ extern "C"
])dnl
[/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $1();
+char $1(void);
]),
[$1()],
[$2],
@@ -1597,7 +1597,7 @@ extern "C"
])dnl
[/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $2();
+char $2(void);
])),
[$2()],
eval "ac_cv_lib_$ac_lib_var=yes",
@@ -1733,7 +1733,7 @@ dnl [#]line __oline__ "[$]0"
[#]line __oline__ "configure"
#include "confdefs.h"
[$1]
-int main() {
+int main(void) {
[$2]
; return 0; }
])EOF
@@ -1777,7 +1777,7 @@ dnl [#]line __oline__ "[$]0"
[#]line __oline__ "configure"
#include "confdefs.h"
[$1]
-int main() {
+int main(void) {
[$2]
; return 0; }
])EOF
@@ -1934,7 +1934,7 @@ extern "C"
])dnl
[/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $1();
+char $1(void);
], [
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -1988,7 +1988,7 @@ changequote([, ])dnl
AC_MSG_CHECKING(size of $1)
AC_CACHE_VAL(AC_CV_NAME,
[AC_TRY_RUN([#include <stdio.h>
-main()
+main(void)
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
--- a/acspecific.m4
+++ b/acspecific.m4
@@ -202,7 +202,7 @@ AC_DEFUN(AC_PROG_CC_WORKS,
[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
AC_LANG_SAVE
AC_LANG_C
-AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
+AC_TRY_COMPILER([int main(void){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
AC_LANG_RESTORE
AC_MSG_RESULT($ac_cv_prog_cc_works)
if test $ac_cv_prog_cc_works = no; then
@@ -217,7 +217,7 @@ AC_DEFUN(AC_PROG_CXX_WORKS,
[AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
-AC_TRY_COMPILER([int main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross)
+AC_TRY_COMPILER([int main(void){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross)
AC_LANG_RESTORE
AC_MSG_RESULT($ac_cv_prog_cxx_works)
if test $ac_cv_prog_cxx_works = no; then
@@ -300,7 +300,7 @@ fi])])
AC_DEFUN(AC_PROG_CC_G,
[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
-[echo 'void f(){}' > conftest.c
+[echo 'void f(void){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
else
@@ -311,7 +311,7 @@ rm -f conftest*
AC_DEFUN(AC_PROG_CXX_G,
[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
-[echo 'void f(){}' > conftest.cc
+[echo 'void f(void){}' > conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
ac_cv_prog_cxx_g=yes
else
@@ -371,7 +371,7 @@ changequote(, )dnl
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
changequote([, ])dnl
AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
-[echo 'foo(){}' > conftest.c
+[echo 'foo(void){}' > conftest.c
# Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
@@ -709,7 +709,7 @@ AC_TRY_RUN([#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
+int main (void) { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
], , ac_cv_header_stdc=no, :)
@@ -820,7 +820,7 @@ esac
AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
[AC_TRY_RUN([#include <sys/types.h>
#include <$ac_header_dirent>
-int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
+int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }],
ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(VOID_CLOSEDIR)
@@ -911,7 +911,7 @@ changequote(<<, >>)dnl
#define NGID 256
#undef MAX
#define MAX(x, y) ((x) > (y) ? (x) : (y))
-main()
+int main(void)
{
gid_t gidset[NGID];
int i, n;
@@ -973,7 +973,7 @@ AC_DEFUN(AC_TYPE_SIGNAL,
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
-void (*signal ()) ();
+void (*signal (void)) (void);
#endif
],
[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])
@@ -989,7 +989,7 @@ AC_DEFUN(AC_FUNC_CLOSEDIR_VOID,
AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
[AC_TRY_RUN([#include <sys/types.h>
#include <$ac_header_dirent>
-int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
+int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }],
ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(CLOSEDIR_VOID)
@@ -1001,7 +1001,7 @@ AC_DEFUN(AC_FUNC_FNMATCH,
# Some versions of Solaris or SCO have a broken fnmatch function.
# So we run a test program. If we are cross-compiling, take no chance.
# Thanks to John Oleynick and Franc,ois Pinard for this test.
-[AC_TRY_RUN([main() { exit (fnmatch ("a*", "abc", 0) != 0); }],
+[AC_TRY_RUN([int main(void) { exit (fnmatch ("a*", "abc", 0) != 0); }],
ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
ac_cv_func_fnmatch_works=no)])
if test $ac_cv_func_fnmatch_works = yes; then
@@ -1083,11 +1083,11 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
-char *malloc();
+char *malloc(...);
#endif
int
-main()
+main(void)
{
char *data, *data2, *data3;
int i, pagesize;
@@ -1172,7 +1172,7 @@ int pid;
int pg1, pg2, pg3, pg4;
int ng, np, s, child;
-main()
+int main(void)
{
pid = getpid();
pg1 = getpgrp(0);
@@ -1228,7 +1228,7 @@ AC_TRY_RUN([
* If this system has a BSD-style setpgrp, which takes arguments, exit
* successfully.
*/
-main()
+int main(void)
{
if (setpgrp(1,1) == -1)
exit(0);
@@ -1291,7 +1291,7 @@ sparc_address_test (arg) int arg;
}
}
}
-main() {
+int main(void) {
pid_t parent = getpid ();
pid_t child;
@@ -1360,7 +1360,7 @@ AC_DEFUN(AC_FUNC_WAIT3,
#include <sys/resource.h>
#include <stdio.h>
/* HP-UX has wait3 but does not fill in rusage at all. */
-main() {
+int main(void) {
struct rusage r;
int i;
/* Use a field that we can force nonzero --
@@ -1416,7 +1416,7 @@ AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
+char *alloca (...);
# endif
# endif
# endif
@@ -1464,7 +1464,7 @@ AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
else
return (&dummy > addr) ? 1 : -1;
}
-main ()
+int main (void)
{
exit (find_stack_direction() < 0);
}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
@@ -1582,7 +1582,7 @@ AC_DEFUN(AC_FUNC_UTIME_NULL,
# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
AC_TRY_RUN([#include <sys/types.h>
#include <sys/stat.h>
-main() {
+int main(void) {
struct stat s, t;
exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
@@ -1598,7 +1598,7 @@ fi
AC_DEFUN(AC_FUNC_STRCOLL,
[AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works,
[AC_TRY_RUN([#include <string.h>
-main ()
+int main (void)
{
exit (strcoll ("abc", "def") >= 0 ||
strcoll ("ABC", "DEF") >= 0 ||
@@ -1615,7 +1615,7 @@ AC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
ac_cv_func_setvbuf_reversed,
[AC_TRY_RUN([#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
-main () {
+int main (void) {
/* This call has the arguments reversed.
A reversed system may check and see that the address of main
is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
@@ -1647,7 +1647,7 @@ LIBS="-lintl $LIBS"])])])
AC_DEFUN(AC_FUNC_MEMCMP,
[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
[AC_TRY_RUN([
-main()
+int main(void)
{
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
@@ -1805,7 +1805,7 @@ AC_TRY_RUN(
#if !defined(__STDC__) || __STDC__ != 1
#define volatile
#endif
-main() {
+int main(void) {
volatile char c = 255; exit(c < 0);
}], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)
fi])
@@ -1819,7 +1819,7 @@ AC_DEFUN(AC_C_LONG_DOUBLE,
[if test "$GCC" = yes; then
ac_cv_c_long_double=yes
else
-AC_TRY_RUN([int main() {
+AC_TRY_RUN([int main(void) {
/* The Stardent Vistra knows sizeof(long double), but does not support it. */
long double foo = 0.0;
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
@@ -1834,7 +1834,7 @@ fi
AC_DEFUN(AC_INT_16_BITS,
[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])dnl
AC_MSG_CHECKING(whether int is 16 bits)
-AC_TRY_RUN([main() { exit(sizeof(int) != 2); }],
+AC_TRY_RUN([int main(void) { exit(sizeof(int) != 2); }],
[AC_MSG_RESULT(yes)
AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(no))
])
@@ -1842,7 +1842,7 @@ AC_TRY_RUN([main() { exit(sizeof(int) != 2); }],
AC_DEFUN(AC_LONG_64_BITS,
[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])dnl
AC_MSG_CHECKING(whether long int is 64 bits)
-AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }],
+AC_TRY_RUN([int main(void) { exit(sizeof(long int) != 8); }],
[AC_MSG_RESULT(yes)
AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(no))
])
@@ -1862,7 +1862,7 @@ AC_TRY_COMPILE([#include <sys/types.h>
not big endian
#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
if test $ac_cv_c_bigendian = unknown; then
-AC_TRY_RUN([main () {
+AC_TRY_RUN([int main (void) {
/* Are we little or big endian? From Harbison&Steele. */
union
{
@@ -1885,7 +1885,7 @@ AC_DEFUN(AC_C_INLINE,
[AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break])
+ AC_TRY_COMPILE(, [} $ac_kw foo(void) {], [ac_cv_c_inline=$ac_kw; break])
done
])
case "$ac_cv_c_inline" in
@@ -2277,7 +2277,7 @@ AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS,
#include <sys/types.h>
#include <signal.h>
ucatch (isig) { }
-main () {
+int main (void) {
int i = fork (), status;
if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
signal (SIGINT, ucatch);
@@ -2654,7 +2654,7 @@ AC_CACHE_VAL(ac_cv_exeext,
ac_cv_exeext=.exe
else
rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
+ echo 'int main (void) { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
if AC_TRY_EVAL(ac_link); then
for file in conftest.*; do

View File

@ -0,0 +1,365 @@
https://bugs.gentoo.org/870412
https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=8b5e2016c7ed2d67f31b03a3d2e361858ff5299b
Backport the K&R decls fix to 2.69 to avoid configure tests
failing (often "silently", i.e. doesn't fail the build of
the package overall, just leads to wrong results) with
newer compilers like the upcoming Clang 16.
From e6f401b94b58bb9bb58cd668a996e27663d3e6c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
Date: Mon, 19 Sep 2022 12:11:24 +0200
Subject: [PATCH] backport K&R decl fixes
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -97,7 +97,7 @@ m4_define([AC_LANG_PROGRAM(C)],
m4_ifdef([_AC_LANG_PROGRAM_C_F77_HOOKS], [_AC_LANG_PROGRAM_C_F77_HOOKS])[]dnl
m4_ifdef([_AC_LANG_PROGRAM_C_FC_HOOKS], [_AC_LANG_PROGRAM_C_FC_HOOKS])[]dnl
int
-main ()
+main (void)
{
dnl Do *not* indent the following line: there may be CPP directives.
dnl Don't move the `;' right after for the same reason.
@@ -130,7 +130,7 @@ m4_if([$2], [main], ,
#ifdef __cplusplus
extern "C"
#endif
-char $2 ();])], [return $2 ();])])
+char $2 (void);])], [return $2 ();])])
# AC_LANG_FUNC_LINK_TRY(C)(FUNCTION)
@@ -154,7 +154,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)],
#define $1 innocuous_$1
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $1 (); below.
+ which can conflict with char $1 (void); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -172,7 +172,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)],
#ifdef __cplusplus
extern "C"
#endif
-char $1 ();
+char $1 (void);
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
@@ -201,8 +201,8 @@ return test_array @<:@0@:>@;
# But we include them only after the EXPRESSION has been evaluated.
m4_define([AC_LANG_INT_SAVE(C)],
[AC_LANG_PROGRAM([$1
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
@%:@include <stdio.h>
@%:@include <stdlib.h>],
[
@@ -1625,8 +1625,8 @@ for ac_kw in inline __inline__ __inline; do
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
[#ifndef __cplusplus
typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
+static $ac_kw foo_t static_foo (void) {return 0; }
+$ac_kw foo_t foo (void) {return 0; }
#endif
])],
[ac_cv_c_inline=$ac_kw])
@@ -1949,7 +1949,7 @@ m4_define([_AC_LANG_OPENMP(C)],
choke me
#endif
#include <omp.h>
-int main () { return omp_get_num_threads (); }
+int main (void) { return omp_get_num_threads (); }
])
# _AC_LANG_OPENMP(C++)
--- a/lib/autoconf/functions.m4
+++ b/lib/autoconf/functions.m4
@@ -463,9 +463,6 @@ AC_CACHE_CHECK([whether closedir returns void],
[ac_cv_func_closedir_void],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
#include <$ac_header_dirent>
-#ifndef __cplusplus
-int closedir ();
-#endif
],
[[return closedir (opendir (".")) != 0;]])],
[ac_cv_func_closedir_void=no],
@@ -893,7 +890,7 @@ AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull,
[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
# include <stdlib.h>
#else
-char *malloc ();
+char *malloc (long);
#endif
]],
[return ! malloc (0);])],
@@ -1029,7 +1026,7 @@ static const char *tz_strings[] = {
/* Return 0 if mktime fails to convert a date in the spring-forward gap.
Based on a problem report from Andreas Jaeger. */
static int
-spring_forward_gap ()
+spring_forward_gap (void)
{
/* glibc (up to about 1998-10-07) failed this test. */
struct tm tm;
@@ -1066,7 +1063,7 @@ mktime_test (time_t now)
}
static int
-irix_6_4_bug ()
+irix_6_4_bug (void)
{
/* Based on code from Ariel Faigon. */
struct tm tm;
@@ -1108,7 +1105,7 @@ bigtime_test (int j)
}
static int
-year_2050_test ()
+year_2050_test (void)
{
/* The correct answer for 2050-02-01 00:00:00 in Pacific time,
ignoring leap seconds. */
@@ -1138,7 +1135,7 @@ year_2050_test ()
}
int
-main ()
+main (void)
{
time_t t, delta;
int i, j;
@@ -1232,7 +1229,7 @@ AC_CACHE_CHECK([for working mmap], [ac_cv_func_mmap_fixed_mapped],
#include <sys/mman.h>
#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
-char *malloc ();
+char *malloc (void *, long);
#endif
/* This mess was copied from the GNU getpagesize.h. */
@@ -1268,7 +1265,7 @@ char *malloc ();
#endif /* no HAVE_GETPAGESIZE */
int
-main ()
+main (void)
{
char *data, *data2, *data3;
const char *cdata2;
@@ -1398,7 +1395,7 @@ AC_CACHE_CHECK([for GNU libc compatible realloc], ac_cv_func_realloc_0_nonnull,
[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
# include <stdlib.h>
#else
-char *realloc ();
+char *realloc (void *, long);
#endif
]],
[return ! realloc (0, 0);])],
@@ -1547,11 +1544,8 @@ AC_DEFUN([AC_FUNC_STRTOD],
AC_CACHE_CHECK(for working strtod, ac_cv_func_strtod,
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
]AC_INCLUDES_DEFAULT[
-#ifndef strtod
-double strtod ();
-#endif
int
-main()
+main(void)
{
{
/* Some versions of Linux strtod mis-parse strings with leading '+'. */
@@ -1645,8 +1639,7 @@ AC_CACHE_CHECK([whether strerror_r returns char *],
# former has a strerror_r that returns char*, while the latter
# has a strerror_r that returns `int'.
# This test should segfault on the DEC system.
- AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
- extern char *strerror_r ();],
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[[char buf[100];
char x = *strerror_r (0, buf, sizeof buf);
return ! isalpha (x);]])],
@@ -1879,7 +1872,7 @@ sparc_address_test (arg) int arg;
}
int
-main ()
+main (void)
{
pid_t parent = getpid ();
pid_t child;
@@ -1985,7 +1978,7 @@ AC_CACHE_CHECK([for wait3 that fills in rusage],
#include <sys/wait.h>
/* HP-UX has wait3 but does not fill in rusage at all. */
int
-main ()
+main (void)
{
struct rusage r;
int i;
--- a/lib/autoconf/headers.m4
+++ b/lib/autoconf/headers.m4
@@ -712,7 +712,7 @@ if test $ac_cv_header_stdc = yes; then
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
-main ()
+main (void)
{
int i;
for (i = 0; i < 256; i++)
--- a/lib/autoconf/specific.m4
+++ b/lib/autoconf/specific.m4
@@ -257,7 +257,7 @@ void ucatch (dummy) int dummy; { }
#endif
int
-main ()
+main (void)
{
int i = fork (), status;
--- a/lib/autoconf/types.m4
+++ b/lib/autoconf/types.m4
@@ -267,7 +267,7 @@ AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
#define MAX(x, y) ((x) > (y) ? (x) : (y))
int
-main ()
+main (void)
{
gid_t gidset[NGID];
int i, n;
--- a/tests/c.at
+++ b/tests/c.at
@@ -354,7 +354,7 @@ AT_DATA([foo.c],
#endif
#include <stdio.h>
-int main ()
+int main (void)
{
#ifdef _OPENMP
#pragma omp parallel
@@ -404,7 +404,7 @@ foo.@OBJEXT@: foo.cpp
]])
AT_DATA([foo.cpp],
-[[int main ()
+[[int main (void)
{
return 0;
}
--- a/tests/compile.at
+++ b/tests/compile.at
@@ -124,7 +124,7 @@ AC_PROG_CC
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifndef PACKAGE_NAME
choke me
#endif
-int main ()
+int main (void)
{
return 0;
}
@@ -150,7 +150,7 @@ AC_LANG([C++])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifndef PACKAGE_NAME
choke me
#endif
-int main ()
+int main (void)
{
return 0;
}
@@ -249,7 +249,7 @@ AT_CHECK([sed -n 's/ *$//; /#define PACKAGE/,$p' stdout], [],
const char hw[] = "Hello, World\n";
int
-main ()
+main (void)
{
fputs (hw, stdout);
;
@@ -269,7 +269,7 @@ AT_KEYWORDS([AC_LANG_DEFINES_PROVIDED])
AT_DATA([configure.ac],
[[AC_INIT
-AC_COMPILE_IFELSE([int main () { return 0; }], [],
+AC_COMPILE_IFELSE([int main (void) { return 0; }], [],
[AC_MSG_ERROR([compiling trivial program failed])])
]])
@@ -280,7 +280,7 @@ AT_CHECK_CONFIGURE([-q])
AT_DATA([configure.ac],
[[AC_INIT
-AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED()int main () { return 0; }], [],
+AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED()int main (void) { return 0; }], [],
[AC_MSG_ERROR([compiling trivial program failed])])
]])
@@ -324,7 +324,7 @@ test $estatus != 2 &&
AC_MSG_ERROR([did not get as 2 exit status: $estatus])])
# The old stinky one.
-AC_TRY_RUN([int main () { return 3; }],
+AC_TRY_RUN([int main (void) { return 3; }],
[AC_MSG_ERROR([saw `return 3' as a success])],
[estatus=$?
test $estatus != 3 &&
--- a/tests/fortran.at
+++ b/tests/fortran.at
@@ -223,7 +223,7 @@ void FOOBAR_F77 (double *x, double *y);
# ifdef __cplusplus
extern "C"
# endif
- int F77_DUMMY_MAIN () { return 1; }
+ int F77_DUMMY_MAIN (void) { return 1; }
#endif
int main(int argc, char *argv[])
@@ -301,7 +301,7 @@ void FOOBAR_FC(double *x, double *y);
# ifdef __cplusplus
extern "C"
# endif
- int FC_DUMMY_MAIN () { return 1; }
+ int FC_DUMMY_MAIN (void) { return 1; }
#endif
int main (int argc, char *argv[])
@@ -533,7 +533,7 @@ void @foobar@ (int *x);
# ifdef __cplusplus
extern "C"
# endif
- int F77_DUMMY_MAIN () { return 1; }
+ int F77_DUMMY_MAIN (void) { return 1; }
#endif
int main(int argc, char *argv[])
@@ -607,7 +607,7 @@ void @foobar@ (int *x);
# ifdef __cplusplus
extern "C"
# endif
- int FC_DUMMY_MAIN () { return 1; }
+ int FC_DUMMY_MAIN (void) { return 1; }
#endif
int main(int argc, char *argv[])
--- a/tests/semantics.at
+++ b/tests/semantics.at
@@ -107,7 +107,7 @@ AT_CHECK_MACRO([AC_CHECK_DECLS],
[[int yes = 1;
enum { myenum };
struct { int x[20]; } mystruct;
- extern int myfunc();
+ extern int myfunc (void);
#define mymacro1(arg) arg
#define mymacro2]])
# The difference in space-before-open-paren is intentional.

View File

@ -0,0 +1,50 @@
https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=234fc6c86613ed3f366dd1d88996e4d5d85ee222
From 234fc6c86613ed3f366dd1d88996e4d5d85ee222 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 27 Jul 2022 08:53:35 -0700
Subject: Port AC_C_BIGENDIAN to cross gcc -std=c11 -flto
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Improve the
inherently-unportable grep trick well enough to survive gcc
-std=c11 -flto when cross-compiling (sr#110687).
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -1838,8 +1838,8 @@ AC_DEFUN([AC_C_BIGENDIAN],
[ac_cv_c_bigendian=no],
[ac_cv_c_bigendian=yes],
[# Try to guess by grepping values from an object file.
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
[[unsigned short int ascii_mm[] =
{ 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
unsigned short int ascii_ii[] =
@@ -1854,13 +1854,20 @@ AC_DEFUN([AC_C_BIGENDIAN],
int use_ebcdic (int i) {
return ebcdic_mm[i] + ebcdic_ii[i];
}
- extern int foo;
- ]],
- [[return use_ascii (foo) == use_ebcdic (foo);]])],
- [if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ int
+ main (int argc, char **argv)
+ {
+ /* Intimidate the compiler so that it does not
+ optimize the arrays away. */
+ char *p = argv[0];
+ ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
+ ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
+ return use_ascii (argc) == use_ebcdic (*p);
+ }]])],
+ [if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
ac_cv_c_bigendian=yes
fi
- if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
if test "$ac_cv_c_bigendian" = unknown; then
ac_cv_c_bigendian=no
else
cgit v1.1

View File

@ -0,0 +1,35 @@
https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=b27bc3e230bb12fdd9a813e38e82bc4c3e22b4cc
Note: we drop the comma from the comment because some packages
have bad quoting, and while that will need to be sorted when/if
autoconf 2.72 is released, we've got our hands full with the
Clang situation right now (bug #871753).
From b27bc3e230bb12fdd9a813e38e82bc4c3e22b4cc Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 31 Aug 2021 16:30:46 -0700
Subject: Port AC_LANG_CALL(C) to C++
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* lib/autoconf/c.m4 (AC_LANG_CALL(C)): Add an extern "C" if C++.
Problem reported by Vincent Lefèvre (sr #110532).
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -126,7 +126,13 @@ m4_define([AC_LANG_CALL(C)],
m4_if([$2], [main], ,
[/* 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. */
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
char $2 ();])], [return $2 ();])])
cgit v1.1

Some files were not shown because too many files have changed in this diff Show More