[gimp/wip/Jehan/incremental-win-installer-improvements] build: add aalib dependency for ASCII Art support.




commit 2c6604d33a767d0dee91f271765800daecbe26cd
Author: Jehan <jehan girinstud io>
Date:   Sat May 15 19:40:12 2021 +0200

    build: add aalib dependency for ASCII Art support.
    
    Adding a patch sent to me by Sylvie Alexandre meant to help aalib build
    on MSYS2 for Windows 32 and 64-bit.
    Also update config.guess because it is too old and fails to recognize
    the host system in the MSYS2 CI jobs.

 build/windows/gitlab-ci/build-deps-msys2.sh        |  15 ++
 build/windows/patches/aalib-sylvie-alexandre.patch | 189 +++++++++++++++++++++
 2 files changed, 204 insertions(+)
---
diff --git a/build/windows/gitlab-ci/build-deps-msys2.sh b/build/windows/gitlab-ci/build-deps-msys2.sh
index d9470b1159..bb00c8e709 100644
--- a/build/windows/gitlab-ci/build-deps-msys2.sh
+++ b/build/windows/gitlab-ci/build-deps-msys2.sh
@@ -62,6 +62,7 @@ export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib:${LD_LIBRARY_PATH}"
 export ACLOCAL_FLAGS="-I/c/msys64/mingw64/share/aclocal"
 export XDG_DATA_DIRS="${GIMP_PREFIX}/share:/mingw64/share/"
 
+# For babl and GEGL, use the master branch.
 git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git _babl
 git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git _gegl
 
@@ -80,3 +81,17 @@ meson -Dprefix="${GIMP_PREFIX}" -Ddocs=false \
       ${GEGL_OPTIONS} ..
 ninja
 ninja install
