# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= aalib VERSION= 1.4rc5 REVISION= 4 KEYWORDS= graphics VARIANTS= std SDESC[std]= ASCII art library HOMEPAGE= https://aa-project.sourceforge.net/aalib/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= SF/aa-project/aa-lib/1.4rc5 DISTFILE[1]= aalib-1.4rc5.tar.gz:main DF_INDEX= 1 SPKGS[std]= set primary dev tools man info OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none EXRUN[tools]= primary USES= libtool ncurses makeinfo fbsd10fix DISTNAME= aalib-1.4.0 LICENSE= GPLv2:primary LICENSE_TERMS= primary:{{WRKDIR}}/TERMS LICENSE_FILE= GPLv2:{{WRKSRC}}/COPYING LICENSE_AWK= TERMS:"^\#ifndef" LICENSE_SOURCE= TERMS:{{WRKSRC}}/src/aalib.h LICENSE_SCHEME= solo INFO= info:aalib FPC_EQUIVALENT= graphics/aalib INFO_SUBDIR= . MUST_CONFIGURE= gnu CONFIGURE_ARGS= --with-x=no --with-ncurses={{LOCALBASE}} INSTALL_TARGET= install-strip CFLAGS= -I{{NCURSESINC}} post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libaa.so pre-configure: ${RM} ${WRKSRC}/config.cache ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g; \ s|MAKEINFO=makeinfo|MAKEINFO="makeinfo --no-split"|g; \ /LIBS=.*withval.*lncurses/ s|lncurses|lncurses -ltinfo|' \ ${WRKSRC}/configure ${REINPLACE_CMD} \ -e 's|AC_DEFUN(AM_PATH_AALIB|AC_DEFUN([AM_PATH_AALIB]|g' \ ${WRKSRC}/aalib.m4 ${FIND} ${WRKSRC} \( -name '*.[ch]' \! -name acconfig.h \) \ | ${XARGS} ${GREP} -l '' \ | ${XARGS} ${REINPLACE_CMD} -e 's|||g' ${REINPLACE_CMD} -e 's|version_type=sunos|version_type=freebsd-elf|' \ ${WRKSRC}/ltconfig post-extract: ${RM} ${WRKSRC}/doc/aalib.info* [FILE:406:descriptions/desc.primary] AA-lib is a low-level graphics library similar to many other libraries except for the fact that AA-lib does not require a graphics device! In fact, no "graphical" output is possible. AA-lib uses a modern, high-tech ascii-art renderer in place of outmoded and cumbersome graphical output. The AA-lib API is designed to be similar to that of other graphics libraries so learning its API should be simple. [FILE:49:descriptions/desc.tools] This package contains tools based on AA library. [FILE:98:distinfo] fbddda9230cf6ee2a4f5706b4b11e2190ae45f5eda1f0409dc4f99b35e0a70ee 391028 aalib-1.4rc5.tar.gz [FILE:33:manifests/plist.primary] lib/ libaa.so.1 libaa.so.1.0.4 [FILE:63:manifests/plist.dev] include/aalib.h lib/ libaa.a libaa.so share/aclocal/aalib.m4 [FILE:55:manifests/plist.tools] bin/ aafire aainfo aalib-config aasavefont aatest [FILE:1070:manifests/plist.man] share/man/man1/aafire.1 share/man/man3/ aa_attrs.3 aa_autoinit.3 aa_autoinitkbd.3 aa_autoinitmouse.3 aa_close.3 aa_createedit.3 aa_currentfont.3 aa_defparams.3 aa_defrenderparams.3 aa_displayrecommended.3 aa_dithernames.3 aa_drivers.3 aa_edit.3 aa_editkey.3 aa_fastrender.3 aa_fonts.3 aa_formats.3 aa_getevent.3 aa_getkey.3 aa_getmouse.3 aa_gotoxy.3 aa_help.3 aa_hidecursor.3 aa_hidemouse.3 aa_image.3 aa_imgheight.3 aa_imgwidth.3 aa_init.3 aa_initkbd.3 aa_initmouse.3 aa_kbddrivers.3 aa_kbdrecommended.3 aa_mmheight.3 aa_mmwidth.3 aa_mousedrivers.3 aa_mouserecommended.3 aa_parseoptions.3 aa_printf.3 aa_putpixel.3 aa_puts.3 aa_recommendhi.3 aa_recommendhidisplay.3 aa_recommendhikbd.3 aa_recommendhimouse.3 aa_recommendlow.3 aa_recommendlowdisplay.3 aa_recommendlowkbd.3 aa_recommendlowmouse.3 aa_registerfont.3 aa_render.3 aa_resize.3 aa_resizehandler.3 aa_scrheight.3 aa_scrwidth.3 aa_setfont.3 aa_setsupported.3 aa_showcursor.3 aa_showmouse.3 aa_text.3 aa_uninitkbd.3 aa_uninitmouse.3 mem_d.3 save_d.3 [FILE:545:patches/patch-configure] --- configure.orig 2001-04-26 14:44:54 UTC +++ configure @@ -1005,7 +1005,7 @@ cat > conftest.$ac_ext << EOF #line 1006 "configure" #include "confdefs.h" -main(){return(0);} +int main(){return(0);} EOF if { (eval echo configure:1011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes @@ -4302,7 +4302,7 @@ case "$target" in *-*-bsdi*) ARCH=bsdi ;; - *-*-freebsd*) + *-*-freebsd*|*-*-dragonfly*|*-*-midnightbsd*) ARCH=freebsd ;; *-*-solaris*) [FILE:1139:patches/patch-doc_aalib.texinfo] --- doc/aalib.texinfo.orig 2001-04-26 14:37:31 UTC +++ doc/aalib.texinfo @@ -29,11 +29,11 @@ this permission notice are preserved on @titlepage -@title{AA-lib @value{VERSION}} -@subtitle{An ascii-art library} -@subtitle{API-DESCRIPTION} +@title AA-lib @value{VERSION} +@subtitle An ascii-art library +@subtitle API-DESCRIPTION -@author{Jan Hubi@v cka & Kamil Toman} +@author Jan Hubi@v cka & Kamil Toman @tex Dukelsk\'ych bojovn\'\i ku 1944 @end tex @@ -61,7 +61,8 @@ Email: @code{hubicka@@freesoft.cz} @end tex @vskip 0pt plus 1filll -@copyright{} 1997 @tex Jan Hubi\v cka \& Kamil Toman +@copyright{} 1997 +@tex Jan Hubi\v cka \& Kamil Toman @end tex Permission is granted to make and distribute verbatim @@ -1318,7 +1319,7 @@ To write new driver is quite easy. You n functions (like initialization, drawing to screen etc...) and register it in the driver registry. There is separate drivers for screen, mouse and keyboard. -@subsection Display driver +@section Display driver Display driver is the most significant driver (of course) so it is recomended to implement it first. Its structure is as follows: [FILE:589:patches/patch-ltconfig] --- ltconfig.orig 2001-04-26 14:37:31 UTC +++ ltconfig @@ -1360,7 +1360,7 @@ else ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) + freebsd*|dragonfly*|midnight*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -1886,7 +1886,7 @@ freebsd1*) dynamic_linker=no ;; -freebsd*) +freebsd*|dragonfly*|midnight*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case "$version_type" in [FILE:510:patches/patch-src_Makefile.in] --- src/Makefile.in.orig 2001-04-26 15:33:09 UTC +++ src/Makefile.in @@ -254,6 +254,9 @@ maintainer-clean-libtool: libaa.la: $(libaa_la_OBJECTS) $(libaa_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libaa_la_LDFLAGS) $(libaa_la_OBJECTS) $(libaa_la_LIBADD) $(LIBS) + # relink shared library because libtool won't pass rpath to la files + rm .libs/libaa.so.1.0.4 + $(CC) -shared $(CFLAGS) $(LDFLAGS) $(libaa_la_OBJECTS) $(LIBS) -Wl,-soname -Wl,libaa.so.1 -o .libs/libaa.so.1.0.4 mostlyclean-binPROGRAMS: [FILE:457:patches/patch-src_aacurses.c] Supports ncurses 6.5 changes --- src/aacurses.c.orig 2001-04-26 14:37:31 UTC +++ src/aacurses.c @@ -71,8 +71,7 @@ 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; + getmaxyx(stdscr, *width, *height); #ifdef GPM_MOUSEDRIVER gpm_mx = *width; gpm_my = *height; [FILE:278:patches/patch-src_aaint.h] --- src/aaint.h.orig 2001-04-26 14:37:31 UTC +++ src/aaint.h @@ -1,6 +1,8 @@ #ifndef __AAINT_INCLUDED__ #define __AAINT_INCLUDED__ #include +#include +#include /* Macros used for calculating fonts sizes. */ #define NCHARS (256*AA_NATTRS) [FILE:239:patches/patch-src_aalib.h] --- src/aalib.h.orig 2001-04-26 14:37:31 UTC +++ src/aalib.h @@ -23,6 +23,8 @@ #ifndef __AALIB_INCLUDED__ #define __AALIB_INCLUDED__ #include +#include +#include #ifdef __cplusplus extern "C" { #endif [FILE:273:patches/patch-src_aalinuxkbd.c] --- src/aalinuxkbd.c.orig 2001-04-26 14:37:31 UTC +++ src/aalinuxkbd.c @@ -200,7 +200,7 @@ static void vt_to_here(int num) static int rawmode_init(void) { if (!closed) - return; + return (0); mypid = getpid(); if (tty_fd == -1) { tty_fd = fileno(stdin); [FILE:304:patches/patch-src_aaprintf.c] --- src/aaprintf.c.orig 2001-04-26 14:37:31 UTC +++ src/aaprintf.c @@ -7,7 +7,7 @@ int aa_printf(aa_context *c, int x, int 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; [FILE:1148:dragonfly/patch-src_aafire.c] --- src/aafire.c.orig 2001-04-26 15:30:03 UTC +++ src/aafire.c @@ -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 (); [FILE:915:dragonfly/patch-src_aarender.c] --- src/aarender.c.orig 2001-04-26 14:37:31 UTC +++ src/aarender.c @@ -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, __ 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)) [FILE:1148:freebsd/patch-src_aafire.c] --- src/aafire.c.orig 2001-04-26 15:30:03 UTC +++ src/aafire.c @@ -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 (); [FILE:915:freebsd/patch-src_aarender.c] --- src/aarender.c.orig 2001-04-26 14:37:31 UTC +++ src/aarender.c @@ -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, __ 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)) [FILE:1148:midnightbsd/patch-src_aafire.c] --- src/aafire.c.orig 2001-04-26 15:30:03 UTC +++ src/aafire.c @@ -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 (); [FILE:915:midnightbsd/patch-src_aarender.c] --- src/aarender.c.orig 2001-04-26 14:37:31 UTC +++ src/aarender.c @@ -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, __ 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))