Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/pspp/, sci-mathematics/pspp/files/
Date: Sun, 01 Jan 2023 14:30:31
Message-Id: 1672583226.1542309301fd9e3f4e35c8685ef956b6f9f58377.mjo@gentoo
1 commit: 1542309301fd9e3f4e35c8685ef956b6f9f58377
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 31 16:52:55 2022 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 1 14:27:06 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15423093
7
8 sci-mathematics/pspp: new revision to fix a few security and QA issues.
9
10 We fix CVE-2022-39831 and CVE-2022-39832 the same way upstream did, by
11 refusing to install the vulnerable program (which was mainly only used
12 for debugging anyway). We now also use a more accurate LICENSE, and add
13 a patch to fix underlinking visible with lld/mold.
14
15 Bug: https://bugs.gentoo.org/868618
16 Closes: https://bugs.gentoo.org/732048
17 Closes: https://bugs.gentoo.org/877751
18 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
19
20 .../pspp/files/pspp-1.6.2-underlinking.patch | 27 +++++++
21 sci-mathematics/pspp/pspp-1.6.2-r2.ebuild | 88 ++++++++++++++++++++++
22 2 files changed, 115 insertions(+)
23
24 diff --git a/sci-mathematics/pspp/files/pspp-1.6.2-underlinking.patch b/sci-mathematics/pspp/files/pspp-1.6.2-underlinking.patch
25 new file mode 100644
26 index 000000000000..c4f3672d6716
27 --- /dev/null
28 +++ b/sci-mathematics/pspp/files/pspp-1.6.2-underlinking.patch
29 @@ -0,0 +1,27 @@
30 +From 27f3d4cf2a92a91c078e54d9e67af441df140edc Mon Sep 17 00:00:00 2001
31 +From: Michael Orlitzky <michael@××××××××.com>
32 +Date: Sat, 31 Dec 2022 22:08:11 -0500
33 +Subject: [PATCH 1/1] Makefile.in: fix underlinking of liboutput.
34 +
35 +This library uses cairo/pango, and needs to be linked with $CAIRO_LIBS
36 +when using --as-needed and a linker that knows what it's doing.
37 +---
38 + Makefile.in | 2 +-
39 + 1 file changed, 1 insertion(+), 1 deletion(-)
40 +
41 +diff --git a/Makefile.in b/Makefile.in
42 +index d836b65..217798c 100644
43 +--- a/Makefile.in
44 ++++ b/Makefile.in
45 +@@ -1837,7 +1837,7 @@ am_src_math_libpspp_math_la_OBJECTS = src/math/chart-geometry.lo \
46 + src/math/wilcoxon-sig.lo
47 + src_math_libpspp_math_la_OBJECTS = \
48 + $(am_src_math_libpspp_math_la_OBJECTS)
49 +-src_output_liboutput_la_LIBADD =
50 ++src_output_liboutput_la_LIBADD = $(CAIRO_LIBS)
51 + am_src_output_liboutput_la_OBJECTS = src/output/liboutput_la-ascii.lo \
52 + src/output/liboutput_la-cairo-chart.lo \
53 + src/output/liboutput_la-cairo-fsm.lo \
54 +--
55 +2.38.2
56 +
57
58 diff --git a/sci-mathematics/pspp/pspp-1.6.2-r2.ebuild b/sci-mathematics/pspp/pspp-1.6.2-r2.ebuild
59 new file mode 100644
60 index 000000000000..c6a645b2be9d
61 --- /dev/null
62 +++ b/sci-mathematics/pspp/pspp-1.6.2-r2.ebuild
63 @@ -0,0 +1,88 @@
64 +# Copyright 1999-2023 Gentoo Authors
65 +# Distributed under the terms of the GNU General Public License v2
66 +
67 +EAPI=8
68 +
69 +PYTHON_COMPAT=( python3_{8..11} )
70 +
71 +inherit python-any-r1 xdg
72 +
73 +DESCRIPTION="Program for statistical analysis of sampled data"
74 +HOMEPAGE="https://www.gnu.org/software/pspp/pspp.html"
75 +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
76 +
77 +LICENSE="GPL-3+ FDL-1.3+"
78 +SLOT="0/${PV}"
79 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
80 +IUSE="doc examples gtk ncurses nls perl postgres"
81 +
82 +RDEPEND="
83 + dev-libs/libxml2:2
84 + sci-libs/gsl:0=
85 + sys-devel/gettext
86 + sys-libs/ncurses:0=
87 + sys-libs/readline:0=
88 + sys-libs/zlib
89 + virtual/libiconv
90 + x11-libs/cairo[svg(+)]
91 + x11-libs/pango
92 + gtk? (
93 + dev-util/glib-utils
94 + x11-libs/gtk+:3
95 + x11-libs/gtksourceview:4=
96 + >=x11-libs/spread-sheet-widget-0.7
97 + )
98 + postgres? ( dev-db/postgresql:=[server] )"
99 +DEPEND="${RDEPEND}"
100 +BDEPEND="
101 + ${PYTHON_DEPS}
102 + sys-devel/gettext
103 + virtual/pkgconfig
104 + doc? ( virtual/latex-base )"
105 +
106 +PATCHES=( "${FILESDIR}/pspp-1.6.2-underlinking.patch" )
107 +
108 +pkg_pretend() {
109 + ewarn "Starting with pspp-1.4.0 the pspp-mode emacs package is no longer"
110 + ewarn "shipped with pspp itself, and should instead be fetched from ELPA:"
111 + ewarn "https://elpa.gnu.org/packages/pspp-mode.html"
112 +}
113 +
114 +src_prepare() {
115 + default
116 +
117 + sed -i '/appdata$/s/appdata$/metainfo/' Makefile.in || die
118 +}
119 +
120 +src_configure() {
121 + econf \
122 + $(use_enable nls) \
123 + $(use_with gtk gui) \
124 + $(use_with perl perl-module) \
125 + $(use_with postgres libpq)
126 +}
127 +
128 +src_compile() {
129 + default
130 +
131 + if use doc; then
132 + emake html pdf
133 + HTML_DOCS=( doc/pspp{,-dev}.html )
134 + fi
135 +}
136 +
137 +src_install() {
138 + default
139 +
140 + # Mimic the upstream fix for bug 868618. Obsolete when v1.6.3 is
141 + # released.
142 + rm "${ED}/usr/bin/pspp-dump-sav" || die
143 +
144 + use doc && dodoc doc/pspp{,-dev}.pdf
145 + if use examples; then
146 + dodoc -r examples
147 + docompress -x /usr/share/doc/${PF}/examples
148 + fi
149 +
150 + find "${ED}" -name '*.la' -type f -delete || die
151 +}