Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/gkrellm/, app-admin/gkrellm/files/
Date: Mon, 25 Apr 2016 19:20:40
Message-Id: 1461611866.2a25f2beaae8b47d63fc7c3bc8c3710b3e9dc5dc.wizardedit@gentoo
1 commit: 2a25f2beaae8b47d63fc7c3bc8c3710b3e9dc5dc
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 25 19:16:31 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 25 19:17:46 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a25f2be
7
8 app-admin/gkrellm: use #!/sbin/openrc-run instead of #!/sbin/runscript
9
10 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573846
11
12 app-admin/gkrellm/files/gkrellmd | 4 +-
13 app-admin/gkrellm/gkrellm-2.3.5-r4.ebuild | 129 ++++++++++++++++++++++++++++++
14 2 files changed, 131 insertions(+), 2 deletions(-)
15
16 diff --git a/app-admin/gkrellm/files/gkrellmd b/app-admin/gkrellm/files/gkrellmd
17 index 40db4ea..fe1f6db 100644
18 --- a/app-admin/gkrellm/files/gkrellmd
19 +++ b/app-admin/gkrellm/files/gkrellmd
20 @@ -1,5 +1,5 @@
21 -#!/sbin/runscript
22 -# Copyright 1999-2006 Gentoo Foundation
23 +#!/sbin/openrc-run
24 +# Copyright 1999-2016 Gentoo Foundation
25 # Distributed under the terms of the GNU General Public License v2
26 # $Id$
27
28
29 diff --git a/app-admin/gkrellm/gkrellm-2.3.5-r4.ebuild b/app-admin/gkrellm/gkrellm-2.3.5-r4.ebuild
30 new file mode 100644
31 index 0000000..ec86c03
32 --- /dev/null
33 +++ b/app-admin/gkrellm/gkrellm-2.3.5-r4.ebuild
34 @@ -0,0 +1,129 @@
35 +# Copyright 1999-2016 Gentoo Foundation
36 +# Distributed under the terms of the GNU General Public License v2
37 +# $Id$
38 +
39 +EAPI=5
40 +
41 +inherit eutils multilib user systemd toolchain-funcs
42 +
43 +DESCRIPTION="Single process stack of various system monitors"
44 +HOMEPAGE="http://www.gkrellm.net/"
45 +SRC_URI="http://members.dslextreme.com/users/billw/${PN}/${P}.tar.bz2"
46 +
47 +LICENSE="GPL-3"
48 +SLOT="2"
49 +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
50 +IUSE="gnutls hddtemp lm_sensors nls ntlm ssl kernel_FreeBSD X"
51 +
52 +RDEPEND="
53 + dev-libs/glib:2
54 + hddtemp? ( app-admin/hddtemp )
55 + gnutls? ( net-libs/gnutls )
56 + !gnutls? ( ssl? ( dev-libs/openssl:0= ) )
57 + lm_sensors? ( sys-apps/lm_sensors )
58 + nls? ( virtual/libintl )
59 + ntlm? ( net-libs/libntlm )
60 + X? (
61 + x11-libs/gtk+:2
62 + x11-libs/pango
63 + )"
64 +DEPEND="${RDEPEND}
65 + virtual/pkgconfig
66 + nls? ( sys-devel/gettext )"
67 +
68 +pkg_setup() {
69 + enewgroup gkrellmd
70 + enewuser gkrellmd -1 -1 -1 gkrellmd
71 + TARGET=
72 + use kernel_FreeBSD && TARGET="freebsd"
73 +}
74 +
75 +src_prepare() {
76 + sed -e 's:-O2 ::' \
77 + -e 's:override CC:CFLAGS:' \
78 + -e 's:-L/usr/X11R6/lib::' \
79 + -i */Makefile || die "sed Makefile(s) failed"
80 +
81 + sed -e "s:/usr/lib:${EPREFIX}/usr/$(get_libdir):" \
82 + -e "s:/usr/local/lib:${EPREFIX}/usr/local/$(get_libdir):" \
83 + -i src/${PN}.h || die "sed ${PN}.h failed"
84 +
85 + epatch \
86 + "${FILESDIR}"/${P}-autofs.patch \
87 + "${FILESDIR}"/${P}-cifs.patch \
88 + "${FILESDIR}"/${P}-dso.patch \
89 + "${FILESDIR}"/${P}-format-security.patch \
90 + "${FILESDIR}"/${P}-config.patch \
91 + "${FILESDIR}"/${P}-width.patch \
92 + "${FILESDIR}"/${P}-binding.patch \
93 + "${FILESDIR}"/${P}-sansfont.patch
94 +}
95 +
96 +src_compile() {
97 + if use X ; then
98 + local sslopt=""
99 + if use gnutls; then
100 + sslopt="without-ssl=yes"
101 + elif use ssl; then
102 + sslopt="without-gnutls=yes"
103 + else
104 + sslopt="without-ssl=yes without-gnutls=yes"
105 + fi
106 +
107 + emake \
108 + ${TARGET} \
109 + CC="$(tc-getCC)" \
110 + STRIP="" \
111 + INSTALLROOT="${EPREFIX}/usr" \
112 + INCLUDEDIR="${EPREFIX}/usr/include/gkrellm2" \
113 + LOCALEDIR="${EPREFIX}/usr/share/locale" \
114 + $(usex nls "" "enable_nls=0") \
115 + $(usex lm_sensors "" "without-libsensors=yes") \
116 + $(usex ntlm "" "without-ntlm=yes") \
117 + ${sslopt}
118 + else
119 + cd server || die
120 + emake \
121 + ${TARGET} \
122 + CC="$(tc-getCC)" \
123 + LINK_FLAGS="$LDFLAGS -Wl,-E" \
124 + STRIP="" \
125 + $(usex nls "" "enable_nls=0") \
126 + $(usex lm_sensors "" "without-libsensors=yes")
127 + fi
128 +}
129 +
130 +src_install() {
131 + if use X ; then
132 + emake \
133 + install${TARGET:+_}${TARGET} \
134 + $(usex nls "" "enable_nls=0") \
135 + STRIP="" \
136 + INSTALLDIR="${ED}/usr/bin" \
137 + INCLUDEDIR="${ED}/usr/include" \
138 + LOCALEDIR="${ED}/usr/share/locale" \
139 + PKGCONFIGDIR="${ED}/usr/$(get_libdir)/pkgconfig" \
140 + MANDIR="${ED}/usr/share/man/man1"
141 +
142 + dohtml *.html
143 +
144 + newicon src/icon.xpm ${PN}.xpm
145 + make_desktop_entry ${PN} GKrellM ${PN}
146 + else
147 + dobin server/gkrellmd
148 +
149 + insinto /usr/include/gkrellm2
150 + doins server/gkrellmd.h
151 + doins shared/log.h
152 + fi
153 +
154 + doinitd "${FILESDIR}"/gkrellmd
155 + newconfd "${FILESDIR}"/gkrellmd.conf gkrellmd
156 +
157 + systemd_dounit "${FILESDIR}"/gkrellmd.service
158 +
159 + insinto /etc
160 + doins server/gkrellmd.conf
161 +
162 + dodoc Changelog CREDITS README
163 +}