diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2010-05-03 23:45:56 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2010-05-03 23:45:56 +0000 |
commit | 3ee15b3d70fa8e0dbd365fd7b014571f55a99e6e (patch) | |
tree | ab1ba24b2d388907bda89abe59884cdaa72bf83a /app-text/stardict | |
parent | workaround broken test suite (diff) | |
download | historical-3ee15b3d70fa8e0dbd365fd7b014571f55a99e6e.tar.gz historical-3ee15b3d70fa8e0dbd365fd7b014571f55a99e6e.tar.bz2 historical-3ee15b3d70fa8e0dbd365fd7b014571f55a99e6e.zip |
Fix sparc/sigbus wrt #265792 by Tiago Cunha.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'app-text/stardict')
-rw-r--r-- | app-text/stardict/ChangeLog | 8 | ||||
-rw-r--r-- | app-text/stardict/Manifest | 14 | ||||
-rw-r--r-- | app-text/stardict/files/stardict-3.0.1-sparc_sigbus.patch | 86 | ||||
-rw-r--r-- | app-text/stardict/stardict-3.0.1-r3.ebuild | 101 |
4 files changed, 197 insertions, 12 deletions
diff --git a/app-text/stardict/ChangeLog b/app-text/stardict/ChangeLog index 1001f5804a80..c027e999454c 100644 --- a/app-text/stardict/ChangeLog +++ b/app-text/stardict/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-text/stardict # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/stardict/ChangeLog,v 1.6 2010/02/09 21:13:13 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/stardict/ChangeLog,v 1.7 2010/05/03 23:45:56 ssuominen Exp $ + +*stardict-3.0.1-r3 (03 May 2010) + + 03 May 2010; Samuli Suominen <ssuominen@gentoo.org> + +stardict-3.0.1-r3.ebuild, +files/stardict-3.0.1-sparc_sigbus.patch: + Fix sparc/sigbus wrt #265792 by Tiago Cunha. 09 Feb 2010; Joseph Jezak <josejx@gentoo.org> stardict-3.0.1-r2.ebuild: Marked ppc/ppc64 stable for bug #288555. diff --git a/app-text/stardict/Manifest b/app-text/stardict/Manifest index 3464763b4a0d..e63e711b29df 100644 --- a/app-text/stardict/Manifest +++ b/app-text/stardict/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX stardict-2.4.8-ClipboardReceivedCallback.patch 669 RMD160 051e058f3c5cb174ecb461d4ae67115eca26c5e7 SHA1 d65226bef41e19b85114869a434c635b4cdee515 SHA256 c38927160ed618728db391033397801ffd1850c0aeaa98caa4cf4441a668d459 AUX stardict-2.4.8-floatwin-disappear.patch 591 RMD160 334bc9fce6f765c17ac38c0bbf95ed2b1ba86803 SHA1 ad7ff07266de13c958bcdad08538a2327d1fc255 SHA256 a9b6d4269bc546004fa0535b5562b733de6f502483deb9346f1a40fe4a3026f6 AUX stardict-3.0.1-changelog-minor-typo-fixes.patch 3415 RMD160 b6938e9a0f1272863187770bf5a893d239eb0c9a SHA1 117bcf2eb2478a932b9b0535cb06012a04e50293 SHA256 36543e608207de14eafd8b943afd855fe718856ede1c3c13a8e0a0808c6ef0b0 @@ -9,6 +6,7 @@ AUX stardict-3.0.1-gcc43.patch 12626 RMD160 068e8af4430d0c137fe41664fcae12053aec AUX stardict-3.0.1-gcc44.patch 337 RMD160 4c056def8b71e51ed5da1165e18e0fb75fdd800f SHA1 3fcce281d5b17e2f9478290ad1e783420f0e5259 SHA256 0ff077cd3bb3f0ccc89bb15731387ec27365f52454bc0b4e2f75861c04cdf0f6 AUX stardict-3.0.1-gconf-m4.diff 1720 RMD160 e4fea58f8730207a2de6d64f33c563f2fb758011 SHA1 a1fff45ee0ee30fa27ac9e512c9a9b7539117d9b SHA256 dac7841720aa693fc65150beff507120346b1a6b1040a33baf26cb7485cf5939 AUX stardict-3.0.1-gucharmap2.patch 1815 RMD160 663e1979b996e45f17a4b61f42a1fdf6b818cd10 SHA1 9ebf602e2e8af8a9add69db32fe9cd5a76829f43 SHA256 369c57818e8bbadc4ddc144a389d36c19b8ed82c10052d91d709c4e09658a592 +AUX stardict-3.0.1-sparc_sigbus.patch 2878 RMD160 6909a103f7f5f17e30302574687c001406efec80 SHA1 07e07b83eedfbc5ad105ea95b9e06f5eb6e23971 SHA256 eda41fa84ccf69d8da8bd38cf2030ffa997bd4437d5c090143db383dc73078ae AUX stardict-3.0.1-transparent_trayicon.patch 5712 RMD160 3ff5b688c264258d980c9168fff151d75164de65 SHA1 891f23e7be8e0b277f32414fa786874eed965344 SHA256 9171ae1aeb154d1159fe7fd2dee1ab30accd834fcdaa56f62bb66dac4fcbd741 DIST QQWry.Dat.bz2 4114875 RMD160 646916f7ac234a95526f9e43cfca674c2b4b7bd1 SHA1 de7ff7208da0f889ec08911119948780d7ee4738 SHA256 3eda90ee8ea13ec88767336b078d2dfe2c971d6a31df60f409d526e3e29a4f83 DIST WyabdcRealPeopleTTS.tar.bz2 84329208 RMD160 9c9bd37cf85aaed8d5b090b2014c3122e98ba8e4 SHA1 056609ec9743bda105ff6db956b321436ae50b90 SHA256 96a398eaef3e84f6f23e61683e6439913a4d44055e695dd4a1936f9340d64870 @@ -17,12 +15,6 @@ DIST stardict-3.0.1.tar.bz2 1964195 RMD160 296d73bd9acdbb53c21a4fb17e608a25f01b7 EBUILD stardict-2.4.8-r1.ebuild 2001 RMD160 aed96eae395cf61cf81f5b5201a51d0cf88eb854 SHA1 2738ad78c9447dfca87b1e8048cbb858530f37bb SHA256 7f82b9697102371827d732e99ffe807094ee2f5bc51b56ac260d82851dbe3dab EBUILD stardict-3.0.1-r1.ebuild 3126 RMD160 de6c3ba8e804d78b153bfcacc062e2dcec6bc62f SHA1 f8d6583e87e064841e384e7425a900c4929b9b1d SHA256 7410e94ce2e7405d6fc63e6286dc5702e3e8e6dca243cc5907a7729c13f2984d EBUILD stardict-3.0.1-r2.ebuild 3016 RMD160 2e49ea463c9c8fbaf49d5502611879337fed05f4 SHA1 8d6c1667a53caa752b735de11a1b5fd255fa5172 SHA256 bd07dce5b875bc0cc45c42466735743d6b0b689178e8f7cd4eca5193d01f754a -MISC ChangeLog 10234 RMD160 68a7f2a0bccf429cea59ac70e324391a2dd8f1d1 SHA1 85be2c2622d3172026285cc8f8d30ff0ef26359c SHA256 c2e841dc8b7083b1e410ed24fba40bbdf507ea90f3f784ad36f631b481b16836 +EBUILD stardict-3.0.1-r3.ebuild 3061 RMD160 62a52d28932d2d95dbf6ce303f8cdb7f026aa05c SHA1 5103f2389e1c209c68b84fd2cd0b2e694e9dd251 SHA256 db59a45b64b3d0700e45a8e3b93581f7c60245b109ebfd29cc5c8b53c5dedde5 +MISC ChangeLog 10444 RMD160 248008ef084bf897779e443fce17dd2e821b39fc SHA1 b1e10fca4b96c31d9f852273971ddfef081a6d0f SHA256 b68dd8cb4f44ea87067398c6b42c7cda284bb38a692f87c34ff04670dae2d42b MISC metadata.xml 1042 RMD160 0ced5634cca57caf85b8175f265cb5dd78071166 SHA1 ec96a72f7cea8d3635503946162b648caa914e47 SHA256 aef7fd1a02db1666dbf4f3243c7ed9b4665b14c935d8b4676c069fdcf4d06e07 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.14 (GNU/Linux) - -iEYEARECAAYFAktxz8kACgkQcsIHjyDViGQXcQCg2EboJIExzYqzOY0Ao2wDjzlX -t/EAnAkoEfLYefbbKbF6k8Std7V0WlcX -=xTzo ------END PGP SIGNATURE----- diff --git a/app-text/stardict/files/stardict-3.0.1-sparc_sigbus.patch b/app-text/stardict/files/stardict-3.0.1-sparc_sigbus.patch new file mode 100644 index 000000000000..2a5af3e170ce --- /dev/null +++ b/app-text/stardict/files/stardict-3.0.1-sparc_sigbus.patch @@ -0,0 +1,86 @@ +http://bugs.gentoo.org/show_bug.cgi?id=265792 + +by Tiago Cunha + +diff -ru stardict-3.0.1.orig/src/lib/getuint32.h stardict-3.0.1/src/lib/getuint32.h +--- stardict-3.0.1.orig/src/lib/getuint32.h 2010-03-11 21:25:04.349799973 +0000 ++++ stardict-3.0.1/src/lib/getuint32.h 2010-03-11 21:46:59.029797974 +0000 +@@ -1,7 +1,9 @@ + #ifndef _SD_GET_UINT32_H_ + #define _SD_GET_UINT32_H_ + +-#ifdef ARM ++#include <string.h> ++ ++#if defined(ARM) || defined(__sparc__) + static inline guint32 get_uint32(const gchar *addr) + { + guint32 result; +diff -ru stardict-3.0.1.orig/src/lib/stddict.cpp stardict-3.0.1/src/lib/stddict.cpp +--- stardict-3.0.1.orig/src/lib/stddict.cpp 2010-03-11 21:25:04.339799373 +0000 ++++ stardict-3.0.1/src/lib/stddict.cpp 2010-03-11 21:53:30.415449981 +0000 +@@ -260,8 +260,12 @@ + delete mf; + return NULL; + } +- +- gchar *p = mf->begin(); ++ guint32 word_off_size = (get_uint32(mf->begin()) + 1) * sizeof(guint32); ++ if (word_off_size >= cachestat.st_size || ++ *(mf->begin() + cachestat.st_size - 1) != '\0') ++ return NULL; ++ ++ gchar *p = mf->begin() + word_off_size; + gboolean has_prefix; + if (cachefiletype == CacheFileType_oft) + has_prefix = g_str_has_prefix(p, OFFSETFILE_MAGIC_DATA); +@@ -314,7 +318,7 @@ + } + g_free(tmpstr); + } +- if (cachestat.st_size!=glong(filedatasize + strlen(mf->begin()) +1)) { ++ if (cachestat.st_size != static_cast<gulong>(filedatasize + sizeof(guint32) + strlen(mf->begin() + word_off_size) +1)) { + delete mf; + return NULL; + } +@@ -375,7 +379,7 @@ + mf = get_cache_loadfile(oftfilename.c_str(), url, saveurl, cltfunc, filedatasize, 2); + if (!mf) + continue; +- wordoffset = (guint32 *)(mf->begin()+strlen(mf->begin())+1); ++ wordoffset = reinterpret_cast<guint32 *>(mf->begin()) + 1; + return true; + } + return false; +@@ -425,7 +429,12 @@ + if (!mf.open(filename, oftstat.st_size)) { + return fopen(filename, "wb"); + } +- gchar *p = mf.begin(); ++ guint32 word_off_size = (get_uint32(mf.begin()) + 1) * sizeof(guint32); ++ if (word_off_size >= oftstat.st_size || ++ *(mf.begin() + oftstat.st_size - 1) != '\0') ++ return fopen(filename, "wb"); ++ ++ gchar *p = mf.begin() + word_off_size; + bool has_prefix; + if (cachefiletype == CacheFileType_oft) + has_prefix = g_str_has_prefix(p, OFFSETFILE_MAGIC_DATA); +@@ -506,6 +515,9 @@ + FILE *out= get_cache_savefile(oftfilename.c_str(), url, 2, cfilename, cltfunc); + if (!out) + continue; ++ guint32 nentries = npages; ++ fwrite(&nentries, sizeof(nentries), 1, out); ++ fwrite(wordoffset, sizeof(guint32), npages, out); + if (cachefiletype == CacheFileType_oft) + fwrite(OFFSETFILE_MAGIC_DATA, 1, sizeof(OFFSETFILE_MAGIC_DATA)-1, out); + else +@@ -520,7 +532,6 @@ + #endif + } + fwrite("\n", 1, 2, out); +- fwrite(wordoffset, sizeof(guint32), npages, out); + fclose(out); + g_print("Save cache file: %s\n", cfilename.c_str()); + return true; diff --git a/app-text/stardict/stardict-3.0.1-r3.ebuild b/app-text/stardict/stardict-3.0.1-r3.ebuild new file mode 100644 index 000000000000..e8865c637f31 --- /dev/null +++ b/app-text/stardict/stardict-3.0.1-r3.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/stardict/stardict-3.0.1-r3.ebuild,v 1.1 2010/05/03 23:45:56 ssuominen Exp $ + +EAPI="2" + +inherit gnome2 eutils autotools + +# NOTE: Even though the *.dict.dz are the same as dictd/freedict's files, +# their indexes seem to be in a different format. So we'll keep them +# seperate for now. + +IUSE="festival espeak gnome gucharmap qqwry pronounce spell" +DESCRIPTION="A GNOME2 international dictionary supporting fuzzy and glob style matching" +HOMEPAGE="http://stardict.sourceforge.net/" +SRC_URI="mirror://sourceforge/stardict/${P}.tar.bz2 + qqwry? ( mirror://sourceforge/stardict/QQWry.Dat.bz2 ) + pronounce? ( mirror://sourceforge/stardict/WyabdcRealPeopleTTS.tar.bz2 )" + +RESTRICT="test" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" + +DEP="gnome? ( >=gnome-base/libbonobo-2.2.0 + >=gnome-base/libgnome-2.2.0 + pronounce? ( >=gnome-base/libgnome-2.2.0[esd] ) + >=gnome-base/libgnomeui-2.2.0 + >=gnome-base/gconf-2 + >=gnome-base/orbit-2.6 + app-text/scrollkeeper ) + spell? ( app-text/enchant ) + gucharmap? ( >=gnome-extra/gucharmap-1.4.0 ) + dev-libs/libsigc++ + sys-libs/zlib + >=x11-libs/gtk+-2.12" + +RDEPEND="${DEP} + espeak? ( >=app-accessibility/espeak-1.29 ) + festival? ( ~app-accessibility/festival-1.96_beta )" + +DEPEND="${DEP} + >=dev-util/intltool-0.22 + dev-util/pkgconfig" + +src_prepare() { + epatch "${FILESDIR}"/${P}-configure.in-EST.diff + epatch "${FILESDIR}"/${P}-gconf-m4.diff + epatch "${FILESDIR}"/${P}-gcc43.patch + epatch "${FILESDIR}"/${P}-transparent_trayicon.patch + epatch "${FILESDIR}"/${P}-changelog-minor-typo-fixes.patch + epatch "${FILESDIR}"/${P}-gcc44.patch + epatch "${FILESDIR}"/${P}-sparc_sigbus.patch + + # Fix compatibility with gucharmap-2, bug #240728 + epatch "${FILESDIR}/${P}-gucharmap2.patch" + + AT_M4DIR="m4" eautoreconf + gnome2_omf_fix +} + +src_configure() { + export PKG_CONFIG=$(type -P pkg-config) + # Festival plugin crashes, bug 188684. Disable for now. + G2CONF="$(use_enable gnome gnome-support) + $(use_enable spell) + $(use_enable gucharmap) + $(use_enable espeak) + $(use_enable qqwry) + --disable-festival + --disable-advertisement + --disable-updateinfo" + gnome2_src_configure +} + +src_install() { + gnome2_src_install + if use qqwry; then + insinto /usr/share/stardict/data + doins ../QQWry.Dat + fi + if use pronounce; then + dodir /usr/share/ + mv ../WyabdcRealPeopleTTS "${D}"/usr/share/ + fi + dodoc doc/{FAQ,HowToCreateDictionary,StarDictFileFormat,Translation,HACKING} +} + +pkg_postinst() { + if use festival; then + elog "Note: festival text to speech (TTS) plugin is not built. To use festival" + elog 'TTS plugin, please, enable "Use TTS program." at:' + elog '"Preferences -> Dictionary -> Sound" and fill in "Commandline" with:' + elog '"echo %s | festival --tts"' + elog + fi + elog "You will now need to install stardict dictionary files. If" + elog "you have not, execute the below to get a list of dictionaries:" + elog + elog " emerge -s stardict-" +} |