Gentoo Archives: gentoo-dev

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH 3/4] app-admin/gkrellm: Revbump replacing user eclass
Date: Tue, 06 Aug 2019 15:06:04
Message-Id: 20190806150512.16095-3-polynomial-c@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/4] acct-group/gkrellmd: Initial commit by Lars Wendler
1 with gkrellmd group/user packages.
2
3 Package-Manager: Portage-2.3.71, Repoman-2.3.17
4 Signed-off-by: Lars Wendler <polynomial-c@g.o>
5 ---
6 app-admin/gkrellm/gkrellm-2.3.11-r1.ebuild | 147 +++++++++++++++++++++
7 1 file changed, 147 insertions(+)
8 create mode 100644 app-admin/gkrellm/gkrellm-2.3.11-r1.ebuild
9
10 diff --git a/app-admin/gkrellm/gkrellm-2.3.11-r1.ebuild b/app-admin/gkrellm/gkrellm-2.3.11-r1.ebuild
11 new file mode 100644
12 index 00000000000..c54518d2636
13 --- /dev/null
14 +++ b/app-admin/gkrellm/gkrellm-2.3.11-r1.ebuild
15 @@ -0,0 +1,147 @@
16 +# Copyright 1999-2019 Gentoo Authors
17 +# Distributed under the terms of the GNU General Public License v2
18 +
19 +EAPI=7
20 +
21 +inherit desktop multilib systemd toolchain-funcs
22 +
23 +MY_P="${P/_/-}"
24 +
25 +DESCRIPTION="Single process stack of various system monitors"
26 +HOMEPAGE="http://www.gkrellm.net/"
27 +if [[ "${PV}" == 9999 ]] ; then
28 + inherit git-r3
29 + EGIT_REPO_URI="https://git.srcbox.net/gkrellm"
30 +else
31 + SRC_URI="http://gkrellm.srcbox.net/${MY_P}.tar.bz2"
32 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
33 +fi
34 +LICENSE="GPL-3"
35 +SLOT="2"
36 +IUSE="gnutls hddtemp libressl lm_sensors nls ntlm ssl kernel_FreeBSD X"
37 +
38 +RDEPEND="
39 + acct-group/gkrellmd
40 + acct-user/gkrellmd
41 + dev-libs/glib:2
42 + hddtemp? ( app-admin/hddtemp )
43 + ssl? (
44 + gnutls? ( net-libs/gnutls )
45 + !gnutls? (
46 + !libressl? ( dev-libs/openssl:0= )
47 + libressl? ( dev-libs/libressl:0= )
48 + )
49 + )
50 + lm_sensors? ( sys-apps/lm_sensors:= )
51 + nls? ( virtual/libintl )
52 + ntlm? ( net-libs/libntlm )
53 + X? (
54 + x11-libs/gdk-pixbuf
55 + x11-libs/gtk+:2
56 + x11-libs/libICE
57 + x11-libs/libSM
58 + x11-libs/libX11
59 + x11-libs/pango
60 + )"
61 +DEPEND="${RDEPEND}
62 + nls? ( sys-devel/gettext )"
63 +
64 +BDEPEND="
65 + virtual/pkgconfig
66 +"
67 +
68 +PATCHES=(
69 + "${FILESDIR}"/${PN}-2.3.5-config.patch
70 + "${FILESDIR}"/${PN}-2.3.5-width.patch
71 + "${FILESDIR}"/${PN}-2.3.5-sansfont.patch
72 +)
73 +
74 +S="${WORKDIR}/${MY_P}"
75 +
76 +DOCS=( Changelog CREDITS README )
77 +
78 +pkg_pretend() {
79 + if use gnutls && ! use ssl ; then
80 + ewarn "You have enabled the \"gnutls\" USE flag but not the \"ssl\" USE flag."
81 + ewarn "No ssl backend will be built!"
82 + fi
83 +}
84 +
85 +pkg_setup() {
86 + TARGET=
87 + use kernel_FreeBSD && TARGET="freebsd"
88 +}
89 +
90 +src_prepare() {
91 + sed -e 's:-O2 ::' \
92 + -e 's:override CC:CFLAGS:' \
93 + -e 's:-L/usr/X11R6/lib::' \
94 + -i */Makefile || die "sed Makefile(s) failed"
95 +
96 + sed -e "s:/usr/lib:${EPREFIX}/usr/$(get_libdir):" \
97 + -e "s:/usr/local/lib:${EPREFIX}/usr/local/$(get_libdir):" \
98 + -i src/${PN}.h || die "sed ${PN}.h failed"
99 +
100 + default
101 +}
102 +
103 +src_compile() {
104 + if use X ; then
105 + emake \
106 + ${TARGET} \
107 + CC="$(tc-getCC)" \
108 + STRIP="" \
109 + INSTALLROOT="${EPREFIX}/usr" \
110 + INCLUDEDIR="${EPREFIX}/usr/include/gkrellm2" \
111 + LOCALEDIR="${EPREFIX}/usr/share/locale" \
112 + $(usex nls "" "enable_nls=0") \
113 + $(usex lm_sensors "" "without-libsensors=yes") \
114 + $(usex ntlm "" "without-ntlm=yes") \
115 + $(usex ssl $(usex gnutls 'without-ssl=yes' 'without-gnutls=yes') 'without-ssl=yes without-gnutls=yes')
116 + else
117 + cd server || die
118 + emake \
119 + ${TARGET} \
120 + CC="$(tc-getCC)" \
121 + LINK_FLAGS="$LDFLAGS -Wl,-E" \
122 + STRIP="" \
123 + $(usex nls "" "enable_nls=0") \
124 + $(usex lm_sensors "" "without-libsensors=yes")
125 + fi
126 +}
127 +
128 +src_install() {
129 + if use X ; then
130 + emake \
131 + install${TARGET:+_}${TARGET} \
132 + $(usex nls "" "enable_nls=0") \
133 + STRIP="" \
134 + INSTALLDIR="${ED}/usr/bin" \
135 + INCLUDEDIR="${ED}/usr/include" \
136 + LOCALEDIR="${ED}/usr/share/locale" \
137 + PKGCONFIGDIR="${ED}/usr/$(get_libdir)/pkgconfig" \
138 + MANDIR="${ED}/usr/share/man/man1"
139 +
140 + docinto html
141 + dodoc *.html
142 +
143 + newicon src/icon.xpm ${PN}.xpm
144 + make_desktop_entry ${PN} GKrellM ${PN}
145 + else
146 + dobin server/gkrellmd
147 +
148 + insinto /usr/include/gkrellm2
149 + doins server/gkrellmd.h
150 + doins shared/log.h
151 + fi
152 +
153 + newinitd "${FILESDIR}"/gkrellmd.initd gkrellmd
154 + newconfd "${FILESDIR}"/gkrellmd.conf gkrellmd
155 +
156 + systemd_dounit "${FILESDIR}"/gkrellmd.service
157 +
158 + insinto /etc
159 + doins server/gkrellmd.conf
160 +
161 + einstalldocs
162 +}
163 --
164 2.23.0.rc1