mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-25 11:57:36 -08:00
net-misc/putty: Switched live ebuild to cmake
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
This commit is contained in:
@@ -1,18 +1,23 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
inherit autotools desktop git-r3 toolchain-funcs xdg-utils
|
||||
EAPI=8
|
||||
inherit cmake desktop xdg-utils
|
||||
|
||||
DESCRIPTION="A Free Telnet/SSH Client"
|
||||
HOMEPAGE="https://www.chiark.greenend.org.uk/~sgtatham/putty/"
|
||||
EGIT_REPO_URI="https://git.tartarus.org/simon/putty.git"
|
||||
SRC_URI="https://dev.gentoo.org/~polynomial-c/${PN}-icons.tar.bz2"
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://git.tartarus.org/simon/putty.git"
|
||||
else
|
||||
SRC_URI+=" https://the.earth.li/~sgtatham/${PN}/${PV}/${P}.tar.gz"
|
||||
KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
|
||||
fi
|
||||
LICENSE="MIT"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE="doc +gtk gtk2 ipv6 gssapi"
|
||||
IUSE="debug +gtk gtk2 ipv6 gssapi"
|
||||
|
||||
RDEPEND="
|
||||
!net-misc/pssh
|
||||
@@ -30,62 +35,47 @@ DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
app-doc/halibut
|
||||
dev-lang/perl
|
||||
virtual/pkgconfig
|
||||
"
|
||||
#[[ ${PV} == *9999 ]] && BDEPEND+=" doc? ( app-doc/halibut )"
|
||||
|
||||
REQUIRED_USE="
|
||||
gtk2? ( gtk )
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
git-r3_src_unpack
|
||||
[[ ${PV} == *9999 ]] && git-r3_src_unpack
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's|-Werror||g' \
|
||||
configure.ac || die
|
||||
|
||||
./mkfiles.pl || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
cd "${S}"/unix || die
|
||||
econf \
|
||||
$(use_with gssapi) \
|
||||
$(usex gtk --with-gtk= --without-gtk $(usex gtk2 2 3 ) )
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -C "${S}"/doc
|
||||
emake -C "${S}"/unix AR="$(tc-getAR)" $(usex ipv6 '' COMPAT=-DNO_IPV6)
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake -C unix cgtest
|
||||
unix/cgtest || die
|
||||
local mycmakeargs=(
|
||||
-DPUTTY_DEBUG="$(usex debug)"
|
||||
-DPUTTY_GSSAPI="$(usex gssapi DYNAMIC OFF)"
|
||||
-DPUTTY_GTK_VERSION=$(usex gtk $(usex gtk2 2 3 ) '')
|
||||
-DPUTTY_IPV6="$(usex ipv6)"
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc doc/puttydoc.txt
|
||||
cmake_src_install
|
||||
|
||||
if use doc; then
|
||||
docinto html
|
||||
dodoc doc/*.html
|
||||
fi
|
||||
doman "${BUILD_DIR}"/doc/*.1
|
||||
|
||||
cd "${S}"/unix || die
|
||||
default
|
||||
#if use doc ; then
|
||||
# docinto html
|
||||
# dodoc "${BUILD_DIR}"/doc/html/*.html
|
||||
#fi
|
||||
|
||||
if use gtk ; then
|
||||
local i
|
||||
for i in 16 22 24 32 48 64 128 256; do
|
||||
newicon -s ${i} "${WORKDIR}"/${PN}-icons/${PN}-${i}.png ${PN}.png
|
||||
newicon -s ${i} \
|
||||
"${WORKDIR}"/${PN}-icons/${PN}-${i}.png \
|
||||
${PN}.png
|
||||
done
|
||||
|
||||
# install desktop file provided by Gustav Schaffter in #49577
|
||||
|
||||
Reference in New Issue
Block a user