qt3: Fixed compilation with libpng-1.4
This commit is contained in:
parent
5d1a8078f5
commit
79d7f116e5
@ -2,3 +2,4 @@
|
||||
cf3c43a7dfde5bfb76f8001102fe6e85 qt-x11-free-3.3.8.tar.bz2
|
||||
4a5fdb48ee241040090e4fe4051cb49c qt3-3.3.8-1-patches.tar.bz2
|
||||
7d8d3356a17201832e361df69c63e9a4 qt3-3.3.8-gcc4.patch
|
||||
16637b7f883b2081b223dfb5f5eabf1a qt3-libpng14.patch
|
||||
|
22
qt3/Pkgfile
22
qt3/Pkgfile
@ -1,16 +1,19 @@
|
||||
# Description: Qt Free Edition
|
||||
# URL: http://www.trolltech.com
|
||||
# Maintainer: Lucas Hazel, lucas at die dot net dot au
|
||||
# Packager: Daniel Mueller, daniel at danm dot de
|
||||
# Depends on: freeglut, xorg-libxcursor, xorg-xrandr, xorg-libxft, xorg-libxinerama, xorg-libxi, xorg-libice, libpng, libmng
|
||||
# URL: http://www.trolltech.com
|
||||
# Packager: Daniel Mueller, daniel at danm dot de
|
||||
# Maintainer: Alan Mizrahi, alan at mizrahi dot com dot ve
|
||||
# Depends on: freeglut, xorg-libxcursor, xorg-xrandr, xorg-libxft, xorg-libxinerama, xorg-libxi, xorg-libice, libpng, libmng
|
||||
|
||||
name=qt3
|
||||
version=3.3.8
|
||||
release=1
|
||||
source=(ftp://ftp.trolltech.com/qt/source/qt-x11-free-$version.tar.bz2 \
|
||||
http://crux64.die.net.au/files/$name-$version-1-patches.tar.bz2
|
||||
$name-$version-gcc4.patch
|
||||
qt-x11-free-3.3.5-no-rpath.patch)
|
||||
source=(
|
||||
ftp://ftp.trolltech.com/qt/source/qt-x11-free-$version.tar.bz2
|
||||
http://crux64.die.net.au/files/$name-$version-1-patches.tar.bz2
|
||||
$name-$version-gcc4.patch
|
||||
qt-x11-free-3.3.5-no-rpath.patch
|
||||
qt3-libpng14.patch
|
||||
)
|
||||
|
||||
build() {
|
||||
cd qt-x11-free-$version
|
||||
@ -24,6 +27,9 @@ build() {
|
||||
patch -p1 -i $SRC/$name-$version-gcc4.patch
|
||||
patch -p0 -i $SRC/qt-x11-free-3.3.5-no-rpath.patch
|
||||
|
||||
# libpng-1.4 structure changes
|
||||
patch -p1 -i $SRC/qt3-libpng14.patch
|
||||
|
||||
local SQL
|
||||
if [ "`pkginfo -i | grep mysql`" ];then
|
||||
SQL="-qt-sql-mysql -I/usr/include/mysql -L/usr/lib/mysql"
|
||||
|
26
qt3/qt3-libpng14.patch
Normal file
26
qt3/qt3-libpng14.patch
Normal file
@ -0,0 +1,26 @@
|
||||
--- qt-x11-free-3.3.8/src/kernel/qpngio.cpp.orig 2007-02-02 23:01:15.000000000 +0900
|
||||
+++ qt-x11-free-3.3.8/src/kernel/qpngio.cpp 2011-01-02 09:20:40.151999994 +0900
|
||||
@@ -159,7 +159,11 @@
|
||||
image.setColor( i, qRgba(c,c,c,0xff) );
|
||||
}
|
||||
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
|
||||
+#if PNG_LIBPNG_VER < 10400
|
||||
const int g = info_ptr->trans_values.gray;
|
||||
+#else
|
||||
+ const int g = info_ptr->trans_color.gray;
|
||||
+#endif
|
||||
if (g < ncols) {
|
||||
image.setAlphaBuffer(TRUE);
|
||||
image.setColor(g, image.color(g) & RGB_MASK);
|
||||
@@ -187,7 +191,11 @@
|
||||
info_ptr->palette[i].red,
|
||||
info_ptr->palette[i].green,
|
||||
info_ptr->palette[i].blue,
|
||||
+#if PNG_LIBPNG_VER < 10400
|
||||
info_ptr->trans[i]
|
||||
+#else
|
||||
+ info_ptr->trans_alpha[i]
|
||||
+#endif
|
||||
)
|
||||
);
|
||||
i++;
|
Loading…
x
Reference in New Issue
Block a user