1 |
commit: 67821b27fe794c645040025594950eac26fd9e3c |
2 |
Author: Yu Gu <guyu2876 <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Feb 27 13:29:01 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 27 22:30:28 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67821b27 |
7 |
|
8 |
net-print/cups-filters: fix compile failure |
9 |
|
10 |
/usr/include/qpdf/QPDFWriter.hh:560:32: error: ‘std::string_view’ has not been declared |
11 |
std::string_view was introduced in c++17, and the ebuild was compiled with c++11, so the error occurs. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/898156 |
14 |
Signed-off-by: Yu Gu <guyu2876 <AT> gmail.com> |
15 |
Closes: https://github.com/gentoo/gentoo/pull/29831 |
16 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
17 |
|
18 |
.../cups-filters/cups-filters-1.28.17-r1.ebuild | 145 +++++++++++++++++++++ |
19 |
1 file changed, 145 insertions(+) |
20 |
|
21 |
diff --git a/net-print/cups-filters/cups-filters-1.28.17-r1.ebuild b/net-print/cups-filters/cups-filters-1.28.17-r1.ebuild |
22 |
new file mode 100644 |
23 |
index 000000000000..2e2bbd3cef13 |
24 |
--- /dev/null |
25 |
+++ b/net-print/cups-filters/cups-filters-1.28.17-r1.ebuild |
26 |
@@ -0,0 +1,145 @@ |
27 |
+# Copyright 1999-2023 Gentoo Authors |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+ |
30 |
+EAPI=8 |
31 |
+ |
32 |
+GENTOO_DEPEND_ON_PERL=no |
33 |
+inherit perl-module systemd flag-o-matic |
34 |
+ |
35 |
+DESCRIPTION="Cups filters" |
36 |
+HOMEPAGE="https://wiki.linuxfoundation.org/openprinting/cups-filters" |
37 |
+SRC_URI=" |
38 |
+ https://github.com/OpenPrinting/cups-filters/releases/download/${PV}/${P}.tar.xz |
39 |
+ https://www.openprinting.org/download/${PN}/${P}.tar.xz |
40 |
+" |
41 |
+ |
42 |
+LICENSE="MIT GPL-2" |
43 |
+SLOT="0" |
44 |
+IUSE="dbus exif +foomatic jpeg ldap pclm pdf perl png +postscript test tiff zeroconf" |
45 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
46 |
+ |
47 |
+RESTRICT="!test? ( test )" |
48 |
+ |
49 |
+RDEPEND=" |
50 |
+ >=app-text/poppler-0.32[cxx,jpeg?,lcms,tiff?,utils] |
51 |
+ >=app-text/qpdf-8.3.0:= |
52 |
+ dev-libs/glib:2 |
53 |
+ media-libs/fontconfig |
54 |
+ media-libs/freetype:2 |
55 |
+ media-libs/lcms:2 |
56 |
+ >=net-print/cups-1.7.3 |
57 |
+ !<=net-print/cups-1.5.9999 |
58 |
+ sys-devel/bc |
59 |
+ sys-libs/zlib |
60 |
+ exif? ( media-libs/libexif ) |
61 |
+ dbus? ( sys-apps/dbus ) |
62 |
+ foomatic? ( !net-print/foomatic-filters ) |
63 |
+ jpeg? ( media-libs/libjpeg-turbo:= ) |
64 |
+ ldap? ( net-nds/openldap:= ) |
65 |
+ pdf? ( app-text/mupdf:= ) |
66 |
+ perl? ( dev-lang/perl:= ) |
67 |
+ png? ( media-libs/libpng:= ) |
68 |
+ postscript? ( >=app-text/ghostscript-gpl-9.09[cups] ) |
69 |
+ tiff? ( media-libs/tiff:= ) |
70 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
71 |
+" |
72 |
+DEPEND="${RDEPEND}" |
73 |
+BDEPEND=" |
74 |
+ dev-util/gdbus-codegen |
75 |
+ >=sys-devel/gettext-0.18.3 |
76 |
+ virtual/pkgconfig |
77 |
+ test? ( media-fonts/dejavu ) |
78 |
+" |
79 |
+ |
80 |
+src_configure() { |
81 |
+ # Bug #898156 |
82 |
+ append-cxxflags -std=c++17 |
83 |
+ |
84 |
+ local myeconfargs=( |
85 |
+ --enable-imagefilters |
86 |
+ --localstatedir="${EPREFIX}"/var |
87 |
+ --with-browseremoteprotocols=DNSSD,CUPS |
88 |
+ --with-cups-rundir="${EPREFIX}"/run/cups |
89 |
+ --with-fontdir="fonts/conf.avail" |
90 |
+ --with-pdftops=pdftops |
91 |
+ --with-rcdir=no |
92 |
+ --without-php |
93 |
+ |
94 |
+ $(use_enable exif) |
95 |
+ $(use_enable dbus) |
96 |
+ $(use_enable foomatic) |
97 |
+ $(use_enable ldap) |
98 |
+ $(use_enable pclm) |
99 |
+ $(use_enable pdf mutool) |
100 |
+ $(use_enable postscript ghostscript) |
101 |
+ $(use_enable zeroconf avahi) |
102 |
+ $(use_with jpeg) |
103 |
+ $(use_with png) |
104 |
+ $(use_with tiff) |
105 |
+ ) |
106 |
+ |
107 |
+ econf "${myeconfargs[@]}" |
108 |
+ |
109 |
+ if use perl; then |
110 |
+ pushd "${S}"/scripting/perl > /dev/null || die |
111 |
+ perl-module_src_configure |
112 |
+ popd > /dev/null || die |
113 |
+ fi |
114 |
+} |
115 |
+ |
116 |
+src_compile() { |
117 |
+ default |
118 |
+ |
119 |
+ if use perl; then |
120 |
+ pushd "${S}"/scripting/perl > /dev/null || die |
121 |
+ perl-module_src_compile |
122 |
+ popd > /dev/null || die |
123 |
+ fi |
124 |
+} |
125 |
+ |
126 |
+src_test() { |
127 |
+ # Avoid perl-module_src_test |
128 |
+ default |
129 |
+ |
130 |
+ if use perl; then |
131 |
+ pushd "${S}/scripting/perl" > /dev/null || die |
132 |
+ perl-module_src_test |
133 |
+ popd > /dev/null || die |
134 |
+ fi |
135 |
+} |
136 |
+ |
137 |
+src_install() { |
138 |
+ default |
139 |
+ |
140 |
+ if use perl; then |
141 |
+ pushd "${S}"/scripting/perl > /dev/null || die |
142 |
+ perl-module_src_install |
143 |
+ perl_delete_localpod |
144 |
+ popd > /dev/null || die |
145 |
+ fi |
146 |
+ |
147 |
+ if use postscript; then |
148 |
+ # workaround: some printer drivers still require pstoraster and pstopxl, bug #383831 |
149 |
+ dosym gstoraster /usr/libexec/cups/filter/pstoraster |
150 |
+ dosym gstopxl /usr/libexec/cups/filter/pstopxl |
151 |
+ fi |
152 |
+ |
153 |
+ find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die |
154 |
+ |
155 |
+ cp "${FILESDIR}"/cups-browsed.init.d-r2 "${T}"/cups-browsed || die |
156 |
+ |
157 |
+ if ! use zeroconf ; then |
158 |
+ sed -i -e 's:need cupsd avahi-daemon:need cupsd:g' "${T}"/cups-browsed || die |
159 |
+ sed -i -e 's:cups\.service avahi-daemon\.service:cups.service:g' "${S}"/utils/cups-browsed.service || die |
160 |
+ fi |
161 |
+ |
162 |
+ doinitd "${T}"/cups-browsed |
163 |
+ systemd_dounit "${S}"/utils/cups-browsed.service |
164 |
+} |
165 |
+ |
166 |
+pkg_postinst() { |
167 |
+ if ! use foomatic ; then |
168 |
+ ewarn "You are disabling the foomatic code in cups-filters. Please do that ONLY if absolutely" |
169 |
+ ewarn "necessary. net-print/foomatic-filters as a replacement is deprecated and unmaintained." |
170 |
+ fi |
171 |
+} |