Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/cups/
Date: Wed, 17 Aug 2022 16:21:28
Message-Id: 1660753265.cbd44009158a80f5b2ab8e6d26338c67f8c3285e.mattst88@gentoo
1 commit: cbd44009158a80f5b2ab8e6d26338c67f8c3285e
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 17 13:44:55 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 17 16:21:05 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbd44009
7
8 net-print/cups: Drop old versions
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 net-print/cups/Manifest | 1 -
13 net-print/cups/cups-2.3.3_p2-r3.ebuild | 321 ---------------------------------
14 2 files changed, 322 deletions(-)
15
16 diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
17 index 9f36a740c252..1de361236b90 100644
18 --- a/net-print/cups/Manifest
19 +++ b/net-print/cups/Manifest
20 @@ -1,2 +1 @@
21 -DIST cups-2.3.3op2-source.tar.gz 7993205 BLAKE2B 8c115b91ec185a4820578561aaf681238280b22b5c68b68c484ffbd0fa3c4ec1beb4d426e3f0e33192e32bce78aa8b7f50ed6799732a467fa9e75c34787057ee SHA512 db27dd6fb616bd7ad895b2bdf4ea7b010501358a50dc8f2e7e29558d1cfc088a572b1b35ac512654d3ed410c84df87dc34ca636533a4499117253915d4763117
22 DIST cups-2.4.2-source.tar.gz 8128785 BLAKE2B 97053feb502d4fdc28810b806000b6c84a6795d5adcec0789e73e5477d5802d46a99381366d16219f627166df088f6decde5c144bd0c38b5745815dc1e426bc5 SHA512 07474643bffe11c79b3226b70d28f1bb803dc19daa10711938cea303feacdcce3945ba8ff0334d94fdd5922ea7d6bf37a28c1ea62cce8ce946c2f90a0faf002f
23
24 diff --git a/net-print/cups/cups-2.3.3_p2-r3.ebuild b/net-print/cups/cups-2.3.3_p2-r3.ebuild
25 deleted file mode 100644
26 index d9f24db198ce..000000000000
27 --- a/net-print/cups/cups-2.3.3_p2-r3.ebuild
28 +++ /dev/null
29 @@ -1,321 +0,0 @@
30 -# Copyright 1999-2022 Gentoo Authors
31 -# Distributed under the terms of the GNU General Public License v2
32 -
33 -EAPI=7
34 -
35 -inherit autotools flag-o-matic linux-info xdg multilib-minimal optfeature pam systemd toolchain-funcs
36 -
37 -MY_PV="${PV/_beta/b}"
38 -MY_PV="${MY_PV/_rc/rc}"
39 -MY_PV="${MY_PV/_p/op}"
40 -MY_P="${PN}-${MY_PV}"
41 -
42 -if [[ ${PV} == *9999 ]]; then
43 - inherit git-r3
44 -# EGIT_REPO_URI="https://github.com/apple/cups.git"
45 - EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
46 - [[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
47 -else
48 -# SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
49 - SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
50 - if [[ "${PV}" != *_beta* ]] && [[ "${PV}" != *_rc* ]] ; then
51 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
52 - fi
53 -fi
54 -
55 -DESCRIPTION="The Common Unix Printing System"
56 -HOMEPAGE="https://www.cups.org/ https://github.com/OpenPrinting/cups"
57 -
58 -LICENSE="Apache-2.0"
59 -SLOT="0"
60 -IUSE="acl dbus debug kerberos pam selinux +ssl static-libs systemd +threads usb X xinetd zeroconf"
61 -
62 -REQUIRED_USE="usb? ( threads )"
63 -# upstream includes an interactive test which is a nono for gentoo
64 -RESTRICT="test"
65 -
66 -BDEPEND="
67 - acct-group/lp
68 - acct-group/lpadmin
69 - virtual/pkgconfig
70 -"
71 -DEPEND="
72 - app-text/libpaper
73 - sys-libs/zlib
74 - acl? (
75 - kernel_linux? (
76 - sys-apps/acl
77 - sys-apps/attr
78 - )
79 - )
80 - dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
81 - kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
82 - pam? ( sys-libs/pam )
83 - !pam? ( virtual/libcrypt:= )
84 - ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] )
85 - systemd? ( sys-apps/systemd )
86 - usb? ( virtual/libusb:1 )
87 - X? ( x11-misc/xdg-utils )
88 - xinetd? ( sys-apps/xinetd )
89 - zeroconf? ( >=net-dns/avahi-0.6.31-r2[dbus,${MULTILIB_USEDEP}] )
90 -"
91 -RDEPEND="${DEPEND}
92 - acct-group/lp
93 - acct-group/lpadmin
94 - selinux? ( sec-policy/selinux-cups )
95 -"
96 -PDEPEND=">=net-print/cups-filters-1.0.43"
97 -
98 -PATCHES=(
99 - "${FILESDIR}/${PN}-2.2.6-fix-install-perms.patch"
100 - "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
101 - "${FILESDIR}/${PN}-2.3.3-user-AR.patch"
102 - # Upstream patches (from Debian and Fedora)
103 - "${FILESDIR}/${PN}-2.3.3-timeout.patch"
104 - "${FILESDIR}/${PN}-2.3.3-enforcing-read-limits.patch"
105 - "${FILESDIR}/${PN}-2.3.3-manpage.patch"
106 - "${FILESDIR}/${PN}-2.3.3-ipp-retry-validate.patch"
107 -)
108 -
109 -MULTILIB_CHOST_TOOLS=(
110 - /usr/bin/cups-config
111 -)
112 -
113 -S="${WORKDIR}/${MY_P}"
114 -
115 -pkg_setup() {
116 - if use kernel_linux; then
117 - linux-info_pkg_setup
118 - if ! linux_config_exists; then
119 - ewarn "Can't check the linux kernel configuration."
120 - ewarn "You might have some incompatible options enabled."
121 - else
122 - # recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug 501122)
123 - if use usb; then
124 - if linux_chkconfig_present USB_PRINTER; then
125 - elog "Your USB printers will be managed via libusb. In case you run into problems, "
126 - elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
127 - elog "usblp kernel module."
128 - elog "Alternatively, just disable the usb useflag for cups (your printer will still work)."
129 - fi
130 - else
131 - #here we should warn user that he should enable it so he can print
132 - if ! linux_chkconfig_present USB_PRINTER; then
133 - ewarn "If you plan to use USB printers you should enable the USB_PRINTER"
134 - ewarn "support in your kernel."
135 - ewarn "Please enable it:"
136 - ewarn " CONFIG_USB_PRINTER=y"
137 - ewarn "in /usr/src/linux/.config or"
138 - ewarn " Device Drivers --->"
139 - ewarn " USB support --->"
140 - ewarn " [*] USB Printer support"
141 - ewarn "Alternatively, enable the usb useflag for cups and use the libusb code."
142 - fi
143 - fi
144 - fi
145 - fi
146 -}
147 -
148 -src_prepare() {
149 - default
150 -
151 - # Remove ".SILENT" rule for verbose output (bug 524338).
152 - sed 's#^.SILENT:##g' -i Makedefs.in || die
153 -
154 - # Fix install-sh, posix sh does not have 'function'.
155 - sed 's#function gzipcp#gzipcp()#g' -i install-sh || die
156 -
157 - # Do not add -Werror even for live ebuilds
158 - sed '/WARNING_OPTIONS/s@-Werror@@' \
159 - -i config-scripts/cups-compiler.m4 || die
160 -
161 - AT_M4DIR=config-scripts eaclocal
162 - eautoconf
163 -
164 - # custom Makefiles
165 - multilib_copy_sources
166 -}
167 -
168 -multilib_src_configure() {
169 - export DSOFLAGS="${LDFLAGS}"
170 -
171 - # explicitly specify compiler wrt bug 524340
172 - #
173 - # need to override KRB5CONFIG for proper flags
174 - # https://github.com/apple/cups/issues/4423
175 - local myeconfargs=(
176 - CC="$(tc-getCC)"
177 - CXX="$(tc-getCXX)"
178 - KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
179 - --libdir="${EPREFIX}"/usr/$(get_libdir)
180 - --localstatedir="${EPREFIX}"/var
181 - --with-exe-file-perm=755
182 - --with-rundir="${EPREFIX}"/run/cups
183 - --with-cups-user=lp
184 - --with-cups-group=lp
185 - --with-docdir="${EPREFIX}"/usr/share/cups/html
186 - --with-system-groups=lpadmin
187 - --with-xinetd="${EPREFIX}"/etc/xinetd.d
188 - $(multilib_native_use_enable acl)
189 - $(use_enable dbus)
190 - $(use_enable debug)
191 - $(use_enable debug debug-guards)
192 - $(use_enable debug debug-printfs)
193 - $(use_enable kerberos gssapi)
194 - $(multilib_native_use_enable pam)
195 - $(use_enable static-libs static)
196 - $(use_enable threads)
197 - $(use_enable ssl gnutls)
198 - $(use_enable systemd)
199 - $(multilib_native_use_enable usb libusb)
200 - $(use_enable zeroconf avahi)
201 - --disable-dnssd
202 - $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper)
203 - )
204 -
205 - # Handle empty LINGUAS properly, bug #771162
206 - if [ -n "${LINGUAS+x}" ] ; then
207 - myeconfargs+=(
208 - --with-languages="${LINGUAS}"
209 - )
210 - fi
211 -
212 - if tc-is-static-only; then
213 - myeconfargs+=(
214 - --disable-shared
215 - )
216 - fi
217 -
218 - # install in /usr/libexec always, instead of using /usr/lib/cups, as that
219 - # makes more sense when facing multilib support.
220 - sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
221 -
222 - econf "${myeconfargs[@]}"
223 -
224 - sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
225 - sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
226 - sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
227 -
228 - # additional path corrections needed for prefix, see bug 597728
229 - sed \
230 - -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
231 - -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
232 - -e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \
233 - -e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \
234 - -i Makedefs || die
235 -}
236 -
237 -multilib_src_compile() {
238 - if multilib_is_native_abi; then
239 - default
240 - else
241 - emake libs
242 - fi
243 -}
244 -
245 -multilib_src_test() {
246 - multilib_is_native_abi && default
247 -}
248 -
249 -multilib_src_install() {
250 - if multilib_is_native_abi; then
251 - emake BUILDROOT="${D}" install
252 - else
253 - emake BUILDROOT="${D}" install-libs install-headers
254 - dobin cups-config
255 - fi
256 -}
257 -
258 -multilib_src_install_all() {
259 - dodoc {CHANGES,CREDITS,README}.md
260 -
261 - # move the default config file to docs
262 - dodoc "${ED}"/etc/cups/cupsd.conf.default
263 - rm "${ED}"/etc/cups/cupsd.conf.default || die
264 -
265 - # clean out cups init scripts
266 - rm -r "${ED}"/etc/{init.d/cups,rc*} || die
267 -
268 - # install our init script
269 - local neededservices=(
270 - $(usex zeroconf avahi-daemon '')
271 - $(usex dbus dbus '')
272 - )
273 - [[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}"
274 - cp "${FILESDIR}"/cupsd.init.d-r4 "${T}"/cupsd || die
275 - sed -i -e "s/@neededservices@/${neededservices}/" "${T}"/cupsd || die
276 - doinitd "${T}"/cupsd
277 -
278 - if use pam ; then
279 - rm "${ED}"/etc/pam.d/${PN} || die
280 - pamd_mimic_system cups auth account
281 - fi
282 -
283 - if use xinetd ; then
284 - # correct path
285 - sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
286 - "${ED}"/etc/xinetd.d/cups-lpd || die
287 - # it is safer to disable this by default, bug #137130
288 - grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \
289 - { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; }
290 - # write permission for file owner (root), bug #296221
291 - fperms u+w /etc/xinetd.d/cups-lpd
292 - else
293 - # always configure with --with-xinetd= and clean up later,
294 - # bug #525604
295 - rm -r "${ED}"/etc/xinetd.d || die
296 - fi
297 -
298 - keepdir /etc/cups/{interfaces,ppd,ssl}
299 -
300 - if ! use X ; then
301 - rm -r "${ED}"/usr/share/applications || die
302 - fi
303 -
304 - # create /etc/cups/client.conf, bug #196967 and #266678
305 - echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
306 -
307 - # the following file is now provided by cups-filters:
308 - rm -r "${ED}"/usr/share/cups/banners || die
309 -
310 - # the following are created by the init script
311 - rm -r "${ED}"/var/cache || die
312 - rm -r "${ED}"/run || die
313 -
314 - keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} /var/log/cups /var/spool/cups/tmp
315 -}
316 -
317 -pkg_preinst() {
318 - xdg_pkg_preinst
319 -}
320 -
321 -pkg_postinst() {
322 - # Update desktop file database and gtk icon cache (bug 370059)
323 - xdg_pkg_postinst
324 -
325 - local v
326 -
327 - for v in ${REPLACING_VERSIONS}; do
328 - if ! ver_test ${v} -ge 2.2.2-r2 ; then
329 - ewarn "The cupsd init script switched to using pidfiles. Shutting down"
330 - ewarn "cupsd will fail the next time. To fix this, please run once as root"
331 - ewarn " killall cupsd ; /etc/init.d/cupsd zap ; /etc/init.d/cupsd start"
332 - break
333 - fi
334 - done
335 -
336 - for v in ${REPLACING_VERSIONS}; do
337 - elog
338 - elog "For information about installing a printer and general cups setup"
339 - elog "take a look at: https://wiki.gentoo.org/wiki/Printing"
340 - break
341 - done
342 -
343 - optfeature_header "CUPS may need installing the following for certain features to work:"
344 - use zeroconf && optfeature "local hostname resolution using a hostname.local naming scheme" sys-auth/nss-mdns
345 -}
346 -
347 -pkg_postrm() {
348 - # Update desktop file database and gtk icon cache (bug 370059)
349 - xdg_pkg_postrm
350 -}