Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libcaca/
Date: Fri, 09 Sep 2022 07:59:44
Message-Id: 1662710348.899d5b5e60fe55be227ca30d0267e54c7665e0c3.soap@gentoo
1 commit: 899d5b5e60fe55be227ca30d0267e54c7665e0c3
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 9 07:59:08 2022 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 9 07:59:08 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=899d5b5e
7
8 media-libs/libcaca: limit multilib features, drop masked java & mono support
9
10 No reverse dependencies need these.
11
12 Gist is:
13 ```
14 - $(use_enable slang)
15 - $(use_enable ncurses)
16 - $(use_enable X x11)
17 - $(use_with X x)
18 + $(multilib_native_use_enable slang)
19 + $(multilib_native_use_enable ncurses)
20 + $(multilib_native_use_enable X x11)
21 + $(multilib_native_use_with X x)
22 ```
23
24 Java and mono support in this package have been broken
25 for a long time, so hard-disable it.
26
27 Signed-off-by: Sam James <sam <AT> gentoo.org>
28 Signed-off-by: David Seifert <soap <AT> gentoo.org>
29
30 media-libs/libcaca/libcaca-0.99_beta19-r9.ebuild | 143 +++++++++++++++++++++++
31 1 file changed, 143 insertions(+)
32
33 diff --git a/media-libs/libcaca/libcaca-0.99_beta19-r9.ebuild b/media-libs/libcaca/libcaca-0.99_beta19-r9.ebuild
34 new file mode 100644
35 index 000000000000..29de0d6f6dee
36 --- /dev/null
37 +++ b/media-libs/libcaca/libcaca-0.99_beta19-r9.ebuild
38 @@ -0,0 +1,143 @@
39 +# Copyright 1999-2022 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=7
43 +
44 +RUBY_OPTIONAL=yes
45 +
46 +inherit autotools ruby-ng flag-o-matic toolchain-funcs multilib-minimal
47 +
48 +MY_P=${P/_/.}
49 +DESCRIPTION="A library that creates colored ASCII-art graphics"
50 +HOMEPAGE="http://libcaca.zoy.org/"
51 +SRC_URI="http://libcaca.zoy.org/files/${PN}/${MY_P}.tar.gz"
52 +S="${WORKDIR}/all/${MY_P}"
53 +
54 +LICENSE="GPL-2 ISC LGPL-2.1 WTFPL-2"
55 +SLOT="0"
56 +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
57 +IUSE="doc imlib ncurses opengl ruby slang static-libs test truetype X"
58 +RESTRICT="!test? ( test )"
59 +
60 +REQUIRED_USE=""
61 +
62 +DEPEND="
63 + imlib? ( >=media-libs/imlib2-1.4.6-r2[${MULTILIB_USEDEP}] )
64 + ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
65 + opengl? (
66 + >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
67 + >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
68 + >=media-libs/freeglut-2.8.1[${MULTILIB_USEDEP}]
69 + truetype? ( >=media-libs/ftgl-2.1.3_rc5 )
70 + )
71 + slang? ( >=sys-libs/slang-2.2.4-r1 )
72 + X? (
73 + >=x11-libs/libX11-1.6.2
74 + >=x11-libs/libXt-1.1.4
75 + )
76 +"
77 +BDEPEND="
78 + virtual/pkgconfig
79 + doc? (
80 + app-doc/doxygen
81 + virtual/latex-base
82 + >=dev-texlive/texlive-fontsrecommended-2012
83 + >=dev-texlive/texlive-latexextra-2012
84 + dev-texlive/texlive-latexrecommended
85 + )
86 + test? ( dev-util/cppunit )
87 +"
88 +
89 +DOCS=( AUTHORS ChangeLog NEWS NOTES README THANKS )
90 +
91 +PATCHES=(
92 + # Fix out of source tests
93 + "${FILESDIR}"/${PN}-0.99_beta18-fix-tests.patch
94 + # Debian patches
95 + "${FILESDIR}/CVE-2018-20544.patch"
96 + "${FILESDIR}/CVE-2018-20545+20547+20549.patch"
97 + "${FILESDIR}/CVE-2018-20546+20547.patch"
98 + "${FILESDIR}/canvas-fix-an-integer-overflow-in-caca_resize.patch"
99 + "${FILESDIR}/Fix-a-problem-in-the-caca_resize-overflow-detection-.patch"
100 + "${FILESDIR}/100_doxygen.diff"
101 + # Fix doxygen docs install, bug 543870
102 + "${FILESDIR}/fix-css-path.patch"
103 +)
104 +
105 +pkg_setup() {
106 + use ruby && ruby-ng_pkg_setup
107 +}
108 +
109 +src_prepare() {
110 + # bug #339962
111 + sed -i -e '/doxygen_tests = check-doxygen/d' test/Makefile.am || die
112 +
113 + sed -i \
114 + -e 's:-g -O2 -fno-strength-reduce -fomit-frame-pointer::' \
115 + -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
116 + configure.ac || die
117 +
118 + if ! use truetype; then
119 + sed -i -e '/PKG_CHECK_MODULES/s:ftgl:dIsAbLe&:' configure.ac || die
120 + fi
121 +
122 + if use imlib && ! use X; then
123 + append-cflags -DX_DISPLAY_MISSING
124 + fi
125 +
126 + # bug #653400
127 + append-cxxflags -std=c++11
128 +
129 + # bug #601902
130 + append-libs "$($(tc-getPKG_CONFIG) --libs ncurses)"
131 +
132 + # fix docs install path, bug 543870#c14
133 + sed -i "s/libcaca-dev/${PF}/g" doc/Makefile.am || die
134 +
135 + default
136 + eautoreconf
137 +}
138 +
139 +multilib_src_configure() {
140 + if multilib_is_native_abi; then
141 + # bug #44128
142 + export VARTEXFONTS="${T}/fonts"
143 +
144 + # bug #329651
145 + use ruby && use ruby_targets_${USE_RUBY} && export RUBY=$(ruby_implementation_command ${USE_RUBY})
146 + fi
147 +
148 + local myeconfargs=(
149 + $(use_enable static-libs static)
150 + $(multilib_native_use_enable slang)
151 + $(multilib_native_use_enable ncurses)
152 + $(multilib_native_use_enable X x11)
153 + $(multilib_native_use_with X x)
154 + --x-libraries=/usr/$(get_libdir)
155 + $(use_enable opengl gl)
156 + --enable-cxx
157 + $(use_enable imlib imlib2)
158 + $(use_enable test cppunit)
159 + --disable-java
160 + $(multilib_native_use_enable ruby)
161 + --disable-python
162 + --disable-csharp
163 + $(multilib_native_use_enable doc)
164 + )
165 +
166 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
167 +}
168 +
169 +multilib_src_compile() {
170 + emake V=1
171 +}
172 +
173 +multilib_src_test() {
174 + emake V=1 -j1 check
175 +}
176 +
177 +multilib_src_install_all() {
178 + einstalldocs
179 +
180 + find "${ED}" -name '*.la' -delete || die
181 +}