summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Werkmeister2015-08-12 14:20:57 +0200
committerLucas Werkmeister2015-08-12 14:20:57 +0200
commitbabcc48f80fe8ba3d4a2b7709e89462d84671eac (patch)
treea202f70ec6d76152504119f6af5f330226f2e83f
downloadaur-babcc48f80fe8ba3d4a2b7709e89462d84671eac.tar.gz
Initial import
Source: http://pkgbuild.com/git/aur-mirror.git/tree/bb/ Changes: - add myself as maintainer - indent with four spaces - add .SRCINFO, generated by mksrcinfo
-rw-r--r--.SRCINFO31
-rw-r--r--PKGBUILD61
-rw-r--r--xaos-3.5-build-fix-i686.patch20
-rw-r--r--xaos-3.5-libpng15.patch131
4 files changed, 243 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1f0ddf82681d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = bb
+ pkgdesc = ASCII-art demo that uses AAlib
+ pkgver = 1.3rc1
+ pkgrel = 13
+ url = http://aa-project.sourceforge.net/bb/
+ arch = x86_64
+ arch = i686
+ license = GPL
+ makedepends = aalib
+ makedepends = allegro
+ depends = aalib
+ depends = glibc
+ depends = libx11
+ depends = ncurses
+ depends = libmikmod
+ depends = libxau
+ depends = libxdmcp
+ depends = allegro
+ source = http://ftp.debian.org/debian/pool/main/b/bb/bb_1.3rc1.orig.tar.gz
+ source = http://ftp.debian.org/debian/pool/main/b/bb/bb_1.3rc1-8.diff.gz
+ source = http://downloads.sourceforge.net/sourceforge/xaos/xaos-3.5.tar.gz
+ source = xaos-3.5-libpng15.patch
+ source = xaos-3.5-build-fix-i686.patch
+ sha256sums = 9355b9e0e73863aa473d312b40bb4b071e1d50a8f1c3db553ddf31e814e296c8
+ sha256sums = 918bed052b438e1b81f2f8dd960659d5ea73626254b530efe1dc8679b9b76df5
+ sha256sums = 471fa752154a8e4c4687797fe1241df1b3f82400b2ef4e6a603969a27cd74842
+ sha256sums = 177ac125fe109a8326df3326df5b50f3a416fa8b9e9703202aefaf7e50bcbe8e
+ sha256sums = f17252481e9f59d8a599321a7a48d0a336702112c5f1c4cb173e592b87448475
+
+pkgname = bb
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..dd5b0ff7cb40
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Lucas Werkmeister <mail@lucaswerkmeister.de>
+# Contributor: Alexander Rødseth <rodseth@gmail.com>
+# Contributor: Jacob Bang <julemand101@gmail.com>
+# Contributor: Eric Bélanger <eric@archlinux.org>
+# Contributor: Kesara Rathnayake <kesara@kesara.lk>
+
+pkgname=bb
+pkgver=1.3rc1
+pkgrel=13
+pkgdesc='ASCII-art demo that uses AAlib'
+arch=('x86_64' 'i686')
+url='http://aa-project.sourceforge.net/bb/'
+license=('GPL')
+makedepends=('aalib' 'allegro')
+depends=('aalib' 'glibc' 'libx11' 'ncurses' 'libmikmod' 'libxau' 'libxdmcp' 'allegro')
+source=("http://ftp.debian.org/debian/pool/main/b/bb/${pkgname}_$pkgver.orig.tar.gz"
+ "http://ftp.debian.org/debian/pool/main/b/bb/${pkgname}_$pkgver-8.diff.gz"
+ 'http://downloads.sourceforge.net/sourceforge/xaos/xaos-3.5.tar.gz'
+ 'xaos-3.5-libpng15.patch'
+ 'xaos-3.5-build-fix-i686.patch')
+sha256sums=('9355b9e0e73863aa473d312b40bb4b071e1d50a8f1c3db553ddf31e814e296c8'
+ '918bed052b438e1b81f2f8dd960659d5ea73626254b530efe1dc8679b9b76df5'
+ '471fa752154a8e4c4687797fe1241df1b3f82400b2ef4e6a603969a27cd74842'
+ '177ac125fe109a8326df3326df5b50f3a416fa8b9e9703202aefaf7e50bcbe8e'
+ 'f17252481e9f59d8a599321a7a48d0a336702112c5f1c4cb173e592b87448475')
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver.orig"
+
+ # patch bb
+ patch -Np1 -i "../${pkgname}_$pkgver-8.diff"
+
+ # patch xaos
+ cd "$srcdir/xaos-3.5"
+ patch -p0 -i ../xaos-3.5-libpng15.patch
+ if [[ $CARCH == "i686" ]]; then
+ patch -p1 -i ../xaos-3.5-build-fix-i686.patch
+ fi
+
+ # use timers.h and timers.c from xaos
+ cd "$srcdir/$pkgname-$pkgver.orig"
+ cp -vf "$srcdir/xaos-3.5/src/include/timers.h" .
+ cp -vf "$srcdir/xaos-3.5/src/util/timers.c" .
+ ln -sf "$srcdir/xaos-3.5/src/include" ..
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver.orig"
+
+ autoconf
+ ./configure --prefix=/usr
+
+ # enabling allegro or using clang doesn't help, ie CC='clang -D USE_ALLEGRO'
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver.orig"
+
+ make DESTDIR="$pkgdir" install
+}
diff --git a/xaos-3.5-build-fix-i686.patch b/xaos-3.5-build-fix-i686.patch
new file mode 100644
index 000000000000..4736dd389b5a
--- /dev/null
+++ b/xaos-3.5-build-fix-i686.patch
@@ -0,0 +1,20 @@
+--- xaos-3.5/src/engine/zoomd.c.orig 2009-07-18 00:50:31.000000000 +0100
++++ xaos-3.5/src/engine/zoomd.c 2012-05-20 19:04:55.891065437 +0100
+@@ -280,6 +280,7 @@ dosymetry2(void /*@unused@ */ *data, str
+ #endif
+ #undef bpp1
+
++REGISTERS(0)
+ static INLINE void fillline(int line)
+ {
+ register unsigned char *RESTRICT vbuff = cimage.currlines[line];
+--- xaos-3.5/src/engine/zoom.c.fix-build 2009-07-18 00:50:31.000000000 +0100
++++ xaos-3.5/src/engine/zoom.c 2012-05-20 19:11:53.625083113 +0100
+@@ -933,6 +933,7 @@ static /*INLINE */ void preparemoveoldpo
+ }
+
+ #ifndef USE_i386ASM
++REGISTERS(0)
+ static /*INLINE */ void
+ moveoldpoints(void /*@unused@ */ *data1,
+ struct taskinfo /*@unused@ */ *task,
diff --git a/xaos-3.5-libpng15.patch b/xaos-3.5-libpng15.patch
new file mode 100644
index 000000000000..beece8339e31
--- /dev/null
+++ b/xaos-3.5-libpng15.patch
@@ -0,0 +1,131 @@
+http://code.google.com/p/gnuxaos/issues/detail?id=55
+
+--- src/util/png.c
++++ src/util/png.c
+@@ -3,6 +3,7 @@
+ #include <aconfig.h>
+ #ifdef USE_PNG
+ #include <png.h>
++#include <zlib.h>
+ #endif
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -31,6 +32,9 @@
+ png_structp png_ptr;
+ png_infop info_ptr;
+ png_color palette[256];
++ png_color_8 sig_bit;
++ int color_type;
++ int bit_depth;
+ volatile unsigned short a = 255;
+ volatile unsigned char *b = (volatile unsigned char *) &a;
+ #ifdef _undefined_
+@@ -59,7 +63,7 @@
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+ return "No memory to create png info structure";
+ }
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ fclose(file);
+ return strerror(errno);
+@@ -78,57 +82,70 @@
+ png_set_compression_window_bits(png_ptr, 15);
+ png_set_compression_method(png_ptr, 8);
+
+- info_ptr->width = image->width;
+- info_ptr->height = image->height;
+- /*info_ptr->gamma=1.0; */
+- info_ptr->gamma = 0.5;
+- info_ptr->valid |= PNG_INFO_gAMA | PNG_INFO_pHYs;
+- info_ptr->x_pixels_per_unit = (png_uint_32) (100 / image->pixelwidth);
+- info_ptr->y_pixels_per_unit = (png_uint_32) (100 / image->pixelheight);
++ switch (image->palette->type)
++ {
++ case C256:
++ color_type = PNG_COLOR_TYPE_PALETTE;
++ bit_depth = image->bytesperpixel * 8;
++ break;
++ case SMALLITER:
++ case LARGEITER:
++ case GRAYSCALE:
++ color_type = PNG_COLOR_TYPE_GRAY;
++ bit_depth = image->bytesperpixel * 8;
++ break;
++ case TRUECOLOR:
++ case TRUECOLOR24:
++ case TRUECOLOR16:
++ color_type = PNG_COLOR_TYPE_RGB;
++ bit_depth = 8;
++ break;
++ }
+
++ png_set_IHDR (png_ptr, info_ptr, image->width, image->height, bit_depth,
++ color_type, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE,
++ PNG_FILTER_TYPE_BASE);
+
+ switch (image->palette->type) {
+ case C256:
+ {
+ int i;
+- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
+- info_ptr->bit_depth = image->bytesperpixel * 8;
+- info_ptr->palette = palette;
+- info_ptr->valid |= PNG_INFO_PLTE;
++ png_color png_palette[257];
++ int png_num_palette;
+ for (i = 0; i < image->palette->end; i++)
+- info_ptr->palette[i].red = image->palette->rgb[i][0],
+- info_ptr->palette[i].green = image->palette->rgb[i][1],
+- info_ptr->palette[i].blue = image->palette->rgb[i][2],
+- info_ptr->num_palette = image->palette->end;
++ png_palette[i].red = image->palette->rgb[i][0],
++ png_palette[i].green = image->palette->rgb[i][1],
++ png_palette[i].blue = image->palette->rgb[i][2],
++ png_num_palette = image->palette->end;
++ png_set_PLTE(png_ptr, info_ptr, png_palette, png_num_palette);
+ }
+ break;
+- case SMALLITER:
+- case LARGEITER:
+- case GRAYSCALE:
+- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
+- info_ptr->bit_depth = image->bytesperpixel * 8;
+- break;
+ case TRUECOLOR:
+ case TRUECOLOR24:
+ case TRUECOLOR16:
+- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+- info_ptr->bit_depth = 8;
+- info_ptr->sig_bit.red = 8 - image->palette->info.truec.rprec;
+- info_ptr->sig_bit.green = 8 - image->palette->info.truec.gprec;
+- info_ptr->sig_bit.blue = 8 - image->palette->info.truec.bprec;
++ sig_bit.red = 8 - image->palette->info.truec.rprec;
++ sig_bit.green = 8 - image->palette->info.truec.gprec;
++ sig_bit.blue = 8 - image->palette->info.truec.bprec;
++ png_set_sBIT(png_ptr, info_ptr, &sig_bit);
+ break;
+ }
+- info_ptr->interlace_type = 0;
++
++ png_write_info (png_ptr, info_ptr);
++
+ #ifdef _undefined_
+ png_set_text(png_ptr, info_ptr, comments,
+ sizeof(comments) / sizeof(png_text));
+ #endif
+
+- png_write_info(png_ptr, info_ptr);
++ png_set_gAMA(png_ptr, info_ptr, 0.5 /* 1.0 */);
++ png_set_pHYs(png_ptr, info_ptr, (png_uint_32) (100 / image->pixelwidth),
++ (png_uint_32) (100 / image->pixelheight),
++ PNG_RESOLUTION_UNKNOWN);
++
+ /*png_set_filler(png_ptr,0,PNG_FILLER_AFTER); */
+ png_set_packing(png_ptr);
+ if (image->palette->type & (TRUECOLOR | TRUECOLOR24 | TRUECOLOR16))
+- png_set_shift(png_ptr, &(info_ptr->sig_bit));
++ png_set_shift (png_ptr, &sig_bit);
+ if (*b == 255)
+ png_set_swap(png_ptr);
+ png_set_bgr(png_ptr);