[gentoo-commits] repo/gentoo:master commit in: media-libs/libcaca/, media-libs/libcaca/files/

2021-05-22 Thread Andrew Savchenko
commit: 9e49df085dded48b58473bc2fd6347f8352f
Author: Andrew Savchenko  gentoo  org>
AuthorDate: Sat May 22 11:36:04 2021 +
Commit: Andrew Savchenko  gentoo  org>
CommitDate: Sat May 22 11:39:14 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e49df22

media-libs/libcaca: fix multiple CVEs and docs build failure

CVE fixed (using Debian patchset):
CVE-2018-20544, CVE-2018-20545, CVE-2018-20546,
CVE-2018-20547, CVE-2018-20549, CVE-2021-3410.

Fix docs build failure (doxygen and latex issues) using both Debian
patch and patch from bug 543870#c11.

Install docs into proper path.

Bug: https://bugs.gentoo.org/543870
Bug: https://bugs.gentoo.org/772317
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andrew Savchenko  gentoo.org>

 media-libs/libcaca/files/100_doxygen.diff  | 170 +++
 media-libs/libcaca/files/CVE-2018-20544.patch  |  45 +
 .../libcaca/files/CVE-2018-20545+20547+20549.patch |  34 
 .../libcaca/files/CVE-2018-20546+20547.patch   |  36 
 ...em-in-the-caca_resize-overflow-detection-.patch | 135 +++
 ...as-fix-an-integer-overflow-in-caca_resize.patch | 141 
 media-libs/libcaca/files/fix-css-path.patch|  12 ++
 media-libs/libcaca/libcaca-0.99_beta19-r4.ebuild   | 182 +
 8 files changed, 755 insertions(+)

diff --git a/media-libs/libcaca/files/100_doxygen.diff 
b/media-libs/libcaca/files/100_doxygen.diff
new file mode 100644
index 000..f537f37b6d3
--- /dev/null
+++ b/media-libs/libcaca/files/100_doxygen.diff
@@ -0,0 +1,170 @@
+Description: Don't mess with Doxygen's output
+Author: Balint Reczey 
+Index: libcaca-0.99.beta19/doc/Makefile.am
+===
+--- libcaca-0.99.beta19.orig/doc/Makefile.am
 libcaca-0.99.beta19/doc/Makefile.am
+@@ -28,10 +28,7 @@ stamp-latex: stamp-doxygen
+ if BUILD_DOCUMENTATION
+ if USE_LATEX
+   rm -f latex/libcaca.tex latex/libcaca.pdf
+-  mv latex/refman.tex latex/libcaca.tex
+-  sed 's/setlength{/renewcommand{/' latex/libcaca.tex \
+-| sed 's/.*usepackage.*times.*//' > latex/refman.tex
+-  cd latex && $(MAKE) $(AM_CFLAGS) refman.pdf || (cat refman.log; exit 1)
++  (cd latex &&  pdflatex refman ; makeindex refman.idx ; pdflatex refman 
; pdflatex refman ; pdflatex refman ; pdflatex refman ; pdflatex refman; echo 
"pdflatex exit code: $$?")
+   mv latex/refman.pdf latex/libcaca.pdf
+   touch stamp-latex
+ endif
+Index: libcaca-0.99.beta19/doc/doxygen.cfg.in
+===
+--- libcaca-0.99.beta19.orig/doc/doxygen.cfg.in
 libcaca-0.99.beta19/doc/doxygen.cfg.in
