summaryrefslogtreecommitdiff
path: root/app-misc/bb
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-misc/bb
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-misc/bb')
-rw-r--r--app-misc/bb/Manifest12
-rw-r--r--app-misc/bb/bb-1.3.0_rc1-r3.ebuild63
-rw-r--r--app-misc/bb/bb-1.3.0_rc1-r4.ebuild66
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-disable-pulse.patch23
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-fix-protos.patch15
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-m4-stuff.patch396
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-messager-overlap.patch25
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-noattr.patch15
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-printf-cleanup.patch55
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-protos.patch16
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-zbuff-fault.patch35
-rw-r--r--app-misc/bb/metadata.xml11
12 files changed, 732 insertions, 0 deletions
diff --git a/app-misc/bb/Manifest b/app-misc/bb/Manifest
new file mode 100644
index 000000000000..3639aba3bd3a
--- /dev/null
+++ b/app-misc/bb/Manifest
@@ -0,0 +1,12 @@
+AUX bb-1.3.0_rc1-disable-pulse.patch 803 BLAKE2B a93fa403f76b8edbc3425be071b3a9ee1b8c6c7926f54539fe31ea9348bcf14b145224b1b0e9dd7ec6306ec3ed6ec236c02a2177e08ecd367e6e43fcbe5ffa2e SHA512 97f5255b19ea80c68eaa53aa6c9db55ad5e38e9749db24ba035ab5894cd5f9675dc0bbe695ec78d3e41037d771f669b9cf792feb41c0acc615b53cdf9eefbc1f
+AUX bb-1.3.0_rc1-fix-protos.patch 369 BLAKE2B 97b101ccb06cc8442928e55ef8e7b4acffbb2995eae6671cfa10c6787818a49cc8e3d76ec6a4577b8b49dd807c1ff87446ac792f460242fe1102b2b3e1c81298 SHA512 0f078053b9fed2a20cdd02b606ab7172ac3210f975ee3965a7a8699acd9b8c9a12e1c8119cc916a408db8df5572ce5d1b6d78a1956f055261b74abc4ce9fb960
+AUX bb-1.3.0_rc1-m4-stuff.patch 16358 BLAKE2B 7bac36976a4f024b2cc09011dc10cef4b315299d21356858b85547e3c2d0627a12b7ad4eb56230d065afcb1b255923ea1b9204969b6dcb1db5413534b1ea5c04 SHA512 cfa47a1aa4c602b789c9b6d8fd9b163639971f270c66030a4219b65169ddc83ed5c917665195c6533afb45364ac1d8a45879d341421e9e9c5e8ea44edb57087d
+AUX bb-1.3.0_rc1-messager-overlap.patch 1623 BLAKE2B d62400fa49b2bf57ade223eb14960500391a155cdedbccee7096b7c2688e5f68681bcc5d378099061a534c45d20c43b9e799bcf38af54e4a21326203c42f8508 SHA512 745dd6e5ed1bd1760509183ea4884f575b035165f6c0b9be804dbb28378ed39c899562c75aa1db8e006bff23734181fd5604092adae31de71685b728f78a173b
+AUX bb-1.3.0_rc1-noattr.patch 509 BLAKE2B c13edb1874a0ac334c86f35c76ebc9175e6c965f54a02f62018e322c520da619cdc36f9d69e8dd8d05c71a13232ca38d8901652491d5a20576fa46edd9ceec48 SHA512 e7c4831d8286db8afa0710a11d150e254d6fc738f91d45be6aaeddfcbdf4c530c1cc21091f967d9ba8ef6a399321d6c3ccf194d686a1a77861c72eb60454726c
+AUX bb-1.3.0_rc1-printf-cleanup.patch 2885 BLAKE2B 8e98079763901a468e11344f3f0553d1d335ae5d41a045f75ffe9093bf4bc6b9bc5579bc414fb8013670024cbc5ff3c0bb8bdf74bc77868d79e8b3d63b6ed1bb SHA512 c7181ace0914f9aac7963c473019058fe4d7340337fc19d06ae252bb6bfb2c96b9883915a903f419fb706916796906497c77ad4180d9d861a2a255959b1507de
+AUX bb-1.3.0_rc1-protos.patch 297 BLAKE2B f024f5ddf8567b04fd794c4ac5b9b1cab10ac979d6262657eea8b54ad05d6e1134d4a87251cc2a5fcb9366934772c55755421ee12e87a89a27df9c8ffff35415 SHA512 5e59bb912f1a5187e6a23fc9a66ddbed6e48c12074fd4d74b19fb88bc94aa39b8df27d62cfe8f7856a9e434f2be15261522a4150cb0f92588b53c99e33b853de
+AUX bb-1.3.0_rc1-zbuff-fault.patch 1105 BLAKE2B a6d183c91eb9a9f4c6f0095a6d36fe94931b27daaaf56e04c8b177d2fd77f583e6a267a06894a64b59e05a7749e39ae8bd6898466277b779aa98b1da811e06f6 SHA512 10159f628d993058074d6c97001acad2bc4c71df4331cea2f0d6c1b8bd8c578e230d2cc2e4313457c75252108ab136a1ccc8a626a760fcd4e024b6a370ed1e59
+DIST bb-1.3rc1.tar.gz 1416292 BLAKE2B 342a11002a94f160de23739c5578acf685ff886ae66e182b33cd971b74b258bae6ecd7e9e795f1e6a53a062a4c0ba5296bdbb6f41dd8cca6be4550bb49943023 SHA512 f05eb741f1189038a5a63016437f8eaeb25eb001307561bfe8827701bc246873fec14462e586d5966dcd1c74cddaf346f4670254b712713625e139300817c0a9
+EBUILD bb-1.3.0_rc1-r3.ebuild 1799 BLAKE2B 920436513b8477421a225f68e2e685974f386bad559d7d8c95fef731434650c34e93788012526c61e3d570d58164e1938e0e94e3110485b454379754ec4cb9a6 SHA512 8ea1fe26660536ac59f49d8d7769eaf80e38e12bee8109915700f540c18f215ae779fe8f3825d0c1f19a0164fbcca9cea1170ca11a9ddbbc71fca642b0f264f0
+EBUILD bb-1.3.0_rc1-r4.ebuild 1959 BLAKE2B b011a6ff3f9ea885338d19d8690e875f7de7f74f58b27ed35fb4ce34df59e477f0973efcd46f8e9947aa1c0614eabaef6a18aeda16facb66385484c5487150b4 SHA512 ed6d7a39c2cd45482a0c723eb502b3a59f26a273d2388d3019705f55c03e9a7fc7f82a30a7f4389c09d5a0ca9f5973b3bdaebca97c532e31443620e3ab3dbde2
+MISC metadata.xml 331 BLAKE2B cc3fc6a0098a1ff90cc8805de2c65f68e003a2f707f88567962821295a7a0be3d9e970ea1271f931a46107b034e5dcbd46f254d816525d79f3bac8ee22855082 SHA512 12b5d682065c1178989edc16c08b82bd57833e161e647fa81dfee06a55c2147b5229093196b2157bc8ca421c9fd459ce015fb5dac2de1e35e1ad908d2120e0ed
diff --git a/app-misc/bb/bb-1.3.0_rc1-r3.ebuild b/app-misc/bb/bb-1.3.0_rc1-r3.ebuild
new file mode 100644
index 000000000000..467732903e63
--- /dev/null
+++ b/app-misc/bb/bb-1.3.0_rc1-r3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils versionator
+
+MY_P="${PN}-$(get_version_component_range 1-2)$(get_version_component_range 4-4)"
+
+DESCRIPTION="Demonstration program for visual effects of aalib"
+HOMEPAGE="http://aa-project.sourceforge.net/"
+SRC_URI="mirror://sourceforge/aa-project/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="mikmod"
+
+DEPEND="media-libs/aalib:=
+ dev-libs/lzo:=
+ mikmod? ( media-libs/libmikmod:= )
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-noattr.patch"
+ epatch "${FILESDIR}/${P}-fix-protos.patch"
+ epatch "${FILESDIR}"/${P}-messager-overlap.patch
+ epatch "${FILESDIR}"/${P}-zbuff-fault.patch
+ epatch "${FILESDIR}"/${P}-printf-cleanup.patch
+ epatch "${FILESDIR}"/${P}-m4-stuff.patch
+
+ # unbundle lzo, #515286
+ rm -v README.LZO minilzo.{c,h} mylzo.h || die
+ sed -e 's/minilzo.c//' \
+ -e 's/minilzo.h//' \
+ -e 's/README.LZO//' \
+ -i Makefile.am || die
+ echo 'bb_LDADD = -llzo2' >> Makefile.am || die
+ # update code
+ sed -e 's,#include "minilzo.h",#include <lzo/lzo1x.h>,' \
+ -e 's,int size = image,lzo_uint size = image,' \
+ -i image.c || die
+
+ # rename binary and manpage bb -> bb-aalib
+
+ mv bb.1 bb-aalib.1 || die
+ sed -e 's/bb/bb-aalib/' \
+ -i bb-aalib.1
+ sed -e 's/bin_PROGRAMS = bb/bin_PROGRAMS = bb-aalib/' \
+ -e 's/man_MANS = bb.1/man_MANS = bb-aalib.1/' \
+ -e 's/bb_SOURCES/bb_aalib_SOURCES/' \
+ -e 's/bb_LDADD/bb_aalib_LDADD/' \
+ -i Makefile.am || die
+
+ AT_M4DIR="m4" eautoreconf
+}
+
+pkg_postinst() {
+ elog "bb binary has been renamed to bb-aalib to avoid a naming conflict with sys-apps/busybox."
+}
diff --git a/app-misc/bb/bb-1.3.0_rc1-r4.ebuild b/app-misc/bb/bb-1.3.0_rc1-r4.ebuild
new file mode 100644
index 000000000000..668b4f4df30b
--- /dev/null
+++ b/app-misc/bb/bb-1.3.0_rc1-r4.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils versionator
+
+MY_P="${PN}-$(get_version_component_range 1-2)$(get_version_component_range 4-4)"
+
+DESCRIPTION="Demonstration program for visual effects of aalib"
+HOMEPAGE="http://aa-project.sourceforge.net/"
+SRC_URI="mirror://sourceforge/aa-project/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="mikmod"
+
+DEPEND="media-libs/aalib:=
+ dev-libs/lzo:=
+ mikmod? ( media-libs/libmikmod:=[openal] )
+"
+# media-libs/libmikmod[openal] is due to bug #516964
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-noattr.patch
+ epatch "${FILESDIR}"/${P}-fix-protos.patch
+ epatch "${FILESDIR}"/${P}-messager-overlap.patch
+ epatch "${FILESDIR}"/${P}-zbuff-fault.patch
+ epatch "${FILESDIR}"/${P}-printf-cleanup.patch
+ epatch "${FILESDIR}"/${P}-m4-stuff.patch
+ epatch "${FILESDIR}"/${P}-protos.patch
+ epatch "${FILESDIR}"/${P}-disable-pulse.patch
+
+ # unbundle lzo, #515286
+ rm -v README.LZO minilzo.{c,h} mylzo.h || die
+ sed -e 's/minilzo.c//' \
+ -e 's/minilzo.h//' \
+ -e 's/README.LZO//' \
+ -i Makefile.am || die
+ echo 'bb_LDADD = -llzo2' >> Makefile.am || die
+ # update code
+ sed -e 's,#include "minilzo.h",#include <lzo/lzo1x.h>,' \
+ -e 's,int size = image,lzo_uint size = image,' \
+ -i image.c || die
+
+ # rename binary and manpage bb -> bb-aalib
+
+ mv bb.1 bb-aalib.1 || die
+ sed -e 's/bb/bb-aalib/' \
+ -i bb-aalib.1
+ sed -e 's/bin_PROGRAMS = bb/bin_PROGRAMS = bb-aalib/' \
+ -e 's/man_MANS = bb.1/man_MANS = bb-aalib.1/' \
+ -e 's/bb_SOURCES/bb_aalib_SOURCES/' \
+ -e 's/bb_LDADD/bb_aalib_LDADD/' \
+ -i Makefile.am || die
+
+ AT_M4DIR="m4" eautoreconf
+}
+
+pkg_postinst() {
+ elog "bb binary has been renamed to bb-aalib to avoid a naming conflict with sys-apps/busybox."
+}
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-disable-pulse.patch b/app-misc/bb/files/bb-1.3.0_rc1-disable-pulse.patch
new file mode 100644
index 000000000000..dcc00c642335
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-disable-pulse.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/516964
+diff --git a/main.c b/main.c
+index c0648b4..a9fac57 100644
+--- a/main.c
++++ b/main.c
+@@ -160,6 +160,17 @@ main (int argc, char *argv[])
+ aa_flush (context);
+ if (tolower (aa_getkey (context, 1)) != 'n')
+ {
++ /* Unfortunately recently added native pulseaudio
++ * driver in libmikmod does not allow you to
++ * call 'MikMod_Update' in a non-blocking way.
++ *
++ * It's a known limitation of simple pulseaudio API
++ * thus we derevisted pulseaudio driver to fallback
++ * on alsa, oss or whatever used to work for user.
++ */
++ drv_pulseaudio.Name = NULL;
++ drv_pulseaudio.Version = NULL;
++
+ MikMod_RegisterAllDrivers ();
+ MikMod_RegisterLoader (&load_s3m);
+ /*md_mode |= DMODE_SOFT_MUSIC; */
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-fix-protos.patch b/app-misc/bb/files/bb-1.3.0_rc1-fix-protos.patch
new file mode 100644
index 000000000000..577f306c8169
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-fix-protos.patch
@@ -0,0 +1,15 @@
+Fixes warning:
+main.c: In function 'load_song':
+main.c:56:23: warning: incompatible implicit declaration of built-in function 'strlen'
+diff --git a/main.c b/main.c
+index ae852a7..417ff62 100644
+--- a/main.c
++++ b/main.c
+@@ -21,6 +21,7 @@
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
++#include <string.h>
+ #include <unistd.h>
+ #include "timers.h"
+ #include "bb.h"
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-m4-stuff.patch b/app-misc/bb/files/bb-1.3.0_rc1-m4-stuff.patch
new file mode 100644
index 000000000000..0fa98f8162f5
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-m4-stuff.patch
@@ -0,0 +1,396 @@
+Fix aclocal failure on libmikmod-less systems
+
+commit 55b86efdc3e2a1febb593169b10ab252c75fdb10
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Tue Feb 7 10:59:09 2012 +0300
+
+ bb-1.3.0_rc1: bundle m4 source
+
+diff --git m4/aalib.m4 m4/aalib.m4
+new file mode 100644
+index 0000000..991fbda
+--- /dev/null
++++ m4/aalib.m4
+@@ -0,0 +1,169 @@
++# Configure paths for AALIB
++# Jan Hubicka 4/22/2001
++# stolen from Sam Lantinga 9/21/99
++# stolen from Manish Singh
++# stolen back from Frank Belew
++# stolen from Manish Singh
++# Shamelessly stolen from Owen Taylor
++
++dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
++dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS
++dnl
++AC_DEFUN([AM_PATH_AALIB],
++[dnl
++dnl Get the cflags and libraries from the aalib-config script
++dnl
++AC_ARG_WITH(aalib-prefix,[ --with-aalib-prefix=PFX Prefix where AALIB is installed (optional)],
++ aalib_prefix="$withval", aalib_prefix="")
++AC_ARG_WITH(aalib-exec-prefix,[ --with-aalib-exec-prefix=PFX Exec prefix where AALIB is installed (optional)],
++ aalib_exec_prefix="$withval", aalib_exec_prefix="")
++AC_ARG_ENABLE(aalibtest, [ --disable-aalibtest Do not try to compile and run a test AALIB program],
++ , enable_aalibtest=yes)
++
++ if test x$aalib_exec_prefix != x ; then
++ aalib_args="$aalib_args --exec-prefix=$aalib_exec_prefix"
++ if test x${AALIB_CONFIG+set} != xset ; then
++ AALIB_CONFIG=$aalib_exec_prefix/bin/aalib-config
++ fi
++ fi
++ if test x$aalib_prefix != x ; then
++ aalib_args="$aalib_args --prefix=$aalib_prefix"
++ if test x${AALIB_CONFIG+set} != xset ; then
++ AALIB_CONFIG=$aalib_prefix/bin/aalib-config
++ fi
++ fi
++
++ AC_PATH_PROG(AALIB_CONFIG, aalib-config, no)
++ min_aalib_version=ifelse([$1], ,0.11.0,$1)
++ AC_MSG_CHECKING(for AALIB - version >= $min_aalib_version)
++ no_aalib=""
++ if test "$AALIB_CONFIG" = "no" ; then
++ no_aalib=yes
++ else
++ AALIB_CFLAGS=`$AALIB_CONFIG $aalibconf_args --cflags`
++ AALIB_LIBS=`$AALIB_CONFIG $aalibconf_args --libs`
++
++ aalib_major_version=`$AALIB_CONFIG $aalib_args --version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
++ aalib_minor_version=`$AALIB_CONFIG $aalib_args --version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
++ aalib_micro_version=`$AALIB_CONFIG $aalib_config_args --version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
++ if test "x$enable_aalibtest" = "xyes" ; then
++ ac_save_CFLAGS="$CFLAGS"
++ ac_save_LIBS="$LIBS"
++ CFLAGS="$CFLAGS $AALIB_CFLAGS"
++ LIBS="$LIBS $AALIB_LIBS"
++dnl
++dnl Now check if the installed AALIB is sufficiently new. (Also sanity
++dnl checks the results of aalib-config to some extent
++dnl
++ rm -f conf.aalibtest
++ AC_TRY_RUN([
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include "aalib.h"
++
++char*
++my_strdup (char *str)
++{
++ char *new_str;
++
++ if (str)
++ {
++ new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
++ strcpy (new_str, str);
++ }
++ else
++ new_str = NULL;
++
++ return new_str;
++}
++
++int main (int argc, char *argv[])
++{
++ int major, minor, micro;
++ char *tmp_version;
++
++ /* This hangs on some systems (?)
++ system ("touch conf.aalibtest");
++ */
++ { FILE *fp = fopen("conf.aalibtest", "a"); if ( fp ) fclose(fp); }
++
++ /* HP/UX 9 (%@#!) writes to sscanf strings */
++ tmp_version = my_strdup("$min_aalib_version");
++ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
++ printf("%s, bad version string\n", "$min_aalib_version");
++ exit(1);
++ }
++
++ if (($aalib_major_version > major) ||
++ (($aalib_major_version == major) && ($aalib_minor_version > minor)) ||
++ (($aalib_major_version == major) && ($aalib_minor_version == minor) && ($aalib_micro_version >= micro)))
++ {
++ return 0;
++ }
++ else
++ {
++ printf("\n*** 'aalib-config --version' returned %d.%d.%d, but the minimum version\n", $aalib_major_version, $aalib_minor_version, $aalib_micro_version);
++ printf("*** of AALIB required is %d.%d.%d. If aalib-config is correct, then it is\n", major, minor, micro);
++ printf("*** best to upgrade to the required version.\n");
++ printf("*** If aalib-config was wrong, set the environment variable AALIB_CONFIG\n");
++ printf("*** to point to the correct copy of aalib-config, and remove the file\n");
++ printf("*** config.cache before re-running configure\n");
++ return 1;
++ }
++}
++
++],, no_aalib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
++ CFLAGS="$ac_save_CFLAGS"
++ LIBS="$ac_save_LIBS"
++ fi
++ fi
++ if test "x$no_aalib" = x ; then
++ AC_MSG_RESULT(yes)
++ ifelse([$2], , :, [$2])
++ else
++ AC_MSG_RESULT(no)
++ if test "$AALIB_CONFIG" = "no" ; then
++ echo "*** The aalib-config script installed by AALIB could not be found"
++ echo "*** If AALIB was installed in PREFIX, make sure PREFIX/bin is in"
++ echo "*** your path, or set the AALIB_CONFIG environment variable to the"
++ echo "*** full path to aalib-config."
++ else
++ if test -f conf.aalibtest ; then
++ :
++ else
++ echo "*** Could not run AALIB test program, checking why..."
++ CFLAGS="$CFLAGS $AALIB_CFLAGS"
++ LIBS="$LIBS $AALIB_LIBS"
++ AC_TRY_LINK([
++#include <stdio.h>
++#include "AALIB.h"
++], [ return 0; ],
++ [ echo "*** The test program compiled, but did not run. This usually means"
++ echo "*** that the run-time linker is not finding AALIB or finding the wrong"
++ echo "*** version of AALIB. If it is not finding AALIB, you'll need to set your"
++ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
++ echo "*** to the installed location Also, make sure you have run ldconfig if that"
++ echo "*** is required on your system"
++ echo "***"
++ echo "*** If you have an old version installed, it is best to remove it, although"
++ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
++ [ echo "*** The test program failed to compile or link. See the file config.log for the"
++ echo "*** exact error that occured. This usually means AALIB was incorrectly installed"
++ echo "*** or that you have moved AALIB since it was installed. In the latter case, you"
++ echo "*** may want to edit the aalib-config script: $AALIB_CONFIG" ])
++ CFLAGS="$ac_save_CFLAGS"
++ LIBS="$ac_save_LIBS"
++ fi
++ fi
++ AALIB_CFLAGS=""
++ AALIB_LIBS=""
++ ifelse([$3], , :, [$3])
++ fi
++ AC_SUBST(AALIB_CFLAGS)
++ AC_SUBST(AALIB_LIBS)
++ rm -f conf.aalibtest
++])
+diff --git m4/libmikmod.m4 m4/libmikmod.m4
+new file mode 100644
+index 0000000..18feebe
+--- /dev/null
++++ m4/libmikmod.m4
+@@ -0,0 +1,207 @@
++# Configure paths for libmikmod
++#
++# Derived from glib.m4 (Owen Taylor 97-11-3)
++# Improved by Chris Butler
++#
++
++dnl AM_PATH_LIBMIKMOD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
++dnl Test for libmikmod, and define LIBMIKMOD_CFLAGS, LIBMIKMOD_LIBS and
++dnl LIBMIKMOD_LDADD
++dnl
++AC_DEFUN([AM_PATH_LIBMIKMOD],
++[dnl
++dnl Get the cflags and libraries from the libmikmod-config script
++dnl
++AC_ARG_WITH(libmikmod-prefix,[ --with-libmikmod-prefix=PFX Prefix where libmikmod is installed (optional)],
++ libmikmod_config_prefix="$withval", libmikmod_config_prefix="")
++AC_ARG_WITH(libmikmod-exec-prefix,[ --with-libmikmod-exec-prefix=PFX Exec prefix where libmikmod is installed (optional)],
++ libmikmod_config_exec_prefix="$withval", libmikmod_config_exec_prefix="")
++AC_ARG_ENABLE(libmikmodtest, [ --disable-libmikmodtest Do not try to compile and run a test libmikmod program],
++ , enable_libmikmodtest=yes)
++
++ if test x$libmikmod_config_exec_prefix != x ; then
++ libmikmod_config_args="$libmikmod_config_args --exec-prefix=$libmikmod_config_exec_prefix"
++ if test x${LIBMIKMOD_CONFIG+set} != xset ; then
++ LIBMIKMOD_CONFIG=$libmikmod_config_exec_prefix/bin/libmikmod-config
++ fi
++ fi
++ if test x$libmikmod_config_prefix != x ; then
++ libmikmod_config_args="$libmikmod_config_args --prefix=$libmikmod_config_prefix"
++ if test x${LIBMIKMOD_CONFIG+set} != xset ; then
++ LIBMIKMOD_CONFIG=$libmikmod_config_prefix/bin/libmikmod-config
++ fi
++ fi
++
++ AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config, no)
++ min_libmikmod_version=ifelse([$1], ,3.1.5,$1)
++ AC_MSG_CHECKING(for libmikmod - version >= $min_libmikmod_version)
++ no_libmikmod=""
++ if test "$LIBMIKMOD_CONFIG" = "no" ; then
++ no_libmikmod=yes
++ else
++ LIBMIKMOD_CFLAGS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --cflags`
++ LIBMIKMOD_LIBS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --libs`
++ LIBMIKMOD_LDADD=`$LIBMIKMOD_CONFIG $libmikmod_config_args --ldadd`
++ libmikmod_config_major_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'`
++ libmikmod_config_minor_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'`
++ libmikmod_config_micro_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'`
++ if test "x$enable_libmikmodtest" = "xyes" ; then
++ ac_save_CFLAGS="$CFLAGS"
++ ac_save_LIBS="$LIBS"
++ AC_LANG_SAVE
++ AC_LANG_C
++ CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS $LIBMIKMOD_LDADD"
++ LIBS="$LIBMIKMOD_LIBS $LIBS"
++dnl
++dnl Now check if the installed libmikmod is sufficiently new. (Also sanity
++dnl checks the results of libmikmod-config to some extent
++dnl
++ rm -f conf.mikmodtest
++ AC_TRY_RUN([
++#include <mikmod.h>
++#include <stdio.h>
++#include <stdlib.h>
++
++char* my_strdup (char *str)
++{
++ char *new_str;
++
++ if (str) {
++ new_str = malloc ((strlen (str) + 1) * sizeof(char));
++ strcpy (new_str, str);
++ } else
++ new_str = NULL;
++
++ return new_str;
++}
++
++int main()
++{
++ int major,minor,micro;
++ int libmikmod_major_version,libmikmod_minor_version,libmikmod_micro_version;
++ char *tmp_version;
++
++ system("touch conf.mikmodtest");
++
++ /* HP/UX 9 (%@#!) writes to sscanf strings */
++ tmp_version = my_strdup("$min_libmikmod_version");
++ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
++ printf("%s, bad version string\n", "$min_libmikmod_version");
++ exit(1);
++ }
++
++ libmikmod_major_version=(MikMod_GetVersion() >> 16) & 255;
++ libmikmod_minor_version=(MikMod_GetVersion() >> 8) & 255;
++ libmikmod_micro_version=(MikMod_GetVersion() ) & 255;
++
++ if ((libmikmod_major_version != $libmikmod_config_major_version) ||
++ (libmikmod_minor_version != $libmikmod_config_minor_version) ||
++ (libmikmod_micro_version != $libmikmod_config_micro_version))
++ {
++ printf("\n*** 'libmikmod-config --version' returned %d.%d.%d, but libmikmod (%d.%d.%d)\n",
++ $libmikmod_config_major_version, $libmikmod_config_minor_version, $libmikmod_config_micro_version,
++ libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version);
++ printf ("*** was found! If libmikmod-config was correct, then it is best\n");
++ printf ("*** to remove the old version of libmikmod. You may also be able to fix the error\n");
++ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
++ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
++ printf("*** required on your system.\n");
++ printf("*** If libmikmod-config was wrong, set the environment variable LIBMIKMOD_CONFIG\n");
++ printf("*** to point to the correct copy of libmikmod-config, and remove the file config.cache\n");
++ printf("*** before re-running configure\n");
++ }
++ else if ((libmikmod_major_version != LIBMIKMOD_VERSION_MAJOR) ||
++ (libmikmod_minor_version != LIBMIKMOD_VERSION_MINOR) ||
++ (libmikmod_micro_version != LIBMIKMOD_REVISION))
++ {
++ printf("*** libmikmod header files (version %d.%d.%d) do not match\n",
++ LIBMIKMOD_VERSION_MAJOR, LIBMIKMOD_VERSION_MINOR, LIBMIKMOD_REVISION);
++ printf("*** library (version %d.%d.%d)\n",
++ libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version);
++ }
++ else
++ {
++ if ((libmikmod_major_version > major) ||
++ ((libmikmod_major_version == major) && (libmikmod_minor_version > minor)) ||
++ ((libmikmod_major_version == major) && (libmikmod_minor_version == minor) && (libmikmod_micro_version >= micro)))
++ {
++ return 0;
++ }
++ else
++ {
++ printf("\n*** An old version of libmikmod (%d.%d.%d) was found.\n",
++ libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version);
++ printf("*** You need a version of libmikmod newer than %d.%d.%d.\n",
++ major, minor, micro);
++ printf("***\n");
++ printf("*** If you have already installed a sufficiently new version, this error\n");
++ printf("*** probably means that the wrong copy of the libmikmod-config shell script is\n");
++ printf("*** being found. The easiest way to fix this is to remove the old version\n");
++ printf("*** of libmikmod, but you can also set the LIBMIKMOD_CONFIG environment to point to the\n");
++ printf("*** correct copy of libmikmod-config. (In this case, you will have to\n");
++ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
++ printf("*** so that the correct libraries are found at run-time))\n");
++ }
++ }
++ return 1;
++}
++],, no_libmikmod=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
++ CFLAGS="$ac_save_CFLAGS"
++ LIBS="$ac_save_LIBS"
++ AC_LANG_RESTORE
++ fi
++ fi
++ if test "x$no_libmikmod" = x ; then
++ AC_MSG_RESULT([yes, `$LIBMIKMOD_CONFIG --version`])
++ ifelse([$2], , :, [$2])
++ else
++ AC_MSG_RESULT(no)
++ if test "$LIBMIKMOD_CONFIG" = "no" ; then
++ echo "*** The libmikmod-config script installed by libmikmod could not be found"
++ echo "*** If libmikmod was installed in PREFIX, make sure PREFIX/bin is in"
++ echo "*** your path, or set the LIBMIKMOD_CONFIG environment variable to the"
++ echo "*** full path to libmikmod-config."
++ else
++ if test -f conf.mikmodtest ; then
++ :
++ else
++ echo "*** Could not run libmikmod test program, checking why..."
++ CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS"
++ LIBS="$LIBS $LIBMIKMOD_LIBS"
++ AC_LANG_SAVE
++ AC_LANG_C
++ AC_TRY_LINK([
++#include <mikmod.h>
++#include <stdio.h>
++], [ return (MikMod_GetVersion()!=0); ],
++ [ echo "*** The test program compiled, but did not run. This usually means"
++ echo "*** that the run-time linker is not finding libmikmod or finding the wrong"
++ echo "*** version of libmikmod. If it is not finding libmikmod, you'll need to set your"
++ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
++ echo "*** to the installed location. Also, make sure you have run ldconfig if that"
++ echo "*** is required on your system."
++ echo "***"
++ echo "*** If you have an old version installed, it is best to remove it, although"
++ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
++ [ echo "*** The test program failed to compile or link. See the file config.log for the"
++ echo "*** exact error that occured. This usually means libmikmod was incorrectly installed"
++ echo "*** or that you have moved libmikmod since it was installed. In the latter case, you"
++ echo "*** may want to edit the libmikmod-config script: $LIBMIKMOD_CONFIG" ])
++ CFLAGS="$ac_save_CFLAGS"
++ LIBS="$ac_save_LIBS"
++ AC_LANG_RESTORE
++ fi
++ fi
++ LIBMIKMOD_CFLAGS=""
++ LIBMIKMOD_LIBS=""
++ LIBMIKMOD_LDADD=""
++ ifelse([$3], , :, [$3])
++ fi
++ AC_SUBST(LIBMIKMOD_CFLAGS)
++ AC_SUBST(LIBMIKMOD_LIBS)
++ AC_SUBST(LIBMIKMOD_LDADD)
++ rm -f conf.mikmodtest
++])
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-messager-overlap.patch b/app-misc/bb/files/bb-1.3.0_rc1-messager-overlap.patch
new file mode 100644
index 000000000000..e46b75fd5815
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-messager-overlap.patch
@@ -0,0 +1,25 @@
+messager.c: fix memory overlap (fixes artefacts in scrolling text)
+
+==363== Source and destination overlap in memcpy(0xa066240, 0xa0662b8, 240)
+==363== at 0x4C2B220: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:838)
+==363== by 0x407D97: newline (messager.c:43)
+==363== by 0x407EE6: put (messager.c:54)
+==363== by 0x40806E: messager (messager.c:77)
+==363== by 0x403009: bb (bb.c:258)
+==363== by 0x407C06: main (main.c:202)
+
+diff --git a/messager.c b/messager.c
+index 95cc410..964080b 100644
+--- a/messager.c
++++ b/messager.c
+@@ -40,8 +40,8 @@ static void newline()
+ start = 0;
+ cursor_y++, cursor_x = 0;
+ if (cursor_y >= aa_scrheight(context)) {
+- memcpy(context->textbuffer + start * aa_scrwidth(context), context->textbuffer + (start + 1) * aa_scrwidth(context), aa_scrwidth(context) * (aa_scrheight(context) - start - 1));
+- memcpy(context->attrbuffer + start * aa_scrwidth(context), context->attrbuffer + (start + 1) * aa_scrwidth(context), aa_scrwidth(context) * (aa_scrheight(context) - start - 1));
++ memmove(context->textbuffer + start * aa_scrwidth(context), context->textbuffer + (start + 1) * aa_scrwidth(context), aa_scrwidth(context) * (aa_scrheight(context) - start - 1));
++ memmove(context->attrbuffer + start * aa_scrwidth(context), context->attrbuffer + (start + 1) * aa_scrwidth(context), aa_scrwidth(context) * (aa_scrheight(context) - start - 1));
+ memset(context->textbuffer + aa_scrwidth(context) * (aa_scrheight(context) - 1), ' ', aa_scrwidth(context));
+ memset(context->attrbuffer + aa_scrwidth(context) * (aa_scrheight(context) - 1), 0, aa_scrwidth(context));
+ cursor_y--;
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-noattr.patch b/app-misc/bb/files/bb-1.3.0_rc1-noattr.patch
new file mode 100644
index 000000000000..7a6f9474a71e
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-noattr.patch
@@ -0,0 +1,15 @@
+# remove __attribute__
+
+--- timers.h Thu Apr 26 18:04:22 2001
++++ timers.h Sun Dec 9 18:44:31 2007
+@@ -49,8 +49,8 @@
+ extern tl_group *syncgroup, *asyncgroup;
+ void tl_sleep (int);
+ void tl_allegromode (int mode); /*Just for djgpp */
+-int tl_lookup_timer (tl_timer * t) REGISTERS (3);
+-void tl_reset_timer (tl_timer * t) REGISTERS (3);
++int tl_lookup_timer (tl_timer * t);
++void tl_reset_timer (tl_timer * t);
+
+ struct timeemulator *tl_create_emulator(void);
+ void tl_free_emulator(struct timeemulator *t);
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-printf-cleanup.patch b/app-misc/bb/files/bb-1.3.0_rc1-printf-cleanup.patch
new file mode 100644
index 000000000000..da113795124b
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-printf-cleanup.patch
@@ -0,0 +1,55 @@
+zoom.c: cleanup protos
+
+x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -O2 -march=core2 -pipe -I/usr/include -pthread -D_REENTRANT -D SOUNDDIR=\"/usr/share/bb\" -c zoom.c
+zoom.c: In function 'mkrealloc_table':
+zoom.c:245:113: warning: format '%i' expects type 'int', but argument 3 has type 'long unsigned int'
+zoom.c:251:113: warning: format '%i' expects type 'int', but argument 3 has type 'long unsigned int'
+zoom.c:260:113: warning: format '%i' expects type 'int', but argument 3 has type 'long unsigned int'
+zoom.c: In function 'moveoldpoints':
+zoom.c:590:3: warning: format '%i' expects type 'int', but argument 3 has type 'long unsigned int'
+zoom.c:596:3: warning: format '%i' expects type 'int', but argument 3 has type 'long unsigned int'
+diff --git a/zoom.c b/zoom.c
+index 7450095..b86cc8b 100644
+--- a/zoom.c
++++ b/zoom.c
+@@ -241,13 +241,13 @@ static /*INLINE */ void mkrealloc_table(register number_t * pos, realloc_t * rea
+ #endif
+ if (dyndata == NULL) {
+ fprintf(stderr, "XaoS fatal error:Could not allocate memory for"
+- "temporary dynamical data of size:%i\n"
++ "temporary dynamical data of size:%li\n"
+ "I am unable to handle this problem so please resize to lower window\n", (size) * (DSIZE + 1) * sizeof(struct dyn_data) + size * sizeof(int) + size * sizeof(int));
+ return;
+ }
+ if (best == NULL) {
+ fprintf(stderr, "XaoS fatal error:Could not allocate memory for"
+- "temporary dynamical data of size:%i\n"
++ "temporary dynamical data of size:%li\n"
+ "I am unable to handle this problem so please resize to lower window\n", (size) * (DSIZE + 1) * sizeof(struct dyn_data) + size * sizeof(int) + size * sizeof(int));
+ #ifndef HAVE_ALLOCA
+ free(dyndata);
+@@ -256,7 +256,7 @@ static /*INLINE */ void mkrealloc_table(register number_t * pos, realloc_t * rea
+ }
+ if (best1 == NULL) {
+ fprintf(stderr, "XaoS fatal error:Could not allocate memory for"
+- "temporary dynamical data of size:%i\n"
++ "temporary dynamical data of size:%li\n"
+ "I am unable to handle this problem so please resize to lower window\n", (size) * (DSIZE + 1) * sizeof(struct dyn_data) + size * sizeof(int) + size * sizeof(int));
+ #ifndef HAVE_ALLOCA
+ free(dyndata);
+@@ -586,13 +586,13 @@ static /*INLINE */ void moveoldpoints(void)
+ #endif
+ if (size == NULL) {
+ fprintf(stderr, "XaoS fratal error:Could not allocate memory for"
+- "temporary dynamical data of size:%i\n"
++ "temporary dynamical data of size:%li\n"
+ "I am unable to handle this problem so please resize to lower window\n", 2 * d->width * sizeof(int));
+ return;
+ }
+ if (start == NULL) {
+ fprintf(stderr, "XaoS fratal error:Could not allocate memory for"
+- "temporary dynamical data of size:%i\n"
++ "temporary dynamical data of size:%li\n"
+ "I am unable to handle this problem so please resize to lower window\n", 2 * d->width * sizeof(int));
+ #ifndef HAVE_ALLOCA
+ free(size);
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-protos.patch b/app-misc/bb/files/bb-1.3.0_rc1-protos.patch
new file mode 100644
index 000000000000..aa3fc021e5c1
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-protos.patch
@@ -0,0 +1,16 @@
+diff --git a/bb.c b/bb.c
+index 95850ef..a394d00 100644
+--- a/bb.c
++++ b/bb.c
+@@ -27,2 +27,3 @@
+ #include <aalib.h>
++#include <time.h>
+ #include "bb.h"
+diff --git a/main.c b/main.c
+index 417ff62..c0648b4 100644
+--- a/main.c
++++ b/main.c
+@@ -23,2 +23,3 @@
+
++#include <ctype.h>
+ #include <string.h>
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-zbuff-fault.patch b/app-misc/bb/files/bb-1.3.0_rc1-zbuff-fault.patch
new file mode 100644
index 000000000000..b3e882ed55e9
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-zbuff-fault.patch
@@ -0,0 +1,35 @@
+tex.c: Fix out-of-bounds zbuff clearing
+
+> zbuff = (int *) malloc(X_s * Y_s * sizeof(int));
+> memset(zbuff, 0x55, (X_s * Y_s * sizeof(long)));
+
+Ouch! amd64: sizeof(long) == 8; sizeof (int) == 4
+
+Valgrind says:
+==4525== Invalid write of size 4
+==4525== at 0x4C2C3AF: memset (mc_replace_strmem.c:967)
+==4525== by 0x4122E0: clear_zbuff (tex.c:95)
+==4525== by 0x4144D8: disp3d (tex.c:292)
+==4525== by 0x40F3C6: scene5 (scene5.c:206)
+==4525== by 0x4031BC: bb (bb.c:325)
+==4525== by 0x407C56: main (main.c:202)
+==4525== Address 0xac9ef00 is 0 bytes after a block of size 34,992 alloc'd
+==4525== at 0x4C2996D: malloc (vg_replace_malloc.c:263)
+==4525== by 0x412283: set_zbuff (tex.c:85)
+==4525== by 0x40F347: scene5 (scene5.c:196)
+==4525== by 0x4031BC: bb (bb.c:325)
+==4525== by 0x407C56: main (main.c:202)
+
+diff --git a/tex.c b/tex.c
+index 9f2f99d..b390510 100644
+--- a/tex.c
++++ b/tex.c
+@@ -92,7 +92,7 @@ void unset_zbuff()
+
+ static inline void clear_zbuff()
+ {
+- memset(zbuff, 0x55, (X_s * Y_s * sizeof(long)));
++ memset(zbuff, 0x55, (X_s * Y_s * sizeof(int)));
+ }
+
+
diff --git a/app-misc/bb/metadata.xml b/app-misc/bb/metadata.xml
new file mode 100644
index 000000000000..401e82106a05
--- /dev/null
+++ b/app-misc/bb/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">aa-project</remote-id>
+ </upstream>
+</pkgmetadata>