diff options
author | Kevin F. Quinn <kevquinn@gentoo.org> | 2006-09-05 22:57:24 +0000 |
---|---|---|
committer | Kevin F. Quinn <kevquinn@gentoo.org> | 2006-09-05 22:57:24 +0000 |
commit | c7fddbec30731142264cb59a2229c4a38ca41b6e (patch) | |
tree | 71c8e7f406b7ede51dd7dd40ef71b22b68ada8a3 /hardened/xorg | |
parent | UPdate for 1.1.0, 1.1.1 (diff) | |
download | kevquinn-c7fddbec30731142264cb59a2229c4a38ca41b6e.tar.gz kevquinn-c7fddbec30731142264cb59a2229c4a38ca41b6e.tar.bz2 kevquinn-c7fddbec30731142264cb59a2229c4a38ca41b6e.zip |
Add 6.5-r4, misc patches and update 6.5-r3 in line with portage tree
svn path=/; revision=4
Diffstat (limited to 'hardened/xorg')
8 files changed, 746 insertions, 11 deletions
diff --git a/hardened/xorg/media-libs/mesa/Manifest b/hardened/xorg/media-libs/mesa/Manifest index 4b5510e..7d51c8b 100644 --- a/hardened/xorg/media-libs/mesa/Manifest +++ b/hardened/xorg/media-libs/mesa/Manifest @@ -6,6 +6,14 @@ AUX 6.4-multilib-fix.patch 535 RMD160 5ab0237e5096728b38675c9c265cfb2c88009c00 S MD5 d6254b7a775480084efcd30d9fb4cbad files/6.4-multilib-fix.patch 535 RMD160 5ab0237e5096728b38675c9c265cfb2c88009c00 files/6.4-multilib-fix.patch 535 SHA256 8fe39ec2ca86b206cb0d870d6644f68eb52af209f5bfb6eaad612deee80d754f files/6.4-multilib-fix.patch 535 +AUX 6.5-fix-radeon-PCIE.patch 1730 RMD160 163c5d72a388174b614e81076a7334ecde5459a8 SHA1 80c7b96cf02661786409f2370ca321d5a3aa4a80 SHA256 4c2b927a61a4ca5d12571016d8b0962f29f22d535100abc260a30eedd3be3736 +MD5 200c1f868cea4e53c5dd16c30459d070 files/6.5-fix-radeon-PCIE.patch 1730 +RMD160 163c5d72a388174b614e81076a7334ecde5459a8 files/6.5-fix-radeon-PCIE.patch 1730 +SHA256 4c2b927a61a4ca5d12571016d8b0962f29f22d535100abc260a30eedd3be3736 files/6.5-fix-radeon-PCIE.patch 1730 +AUX 6.5-pic-textrel-fix.patch 7287 RMD160 487951a279fe5fd2540c0b5adfbddac5012e7864 SHA1 3ed9e7bac4625fcecf9246bc9583f188ddf6ca47 SHA256 29dcd5409295d0a8d9491498f05de2be4a2394d1b8a11f91d928b3f311833cf8 +MD5 a7befaa9d9f2dea85269c588f32db166 files/6.5-pic-textrel-fix.patch 7287 +RMD160 487951a279fe5fd2540c0b5adfbddac5012e7864 files/6.5-pic-textrel-fix.patch 7287 +SHA256 29dcd5409295d0a8d9491498f05de2be4a2394d1b8a11f91d928b3f311833cf8 files/6.5-pic-textrel-fix.patch 7287 AUX 6.5-re-order-context-destruction.patch 2295 RMD160 5c2648f9d4fca2f3abf53ad9d29101fd931493be SHA1 0f3825910ba3d246cf59efe560f9fecab82e86d4 SHA256 dda980be89d14df3659c0d409c56e4ccd6a03afdca2e8edc502845943423a600 MD5 621322964afb60d36444f1dfe86719b2 files/6.5-re-order-context-destruction.patch 2295 RMD160 5c2648f9d4fca2f3abf53ad9d29101fd931493be files/6.5-re-order-context-destruction.patch 2295 @@ -14,11 +22,30 @@ AUX change-default-dri-driver-dir-X7.1.patch 399 RMD160 169dd99888a66bf63bc528f1 MD5 81ac0734b6194da3d9ca40d564303670 files/change-default-dri-driver-dir-X7.1.patch 399 RMD160 169dd99888a66bf63bc528f183bd4c2b6d16b0f9 files/change-default-dri-driver-dir-X7.1.patch 399 SHA256 8dbdbad95f47bfc18a366e091ffc1d67ff16da970181626d939a19eed46a212d files/change-default-dri-driver-dir-X7.1.patch 399 +AUX gl-dispatch-pic-attempt-failed.patch 470 RMD160 d1618faae0fe8c930b4ddf543c20aae83c7dab1f SHA1 e50583533f4cf1093ae133d455698a39813f873c SHA256 0aa3dcc3dafed093d6941f05bc2476cbd70c000ed9852c67b7f5234cd02bbd5b +MD5 4b118e3311f4a09d3e21e33a03f0bb8b files/gl-dispatch-pic-attempt-failed.patch 470 +RMD160 d1618faae0fe8c930b4ddf543c20aae83c7dab1f files/gl-dispatch-pic-attempt-failed.patch 470 +SHA256 0aa3dcc3dafed093d6941f05bc2476cbd70c000ed9852c67b7f5234cd02bbd5b files/gl-dispatch-pic-attempt-failed.patch 470 DIST MesaLib-6.5.tar.bz2 3062363 RMD160 6006bfdfed8a2425059c31ee699b5aca4d5f57cd SHA1 a77368901b0731b662d0858aef2c405a7ddf6014 SHA256 dcacf4c18af89b57e66dc7ba39e24c3b74ff6f83b8745bcc1390170a4190eebd -EBUILD mesa-6.5-r3.ebuild 8897 RMD160 8c5399a04fa262517ee2a9685394046e4369e3d4 SHA1 f6b7b7b5e8904c4fff4edfa83df9188a7febd8c7 SHA256 e5028b91184b634d4abfd636c38831678cba3457d63140c895a0dea2de9e07c2 -MD5 16162b59e4f93f2308d2e81c3d573bf9 mesa-6.5-r3.ebuild 8897 -RMD160 8c5399a04fa262517ee2a9685394046e4369e3d4 mesa-6.5-r3.ebuild 8897 -SHA256 e5028b91184b634d4abfd636c38831678cba3457d63140c895a0dea2de9e07c2 mesa-6.5-r3.ebuild 8897 +EBUILD mesa-6.5-r3.ebuild 9345 RMD160 e517d566c5f1ba5547ecdd928c3a2a291f2e6b79 SHA1 978314030ff1644c1a09e1b2fe88447048de3eab SHA256 df356315d206680e0e3408c60b77809d17fb604c592e6f17661680d5a19c472c +MD5 1e243b80c2458e0295d4f04ddb126572 mesa-6.5-r3.ebuild 9345 +RMD160 e517d566c5f1ba5547ecdd928c3a2a291f2e6b79 mesa-6.5-r3.ebuild 9345 +SHA256 df356315d206680e0e3408c60b77809d17fb604c592e6f17661680d5a19c472c mesa-6.5-r3.ebuild 9345 +EBUILD mesa-6.5-r4.ebuild 9314 RMD160 77abddab0fc003c028f8c23e5c152115f9e200e4 SHA1 e5b9f42be033d4f281ddf334fb521ea3836dfabc SHA256 beb9a36c05262069f95dd8088acfb1bdc199be61c9a3b39e1b31eb7d47476531 +MD5 c6374856f7b6acd37e43486b03500ef0 mesa-6.5-r4.ebuild 9314 +RMD160 77abddab0fc003c028f8c23e5c152115f9e200e4 mesa-6.5-r4.ebuild 9314 +SHA256 beb9a36c05262069f95dd8088acfb1bdc199be61c9a3b39e1b31eb7d47476531 mesa-6.5-r4.ebuild 9314 +MISC TODO 206 RMD160 78c36952032bdcdcaa94f6041a6176a09428417f SHA1 ee579afbaae8cff1939e995a871eecde38ffc144 SHA256 8aaef3acbc0dca54146e87953c739b0d04cc8a8452954d32ef9f64addabe2286 +MD5 537de2f65df523322b6a88c8ac6e6bd8 TODO 206 +RMD160 78c36952032bdcdcaa94f6041a6176a09428417f TODO 206 +SHA256 8aaef3acbc0dca54146e87953c739b0d04cc8a8452954d32ef9f64addabe2286 TODO 206 +MISC mesa-6.5-r3.ebuild.orig 9260 RMD160 6f01b141ee74348cc0143e293664be225892af99 SHA1 a0f8f4e537b499044dea04f671ab15158f5e054a SHA256 a9c178e7cd6a3d22941c19378e0cdffa8a3564fd081dff68e6f5624fd498649d +MD5 9d72190cb0d7bc36dcda6d3bd289471e mesa-6.5-r3.ebuild.orig 9260 +RMD160 6f01b141ee74348cc0143e293664be225892af99 mesa-6.5-r3.ebuild.orig 9260 +SHA256 a9c178e7cd6a3d22941c19378e0cdffa8a3564fd081dff68e6f5624fd498649d mesa-6.5-r3.ebuild.orig 9260 MD5 80bc8bfb6472d4dcbad6e14a2595c1a9 files/digest-mesa-6.5-r3 241 RMD160 069ddf1320b547a5a5cf1af3d0611a6c35398c7e files/digest-mesa-6.5-r3 241 SHA256 5a5ab578d50f251808ddf18cd61f6e5518224168555fc288725a8466892b4f88 files/digest-mesa-6.5-r3 241 +MD5 80bc8bfb6472d4dcbad6e14a2595c1a9 files/digest-mesa-6.5-r4 241 +RMD160 069ddf1320b547a5a5cf1af3d0611a6c35398c7e files/digest-mesa-6.5-r4 241 +SHA256 5a5ab578d50f251808ddf18cd61f6e5518224168555fc288725a8466892b4f88 files/digest-mesa-6.5-r4 241 diff --git a/hardened/xorg/media-libs/mesa/TODO b/hardened/xorg/media-libs/mesa/TODO new file mode 100644 index 0000000..71e6e6a --- /dev/null +++ b/hardened/xorg/media-libs/mesa/TODO @@ -0,0 +1,6 @@ +Either: +a) Fix gl-dispatch for PIC +b) fix so that asm can be enabled with asm_api (i.e. dispatch) disabled + +or both. (a) is useful for PIC, (b) is useful for PaX/SELinux - if (b) +then (a) is not relevant. diff --git a/hardened/xorg/media-libs/mesa/files/6.5-fix-radeon-PCIE.patch b/hardened/xorg/media-libs/mesa/files/6.5-fix-radeon-PCIE.patch new file mode 100644 index 0000000..fda0957 --- /dev/null +++ b/hardened/xorg/media-libs/mesa/files/6.5-fix-radeon-PCIE.patch @@ -0,0 +1,45 @@ +http://bugs.gentoo.org/show_bug.cgi?id=136315 +--- src/mesa/drivers/dri/radeon/radeon_screen.c ++++ src/mesa/drivers/dri/radeon/radeon_screen.c +@@ -343,7 +343,6 @@ + return NULL; + } + +- if (sPriv->drmMinor >= 6) { + gp.param = RADEON_PARAM_GART_BASE; + gp.value = &screen->gart_base; + +@@ -371,7 +370,6 @@ + screen->drmSupportsFragShader = (sPriv->drmMinor >= 18); + screen->drmSupportsPointSprites = (sPriv->drmMinor >= 13); + screen->drmSupportsCubeMapsR100 = (sPriv->drmMinor >= 15); +- } + } + + screen->mmio.handle = dri_priv->registerHandle; +@@ -425,9 +423,7 @@ + return NULL; + } + +- screen->gart_texture_offset = dri_priv->gartTexOffset + ( screen->IsPCI +- ? INREG( RADEON_AIC_LO_ADDR ) +- : ( ( INREG( RADEON_MC_AGP_LOCATION ) & 0x0ffffU ) << 16 ) ); ++ screen->gart_texture_offset = dri_priv->gartTexOffset + screen->gart_base; + } + + screen->chip_flags = 0; +@@ -976,12 +972,12 @@ + static const char *driver_name = "Radeon"; + static const __DRIutilversion2 ddx_expected = { 4, 5, 0, 0 }; + static const __DRIversion dri_expected = { 4, 0, 0 }; +- static const __DRIversion drm_expected = { 1, 3, 0 }; ++ static const __DRIversion drm_expected = { 1, 6, 0 }; + #elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R200) + static const char *driver_name = "R200"; + static const __DRIutilversion2 ddx_expected = { 4, 5, 0, 0 }; + static const __DRIversion dri_expected = { 4, 0, 0 }; +- static const __DRIversion drm_expected = { 1, 5, 0 }; ++ static const __DRIversion drm_expected = { 1, 6, 0 }; + #elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R300) + static const char *driver_name = "R300"; + static const __DRIutilversion2 ddx_expected = { 4, 5, 0, 0 }; diff --git a/hardened/xorg/media-libs/mesa/files/6.5-pic-textrel-fix.patch b/hardened/xorg/media-libs/mesa/files/6.5-pic-textrel-fix.patch new file mode 100644 index 0000000..9859702 --- /dev/null +++ b/hardened/xorg/media-libs/mesa/files/6.5-pic-textrel-fix.patch @@ -0,0 +1,274 @@ +--- src/mesa/x86/mmx_blend.S.orig 2006-07-02 12:59:54.000000000 +0200 ++++ src/mesa/x86/mmx_blend.S 2006-07-02 15:52:35.000000000 +0200 +@@ -1,4 +1,4 @@ +- ++ ; + /* + * Written by José Fonseca <j_r_fonseca@yahoo.co.uk> + */ +@@ -240,7 +240,9 @@ + ONE(MOVD ( MSS, REGIND(rgba) )) /* | | | | sa1 | sb1 | sg1 | sr1 */ ;\ + TWO(MOVQ ( MSS, REGIND(rgba) )) /* sa2 | sb2 | sg2 | sr2 | sa1 | sb1 | sg1 | sr1 */ + +- ++/* Kevin F. Quinn <kevquinn@gentoo.org> 2 July 2006 ++ * Replace data segment constants with text-segment ++ * constants (via pushl/movq) + SEG_DATA + + ALIGNDATA8 +@@ -249,6 +251,11 @@ + + const_80: + D_LONG 0x80808080, 0x80808080 ++*/ ++#define const_0080_l 0x00800080 ++#define const_0080_h 0x00800080 ++#define const_80_l 0x80808080 ++#define const_80_h 0x80808080 + + SEG_TEXT + +@@ -302,8 +309,16 @@ + #define TAG(x) CONCAT(x,_min) + #define LLTAG(x) LLBL2(x,_min) + ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions ++#define INIT \ ++ MOVQ ( CONTENT(const_80), MM7 ) ++ */ + #define INIT \ +- MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ ++ PUSH_L ( CONST(const_80_h) ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ ;\ ++ PUSH_L ( CONST(const_80_l) ) ;\ ++ MOVQ ( REGIND(ESP), MM7 ) ;\ ++ ADD_L ( CONST(8), ESP) + + #define MAIN( rgba, dest ) \ + GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ +@@ -326,8 +341,16 @@ + #define TAG(x) CONCAT(x,_max) + #define LLTAG(x) LLBL2(x,_max) + ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions + #define INIT \ +- MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ ++ MOVQ ( CONTENT(const_80), MM7 ) ++ */ ++#define INIT \ ++ PUSH_L ( CONST(const_80_l) ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ ;\ ++ PUSH_L ( CONST(const_80_h) ) ;\ ++ MOVQ ( REGIND(ESP), MM7 ) ;\ ++ ADD_L ( CONST(8), ESP) + + #define MAIN( rgba, dest ) \ + GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ +@@ -350,9 +373,17 @@ + #define TAG(x) CONCAT(x,_modulate) + #define LLTAG(x) LLBL2(x,_modulate) + ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions ++#define INIT \ ++ MOVQ ( CONTENT(const_0080), MM7 ) ++ */ + #define INIT \ + PXOR ( MM0, MM0 ) /* 0x0000 | 0x0000 | 0x0000 | 0x0000 */ ;\ +- MOVQ ( CONTENT(const_0080), MM7 ) /* 0x0080 | 0x0080 | 0x0080 | 0x0080 */ ++ PUSH_L ( CONST(const_0080_l) ) /* 0x0080 | 0x0080 | 0x0080 | 0x0080 */ ;\ ++ PUSH_L ( CONST(const_0080_h) ) ;\ ++ MOVQ ( REGIND(ESP), MM7 ) ;\ ++ ADD_L ( CONST(8), ESP) + + #define MAIN( rgba, dest ) \ + GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ +--- src/mesa/x86/read_rgba_span_x86.S.orig 2006-07-02 16:12:27.000000000 +0200 ++++ src/mesa/x86/read_rgba_span_x86.S 2006-07-02 16:50:47.000000000 +0200 +@@ -32,6 +32,8 @@ + + .file "read_rgba_span_x86.S" + #if !defined(__DJGPP__) && !defined(__MINGW32__) /* this one cries for assyntax.h */ ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions + .section .rodata + .align 16 + .type mask, @object +@@ -45,6 +47,19 @@ + .long 0x00ff0000 + .long 0x00ff0000 + .long 0x00ff0000 ++ */ ++#define LOAD_MASK(mvins,m1,m2) \ ++ pushl $0xff00ff00 ;\ ++ pushl $0xff00ff00 ;\ ++ pushl $0xff00ff00 ;\ ++ pushl $0xff00ff00 ;\ ++ mvins (%esp), m1 ;\ ++ pushl $0x00ff0000 ;\ ++ pushl $0x00ff0000 ;\ ++ pushl $0x00ff0000 ;\ ++ pushl $0x00ff0000 ;\ ++ mvins (%esp), m2 ;\ ++ addl $32, %esp + + + /* I implemented these as macros because the appear in quite a few places, +@@ -84,8 +99,12 @@ + #ifdef USE_INNER_EMMS + emms + #endif ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions + movq mask, %mm1 + movq mask+16, %mm2 ++ */ ++ LOAD_MASK(movq,%mm1,%mm2) + + movl 8(%esp), %ebx /* source pointer */ + movl 16(%esp), %edx /* number of pixels to copy */ +@@ -182,8 +201,12 @@ + #ifdef USE_INNER_EMMS + emms + #endif ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions + movq mask, %mm1 + movq mask+16, %mm2 ++ */ ++ LOAD_MASK(movq,%mm1,%mm2) + + movl 16(%esp), %ebx /* source pointer */ + movl 24(%esp), %edx /* number of pixels to copy */ +@@ -341,8 +364,12 @@ + pushl %esi + pushl %ebx + ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions + movdqa mask, %xmm1 + movdqa mask+16, %xmm2 ++ */ ++ LOAD_MASK(movdqa,%xmm1,%xmm2) + + movl 12(%esp), %ebx /* source pointer */ + movl 20(%esp), %edx /* number of pixels to copy */ +@@ -464,6 +491,10 @@ + + + ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions ++ */ ++#if 0 + .section .rodata + + .align 16 +@@ -510,6 +541,26 @@ + + alpha: .long 0x00000000 + .long 0x00ff0000 ++#endif ++ ++#define MASK_565_L 0x07e0f800 ++#define MASK_565_H 0x0000001f ++#define SCALE_ADJUST 5 ++#if SCALE_ADJUST == 5 ++#define PRESCALE_L 0x00100001 ++#define PRESCALE_H 0x00000200 ++#define SCALE_L 0x40C620E8 ++#define SCALE_H 0x0000839d ++#elif SCALE_ADJUST == 0 ++#define PRESCALE_L 0x00200001 ++#define PRESCALE_H 0x00000800 ++#define SCALE_L 0x01040108 ++#define SCALE_H 0x00000108 ++#else ++#error SCALE_ADJUST must either be 5 or 0. ++#endif ++#define ALPHA_L 0x00000000 ++#define ALPHA_H 0x00ff0000 + + /** + * MMX optimized version of the RGB565 to RGBA copy routine. +@@ -530,9 +581,25 @@ + movl 8(%esp), %edx /* destination pointer */ + movl 12(%esp), %ecx /* number of pixels to copy */ + ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions + movq mask_565, %mm5 + movq prescale, %mm6 + movq scale, %mm7 ++ */ ++ pushl MASK_565_H ++ pushl MASK_565_L ++ movq (%esp), %mm5 ++ pushl PRESCALE_H ++ pushl PRESCALE_L ++ movq (%esp), %mm6 ++ pushl SCALE_H ++ pushl SCALE_L ++ movq (%esp), %mm7 ++ pushl ALPHA_H ++ pushl ALPHA_L ++ movq (%esp), %mm3 ++ addl $32,%esp + + sarl $2, %ecx + jle .L01 /* Bail early if the count is negative. */ +@@ -581,8 +648,13 @@ + /* Always set the alpha value to 0xff. + */ + ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions + por alpha, %mm0 + por alpha, %mm2 ++ */ ++ por %mm3, %mm0 ++ por %mm3, %mm2 + + + /* Pack the 16-bit values to 8-bit values and store the converted +@@ -609,8 +681,13 @@ + pmulhuw %mm7, %mm0 + pmulhuw %mm7, %mm2 + ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions + por alpha, %mm0 + por alpha, %mm2 ++ */ ++ por %mm3, %mm0 ++ por %mm3, %mm2 + + packuswb %mm2, %mm0 + +@@ -647,8 +724,13 @@ + pmulhuw %mm7, %mm0 + pmulhuw %mm7, %mm2 + ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions + por alpha, %mm0 + por alpha, %mm2 ++ */ ++ por %mm3, %mm0 ++ por %mm3, %mm2 + + packuswb %mm2, %mm0 + +@@ -675,7 +757,11 @@ + #endif + pmulhuw %mm7, %mm0 + ++/* Kevin F. Quinn 2nd July 2006 ++ * Replace data segment constants with text-segment instructions + por alpha, %mm0 ++ */ ++ por %mm3, %mm0 + + packuswb %mm0, %mm0 + diff --git a/hardened/xorg/media-libs/mesa/files/digest-mesa-6.5-r4 b/hardened/xorg/media-libs/mesa/files/digest-mesa-6.5-r4 new file mode 100644 index 0000000..79639c7 --- /dev/null +++ b/hardened/xorg/media-libs/mesa/files/digest-mesa-6.5-r4 @@ -0,0 +1,3 @@ +MD5 61beda590bfc5b4a12e979d5f2d70d7a MesaLib-6.5.tar.bz2 3062363 +RMD160 6006bfdfed8a2425059c31ee699b5aca4d5f57cd MesaLib-6.5.tar.bz2 3062363 +SHA256 dcacf4c18af89b57e66dc7ba39e24c3b74ff6f83b8745bcc1390170a4190eebd MesaLib-6.5.tar.bz2 3062363 diff --git a/hardened/xorg/media-libs/mesa/files/gl-dispatch-pic-attempt-failed.patch b/hardened/xorg/media-libs/mesa/files/gl-dispatch-pic-attempt-failed.patch new file mode 100644 index 0000000..ae81686 --- /dev/null +++ b/hardened/xorg/media-libs/mesa/files/gl-dispatch-pic-attempt-failed.patch @@ -0,0 +1,15 @@ +--- src/mesa/x86/glapi_x86.S.orig 2006-07-02 19:15:07.000000000 +0200 ++++ src/mesa/x86/glapi_x86.S 2006-07-02 19:17:15.000000000 +0200 +@@ -113,7 +113,12 @@ + HIDDEN(GLNAME(_x86_get_dispatch)) + ALIGNTEXT16 + GLNAME(_x86_get_dispatch): ++/* Kevin F. Quinn <kevquinn@gentoo.org> 2 July 2006 ++ * Replace with PIC version + movl %gs:_glapi_tls_Dispatch@NTPOFF, %eax ++ */ ++ movl _glapi_tls_Dispatch@GOTNTPOFF(%ebx), %eax ++ movl %gs:(%eax), %eax + ret + + #elif defined(PTHREADS) diff --git a/hardened/xorg/media-libs/mesa/mesa-6.5-r3.ebuild b/hardened/xorg/media-libs/mesa/mesa-6.5-r3.ebuild index c022cb0..05f2ce0 100644 --- a/hardened/xorg/media-libs/mesa/mesa-6.5-r3.ebuild +++ b/hardened/xorg/media-libs/mesa/mesa-6.5-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-6.5-r3.ebuild,v 1.2 2006/06/21 06:07:43 spyderous Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-6.5-r3.ebuild,v 1.12 2006/08/25 20:53:37 hanno Exp $ inherit eutils toolchain-funcs multilib flag-o-matic portability @@ -14,7 +14,7 @@ HOMEPAGE="http://mesa3d.sourceforge.net/" SRC_URI="mirror://sourceforge/mesa3d/${MY_SRC_P}.tar.bz2" LICENSE="LGPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +KEYWORDS="alpha ~amd64 arm hppa ia64 mips ppc ppc64 sh sparc ~x86 ~x86-fbsd" IUSE_VIDEO_CARDS=" video_cards_i810 video_cards_mach64 @@ -31,6 +31,8 @@ IUSE_VIDEO_CARDS=" video_cards_via" IUSE="${IUSE_VIDEO_CARDS} debug + doc + hardened motif nptl" @@ -44,6 +46,7 @@ RDEPEND="dev-libs/expat x11-libs/libICE app-admin/eselect-opengl motif? ( virtual/motif ) + doc? ( app-doc/opengl-manpages ) !<=x11-base/xorg-x11-6.9" DEPEND="${RDEPEND} x11-misc/makedepend @@ -54,8 +57,6 @@ DEPEND="${RDEPEND} >=x11-proto/glproto-1.4.4 motif? ( x11-proto/printproto )" -PROVIDE="virtual/opengl virtual/glu" - S="${WORKDIR}/${MY_P}" # Think about: ggi, svga, fbcon, no-X configs @@ -74,6 +75,10 @@ pkg_setup() { append-flags -fno-strict-aliasing + if use hardened; then + append-flags -Wa,--noexecstack + fi + if [[ ${KERNEL} == "FreeBSD" ]]; then CONFIG="freebsd" elif use x86; then @@ -97,6 +102,7 @@ src_unpack() { epatch ${FILESDIR}/change-default-dri-driver-dir-X7.1.patch epatch ${FILESDIR}/6.4-multilib-fix.patch epatch ${FILESDIR}/6.5-re-order-context-destruction.patch + epatch ${FILESDIR}/6.5-pic-textrel-fix.patch # Don't compile debug code with USE=-debug - bug #125004 if ! use debug; then @@ -181,10 +187,19 @@ src_unpack() { # Set drivers to everything on which we ran add_drivers() echo "DRI_DIRS = ${DRI_DRIVERS}" >> ${HOSTCONF} +# if use hardened; then +# einfo "Deactivating assembly code for hardened build" +# echo "ASM_FLAGS =" >> ${HOSTCONF} +# echo "ASM_SOURCES =" >> ${HOSTCONF} +# einfo "Deactivating assembly dispatcher (execheap)" +# echo "ASM_API =" >> ${HOSTCONF} +# fi + if use sparc; then einfo "Sparc assembly code is not working; deactivating" echo "ASM_FLAGS =" >> ${HOSTCONF} echo "ASM_SOURCES =" >> ${HOSTCONF} + echo "ASM_API =" >> ${HOSTCONF} fi # Kill this; we don't want /usr/X11R6/lib ever to be searched in this @@ -238,7 +253,8 @@ src_install() { dodir /usr/$(get_libdir)/dri exeinto /usr/$(get_libdir)/dri ebegin "Installing drivers to ${EXEDESTTREE}" - find ${S}/lib* -name '*_dri.so' | xargs doexe + DRI_SO=$(find ${S}/lib* -name '*_dri.so') + doexe ${DRI_SO} eend if ! use motif; then @@ -255,8 +271,8 @@ src_install() { insinto /usr/$(get_libdir) # (#67729) Needs to be lib, not $(get_libdir) doins ${FILESDIR}/lib/libGLU.la - insinto /usr/$(get_libdir)/opengl/xorg-x11/lib - doins ${FILESDIR}/lib/libGL.la + sed -e "s:\${libdir}:$(get_libdir):g" ${FILESDIR}/lib/libGL.la \ + > ${D}/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la # On *BSD libcs dlopen() and similar functions are present directly in # libc.so and does not require linking to libdl. portability eclass takes diff --git a/hardened/xorg/media-libs/mesa/mesa-6.5-r4.ebuild b/hardened/xorg/media-libs/mesa/mesa-6.5-r4.ebuild new file mode 100644 index 0000000..8edd0aa --- /dev/null +++ b/hardened/xorg/media-libs/mesa/mesa-6.5-r4.ebuild @@ -0,0 +1,349 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-6.5-r4.ebuild,v 1.2 2006/08/25 20:53:37 hanno Exp $ + +inherit eutils toolchain-funcs multilib flag-o-matic portability + +OPENGL_DIR="xorg-x11" + +MY_PN="${PN/m/M}" +MY_P="${MY_PN}-${PV}" +MY_SRC_P="${MY_PN}Lib-${PV}" +DESCRIPTION="OpenGL-like graphic library for Linux" +HOMEPAGE="http://mesa3d.sourceforge.net/" +SRC_URI="mirror://sourceforge/mesa3d/${MY_SRC_P}.tar.bz2" +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE_VIDEO_CARDS=" + video_cards_i810 + video_cards_mach64 + video_cards_mga + video_cards_none + video_cards_r128 + video_cards_radeon + video_cards_s3virge + video_cards_savage + video_cards_sis + video_cards_sunffb + video_cards_tdfx + video_cards_trident + video_cards_via" +IUSE="${IUSE_VIDEO_CARDS} + debug + doc + hardened + motif + nptl" + +RDEPEND="dev-libs/expat + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXxf86vm + x11-libs/libXi + x11-libs/libXmu + >=x11-libs/libdrm-2.0.1 + x11-libs/libICE + app-admin/eselect-opengl + motif? ( virtual/motif ) + doc? ( app-doc/opengl-manpages ) + !<=x11-base/xorg-x11-6.9" +DEPEND="${RDEPEND} + x11-misc/makedepend + x11-proto/inputproto + x11-proto/xextproto + !hppa? ( x11-proto/xf86driproto ) + x11-proto/xf86vidmodeproto + >=x11-proto/glproto-1.4.4 + motif? ( x11-proto/printproto )" + +S="${WORKDIR}/${MY_P}" + +# Think about: ggi, svga, fbcon, no-X configs + +if use debug; then + if ! has splitdebug ${FEATURES}; then + RESTRICT="${RESTRICT} nostrip" + fi +fi + +pkg_setup() { + if use debug; then + strip-flags + append-flags -g + fi + + append-flags -fno-strict-aliasing +# append-flags -fno-strict-aliasing -Wa,--noexecstack + + if [[ ${KERNEL} == "FreeBSD" ]]; then + CONFIG="freebsd" + elif use x86; then + CONFIG="linux-dri-x86" + elif use amd64; then + CONFIG="linux-dri-x86-64" + elif use ppc; then + CONFIG="linux-dri-ppc" + else + CONFIG="linux-dri" + fi +} + +src_unpack() { + HOSTCONF="${S}/configs/${CONFIG}" + + unpack ${A} + cd ${S} + + epatch ${FILESDIR}/6.4-dont-install-gles-headers.patch + epatch ${FILESDIR}/change-default-dri-driver-dir-X7.1.patch + epatch ${FILESDIR}/6.4-multilib-fix.patch + epatch ${FILESDIR}/6.5-re-order-context-destruction.patch + epatch ${FILESDIR}/6.5-fix-radeon-PCIE.patch +# epatch ${FILESDIR}/6.5-pic-textrel-fix.patch + + # Don't compile debug code with USE=-debug - bug #125004 + if ! use debug; then + einfo "Removing DO_DEBUG defs in dri drivers..." + find src/mesa/drivers/dri -name *.[hc] -exec egrep -l "\#define\W+DO_DEBUG\W+1" {} \; | xargs sed -i -re "s/\#define\W+DO_DEBUG\W+1/\#define DO_DEBUG 0/" ; + fi + + # Set default dri drivers directory + echo "DEFINES += -DDEFAULT_DRIVER_DIR='\"/usr/$(get_libdir)/dri\"'" >> ${HOSTCONF} + + # Do we want thread-local storage (TLS)? + if use nptl; then + echo "ARCH_FLAGS += -DGLX_USE_TLS" >> ${HOSTCONF} + fi + + # Configurable DRI drivers + if use video_cards_i810; then + add_drivers i810 i915 + fi + if use video_cards_mach64; then + add_drivers mach64 + fi + if use video_cards_mga; then + add_drivers mga + fi + if use video_cards_r128; then + add_drivers r128 + fi + if use video_cards_radeon; then + add_drivers radeon r200 r300 + fi + if use video_cards_s3virge; then + add_drivers s3v + fi + if use video_cards_savage; then + add_drivers savage + fi + if use video_cards_sis; then + add_drivers sis + fi + if use video_cards_sunffb; then + add_drivers ffb + fi + if use video_cards_tdfx; then + add_drivers tdfx + fi + if use video_cards_trident; then + add_drivers trident + fi + if use video_cards_via; then + add_drivers unichrome + fi + + # Defaults based on X.Org 6.9, with some changes + if [[ ! -n "${VIDEO_CARDS}" ]]; then + if use alpha; then + add_drivers mga tdfx r128 r200 r300 radeon + elif use amd64; then + add_drivers i915 mga r128 r200 r300 radeon tdfx + elif use arm; then + add_drivers mga r128 r200 r300 radeon + elif use hppa; then + # no accelerated 3D on hppa + true + elif use ia64; then + add_drivers mach64 mga r128 r200 r300 radeon tdfx unichrome + elif use mips; then + # no accelerated 3D on mips + true + elif use ppc; then + add_drivers mach64 mga r128 r200 r300 radeon tdfx + elif use ppc64; then + add_drivers mga r128 r200 r300 radeon + elif use sparc; then + add_drivers ffb mach64 + elif use x86; then + add_drivers i810 i915 mach64 mga r128 r200 r300 radeon s3v savage \ + sis tdfx trident unichrome + fi + fi + + # Set drivers to everything on which we ran add_drivers() + echo "DRI_DIRS = ${DRI_DRIVERS}" >> ${HOSTCONF} + +# Re-enable asm + if use hardened; then + einfo "Deactivating assembly code for hardened build" + echo "ASM_FLAGS =" >> ${HOSTCONF} + echo "ASM_SOURCES =" >> ${HOSTCONF} + echo "ASM_API =" >> ${HOSTCONF} + fi + + if use sparc; then + einfo "Sparc assembly code is not working; deactivating" + echo "ASM_FLAGS =" >> ${HOSTCONF} + echo "ASM_SOURCES =" >> ${HOSTCONF} + fi + + # Kill this; we don't want /usr/X11R6/lib ever to be searched in this + # build. + echo "EXTRA_LIB_PATH =" >> ${HOSTCONF} + + echo "OPT_FLAGS = ${CFLAGS}" >> ${HOSTCONF} + echo "CC = $(tc-getCC)" >> ${HOSTCONF} + echo "CXX = $(tc-getCXX)" >> ${HOSTCONF} + # bug #110840 - Build with PIC, since it hasn't been shown to slow it down + echo "PIC_FLAGS = -fPIC" >> ${HOSTCONF} + + # Removed glut, since we have separate freeglut/glut ebuilds + # Remove EGL, since Brian Paul says it's not ready for a release + echo "SRC_DIRS = glx/x11 mesa glu glw" >> ${HOSTCONF} + + # Get rid of glut includes + rm -f ${S}/include/GL/glut*h + + # r200 breaks without this, since it's the only EGL-enabled driver so far + echo "USING_EGL = 0" >> ${HOSTCONF} + + # Don't build EGL demos. EGL isn't ready for release, plus they produce a + # circular dependency with glut. + echo "PROGRAM_DIRS =" >> ${HOSTCONF} + + # Documented in configs/default + if use motif; then + # Add -lXm + echo "GLW_LIB_DEPS += -lXm" >> ${HOSTCONF} + # Add GLwMDrawA.c + echo "GLW_SOURCES += GLwMDrawA.c" >> ${HOSTCONF} + fi +} + +src_compile() { + emake -j1 ${CONFIG} || die "Build failed" +} + +src_install() { + dodir /usr + make \ + DESTDIR=${D}/usr \ + INCLUDE_DIR=${D}/usr/include \ + LIB_DIR=${D}/usr/$(get_libdir) \ + install || die "Installation failed" + + ## + # Install the actual drivers --- 'make install' doesn't install them + # anywhere. + dodir /usr/$(get_libdir)/dri + exeinto /usr/$(get_libdir)/dri + ebegin "Installing drivers to ${EXEDESTTREE}" + DRI_SO=$(find ${S}/lib* -name '*_dri.so') + doexe ${DRI_SO} + eend + + if ! use motif; then + rm ${D}/usr/include/GL/GLwMDrawA.h + fi + + # Don't install private headers + rm ${D}/usr/include/GL/GLw*P.h + + fix_opengl_symlinks + dynamic_libgl_install + + # Install libtool archives + insinto /usr/$(get_libdir) + # (#67729) Needs to be lib, not $(get_libdir) + doins ${FILESDIR}/lib/libGLU.la + sed -e "s:\${libdir}:$(get_libdir):g" ${FILESDIR}/lib/libGL.la \ + > ${D}/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la + + # On *BSD libcs dlopen() and similar functions are present directly in + # libc.so and does not require linking to libdl. portability eclass takes + # care of finding the needed library (if needed) witht the dlopen_lib + # function. + sed -i -e 's:-ldl:'$(dlopen_lib)':g' \ + ${D}/usr/$(get_libdir)/libGLU.la \ + ${D}/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la + + # Create the two-number versioned libs (.so.#.#), since only .so.# and + # .so.#.#.# were made + dosym libGLU.so.1.3.060500 /usr/$(get_libdir)/libGLU.so.1.3 + dosym libGLw.so.1.0.0 /usr/$(get_libdir)/libGLw.so.1.0 + + # libGLU doesn't get the plain .so symlink either + dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so + + # Figure out why libGL.so.1.5 is built (directfb), and why it's linked to + # as the default libGL.so.1 +} + +pkg_postinst() { + switch_opengl_implem +} + +fix_opengl_symlinks() { + # Remove invalid symlinks + local LINK + for LINK in $(find ${D}/usr/$(get_libdir) \ + -name libGL\.* -type l); do + rm -f ${LINK} + done + # Create required symlinks + if [[ ${CHOST} == *-freebsd* ]]; then + # FreeBSD doesn't use major.minor versioning, so the library is only + # libGL.so.1 and no libGL.so.1.2 is ever used there, thus only create + # libGL.so symlink and leave libGL.so.1 being the real thing + dosym libGL.so.1 /usr/$(get_libdir)/libGL.so + else + dosym libGL.so.1.2 /usr/$(get_libdir)/libGL.so + dosym libGL.so.1.2 /usr/$(get_libdir)/libGL.so.1 + fi +} + +dynamic_libgl_install() { + # next section is to setup the dynamic libGL stuff + ebegin "Moving libGL and friends for dynamic switching" + dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include} + local x="" + for x in ${D}/usr/$(get_libdir)/libGL.so* \ + ${D}/usr/$(get_libdir)/libGL.la \ + ${D}/usr/$(get_libdir)/libGL.a; do + if [ -f ${x} -o -L ${x} ]; then + # libGL.a cause problems with tuxracer, etc + mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib + fi + done + # glext.h added for #54984 + for x in ${D}/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do + if [ -f ${x} -o -L ${x} ]; then + mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include + fi + done + eend 0 +} + +switch_opengl_implem() { + # Switch to the xorg implementation. + # Use new opengl-update that will not reset user selected + # OpenGL interface ... + echo + eselect opengl set --use-old ${OPENGL_DIR} +} + +add_drivers() { + DRI_DRIVERS="${DRI_DRIVERS} $@" +} |