+@@ -1,4 +1,4 @@
+-# Doxyfile 1.8.6
++# Doxyfile 1.8.7
+ 
+ # This file describes the settings to be used by the documentation system
+ # doxygen (www.doxygen.org) for a project.
+@@ -70,6 +70,14 @@ OUTPUT_DIRECTORY   = .
+ 
+ CREATE_SUBDIRS = NO
+ 
++# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
++# characters to appear in the names of generated files. If set to NO, 
non-ASCII
++# characters will be escaped, for example _xE3_x81_x84 will be used for 
Unicode
++# U+3044.
++# The default value is: NO.
++
++ALLOW_UNICODE_NAMES= NO
++
+ # The OUTPUT_LANGUAGE tag is used to specify the language in which all
+ # documentation generated by doxygen is written. Doxygen will use this
+ # information to generate all constant output in the proper language.
+@@ -261,9 +269,12 @@ OPTIMIZE_OUTPUT_VHDL   = NO
+ # extension. Doxygen has a built-in mapping, but you can override or extend it
+ # using this tag. The format is ext=language, where ext is a file extension, 
and
+ # language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+-# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as 
C
+-# (default is Fortran), use: inc=Fortran f=C.
++# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
++# FortranFixed, free formatted Fortran: FortranFree, unknown formatted 
Fortran:
++# Fortran. In the later case the parser tries to guess whether the code is 
fixed
++# or free formatted code, this is the default for Fortran type files), VHDL. 
For
++# instance to make doxygen treat .inc files as Fortran files (default is PHP),
++# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+ #
+ # Note For files without extension you can use no_extension as a placeholder.
+ #
+@@ -1242,7 +1253,8 @@ GENERATE_CHI   = NO
+ CHM_INDEX_ENCODING =
+ 
+ # The BINARY_TOC flag controls whether a binary table of contents is 
generated (
+-# YES) or a normal table of contents ( NO) in the .chm file.
++# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
++# enables the Previous and Next buttons.
+ # The default 

[gentoo-commits] repo/gentoo:master commit in: media-libs/libcaca/, media-libs/libcaca/files/

2021-03-01 Thread Sam James
commit: 3fa25c71ca75f3f5353813553b61bd5c934dcad8
Author: Sam James  gentoo  org>
AuthorDate: Mon Mar  1 17:33:10 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Mar  1 17:33:38 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fa25c71

media-libs/libcaca: modernise ebuild, fix ncurses linkage

Closes: https://bugs.gentoo.org/601902
Signed-off-by: Sam James  gentoo.org>

 .../files/libcaca-0.99_beta18-fix-tests.patch  |  12 +-
 .../files/libcaca-0.99_beta18-latex_hacks.patch|   4 +-
 media-libs/libcaca/libcaca-0.99_beta19-r2.ebuild   | 167 +
 3 files changed, 175 insertions(+), 8 deletions(-)

diff --git a/media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch 
b/media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch
index f9ff8090c21..1bfb931a75a 100644
--- a/media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch
+++ b/media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch
@@ -1,13 +1,13 @@
 test/Makefile.am
-+++ test/Makefile.am
+--- a/test/Makefile.am
 b/test/Makefile.am
 @@ -1,3 +1,5 @@
 +AM_TESTS_ENVIRONMENT = \
 +  top_srcdir="$(top_srcdir)"
  
  AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/caca -I../caca
  
 test/check-copyright
-+++ test/check-copyright
+--- a/test/check-copyright
 b/test/check-copyright
 @@ -3,10 +3,11 @@
  #
  # Check that the copyright information is valid
@@ -30,8 +30,8 @@
echo "error: $dir/$x lacks proper copyright information"
nfails=$(($nfails + 1))
  elif [ -d ../.git ]; then
 test/check-source
-+++ test/check-source
+--- a/test/check-source
 b/test/check-source
 @@ -3,6 +3,7 @@
  #
  # Check that we have no tabs or trailing spaces in the source code

diff --git a/media-libs/libcaca/files/libcaca-0.99_beta18-latex_hacks.patch 
b/media-libs/libcaca/files/libcaca-0.99_beta18-latex_hacks.patch
index 060822e6dcc..15e17d2f95e 100644
--- a/media-libs/libcaca/files/libcaca-0.99_beta18-latex_hacks.patch
+++ b/media-libs/libcaca/files/libcaca-0.99_beta18-latex_hacks.patch
@@ -1,8 +1,8 @@
 Hack it a bit differently so that it works with texlive 2013, see 
http://bugs.gentoo.org/480862
 Turns out this patch is required also for texlive 2012, see 
http://bugs.gentoo.org/517474
 
 doc/Makefile.am
-+++ doc/Makefile.am
+--- a/doc/Makefile.am
 b/doc/Makefile.am
 @@ -29,7 +29,7 @@ if BUILD_DOCUMENTATION
  if USE_LATEX
rm -f latex/libcaca.tex latex/libcaca.pdf

diff --git a/media-libs/libcaca/libcaca-0.99_beta19-r2.ebuild 
b/media-libs/libcaca/libcaca-0.99_beta19-r2.ebuild
new file mode 100644
index 000..c1ec14de152
--- /dev/null
+++ b/media-libs/libcaca/libcaca-0.99_beta19-r2.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+RUBY_OPTIONAL=yes
+#USE_RUBY=ruby20
+
+inherit autotools ruby-ng flag-o-matic mono-env java-pkg-opt-2 
multilib-minimal toolchain-funcs
+
+MY_P=${P/_/.}
+DESCRIPTION="A library that creates colored ASCII-art graphics"
+HOMEPAGE="http://libcaca.zoy.org/;
+SRC_URI="http://libcaca.zoy.org/files/${PN}/${MY_P}.tar.gz;
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2 ISC LGPL-2.1 WTFPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc 
~x86"
+IUSE="cxx doc imlib java mono ncurses opengl ruby slang static-libs test 
truetype X"
+RESTRICT="!test? ( test )"
+
+# ruby? ( ruby_targets_${USE_RUBY} )
+REQUIRED_USE=""
+
+COMMON_DEPEND="imlib? ( >=media-libs/imlib2-1.4.6-r2[${MULTILIB_USEDEP}] )
+   mono? ( dev-lang/mono )
+   ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
+   opengl? (
+   >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+   >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+   >=media-libs/freeglut-2.8.1[${MULTILIB_USEDEP}]
+   truetype? ( >=media-libs/ftgl-2.1.3_rc5 )
+   )
+   slang? ( >=sys-libs/slang-2.2.4-r1[${MULTILIB_USEDEP}] )
+   X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] 
>=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )"
+#  ruby? (  $(ruby_implementations_depend) )
+RDEPEND="${COMMON_DEPEND}
+   java? ( >=virtual/jre-1.5 )"
+DEPEND="${COMMON_DEPEND}
+   virtual/pkgconfig
+   doc? (
+   app-doc/doxygen
+   virtual/latex-base
+   >=dev-texlive/texlive-fontsrecommended-2012
+   >=dev-texlive/texlive-latexextra-2012
+   dev-texlive/texlive-latexrecommended
+   )
+   java? ( >=virtual/jdk-1.5 )
+   test? ( dev-util/cppunit )"
+
+DOCS=( AUTHORS ChangeLog NEWS NOTES README THANKS )
+
+PATCHES=(
+   # Removed 'has_version '>=dev-texlive/texlive-latex-2013' &&' that 
prefixed this
+   # patch before wrt #517474
+   "${FILESDIR}"/${PN}-0.99_beta18-latex_hacks.patch
+   # Fix out of source tests
+"${FILESDIR}"/${PN}-0.99_beta18-fix-tests.patch
+)
+
+pkg_setup() {
+