diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2006-04-02 15:15:48 +0000 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2006-04-02 15:15:48 +0000 |
commit | 4cf4e141d5306be3cac8ec5086a6e08f85f893ed (patch) | |
tree | 26c0151fc24212f0f7c2636a830a8e5f59bf080c /games-board/gnubg | |
parent | Drop old files and remove lpr, if needed cups can be rather used. (diff) | |
download | gentoo-2-4cf4e141d5306be3cac8ec5086a6e08f85f893ed.tar.gz gentoo-2-4cf4e141d5306be3cac8ec5086a6e08f85f893ed.tar.bz2 gentoo-2-4cf4e141d5306be3cac8ec5086a6e08f85f893ed.zip |
Fix for gcc-4 compilation, bug #120836
(Portage version: 2.1_pre7-r3)
Diffstat (limited to 'games-board/gnubg')
-rw-r--r-- | games-board/gnubg/ChangeLog | 6 | ||||
-rw-r--r-- | games-board/gnubg/Manifest | 21 | ||||
-rw-r--r-- | games-board/gnubg/files/digest-gnubg-0.14.3 | 8 | ||||
-rw-r--r-- | games-board/gnubg/files/gnubg-0.14.3-gcc4.patch | 118 | ||||
-rw-r--r-- | games-board/gnubg/gnubg-0.14.3.ebuild | 3 |
5 files changed, 145 insertions, 11 deletions
diff --git a/games-board/gnubg/ChangeLog b/games-board/gnubg/ChangeLog index 193ff9735153..d6fbcc13a2c9 100644 --- a/games-board/gnubg/ChangeLog +++ b/games-board/gnubg/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for games-board/gnubg # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-board/gnubg/ChangeLog,v 1.20 2006/01/29 21:28:01 joshuabaergen Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-board/gnubg/ChangeLog,v 1.21 2006/04/02 15:15:47 tupone Exp $ + + 02 Apr 2006; <Tupone@gentoo.org> +files/gnubg-0.14.3-gcc4.patch, + gnubg-0.14.3.ebuild: + Fix for gcc-4 compilation, bug #120836 by Joshua Baergen 29 Jan 2006; Joshua Baergen <joshuabaergen@gentoo.org> gnubg-0.14.3.ebuild: diff --git a/games-board/gnubg/Manifest b/games-board/gnubg/Manifest index bb2ea99bc265..e8e5c2eeff5b 100644 --- a/games-board/gnubg/Manifest +++ b/games-board/gnubg/Manifest @@ -1,12 +1,15 @@ -MD5 c811dc9372b3428b5a7345f1a26880ba ChangeLog 2662 -RMD160 f6b8df2af1e7937cb237c938e0206b8eaeff64c2 ChangeLog 2662 -SHA256 56acc9bf185d095b81080bfe6e1ee9246f3b2eda5b41bf499571cc182c811d32 ChangeLog 2662 -MD5 b66b2af80cad13b367a5e7e86e10ee17 files/digest-gnubg-0.14.3 252 -RMD160 b89c3d907992fde49de43ca499b16b45729c9b8b files/digest-gnubg-0.14.3 252 -SHA256 71fbb3e474dca7eed99494905fde1cc8b5e0ea469b8fd68a694b6ad158e6886c files/digest-gnubg-0.14.3 252 -MD5 3141bc466ad98b8c6bba82b332e962c7 gnubg-0.14.3.ebuild 2565 -RMD160 d3df37fbb77521633a5732a4417ac6a4c460fad4 gnubg-0.14.3.ebuild 2565 -SHA256 94c81a8faf114ccf0eb6c7889310e8a309d76a24a8550b6399d117c4bd5c8a18 gnubg-0.14.3.ebuild 2565 +MD5 9763eaadd18bd2763b7602dfb96e20c5 ChangeLog 2812 +RMD160 30ec4d3338edbb062bef5a24090b9fa164c0c3dc ChangeLog 2812 +SHA256 26e4e94708acfe66733366e8ec467ab381cb42d2239d5ccec92b85e8509c2d51 ChangeLog 2812 +MD5 73279a730dd0234f743d5326bdf41b6b files/digest-gnubg-0.14.3 940 +RMD160 51f4904714d31dea82db728be317de6e1b90bcbe files/digest-gnubg-0.14.3 940 +SHA256 887bd90f455fffd6d5bfdb8ba3befc1667c22bb0ff9ed6ee91e1f54eff84963c files/digest-gnubg-0.14.3 940 +MD5 138e70fe96c2f36dc2f3187f2b1e5a29 files/gnubg-0.14.3-gcc4.patch 3589 +RMD160 28d8b654f837936db37f66e9df8e85e8369a82a3 files/gnubg-0.14.3-gcc4.patch 3589 +SHA256 0f3f7e08207f3d0ccbf4931127dde6c9ca95ec1cb4d12914d3dbc7932407c096 files/gnubg-0.14.3-gcc4.patch 3589 +MD5 ab6dd1b12ad36b6d4d13fdbb84efdc9c gnubg-0.14.3.ebuild 2603 +RMD160 c7feed388d0455b18c5df874e600c40051419b02 gnubg-0.14.3.ebuild 2603 +SHA256 9c540c81e20a77413ee68091cb4a3f4dc248eea452e5d6fbe1b0dda4bf6464e9 gnubg-0.14.3.ebuild 2603 MD5 3f11aaf297b2fe67404a96cda13e9bfe metadata.xml 251 RMD160 f77a8fea97ab2a02ef2d9bf1cc7b390c5c19e6cb metadata.xml 251 SHA256 34f41062e84f1e12c08550faffc97632a2432df3579520cec76dbe8b08fb9cfe metadata.xml 251 diff --git a/games-board/gnubg/files/digest-gnubg-0.14.3 b/games-board/gnubg/files/digest-gnubg-0.14.3 index 94c514b3e855..16a6cf327157 100644 --- a/games-board/gnubg/files/digest-gnubg-0.14.3 +++ b/games-board/gnubg/files/digest-gnubg-0.14.3 @@ -1,4 +1,12 @@ MD5 b3ab1ace76fa4bea69db8e617ab587da gnubg-0.14.3.tar.gz 4241526 +RMD160 da7b2a3b52194ca11d505a70fba805e99f15c3ed gnubg-0.14.3.tar.gz 4241526 +SHA256 76d18f1a7952a4ba2372e439b3c4ecf2fcd244d334c609bb22d3f501067d1d72 gnubg-0.14.3.tar.gz 4241526 MD5 9f1154a9b327954a260726aa6aa6eea5 gnubg.weights-0.14.gz 460747 +RMD160 5d588b1145f0d0489b5d70fa6cfccd9ce6738f04 gnubg.weights-0.14.gz 460747 +SHA256 6c134ded36d0875cb673a4f9fd84e2d30424935951baeffcd94852ccdb2daf70 gnubg.weights-0.14.gz 460747 MD5 4015327219322eacab5ddd58f6fa268d gnubg_os0.bd.gz 906720 +RMD160 83fefa3c39544ca9a51f1ba7ae5e8bd5215e631c gnubg_os0.bd.gz 906720 +SHA256 e84a36f133ee7ea9fa3686af6c111088b8b43906db1b6c6b3db0035c84cda809 gnubg_os0.bd.gz 906720 MD5 01bd14c184bd701ae484618eb8acec6e gnubg_ts0.bd.gz 5899380 +RMD160 9e0bea798a53374061014226aca9f5d2063133e8 gnubg_ts0.bd.gz 5899380 +SHA256 0934e4f2d84f5cd50c2ff4592c93c49d43f7cb89da342600736849c7362626d5 gnubg_ts0.bd.gz 5899380 diff --git a/games-board/gnubg/files/gnubg-0.14.3-gcc4.patch b/games-board/gnubg/files/gnubg-0.14.3-gcc4.patch new file mode 100644 index 000000000000..d8e933e94128 --- /dev/null +++ b/games-board/gnubg/files/gnubg-0.14.3-gcc4.patch @@ -0,0 +1,118 @@ +--- lib/neuralnet.c.old 2006-01-29 11:16:30.000000000 -0700 ++++ lib/neuralnet.c 2006-01-29 11:21:10.000000000 -0700 +@@ -386,13 +386,15 @@ + } + extern void *NeuralNetCreateDirect( neuralnet *pnn, void *p ) { + +- pnn->cInput = *( ( (int *) p )++ ); +- pnn->cHidden = *( ( (int *) p )++ ); +- pnn->cOutput = *( ( (int *) p )++ ); +- pnn->nTrained = *( ( (int *) p )++ ); ++ int *ip = (int *)p; ++ pnn->cInput = *( ip++ ); ++ pnn->cHidden = *( ip++ ); ++ pnn->cOutput = *( ip++ ); ++ pnn->nTrained = *( ip++ ); + pnn->fDirect = TRUE; +- pnn->rBetaHidden = *( ( (float *) p )++ ); +- pnn->rBetaOutput = *( ( (float *) p )++ ); ++ float *fp = (float *)ip; ++ pnn->rBetaHidden = *( fp++ ); ++ pnn->rBetaOutput = *( fp++ ); + + if( pnn->cInput < 1 || pnn->cHidden < 1 || pnn->cOutput < 1 || + pnn->nTrained < 0 || pnn->rBetaHidden <= 0.0 || +@@ -402,19 +404,19 @@ + return NULL; + } + +- pnn->arHiddenWeight = p; +- ( (float *) p ) += pnn->cInput * pnn->cHidden; +- pnn->arOutputWeight = p; +- ( (float *) p ) += pnn->cHidden * pnn->cOutput; +- pnn->arHiddenThreshold = p; +- ( (float *) p ) += pnn->cHidden; +- pnn->arOutputThreshold = p; +- ( (float *) p ) += pnn->cOutput; ++ pnn->arHiddenWeight = (void *)fp; ++ fp += pnn->cInput * pnn->cHidden; ++ pnn->arOutputWeight = (void *)fp; ++ fp += pnn->cHidden * pnn->cOutput; ++ pnn->arHiddenThreshold = (void *)fp; ++ fp += pnn->cHidden; ++ pnn->arOutputThreshold = (void *)fp; ++ fp += pnn->cOutput; + + pnn->savedBase = malloc( pnn->cHidden * sizeof( float ) ); + pnn->savedIBase = malloc( pnn->cInput * sizeof( float ) ); + +- return p; ++ return (void *)fp; + } + + extern int +--- eval.c.old 2006-01-29 11:24:57.000000000 -0700 ++++ eval.c 2006-01-29 11:27:35.000000000 -0700 +@@ -798,7 +798,9 @@ + if( !fstat( h, &st ) && + ( p = mmap( NULL, st.st_size, PROT_READ | PROT_WRITE, + MAP_PRIVATE, h, 0 ) ) ) { +- ( (float *) p ) += 2; /* skip magic number and version */ ++ float *fp = (float *)p; ++ fp += 2; /* skip magic number and version */ ++ p = (void *)fp; + fReadWeights = + ( p = NeuralNetCreateDirect( &nnContact, p ) ) && + ( p = NeuralNetCreateDirect( &nnRace, p ) ) && +--- rollout.c.old 2006-01-29 11:32:54.000000000 -0700 ++++ rollout.c 2006-01-29 11:32:58.000000000 -0700 +@@ -219,7 +219,7 @@ + nPermutationSeed = n; + } + +-static int nSkip; ++static int nSkip_local; + + static int RolloutDice( int iTurn, int iGame, int cGames, + int fInitial, +@@ -234,10 +234,10 @@ + int j; + + if( !iGame ) +- nSkip = 0; ++ nSkip_local = 0; + +- for( ; ; nSkip++ ) { +- j = aaanPermutation[ 0 ][ 0 ][ ( iGame + nSkip ) % 36 ]; ++ for( ; ; nSkip_local++ ) { ++ j = aaanPermutation[ 0 ][ 0 ][ ( iGame + nSkip_local ) % 36 ]; + + anDice[ 0 ] = j / 6 + 1; + anDice[ 1 ] = j % 6 + 1; +@@ -265,7 +265,7 @@ + k; /* 36**i */ + + for( i = 0, j = 0, k = 1; i < 6 && i <= iTurn; i++, k *= 36 ) +- j = aaanPermutation[ i ][ iTurn ][ ( (iGame + nSkip) / k + j ) % 36 ]; ++ j = aaanPermutation[ i ][ iTurn ][ ( (iGame + nSkip_local) / k + j ) % 36 ]; + + anDice[ 0 ] = j / 6 + 1; + anDice[ 1 ] = j % 6 + 1; +@@ -1173,7 +1173,7 @@ + if( prc->fRotate ) + QuasiRandomSeed( prc->nSeed ); + +- nSkip = prc->nSkip; ++ nSkip_local = prc->nSkip; + + /* ... and the RNG */ + if( prc->rngRollout != RNG_MANUAL ) +@@ -1672,7 +1672,7 @@ + return -1; + + pes->rc.nGamesDone = cGames; +- pes->rc.nSkip = nSkip; ++ pes->rc.nSkip = nSkip_local; + + return 0; + diff --git a/games-board/gnubg/gnubg-0.14.3.ebuild b/games-board/gnubg/gnubg-0.14.3.ebuild index ada6e72b04de..843ca8f142aa 100644 --- a/games-board/gnubg/gnubg-0.14.3.ebuild +++ b/games-board/gnubg/gnubg-0.14.3.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/games-board/gnubg/gnubg-0.14.3.ebuild,v 1.3 2006/01/29 21:28:01 joshuabaergen Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-board/gnubg/gnubg-0.14.3.ebuild,v 1.4 2006/04/02 15:15:47 tupone Exp $ inherit gnuconfig flag-o-matic games @@ -44,6 +44,7 @@ src_unpack() { cd "${S}" mv ../${PN}.weights-${WPV} "${S}/${PN}.weights" mv ../*bd . + epatch "${FILESDIR}/${P}"-gcc4.patch gnuconfig_update } |