diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-01-08 12:25:31 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-01-08 12:25:31 +0000 |
commit | 06507624474c1ee14f4a0dcef031cfaa956bec08 (patch) | |
tree | 7a9cec9e8aa5b136c5870cf047a3a9190952581a /media-tv | |
parent | Remove retiring dev from metadata. (diff) | |
download | gentoo-2-06507624474c1ee14f4a0dcef031cfaa956bec08.tar.gz gentoo-2-06507624474c1ee14f4a0dcef031cfaa956bec08.tar.bz2 gentoo-2-06507624474c1ee14f4a0dcef031cfaa956bec08.zip |
Add patch from upstream to fix problems with memcpy.c and hardened (bug #115724). Add also patch to add bindnow flags to setXid executable.
(Portage version: 2529-svn)
Diffstat (limited to 'media-tv')
-rw-r--r-- | media-tv/xdtv/ChangeLog | 12 | ||||
-rw-r--r-- | media-tv/xdtv/Manifest | 13 | ||||
-rw-r--r-- | media-tv/xdtv/files/digest-xdtv-2.2.0-r2 | 23 | ||||
-rw-r--r-- | media-tv/xdtv/files/xdtv-2.2.0-memcpy.patch | 248 | ||||
-rw-r--r-- | media-tv/xdtv/files/xdtv-2.2.0-setXid.patch | 12 | ||||
-rw-r--r-- | media-tv/xdtv/xdtv-2.2.0-r2.ebuild | 227 |
6 files changed, 523 insertions, 12 deletions
diff --git a/media-tv/xdtv/ChangeLog b/media-tv/xdtv/ChangeLog index 101ad5d555cc..98f57f39ca61 100644 --- a/media-tv/xdtv/ChangeLog +++ b/media-tv/xdtv/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-tv/xdtv -# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-tv/xdtv/ChangeLog,v 1.13 2005/12/10 15:07:05 flameeyes Exp $ +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-tv/xdtv/ChangeLog,v 1.14 2006/01/08 12:25:31 flameeyes Exp $ + +*xdtv-2.2.0-r2 (08 Jan 2006) + + 08 Jan 2006; Diego Pettenò <flameeyes@gentoo.org> + +files/xdtv-2.2.0-memcpy.patch, +files/xdtv-2.2.0-setXid.patch, + +xdtv-2.2.0-r2.ebuild: + Add patch from upstream to fix problems with memcpy.c and hardened (bug + #115724). Add also patch to add bindnow flags to setXid executable. 10 Dec 2005; Diego Pettenò <flameeyes@gentoo.org> xdtv-2.2.0-r1.ebuild: Made mostly modular xorg friendly; it won't be until font eclass is diff --git a/media-tv/xdtv/Manifest b/media-tv/xdtv/Manifest index 5e2d445b204c..29be74b2800b 100644 --- a/media-tv/xdtv/Manifest +++ b/media-tv/xdtv/Manifest @@ -1,14 +1,7 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 42d21f79df46d0ee4a72fc6f6bdef0f0 ChangeLog 2067 MD5 1e0e7da6d22eed35ae25e84d5b0dcad7 files/digest-xdtv-2.2.0-r1 1777 +MD5 1e0e7da6d22eed35ae25e84d5b0dcad7 files/digest-xdtv-2.2.0-r2 1777 +MD5 26b0db8fc43f5f4d60fa824a4ed54082 files/xdtv-2.2.0-memcpy.patch 10418 MD5 0dfc4d0a0cad3dc6b761593f69ac917b metadata.xml 252 MD5 e7b3b7903862a9661ee15fc6391e5f93 xdtv-2.2.0-r1.ebuild 6971 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2 (GNU/Linux) - -iD8DBQFDmu8lAiZjviIA2XgRAjN2AKCJDC818TZKHHeYJTDhudZE5E3ykQCgs7B5 -p31aEoeFP/bftivdPxz+nLQ= -=/xtU ------END PGP SIGNATURE----- +MD5 fb8054cc41cb1de43e3d35ba7f55a244 xdtv-2.2.0-r2.ebuild 6942 diff --git a/media-tv/xdtv/files/digest-xdtv-2.2.0-r2 b/media-tv/xdtv/files/digest-xdtv-2.2.0-r2 new file mode 100644 index 000000000000..8613c24cc99f --- /dev/null +++ b/media-tv/xdtv/files/digest-xdtv-2.2.0-r2 @@ -0,0 +1,23 @@ +MD5 57f6c6d31731fd1e2aa381d14a31e828 libxdtv-i18n-ca-1.2.0.tar.gz 561158 +MD5 3e391b66f04c194faa2d5c83bb89e3f5 libxdtv-i18n-de-1.2.0.tar.gz 559203 +MD5 98a070202c0f4fdd24f585eccccabc54 libxdtv-i18n-en-1.2.0.tar.gz 517747 +MD5 4dc39e28bc41fe07dc017de32ac18596 libxdtv-i18n-es-1.2.0.tar.gz 561363 +MD5 4b2083a31fb241961da12625b056130f libxdtv-i18n-fr-1.2.0.tar.gz 565273 +MD5 d2ff1ec9938edbe16229881291e5fecd libxdtv-i18n-it-1.2.0.tar.gz 563947 +MD5 0cc803147a8b86381845b00d7e1f8682 libxdtv-i18n-ja-1.2.0.tar.gz 544804 +MD5 6de4421d9b3a93968473eb884bec0b3d libxdtv-theme-aqua-ca-1.2.0.tar.gz 324890 +MD5 8d8d762b3323b70d206a158803cf6cb0 libxdtv-theme-aqua-de-1.2.0.tar.gz 322433 +MD5 1c95bbec7051299048b4f3a7be1d2c54 libxdtv-theme-aqua-en-1.2.0.tar.gz 325032 +MD5 7dcf8d6157ba7c8eac2be16ae9e79621 libxdtv-theme-aqua-es-1.2.0.tar.gz 325455 +MD5 d7f49d6a0fb4e474d88eb98141998c12 libxdtv-theme-aqua-fr-1.2.0.tar.gz 325839 +MD5 12f9508b3bc9f9a1b1e6799da574ab25 libxdtv-theme-aqua-it-1.2.0.tar.gz 324152 +MD5 48754d81b1234363206dac53ae8d6d19 libxdtv-theme-aqua-ja-1.2.0.tar.gz 306498 +MD5 608aebb9454bba0cf5c52a2a1f06e1f0 libxdtv-theme-carbone-ca-1.2.0.tar.gz 358108 +MD5 46d0f7e93994e3fffc7208cc94c2ada2 libxdtv-theme-carbone-de-1.2.0.tar.gz 357587 +MD5 0337867e944d5418fba4b2555a019055 libxdtv-theme-carbone-en-1.2.0.tar.gz 355666 +MD5 8779e6fbc2c11a67a78e4e0cab090284 libxdtv-theme-carbone-es-1.2.0.tar.gz 358858 +MD5 ea212ac3cb4d2737b80b032081ed9797 libxdtv-theme-carbone-fr-1.2.0.tar.gz 360314 +MD5 9fffe9c73032e43d42c3e8c5ea31d55c libxdtv-theme-carbone-it-1.2.0.tar.gz 361097 +MD5 42c7e3a92d6625e18e9a8cdcfa30b317 libxdtv-theme-carbone-ja-1.2.0.tar.gz 341365 +MD5 a12af6bdb5eef46d10935f635d4e0dda xdtv-2.2.0-gcc4-amd64.patch.tar.gz 6027 +MD5 5f8069ae7a64e0907c59de26290d9fe7 xdtv-2.2.0.tar.gz 905162 diff --git a/media-tv/xdtv/files/xdtv-2.2.0-memcpy.patch b/media-tv/xdtv/files/xdtv-2.2.0-memcpy.patch new file mode 100644 index 000000000000..9eb425319351 --- /dev/null +++ b/media-tv/xdtv/files/xdtv-2.2.0-memcpy.patch @@ -0,0 +1,248 @@ +--- src/memcpy.c 9 Jul 2005 09:30:10 -0000 1.17 ++++ src/memcpy.c 7 Jan 2006 11:02:05 -0000 +@@ -203,10 +203,10 @@ + "movntps %%xmm2, 32(%1)\n" + "movntps %%xmm3, 48(%1)\n" + :: "r" (from), "r" (to) : "memory"); +- from +=64; +- to +=64; ++ from = 64 + (char *)from; ++ to = 64 + (char *)to; + } +- else ++ else + /* + Only if SRC is aligned on 16-byte boundary. + It allows to use movaps instead of movups, which required data +@@ -225,8 +225,8 @@ + "movntps %%xmm2, 32(%1)\n" + "movntps %%xmm3, 48(%1)\n" + :: "r" (from), "r" (to) : "memory"); +- from +=64; +- to +=64; ++ from = 64 + (char *)from; ++ to = 64 + (char *)to; + } + /* since movntq is weakly-ordered, a "sfence" + * is needed to become ordered again. */ +@@ -279,8 +279,8 @@ + "movq %%mm6, 48(%1)\n" + "movq %%mm7, 56(%1)\n" + :: "r" (from), "r" (to) : "memory"); +- from+=64; +- to+=64; ++ from = 64 + (char *)from; ++ to = 64 + (char *)to; + } + __asm__ __volatile__ ("emms":::"memory"); + } +@@ -339,8 +339,8 @@ + "movntq %%mm6, 48(%1)\n" + "movntq %%mm7, 56(%1)\n" + :: "r" (from), "r" (to) : "memory"); +- from+=64; +- to+=64; ++ from = 64 + (char *)from; ++ to = 64 + (char *)to; + } + /* since movntq is weakly-ordered, a "sfence" + * is needed to become ordered again. */ +@@ -380,10 +380,8 @@ + " cmpl $0, %%eax\n" + " je 1f\n" // si c'est nul, on passe aux blocs de 128 octets + " movl %3, %%edx\n" // edx = taille d'un bloc +- "2: movl %%edx, %%ecx\n" +- " shrl $7, %%ecx\n" +- "3: movl -64(%%esi,%%edx), %%ebx\n" // boucle de prefetch (source) +- " movl -128(%%esi,%%edx), %%ebx\n" ++ "3: movl -64(%%esi,%%edx), %%ecx\n" // boucle de prefetch (source) ++ " movl -128(%%esi,%%edx), %%ecx\n" + " subl $128, %%edx\n" + " jnz 3b\n" + "4: movups (%%esi,%%edx), %%xmm0\n" // boucle de copie +@@ -403,11 +401,12 @@ + " movntps %%xmm6, 96(%%edi,%%edx)\n" + " movntps %%xmm7, 112(%%edi,%%edx)\n" + " addl $128, %%edx\n" +- " loop 4b\n" // si le bloc n'est pas termine , on boucle ++ " cmpl %3, %%edx\n" ++ " jne 4b\n" // si le bloc n'est pas termine , on boucle + "addl %%edx, %%esi\n" // sinon, bloc suivant + "addl %%edx, %%edi\n" + "decl %%eax\n" +- "jnz 2b\n" // s'il reste encore des blocs, on boucle ++ "jnz 3b\n" // s'il reste encore des blocs, on boucle + "1: movl %3, %%ecx\n" // preparation de la copie des blocs de 128 restants + " dec %%ecx\n" // ecx = masque de bloc (ex: 4096 -> 0x00000FFF) + " andl %0, %%ecx\n" // ecx = n % TAILLE_BLOC +@@ -448,7 +447,7 @@ + "8: rep movsb\n" // ...ce que l'on fait + : + : "m"(n) , "m"(src) , "m"(dst), "m"(tb) +- : "eax", "ebx", "ecx", "edx", "esi", "edi", "memory" ++ : "eax", "ecx", "edx", "esi", "edi", "memory" + ); + + return dst; +@@ -518,10 +517,8 @@ + " cmpl $0, %%eax\n" + " je 1f\n" // si c'est nul, on passe aux blocs de 128 octets + " movl %3, %%edx\n" // edx = taille d'un bloc +- "2: movl %%edx, %%ecx\n" +- " shrl $6, %%ecx\n" +- "3: movl -64(%%esi,%%edx), %%ebx\n" // boucle de prefetch (source) +- " movl -128(%%esi,%%edx), %%ebx\n" ++ "3: movl -64(%%esi,%%edx), %%ecx\n" // boucle de prefetch (source) ++ " movl -128(%%esi,%%edx), %%ecx\n" + " subl $128, %%edx\n" + " jnz 3b\n" + "4: movq (%%esi,%%edx), %%mm0\n" // boucle de copie +@@ -541,11 +538,12 @@ + " movntq %%mm6, 48(%%edi,%%edx)\n" + " movntq %%mm7, 56(%%edi,%%edx)\n" + " addl $64, %%edx\n" +- " loop 4b\n" // si le bloc n'est pas termine , on boucle ++ " cmpl %3, %%edx\n" ++ " jne 4b\n" // si le bloc n'est pas termine , on boucle + "addl %%edx, %%esi\n" // sinon, bloc suivant + "addl %%edx, %%edi\n" + "decl %%eax\n" +- "jnz 2b\n" // s'il reste encore des blocs, on boucle ++ "jnz 3b\n" // s'il reste encore des blocs, on boucle + "1: movl %3, %%ecx\n" // preparation de la copie des blocs de 64 restants + " dec %%ecx\n" // ecx = masque de bloc (ex: 4096 -> 0x00000FFF) + " andl %0, %%ecx\n" // ecx = n % TAILLE_BLOC +@@ -579,13 +577,13 @@ + "addl %%edx, %%esi\n" + "addl %%edx, %%edi\n" + "6: sfence\n" +- " emms\n" ++ " emms\n" + " movl %0, %%ecx\n" + " andl $0x0000003F, %%ecx\n" // il reste au plus 63 octets a copier... + "8: rep movsb\n" // ...ce que l'on fait + : + : "m"(n) , "m"(src) , "m"(dst), "m"(tb) +- : "eax", "ebx", "ecx", "edx", "esi", "edi", "memory" ++ : "eax", "ecx", "edx", "esi", "edi", "memory" + ); + + return dst; +@@ -656,12 +654,10 @@ + " cmpl $0, %%eax\n" + " je 1f\n" // si c'est nul, on passe aux blocs de 128 octets + " movl %3, %%edx\n" // edx = taille d'un bloc +- "2: movl %%edx, %%ecx\n" +- " shrl $6, %%ecx\n" +- "3: movl -64(%%esi,%%edx), %%ebx\n" // boucle de prefetch (source) +- " movl -128(%%esi,%%edx), %%ebx\n" +- " movl -64(%%edi,%%edx), %%ebx\n" // boucle de prefetch (destination) +- " movl -128(%%edi,%%edx), %%ebx\n" ++ "3: movl -64(%%esi,%%edx), %%ecx\n" // boucle de prefetch (source) ++ " movl -128(%%esi,%%edx), %%ecx\n" ++ " movl -64(%%edi,%%edx), %%ecx\n" // boucle de prefetch (destination) ++ " movl -128(%%edi,%%edx), %%ecx\n" + " subl $128, %%edx\n" + " jnz 3b\n" + "4: movq (%%esi,%%edx), %%mm0\n" // boucle de copie +@@ -681,11 +677,12 @@ + " movq %%mm6, 48(%%edi,%%edx)\n" + " movq %%mm7, 56(%%edi,%%edx)\n" + " addl $64, %%edx\n" +- " loop 4b\n" // si le bloc n'est pas termine , on boucle ++ " cmpl %3, %%edx\n" ++ " jne 4b\n" // si le bloc n'est pas termine , on boucle + "addl %%edx, %%esi\n" // sinon, bloc suivant + "addl %%edx, %%edi\n" + "decl %%eax\n" +- "jnz 2b\n" // s'il reste encore des blocs, on boucle ++ "jnz 3b\n" // s'il reste encore des blocs, on boucle + "1: movl %3, %%ecx\n" // preparation de la copie des blocs de 64 restants + " dec %%ecx\n" // ecx = masque de bloc (ex: 4096 -> 0x00000FFF) + " andl %0, %%ecx\n" // ecx = n % TAILLE_BLOC +@@ -710,7 +707,7 @@ + " movq %%mm7, 56(%%edi,%%edx)\n" + " addl $64, %%edx\n" + " loop 5b\n" // s'il reste des blocs de 64 , on boucle +- "addl %%edx, %%esi\n" ++ "addl %%edx, %%esi\n" + "addl %%edx, %%edi\n" + "6: emms\n" + " movl %0, %%ecx\n" +@@ -718,7 +715,7 @@ + "8: rep movsb\n" // ...ce que l'on fait + : + : "m"(n) , "m"(src) , "m"(dst), "m"(tb) +- : "eax", "ebx", "ecx", "edx", "esi", "edi", "memory" ++ : "eax", "ecx", "edx", "esi", "edi", "memory" + ); + + return dst; +@@ -788,12 +785,10 @@ + " cmpl $0, %%eax\n" + " je 1f\n" // si c'est nul, on passe aux blocs de 128 octets + " movl %3, %%edx\n" // edx = taille d'un bloc +- "2: movl %%edx, %%ecx\n" +- " shrl $6, %%ecx\n" +- "3: movl -64(%%esi,%%edx), %%ebx\n" // boucle de prefetch (source) +- " movl -128(%%esi,%%edx), %%ebx\n" +- " movl -64(%%edi,%%edx), %%ebx\n" // boucle de prefetch (destination) +- " movl -128(%%edi,%%edx), %%ebx\n" ++ "3: movl -64(%%esi,%%edx), %%ecx\n" // boucle de prefetch (source) ++ " movl -128(%%esi,%%edx), %%ecx\n" ++ " movl -64(%%edi,%%edx), %%ecx\n" // boucle de prefetch (destination) ++ " movl -128(%%edi,%%edx), %%ecx\n" + " subl $128, %%edx\n" + " jnz 3b\n" + "4: fildq (%%esi,%%edx)\n" // boucle de copie +@@ -813,11 +808,12 @@ + " fistpq 8(%%edi,%%edx)\n" + " fistpq (%%edi,%%edx)\n" + " addl $64, %%edx\n" +- " loop 4b\n" // si le bloc n'est pas termine , on boucle ++ " cmpl %3, %%edx\n" ++ " jne 4b\n" // si le bloc n'est pas termine , on boucle + "addl %%edx, %%esi\n" // sinon, bloc suivant + "addl %%edx, %%edi\n" + "decl %%eax\n" +- "jnz 2b\n" // s'il reste encore des blocs, on boucle ++ "jnz 3b\n" // s'il reste encore des blocs, on boucle + "1: movl %3, %%ecx\n" // preparation de la copie des blocs de 64 restants + " dec %%ecx\n" // ecx = masque de bloc (ex: 4096 -> 0x00000FFF) + " andl %0, %%ecx\n" // ecx = n % TAILLE_BLOC +@@ -849,7 +845,7 @@ + "8: rep movsb\n" // ...ce que l'on fait + : + : "m"(n) , "m"(src) , "m"(dst), "m"(tb) +- : "eax", "ebx", "ecx", "edx", "esi", "edi", "memory" ++ : "eax", "ecx", "edx", "esi", "edi", "memory" + ); + + return dst; +@@ -963,7 +959,7 @@ + { + unsigned long long int x; + __asm__ __volatile__ ("rdtsc" : "=A" (x)); +- // __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); ++ // __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); + return x; + } + #else +@@ -1249,13 +1245,13 @@ + return; + } + +- if( (buf1 = malloc(BUFSIZE)) == NULL ) ++ if( (buf1 = (char *)malloc(BUFSIZE)) == NULL ) + return; +- +- if( (buf2 = malloc(BUFSIZE)) == NULL ) { ++ ++ if( (buf2 = (char *)malloc(BUFSIZE)) == NULL ) { + free(buf1); + } +- ++ + #ifdef FLUSH_CACHE + if( (buf3 = malloc(FLUSH_CACHE_SIZE)) == NULL ) { + free(buf1); diff --git a/media-tv/xdtv/files/xdtv-2.2.0-setXid.patch b/media-tv/xdtv/files/xdtv-2.2.0-setXid.patch new file mode 100644 index 000000000000..855011154667 --- /dev/null +++ b/media-tv/xdtv/files/xdtv-2.2.0-setXid.patch @@ -0,0 +1,12 @@ +Index: xdtv-2.2.0/src/Makefile.am +=================================================================== +--- xdtv-2.2.0.orig/src/Makefile.am ++++ xdtv-2.2.0/src/Makefile.am +@@ -135,6 +135,7 @@ xdtv_LDADD = ../alevt/libalevt.a @X_LIBS + xdtv_LDFLAGS = -rdynamic + + xdtv_v4l_conf_SOURCES = xdtv_v4l-conf.c videodev.h ++xdtv_v4l_conf_LDFLAGS = $(BINDNOW_FLAGS) + xdtv_v4l_conf_LDADD = @X_LIBS@ -lX11 @LIBXEXT@ @LIBXXF86DGA@ @LIBXXF86VM@ + + xdtv_wizard_SOURCES = xdtv_wizard.c translation.c diff --git a/media-tv/xdtv/xdtv-2.2.0-r2.ebuild b/media-tv/xdtv/xdtv-2.2.0-r2.ebuild new file mode 100644 index 000000000000..b5a240d20f99 --- /dev/null +++ b/media-tv/xdtv/xdtv-2.2.0-r2.ebuild @@ -0,0 +1,227 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-tv/xdtv/xdtv-2.2.0-r2.ebuild,v 1.1 2006/01/08 12:25:31 flameeyes Exp $ + +inherit font multilib autotools flag-o-matic + +IUSE="alsa jpeg encode ffmpeg xvid lirc xinerama + neXt Xaw3d mmx zvbi aqua_theme carbone_theme xv debug dvb" + +DESCRIPTION="TV viewer with support for AVI recording and plugins" +HOMEPAGE="http://xawdecode.sourceforge.net/" + +I18N_PV="1.2.0" +THEMES_PV="1.2.0" + +I18N_EN="libxdtv-i18n-en-${I18N_PV}" +I18N_FR="libxdtv-i18n-fr-${I18N_PV}" +I18N_CA="libxdtv-i18n-ca-${I18N_PV}" +I18N_ES="libxdtv-i18n-es-${I18N_PV}" +I18N_DE="libxdtv-i18n-de-${I18N_PV}" +I18N_JA="libxdtv-i18n-ja-${I18N_PV}" +I18N_IT="libxdtv-i18n-it-${I18N_PV}" +THEME_AQUA_EN="libxdtv-theme-aqua-en-${THEMES_PV}" +THEME_AQUA_FR="libxdtv-theme-aqua-fr-${THEMES_PV}" +THEME_AQUA_CA="libxdtv-theme-aqua-ca-${THEMES_PV}" +THEME_AQUA_ES="libxdtv-theme-aqua-es-${THEMES_PV}" +THEME_AQUA_DE="libxdtv-theme-aqua-de-${THEMES_PV}" +THEME_AQUA_JA="libxdtv-theme-aqua-ja-${THEMES_PV}" +THEME_AQUA_IT="libxdtv-theme-aqua-it-${THEMES_PV}" +THEME_CARBONE_EN="libxdtv-theme-carbone-en-${THEMES_PV}" +THEME_CARBONE_FR="libxdtv-theme-carbone-fr-${THEMES_PV}" +THEME_CARBONE_CA="libxdtv-theme-carbone-ca-${THEMES_PV}" +THEME_CARBONE_ES="libxdtv-theme-carbone-es-${THEMES_PV}" +THEME_CARBONE_DE="libxdtv-theme-carbone-de-${THEMES_PV}" +THEME_CARBONE_JA="libxdtv-theme-carbone-ja-${THEMES_PV}" +THEME_CARBONE_IT="libxdtv-theme-carbone-it-${THEMES_PV}" + +DOWNLOADS_URL="mirror://sourceforge/xawdecode" +SRC_URI="${DOWNLOADS_URL}/${P}.tar.gz + ${DOWNLOADS_URL}/${P}-gcc4-amd64.patch.tar.gz + + linguas_ca? ( + ${DOWNLOADS_URL}/${I18N_CA}.tar.gz + aqua_theme? ( ${DOWNLOADS_URL}/${THEME_AQUA_CA}.tar.gz ) + carbone_theme? ( ${DOWNLOADS_URL}/${THEME_CARBONE_CA}.tar.gz ) ) + linguas_en? ( + ${DOWNLOADS_URL}/${I18N_EN}.tar.gz + aqua_theme? ( ${DOWNLOADS_URL}/${THEME_AQUA_EN}.tar.gz ) + carbone_theme? ( ${DOWNLOADS_URL}/${THEME_CARBONE_EN}.tar.gz ) ) + linguas_es? ( + ${DOWNLOADS_URL}/${I18N_ES}.tar.gz + aqua_theme? ( ${DOWNLOADS_URL}/${THEME_AQUA_ES}.tar.gz ) + carbone_theme? ( ${DOWNLOADS_URL}/${THEME_CARBONE_ES}.tar.gz ) ) + linguas_fr? ( + ${DOWNLOADS_URL}/${I18N_FR}.tar.gz + aqua_theme? ( ${DOWNLOADS_URL}/${THEME_AQUA_FR}.tar.gz ) + carbone_theme? ( ${DOWNLOADS_URL}/${THEME_CARBONE_FR}.tar.gz ) ) + linguas_de? ( + ${DOWNLOADS_URL}/${I18N_DE}.tar.gz + aqua_theme? ( ${DOWNLOADS_URL}/${THEME_AQUA_DE}.tar.gz ) + carbone_theme? ( ${DOWNLOADS_URL}/${THEME_CARBONE_DE}.tar.gz ) ) + linguas_ja? ( + ${DOWNLOADS_URL}/${I18N_JA}.tar.gz + aqua_theme? ( ${DOWNLOADS_URL}/${THEME_AQUA_JA}.tar.gz ) + carbone_theme? ( ${DOWNLOADS_URL}/${THEME_CARBONE_JA}.tar.gz ) ) + linguas_it? ( + ${DOWNLOADS_URL}/${I18N_IT}.tar.gz + aqua_theme? ( ${DOWNLOADS_URL}/${THEME_AQUA_IT}.tar.gz ) + carbone_theme? ( ${DOWNLOADS_URL}/${THEME_CARBONE_IT}.tar.gz ) ) + !linguas_ca? ( !linguas_es? ( !linguas_fr? ( !linguas_de? ( !linguas_ja? ( !linguas_it? ( + ${DOWNLOADS_URL}/${I18N_EN}.tar.gz + aqua_theme? ( ${DOWNLOADS_URL}/${THEME_AQUA_EN}.tar.gz ) + carbone_theme? ( ${DOWNLOADS_URL}/${THEME_CARBONE_EN}.tar.gz ) ) ) ) ) ) )" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~ppc ~x86" + +RDEPEND="zvbi? ( >=media-libs/zvbi-0.2.4 ) + neXt? ( x11-libs/neXtaw ) + Xaw3d? ( !neXt? ( x11-libs/Xaw3d ) ) + ffmpeg? ( >=media-video/ffmpeg-0.4.7 ) + xvid? ( =media-libs/xvid-1* ) + encode? ( >=media-sound/lame-3.93 ) + jpeg? ( media-libs/jpeg ) + lirc? ( app-misc/lirc ) + alsa? ( >=media-libs/alsa-lib-0.9 ) + || ( ( x11-libs/libX11 + x11-libs/libXext + x11-libs/libXpm + x11-libs/libXt + x11-libs/libICE + x11-libs/libXmu + x11-libs/libXxf86vm + x11-libs/libXxf86dga + x11-libs/libSM + x11-libs/libXaw + x11-libs/libXv ) + virtual/x11 ) + " + +DEPEND="${RDEPEND} + dvb? ( media-tv/linuxtv-dvb-headers ) + || ( ( x11-base/xorg-server + x11-proto/videoproto + x11-proto/xproto + x11-proto/xextproto ) + virtual/x11 )" + +FONT_S="${S}/font" +FONT_SUFFIX="pcf.gz" + +extension_iter() { + local my_a + for my_a in ${A} ; do + my_a=${my_a%%.tar.gz} + if [ -z ${my_a/libxdtv*/} ] ; then + eval ${1} ${my_a} || die "${1}(${my_a}) failed." + fi + done +} + +extension_compile() { + einfo "Building ${1}" + cd ${WORKDIR}/${1} + + econf || die "econf failed" + emake || die "emake failed" +} + +extension_install() { + einfo "Installing ${1}" + cd ${WORKDIR}/${1} \ + && make DESTDIR=${D} LIBDIR="/usr/$(get_libdir)/${PN}" install +} + +src_unpack() { + unpack ${A} + # Disable font installation + sed -i -e '/^install:/,/^$/s:^\t:#:p' ${S}/font/Makefile.in + # Disable /usr/share/xdtv/icons/* installation + sed -i -e '/^install-data-local:/,${\:share/xdtv/icons:d}' ${S}/Makefile.in + + cd ${S} + epatch "${WORKDIR}/${P}-gcc4-amd64.patch" + epatch "${FILESDIR}/${P}-memcpy.patch" + epatch "${FILESDIR}/${P}-setXid.patch" + + eautoreconf +} + +src_compile() { + # Makes the xaw widgets choice deterministic + local xawconf="--disable-xaw95 --disable-xawm" + if use neXt ; then + use Xaw3d && ewarn "Both \"neXt\" and \"Xaw3d\" found in USE. Will use neXtaw widgets." + xawconf="${xawconf} --enable-nextaw --disable-xaw3d" + elif use Xaw3d ; then + xawconf="${xawconf} --disable-nextaw --enable-xaw3d" + else + xawconf="${xawconf} --disable-nextaw --disable-xaw3d" + ewarn "If you want a better GUI toolkit, enable either \"neXt\" or \"Xaw3d\" USE flags." + fi + + ( use mmx || use amd64 ) && myconf="${myconf} --enable-mmx" || \ + myconf="${myconf} --disable-mmx" + + econf ${xawconf} \ + $(use_enable alsa) \ + $(use_enable jpeg) \ + $(use_enable lirc) \ + $(use_enable ffmpeg) \ + $(use_enable xvid) \ + $(use_enable xinerama) \ + $(use_enable zvbi) \ + $(use_enable xv xvideo) \ + $(use_enable encode lame) \ + $(use_enable !debug nodebug) \ + $(use_enable dvb) \ + --enable-pixmaps \ + --disable-cpu-detection \ + ${myconf} \ + || die "Configuration failed." + + emake BINDNOW_FLAGS="$(bindnow-flags)" OPT="${CFLAGS}" PERF_FLAGS="${CFLAGS}" || die "Compilation failed." + + # Build the extensions (i18n and theme libraries) + extension_iter extension_compile +} + +src_install() { + make DESTDIR=${D} install || die "Installation failed." + + # .desktop file and default icon + domenu gentoo/xdtv.desktop + doicon ${S}/src/xdtv.xpm + + # Install the icons in the hicolor theme + for dim in 48 32 16; do + insinto /usr/share/icons/hicolor/${dim}x${dim}/apps + newins ${S}/xdtv-${dim}.png xdtv.png + done + + # Install the led-fixed font with font.eclass + gzip font/led-fixed.pcf + font_src_install + + # Install documentation + dodoc ChangeLog AUTHORS FAQ* README.* TODO lisez-moi* \ + xdtvrc.sample lircrc.*.sample + docinto alevt + dodoc alevt/README alevt/ReadmeGR alevt/CHANGELOG alevt/COPYRIGHT + + # Install the extensions (i18n and theme libraries) + extension_iter extension_install +} + +pkg_postinst() { + echo + einfo "Please note that this ebuild created a suid-binary:" + einfo "/usr/bin/xdtv_v4l-conf" + echo + einfo "The OSD font has moved. You probably should add" + einfo "this path to your X configuration:" + einfo "/usr/share/fonts/${PN}" + echo +} |