+cd ../..
+
+# AA-lib is not available in MSYS2.
+wget https://downloads.sourceforge.net/aa-project/aalib-1.4rc5.tar.gz
+echo "9801095c42bba12edebd1902bcf0a990 aalib-1.4rc5.tar.gz" | md5sum -c -
+tar xzf aalib-1.4rc5.tar.gz
+cd aalib-1.4.0
+patch -p1 < ../build/windows/patches/aalib-sylvie-alexandre.patch
+wget "https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD"; 
--output-document config.guess
+mkdir _build
+cd _build
+../configure --prefix="${GIMP_PREFIX}"
+make
+make install
diff --git a/build/windows/patches/aalib-sylvie-alexandre.patch 
b/build/windows/patches/aalib-sylvie-alexandre.patch
new file mode 100644
index 0000000000..b287289f97
--- /dev/null
+++ b/build/windows/patches/aalib-sylvie-alexandre.patch
@@ -0,0 +1,189 @@
+diff -Naur aalib-1.4.0/configure aalib-1.4rc5_patched/configure
+--- aalib-1.4.0/configure      2001-04-26 16:44:54.000000000 +0200
++++ aalib-1.4rc5_patched/configure     2014-03-28 23:00:36.000000000 +0100
+@@ -4040,7 +4040,7 @@
+ 
+ fi
+ 
+-for ac_hdr in fcntl.h limits.h malloc.h sys/ioctl.h sys/time.h unistd.h
++for ac_hdr in fcntl.h limits.h sys/ioctl.h sys/time.h unistd.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+diff -Naur aalib-1.4.0/configure.in aalib-1.4rc5_patched/configure.in
+--- aalib-1.4.0/configure.in   2001-04-26 16:37:53.000000000 +0200
++++ aalib-1.4rc5_patched/configure.in  2014-03-28 23:00:36.000000000 +0100
+@@ -342,7 +342,7 @@
+ 
+ dnl Checks for header files.
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/ioctl.h sys/time.h unistd.h)
++AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h unistd.h)
+ 
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_STRUCT_ST_RDEV
+diff -Naur aalib-1.4.0/src/aacurkbd.c aalib-1.4rc5_patched/src/aacurkbd.c
+--- aalib-1.4.0/src/aacurkbd.c 2001-04-26 17:03:52.000000000 +0200
++++ aalib-1.4rc5_patched/src/aacurkbd.c        2014-03-28 23:00:36.000000000 +0100
+@@ -112,7 +112,7 @@
+       return (AA_UP);
+     case KEY_DOWN:
+       return (AA_DOWN);
+-#ifdef KEY_MOUDE
++#ifdef KEY_MOUSE
+     case KEY_MOUSE:
+ #ifdef GPM_MOUSEDRIVER
+       if (!__curses_usegpm)
+diff -Naur aalib-1.4.0/src/aacurses.c aalib-1.4rc5_patched/src/aacurses.c
+--- aalib-1.4.0/src/aacurses.c 2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aacurses.c        2014-03-28 23:00:36.000000000 +0100
+@@ -71,8 +71,8 @@
+ {
+     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) + 1;
++    *height = getmaxy(stdscr) + 1;
+ #ifdef GPM_MOUSEDRIVER
+     gpm_mx = *width;
+     gpm_my = *height;
+diff -Naur aalib-1.4.0/src/aados.c aalib-1.4rc5_patched/src/aados.c
+--- aalib-1.4.0/src/aados.c    2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aados.c   2014-03-28 23:00:36.000000000 +0100
+@@ -5,7 +5,7 @@
+ #include <go32.h>
+ #include <dpmi.h>
+ #include <sys/nearptr.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "aalib.h"
+ #include "aaint.h"
+ int __use_nearptr_hack;
+diff -Naur aalib-1.4.0/src/aadoskbd.c aalib-1.4rc5_patched/src/aadoskbd.c
+--- aalib-1.4.0/src/aadoskbd.c 2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aadoskbd.c        2014-03-28 23:00:36.000000000 +0100
+@@ -4,7 +4,6 @@
+ #include <go32.h>
+ #include <dpmi.h>
+ #include <sys/nearptr.h>
+-#include <malloc.h>
+ #include <stdlib.h>
+ #include <dos.h>
+ #include <dpmi.h>
+diff -Naur aalib-1.4.0/src/aaedit.c aalib-1.4rc5_patched/src/aaedit.c
+--- aalib-1.4.0/src/aaedit.c   2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aaedit.c  2014-03-28 23:00:36.000000000 +0100
+@@ -1,6 +1,6 @@
+ #include <string.h>
+ #include <ctype.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "aalib.h"
+ #include "aaint.h"
+ static void aa_editdisplay(struct aa_edit *e)
+diff -Naur aalib-1.4.0/src/aakbdreg.c aalib-1.4rc5_patched/src/aakbdreg.c
+--- aalib-1.4.0/src/aakbdreg.c 2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aakbdreg.c        2014-03-28 23:00:36.000000000 +0100
+@@ -1,4 +1,4 @@
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "config.h"
+ #include "aalib.h"
+ #include "aaint.h"
+diff -Naur aalib-1.4.0/src/aalib.c aalib-1.4rc5_patched/src/aalib.c
+--- aalib-1.4.0/src/aalib.c    2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aalib.c   2014-03-28 23:00:36.000000000 +0100
+@@ -1,6 +1,6 @@
+ #include <stdio.h>
+ #include <string.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "aalib.h"
+ #include "aaint.h"
+ 
+diff -Naur aalib-1.4.0/src/aalinux.c aalib-1.4rc5_patched/src/aalinux.c
+--- aalib-1.4.0/src/aalinux.c  2001-04-26 16:43:56.000000000 +0200
++++ aalib-1.4rc5_patched/src/aalinux.c 2014-03-28 23:00:36.000000000 +0100
+@@ -1,7 +1,6 @@
+ #include "config.h"
+ #ifdef LINUX_DRIVER
+ #include <sys/stat.h>
+-#include <malloc.h>
+ #include <sys/ioctl.h>
+ #include <linux/kd.h>
+ #ifdef GPM_MOUSEDRIVER
+diff -Naur aalib-1.4.0/src/aamoureg.c aalib-1.4rc5_patched/src/aamoureg.c
+--- aalib-1.4.0/src/aamoureg.c 2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aamoureg.c        2014-03-28 23:00:36.000000000 +0100
+@@ -1,4 +1,4 @@
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "config.h"
+ #include "aalib.h"
+ #include "aaint.h"
+diff -Naur aalib-1.4.0/src/aarec.c aalib-1.4rc5_patched/src/aarec.c
+--- aalib-1.4.0/src/aarec.c    2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aarec.c   2014-03-28 23:00:36.000000000 +0100
+@@ -1,5 +1,5 @@
+ #include <string.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "aalib.h"
+ #include "aaint.h"
+ aa_linkedlist *aa_kbdrecommended = NULL, *aa_mouserecommended = NULL,
+diff -Naur aalib-1.4.0/src/aaregist.c aalib-1.4rc5_patched/src/aaregist.c
+--- aalib-1.4.0/src/aaregist.c 2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aaregist.c        2014-03-28 23:00:36.000000000 +0100
+@@ -1,4 +1,4 @@
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "config.h"
+ #include "aalib.h"
+ #include "aaint.h"
+diff -Naur aalib-1.4.0/src/aastdin.c aalib-1.4rc5_patched/src/aastdin.c
+--- aalib-1.4.0/src/aastdin.c  2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aastdin.c 2017-05-27 17:28:27.000000000 +0200
+@@ -5,6 +5,9 @@
+ #include <setjmp.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
++#ifdef _WIN32
++#include <winsock2.h>
++#endif
+ #ifdef GPM_MOUSEDRIVER
+ #include <gpm.h>
+ #endif
+@@ -88,7 +91,7 @@
+     if (c > 0 && c < 127 && c != 127)
+       return (c);
+     switch (c) {
+-#ifdef KEY_MOUDE
++#ifdef KEY_MOUSE
+     case KEY_MOUSE:
+       return AA_MOUSE
+ #endif
+diff -Naur aalib-1.4.0/src/aax.c aalib-1.4rc5_patched/src/aax.c
+--- aalib-1.4.0/src/aax.c      2001-04-26 16:37:54.000000000 +0200
++++ aalib-1.4rc5_patched/src/aax.c     2014-03-28 23:00:36.000000000 +0100
+@@ -1,4 +1,3 @@
+-#include <malloc.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+diff -Naur aalib-1.4.0/src/aaxkbd.c aalib-1.4rc5_patched/src/aaxkbd.c
+--- aalib-1.4.0/src/aaxkbd.c   2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aaxkbd.c  2014-03-28 23:00:36.000000000 +0100
+@@ -1,4 +1,3 @@
+-#include <malloc.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+diff -Naur aalib-1.4.0/src/aaxmouse.c aalib-1.4rc5_patched/src/aaxmouse.c
+--- aalib-1.4.0/src/aaxmouse.c 2001-04-26 16:37:31.000000000 +0200
++++ aalib-1.4rc5_patched/src/aaxmouse.c        2014-03-28 23:00:36.000000000 +0100
+@@ -1,4 +1,3 @@
+-#include <malloc.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]