dev-vcs/git: switch more USE=tk to meson

Bug: https://bugs.gentoo.org/957542
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-06-08 02:32:18 +01:00
parent 466bac5f6e
commit e4c81b8ad8
3 changed files with 76 additions and 64 deletions

View File

@@ -149,12 +149,11 @@ RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${PN}-2.48.1-macos-no-fsmonitor.patch
"${FILESDIR}"/${PN}-2.49.0-meson-use-test_environment-conditionally.patch
# This patch isn't merged upstream but is kept in the ebuild by
# demand from developers. It's opt-in (needs a config option)
# and the documentation mentions that it is a Gentoo addition.
"${FILESDIR}"/${PN}-2.49.0-diff-implement-config.diff.renames-copies-harder.patch
"${FILESDIR}"/${PN}-2.50.0-diff-implement-config.diff.renames-copies-harder.patch
)
pkg_setup() {
@@ -269,12 +268,15 @@ src_configure() {
meson_src_configure
if use tk ; then
(
EMESON_SOURCE="${S}"/gitk-git
BUILD_DIR="${WORKDIR}"/gitk-git_build
emesonargs=()
meson_src_configure
)
local tkdir
for tkdir in git-gui gitk-git ; do
(
EMESON_SOURCE="${S}"/${tkdir}
BUILD_DIR="${WORKDIR}"/${tkdir}_build
emesonargs=()
meson_src_configure
)
done
fi
}
@@ -313,13 +315,14 @@ src_compile() {
fi
if use tk ; then
git_emake -C git-gui gitexecdir="${EPREFIX}/usr/libexec/git-core"
(
EMESON_SOURCE="${S}"/gitk-git
BUILD_DIR="${WORKDIR}"/gitk-git_build
meson_src_compile
)
local tkdir
for tkdir in git-gui gitk-git ; do
(
EMESON_SOURCE="${S}"/${tkdir}
BUILD_DIR="${WORKDIR}"/${tkdir}_build
meson_src_compile
)
done
fi
if use doc ; then
@@ -459,13 +462,14 @@ src_install() {
fi
if use tk ; then
(
EMESON_SOURCE="${S}"/gitk-git
BUILD_DIR="${WORKDIR}"/gitk-git_build
meson_src_install
)
git_emake -C git-gui gitexecdir="${EPREFIX}/usr/libexec/git-core" DESTDIR="${D}" install
local tkdir
for tkdir in git-gui gitk-git ; do
(
EMESON_SOURCE="${S}"/${tkdir}
BUILD_DIR="${WORKDIR}"/${tkdir}_build
meson_src_install
)
done
fi
perl_delete_localpod

View File

@@ -268,12 +268,15 @@ src_configure() {
meson_src_configure
if use tk ; then
(
EMESON_SOURCE="${S}"/gitk-git
BUILD_DIR="${WORKDIR}"/gitk-git_build
emesonargs=()
meson_src_configure
)
local tkdir
for tkdir in git-gui gitk-git ; do
(
EMESON_SOURCE="${S}"/${tkdir}
BUILD_DIR="${WORKDIR}"/${tkdir}_build
emesonargs=()
meson_src_configure
)
done
fi
}
@@ -312,14 +315,14 @@ src_compile() {
fi
if use tk ; then
git_emake -C git-gui gitexecdir="${EPREFIX}/usr/libexec/git-core"
(
EMESON_SOURCE="${S}"/gitk-git
BUILD_DIR="${WORKDIR}"/gitk-git_build
meson_src_compile
)
local tkdir
for tkdir in git-gui gitk-git ; do
(
EMESON_SOURCE="${S}"/${tkdir}
BUILD_DIR="${WORKDIR}"/${tkdir}_build
meson_src_compile
)
done
fi
if use doc ; then
@@ -459,13 +462,14 @@ src_install() {
fi
if use tk ; then
(
EMESON_SOURCE="${S}"/gitk-git
BUILD_DIR="${WORKDIR}"/gitk-git_build
meson_src_install
)
git_emake -C git-gui gitexecdir="${EPREFIX}/usr/libexec/git-core" DESTDIR="${D}" install
local tkdir
for tkdir in git-gui gitk-git ; do
(
EMESON_SOURCE="${S}"/${tkdir}
BUILD_DIR="${WORKDIR}"/${tkdir}_build
meson_src_install
)
done
fi
perl_delete_localpod

View File

@@ -268,12 +268,15 @@ src_configure() {
meson_src_configure
if use tk ; then
(
EMESON_SOURCE="${S}"/gitk-git
BUILD_DIR="${WORKDIR}"/gitk-git_build
emesonargs=()
meson_src_configure
)
local tkdir
for tkdir in git-gui gitk-git ; do
(
EMESON_SOURCE="${S}"/${tkdir}
BUILD_DIR="${WORKDIR}"/${tkdir}_build
emesonargs=()
meson_src_configure
)
done
fi
}
@@ -312,14 +315,14 @@ src_compile() {
fi
if use tk ; then
git_emake -C git-gui gitexecdir="${EPREFIX}/usr/libexec/git-core"
(
EMESON_SOURCE="${S}"/gitk-git
BUILD_DIR="${WORKDIR}"/gitk-git_build
meson_src_compile
)
local tkdir
for tkdir in git-gui gitk-git ; do
(
EMESON_SOURCE="${S}"/${tkdir}
BUILD_DIR="${WORKDIR}"/${tkdir}_build
meson_src_compile
)
done
fi
if use doc ; then
@@ -459,13 +462,14 @@ src_install() {
fi
if use tk ; then
(
EMESON_SOURCE="${S}"/gitk-git
BUILD_DIR="${WORKDIR}"/gitk-git_build
meson_src_install
)
git_emake -C git-gui gitexecdir="${EPREFIX}/usr/libexec/git-core" DESTDIR="${D}" install
local tkdir
for tkdir in git-gui gitk-git ; do
(
EMESON_SOURCE="${S}"/${tkdir}
BUILD_DIR="${WORKDIR}"/${tkdir}_build
meson_src_install
)
done
fi
perl_delete_localpod