diff options
author | Jim Ramsay <lack@gentoo.org> | 2008-01-24 20:08:11 +0000 |
---|---|---|
committer | Jim Ramsay <lack@gentoo.org> | 2008-01-24 20:08:11 +0000 |
commit | 0aff9ca0508105a2790a7787522403d62ea548fb (patch) | |
tree | 591caa30907730cb702c9e4ad9f5a594303c8867 /rox-base | |
parent | Signing Manifest. (diff) | |
download | historical-0aff9ca0508105a2790a7787522403d62ea548fb.tar.gz historical-0aff9ca0508105a2790a7787522403d62ea548fb.tar.bz2 historical-0aff9ca0508105a2790a7787522403d62ea548fb.zip |
Added patch to fix detection of text/plain files.
Package-Manager: portage-2.1.4_rc14
Diffstat (limited to 'rox-base')
-rw-r--r-- | rox-base/rox/ChangeLog | 9 | ||||
-rw-r--r-- | rox-base/rox/Manifest | 42 | ||||
-rw-r--r-- | rox-base/rox/files/digest-rox-2.7.1-r1 (renamed from rox-base/rox/files/digest-rox-2.7.1) | 0 | ||||
-rw-r--r-- | rox-base/rox/files/rox-2.7-text_plain.patch | 150 | ||||
-rw-r--r-- | rox-base/rox/rox-2.7-r2.ebuild | 3 | ||||
-rw-r--r-- | rox-base/rox/rox-2.7.1-r1.ebuild (renamed from rox-base/rox/rox-2.7.1.ebuild) | 3 | ||||
-rw-r--r-- | rox-base/rox/rox-2.7.ebuild | 3 |
7 files changed, 187 insertions, 23 deletions
diff --git a/rox-base/rox/ChangeLog b/rox-base/rox/ChangeLog index bbd33135f68b..a774ffebb7e6 100644 --- a/rox-base/rox/ChangeLog +++ b/rox-base/rox/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for rox-base/rox # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/rox-base/rox/ChangeLog,v 1.54 2008/01/23 14:45:26 lack Exp $ +# $Header: /var/cvsroot/gentoo-x86/rox-base/rox/ChangeLog,v 1.55 2008/01/24 20:08:10 lack Exp $ + +*rox-2.7.1-r1 (24 Jan 2008) + + 24 Jan 2008; Jim Ramsay <lack@gentoo.org> +files/rox-2.7-text_plain.patch, + rox-2.7.ebuild, rox-2.7-r2.ebuild, -rox-2.7.1.ebuild, + +rox-2.7.1-r1.ebuild: + Added patch to fix detection of text/plain files. *rox-2.7.1 (23 Jan 2008) diff --git a/rox-base/rox/Manifest b/rox-base/rox/Manifest index 843619a58196..a1ed1e4dde42 100644 --- a/rox-base/rox/Manifest +++ b/rox-base/rox/Manifest @@ -6,6 +6,10 @@ AUX rox-2.7-nostrip.patch 664 RMD160 8b54d9493f0a4b81632a4d448b1003402859c6dc SH MD5 f2e89f5a5d685a0015bb66308a0ec6b8 files/rox-2.7-nostrip.patch 664 RMD160 8b54d9493f0a4b81632a4d448b1003402859c6dc files/rox-2.7-nostrip.patch 664 SHA256 4fce67a2c336f8ce66f3eccc9ab42b52f16bb99c03e6f29369024e11821a03fc files/rox-2.7-nostrip.patch 664 +AUX rox-2.7-text_plain.patch 4049 RMD160 71d7336fa2b3eebca7273dbcc0fcc3759b25b11d SHA1 bce0d14edf94ee1c7d5badbac495f6c0df3e4e64 SHA256 60f301cc90d1bd93982a2bb7d7a12b22e9ba39cf702db1a720b893b41d6a740f +MD5 e963b3fa0113f5cb66e88f7c6a43b2c1 files/rox-2.7-text_plain.patch 4049 +RMD160 71d7336fa2b3eebca7273dbcc0fcc3759b25b11d files/rox-2.7-text_plain.patch 4049 +SHA256 60f301cc90d1bd93982a2bb7d7a12b22e9ba39cf702db1a720b893b41d6a740f files/rox-2.7-text_plain.patch 4049 DIST rox-filer-2.6.1.tar.bz2 1816711 RMD160 94a3320883c49066072d44f25f417e20739711ca SHA1 5364ac260970ecafa58f92892becf8104db025a3 SHA256 e7efefbfa8e37ba7263771bdfd0b16c9f4b47b09d301b82616012ad53eb03e02 DIST rox-filer-2.7.1.tar.bz2 1835501 RMD160 f1face1871d641b7bea4b66a5de9a9a78ea7a25a SHA1 f79acf776d2e3eb757aed1c2aa6cffa7fb901f20 SHA256 3a565cc47f8ad2cba5972e2494e9f9380b7fc68a2ba0467aef6f2e1340695f92 DIST rox-filer-2.7.tar.bz2 1829001 RMD160 f378129073b00e388559380fc551b23437cd4cbf SHA1 421a9999885b04482e3efb6da18705e6788cb4da SHA256 c43ad72760e5ef2c9150d00c7beae24c99c1df102443e87e6ccd969427a47c92 @@ -13,22 +17,22 @@ EBUILD rox-2.6.1.ebuild 2838 RMD160 72b13c5ca858a09acd243606faacded52354b00b SHA MD5 34ef49ff39710a47c2434cfa78724e99 rox-2.6.1.ebuild 2838 RMD160 72b13c5ca858a09acd243606faacded52354b00b rox-2.6.1.ebuild 2838 SHA256 18f897f0e834c0901540419242940e18a3774a5df08a76d7c9832c514e5e9972 rox-2.6.1.ebuild 2838 -EBUILD rox-2.7-r2.ebuild 3623 RMD160 3a09522ae29cf615be6235ccc239062c0943a33e SHA1 9a3a5e2cdb0f0621700e943fa9440309db26a99d SHA256 53e7409fe7ffb98594083023aff2dde9b9de9c3535dd4bd612a7a8b4e814117b -MD5 4cc186aed52f741f4e9dbcfde29a2d11 rox-2.7-r2.ebuild 3623 -RMD160 3a09522ae29cf615be6235ccc239062c0943a33e rox-2.7-r2.ebuild 3623 -SHA256 53e7409fe7ffb98594083023aff2dde9b9de9c3535dd4bd612a7a8b4e814117b rox-2.7-r2.ebuild 3623 -EBUILD rox-2.7.1.ebuild 3772 RMD160 08664d52fa870c7bea561d6e3ce9e5b5570093be SHA1 82d0cd1dbf8c31f0530bb5a691146bf15434e14a SHA256 db2498b97e751dd5405bb32dd58506c5106677f32c12e285bb92de7ef9580473 -MD5 7493ca47d0ffb46caa0bee2475f230e1 rox-2.7.1.ebuild 3772 -RMD160 08664d52fa870c7bea561d6e3ce9e5b5570093be rox-2.7.1.ebuild 3772 -SHA256 db2498b97e751dd5405bb32dd58506c5106677f32c12e285bb92de7ef9580473 rox-2.7.1.ebuild 3772 -EBUILD rox-2.7.ebuild 2841 RMD160 ee012af42ab3bf399a778fc7394e2920ca5f03b1 SHA1 71437013e9d53c41f69bd2a7902afbd19d8288b0 SHA256 4621f45dcedebc2a856a4b76a5c85c993033a885b61134df700abbe15b179665 -MD5 d4225087ed2784f4c5f90678d5273b0d rox-2.7.ebuild 2841 -RMD160 ee012af42ab3bf399a778fc7394e2920ca5f03b1 rox-2.7.ebuild 2841 -SHA256 4621f45dcedebc2a856a4b76a5c85c993033a885b61134df700abbe15b179665 rox-2.7.ebuild 2841 -MISC ChangeLog 12273 RMD160 ae608888e7ffdbad2b3b94bd1d336a6b30ca8863 SHA1 83a817b19d5b9e27387fd37c18873e3ab36eb5b1 SHA256 90474ac673fb09dd210c87a2f63814345d92f7f70c77798548d853b274da0132 -MD5 1b764dbe392d23a6a0459a41f235865b ChangeLog 12273 -RMD160 ae608888e7ffdbad2b3b94bd1d336a6b30ca8863 ChangeLog 12273 -SHA256 90474ac673fb09dd210c87a2f63814345d92f7f70c77798548d853b274da0132 ChangeLog 12273 +EBUILD rox-2.7-r2.ebuild 3667 RMD160 7d1f26574b11e1f60f9d43ca7c8b05b590d454af SHA1 10e3312a15ec8af84f5b524b8296daae46b4821e SHA256 1bb3c3ebfab795a3073f23d929a8f0d1da9da57efaef2d818bebb7b216fdcdf4 +MD5 b2bd747c64340107c2f6d94791c34b7c rox-2.7-r2.ebuild 3667 +RMD160 7d1f26574b11e1f60f9d43ca7c8b05b590d454af rox-2.7-r2.ebuild 3667 +SHA256 1bb3c3ebfab795a3073f23d929a8f0d1da9da57efaef2d818bebb7b216fdcdf4 rox-2.7-r2.ebuild 3667 +EBUILD rox-2.7.1-r1.ebuild 3824 RMD160 76b2c9cc3f996d1bfd542d64e1993f0a73b520cc SHA1 19f604cec4b4b7344f5720e69d4e06708be1934f SHA256 f2aeef9983993a76400b55a74bc80c31a7898d84239ff8bea33a7989d51d68f1 +MD5 07bbef029e1bd8bddf1805d24dca5a8a rox-2.7.1-r1.ebuild 3824 +RMD160 76b2c9cc3f996d1bfd542d64e1993f0a73b520cc rox-2.7.1-r1.ebuild 3824 +SHA256 f2aeef9983993a76400b55a74bc80c31a7898d84239ff8bea33a7989d51d68f1 rox-2.7.1-r1.ebuild 3824 +EBUILD rox-2.7.ebuild 2885 RMD160 63657f1512bdf4ee91ec83321b65f0f67c1953c9 SHA1 cc8ce70a1dddcfd67be50e1f192e99f367037281 SHA256 eccbd430d33748a2e969b276011050b9439b4a37b87e4c01be09135a1173a557 +MD5 66a42f8def809adadb15c55f6634c509 rox-2.7.ebuild 2885 +RMD160 63657f1512bdf4ee91ec83321b65f0f67c1953c9 rox-2.7.ebuild 2885 +SHA256 eccbd430d33748a2e969b276011050b9439b4a37b87e4c01be09135a1173a557 rox-2.7.ebuild 2885 +MISC ChangeLog 12512 RMD160 da0f4069a02290bcfd59a4fc53a41c84c929d7b5 SHA1 80684a4a9a126d4dd7a4f93e0b7448f1a4f1a776 SHA256 894cdd00882a35cd87e78e7b88638d9ae65cdad9487e92d81ed078900225c4a4 +MD5 8936b63688b73b29f4d84d8e9e296221 ChangeLog 12512 +RMD160 da0f4069a02290bcfd59a4fc53a41c84c929d7b5 ChangeLog 12512 +SHA256 894cdd00882a35cd87e78e7b88638d9ae65cdad9487e92d81ed078900225c4a4 ChangeLog 12512 MISC metadata.xml 157 RMD160 fd6d83b802caa82822e8bb4d1752063fcda9b47f SHA1 54ccd31d923f052c9111f04c1a7d8b8f04f0a7b2 SHA256 941fe96a972d5a4f49555c01cbfab71d51e81ade3a53322fee549061aa17012c MD5 94ae74afbf5ec6b3f8cdcb4ea7c917bb metadata.xml 157 RMD160 fd6d83b802caa82822e8bb4d1752063fcda9b47f metadata.xml 157 @@ -42,6 +46,6 @@ SHA256 0568d16caeb6ed526c70d3beb69c674d9c4b3592ded4845d1281cd41cd628433 files/di MD5 f4dab615e605d9428476e058ecad6f0d files/digest-rox-2.7-r2 247 RMD160 2f94fb7dbf60f13e48cc0cc6d7d93b55a2096c56 files/digest-rox-2.7-r2 247 SHA256 0568d16caeb6ed526c70d3beb69c674d9c4b3592ded4845d1281cd41cd628433 files/digest-rox-2.7-r2 247 -MD5 4fcf66c79fed9cf41a8aa97df92e499a files/digest-rox-2.7.1 253 -RMD160 2e9a87bfb7f265a7d2624004b8ad26fa77d956c8 files/digest-rox-2.7.1 253 -SHA256 0d90dd1e9a2de454b274f0d9acc3456cacfb52fe597afb23b4996dd8daff4e93 files/digest-rox-2.7.1 253 +MD5 4fcf66c79fed9cf41a8aa97df92e499a files/digest-rox-2.7.1-r1 253 +RMD160 2e9a87bfb7f265a7d2624004b8ad26fa77d956c8 files/digest-rox-2.7.1-r1 253 +SHA256 0d90dd1e9a2de454b274f0d9acc3456cacfb52fe597afb23b4996dd8daff4e93 files/digest-rox-2.7.1-r1 253 diff --git a/rox-base/rox/files/digest-rox-2.7.1 b/rox-base/rox/files/digest-rox-2.7.1-r1 index 5d69c6176534..5d69c6176534 100644 --- a/rox-base/rox/files/digest-rox-2.7.1 +++ b/rox-base/rox/files/digest-rox-2.7.1-r1 diff --git a/rox-base/rox/files/rox-2.7-text_plain.patch b/rox-base/rox/files/rox-2.7-text_plain.patch new file mode 100644 index 000000000000..37630e76175c --- /dev/null +++ b/rox-base/rox/files/rox-2.7-text_plain.patch @@ -0,0 +1,150 @@ +commit ed0adb6e4e873eca15b4765035d3c89888c74a72 +Author: Stephen Watson <stephen@kerofin.demon.co.uk> +Date: Mon Jan 21 23:33:13 2008 +0000 + + MIME magic lookup now returns text/plain for certain unknown file types. + Restored the code, lost in the update to the newer XDG MIME code, which checks + unknown files to see if they are text. + + Modifications to the XDG code are tagged with ROX: comments. + +diff --git a/ROX-Filer/src/xdgmime.c b/ROX-Filer/src/xdgmime.c +index 133282d..51d38d6 100644 +--- a/ROX-Filer/src/xdgmime.c ++++ b/ROX-Filer/src/xdgmime.c +@@ -65,6 +65,7 @@ XdgMimeCache **_xdg_mime_caches = NULL; + static int n_caches = 0; + + const char xdg_mime_type_unknown[] = "application/octet-stream"; ++const char xdg_mime_type_unknown_text[] = "text/plain"; /* ROX: */ + + + enum +diff --git a/ROX-Filer/src/xdgmime.h b/ROX-Filer/src/xdgmime.h +index 82b5585..52d1524 100644 +--- a/ROX-Filer/src/xdgmime.h ++++ b/ROX-Filer/src/xdgmime.h +@@ -74,7 +74,11 @@ typedef void (*XdgMimeDestroy) (void *user_data); + #endif + + extern const char xdg_mime_type_unknown[]; +-#define XDG_MIME_TYPE_UNKNOWN xdg_mime_type_unknown ++#define XDG_MIME_TYPE_UNKNOWN xdg_mime_type_unknown ++ ++/* ROX: */ ++extern const char xdg_mime_type_unknown_text[]; ++#define XDG_MIME_TYPE_UNKNOWN_TEXT xdg_mime_type_unknown_text + + const char *xdg_mime_get_mime_type_for_data (const void *data, + size_t len); +diff --git a/ROX-Filer/src/xdgmimemagic.c b/ROX-Filer/src/xdgmimemagic.c +index 892688b..d1d04b6 100644 +--- a/ROX-Filer/src/xdgmimemagic.c ++++ b/ROX-Filer/src/xdgmimemagic.c +@@ -39,6 +39,9 @@ + #include <errno.h> + #include <limits.h> + ++/* ROX: */ ++#include <glib.h> ++ + #ifndef FALSE + #define FALSE (0) + #endif +@@ -654,6 +657,83 @@ _xdg_mime_magic_get_buffer_extents (XdgMimeMagic *mime_magic) + return mime_magic->max_extent; + } + ++static gboolean _rox_buffer_looks_like_text (const void *data, ++ const size_t len) ++{ ++ gchar *end; ++ ++ if (g_utf8_validate (data, len, (const gchar**)&end)) ++ { ++ /* g_utf8_validate allows control characters */ ++ int i; ++ for (i = 0; i < len; i++) ++ { ++ unsigned char c = ((const guchar *) data)[i]; ++ if (c < 32 && c != '\r' && c != '\n' && c != '\t') ++ return FALSE; ++ } ++ return TRUE; ++ ++ } else { ++ /* Check whether the string was truncated in the middle of ++ * a valid UTF8 char, or if we really have an invalid ++ * UTF8 string ++ */ ++ gint remaining_bytes = len; ++ ++ remaining_bytes -= (end-((gchar*)data)); ++ ++ if (g_utf8_get_char_validated(end, remaining_bytes) == -2) ++ return TRUE; ++#if defined(HAVE_WCTYPE_H) && defined (HAVE_MBRTOWC) ++ else { ++ size_t wlen; ++ wchar_t wc; ++ gchar *src, *end; ++ mbstate_t state; ++ ++ src = data; ++ end = data+len; ++ ++ memset (&state, 0, sizeof (state)); ++ while (src < end) { ++ /* Don't allow embedded zeros in textfiles */ ++ if (*src == 0) ++ return FALSE; ++ ++ wlen = mbrtowc(&wc, src, end - src, &state); ++ ++ if (wlen == (size_t)(-1)) { ++ /* Illegal mb sequence */ ++ return FALSE; ++ } ++ ++ if (wlen == (size_t)(-2)) { ++ /* No complete mb char before end ++ * Probably a cut off char which is ok */ ++ return TRUE; ++ } ++ ++ if (wlen == 0) { ++ /* Don't allow embedded zeros in textfiles */ ++ return FALSE; ++ } ++ ++ if (!iswspace (wc) && !iswprint(wc)) { ++ /* Not a printable or whitspace ++ * Probably not a text file */ ++ return FALSE; ++ } ++ ++ src += wlen; ++ } ++ return TRUE; ++ } ++#endif /* defined(HAVE_WCTYPE_H) && defined (HAVE_MBRTOWC) */ ++ } ++ return FALSE; ++} ++ + const char * + _xdg_mime_magic_lookup_data (XdgMimeMagic *mime_magic, + const void *data, +@@ -708,6 +788,12 @@ _xdg_mime_magic_lookup_data (XdgMimeMagic *mime_magic, + } + } + ++ if (mime_type == NULL) ++ { ++ if(_rox_buffer_looks_like_text(data, len)) ++ mime_type = XDG_MIME_TYPE_UNKNOWN_TEXT; ++ } ++ + return mime_type; + } + diff --git a/rox-base/rox/rox-2.7-r2.ebuild b/rox-base/rox/rox-2.7-r2.ebuild index be597c97edd5..d4e877500f6e 100644 --- a/rox-base/rox/rox-2.7-r2.ebuild +++ b/rox-base/rox/rox-2.7-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/rox-base/rox/rox-2.7-r2.ebuild,v 1.4 2008/01/02 12:44:42 lack Exp $ +# $Header: /var/cvsroot/gentoo-x86/rox-base/rox/rox-2.7-r2.ebuild,v 1.5 2008/01/24 20:08:10 lack Exp $ EAPI=1 inherit eutils multilib @@ -42,6 +42,7 @@ src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${P}-nostrip.patch + epatch "${FILESDIR}"/${P}-text_plain.patch } src_compile() { diff --git a/rox-base/rox/rox-2.7.1.ebuild b/rox-base/rox/rox-2.7.1-r1.ebuild index 0905c634e926..0aa8e2416366 100644 --- a/rox-base/rox/rox-2.7.1.ebuild +++ b/rox-base/rox/rox-2.7.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/rox-base/rox/rox-2.7.1.ebuild,v 1.1 2008/01/23 14:45:26 lack Exp $ +# $Header: /var/cvsroot/gentoo-x86/rox-base/rox/rox-2.7.1-r1.ebuild,v 1.1 2008/01/24 20:08:10 lack Exp $ EAPI=1 inherit eutils multilib @@ -42,6 +42,7 @@ src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${PN}-2.7-nostrip.patch + epatch "${FILESDIR}"/${PN}-2.7-text_plain.patch } src_compile() { diff --git a/rox-base/rox/rox-2.7.ebuild b/rox-base/rox/rox-2.7.ebuild index c38a90f85f49..15cf6daf3fad 100644 --- a/rox-base/rox/rox-2.7.ebuild +++ b/rox-base/rox/rox-2.7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/rox-base/rox/rox-2.7.ebuild,v 1.2 2008/01/02 12:44:42 lack Exp $ +# $Header: /var/cvsroot/gentoo-x86/rox-base/rox/rox-2.7.ebuild,v 1.3 2008/01/24 20:08:10 lack Exp $ inherit eutils multilib @@ -36,6 +36,7 @@ src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${P}-nostrip.patch + epatch "${FILESDIR}"/${P}-text_plain.patch } src_compile() { |