Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/cups/
Date: Sat, 28 May 2022 04:57:26
Message-Id: 1653713778.02e55008b4808689eb038d5797c1bddb890a9efb.sam@gentoo
1 commit: 02e55008b4808689eb038d5797c1bddb890a9efb
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 28 04:54:59 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat May 28 04:56:18 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02e55008
7
8 net-print/cups: add openssl support
9
10 Bug: https://bugs.gentoo.org/847625
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../{cups-2.4.2.ebuild => cups-2.4.2-r1.ebuild} | 28 +++++++++++++++-------
14 net-print/cups/cups-9999.ebuild | 28 +++++++++++++++-------
15 net-print/cups/metadata.xml | 19 ++++++++-------
16 3 files changed, 51 insertions(+), 24 deletions(-)
17
18 diff --git a/net-print/cups/cups-2.4.2.ebuild b/net-print/cups/cups-2.4.2-r1.ebuild
19 similarity index 91%
20 rename from net-print/cups/cups-2.4.2.ebuild
21 rename to net-print/cups/cups-2.4.2-r1.ebuild
22 index 11e9e6c732a6..8583dd21407e 100644
23 --- a/net-print/cups/cups-2.4.2.ebuild
24 +++ b/net-print/cups/cups-2.4.2-r1.ebuild
25 @@ -10,13 +10,11 @@ MY_PV="${MY_PV/_rc/rc}"
26 MY_PV="${MY_PV/_p/op}"
27 MY_P="${PN}-${MY_PV}"
28
29 -if [[ ${PV} == *9999 ]]; then
30 +if [[ ${PV} == *9999 ]] ; then
31 inherit git-r3
32 - #EGIT_REPO_URI="https://github.com/apple/cups.git"
33 EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
34 [[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
35 else
36 - #SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
37 SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
38 if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
39 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
40 @@ -28,10 +26,11 @@ HOMEPAGE="https://www.cups.org/ https://github.com/OpenPrinting/cups"
41
42 LICENSE="Apache-2.0"
43 SLOT="0"
44 -IUSE="acl dbus debug kerberos pam selinux +ssl static-libs systemd usb X xinetd zeroconf"
45 +IUSE="acl dbus debug kerberos openssl pam selinux +ssl static-libs systemd test usb X xinetd zeroconf"
46
47 -# Upstream includes an interactive test which is a nono for Gentoo
48 -RESTRICT="test"
49 +# As of 2.4.2, they don't actually seem to be interactive (they pass some flags
50 +# by default to input for us), but they fail on some greyscale issue w/ poppler?
51 +RESTRICT="!test? ( test ) test"
52
53 BDEPEND="
54 acct-group/lp
55 @@ -51,7 +50,10 @@ DEPEND="
56 kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
57 pam? ( sys-libs/pam )
58 !pam? ( virtual/libcrypt:= )
59 - ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] )
60 + ssl? (
61 + !openssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] )
62 + openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
63 + )
64 systemd? ( sys-apps/systemd )
65 usb? ( virtual/libusb:1 )
66 X? ( x11-misc/xdg-utils )
67 @@ -145,6 +147,7 @@ multilib_src_configure() {
68 --enable-sync-on-close
69 #
70 --with-rundir="${EPREFIX}"/run/cups
71 + --with-pkgconfpath="${EPREFIX}"/usr/$(get_libdir)/pkgconfig
72 --with-cups-user=lp
73 --with-cups-group=lp
74 --with-docdir="${EPREFIX}"/usr/share/cups/html
75 @@ -158,7 +161,10 @@ multilib_src_configure() {
76 $(use_enable kerberos gssapi)
77 $(multilib_native_use_enable pam)
78 $(use_enable static-libs static)
79 - $(use_with ssl tls gnutls)
80 + $(use_enable test unit-tests)
81 + # USE="ssl" => gnutls
82 + # USE="ssl openssl" => openssl
83 + $(use_with ssl tls $(usex openssl openssl gnutls))
84 $(use_with systemd ondemand systemd)
85 $(multilib_native_use_enable usb libusb)
86 $(use_with zeroconf dnssd avahi)
87 @@ -206,6 +212,12 @@ multilib_src_compile() {
88 }
89
90 multilib_src_test() {
91 + # Avoid using /tmp
92 + export CUPS_TESTBASE="${T}"/cups-tests
93 +
94 + mkdir "${T}"/cups-tests || die
95 +
96 + # We only build some of CUPS for multilib, so can't run the tests.
97 multilib_is_native_abi && default
98 }
99
100
101 diff --git a/net-print/cups/cups-9999.ebuild b/net-print/cups/cups-9999.ebuild
102 index 11e9e6c732a6..8583dd21407e 100644
103 --- a/net-print/cups/cups-9999.ebuild
104 +++ b/net-print/cups/cups-9999.ebuild
105 @@ -10,13 +10,11 @@ MY_PV="${MY_PV/_rc/rc}"
106 MY_PV="${MY_PV/_p/op}"
107 MY_P="${PN}-${MY_PV}"
108
109 -if [[ ${PV} == *9999 ]]; then
110 +if [[ ${PV} == *9999 ]] ; then
111 inherit git-r3
112 - #EGIT_REPO_URI="https://github.com/apple/cups.git"
113 EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
114 [[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
115 else
116 - #SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
117 SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
118 if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
119 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
120 @@ -28,10 +26,11 @@ HOMEPAGE="https://www.cups.org/ https://github.com/OpenPrinting/cups"
121
122 LICENSE="Apache-2.0"
123 SLOT="0"
124 -IUSE="acl dbus debug kerberos pam selinux +ssl static-libs systemd usb X xinetd zeroconf"
125 +IUSE="acl dbus debug kerberos openssl pam selinux +ssl static-libs systemd test usb X xinetd zeroconf"
126
127 -# Upstream includes an interactive test which is a nono for Gentoo
128 -RESTRICT="test"
129 +# As of 2.4.2, they don't actually seem to be interactive (they pass some flags
130 +# by default to input for us), but they fail on some greyscale issue w/ poppler?
131 +RESTRICT="!test? ( test ) test"
132
133 BDEPEND="
134 acct-group/lp
135 @@ -51,7 +50,10 @@ DEPEND="
136 kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
137 pam? ( sys-libs/pam )
138 !pam? ( virtual/libcrypt:= )
139 - ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] )
140 + ssl? (
141 + !openssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] )
142 + openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
143 + )
144 systemd? ( sys-apps/systemd )
145 usb? ( virtual/libusb:1 )
146 X? ( x11-misc/xdg-utils )
147 @@ -145,6 +147,7 @@ multilib_src_configure() {
148 --enable-sync-on-close
149 #
150 --with-rundir="${EPREFIX}"/run/cups
151 + --with-pkgconfpath="${EPREFIX}"/usr/$(get_libdir)/pkgconfig
152 --with-cups-user=lp
153 --with-cups-group=lp
154 --with-docdir="${EPREFIX}"/usr/share/cups/html
155 @@ -158,7 +161,10 @@ multilib_src_configure() {
156 $(use_enable kerberos gssapi)
157 $(multilib_native_use_enable pam)
158 $(use_enable static-libs static)
159 - $(use_with ssl tls gnutls)
160 + $(use_enable test unit-tests)
161 + # USE="ssl" => gnutls
162 + # USE="ssl openssl" => openssl
163 + $(use_with ssl tls $(usex openssl openssl gnutls))
164 $(use_with systemd ondemand systemd)
165 $(multilib_native_use_enable usb libusb)
166 $(use_with zeroconf dnssd avahi)
167 @@ -206,6 +212,12 @@ multilib_src_compile() {
168 }
169
170 multilib_src_test() {
171 + # Avoid using /tmp
172 + export CUPS_TESTBASE="${T}"/cups-tests
173 +
174 + mkdir "${T}"/cups-tests || die
175 +
176 + # We only build some of CUPS for multilib, so can't run the tests.
177 multilib_is_native_abi && default
178 }
179
180
181 diff --git a/net-print/cups/metadata.xml b/net-print/cups/metadata.xml
182 index b938d1f561a9..92c73dd18d5d 100644
183 --- a/net-print/cups/metadata.xml
184 +++ b/net-print/cups/metadata.xml
185 @@ -1,12 +1,15 @@
186 <?xml version="1.0" encoding="UTF-8"?>
187 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
188 <pkgmetadata>
189 - <maintainer type="project">
190 - <email>printing@g.o</email>
191 - <name>Gentoo Printing Project</name>
192 - </maintainer>
193 - <upstream>
194 - <remote-id type="cpe">cpe:/a:apple:cups</remote-id>
195 - <remote-id type="github">apple/cups</remote-id>
196 - </upstream>
197 + <maintainer type="project">
198 + <email>printing@g.o</email>
199 + <name>Gentoo Printing Project</name>
200 + </maintainer>
201 + <use>
202 + <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> instead of <pkg>net-libs/gnutls</pkg> for TLS support</flag>
203 + </use>
204 + <upstream>
205 + <remote-id type="cpe">cpe:/a:apple:cups</remote-id>
206 + <remote-id type="github">apple/cups</remote-id>
207 + </upstream>
208 </pkgmetadata>