Compare commits
No commits in common. "rawhide" and "f35" have entirely different histories.
@ -1,38 +0,0 @@
|
||||
From d33a9ca2b7e9f32483c1aee4c3944c56206d456b Mon Sep 17 00:00:00 2001
|
||||
From: Josef Moellers <jmoellers@suse.de>
|
||||
Date: Fri, 18 Mar 2022 11:52:22 +0100
|
||||
Subject: [PATCH] Prevent a divide-by-zero by checking for a zero width or
|
||||
height.
|
||||
|
||||
---
|
||||
src/img2txt.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/img2txt.c b/src/img2txt.c
|
||||
index b8a25899..b9d5ba24 100644
|
||||
--- a/src/img2txt.c
|
||||
+++ b/src/img2txt.c
|
||||
@@ -177,7 +177,13 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* Assume a 6×10 font */
|
||||
- if(!cols && !lines)
|
||||
+ if(!i->w || !i->h)
|
||||
+ {
|
||||
+ fprintf(stderr, "%s: image size is 0\n", argv[0]);
|
||||
+ lines = 0;
|
||||
+ cols = 0;
|
||||
+ }
|
||||
+ else if(!cols && !lines)
|
||||
{
|
||||
cols = 60;
|
||||
lines = cols * i->h * font_width / i->w / font_height;
|
||||
@@ -214,7 +220,7 @@ int main(int argc, char **argv)
|
||||
export = caca_export_canvas_to_memory(cv, format?format:"ansi", &len);
|
||||
if(!export)
|
||||
{
|
||||
- fprintf(stderr, "%s: Can't export to format '%s'\n", argv[0], format);
|
||||
+ fprintf(stderr, "%s: Can't export to format '%s'\n", argv[0], format?format:"ansi");
|
||||
}
|
||||
else
|
||||
{
|
@ -1,44 +0,0 @@
|
||||
Port package to C99.
|
||||
|
||||
Reached out to upstream but no reply and no public bug tracker.
|
||||
https://fedoraproject.org/wiki/Toolchain/PortingToModernC
|
||||
Tracked at https://bugzilla.redhat.com/show_bug.cgi?id=2158327
|
||||
|
||||
diff --git a/ruby/caca-canvas.c b/ruby/caca-canvas.c
|
||||
index 5dc66abbe1f84f68..6672313f277b981d 100644
|
||||
--- a/ruby/caca-canvas.c
|
||||
+++ b/ruby/caca-canvas.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <errno.h>
|
||||
#include "caca-dither.h"
|
||||
#include "caca-font.h"
|
||||
+#include "caca_internals.h"
|
||||
#include "common.h"
|
||||
|
||||
VALUE cCanvas;
|
||||
diff --git a/ruby/caca-display.c b/ruby/caca-display.c
|
||||
index ac29dafd3995f46f..6e4cfa20b3fbf782 100644
|
||||
--- a/ruby/caca-display.c
|
||||
+++ b/ruby/caca-display.c
|
||||
@@ -226,7 +226,7 @@ static VALUE get_event(VALUE self, VALUE event_mask, VALUE timeout)
|
||||
return e;
|
||||
}
|
||||
|
||||
-static VALUE driver_list(void)
|
||||
+static VALUE driver_list(VALUE unused)
|
||||
{
|
||||
VALUE ary;
|
||||
char const* const* list;
|
||||
diff --git a/ruby/caca-font.c b/ruby/caca-font.c
|
||||
index 705f928c6da45fba..72b56298c0f82bf2 100644
|
||||
--- a/ruby/caca-font.c
|
||||
+++ b/ruby/caca-font.c
|
||||
@@ -41,7 +41,7 @@ static VALUE font_initialize(VALUE self, VALUE name)
|
||||
return self;
|
||||
}
|
||||
|
||||
-static VALUE font_list(void)
|
||||
+static VALUE font_list(VALUE unused)
|
||||
{
|
||||
VALUE ary;
|
||||
char const* const* list;
|
95
libcaca.spec
95
libcaca.spec
@ -1,54 +1,34 @@
|
||||
# Drop this when EL7 is EOL
|
||||
%{!?ruby_vendorlibdir: %global ruby_vendorlibdir %(ruby -r rbconfig -e 'print RbConfig::CONFIG["vendorlibdir"]')}
|
||||
%{!?ruby_vendorarchdir: %global ruby_vendorarchdir %(ruby -r rbconfig -e 'print RbConfig::CONFIG["vendorarchdir"]')}
|
||||
|
||||
%if 0%{?el9}
|
||||
%bcond_with gl
|
||||
%else
|
||||
%bcond_without gl
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 40
|
||||
%bcond_with ruby
|
||||
%else
|
||||
%bcond_without ruby
|
||||
%endif
|
||||
|
||||
%define beta beta20
|
||||
|
||||
Summary: Library for Colour AsCii Art, text mode graphics
|
||||
Name: libcaca
|
||||
Version: 0.99
|
||||
Release: 0.73.%{beta}%{?dist}
|
||||
Release: 0.59.%{beta}%{?dist}
|
||||
License: WTFPL
|
||||
URL: http://caca.zoy.org/wiki/libcaca
|
||||
|
||||
Source0: https://github.com/cacalabs/libcaca/releases/download/v%{version}.%{beta}/%{name}-%{version}.%{beta}.tar.bz2
|
||||
Patch0: libcaca-0.99.beta16-multilib.patch
|
||||
Patch1: libcaca-0.99.beta20-c99.patch
|
||||
# https://github.com/cacalabs/libcaca/pull/66
|
||||
Patch2: libcaca-0.99.beta20-CVE-2022-0856.patch
|
||||
|
||||
Buildrequires: doxygen
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: glut-devel
|
||||
BuildRequires: make
|
||||
BuildRequires: slang-devel
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libGLU-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkgconfig(imlib2)
|
||||
BuildRequires: pkgconfig(pangoft2)
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%if %{with ruby}
|
||||
BuildRequires: ruby
|
||||
BuildRequires: ruby-devel
|
||||
%endif
|
||||
Buildrequires: texlive-dvips
|
||||
Buildrequires: texlive-latex
|
||||
%if %{with gl}
|
||||
BuildRequires: freeglut-devel
|
||||
BuildRequires: mesa-libGLU-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
libcaca is the Colour AsCii Art library. It provides high level functions for
|
||||
@ -57,29 +37,26 @@ well as powerful image to text conversion routines.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for libcaca, the library for Colour AsCii Art
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: glut-devel
|
||||
Requires: imlib2-devel
|
||||
Requires: libGLU-devel
|
||||
Requires: libX11-devel
|
||||
Requires: ncurses-devel
|
||||
Requires: pango-devel
|
||||
Requires: slang-devel
|
||||
%if %{with gl}
|
||||
Requires: freeglut-devel
|
||||
Requires: mesa-libGLU-devel
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
libcaca is the Colour AsCii Art library. It provides high level functions for
|
||||
color text drawing, simple primitives for line, polygon and ellipse drawing, as
|
||||
well as powerful image to text conversion routines.
|
||||
|
||||
This package contains the header files needed to compile applications or shared
|
||||
objects that use libcaca.
|
||||
This package contains the header files and static libraries needed to compile
|
||||
applications or shared objects that use libcaca.
|
||||
|
||||
|
||||
%package -n caca-utils
|
||||
Summary: Colour AsCii Art Text mode graphics utilities based on libcaca
|
||||
Requires: toilet
|
||||
|
||||
%description -n caca-utils
|
||||
This package contains utilities and demonstration programs for libcaca, the
|
||||
@ -104,7 +81,6 @@ Summary: Python bindings for libcaca
|
||||
This package contains the python bindings for using libcaca from python.
|
||||
|
||||
|
||||
%if %{with ruby}
|
||||
%package -n ruby-caca
|
||||
Summary: Ruby bindings for libcaca
|
||||
Requires: ruby(release)
|
||||
@ -112,7 +88,6 @@ Provides: ruby(caca) = %{version}-%{release}
|
||||
|
||||
%description -n ruby-caca
|
||||
This package contains the ruby bindings for using libcaca from ruby.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
@ -145,16 +120,17 @@ sed -i -e 's/sitearchdir/vendorarchdir/g' -e 's/sitelibdir/vendorlibdir/g' confi
|
||||
|
||||
%make_build
|
||||
|
||||
|
||||
%install
|
||||
%make_install
|
||||
find %{buildroot} -name "*.la" -delete
|
||||
|
||||
# We want to include the docs ourselves from the source directory
|
||||
rm -rf libcaca-dev-docs
|
||||
mv %{buildroot}%{_docdir}/libcaca-dev libcaca-dev-docs
|
||||
# Remove symlink to libcaca-dev
|
||||
rm -f %{buildroot}%{_docdir}/libcucul-dev
|
||||
|
||||
|
||||
# Drop this when EL7 is EOL
|
||||
%{?ldconfig_scriptlets}
|
||||
|
||||
|
||||
@ -172,8 +148,7 @@ mv %{buildroot}%{_docdir}/libcaca-dev libcaca-dev-docs
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%files -n caca-utils
|
||||
%license COPYING*
|
||||
%doc AUTHORS NEWS NOTES README THANKS
|
||||
%doc AUTHORS COPYING* NEWS NOTES README THANKS
|
||||
%{_bindir}/cacaclock
|
||||
%{_bindir}/cacademo
|
||||
%{_bindir}/cacafire
|
||||
@ -193,59 +168,13 @@ mv %{buildroot}%{_docdir}/libcaca-dev libcaca-dev-docs
|
||||
%doc python/examples
|
||||
%{python3_sitelib}/caca/
|
||||
|
||||
%if %{with ruby}
|
||||
%files -n ruby-caca
|
||||
%doc ruby/README
|
||||
%{ruby_vendorlibdir}/caca.rb
|
||||
%{ruby_vendorarchdir}/caca.so
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 20 2024 Xavier Bachelot <xavier@bachelot.org> - 0.99-0.73.beta20
|
||||
- Disable ruby bindings on F40+ (workaround RHBZ#2261303)
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.99-0.72.beta20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.99-0.71.beta20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Wed Jan 03 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.99-0.70.beta20
|
||||
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3
|
||||
|
||||
* Sun Sep 24 2023 Xavier Bachelot <xavier@bachelot.org> - 0.99-0.69.beta20
|
||||
- Fix CVE-2022-0856 (RHBZ#2081750)
|
||||
- Add missing Requires: for caca-utils (RHBZ#1701685)
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.99-0.68.beta20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.99-0.67.beta20
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Tue Jun 13 2023 Leigh Scott <leigh123linux@gmail.com> - 0.99-0.66.beta20
|
||||
- Rebuild fo new imlib2
|
||||
|
||||
* Fri Jan 20 2023 Peter Fordham <peter.fordham@gmail.com> - 0.99-0.65.beta20
|
||||
- Port code to C99.
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.99-0.64.beta20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Wed Jan 04 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.99-0.63.beta20
|
||||
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.99-0.62.beta20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.99-0.61.beta20
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
* Tue Mar 15 2022 Xavier Bachelot <xavier@bachelot.org> - 0.99-0.60.beta20
|
||||
- Spec cleanup
|
||||
- Disable GL support on EL9
|
||||
|
||||
* Mon Mar 14 2022 Simone Caronni <negativo17@gmail.com> - 0.99-0.59.beta20
|
||||
- Clean up SPEC file.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user