diff --git a/Hermes-1.3.3-64bit.patch b/Hermes-1.3.3-64bit.patch new file mode 100644 index 0000000..ef99aab --- /dev/null +++ b/Hermes-1.3.3-64bit.patch @@ -0,0 +1,35 @@ +--- Hermes-1.3.3/src/c_genrc_ao_blit.c~ 2006-07-23 21:20:29.000000000 +0200 ++++ Hermes-1.3.3/src/c_genrc_ao_blit.c 2006-07-23 21:20:29.000000000 +0200 +@@ -24,8 +24,8 @@ + // ************************************************** + + void ConvertC_Generic32_A_Generic32_O_Blit(HermesConverterInterface *iface) +-{ unsigned long s_pixel, d_pixel, r, g, b, a; +- long sr, sg, sb, dr, dg, db, da; ++{ unsigned int s_pixel, d_pixel, r, g, b, a; ++ int sr, sg, sb, dr, dg, db, da; + char8 *source = iface->s_pixels, *dest = iface->d_pixels; + unsigned int count; + float sa; +@@ -101,8 +101,8 @@ + } + + void ConvertC_Generic32_A_Generic24_O_Blit(HermesConverterInterface *iface) +-{ unsigned long s_pixel, d_pixel, r, g, b, a; +- long sr, sg, sb, dr, dg, db, da; ++{ unsigned int s_pixel, d_pixel, r, g, b, a; ++ int sr, sg, sb, dr, dg, db, da; + float sa; + char8 *d_ptr=(char8 *)(&s_pixel); + unsigned int count; +--- Hermes-1.3.3/src/d_32.c~ 2006-07-23 22:06:51.000000000 +0200 ++++ Hermes-1.3.3/src/d_32.c 2006-07-23 22:06:51.000000000 +0200 +@@ -26,7 +26,7 @@ + count=iface->d_width; + + /* Check first pixel alignment, correct if necessary */ +- if (((unsigned int)iface->d_pixels)&1) { ++ if (((unsigned long)iface->d_pixels)&1) { + WRITE16(dest, + DitherTab_r565_44[count&0x3][y&0x3][(*((int32*)source)>>16)&0xff]| + DitherTab_g565_44[count&0x3][y&0x3][(*((int32*)source)>>8)&0xff]| diff --git a/Hermes-1.3.3-debian.patch b/Hermes-1.3.3-debian.patch new file mode 100644 index 0000000..d16bef2 --- /dev/null +++ b/Hermes-1.3.3-debian.patch @@ -0,0 +1,657 @@ +--- Hermes-1.3.3/src/c_cpy.c.deb 1999-12-05 01:09:06.000000000 +0100 ++++ Hermes-1.3.3/src/c_cpy.c 2006-07-23 21:06:56.000000000 +0200 +@@ -76,7 +76,7 @@ + { unsigned int x=0, c; + + /* Alignment mod 4 */ +- if ((int)dest&3) { ++ if ((unsigned long)dest&3) { + *((short16*)dest)=*((short16*)source+(x>>16)); x+=inc_source; + dest+=2; + count--; +@@ -103,7 +103,7 @@ + { unsigned int x=0, c; + + /* Alignment mod 4 */ +- while ((int)dest&3) { ++ while ((unsigned long)dest&3) { + *dest=*(source+(x>>16)); + x+=inc_source; + dest++; count--; +--- Hermes-1.3.3/src/c_clr.c.deb 1999-12-05 01:09:05.000000000 +0100 ++++ Hermes-1.3.3/src/c_clr.c 2006-07-23 21:06:56.000000000 +0200 +@@ -69,7 +69,7 @@ + { count=iface->width; + + /* Align destination */ +- if((int)dest&0x3) ++ if((unsigned long)dest&0x3) + { *((short16 *)dest)=(short16)iface->value; + dest+=2; + count--; +@@ -105,7 +105,7 @@ + do + { count=iface->width; + +- while(((int)dest&0x3)) /* Align to dword boundary */ ++ while(((unsigned long)dest&0x3)) /* Align to dword boundary */ + { *dest++=(char8)value; + count--; + if(!count) goto yloop; /* GOTO's are nice ;) */ +--- Hermes-1.3.3/src/c_32.c.deb 2000-03-08 20:26:24.000000000 +0100 ++++ Hermes-1.3.3/src/c_32.c 2006-07-23 21:06:56.000000000 +0200 +@@ -92,7 +92,7 @@ + + /* Align mod 4 (quite important in this case.. ) */ + +- while (((int)dest&0x3)!=0) ++ while (((unsigned long)dest&0x3)!=0) + { s_pixel=READ32(source); + + *(dest+R_24)=*(s_point+R_32); +@@ -197,7 +197,7 @@ + + /* If the current pixel isn't dword aligned, try write one pixel first */ + +- if((int)dest_32&0x3) ++ if((unsigned long)dest_32&0x3) + { s_pixel=((*source_32>>8)&0xf800)| + ((*source_32>>5)&0x7e0)| + ((*source_32>>3)&0x1f); +@@ -255,7 +255,7 @@ + + /* If the current pixel isn't dword aligned, try write one pixel first */ + +- if(((int)dest&0x3)!=0) ++ if(((unsigned long)dest&0x3)!=0) + { s_pixel=READ32(source); + + r=(s_pixel>>19)&0x1f; +@@ -315,7 +315,7 @@ + short16 d_pixel; + unsigned int i; + +- if(((int)dest&0x3)!=0) ++ if(((unsigned long)dest&0x3)!=0) + { s_pixel=READ32(source); + + r=(s_pixel>>9)&0x7c00; +@@ -372,7 +372,7 @@ + unsigned int i; + + +- if(((int)dest&0x3)!=0) ++ if(((unsigned long)dest&0x3)!=0) + { s_pixel=READ32(source); + + r=(s_pixel>>19)&0x1f; +@@ -428,7 +428,7 @@ + + /* Process single pixels until we are dword aligned */ + +- while(((int)dest&0x3)!=0) ++ while(((unsigned long)dest&0x3)!=0) + { s_pixel=READ32(source); + + d_pixel=(char8)(((s_pixel>>16)&0xe0)| +@@ -557,7 +557,7 @@ + int32 p; + + /* Align mod 4 */ +- if ((int)dest&3) { ++ if ((unsigned long)dest&3) { + *((short16*)dest)=(short16)(((*((int32*)source+(x>>16))>>8)&0xf800)| + ((*((int32*)source+(x>>16))>>5)&0x7e0)| + ((*((int32*)source+(x>>16))>>3)&0x1f)); +@@ -602,7 +602,7 @@ + int32 p; + + /* Align mod 4 */ +- if ((int)dest&3) { ++ if ((unsigned long)dest&3) { + *((short16*)dest)=(short16)(((*((int32*)source+(x>>16))>>19)&0x1f)| + ((*((int32*)source+(x>>16))>>5)&0x7e0)| + ((*((int32*)source+(x>>16))<<8)&0xf800)); +@@ -722,7 +722,7 @@ + + /* Write single pixels until the destination address is aligned mod 4 */ + +- while (((int)dest&0x3)!=0) { ++ while (((unsigned long)dest&0x3)!=0) { + *dest=(char8)(((*((int32*)source+(x>>16))>>16)&0xe0)| + ((*((int32*)source+(x>>16))>>11)&0x1c)| + ((*((int32*)source+(x>>16))>>6)&0x3)); +--- Hermes-1.3.3/src/c_i8.c.deb 1999-12-05 01:09:08.000000000 +0100 ++++ Hermes-1.3.3/src/c_i8.c 2006-07-23 21:06:56.000000000 +0200 +@@ -123,7 +123,7 @@ + + count=iface->s_width; + +- if(((int)dest&0x3)!=0) ++ if(((unsigned long)dest&0x3)!=0) + { WRITE16(dest++,(short16)iface->lookup[*source++]); + dest++; + count--; +--- Hermes-1.3.3/src/c_muhmu.c.deb 1999-12-05 01:09:10.000000000 +0100 ++++ Hermes-1.3.3/src/c_muhmu.c 2006-07-23 21:06:56.000000000 +0200 +@@ -145,7 +145,7 @@ + + /* If the current pixel isn't dword aligned, try write one pixel first */ + +- if(((int)dest&0x3)!=0) ++ if(((unsigned long)dest&0x3)!=0) + { s_pixel=READ32(source); + + r=(s_pixel>>12)&0xf800; +@@ -207,7 +207,7 @@ + + /* If the current pixel isn't dword aligned, try write one pixel first */ + +- if(((int)dest&0x3)!=0) ++ if(((unsigned long)dest&0x3)!=0) + { s_pixel=READ32(source); + + r=(s_pixel>>23)&0x1f; +@@ -269,7 +269,7 @@ + unsigned int i; + + +- if(((int)dest&0x3)!=0) ++ if(((unsigned long)dest&0x3)!=0) + { s_pixel=READ32(source); + + r=(s_pixel>>13)&0x7c00; +@@ -326,7 +326,7 @@ + unsigned int i; + + +- if(((int)dest&0x3)!=0) ++ if(((unsigned long)dest&0x3)!=0) + { s_pixel=READ32(source); + + r=(s_pixel>>23)&0x1f; +@@ -383,7 +383,7 @@ + + /* Process single pixels until we are dword aligned */ + +- while(((int)dest&0x3)!=0) ++ while(((unsigned long)dest&0x3)!=0) + { s_pixel=READ32(source); + + d_pixel=(char8)(((s_pixel>>20)&0xe0)| +@@ -599,7 +599,7 @@ + + /* Write single pixels until the destination address is aligned mod 4 */ + +- while (((int)dest&0x3)!=0) { ++ while (((unsigned long)dest&0x3)!=0) { + *dest=(char8)(((*((int32*)source+(x>>16))>>20)&0xe0)| + ((*((int32*)source+(x>>16))>>13)&0x1c)| + ((*((int32*)source+(x>>16))>>6)&0x3)); +--- Hermes-1.3.3/src/c_16.c.deb 1999-12-05 01:09:02.000000000 +0100 ++++ Hermes-1.3.3/src/c_16.c 2006-07-23 21:06:56.000000000 +0200 +@@ -151,7 +151,7 @@ + int32 s_pixel; + + /* If we are not aligned to a dword, try and convert a single pixel */ +- if(((int)dest&0x3)!=0) ++ if(((unsigned long)dest&0x3)!=0) + { s_pixel=(int32)READ16(source); + + /* Swap around R and B, leave G unchanged */ +@@ -194,7 +194,7 @@ + int32 s_pixel; + + /* If we are not aligned to a dword, try and convert a single pixel */ +- if(((int)dest&0x3)!=0) ++ if(((unsigned long)dest&0x3)!=0) + { s_pixel=(int32)READ16(source); + + /* Leave blue untouched, mask red and shift by one, mask green and shift +@@ -240,7 +240,7 @@ + int32 s_pixel; + + /* If we are not aligned to a dword, try and convert a single pixel */ +- if(((int)dest&0x3)!=0) ++ if(((unsigned long)dest&0x3)!=0) + { s_pixel=(int32)READ16(source); + + /* Shift red right by 11, mask green and shift right one, shift blue +@@ -285,7 +285,7 @@ + unsigned int i; + + /* Align to dword first */ +- while(((int)dest&0x3)!=0) ++ while(((unsigned long)dest&0x3)!=0) + { s_block=(int32)READ16(source); + + s_block=((s_block&0xe000)>>8)|((s_block&0x0700)>>6)| +@@ -440,7 +440,7 @@ + int32 p; + + /* If we are not aligned to a dword, try and convert a single pixel */ +- if(((int)dest&0x3)!=0) { ++ if(((unsigned long)dest&0x3)!=0) { + + /* Swap r and b, leave g untouched */ + *((short16*)dest)=(short16)(*((short16*)source+(x>>16))>>11)| +@@ -487,7 +487,7 @@ + int32 p; + + /* If we are not aligned to a dword, try and convert a single pixel */ +- if(((int)dest&0x3)!=0) { ++ if(((unsigned long)dest&0x3)!=0) { + *((short16*)dest)=(short16)((*((short16*)source+(x>>16))&0xf800)>>1)| + ((*((short16*)source+(x>>16))&0x7c0)>>1)| + (*((short16*)source+(x>>16))&0x1f); +@@ -531,7 +531,7 @@ + int32 p; + + /* If we are not aligned to a dword, try and convert a single pixel */ +- if(((int)dest&0x3)!=0) { ++ if(((unsigned long)dest&0x3)!=0) { + + *((short16*)dest)=(short16)((*((short16*)source+(x>>16))&0xf800)>>11)| + ((*((short16*)source+(x>>16))&0x7c0)>>1)| +@@ -577,7 +577,7 @@ + + /* Write single pixels until the destination address is aligned mod 4 */ + +- while (((int)dest&0x3)!=0) { ++ while (((unsigned long)dest&0x3)!=0) { + *dest=((*((short16*)source+(x>>16))>>8)&0xe0)| + ((*((short16*)source+(x>>16))>>6)&0x1c)| + ((*((short16*)source+(x>>16))>>3)&0x3); +--- Hermes-1.3.3/src/HeadMMX.h.deb 2000-12-06 05:55:28.000000000 +0100 ++++ Hermes-1.3.3/src/HeadMMX.h 2006-07-23 21:06:56.000000000 +0200 +@@ -27,21 +27,21 @@ + extern "C" { + #endif + +-void STACKCALL ConvertMMX(HermesConverterInterface *); ++void STACKCALL _ConvertMMX(HermesConverterInterface *); + +-void STACKCALL ClearMMX_32(HermesClearInterface *); +-void STACKCALL ClearMMX_24(HermesClearInterface *); +-void STACKCALL ClearMMX_16(HermesClearInterface *); +-void STACKCALL ClearMMX_8(HermesClearInterface *); +- +-void ConvertMMXpII32_24RGB888(); +-void ConvertMMXpII32_16RGB565(); +-void ConvertMMXpII32_16BGR565(); +-void ConvertMMXpII32_16RGB555(); +-void ConvertMMXpII32_16BGR565(); +-void ConvertMMXpII32_16BGR555(); ++void STACKCALL _ClearMMX_32(HermesClearInterface *); ++void STACKCALL _ClearMMX_24(HermesClearInterface *); ++void STACKCALL _ClearMMX_16(HermesClearInterface *); ++void STACKCALL _ClearMMX_8(HermesClearInterface *); ++ ++void _ConvertMMXpII32_24RGB888(); ++void _ConvertMMXpII32_16RGB565(); ++void _ConvertMMXpII32_16BGR565(); ++void _ConvertMMXpII32_16RGB555(); ++void _ConvertMMXpII32_16BGR565(); ++void _ConvertMMXpII32_16BGR555(); + +-void ConvertMMXp32_16RGB555(); ++void _ConvertMMXp32_16RGB555(); + + #ifdef __cplusplus + } +@@ -51,6 +51,7 @@ + + /* Fix the underscore business with ELF compilers */ + ++#if 0 + #if defined(__ELF__) && defined(__GNUC__) + #ifdef __cplusplus + extern "C" { +@@ -75,6 +76,7 @@ + #endif + + #endif /* ELF and GNUC */ ++#endif + + + +--- Hermes-1.3.3/src/FactConv.c.deb 2000-12-06 05:55:28.000000000 +0100 ++++ Hermes-1.3.3/src/FactConv.c 2006-07-23 21:06:56.000000000 +0200 +@@ -47,99 +47,99 @@ + #pragma error + + /* ------ From 32 RGB 888 - MMX PENTIUM II ---- */ +- {32,0,0xff0000,0xff00,0xff,0,24,0,0xff0000,0xff00,0xff,0,ConvertMMX,0, +- ConvertMMXpII32_24RGB888,0,0,0,PROC_MMX_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,24,0,0xff0000,0xff00,0xff,0,_ConvertMMX,0, ++ _ConvertMMXpII32_24RGB888,0,0,0,PROC_MMX_PENTIUM}, + +- {32,0,0xff0000,0xff00,0xff,0,16,0,0xf800,0x7e0,0x1f,0,ConvertMMX,0, +- ConvertMMXpII32_16RGB565,0,0,0,PROC_MMX_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,16,0,0xf800,0x7e0,0x1f,0,_ConvertMMX,0, ++ _ConvertMMXpII32_16RGB565,0,0,0,PROC_MMX_PENTIUM}, + +- {32,0,0xff0000,0xff00,0xff,0,16,0,0x1f,0x7e0,0xf800,0,ConvertMMX,0, +- ConvertMMXpII32_16BGR565,0,0,0,PROC_MMX_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,16,0,0x1f,0x7e0,0xf800,0,_ConvertMMX,0, ++ _ConvertMMXpII32_16BGR565,0,0,0,PROC_MMX_PENTIUM}, + +- {32,0,0xff0000,0xff00,0xff,0,16,0,0x7c00,0x3e0,0x1f,0,ConvertMMX,0, +- ConvertMMXpII32_16RGB555,0,0,0,PROC_MMX_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,16,0,0x7c00,0x3e0,0x1f,0,_ConvertMMX,0, ++ _ConvertMMXpII32_16RGB555,0,0,0,PROC_MMX_PENTIUM}, + +- {32,0,0xff0000,0xff00,0xff,0,16,0,0x1f,0x3e0,0x7c00,0,ConvertMMX,0, +- ConvertMMXpII32_16BGR555,0,0,0,PROC_MMX_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,16,0,0x1f,0x3e0,0x7c00,0,_ConvertMMX,0, ++ _ConvertMMXpII32_16BGR555,0,0,0,PROC_MMX_PENTIUM}, + + /* ------ From 32 RGB 888 - MMX PENTIUM ------- */ + +- {32,0,0xff0000,0xff00,0xff,0,16,0,0x7c00,0x3e0,0x1f,0,ConvertMMX,0, +- ConvertMMXp32_16RGB555,0,0,0,PROC_MMX_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,16,0,0x7c00,0x3e0,0x1f,0,_ConvertMMX,0, ++ _ConvertMMXp32_16RGB555,0,0,0,PROC_MMX_PENTIUM}, + + + /* ------ From 32 RGB 888 - X86 PENTIUM ------- */ + +- {32,0,0xff0000,0xff00,0xff,0,32,0,0xff,0xff00,0xff0000,0,ConvertX86,0, +- ConvertX86p32_32BGR888,0,0,0,PROC_X86_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,32,0,0xff,0xff00,0xff0000,0,_ConvertX86,0, ++ _ConvertX86p32_32BGR888,0,0,0,PROC_X86_PENTIUM}, + + {32,0,0xff0000,0xff00,0xff,0,32,0,0xff000000,0xff0000,0xff00,0xff, +- ConvertX86,0, +- ConvertX86p32_32RGBA888,0,0,0,PROC_X86_PENTIUM}, ++ _ConvertX86,0, ++ _ConvertX86p32_32RGBA888,0,0,0,PROC_X86_PENTIUM}, + + {32,0,0xff0000,0xff00,0xff,0,32,0,0xff00,0xff0000,0xff000000,0xff, +- ConvertX86,0, +- ConvertX86p32_32BGRA888,0,0,0,PROC_X86_PENTIUM}, ++ _ConvertX86,0, ++ _ConvertX86p32_32BGRA888,0,0,0,PROC_X86_PENTIUM}, + +- {32,0,0xff0000,0xff00,0xff,0,24,0,0xff0000,0xff00,0xff,0,ConvertX86,0, +- ConvertX86p32_24RGB888,0,0,0,PROC_X86_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,24,0,0xff0000,0xff00,0xff,0,_ConvertX86,0, ++ _ConvertX86p32_24RGB888,0,0,0,PROC_X86_PENTIUM}, + +- {32,0,0xff0000,0xff00,0xff,0,24,0,0xff,0xff00,0xff0000,0,ConvertX86,0, +- ConvertX86p32_24BGR888,0,0,0,PROC_X86_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,24,0,0xff,0xff00,0xff0000,0,_ConvertX86,0, ++ _ConvertX86p32_24BGR888,0,0,0,PROC_X86_PENTIUM}, + + {32,0,0xff0000,0xff00,0xff,0,16,0,0xf800,0x7e0,0x1f,0, +- ConvertX86,ConvertX86Stretch, +- ConvertX86p32_16RGB565,ConvertX86p32_16RGB565_S, ++ _ConvertX86,_ConvertX86Stretch, ++ _ConvertX86p32_16RGB565,_ConvertX86p32_16RGB565_S, + 0,0,PROC_X86_PENTIUM}, + +- {32,0,0xff0000,0xff00,0xff,0,16,0,0x1f,0x7e0,0xf800,0,ConvertX86,0, +- ConvertX86p32_16BGR565,0,0,0,PROC_X86_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,16,0,0x1f,0x7e0,0xf800,0,_ConvertX86,0, ++ _ConvertX86p32_16BGR565,0,0,0,PROC_X86_PENTIUM}, + +- {32,0,0xff0000,0xff00,0xff,0,16,0,0x7c00,0x3e0,0x1f,0,ConvertX86,0, +- ConvertX86p32_16RGB555,0,0,0,PROC_X86_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,16,0,0x7c00,0x3e0,0x1f,0,_ConvertX86,0, ++ _ConvertX86p32_16RGB555,0,0,0,PROC_X86_PENTIUM}, + +- {32,0,0xff0000,0xff00,0xff,0,16,0,0x1f,0x3e0,0x7c00,0,ConvertX86,0, +- ConvertX86p32_16BGR555,0,0,0,PROC_X86_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,16,0,0x1f,0x3e0,0x7c00,0,_ConvertX86,0, ++ _ConvertX86p32_16BGR555,0,0,0,PROC_X86_PENTIUM}, + +- {32,0,0xff0000,0xff00,0xff,0,8,0,0xe0,0x1c,0x3,0,ConvertX86,0, +- ConvertX86p32_8RGB332,0,0,0,PROC_X86_PENTIUM}, ++ {32,0,0xff0000,0xff00,0xff,0,8,0,0xe0,0x1c,0x3,0,_ConvertX86,0, ++ _ConvertX86p32_8RGB332,0,0,0,PROC_X86_PENTIUM}, + + + + /* ------ From 16 RGB 565 - X86 PENTIUM ------- */ + +- {16,0,0xf800,0x7e0,0x1f,0,32,0,0xff0000,0xff00,0xff,0,ConvertX86,0, +- ConvertX86p16_32RGB888,0,0,0,PROC_X86_PENTIUM}, ++ {16,0,0xf800,0x7e0,0x1f,0,32,0,0xff0000,0xff00,0xff,0,_ConvertX86,0, ++ _ConvertX86p16_32RGB888,0,0,0,PROC_X86_PENTIUM}, + +- {16,0,0xf800,0x7e0,0x1f,0,32,0,0xff,0xff00,0xff0000,0,ConvertX86,0, +- ConvertX86p16_32BGR888,0,0,0,PROC_X86_PENTIUM}, ++ {16,0,0xf800,0x7e0,0x1f,0,32,0,0xff,0xff00,0xff0000,0,_ConvertX86,0, ++ _ConvertX86p16_32BGR888,0,0,0,PROC_X86_PENTIUM}, + +- {16,0,0xf800,0x7e0,0x1f,0,32,0,0xff000000,0xff0000,0xff00,0xff,ConvertX86,0, +- ConvertX86p16_32RGBA888,0,0,0,PROC_X86_PENTIUM}, ++ {16,0,0xf800,0x7e0,0x1f,0,32,0,0xff000000,0xff0000,0xff00,0xff,_ConvertX86,0, ++ _ConvertX86p16_32RGBA888,0,0,0,PROC_X86_PENTIUM}, + +- {16,0,0xf800,0x7e0,0x1f,0,32,0,0xff00,0xff0000,0xff000000,0xff,ConvertX86,0, +- ConvertX86p16_32BGRA888,0,0,0,PROC_X86_PENTIUM}, ++ {16,0,0xf800,0x7e0,0x1f,0,32,0,0xff00,0xff0000,0xff000000,0xff,_ConvertX86,0, ++ _ConvertX86p16_32BGRA888,0,0,0,PROC_X86_PENTIUM}, + +- {16,0,0xf800,0x7e0,0x1f,0,24,0,0xff0000,0xff00,0xff,0,ConvertX86,0, +- ConvertX86p16_24RGB888,0,0,0,PROC_X86_PENTIUM}, ++ {16,0,0xf800,0x7e0,0x1f,0,24,0,0xff0000,0xff00,0xff,0,_ConvertX86,0, ++ _ConvertX86p16_24RGB888,0,0,0,PROC_X86_PENTIUM}, + +- {16,0,0xf800,0x7e0,0x1f,0,24,0,0xff,0xff00,0xff0000,0,ConvertX86,0, +- ConvertX86p16_24BGR888,0,0,0,PROC_X86_PENTIUM}, ++ {16,0,0xf800,0x7e0,0x1f,0,24,0,0xff,0xff00,0xff0000,0,_ConvertX86,0, ++ _ConvertX86p16_24BGR888,0,0,0,PROC_X86_PENTIUM}, + +- {16,0,0xf800,0x7e0,0x1f,0,16,0,0x1f,0x7e0,0xf800,0,ConvertX86,0, +- ConvertX86p16_16BGR565,0,0,0,PROC_X86_PENTIUM}, ++ {16,0,0xf800,0x7e0,0x1f,0,16,0,0x1f,0x7e0,0xf800,0,_ConvertX86,0, ++ _ConvertX86p16_16BGR565,0,0,0,PROC_X86_PENTIUM}, + +- {16,0,0xf800,0x7e0,0x1f,0,16,0,0x7c00,0x3e0,0x1f,0,ConvertX86,0, +- ConvertX86p16_16RGB555,0,0,0,PROC_X86_PENTIUM}, ++ {16,0,0xf800,0x7e0,0x1f,0,16,0,0x7c00,0x3e0,0x1f,0,_ConvertX86,0, ++ _ConvertX86p16_16RGB555,0,0,0,PROC_X86_PENTIUM}, + +- {16,0,0xf800,0x7e0,0x1f,0,16,0,0x1f,0x3e0,0x7c00,0,ConvertX86,0, +- ConvertX86p16_16BGR555,0,0,0,PROC_X86_PENTIUM}, ++ {16,0,0xf800,0x7e0,0x1f,0,16,0,0x1f,0x3e0,0x7c00,0,_ConvertX86,0, ++ _ConvertX86p16_16BGR555,0,0,0,PROC_X86_PENTIUM}, + +- {16,0,0xf800,0x7e0,0x1f,0,8,0,0xe0,0x1c,0x3,0,ConvertX86,0, +- ConvertX86p16_8RGB332,0,0,0,PROC_X86_PENTIUM}, ++ {16,0,0xf800,0x7e0,0x1f,0,8,0,0xe0,0x1c,0x3,0,_ConvertX86,0, ++ _ConvertX86p16_8RGB332,0,0,0,PROC_X86_PENTIUM}, + +- {8,1,0,0,0,0,16,0,0,0,0,0,ConvertX86,0, +- ConvertX86pI8_16,0,0,0,PROC_X86_PENTIUM}, ++ {8,1,0,0,0,0,16,0,0,0,0,0,_ConvertX86,0, ++ _ConvertX86pI8_16,0,0,0,PROC_X86_PENTIUM}, + + + #endif +--- Hermes-1.3.3/src/c_genrc_ao_blit.c.deb 2001-08-09 18:13:50.000000000 +0200 ++++ Hermes-1.3.3/src/c_genrc_ao_blit.c 2006-07-23 21:06:56.000000000 +0200 +@@ -104,7 +104,7 @@ + { unsigned long s_pixel, d_pixel, r, g, b, a; + long sr, sg, sb, dr, dg, db, da; + float sa; +- char8 *d_ptr=(char8 *)((int)&s_pixel); ++ char8 *d_ptr=(char8 *)(&s_pixel); + unsigned int count; + char8 *source=iface->s_pixels,*dest=iface->d_pixels; + DEBUG_PRINT("ConvertC_Generic32_A_Generic24_O_Blit called\n",""); +--- Hermes-1.3.3/src/Factory.c.deb 2000-12-06 05:55:28.000000000 +0100 ++++ Hermes-1.3.3/src/Factory.c 2006-07-23 21:06:56.000000000 +0200 +@@ -39,7 +39,7 @@ + #ifdef X86_ASSEMBLER + processor|=PROC_X86_PENTIUM; /* There are no others at the moment */ + +- res=Hermes_X86_CPU(); ++ res=_Hermes_X86_CPU(); + + DEBUG_PRINT("CPUID: %x\n",res) + +@@ -70,20 +70,20 @@ + + if (processor & PROC_MMX_PENTIUM) { + switch(bits) { +- case 32: tmp->func=ClearMMX_32; return tmp; ++ case 32: tmp->func=_ClearMMX_32; return tmp; + case 24: break; +- case 16: tmp->func=ClearMMX_16; return tmp; +- case 8: tmp->func=ClearMMX_8; return tmp; ++ case 16: tmp->func=_ClearMMX_16; return tmp; ++ case 8: tmp->func=_ClearMMX_8; return tmp; + } + + } + + if (processor & PROC_X86_PENTIUM) { + switch(bits) { +- case 32: tmp->func=ClearX86_32; return tmp; ++ case 32: tmp->func=_ClearX86_32; return tmp; + case 24: break; +- case 16: tmp->func=ClearX86_16; return tmp; +- case 8: tmp->func=ClearX86_8; return tmp; ++ case 16: tmp->func=_ClearX86_16; return tmp; ++ case 8: tmp->func=_ClearX86_8; return tmp; + } + } + +@@ -251,13 +251,13 @@ + int asm_found=0; + + switch (bits) { +- case 32: { tmp->normal=CopyX86p_4byte; asm_found=1; } break; ++ case 32: { tmp->normal=_CopyX86p_4byte; asm_found=1; } break; + case 24: break; +- case 16: { tmp->normal=CopyX86p_2byte; asm_found=1; } break; +- case 8: { tmp->normal=CopyX86p_1byte; asm_found=1; } break; ++ case 16: { tmp->normal=_CopyX86p_2byte; asm_found=1; } break; ++ case 8: { tmp->normal=_CopyX86p_1byte; asm_found=1; } break; + } + +- if (asm_found&1) { tmp->loopnormal=ConvertX86; found=1; } ++ if (asm_found&1) { tmp->loopnormal=_ConvertX86; found=1; } + } + + #endif /* X86_ASSEMBLER */ +--- Hermes-1.3.3/src/HeadX86.h.deb 2000-12-06 05:55:28.000000000 +0100 ++++ Hermes-1.3.3/src/HeadX86.h 2006-07-23 21:06:56.000000000 +0200 +@@ -27,52 +27,52 @@ + #endif + + +-void STACKCALL ConvertX86(HermesConverterInterface *); +-void STACKCALL ConvertX86Stretch(HermesConverterInterface *); +-void STACKCALL ClearX86_32(HermesClearInterface *); +-void STACKCALL ClearX86_24(HermesClearInterface *); +-void STACKCALL ClearX86_16(HermesClearInterface *); +-void STACKCALL ClearX86_8(HermesClearInterface *); +- +-int STACKCALL Hermes_X86_CPU(); +- +-void ConvertX86p32_32BGR888(); +-void ConvertX86p32_32RGBA888(); +-void ConvertX86p32_32BGRA888(); +-void ConvertX86p32_24RGB888(); +-void ConvertX86p32_24BGR888(); +-void ConvertX86p32_16RGB565(); +-void ConvertX86p32_16BGR565(); +-void ConvertX86p32_16RGB555(); +-void ConvertX86p32_16BGR555(); +-void ConvertX86p32_8RGB332(); +- +-void ConvertX86p32_16RGB565_S(); +- +-void ConvertX86p16_32RGB888(); +-void ConvertX86p16_32BGR888(); +-void ConvertX86p16_32RGBA888(); +-void ConvertX86p16_32BGRA888(); +-void ConvertX86p16_24RGB888(); +-void ConvertX86p16_24BGR888(); +-void ConvertX86p16_16BGR565(); +-void ConvertX86p16_16RGB555(); +-void ConvertX86p16_16BGR555(); +-void ConvertX86p16_8RGB332(); +- +-void CopyX86p_4byte(); +-void CopyX86p_3byte(); +-void CopyX86p_2byte(); +-void CopyX86p_1byte(); +- +-void ConvertX86pI8_32(); +-void ConvertX86pI8_24(); +-void ConvertX86pI8_16(); +- +-extern int32 ConvertX86p16_32RGB888_LUT_X86[512]; +-extern int32 ConvertX86p16_32BGR888_LUT_X86[512]; +-extern int32 ConvertX86p16_32RGBA888_LUT_X86[512]; +-extern int32 ConvertX86p16_32BGRA888_LUT_X86[512]; ++void STACKCALL _ConvertX86(HermesConverterInterface *); ++void STACKCALL _ConvertX86Stretch(HermesConverterInterface *); ++void STACKCALL _ClearX86_32(HermesClearInterface *); ++void STACKCALL _ClearX86_24(HermesClearInterface *); ++void STACKCALL _ClearX86_16(HermesClearInterface *); ++void STACKCALL _ClearX86_8(HermesClearInterface *); ++ ++int STACKCALL _Hermes_X86_CPU(); ++ ++void _ConvertX86p32_32BGR888(); ++void _ConvertX86p32_32RGBA888(); ++void _ConvertX86p32_32BGRA888(); ++void _ConvertX86p32_24RGB888(); ++void _ConvertX86p32_24BGR888(); ++void _ConvertX86p32_16RGB565(); ++void _ConvertX86p32_16BGR565(); ++void _ConvertX86p32_16RGB555(); ++void _ConvertX86p32_16BGR555(); ++void _ConvertX86p32_8RGB332(); ++ ++void _ConvertX86p32_16RGB565_S(); ++ ++void _ConvertX86p16_32RGB888(); ++void _ConvertX86p16_32BGR888(); ++void _ConvertX86p16_32RGBA888(); ++void _ConvertX86p16_32BGRA888(); ++void _ConvertX86p16_24RGB888(); ++void _ConvertX86p16_24BGR888(); ++void _ConvertX86p16_16BGR565(); ++void _ConvertX86p16_16RGB555(); ++void _ConvertX86p16_16BGR555(); ++void _ConvertX86p16_8RGB332(); ++ ++void _CopyX86p_4byte(); ++void _CopyX86p_3byte(); ++void _CopyX86p_2byte(); ++void _CopyX86p_1byte(); ++ ++void _ConvertX86pI8_32(); ++void _ConvertX86pI8_24(); ++void _ConvertX86pI8_16(); ++ ++extern int32 _ConvertX86p16_32RGB888_LUT_X86[512]; ++extern int32 _ConvertX86p16_32BGR888_LUT_X86[512]; ++extern int32 _ConvertX86p16_32RGBA888_LUT_X86[512]; ++extern int32 _ConvertX86p16_32BGRA888_LUT_X86[512]; + + #ifdef __cplusplus + } +@@ -83,6 +83,7 @@ + + /* Now fix up the ELF underscore problem */ + ++#if 0 + #if defined(__ELF__) && defined(__GNUC__) + #ifdef __cplusplus + extern "C" { +@@ -142,6 +143,7 @@ + #endif + + #endif /* ELF & GNU */ ++#endif + + + diff --git a/Hermes.spec b/Hermes.spec index 78470f3..bc5abfd 100644 --- a/Hermes.spec +++ b/Hermes.spec @@ -1,21 +1,15 @@ Name: Hermes Version: 1.3.3 -Release: 10%{?dist} - +Release: 11%{?dist} Summary: Pixel format conversion library - Group: System Environment/Libraries License: LGPL URL: http://clanlib.org/hermes/ Source: http://clanlib.org/download/files/%{name}-%{version}.tar.bz2 - +Patch0: Hermes-1.3.3-debian.patch +Patch1: Hermes-1.3.3-64bit.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -# we need depcomp, it's symlinked instead of copied -BuildRequires: automake -# sigh, it's in maintainer mode -BuildRequires: autoconf - %description HERMES is a library designed to convert a source buffer with a specified pixel format to a destination buffer with possibly a different format at the maximum @@ -30,8 +24,9 @@ as there is no platform specific code but those are supported: DOS, Win32 (Visual C), Linux, FreeBSD (IRIX, Solaris are on hold at the moment), some BeOS support. + %package devel -Summary: Static libraries and header files for %{name} +Summary: Development libraries and header files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} @@ -39,26 +34,40 @@ Requires: %{name} = %{version}-%{release} The %{name}-devel package contains the static libraries and header files needed for development with %{name}. + %prep %setup -q +%patch0 -p1 -z .deb +%patch1 -p1 -z .64bit +# sigh the tarbal contains bad timestamps or so? Which cause autoxxx to run, +# this stops this: +touch src/hrconfig.h.in +# mark asm files as NOT needing execstack +for i in src/*.S; do + echo '.section .note.GNU-stack,"",@progbits' >> $i +done + %build -%configure +%configure --disable-dependency-tracking --disable-static make %{?_smp_mflags} + %install rm -rf $RPM_BUILD_ROOT %makeinstall - find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' + %clean rm -rf $RPM_BUILD_ROOT + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig + %files %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog FAQ NEWS README TODO* @@ -67,12 +76,22 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root,-) %doc docs/api/*.htm docs/api/*.txt docs/api/api.ps -%dir %{_includedir}/Hermes -%{_includedir}/Hermes/*.h -%{_libdir}/libHermes.a +%{_includedir}/Hermes %{_libdir}/libHermes.so + %changelog +* Sun Jul 23 2006 Hans de Goede 1.3.3-11 +- Taking over as new maintainer +- Add a patch from Debian fixing some 64 bit issues and more importantly + fix building with a recent toolchain. +- Fix some further 64 bit issues +- Remove static lib +- Add --disable-dependency-tracking, touch config.h.in to fix the timestamp + instead of BR: automake, autoconf +- Mark asm files as NOT needing execstack, making us OK with new default + SELinux targeted policy settings. + * Sun Jul 02 2006 Thomas Vander Stichele - 1.3.3-10 - rebuilt for devel, for upgrade path