- update aalib to 1.4. (the last release was 1.4rc5, but after 7 years of no

major release, it's safe to ship this as 1.4)

tested by brad@ and me@, from brad@
This commit is contained in:
jasper 2008-04-03 12:42:45 +00:00
parent 34de838773
commit 83f25165b1
27 changed files with 242 additions and 128 deletions

View File

@ -1,16 +1,16 @@
# $OpenBSD: Makefile,v 1.29 2007/11/13 17:10:25 steven Exp $
# $OpenBSD: Makefile,v 1.30 2008/04/03 12:42:45 jasper Exp $
COMMENT= ascii art library
DISTNAME= aalib-1.2
PKGNAME= ${DISTNAME}p3
SHARED_LIBS= aa 1.3
DISTNAME= aalib-1.4rc5
PKGNAME= aalib-1.4
SHARED_LIBS= aa 2.0
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=aa-project/}
HOMEPAGE= http://aa-project.sourceforge.net/aalib/
# GPL
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
@ -18,9 +18,12 @@ PERMIT_DISTFILES_FTP= Yes
WANTLIB= c m ncurses
USE_LIBTOOL= Yes
CONFIGURE_STYLE= gnu dest
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
CONFIGURE_ARGS+= --enable-static
WRKDIST= ${WRKDIR}/aalib-1.4.0
NO_REGRESS= Yes
FLAVORS= no_x11
FLAVOR?=
@ -32,8 +35,4 @@ USE_X11= Yes
WANTLIB+= X11 Xau Xdmcp
.endif
post-extract:
@cd ${WRKSRC}; rm -f {config.cache,config.h,config.log,config.status}
@cp -f ${FILESDIR}/config.cache ${WRKSRC}
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (aalib-1.2.tar.gz) = eQQ04PIAX8lVWas+q0LnRg==
RMD160 (aalib-1.2.tar.gz) = jSj4TGYefjylarTbJVO0fxmKTDk=
SHA1 (aalib-1.2.tar.gz) = zb3CYPaD2zPmeNPQpRU0Z7IYu60=
SHA256 (aalib-1.2.tar.gz) = Lx+NZzqPnLL8IDH6j52fiC8hOWx/++DI+ak0f76VNKE=
SIZE (aalib-1.2.tar.gz) = 233541
MD5 (aalib-1.4rc5.tar.gz) = mAEJXEK7oS7evRkCvPCpkA==
RMD160 (aalib-1.4rc5.tar.gz) = oQvKsW06oOYPrMo+mJ9qUYRohfY=
SHA1 (aalib-1.4rc5.tar.gz) = ojJp6VCiSdLvk2JYN8rORd284Ds=
SHA256 (aalib-1.4rc5.tar.gz) = +93akjDPbuKk9XBrSxHiGQrkX17aHwQJ3E+Zs14KcO4=
SIZE (aalib-1.4rc5.tar.gz) = 391028

View File

@ -1,21 +0,0 @@
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
ac_cv_func_curs_set=${ac_cv_func_curs_set=yes}
ac_cv_func_mousemask=${ac_cv_func_mousemask=yes}
ac_cv_func_redrawwin=${ac_cv_func_redrawwin=yes}
ac_cv_func_termattrs=${ac_cv_func_termattrs=yes}
ac_cv_func_wredrawln=${ac_cv_func_wredrawln=yes}
ac_cv_header_malloc_h=${ac_cv_header_malloc_h=no}
ac_cv_lib_gpm_Gpm_Repeat=${ac_cv_lib_gpm_Gpm_Repeat=no}

View File

