diff options
Diffstat (limited to 'community/directfb')
-rw-r--r-- | community/directfb/DirectFB-1.4.9-libpng-1.5.patch | 74 | ||||
-rw-r--r-- | community/directfb/PKGBUILD | 22 | ||||
-rw-r--r-- | community/directfb/directfb-missing_include.patch | 376 |
3 files changed, 429 insertions, 43 deletions
diff --git a/community/directfb/DirectFB-1.4.9-libpng-1.5.patch b/community/directfb/DirectFB-1.4.9-libpng-1.5.patch index e428afbaf..65470ea8f 100644 --- a/community/directfb/DirectFB-1.4.9-libpng-1.5.patch +++ b/community/directfb/DirectFB-1.4.9-libpng-1.5.patch @@ -115,39 +115,7 @@ index 6d65ea3..7d82c5c 100644 if (!trans[i]) { palette[i].red = (key & 0xff0000) >> 16; palette[i].green = (key & 0x00ff00) >> 8; -@@ -625,20 +636,23 @@ png_info_callback( png_structp png_read_ptr, - } - else { - /* ...or based on trans rgb value */ -- png_color_16p trans = &data->info_ptr->trans_color; -- -- data->color_key = (((trans->red & 0xff00) << 8) | -- ((trans->green & 0xff00)) | -- ((trans->blue & 0xff00) >> 8)); -+ data->color_key = (((trans_color->red & 0xff00) << 8) | -+ ((trans_color->green & 0xff00)) | -+ ((trans_color->blue & 0xff00) >> 8)); - } - } - - switch (data->color_type) { - case PNG_COLOR_TYPE_PALETTE: { -- png_colorp palette = data->info_ptr->palette; -- png_bytep trans = data->info_ptr->trans_alpha; -- int num_trans = data->info_ptr->num_trans; -- int num_colors = MIN( MAXCOLORMAPSIZE, data->info_ptr->num_palette ); -+ png_colorp palette; -+ png_bytep trans; -+ png_color_16p trans_color; -+ int num_trans; -+ int num_colors; -+ -+ png_get_PLTE( data->png_ptr, data->info_ptr, &palette, &num_colors ); -+ num_colors = MIN( MAXCOLORMAPSIZE, num_colors ); -+ png_get_tRNS( data->png_ptr, data->info_ptr, &trans, &num_trans, &trans_color ); - - for (i=0; i<num_colors; i++) { - data->colors[i].a = (i < num_trans) ? trans[i] : 0xff; + -- 1.7.4.1 @@ -242,3 +210,43 @@ index 96e4220..d4b6bf4 100644 -- 1.7.4.1 +--- a/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c 2012-02-14 19:04:52.000000000 -0500 ++++ b/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c 2012-02-14 19:07:18.000000000 -0500 +@@ -710,10 +709,15 @@ + + switch (data->color_type) { + case PNG_COLOR_TYPE_PALETTE: { +- png_colorp palette = data->info_ptr->palette; +- png_bytep trans = data->info_ptr->trans_alpha; +- int num_trans = data->info_ptr->num_trans; +- int num_colors = MIN( MAXCOLORMAPSIZE, data->info_ptr->num_palette ); ++ png_colorp palette; ++ png_bytep trans; ++ png_color_16p trans_color; ++ int num_trans; ++ int num_colors; ++ ++ png_get_PLTE( data->png_ptr, data->info_ptr, &palette, &num_colors ); ++ num_colors = MIN( MAXCOLORMAPSIZE, num_colors ); ++ png_get_tRNS( data->png_ptr, data->info_ptr, &trans, &num_trans, &trans_color ); + + for (i=0; i<num_colors; i++) { + data->colors[i].a = (i < num_trans) ? trans[i] : 0xff; +--- a/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c.old 2012-02-14 22:40:30.000000000 -0500 ++++ b/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c 2012-02-14 23:37:19.000000000 -0500 +@@ -638,12 +638,10 @@ + data->color_key = key; + } + else { +- /* ...or based on trans rgb value */ +- png_color_16p trans = &data->info_ptr->trans_color; + +- data->color_key = (((trans->red & 0xff00) << 8) | +- ((trans->green & 0xff00)) | +- ((trans->blue & 0xff00) >> 8)); ++ data->color_key = (((trans_color->red & 0xff00) << 8) | ++ ((trans_color->green & 0xff00)) | ++ ((trans_color->blue & 0xff00) >> 8)); + } + } + diff --git a/community/directfb/PKGBUILD b/community/directfb/PKGBUILD index 3a34cb6d3..1e23e4f65 100644 --- a/community/directfb/PKGBUILD +++ b/community/directfb/PKGBUILD @@ -1,27 +1,29 @@ -# $Id: PKGBUILD 63532 2012-02-05 11:54:02Z ibiru $ +# $Id: PKGBUILD 68160 2012-03-18 19:39:44Z ebelanger $ # Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org> # Maintainer: Eric Bélanger <eric@archlinux.org> pkgname=directfb -pkgver=1.4.14 -pkgrel=3 +pkgver=1.5.3 +pkgrel=1 pkgdesc="A thin library that provides hardware graphics acceleration, input device handling and abstraction, integrated windowing system on top of the Linux Framebuffer Device" arch=('i686' 'x86_64') url="http://www.directfb.org" license=('LGPL') depends=('gcc-libs' 'libjpeg' 'sdl' 'sysfsutils' 'libpng' 'freetype2') options=('!libtool') -changelog=$pkgname.changelog -source=(http://www.directfb.org/downloads/Core/DirectFB-${pkgver%.*}/DirectFB-${pkgver}.tar.gz DirectFB-1.4.9-libpng-1.5.patch) -md5sums=('de0745d25a6ac9e337d4d5572df85471' - '84f3181e96692efc5ff68e5dac19541f') +source=(http://www.directfb.org/downloads/Core/DirectFB-${pkgver%.*}/DirectFB-${pkgver}.tar.gz \ + DirectFB-1.4.9-libpng-1.5.patch directfb-missing_include.patch) +md5sums=('54a9ec931c8e3c82adb924194e65120e' + '82f552ae306871382a6a8e05cffee723' + '6b7ceca416c28a3791a145c15bf6f462') build() { cd "${srcdir}/DirectFB-${pkgver}" patch -p1 -i ../DirectFB-1.4.9-libpng-1.5.patch - ./configure --prefix=/usr --sysconfdir=/etc --enable-static --enable-debug \ - --enable-zlib --enable-x11 --enable-sdl --disable-vnc --disable-osx \ - --enable-video4linux2 --enable-voodoo + patch -p1 -i ../directfb-missing_include.patch + CFLAGS+="-fno-inline" ./configure --prefix=/usr --sysconfdir=/etc --enable-static \ + --enable-zlib --enable-x11 --enable-sdl --disable-vnc --disable-osx \ + --enable-video4linux2 --enable-voodoo make } diff --git a/community/directfb/directfb-missing_include.patch b/community/directfb/directfb-missing_include.patch new file mode 100644 index 000000000..4b1af5a30 --- /dev/null +++ b/community/directfb/directfb-missing_include.patch @@ -0,0 +1,376 @@ +--- /dev/null 2012-02-14 14:47:01.028967126 -0500 ++++ b/lib/voodoo/link.h 2012-02-14 21:19:05.000000000 -0500 +@@ -0,0 +1,85 @@ ++/* ++ (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) ++ (c) Copyright 2000-2004 Convergence (integrated media) GmbH ++ ++ All rights reserved. ++ ++ Written by Denis Oliver Kropp <dok@directfb.org>, ++ Andreas Hundt <andi@fischlustig.de>, ++ Sven Neumann <neo@directfb.org>, ++ Ville Syrjälä <syrjala@sci.fi> and ++ Claudio Ciccani <klan@users.sf.net>. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the ++ Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. ++*/ ++ ++#ifndef __VOODOO__LINK_H__ ++#define __VOODOO__LINK_H__ ++ ++#include <voodoo/types.h> ++ ++ ++typedef struct { ++ void *ptr; ++ size_t length; ++ size_t done; ++} VoodooChunk; ++ ++ ++struct __V_VoodooLink { ++ void *priv; ++ u32 code; ++ ++ void (*Close)( VoodooLink *link ); ++ ++ /* See 'read(2)', blocking */ ++ ssize_t (*Read) ( VoodooLink *link, ++ void *buffer, ++ size_t count ); ++ ++ /* See 'write(2)', blocking */ ++ ssize_t (*Write)( VoodooLink *link, ++ const void *buffer, ++ size_t count ); ++ ++ ++ /* For later... */ ++ DirectResult (*SendReceive)( VoodooLink *link, ++ VoodooChunk *send, ++ size_t num_send, ++ VoodooChunk *recv, ++ size_t num_recv ); ++ ++ DirectResult (*WakeUp) ( VoodooLink *link ); ++ ++ DirectResult (*WaitForData)( VoodooLink *link, ++ int timeout_ms ); ++}; ++ ++ ++DirectResult VOODOO_API voodoo_link_init_connect( VoodooLink *link, ++ const char *hostname, ++ int port, ++ bool raw ); ++ ++DirectResult VOODOO_API voodoo_link_init_local ( VoodooLink *link, ++ const char *path, ++ bool raw ); ++ ++DirectResult VOODOO_API voodoo_link_init_fd ( VoodooLink *link, ++ int fd[2] ); ++ ++#endif +--- /dev/null 2012-02-14 14:47:01.028967126 -0500 ++++ b/lib/voodoo/packet.h 2012-02-14 21:37:45.000000000 -0500 +@@ -0,0 +1,285 @@ ++/* ++ (c) Copyright 2001-2011 The world wide DirectFB Open Source Community (directfb.org) ++ (c) Copyright 2000-2004 Convergence (integrated media) GmbH ++ ++ All rights reserved. ++ ++ Written by Denis Oliver Kropp <dok@directfb.org>, ++ Andreas Hundt <andi@fischlustig.de>, ++ Sven Neumann <neo@directfb.org>, ++ Ville Syrjälä <syrjala@sci.fi> and ++ Claudio Ciccani <klan@users.sf.net>. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the ++ Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. ++*/ ++ ++#ifndef __VOODOO__PACKET_H__ ++#define __VOODOO__PACKET_H__ ++ ++extern "C" { ++#include <direct/fastlz.h> ++#include <direct/list.h> ++#include <direct/mem.h> ++#include <direct/memcpy.h> ++ ++ ++#include <voodoo/types.h> ++} ++ ++ ++typedef enum { ++ VPHF_NONE = 0x00000000, ++ ++ VPHF_COMPRESSED = 0x00000001, ++ ++ VPHF_ALL = 0x00000001 ++} VoodooPacketHeaderFlags; ++ ++ ++typedef struct { ++ u32 size; ++ u32 flags; ++ u32 uncompressed; ++ u32 align; ++} VoodooPacketHeader; ++ ++ ++class VoodooPacket { ++public: ++ DirectLink link; ++ bool sending; ++ ++private: ++ void *data; ++ void *current; ++ VoodooPacketHeader header; ++ ++ VoodooPacket( u32 size, ++ void *data ) ++ : ++ sending(false), ++ data(data), ++ current(data) ++ { ++ memset( &link, 0, sizeof(link) ); ++ ++ header.size = size; ++ header.flags = VPHF_NONE; ++ header.uncompressed = size; ++ } ++ ++ VoodooPacket( u32 size, ++ u32 flags, ++ u32 uncompressed, ++ void *data ) ++ : ++ sending(false), ++ data(data), ++ current(data) ++ { ++ memset( &link, 0, sizeof(link) ); ++ ++ header.size = size; ++ header.flags = VPHF_COMPRESSED; ++ header.uncompressed = uncompressed; ++ } ++ ++ ~VoodooPacket() {}; ++ ++public: ++/* ++ static VoodooPacket * ++ New( u32 size ) ++ { ++ VoodooPacket *packet = (VoodooPacket*) D_MALLOC( sizeof(VoodooPacket) + size ); ++ ++ if (!packet) { ++ D_OOM(); ++ return NULL; ++ } ++ ++ return new (packet) VoodooPacket( size, packet + 1 ); ++ ++ ++ if (data) ++ this->data = data; ++ else ++ this->data = header + 1; ++ } ++*/ ++ static VoodooPacket * ++ New( u32 size, ++ void *data ) ++ { ++ return new VoodooPacket( size, data ); ++ } ++ ++ static VoodooPacket * ++ Reset( VoodooPacket *packet, ++ u32 size, ++ void *data ) ++ { ++ return new (packet) VoodooPacket( size, data ); ++ } ++ ++ static VoodooPacket * ++ New( void *header, ++ u32 size ) ++ { ++ VoodooPacketHeader *h = (VoodooPacketHeader*) header; ++ ++ h->size = size; ++ h->flags = VPHF_NONE; ++ h->uncompressed = size; ++ ++ return new VoodooPacket( size, (char*) header + sizeof(VoodooPacketHeader) ); ++ } ++ ++ static VoodooPacket * ++ New( u32 size ) ++ { ++ VoodooPacket *p = (VoodooPacket*) D_MALLOC( sizeof(VoodooPacket) + VOODOO_PACKET_MAX ); ++ ++ if (!p) { ++ D_OOM(); ++ return NULL; ++ } ++ ++ return new (p) VoodooPacket( size, p + 1 ); ++ } ++ ++ static VoodooPacket * ++ Compressed( VoodooPacket *packet ) ++ { ++ VoodooPacket *p = (VoodooPacket*) D_MALLOC( sizeof(VoodooPacket) + packet->header.size * 4 / 3 ); ++ ++ if (!p) { ++ D_OOM(); ++ return NULL; ++ } ++ ++ int compressed = direct_fastlz_compress( packet->data, packet->header.uncompressed, p + 1 ); ++ ++ if ((size_t) compressed < packet->header.uncompressed) ++ return new (p) VoodooPacket( compressed, VPHF_COMPRESSED, packet->header.uncompressed, p + 1 ); ++ ++ D_FREE( p ); ++ ++ return packet; ++ } ++ ++ static VoodooPacket * ++ Copy( VoodooPacket *packet ) ++ { ++ VoodooPacket *p = (VoodooPacket*) D_MALLOC( sizeof(VoodooPacket) + packet->header.size ); ++ ++ if (!p) { ++ D_OOM(); ++ return NULL; ++ } ++ ++ direct_memcpy( p + 1, packet->data_start(), packet->header.size ); ++ ++ return new (p) VoodooPacket( packet->header.size, packet->header.flags, packet->header.uncompressed, p + 1 ); ++ } ++ ++ static VoodooPacket * ++ Copy( u32 size, ++ u32 flags, ++ u32 uncompressed, ++ void *data ) ++ { ++ VoodooPacket *p = (VoodooPacket*) D_MALLOC( sizeof(VoodooPacket) + size ); ++ ++ if (!p) { ++ D_OOM(); ++ return NULL; ++ } ++ ++ direct_memcpy( p + 1, data, size ); ++ ++ return new (p) VoodooPacket( size, flags, uncompressed, p + 1 ); ++ } ++ ++ inline u32 ++ size() const ++ { ++ return header.size; ++ } ++ ++ inline u32 ++ flags() const ++ { ++ return header.flags; ++ } ++ ++ inline u32 ++ uncompressed() const ++ { ++ return header.uncompressed; ++ } ++ ++ inline const void * ++ data_header() const ++ { ++ D_ASSERT( data == this + 1 ); ++ ++ return &header; ++ } ++ ++ inline const void * ++ data_start() const ++ { ++ return data; ++ } ++ ++ inline void * ++ data_raw() const ++ { ++ return current; ++ } ++ ++ ++ inline bool ++ append( size_t size ) ++ { ++ D_ASSERT( data == this + 1 ); ++ ++ if (header.size + size > VOODOO_PACKET_MAX) ++ return false; ++ ++ current = (char*) data + header.size; ++ ++ header.size += size; ++ header.uncompressed += size; ++ ++ return true; ++ } ++ ++ inline void ++ reset( size_t size ) ++ { ++ D_ASSERT( data == this + 1 ); ++ ++ current = (char*) data; ++ ++ header.size = size; ++ header.uncompressed = size; ++ } ++}; ++ ++ ++#endif |