summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/bb')
-rw-r--r--app-misc/bb/Manifest1
-rw-r--r--app-misc/bb/bb-1.3.0_rc1-r3.ebuild64
-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-zbuff-fault.patch35
-rw-r--r--app-misc/bb/metadata.xml11
9 files changed, 617 insertions, 0 deletions
diff --git a/app-misc/bb/Manifest b/app-misc/bb/Manifest
new file mode 100644
index 000000000000..f0828061abec
--- /dev/null
+++ b/app-misc/bb/Manifest
@@ -0,0 +1 @@
+DIST bb-1.3rc1.tar.gz 1416292 SHA256 793d88c872793b6dab444cf5bab24f283ecb2f3502f1479ebbe41dd8e90b81c4 SHA512 f05eb741f1189038a5a63016437f8eaeb25eb001307561bfe8827701bc246873fec14462e586d5966dcd1c74cddaf346f4670254b712713625e139300817c0a9 WHIRLPOOL 3e56032a2dc593eb91418deb6ca13d641177068755b5ee5c7d836ff0e444e4f4a0f3453d3d841f7a6f4dae007b3188cccb2fc478aad6dc2f94684ac5221023c7
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..3232314295ba
--- /dev/null
+++ b/app-misc/bb/bb-1.3.0_rc1-r3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/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-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..94a1b8593946
--- /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>
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">aa-project</remote-id>
+ </upstream>
+</pkgmetadata>