Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/putty/
Date: Fri, 27 May 2022 10:11:46
Message-Id: 1653646297.dbf8ebfd6937b455d0db78e4610aae748e5c6ed8.polynomial-c@gentoo
1 commit: dbf8ebfd6937b455d0db78e4610aae748e5c6ed8
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 27 10:04:14 2022 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri May 27 10:11:37 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbf8ebfd
7
8 net-misc/putty: Switched live ebuild to cmake
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11
12 net-misc/putty/putty-9999.ebuild | 70 +++++++++++++++++-----------------------
13 1 file changed, 30 insertions(+), 40 deletions(-)
14
15 diff --git a/net-misc/putty/putty-9999.ebuild b/net-misc/putty/putty-9999.ebuild
16 index 97dbfaea150f..a09ae7ae4600 100644
17 --- a/net-misc/putty/putty-9999.ebuild
18 +++ b/net-misc/putty/putty-9999.ebuild
19 @@ -1,18 +1,23 @@
20 # Copyright 1999-2022 Gentoo Authors
21 # Distributed under the terms of the GNU General Public License v2
22
23 -EAPI=7
24 -inherit autotools desktop git-r3 toolchain-funcs xdg-utils
25 +EAPI=8
26 +inherit cmake desktop xdg-utils
27
28 DESCRIPTION="A Free Telnet/SSH Client"
29 HOMEPAGE="https://www.chiark.greenend.org.uk/~sgtatham/putty/"
30 -EGIT_REPO_URI="https://git.tartarus.org/simon/putty.git"
31 SRC_URI="https://dev.gentoo.org/~polynomial-c/${PN}-icons.tar.bz2"
32 +if [[ ${PV} == *9999 ]] ; then
33 + inherit git-r3
34 + EGIT_REPO_URI="https://git.tartarus.org/simon/putty.git"
35 +else
36 + SRC_URI+=" https://the.earth.li/~sgtatham/${PN}/${PV}/${P}.tar.gz"
37 + KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
38 +fi
39 LICENSE="MIT"
40
41 SLOT="0"
42 -KEYWORDS=""
43 -IUSE="doc +gtk gtk2 ipv6 gssapi"
44 +IUSE="debug +gtk gtk2 ipv6 gssapi"
45
46 RDEPEND="
47 !net-misc/pssh
48 @@ -30,62 +35,47 @@ DEPEND="
49 ${RDEPEND}
50 "
51 BDEPEND="
52 - app-doc/halibut
53 dev-lang/perl
54 virtual/pkgconfig
55 "
56 +#[[ ${PV} == *9999 ]] && BDEPEND+=" doc? ( app-doc/halibut )"
57 +
58 REQUIRED_USE="
59 gtk2? ( gtk )
60 "
61
62 src_unpack() {
63 - git-r3_src_unpack
64 - default
65 -}
66 -
67 -src_prepare() {
68 + [[ ${PV} == *9999 ]] && git-r3_src_unpack
69 default
70 -
71 - sed -i \
72 - -e 's|-Werror||g' \
73 - configure.ac || die
74 -
75 - ./mkfiles.pl || die
76 -
77 - eautoreconf
78 }
79
80 src_configure() {
81 cd "${S}"/unix || die
82 - econf \
83 - $(use_with gssapi) \
84 - $(usex gtk --with-gtk= --without-gtk $(usex gtk2 2 3 ) )
85 -}
86 -
87 -src_compile() {
88 - emake -C "${S}"/doc
89 - emake -C "${S}"/unix AR="$(tc-getAR)" $(usex ipv6 '' COMPAT=-DNO_IPV6)
90 -}
91 -
92 -src_test() {
93 - emake -C unix cgtest
94 - unix/cgtest || die
95 + local mycmakeargs=(
96 + -DPUTTY_DEBUG="$(usex debug)"
97 + -DPUTTY_GSSAPI="$(usex gssapi DYNAMIC OFF)"
98 + -DPUTTY_GTK_VERSION=$(usex gtk $(usex gtk2 2 3 ) '')
99 + -DPUTTY_IPV6="$(usex ipv6)"
100 + )
101 + cmake_src_configure
102 }
103
104 src_install() {
105 - dodoc doc/puttydoc.txt
106 + cmake_src_install
107
108 - if use doc; then
109 - docinto html
110 - dodoc doc/*.html
111 - fi
112 + doman "${BUILD_DIR}"/doc/*.1
113
114 - cd "${S}"/unix || die
115 - default
116 + #if use doc ; then
117 + # docinto html
118 + # dodoc "${BUILD_DIR}"/doc/html/*.html
119 + #fi
120
121 if use gtk ; then
122 + local i
123 for i in 16 22 24 32 48 64 128 256; do
124 - newicon -s ${i} "${WORKDIR}"/${PN}-icons/${PN}-${i}.png ${PN}.png
125 + newicon -s ${i} \
126 + "${WORKDIR}"/${PN}-icons/${PN}-${i}.png \
127 + ${PN}.png
128 done
129
130 # install desktop file provided by Gustav Schaffter in #49577