mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
libraries/DevIL: Updated for version 1.7.8 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
6de96aac5f
commit
ddbac19ffc
7 changed files with 57 additions and 1299 deletions
26
libraries/DevIL/04_png_set_expand_gray.diff
Normal file
26
libraries/DevIL/04_png_set_expand_gray.diff
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
Index: devil-1.7.8/src-IL/src/il_icon.c
|
||||||
|
===================================================================
|
||||||
|
--- devil-1.7.8.orig/src-IL/src/il_icon.c 2013-05-21 00:08:36.847356129 +0200
|
||||||
|
+++ devil-1.7.8/src-IL/src/il_icon.c 2013-05-21 00:10:29.317942183 +0200
|
||||||
|
@@ -525,7 +525,7 @@
|
||||||
|
|
||||||
|
// Expand low-bit-depth grayscale images to 8 bits
|
||||||
|
if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
|
||||||
|
- png_set_gray_1_2_4_to_8(ico_png_ptr);
|
||||||
|
+ png_set_expand_gray_1_2_4_to_8(ico_png_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Expand RGB images with transparency to full alpha channels
|
||||||
|
Index: devil-1.7.8/src-IL/src/il_png.c
|
||||||
|
===================================================================
|
||||||
|
--- devil-1.7.8.orig/src-IL/src/il_png.c 2009-03-08 08:10:09.000000000 +0100
|
||||||
|
+++ devil-1.7.8/src-IL/src/il_png.c 2013-05-21 00:10:18.554077504 +0200
|
||||||
|
@@ -278,7 +278,7 @@
|
||||||
|
|
||||||
|
// Expand low-bit-depth grayscale images to 8 bits
|
||||||
|
if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
|
||||||
|
- png_set_gray_1_2_4_to_8(png_ptr);
|
||||||
|
+ png_set_expand_gray_1_2_4_to_8(png_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Expand RGB images with transparency to full alpha channels
|
|
@ -3,11 +3,12 @@
|
||||||
# Slackware build script for DevIL
|
# Slackware build script for DevIL
|
||||||
# Written by Phil Warner <pc_warner@yahoo.com>
|
# Written by Phil Warner <pc_warner@yahoo.com>
|
||||||
# Modified by Robby Workman <rworkman@slackbuilds.org>
|
# Modified by Robby Workman <rworkman@slackbuilds.org>
|
||||||
|
# Currently maintained by Dugan Chen
|
||||||
|
|
||||||
PRGNAM=DevIL
|
PRGNAM=DevIL
|
||||||
VERSION=${VERSION:-1.6.8}
|
SRCNAM=devil
|
||||||
PKG_VERSION=${VERSION}_rc2
|
VERSION=${VERSION:-1.7.8}
|
||||||
BUILD=${BUILD:-3}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
if [ -z "$ARCH" ]; then
|
if [ -z "$ARCH" ]; then
|
||||||
|
@ -42,51 +43,48 @@ set -e
|
||||||
rm -rf $PKG
|
rm -rf $PKG
|
||||||
mkdir -p $TMP $PKG $OUTPUT
|
mkdir -p $TMP $PKG $OUTPUT
|
||||||
cd $TMP
|
cd $TMP
|
||||||
rm -rf $PRGNAM-$VERSION
|
rm -rf $SRCNAM-$VERSION
|
||||||
tar xvf $CWD/$PRGNAM-$(echo $PKG_VERSION | tr _ -).tar.gz
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||||
cd $PRGNAM-$VERSION
|
cd $SRCNAM-$VERSION
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
find -L . \
|
find -L . \
|
||||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||||
-exec chmod 755 {} \; -o \
|
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||||
-exec chmod 644 {} \;
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||||
|
|
||||||
# Fixes a libpng 1.4 problem.
|
# Build against libpng14, not libpng12.
|
||||||
patch -p1 < $CWD/patches/devil-1.6.8-libpng14.patch
|
sed -i 's/png12/png14/g' configure
|
||||||
|
|
||||||
# Fix the typo that prevents building with Allegro
|
# Fix further linking issues with libpng. This patch is taken
|
||||||
# Also patch files to change (ILvoid) to (void) in order to
|
# from Ubuntu. Without this patch, DevIL will compile, but attempts
|
||||||
# fix issues with gcc 4.2.
|
# to link against it will break.
|
||||||
# Thanks to David Somero for the heads up on this.
|
patch -p1 < $CWD/04_png_set_expand_gray.diff
|
||||||
patch -p1 < $CWD/patches/ILvoid_fix_1.diff
|
|
||||||
patch -p1 < $CWD/patches/ILvoid_fix_2.diff
|
|
||||||
# There is a space in the filename's path, so we have to cd into
|
|
||||||
# the offending directory before patching.
|
|
||||||
( cd cpp\ wrapper
|
|
||||||
patch < $CWD/patches/ILvoid_fix_3.diff
|
|
||||||
)
|
|
||||||
|
|
||||||
CFLAGS="$SLKCFLAGS" \
|
CFLAGS="$SLKCFLAGS" \
|
||||||
CXXFLAGS="$SLKCFLAGS" \
|
CXXFLAGS="$SLKCFLAGS" \
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
|
--datarootdir=/usr \
|
||||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||||
|
--enable-static=no \
|
||||||
--build=$ARCH-slackware-linux
|
--build=$ARCH-slackware-linux
|
||||||
|
make
|
||||||
force_arch="$ARCH" make
|
|
||||||
make install DESTDIR=$PKG
|
make install DESTDIR=$PKG
|
||||||
|
|
||||||
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||||
|
|
||||||
|
rm -f $PKG/usr/info/dir
|
||||||
|
gzip -9 $PKG/usr/info/*.info*
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cp -a AUTHORS COPYING CREDITS ChangeLog INSTALL Libraries.txt \
|
cp -a AUTHORS COPYING CREDITS ChangeLog INSTALL Libraries.txt \
|
||||||
NEWS README README.unix TODO $PKG/usr/doc/$PRGNAM-$VERSION
|
NEWS README README.unix TODO examples/ $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
|
|
||||||
mkdir -p $PKG/install
|
mkdir -p $PKG/install
|
||||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||||
|
|
||||||
cd $PKG
|
cd $PKG
|
||||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKG_VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
PRGNAM="DevIL"
|
PRGNAM="DevIL"
|
||||||
VERSION="1.6.8_rc2"
|
VERSION="1.7.8"
|
||||||
HOMEPAGE="http://openil.sourceforge.net/"
|
HOMEPAGE="http://openil.sourceforge.net/"
|
||||||
DOWNLOAD="http://downloads.sourceforge.net/openil/DevIL-1.6.8-rc2.tar.gz"
|
DOWNLOAD="http://downloads.sourceforge.net/project/openil/DevIL/1.7.8/DevIL-1.7.8.tar.gz"
|
||||||
MD5SUM="9d815c8637adb6fb6c25c38dc178aca2"
|
MD5SUM="7918f215524589435e5ec2e8736d5e1d"
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
REQUIRES=""
|
REQUIRES=""
|
||||||
MAINTAINER="Phil Warner"
|
MAINTAINER="Dugan Chen"
|
||||||
EMAIL="pc_warner@yahoo.com"
|
EMAIL="thedoogster [at] gmail [dot] com"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,132 +0,0 @@
|
||||||
diff -ru DevIL-1.6.8.orig/src-IL/include/il_dds.h DevIL-1.6.8/src-IL/include/il_dds.h
|
|
||||||
--- DevIL-1.6.8.orig/src-IL/include/il_dds.h 2006-04-15 00:40:56.000000000 -0500
|
|
||||||
+++ DevIL-1.6.8/src-IL/include/il_dds.h 2008-04-23 00:44:43.000000000 -0500
|
|
||||||
@@ -109,9 +109,9 @@
|
|
||||||
//the written dds files more standard compliant
|
|
||||||
#define DDS_CAPS 0x00000001L
|
|
||||||
#define DDS_HEIGHT 0x00000002L
|
|
||||||
-#define DDS_WIDTH 0x00000004L
|
|
||||||
+#define DDS_WIDTH 0x00000004L
|
|
||||||
#define DDS_RGB 0x00000040L
|
|
||||||
-#define DDS_PIXELFORMAT 0x00001000L
|
|
||||||
+#define DDS_PIXELFORMAT 0x00001000L
|
|
||||||
#define DDS_LUMINANCE 0x00020000L
|
|
||||||
|
|
||||||
#define DDS_ALPHAPIXELS 0x00000001L
|
|
||||||
@@ -147,18 +147,18 @@
|
|
||||||
PF_DXT2,
|
|
||||||
PF_DXT3,
|
|
||||||
PF_DXT4,
|
|
||||||
- PF_DXT5,
|
|
||||||
- PF_3DC,
|
|
||||||
- PF_ATI1N,
|
|
||||||
- PF_LUMINANCE,
|
|
||||||
- PF_LUMINANCE_ALPHA,
|
|
||||||
- PF_RXGB, //Doom3 normal maps
|
|
||||||
- PF_A16B16G16R16,
|
|
||||||
- PF_R16F,
|
|
||||||
- PF_G16R16F,
|
|
||||||
- PF_A16B16G16R16F,
|
|
||||||
- PF_R32F,
|
|
||||||
- PF_G32R32F,
|
|
||||||
+ PF_DXT5,
|
|
||||||
+ PF_3DC,
|
|
||||||
+ PF_ATI1N,
|
|
||||||
+ PF_LUMINANCE,
|
|
||||||
+ PF_LUMINANCE_ALPHA,
|
|
||||||
+ PF_RXGB, //Doom3 normal maps
|
|
||||||
+ PF_A16B16G16R16,
|
|
||||||
+ PF_R16F,
|
|
||||||
+ PF_G16R16F,
|
|
||||||
+ PF_A16B16G16R16F,
|
|
||||||
+ PF_R32F,
|
|
||||||
+ PF_G32R32F,
|
|
||||||
PF_A32B32G32R32F,
|
|
||||||
PF_UNKNOWN = 0xFF
|
|
||||||
};
|
|
||||||
@@ -166,34 +166,34 @@
|
|
||||||
#define CUBEMAP_SIDES 6
|
|
||||||
|
|
||||||
// Internal functions
|
|
||||||
-ILboolean iLoadDdsInternal(ILvoid);
|
|
||||||
-ILboolean iIsValidDds(ILvoid);
|
|
||||||
+ILboolean iLoadDdsInternal(void);
|
|
||||||
+ILboolean iIsValidDds(void);
|
|
||||||
ILboolean iCheckDds(DDSHEAD *Head);
|
|
||||||
ILvoid AdjustVolumeTexture(DDSHEAD *Head);
|
|
||||||
-ILboolean ReadData(ILvoid);
|
|
||||||
-ILboolean AllocImage(ILvoid);
|
|
||||||
-ILboolean Decompress(ILvoid);
|
|
||||||
-ILboolean ReadMipmaps(ILvoid);
|
|
||||||
-ILuint DecodePixelFormat(ILvoid);
|
|
||||||
-ILboolean DecompressARGB(ILvoid);
|
|
||||||
-ILboolean DecompressDXT1(ILvoid);
|
|
||||||
-ILboolean DecompressDXT2(ILvoid);
|
|
||||||
-ILboolean DecompressDXT3(ILvoid);
|
|
||||||
-ILboolean DecompressDXT4(ILvoid);
|
|
||||||
-ILboolean DecompressDXT5(ILvoid);
|
|
||||||
-ILboolean Decompress3Dc(ILvoid);
|
|
||||||
-ILboolean DecompressAti1n(ILvoid);
|
|
||||||
-ILboolean DecompressRXGB(ILvoid);
|
|
||||||
-ILboolean DecompressFloat(ILvoid);
|
|
||||||
-ILvoid CorrectPreMult(ILvoid);
|
|
||||||
+ILboolean ReadData(void);
|
|
||||||
+ILboolean AllocImage(void);
|
|
||||||
+ILboolean Decompress(void);
|
|
||||||
+ILboolean ReadMipmaps(void);
|
|
||||||
+ILuint DecodePixelFormat(void);
|
|
||||||
+ILboolean DecompressARGB(void);
|
|
||||||
+ILboolean DecompressDXT1(void);
|
|
||||||
+ILboolean DecompressDXT2(void);
|
|
||||||
+ILboolean DecompressDXT3(void);
|
|
||||||
+ILboolean DecompressDXT4(void);
|
|
||||||
+ILboolean DecompressDXT5(void);
|
|
||||||
+ILboolean Decompress3Dc(void);
|
|
||||||
+ILboolean DecompressAti1n(void);
|
|
||||||
+ILboolean DecompressRXGB(void);
|
|
||||||
+ILboolean DecompressFloat(void);
|
|
||||||
+ILvoid CorrectPreMult(void);
|
|
||||||
ILvoid GetBitsFromMask(ILuint Mask, ILuint *ShiftLeft, ILuint *ShiftRight);
|
|
||||||
-ILboolean iSaveDdsInternal(ILvoid);
|
|
||||||
+ILboolean iSaveDdsInternal(void);
|
|
||||||
ILboolean WriteHeader(ILimage *Image, ILenum DXTCFormat, ILuint CubeFlags);
|
|
||||||
-ILushort *CompressTo565(ILimage *Image);
|
|
||||||
+ILushort *CompressTo565(ILimage *Image);
|
|
||||||
ILubyte *CompressTo88(ILimage *Image);
|
|
||||||
ILuint Compress(ILimage *Image, ILenum DXTCFormat);
|
|
||||||
ILboolean GetBlock(ILushort *Block, ILushort *Data, ILimage *Image, ILuint XPos, ILuint YPos);
|
|
||||||
-ILboolean GetAlphaBlock(ILubyte *Block, ILubyte *Data, ILimage *Image, ILuint XPos, ILuint YPos);
|
|
||||||
+ILboolean GetAlphaBlock(ILubyte *Block, ILubyte *Data, ILimage *Image, ILuint XPos, ILuint YPos);
|
|
||||||
ILboolean Get3DcBlock(ILubyte *Block, ILubyte *Data, ILimage *Image, ILuint XPos, ILuint YPos, int channel);
|
|
||||||
ILvoid ShortToColor565(ILushort Pixel, Color565 *Colour);
|
|
||||||
ILvoid ShortToColor888(ILushort Pixel, Color888 *Colour);
|
|
||||||
@@ -207,7 +207,7 @@
|
|
||||||
ILvoid ChooseAlphaEndpoints(ILubyte *Block, ILubyte *a0, ILubyte *a1);
|
|
||||||
ILvoid CorrectEndDXT1(ILushort *ex0, ILushort *ex1, ILboolean HasAlpha);
|
|
||||||
ILvoid PreMult(ILushort *Data, ILubyte *Alpha);
|
|
||||||
-
|
|
||||||
+
|
|
||||||
extern ILuint CubemapDirections[CUBEMAP_SIDES];
|
|
||||||
|
|
||||||
|
|
||||||
diff -ru DevIL-1.6.8.orig/src-IL/src/il_jpeg.c DevIL-1.6.8/src-IL/src/il_jpeg.c
|
|
||||||
--- DevIL-1.6.8.orig/src-IL/src/il_jpeg.c 2006-07-15 02:23:12.000000000 -0500
|
|
||||||
+++ DevIL-1.6.8/src-IL/src/il_jpeg.c 2008-04-23 00:43:16.000000000 -0500
|
|
||||||
@@ -527,7 +527,7 @@
|
|
||||||
// Here the array is only one element long, but you could pass
|
|
||||||
// more than one scanline at a time if that's more convenient.
|
|
||||||
row_pointer[0] = &TempData[JpegInfo.next_scanline * TempImage->Bps];
|
|
||||||
- (ILvoid) jpeg_write_scanlines(&JpegInfo, row_pointer, 1);
|
|
||||||
+ (void) jpeg_write_scanlines(&JpegInfo, row_pointer, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step 6: Finish compression
|
|
||||||
@@ -941,7 +941,7 @@
|
|
||||||
// Here the array is only one element long, but you could pass
|
|
||||||
// more than one scanline at a time if that's more convenient.
|
|
||||||
row_pointer[0] = &TempData[JpegInfo->next_scanline * TempImage->Bps];
|
|
||||||
- (ILvoid) jpeg_write_scanlines(JpegInfo, row_pointer, 1);
|
|
||||||
+ (void) jpeg_write_scanlines(JpegInfo, row_pointer, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT)
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- il_wrap.cpp.orig 2008-04-23 01:10:46.000000000 -0500
|
|
||||||
+++ il_wrap.cpp 2008-04-23 01:09:53.000000000 -0500
|
|
||||||
@@ -374,7 +374,7 @@
|
|
||||||
return this->Id;
|
|
||||||
}
|
|
||||||
|
|
||||||
-ILenum ilImage::GetOrigin(ILvoid)
|
|
||||||
+ILenum ilImage::GetOrigin(void)
|
|
||||||
{
|
|
||||||
ILinfo Info;
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- devil-1.6.8.orig/src-IL/src/il_png.c 2010-09-18 22:02:51.000000000 -0400
|
|
||||||
+++ devil-1.6.8/src-IL/src/il_png.c 2010-09-18 22:07:53.066090769 -0400
|
|
||||||
@@ -277,7 +277,7 @@
|
|
||||||
|
|
||||||
// Expand low-bit-depth grayscale images to 8 bits
|
|
||||||
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
|
|
||||||
- png_set_gray_1_2_4_to_8(png_ptr);
|
|
||||||
+ png_set_expand_gray_1_2_4_to_8(png_ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Expand RGB images with transparency to full alpha channels
|
|
Loading…
Reference in a new issue