summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-01-08 18:53:52 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-01-08 18:53:52 +0000
commit274b24339865ee1e0e412098a9adde6a4aa31cf8 (patch)
tree59247576e69a85404e9629c64d1760569859cc39 /app-text
parentfixed init, reload was not working. readded checkconfig function to fix (diff)
downloadhistorical-274b24339865ee1e0e412098a9adde6a4aa31cf8.tar.gz
historical-274b24339865ee1e0e412098a9adde6a4aa31cf8.tar.bz2
historical-274b24339865ee1e0e412098a9adde6a4aa31cf8.zip
Incorporate OpenSUSE patches for buffer overflows and startup crash.
Package-Manager: portage-2.2.0_alpha84/cvs/Linux x86_64
Diffstat (limited to 'app-text')
-rw-r--r--app-text/stardict/ChangeLog9
-rw-r--r--app-text/stardict/Manifest19
-rw-r--r--app-text/stardict/files/stardict-3.0.3-compositelookup_cpp.patch19
-rw-r--r--app-text/stardict/files/stardict-3.0.3-overflow.patch26
-rw-r--r--app-text/stardict/stardict-3.0.3-r1.ebuild115
5 files changed, 179 insertions, 9 deletions
diff --git a/app-text/stardict/ChangeLog b/app-text/stardict/ChangeLog
index 3c126fcbbb21..e57aa0fd423e 100644
--- a/app-text/stardict/ChangeLog
+++ b/app-text/stardict/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-text/stardict
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/stardict/ChangeLog,v 1.14 2012/01/08 18:31:37 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/stardict/ChangeLog,v 1.15 2012/01/08 18:53:52 ssuominen Exp $
+
+*stardict-3.0.3-r1 (08 Jan 2012)
+
+ 08 Jan 2012; Samuli Suominen <ssuominen@gentoo.org>
+ +stardict-3.0.3-r1.ebuild, +files/stardict-3.0.3-compositelookup_cpp.patch,
+ +files/stardict-3.0.3-overflow.patch:
+ Incorporate OpenSUSE patches for buffer overflows and startup crash.
08 Jan 2012; Samuli Suominen <ssuominen@gentoo.org> stardict-3.0.3.ebuild:
Use gnome2.eclass for gconf schema(s).
diff --git a/app-text/stardict/Manifest b/app-text/stardict/Manifest
index eae59f5c1bca..446006e29697 100644
--- a/app-text/stardict/Manifest
+++ b/app-text/stardict/Manifest
@@ -12,26 +12,29 @@ AUX stardict-3.0.1-gconf-m4.diff 1720 RMD160 e4fea58f8730207a2de6d64f33c563f2fb7
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
+AUX stardict-3.0.3-compositelookup_cpp.patch 863 RMD160 3891cfa29f7ee9059170c26e26575ac1527fee6d SHA1 aff0ccad57fa2221e42413a35b1c7063e632d966 SHA256 7b1ef6e9730d7c5eb9b9ca530a4632e83e2c196be50f6d58c102c92712594b38
AUX stardict-3.0.3-correct-glib-include.patch 243 RMD160 ed5620fc734f824c0f00a3530992bb64e6b478d1 SHA1 3bec51d7bb4d0a477b7ec5c81f928178d58436c9 SHA256 42b88cd040b53d0e9084829472b03502616d2b3f794c1190272391a6b072d9f3
AUX stardict-3.0.3-entry.patch 741 RMD160 f6307339c3b0b328a92ed5a90aca7971d62395cb SHA1 4cf50f218c046a87c033d4f39296db1b41e9ff57 SHA256 af4d049ee98b2eef865372dbda604fb8f896a09470d55088d61dd66f478d2fd6
AUX stardict-3.0.3-gcc46.patch 279 RMD160 9138aabe80bcfc584cec6b146a43e303ec5adcad SHA1 01463361f0680e05cdd12853baa5c6b6f9924499 SHA256 fd1a102cc87b4c5cdb0256d75584ff012fa7c731a523bb2d8225bc8d3c2a26f3
+AUX stardict-3.0.3-overflow.patch 942 RMD160 cf94150d92b3d82433f3424c9eb53573433f63a7 SHA1 b138cf6aef9c465325f612d8bf64869f34f9c7f1 SHA256 8d5a4831fa47f2a8862d36bc10bcca92356cb7f12e24e66351db2117f9f29f4b
DIST QQWry.Dat.bz2 4114875 RMD160 646916f7ac234a95526f9e43cfca674c2b4b7bd1 SHA1 de7ff7208da0f889ec08911119948780d7ee4738 SHA256 3eda90ee8ea13ec88767336b078d2dfe2c971d6a31df60f409d526e3e29a4f83
DIST WyabdcRealPeopleTTS.tar.bz2 84329208 RMD160 9c9bd37cf85aaed8d5b090b2014c3122e98ba8e4 SHA1 056609ec9743bda105ff6db956b321436ae50b90 SHA256 96a398eaef3e84f6f23e61683e6439913a4d44055e695dd4a1936f9340d64870
DIST stardict-3.0.1.tar.bz2 1964195 RMD160 296d73bd9acdbb53c21a4fb17e608a25f01b76de SHA1 a0357e88105eaf7d6a4aa4803bf8617759bf0315 SHA256 504b3a7748933b9bd998cb85f37d4fa0a8575306643ffe6a9742450e66cd556f
DIST stardict-3.0.3.tar.bz2 9147947 RMD160 4c63f3cf439a7c34829b371e75c16db97fb35fd1 SHA1 5043c0918963cd4d40e6d6289353f295766ec74f SHA256 9ba10a5b3dcdd02b81c7a138dac15903a6bc2355856f60338f3775e371472b73
EBUILD stardict-3.0.1-r2.ebuild 3022 RMD160 d75d427d66563eb47d6950e78175ffac644b9f20 SHA1 013fe46caed49f9dc936f4a1d75ba4892f0bc807 SHA256 20830c859142f16a68d0e577266b3c30225abb8d8755825f623c76d52b3d94fc
EBUILD stardict-3.0.1-r3.ebuild 3103 RMD160 41155f59f3fd97eab8b3f126d7f13d0ddc0f0ac8 SHA1 f2d8258dd8dca1e0a674442e25f5d01fa396dbfc SHA256 8083f1ba8062d4dadc2026206202e65977e79b9478bb26dc6597329228775361
+EBUILD stardict-3.0.3-r1.ebuild 3118 RMD160 1bac1a8aeae78ba6d8fbd38b7a71ae908caf037c SHA1 9fb6940829506162c240236dbb31ea51213f269e SHA256 d1c9d12e1db00b12c4b1f61f571c228ec9c90f2bfad8930f9ba9ac2124c5b8d4
EBUILD stardict-3.0.3.ebuild 3028 RMD160 aea42752c1fca8873653d45576bdfc57f91163ef SHA1 ed76b47a481312fe9199325c9414f452af043d8c SHA256 313a6c9cfaf372100017a13b3bd4499246327e77d197483faf0d3e1fa9b504f6
-MISC ChangeLog 11810 RMD160 5e7951673a7a8cbe1cc653b4e99e0f9588767df4 SHA1 50d32e69ba42280e2c30ec39b197b9be4fac6efb SHA256 5e8ab0adfde910a2e4a19c5d3d798e44d87ed9fd87ee89e4d0d795d14218ded6
+MISC ChangeLog 12088 RMD160 9d82a75920d45b131fb94a9210d75425b80f9d4f SHA1 132f4313af37b4ab6179841e6762b906f524ce0f SHA256 3f0b9a76dcfd6d6e1d89d0ba478256f768122120ed05f0f0e6fb3effa9411e6d
MISC metadata.xml 1118 RMD160 61e3ee3d4ea189024ce2f7fa5c59ac8b758cae82 SHA1 755adaa6d7aad1cea44eb4de65df3156adc59a46 SHA256 c6f8ba52202b6c8383cff2cd2ee0f4fda1a29c9019488fd1cb4369ef400a95a9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iQEcBAEBAgAGBQJPCeC7AAoJEEdUh39IaPFNwFgIAJncXbkXb+V2q0uQ8FYemdsm
-Oc12Utmrw9gXtDG6DcgwwoMYZ3LFWWJE1Bfb/+38g9WVoCedIKZDqXOCvuDYaY4e
-U6QXrcB4ORNhpZiN+H0OSMHGHKYt5z2kWjYYyZKT3NbOKo8JFmq1Vgq7ouWQp1UL
-Rx7DEyp0JFEDrVtsU96N5+xpc6DN7QKpfLiiL+nTFafiwa8o5g7t49OBumfQZygG
-T/QT2ncCUvjVqvZM1palerYcoOjbmyrC5ZU/5+bovp9rsIOGADexozE7Fe5IoMtH
-/lLVtb8CPoEi20FCLjttMoDIqvVaMH9paOz3tnufCclIFEAe9EKdYdlV5a07ltY=
-=svSI
+iQEcBAEBAgAGBQJPCeXyAAoJEEdUh39IaPFNU9gH/RDiIi09spNt1ntP52vkZlJy
+qTwMFWXWH9CyGWflgcW4t2UbH8ci1gEjiiyF1jA6bdgXSWRYSezxhFpmlRTW1Gjb
+QZ+gREH7ltF6zL9a4rNjvZXfgt/xiuBjtO/y/h7PXvwir8Iw8c+eFn1RHG8lfj+R
+n2kzg+VN5mxKTkYhgn9Af0bQwG5tC2Hfg0t+9jbMI+28LjWe1bznNxyQCqlj9DKm
+yGe554/Eb2gL8AFnCLQNLk/TRTWkteVV24ELNd/GjLe9z+SqATQgfFTHPB1sazVq
+lcM8MyFnHmxsV+tYMAqvPVOPW/fw29tnsXm+bpUV63O+uQ79nTQl160S7sUOlnM=
+=C+TH
-----END PGP SIGNATURE-----
diff --git a/app-text/stardict/files/stardict-3.0.3-compositelookup_cpp.patch b/app-text/stardict/files/stardict-3.0.3-compositelookup_cpp.patch
new file mode 100644
index 000000000000..86825555d9cb
--- /dev/null
+++ b/app-text/stardict/files/stardict-3.0.3-compositelookup_cpp.patch
@@ -0,0 +1,19 @@
+This patch is from OpenSUSE .src.rpm for the following crash on startup:
+
+ERROR:compositelookup.cpp:53:void CompositeLookup::send_net_dict_request(const string&, const string&): assertion failed: (NetDictRequests.end() == std::find(NetDictRequests.begin(), NetDictRequests.end(), request))
+
+--- dict/src/lib/compositelookup.cpp
++++ dict/src/lib/compositelookup.cpp
+@@ -50,8 +50,10 @@
+ void CompositeLookup::send_net_dict_request(const std::string& dict_id, const std::string& key)
+ {
+ NetDictRequest request(dict_id, key);
+- g_assert(NetDictRequests.end() == std::find(NetDictRequests.begin(), NetDictRequests.end(), request));
+- NetDictRequests.push_back(request);
++ if(NetDictRequests.end() == std::find(NetDictRequests.begin(), NetDictRequests.end(), request))
++ {
++ NetDictRequests.push_back(request);
++ }
+ }
+
+ /* returns true if got expected response */
diff --git a/app-text/stardict/files/stardict-3.0.3-overflow.patch b/app-text/stardict/files/stardict-3.0.3-overflow.patch
new file mode 100644
index 000000000000..482490105704
--- /dev/null
+++ b/app-text/stardict/files/stardict-3.0.3-overflow.patch
@@ -0,0 +1,26 @@
+This patch is stardict-tools-3.0.3-destbufferoverflow.patch from OpenSUSE .src.rpm for:
+
+warning: call to ‘__fgets_chk_warn’ declared with attribute warning: fgets called with bigger size than length of destination buffer [enabled by default]
+
+--- tools/src/myspell2dic.c
++++ tools/src/myspell2dic.c
+@@ -132,7 +132,7 @@ if (argc<3)
+
+ fprintf(stderr, "Enter grammar language [Spanish]: ");
+ fflush(stderr);
+-fgets(lang, 100, stdin);
++fgets(lang, 50, stdin);
+ if ((p=strchr(lang, '\n'))!=NULL) *p=0;
+ if (*lang==0) strcpy(lang, "Spanish");
+
+--- tools/src/ooo2dict.c
++++ tools/src/ooo2dict.c
+@@ -71,7 +71,7 @@ current2=malloc(10000);
+
+ fprintf(stderr, "Enter thesaurus language [WordNet_English]: ");
+ fflush(stderr);
+-fgets(lang, 100, stdin);
++fgets(lang, 50, stdin);
+ if ((p=strchr(lang, '\n'))!=NULL) *p=0;
+ if (*lang==0) strcpy(lang, "WordNet_English");
+ F=fopen((argc>1)? argv[1]: "/usr/share/myspell/dicts/th_en_US_v2.dat", "rt");
diff --git a/app-text/stardict/stardict-3.0.3-r1.ebuild b/app-text/stardict/stardict-3.0.3-r1.ebuild
new file mode 100644
index 000000000000..790ee50a6cba
--- /dev/null
+++ b/app-text/stardict/stardict-3.0.3-r1.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/stardict/stardict-3.0.3-r1.ebuild,v 1.1 2012/01/08 18:53:52 ssuominen Exp $
+
+# 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.
+
+# NOTE: Festival plugin crashes, bug 188684. Disable for now.
+
+EAPI=4
+
+GNOME2_LA_PUNT=yes
+GCONF_DEBUG=no
+
+inherit eutils gnome2
+
+DESCRIPTION="A international dictionary supporting fuzzy and glob style matching"
+HOMEPAGE="http://code.google.com/p/stardict-3/"
+SRC_URI="http://${PN}-3.googlecode.com/files/${P}.tar.bz2
+ pronounce? ( http://${PN}-3.googlecode.com/files/WyabdcRealPeopleTTS.tar.bz2 )
+ qqwry? ( mirror://gentoo/QQWry.Dat.bz2 )"
+
+LICENSE="CPL-1.0 GPL-3 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="editor espeak gnome gucharmap qqwry pronounce spell"
+
+COMMON_DEPEND=">=dev-libs/glib-2.16
+ dev-libs/libsigc++:2
+ sys-libs/zlib
+ >=x11-libs/gtk+-2.20:2
+ editor? (
+ dev-libs/libpcre
+ dev-libs/libxml2
+ virtual/mysql
+ )
+ gnome? (
+ >=gnome-base/libbonobo-2
+ >=gnome-base/libgnome-2
+ >=gnome-base/libgnomeui-2
+ >=gnome-base/gconf-2
+ >=gnome-base/orbit-2
+ )
+ gucharmap? ( >=gnome-extra/gucharmap-2.22.1:0 )
+ spell? ( >=app-text/enchant-1.2 )"
+RDEPEND="${COMMON_DEPEND}
+ espeak? ( >=app-accessibility/espeak-1.29 )"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.3
+ app-text/gnome-doc-utils
+ dev-libs/libxslt
+ dev-util/intltool
+ dev-util/pkgconfig
+ sys-devel/gettext"
+
+RESTRICT="test"
+
+pkg_setup() {
+ G2CONF="$(use_enable editor tools)
+ --disable-scrollkeeper
+ $(use_enable spell)
+ $(use_enable gucharmap)
+ --disable-festival
+ $(use_enable espeak)
+ $(use_enable qqwry)
+ --disable-updateinfo
+ $(use_enable gnome gnome-support)
+ --disable-gpe-support
+ --disable-schemas-install"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-correct-glib-include.patch \
+ "${FILESDIR}"/${P}-entry.patch \
+ "${FILESDIR}"/${P}-gcc46.patch \
+ "${FILESDIR}"/${P}-compositelookup_cpp.patch \
+ "${FILESDIR}"/${P}-overflow.patch
+
+ gnome2_src_prepare
+}
+
+src_install() {
+ gnome2_src_install
+
+ dodoc dict/doc/{Documentation,FAQ,HACKING,HowToCreateDictionary,Skins,StarDictFileFormat,Translation}
+
+ if use qqwry; then
+ insinto /usr/share/stardict/data
+ doins ../QQWry.Dat
+ fi
+
+ if use pronounce; then
+ docinto WyabdcRealPeopleTTS
+ dodoc ../WyabdcRealPeopleTTS/{README,readme.txt}
+ rm -f ../WyabdcRealPeopleTTS/{README,readme.txt}
+ insinto /usr/share
+ doins -r ../WyabdcRealPeopleTTS
+ fi
+}
+
+pkg_postinst() {
+ elog "Note: festival text to speech (TTS) plugin is not built. To use festival"
+ elog 'TTS plugin, please, emerge festival and enable "Use TTS program." at:'
+ elog '"Preferences -> Dictionary -> Sound" and fill in "Commandline" with:'
+ elog '"echo %s | festival --tts"'
+ elog
+ 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-"
+
+ gnome2_pkg_postinst
+}