From 00091ff4468283c8bbc9bd8b34f9ce97240963cd Mon Sep 17 00:00:00 2001 From: tigro Date: Wed, 25 Dec 2024 12:25:58 +0300 Subject: [PATCH] import aalib-1.4.0-0.52.rc5.el10 --- .aalib.metadata | 1 + .gitignore | 2 +- SOURCES/aalib-1.4_rc5-fix-aarender.patch | 34 ++++++ .../aalib-1.4_rc5-free-offset-pointer.patch | 14 +++ .../aalib-1.4rc5-bug149361.patch | 0 .../aalib-1.4rc5-libflag.patch | 0 SOURCES/aalib-1.4rc5-opaque-ncurses-fix.patch | 14 +++ .../aalib-1.4rc5-rpath.patch | 0 .../aalib-1.4rc5-x_libs.patch | 0 .../aalib-aclocal.patch | 0 SOURCES/aalib-c99.patch | 108 ++++++++++++++++++ .../aalib-config-rpath.patch | 0 aalib.spec => SPECS/aalib.spec | 93 ++++++++++++--- aalib-ppc.patch | 19 --- sources | 1 - 15 files changed, 249 insertions(+), 37 deletions(-) create mode 100644 .aalib.metadata create mode 100644 SOURCES/aalib-1.4_rc5-fix-aarender.patch create mode 100644 SOURCES/aalib-1.4_rc5-free-offset-pointer.patch rename aalib-1.4rc5-bug149361.patch => SOURCES/aalib-1.4rc5-bug149361.patch (100%) rename aalib-1.4rc5-libflag.patch => SOURCES/aalib-1.4rc5-libflag.patch (100%) create mode 100644 SOURCES/aalib-1.4rc5-opaque-ncurses-fix.patch rename aalib-1.4rc5-rpath.patch => SOURCES/aalib-1.4rc5-rpath.patch (100%) rename aalib-1.4rc5-x_libs.patch => SOURCES/aalib-1.4rc5-x_libs.patch (100%) rename aalib-aclocal.patch => SOURCES/aalib-aclocal.patch (100%) create mode 100644 SOURCES/aalib-c99.patch rename aalib-config-rpath.patch => SOURCES/aalib-config-rpath.patch (100%) rename aalib.spec => SPECS/aalib.spec (77%) delete mode 100644 aalib-ppc.patch delete mode 100644 sources diff --git a/.aalib.metadata b/.aalib.metadata new file mode 100644 index 0000000..b873b3c --- /dev/null +++ b/.aalib.metadata @@ -0,0 +1 @@ +a23269e950a249d2ef93625837cace45ddbce03b SOURCES/aalib-1.4rc5.tar.gz diff --git a/.gitignore b/.gitignore index c338db7..2096ea7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -aalib-1.4rc5.tar.gz +SOURCES/aalib-1.4rc5.tar.gz diff --git a/SOURCES/aalib-1.4_rc5-fix-aarender.patch b/SOURCES/aalib-1.4_rc5-fix-aarender.patch new file mode 100644 index 0000000..2c3d5bf --- /dev/null +++ b/SOURCES/aalib-1.4_rc5-fix-aarender.patch @@ -0,0 +1,34 @@ +This bug can be seen very clearly with e.g. mplayer -vo aa -monitoraspect 3 +in which case a big part of the picture is missing or there is even completely +black output. + +The reason for this is, when drawing only a part of the picture via aarender() +the first X coordinate is used for the loop count, but it is not applied to the +destination and source image index, thus instead of (re)drawing the middle part +of the image, it draws always the left part. + +Actual Results: +only the left part of the image is draw (depending on the video, only the left +black bar might be draw, so you will see nothing at all - if so use a slightly +smaller value for -monitoraspect). + +Expected Results: +All of the image should be drawn, and -monitoraspect should only squeeze the +image, not cause part of it to miss. + +Gentoo-bug: http://bugs.gentoo.org/id=214142 +Reported-by: Reimar Döffinger +Fixed-by: Reimar Döffinger +--- a/src/aarender.c.orig 2008-03-18 23:55:32.000000000 +0100 ++++ b/src/aarender.c 2008-03-18 23:55:50.000000000 +0100 +@@ -94,8 +94,8 @@ + gamma = randomval / 2; + mval = (c->parameters[c->filltable[255]].p[4]); + for (y = y1; y < y2; y++) { +- pos = 2 * y * wi; +- pos1 = y * aa_scrwidth(c); ++ pos = 2 * (y * wi + x1); ++ pos1 = y * aa_scrwidth(c) + x1; + esum = 0; + for (x = x1; x < x2; x++) { + i1 = table[((((int) c->imagebuffer[pos])))]; diff --git a/SOURCES/aalib-1.4_rc5-free-offset-pointer.patch b/SOURCES/aalib-1.4_rc5-free-offset-pointer.patch new file mode 100644 index 0000000..3ae697e --- /dev/null +++ b/SOURCES/aalib-1.4_rc5-free-offset-pointer.patch @@ -0,0 +1,14 @@ +--- a/src/aarender.c ++++ b/src/aarender.c +@@ -63,10 +63,10 @@ void aa_renderpalette(aa_context * c, __ + errors[0] = calloc(1, (x2 + 5) * sizeof(int)); + if (errors[0] == NULL) + dither = AA_ERRORDISTRIB; +- errors[0] += 3; + errors[1] = calloc(1, (x2 + 5) * sizeof(int)); + if (errors[1] == NULL) + free(errors[0]), dither = AA_ERRORDISTRIB; ++ errors[0] += 3; + errors[1] += 3; + cur = 0; + } diff --git a/aalib-1.4rc5-bug149361.patch b/SOURCES/aalib-1.4rc5-bug149361.patch similarity index 100% rename from aalib-1.4rc5-bug149361.patch rename to SOURCES/aalib-1.4rc5-bug149361.patch diff --git a/aalib-1.4rc5-libflag.patch b/SOURCES/aalib-1.4rc5-libflag.patch similarity index 100% rename from aalib-1.4rc5-libflag.patch rename to SOURCES/aalib-1.4rc5-libflag.patch diff --git a/SOURCES/aalib-1.4rc5-opaque-ncurses-fix.patch b/SOURCES/aalib-1.4rc5-opaque-ncurses-fix.patch new file mode 100644 index 0000000..42c430c --- /dev/null +++ b/SOURCES/aalib-1.4rc5-opaque-ncurses-fix.patch @@ -0,0 +1,14 @@ +diff -up aalib-1.4.0/src/aacurses.c.opaque-ncurses-fix aalib-1.4.0/src/aacurses.c +--- aalib-1.4.0/src/aacurses.c.opaque-ncurses-fix 2024-02-10 06:32:32.008267145 -0500 ++++ aalib-1.4.0/src/aacurses.c 2024-02-10 06:33:38.648245270 -0500 +@@ -71,8 +71,8 @@ static void curses_getsize(aa_context * + { + if (__resized_curses) + curses_uninit(c), curses_init(&c->params, NULL,&c->driverparams, NULL), __resized_curses = 0; +- *width = stdscr->_maxx + 1; +- *height = stdscr->_maxy + 1; ++ *width = getmaxx(stdscr); ++ *height = getmaxy(stdscr); + #ifdef GPM_MOUSEDRIVER + gpm_mx = *width; + gpm_my = *height; diff --git a/aalib-1.4rc5-rpath.patch b/SOURCES/aalib-1.4rc5-rpath.patch similarity index 100% rename from aalib-1.4rc5-rpath.patch rename to SOURCES/aalib-1.4rc5-rpath.patch diff --git a/aalib-1.4rc5-x_libs.patch b/SOURCES/aalib-1.4rc5-x_libs.patch similarity index 100% rename from aalib-1.4rc5-x_libs.patch rename to SOURCES/aalib-1.4rc5-x_libs.patch diff --git a/aalib-aclocal.patch b/SOURCES/aalib-aclocal.patch similarity index 100% rename from aalib-aclocal.patch rename to SOURCES/aalib-aclocal.patch diff --git a/SOURCES/aalib-c99.patch b/SOURCES/aalib-c99.patch new file mode 100644 index 0000000..2a65cc2 --- /dev/null +++ b/SOURCES/aalib-c99.patch @@ -0,0 +1,108 @@ +Add additional system header #include directives for more +function prototypes. This avoids implicit function declarations +and build failures with future compilers. + +Submitted upstream: + +diff --git a/src/aafire.c b/src/aafire.c +index 4f36149aa84fba57..a59b5c5fa58e085b 100644 +--- a/src/aafire.c ++++ b/src/aafire.c +@@ -1,4 +1,5 @@ + #include ++#include + #include "aalib.h" + + #define XSIZ aa_imgwidth(context) +diff --git a/src/aainfo.c b/src/aainfo.c +index d3f6d50f34590638..f4250ee37ae46134 100644 +--- a/src/aainfo.c ++++ b/src/aainfo.c +@@ -1,3 +1,4 @@ ++#include + + #include "aalib.h" + #include "aaint.h" +diff --git a/src/aakbdreg.c b/src/aakbdreg.c +index def65fe25646d75a..682616313c1b6ebd 100644 +--- a/src/aakbdreg.c ++++ b/src/aakbdreg.c +@@ -1,4 +1,5 @@ + #include ++#include + #include "config.h" + #include "aalib.h" + #include "aaint.h" +diff --git a/src/aalib.c b/src/aalib.c +index 11fecc8fe8ef6b59..1ef12c0dfa9026a4 100644 +--- a/src/aalib.c ++++ b/src/aalib.c +@@ -1,4 +1,5 @@ + #include ++#include + #include + #include + #include "aalib.h" +diff --git a/src/aalinuxkbd.c b/src/aalinuxkbd.c +index c7f388abfe9e8c7f..ea988154518dfc8e 100644 +--- a/src/aalinuxkbd.c ++++ b/src/aalinuxkbd.c +@@ -8,6 +8,7 @@ + */ + + #include "config.h" ++#include + #ifdef LINUX_DRIVER + #include + #include +diff --git a/src/aamoureg.c b/src/aamoureg.c +index 03808289eb59b928..6d807416ae0d3dc2 100644 +--- a/src/aamoureg.c ++++ b/src/aamoureg.c +@@ -1,4 +1,5 @@ + #include ++#include + #include "config.h" + #include "aalib.h" + #include "aaint.h" +diff --git a/src/aaregist.c b/src/aaregist.c +index 54abec0b9797533a..768b8ce29e286b00 100644 +--- a/src/aaregist.c ++++ b/src/aaregist.c +@@ -1,4 +1,5 @@ + #include ++#include + #include "config.h" + #include "aalib.h" + #include "aaint.h" +diff --git a/src/aasavefont.c b/src/aasavefont.c +index b00e1e6d7f181952..864ba225d5ef626c 100644 +--- a/src/aasavefont.c ++++ b/src/aasavefont.c +@@ -1,3 +1,4 @@ ++#include + #include "aalib.h" + int main(int argc, char **argv) + { +diff --git a/src/aatest.c b/src/aatest.c +index 9816f5d855134894..89933cfba6344270 100644 +--- a/src/aatest.c ++++ b/src/aatest.c +@@ -1,3 +1,5 @@ ++#include ++#include + #include "aalib.h" + int main(int argc, char **argv) + { +diff --git a/src/aaxkbd.c b/src/aaxkbd.c +index f16afc63bb565512..44b91458b4bef3bc 100644 +--- a/src/aaxkbd.c ++++ b/src/aaxkbd.c +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + #include "aalib.h" + #include "aaint.h" + #include "aaxint.h" diff --git a/aalib-config-rpath.patch b/SOURCES/aalib-config-rpath.patch similarity index 100% rename from aalib-config-rpath.patch rename to SOURCES/aalib-config-rpath.patch diff --git a/aalib.spec b/SPECS/aalib.spec similarity index 77% rename from aalib.spec rename to SPECS/aalib.spec index bcc0be7..e397e55 100644 --- a/aalib.spec +++ b/SPECS/aalib.spec @@ -1,21 +1,40 @@ %global rc_subver rc5 +%if 0%{?el10} +%bcond_with gpm +%else +%bcond_without gpm +%endif + Summary: ASCII art library Name: aalib Version: 1.4.0 -Release: 0.42.%{rc_subver}%{?dist} -License: LGPLv2+ +Release: 0.52.%{rc_subver}%{?dist} +License: LGPL-2.1-or-later URL: http://aa-project.sourceforge.net/aalib/ Source0: http://download.sourceforge.net/aa-project/%{name}-1.4%{rc_subver}.tar.gz Patch0: aalib-aclocal.patch Patch1: aalib-config-rpath.patch Patch2: aalib-1.4rc5-bug149361.patch Patch3: aalib-1.4rc5-rpath.patch -Patch4: aalib-1.4rc5-x_libs.patch -Patch5: aalib-1.4rc5-libflag.patch -BuildRequires: slang-devel libXt-devel gpm-devel ncurses-devel -BuildRequires: autoconf libtool -BuildRequires: make +Patch4: aalib-1.4rc5-x_libs.patch +Patch5: aalib-1.4rc5-libflag.patch +Patch6: aalib-c99.patch +Patch7: https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/aalib/files/aalib-1.4_rc5-free-offset-pointer.patch +Patch8: https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/aalib/files/aalib-1.4_rc5-fix-aarender.patch +# Modern ncurses has an opaque WINDOW structure (you cannot address its members directly) +# Use the getmaxx() and getmaxy() functions provided by ncurses instead. +Patch9: aalib-1.4rc5-opaque-ncurses-fix.patch + +BuildRequires: autoconf +%if 0%{with gpm} +BuildRequires: gpm-devel +%endif +BuildRequires: libtool +BuildRequires: libXt-devel +BuildRequires: make +BuildRequires: ncurses-devel +BuildRequires: slang-devel %description AA-lib is a low level gfx library just as many other libraries are. The @@ -40,23 +59,27 @@ with aalib. %prep %setup -q -%patch0 -p0 -%patch1 -p0 -%patch2 -p1 -b .bug149361 -%patch3 -p1 -b .rpath -%patch4 -p1 -b .x_libs -%patch5 -p0 -b .libflag +%patch -P0 -p0 +%patch -P1 -p0 +%patch -P2 -p1 -b .bug149361 +%patch -P3 -p1 -b .rpath +%patch -P4 -p1 -b .x_libs +%patch -P5 -p0 -b .libflag +%patch -P6 -p1 +%patch -P7 -p1 -b .free-offset-pointer +%patch -P8 -p1 -b .fix-aarender +%patch -P9 -p1 -b .opaque-ncurses-fix # included libtool is too old, we need to rebuild autoreconf -v -f -i %build %configure --disable-static --with-curses-driver=yes --with-ncurses -make %{?_smp_mflags} +%make_build %install -make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" +%make_install rm -f $RPM_BUILD_ROOT{%{_libdir}/libaa.la,%{_infodir}/dir} # clean up multilib conflicts @@ -74,7 +97,7 @@ touch -r NEWS $RPM_BUILD_ROOT%{_bindir}/aalib-config $RPM_BUILD_ROOT%{_datadir}/ %files libs %doc README ChangeLog NEWS %license COPYING -%{_libdir}/libaa.so.* +%{_libdir}/libaa.so.1* %files devel %{_bindir}/aalib-config @@ -85,6 +108,44 @@ touch -r NEWS $RPM_BUILD_ROOT%{_bindir}/aalib-config $RPM_BUILD_ROOT%{_datadir}/ %{_datadir}/aclocal/aalib.m4 %changelog +* Wed Dec 25 2024 Arkady L. Shane - 1.4.0-0.52.rc5 +- Rebuilt for MSVSphere 10 + +* Fri Oct 04 2024 Xavier Bachelot - 1.4.0-0.52.rc5 +- Do not BuildRequires gpm-devel on EL10 +- Specfile clean up + +* Wed Jul 17 2024 Fedora Release Engineering - 1.4.0-0.51.rc5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Feb 10 2024 Tom Callaway - 1.4.0-0.50.rc5 +- apply two fixes from gentoo +- fix aalib to handle opaque WINDOW in ncurses +- fix license tag +- fix patch macro syntax +- fixes FTBFS + +* Mon Jan 22 2024 Fedora Release Engineering - 1.4.0-0.49.rc5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 1.4.0-0.48.rc5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 1.4.0-0.47.rc5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Apr 06 2023 Florian Weimer - 1.4.0-0.46.rc5 +- Port to C99 + +* Wed Jan 18 2023 Fedora Release Engineering - 1.4.0-0.45.rc5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Jul 20 2022 Fedora Release Engineering - 1.4.0-0.44.rc5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 19 2022 Fedora Release Engineering - 1.4.0-0.43.rc5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Jul 21 2021 Fedora Release Engineering - 1.4.0-0.42.rc5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/aalib-ppc.patch b/aalib-ppc.patch deleted file mode 100644 index 617f01f..0000000 --- a/aalib-ppc.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- aalib-1.4.0/ltconfig.foo 2007-05-04 08:47:13.000000000 -0400 -+++ aalib-1.4.0/ltconfig 2007-05-04 08:48:26.000000000 -0400 -@@ -1994,16 +1994,6 @@ linux-gnu*) - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - deplibs_check_method=pass_all -- -- if test -f /lib/ld.so.1; then -- dynamic_linker='GNU ld.so' -- else -- # Only the GNU ld.so supports shared libraries on MkLinux. -- case "$host_cpu" in -- powerpc*) dynamic_linker=no ;; -- *) dynamic_linker='Linux ld.so' ;; -- esac -- fi - ;; - - netbsd*) diff --git a/sources b/sources deleted file mode 100644 index d31b3e6..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -9801095c42bba12edebd1902bcf0a990 aalib-1.4rc5.tar.gz