summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaohan Chen2015-06-20 22:59:13 -0400
committerYaohan Chen2015-06-20 22:59:13 -0400
commited8fa463652ab0454e85a45c89c3f43702c665cc (patch)
tree19fec82cbb796884266201a55533f27534507034
downloadaur-allacrost-svn.tar.gz
Initial import
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD54
-rw-r--r--allacrost.desktop10
-rw-r--r--png15.patch104
4 files changed, 196 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b91de416321
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = allacrost-svn
+ pkgdesc = A single player 2D role-playing game inspired by classic console RPGs
+ pkgver = 2040
+ pkgrel = 1
+ url = http://www.allacrost.org/
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = boost
+ makedepends = subversion
+ makedepends = icoutils
+ depends = glu
+ depends = mesa
+ depends = qt4
+ depends = openal
+ depends = libvorbis
+ depends = sdl_ttf
+ conflicts = allacrost
+ options = !emptydirs
+ source = allacrost::svn+https://allacrost.svn.sourceforge.net/svnroot/allacrost/trunk/game
+ source = png15.patch
+ source = allacrost.desktop
+ md5sums = SKIP
+ md5sums = a649b2c6e764bb99cb5a6fda7f87a39c
+ md5sums = 0065e56f64dc81f3467f21f0f07bbc9c
+
+pkgname = allacrost-svn
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9b193233e03
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Contributor: Yaohan Chen <yaohan.chen@gmail.com>
+# Contributor: Jakob Gruber <jakob.gruber@gmail.com>
+# Contributor: Christoph Zeiler <rabyte*gmail>
+
+pkgname=allacrost-svn
+pkgver=2040
+pkgrel=1
+pkgdesc='A single player 2D role-playing game inspired by classic console RPGs'
+arch=('i686' 'x86_64')
+url='http://www.allacrost.org/'
+license=('GPL2')
+depends=('glu' 'mesa' 'qt4' 'openal' 'libvorbis' 'sdl_ttf')
+makedepends=('boost' 'subversion' 'icoutils')
+conflicts=('allacrost')
+options=('!emptydirs')
+source=(allacrost::svn+https://allacrost.svn.sourceforge.net/svnroot/allacrost/trunk/game
+png15.patch
+allacrost.desktop)
+md5sums=('SKIP'
+ 'a649b2c6e764bb99cb5a6fda7f87a39c'
+ '0065e56f64dc81f3467f21f0f07bbc9c')
+
+pkgver() {
+ cd "$srcdir/allacrost"
+ svnversion | tr -d [A-z]
+}
+
+prepare() {
+ cd "$srcdir/allacrost"
+ svn patch ../png15.patch
+}
+
+build() {
+ cd "$srcdir/allacrost"
+
+ # Build
+ autoreconf -i
+ ./configure --prefix=/usr
+
+ sed -i 's|bindir = ${prefix}/games|bindir = ${prefix}/bin|' Makefile
+ sed -i 's|datarootdir = ${prefix}/share/games|datarootdir = ${prefix}/share|' Makefile
+ make
+
+ # Extract icon
+ icotool -x img/logos/program_icon.ico
+ mv program_icon_*.png allacrost.png
+}
+
+package() {
+ install -D -m644 $srcdir/allacrost.desktop $pkgdir/usr/share/applications/allacrost.desktop
+ cd "$srcdir/allacrost"
+ make DESTDIR=$pkgdir install
+ install -D -m644 allacrost.png $pkgdir/usr/share/icons/allacrost.png
+}
diff --git a/allacrost.desktop b/allacrost.desktop
new file mode 100644
index 00000000000..3cdfdfda6f1
--- /dev/null
+++ b/allacrost.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=Allacrost
+Comment=A single player 2D role-playing game inspired by classic console RPGs
+Exec=allacrost
+Icon=allacrost
+Terminal=false
+StartupNotify=false
+Categories=Application;Game;RolePlaying;
diff --git a/png15.patch b/png15.patch
new file mode 100644
index 00000000000..616c3b2cdf2
--- /dev/null
+++ b/png15.patch
@@ -0,0 +1,104 @@
+Index: src/engine/video/image.cpp
+===================================================================
+--- src/engine/video/image.cpp (revision 2040)
++++ src/engine/video/image.cpp (working copy)
+@@ -684,9 +684,9 @@
+ png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING | PNG_TRANSFORM_EXPAND, NULL);
+
+ // grab the relevant data...
+- cols = info_ptr->width;
+- rows = info_ptr->height;
+- bpp = info_ptr->channels * 8;
++ cols = png_get_image_width(png_ptr, info_ptr);
++ rows = png_get_image_height(png_ptr, info_ptr);
++ bpp = png_get_channels(png_ptr, info_ptr) * 8;
+
+ // and clean up.
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+Index: src/engine/video/image_base.cpp
+===================================================================
+--- src/engine/video/image_base.cpp (revision 2040)
++++ src/engine/video/image_base.cpp (working copy)
+@@ -261,9 +261,9 @@
+ uint8** row_pointers = png_get_rows(png_ptr, info_ptr);
+
+ // copy metadata
+- width = info_ptr->width;
+- height = info_ptr->height;
+- pixels = malloc(info_ptr->width * info_ptr->height * 4);
++ width = png_get_image_width(png_ptr, info_ptr);
++ height = png_get_image_height(png_ptr, info_ptr);
++ pixels = malloc(width * height * 4);
+
+ // check that we were able to allocate enough memory for the PNG
+ if (pixels == NULL) {
+@@ -276,18 +276,21 @@
+ // convert the damn thing so that it works in our format
+ // this is mostly just byteswapping and adding extra data - we want everything in four channels
+ // for the moment, anyway
+- uint32 bpp = info_ptr->channels;
++ uint32 bpp = png_get_channels(png_ptr, info_ptr);
+ uint8* img_pixel = NULL;
+ uint8* dst_pixel = NULL;
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) {
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE) {
+ // colours come from a palette - for this colour type, we have to look up the colour from the palette
++ png_colorp palette;
++ int num_palette;
++ png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette);
+ png_color c;
+- for (uint32 y = 0; y < info_ptr->height; y++) {
+- for (uint32 x = 0; x < info_ptr->width; x++) {
++ for (uint32 y = 0; y < height; y++) {
++ for (uint32 x = 0; x < width; x++) {
+ img_pixel = row_pointers[y] + (x * bpp);
+- dst_pixel = ((uint8*)pixels) + ((y * info_ptr->width) + x) * 4;
+- c = info_ptr->palette[img_pixel[0]];
++ dst_pixel = ((uint8*)pixels) + ((y * width) + x) * 4;
++ c = palette[img_pixel[0]];
+
+ dst_pixel[0] = c.red;
+ dst_pixel[1] = c.green;
+@@ -297,10 +300,10 @@
+ }
+ }
+ else if (bpp == 1) {
+- for (uint32 y = 0; y < info_ptr->height; y++) {
+- for (uint32 x = 0; x < info_ptr->width; x++) {
++ for (uint32 y = 0; y < height; y++) {
++ for (uint32 x = 0; x < width; x++) {
+ img_pixel = row_pointers[y] + (x * bpp);
+- dst_pixel = ((uint8*)pixels) + ((y * info_ptr->width) + x) * 4;
++ dst_pixel = ((uint8*)pixels) + ((y * width) + x) * 4;
+ dst_pixel[0] = img_pixel[0];
+ dst_pixel[1] = img_pixel[0];
+ dst_pixel[2] = img_pixel[0];
+@@ -309,10 +312,10 @@
+ }
+ }
+ else if (bpp == 3) {
+- for (uint32 y = 0; y < info_ptr->height; y++) {
+- for (uint32 x = 0; x < info_ptr->width; x++) {
++ for (uint32 y = 0; y < height; y++) {
++ for (uint32 x = 0; x < width; x++) {
+ img_pixel = row_pointers[y] + (x * bpp);
+- dst_pixel = ((uint8*)pixels) + ((y * info_ptr->width) + x) * 4;
++ dst_pixel = ((uint8*)pixels) + ((y * width) + x) * 4;
+ dst_pixel[0] = img_pixel[0];
+ dst_pixel[1] = img_pixel[1];
+ dst_pixel[2] = img_pixel[2];
+@@ -321,10 +324,10 @@
+ }
+ }
+ else if (bpp == 4) {
+- for (uint32 y = 0; y < info_ptr->height; y++) {
+- for (uint32 x = 0; x < info_ptr->width; x++) {
++ for (uint32 y = 0; y < height; y++) {
++ for (uint32 x = 0; x < width; x++) {
+ img_pixel = row_pointers[y] + (x * bpp);
+- dst_pixel = ((uint8*)pixels) + ((y * info_ptr->width) + x) * 4;
++ dst_pixel = ((uint8*)pixels) + ((y * width) + x) * 4;
+ dst_pixel[0] = img_pixel[0];
+ dst_pixel[1] = img_pixel[1];
+ dst_pixel[2] = img_pixel[2];