@ -1,10 +0,0 @@
$OpenBSD: patch-aaedit_c,v 1.1 2001/02/20 21:38:53 danh Exp $
--- aaedit.c.orig Tue Aug 19 12:38:01 1997
+++ aaedit.c Tue Feb 20 16:26:26 2001
@@ -1,6 +1,5 @@
#include <string.h>
#include <ctype.h>
-#include <malloc.h>
#include "aalib.h"
static void aa_editdisplay(struct aa_edit *e)
{

View File

@ -1,10 +0,0 @@
$OpenBSD: patch-aafire_c,v 1.1 2001/02/20 21:38:53 danh Exp $
--- aafire.c.orig Thu Oct 23 14:45:12 1997
+++ aafire.c Tue Feb 20 16:26:26 2001
@@ -1,6 +1,5 @@
#include <stdio.h>
#include <string.h>
-#include <malloc.h>
#include <stdlib.h>
#include "aalib.h"

View File

@ -1,8 +0,0 @@
$OpenBSD: patch-aakbdreg_c,v 1.1 2001/02/20 21:38:53 danh Exp $
--- aakbdreg.c.orig Wed Aug 27 09:42:06 1997
+++ aakbdreg.c Tue Feb 20 16:26:26 2001
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include "config.h"
#include "aalib.h"
struct aa_kbddriver *aa_kbddrivers[] =

View File

@ -1,10 +0,0 @@
$OpenBSD: patch-aalib_c,v 1.1 2001/02/20 21:38:53 danh Exp $
--- aalib.c.orig Thu Sep 25 08:52:00 1997
+++ aalib.c Tue Feb 20 16:26:26 2001
@@ -1,6 +1,5 @@
#include <stdio.h>
#include <string.h>
-#include <malloc.h>
#include "aalib.h"
#include "aaint.h"

View File

@ -1,8 +0,0 @@
$OpenBSD: patch-aamoureg_c,v 1.1 2001/02/20 21:38:53 danh Exp $
--- aamoureg.c.orig Fri Aug 22 07:16:01 1997
+++ aamoureg.c Tue Feb 20 16:26:26 2001
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include "config.h"
#include "aalib.h"
struct aa_mousedriver *aa_mousedrivers[] =

View File

@ -1,9 +0,0 @@
$OpenBSD: patch-aarec_c,v 1.1 2001/02/20 21:38:53 danh Exp $
--- aarec.c.orig Tue Aug 19 12:38:01 1997
+++ aarec.c Tue Feb 20 16:26:26 2001
@@ -1,5 +1,4 @@
#include <string.h>
-#include <malloc.h>
#include "aalib.h"
aa_linkedlist *aa_kbdrecommended = NULL, *aa_mouserecommended = NULL,
*aa_displayrecommended = NULL;

View File

@ -1,8 +0,0 @@
$OpenBSD: patch-aaregist_c,v 1.1 2001/02/20 21:38:53 danh Exp $
--- aaregist.c.orig Wed Jan 28 10:17:58 1998
+++ aaregist.c Tue Feb 20 16:26:27 2001
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include "config.h"
#include "aalib.h"
struct aa_driver *aa_drivers[] =

View File

@ -1,8 +0,0 @@
$OpenBSD: patch-aax_c,v 1.1 2001/02/20 21:38:53 danh Exp $
--- aax.c.orig Sun Mar 8 17:29:10 1998
+++ aax.c Tue Feb 20 16:26:27 2001
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

View File

@ -1,8 +0,0 @@
$OpenBSD: patch-aaxkbd_c,v 1.1 2001/02/20 21:38:53 danh Exp $
--- aaxkbd.c.orig Sun Mar 8 17:19:24 1998
+++ aaxkbd.c Tue Feb 20 16:26:27 2001
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

View File

@ -1,8 +0,0 @@
$OpenBSD: patch-aaxmouse_c,v 1.1 2001/02/20 21:38:53 danh Exp $
--- aaxmouse.c.orig Mon Sep 15 11:35:07 1997
+++ aaxmouse.c Tue Feb 20 16:26:27 2001
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

View File

@ -0,0 +1,10 @@
$OpenBSD: patch-src_aaedit_c,v 1.1 2008/04/03 12:42:45 jasper Exp $
--- src/aaedit.c.orig Wed Apr 2 00:05:38 2008
+++ src/aaedit.c Wed Apr 2 00:05:47 2008
@@ -1,6 +1,5 @@
#include <string.h>
#include <ctype.h>
-#include <malloc.h>
#include "aalib.h"
#include "aaint.h"
static void aa_editdisplay(struct aa_edit *e)

View File

@ -0,0 +1,38 @@
$OpenBSD: patch-src_aafire_c,v 1.1 2008/04/03 12:42:45 jasper Exp $
--- src/aafire.c.orig Wed Apr 2 00:42:06 2008
+++ src/aafire.c Wed Apr 2 00:44:03 2008
@@ -48,6 +48,7 @@ static void
initialize (void)
{
int i;
+ srandomdev();
context = aa_autoinit (&aa_defparams);
if (context == NULL)
{
@@ -114,20 +115,20 @@ drawfire (void)
height++;
loop--;
if (loop < 0)
- loop = rand () % 3, sloop++;;
+ loop = random () % 3, sloop++;;
i1 = 1;
i2 = 4 * XSIZ + 1;
for (p = (char *) bitmap + XSIZ * (YSIZ + 0);
p < ((unsigned char *) bitmap + XSIZ * (YSIZ + 1));
p++, i1 += 4, i2 -= 4)
{
- last1 = rand () % min (i1, min (i2, height));
- i = rand () % 6;
+ last1 = random () % min (i1, min (i2, height));
+ i = random () % 6;
for (; p < (unsigned char *) bitmap + XSIZ * (YSIZ + 1) && i != 0;
p++, i--, i1 += 4, i2 -= 4)
- *p = last1, last1 += rand () % 6 - 2, *(p + XSIZ) = last1, last1 +=
- rand () % 6 - 2;
- *(p + 2 * XSIZ) = last1, last1 += rand () % 6 - 2;
+ *p = last1, last1 += random () % 6 - 2, *(p + XSIZ) = last1, last1 +=
+ random () % 6 - 2;
+ *(p + 2 * XSIZ) = last1, last1 += random () % 6 - 2;
}
i = 0;
firemain ();

View File

@ -0,0 +1,8 @@
$OpenBSD: patch-src_aakbdreg_c,v 1.1 2008/04/03 12:42:45 jasper Exp $
--- src/aakbdreg.c.orig Wed Apr 2 00:06:22 2008
+++ src/aakbdreg.c Wed Apr 2 00:06:29 2008
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include "config.h"
#include "aalib.h"
#include "aaint.h"

View File

@ -0,0 +1,10 @@
$OpenBSD: patch-src_aalib_c,v 1.1 2008/04/03 12:42:45 jasper Exp $
--- src/aalib.c.orig Wed Apr 2 00:06:52 2008
+++ src/aalib.c Wed Apr 2 00:06:57 2008
@@ -1,6 +1,5 @@
#include <stdio.h>
#include <string.h>
-#include <malloc.h>
#include "aalib.h"
#include "aaint.h"

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-aalinux_c,v 1.1 2001/02/20 21:38:53 danh Exp $
--- aalinux.c.orig Mon Sep 15 10:59:26 1997
+++ aalinux.c Tue Feb 20 16:26:26 2001
$OpenBSD: patch-src_aalinux_c,v 1.1 2008/04/03 12:42:45 jasper Exp $
--- src/aalinux.c.orig Wed Apr 2 00:07:38 2008
+++ src/aalinux.c Wed Apr 2 00:07:49 2008
@@ -1,7 +1,6 @@
#include "config.h"
#ifdef LINUX_DRIVER

View File

@ -0,0 +1,8 @@
$OpenBSD: patch-src_aamoureg_c,v 1.1 2008/04/03 12:42:45 jasper Exp $
--- src/aamoureg.c.orig Wed Apr 2 00:08:10 2008
+++ src/aamoureg.c Wed Apr 2 00:08:16 2008
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include "config.h"
#include "aalib.h"
#include "aaint.h"

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_aaprintf_c,v 1.1 2008/04/03 12:42:45 jasper Exp $
--- src/aaprintf.c.orig Wed Apr 2 00:48:56 2008
+++ src/aaprintf.c Wed Apr 2 00:49:15 2008
@@ -7,7 +7,7 @@ int aa_printf(aa_context *c, int x, int y, enum aa_att
char buf[1025];
int i;
va_start(args,fmt);
- i=vsprintf(buf,fmt,args);
+ i=vsnprintf(buf,sizeof(buf),fmt,args);
va_end(args);
aa_puts(c,x,y,attr,buf);
return i;

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-src_aarec_c,v 1.1 2008/04/03 12:42:45 jasper Exp $
--- src/aarec.c.orig Wed Apr 2 00:08:41 2008
+++ src/aarec.c Wed Apr 2 00:08:48 2008
@@ -1,5 +1,4 @@
#include <string.h>
-#include <malloc.h>
#include "aalib.h"
#include "aaint.h"
aa_linkedlist *aa_kbdrecommended = NULL, *aa_mouserecommended = NULL,

View File

@ -0,0 +1,8 @@
$OpenBSD: patch-src_aaregist_c,v 1.1 2008/04/03 12:42:45 jasper Exp $
--- src/aaregist.c.orig Wed Apr 2 00:09:10 2008
+++ src/aaregist.c Wed Apr 2 00:09:18 2008
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include "config.h"
#include "aalib.h"
#include "aaint.h"

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-src_aarender_c,v 1.1 2008/04/03 12:42:45 jasper Exp $
--- src/aarender.c.orig Wed Apr 2 00:46:03 2008
+++ src/aarender.c Wed Apr 2 00:48:09 2008
@@ -27,11 +27,11 @@ aa_renderparams *aa_getrenderparams(void)
return (p);
}
#define MYLONG_MAX 0xffffffffU /*this is enought for me. */
-#define myrand() (state = ((state * 1103515245) + 12345) & MYLONG_MAX)
+#define myrand() (random() & MYLONG_MAX)
void aa_renderpalette(aa_context * c, __AA_CONST aa_palette palette, __AA_CONST aa_renderparams * p, int x1, int y1, int x2, int y2)
{
- static int state;
+ static int rand_init = 0;
int x, y;
int val;
int wi = c->imgwidth;
@@ -47,6 +47,11 @@ void aa_renderpalette(aa_context * c, __AA_CONST aa_pa
int randomval = p->randomval;
int dither = p->dither;
aa_palette table;
+
+ if (!rand_init) {
+ srandomdev();
+ rand_init = 1;
+ }
if (x2 < 0 || y2 < 0 || x1 > aa_scrwidth(c) || y1 > aa_scrheight(c))
return;
if (x2 >= aa_scrwidth(c))

View File

@ -0,0 +1,8 @@
$OpenBSD: patch-src_aax_c,v 1.1 2008/04/03 12:42:46 jasper Exp $
--- src/aax.c.orig Wed Apr 2 00:10:09 2008
+++ src/aax.c Wed Apr 2 00:10:18 2008
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

View File

@ -0,0 +1,8 @@
$OpenBSD: patch-src_aaxkbd_c,v 1.1 2008/04/03 12:42:46 jasper Exp $
--- src/aaxkbd.c.orig Wed Apr 2 00:10:31 2008
+++ src/aaxkbd.c Wed Apr 2 00:10:35 2008
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

View File

@ -0,0 +1,8 @@
$OpenBSD: patch-src_aaxmouse_c,v 1.1 2008/04/03 12:42:46 jasper Exp $
--- src/aaxmouse.c.orig Wed Apr 2 00:10:41 2008
+++ src/aaxmouse.c Wed Apr 2 00:10:46 2008
@@ -1,4 +1,3 @@
-#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

View File

@ -1,6 +1,7 @@
@comment $OpenBSD: PLIST,v 1.6 2004/09/15 00:50:08 espie Exp $
@comment $OpenBSD: PLIST,v 1.7 2008/04/03 12:42:46 jasper Exp $
bin/aafire
bin/aainfo
bin/aalib-config
bin/aasavefont
bin/aatest
include/aalib.h
@ -8,3 +9,69 @@ include/aalib.h
lib/libaa.a
lib/libaa.la
%%SHARED%%
@man man/man1/aafire.1
@man man/man3/aa_attrs.3
@man man/man3/aa_autoinit.3
@man man/man3/aa_autoinitkbd.3
@man man/man3/aa_autoinitmouse.3
@man man/man3/aa_close.3
@man man/man3/aa_createedit.3
@man man/man3/aa_currentfont.3
@man man/man3/aa_defparams.3
@man man/man3/aa_defrenderparams.3
@man man/man3/aa_displayrecommended.3
@man man/man3/aa_dithernames.3
@man man/man3/aa_drivers.3
@man man/man3/aa_edit.3
@man man/man3/aa_editkey.3
@man man/man3/aa_fastrender.3
@man man/man3/aa_fonts.3
@man man/man3/aa_formats.3
@man man/man3/aa_getevent.3
@man man/man3/aa_getkey.3
@man man/man3/aa_getmouse.3
@man man/man3/aa_gotoxy.3
@man man/man3/aa_help.3
@man man/man3/aa_hidecursor.3
@man man/man3/aa_hidemouse.3
@man man/man3/aa_image.3
@man man/man3/aa_imgheight.3
@man man/man3/aa_imgwidth.3
@man man/man3/aa_init.3
@man man/man3/aa_initkbd.3
@man man/man3/aa_initmouse.3
@man man/man3/aa_kbddrivers.3
@man man/man3/aa_kbdrecommended.3
@man man/man3/aa_mmheight.3
@man man/man3/aa_mmwidth.3
@man man/man3/aa_mousedrivers.3
@man man/man3/aa_mouserecommended.3
@man man/man3/aa_parseoptions.3
@man man/man3/aa_printf.3
@man man/man3/aa_putpixel.3
@man man/man3/aa_puts.3
@man man/man3/aa_recommendhi.3
@man man/man3/aa_recommendhidisplay.3
@man man/man3/aa_recommendhikbd.3
@man man/man3/aa_recommendhimouse.3
@man man/man3/aa_recommendlow.3
@man man/man3/aa_recommendlowdisplay.3
@man man/man3/aa_recommendlowkbd.3
@man man/man3/aa_recommendlowmouse.3
@man man/man3/aa_registerfont.3
@man man/man3/aa_render.3
@man man/man3/aa_resize.3
@man man/man3/aa_resizehandler.3
@man man/man3/aa_scrheight.3
@man man/man3/aa_scrwidth.3
@man man/man3/aa_setfont.3
@man man/man3/aa_setsupported.3
@man man/man3/aa_showcursor.3
@man man/man3/aa_showmouse.3
@man man/man3/aa_text.3
@man man/man3/aa_uninitkbd.3
@man man/man3/aa_uninitmouse.3
@man man/man3/mem_d.3
@man man/man3/save_d.3
share/aclocal/
share/aclocal/aalib.m4