diff options
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/fuse-python/Manifest | 3 | ||||
-rw-r--r-- | sys-fs/fuse-python/files/fuse_python_accept_none.patch | 75 | ||||
-rw-r--r-- | sys-fs/fuse-python/fuse-python-0.2.ebuild | 21 |
3 files changed, 99 insertions, 0 deletions
diff --git a/sys-fs/fuse-python/Manifest b/sys-fs/fuse-python/Manifest new file mode 100644 index 0000000..e5167ad --- /dev/null +++ b/sys-fs/fuse-python/Manifest @@ -0,0 +1,3 @@ +AUX fuse_python_accept_none.patch 2020 RMD160 558d43b4f5e4e8a7b405f42a7845796c37e1e70b SHA1 30421df4771421a996fa2b54296e27a803fc9a00 SHA256 f0837a17a5b31513ddb13a44d37c381279caad0ce28e60e30e8027412a60422d +DIST fuse-python-0.2.tar.gz 53728 RMD160 dfefb8a632b52b104beacc3435f1d7a67e679073 SHA1 f2be16b1b72bedd85a6db2f2aaf22862de903640 SHA256 89f3e9ac096759e10b6292632216c9653d7e35c2c99847267173d94afdf85b92 +EBUILD fuse-python-0.2.ebuild 609 RMD160 42f136beb92627b03c4545e8cae2d38571b4138b SHA1 f0a4c0ca353380e1a1eb42102d8c68c142b68338 SHA256 a4c4d5f36146f0fc115c0c19ff4452a1af027516e801f514b786bd5b8006224a diff --git a/sys-fs/fuse-python/files/fuse_python_accept_none.patch b/sys-fs/fuse-python/files/fuse_python_accept_none.patch new file mode 100644 index 0000000..9f71800 --- /dev/null +++ b/sys-fs/fuse-python/files/fuse_python_accept_none.patch @@ -0,0 +1,75 @@ +--- fuseparts/_fusemodule.c.old 2007-06-18 16:20:09.000000000 +0200 ++++ fuseparts/_fusemodule.c 2008-04-08 01:18:43.000000000 +0200 +@@ -182,8 +182,50 @@ + * the getattr type functions. + */ + +-#define fetchattr_soft_d(st, attr, defa) \ +- fetchattr_soft(st, attr) else st->attr = defa ++// <spaghetti_code> (sorry ...) ++ ++#define good(attr) _GOOD_SPAGHETTI_ ## attr ++#define bad(attr) _BAD_SPAGHETTI_ ## attr ++ ++/* ++ * This macro checks whether an attribute is available and not None. ++ * Success --> set attribute and goto _GOOD_SPAGHETTI ++ * Failure --> goto _BAD_SPAGHETTI ++ * Error --> goto OUT_DECREF ++ */ ++#define fetchattr_soft_none_pre(st, attr) \ ++ if (PyObject_HasAttrString(v, #attr)) { \ ++ if (!(pytmp = PyObject_GetAttrString(v, #attr))) \ ++ goto OUT_DECREF; \ ++ else if (pytmp != Py_None) { \ ++ py2attr(st, attr) \ ++ goto good(attr); \ ++ } \ ++ else { \ ++ Py_DECREF(pytmp); \ ++ goto bad(attr); \ ++ } \ ++ } \ ++ goto bad(attr); ++ ++/** ++ * Calls fetchattr_soft_none_pre and ignores failure. ++ */ ++#define fetchattr_soft_none(st, attr) \ ++ fetchattr_soft_none_pre(st, attr); \ ++ good(attr): ; \ ++ bad(attr): ; ++ ++/** ++ * Calls fetchattr_soft_none_pre and sets a default value on failure. ++ */ ++#define fetchattr_soft_d(st, attr, defa) \ ++ fetchattr_soft_none_pre(st, attr); \ ++ bad(attr): \ ++ st->attr = defa; \ ++ good(attr): ; ++ ++// </spaghetti_code> + + #define FETCH_STAT_DATA() \ + fetchattr(st, st_mode); \ +@@ -206,7 +248,7 @@ + * autotools so we just dare to throw these in as is. \ + */ \ + \ +- fetchattr_soft(st, st_rdev); \ ++ fetchattr_soft_none(st, st_rdev); \ + fetchattr_soft_d(st, st_blksize, 4096); \ + fetchattr_soft_d(st, st_blocks, (st->st_size + 511)/512) + +@@ -245,6 +287,10 @@ + #endif + + #undef fetchattr_soft_d ++#undef fetchattr_soft_none ++#undef fetchattr_soft_none_pre ++#undef good ++#undef bad + #undef FETCH_STAT_DATA + + static int diff --git a/sys-fs/fuse-python/fuse-python-0.2.ebuild b/sys-fs/fuse-python/fuse-python-0.2.ebuild new file mode 100644 index 0000000..b2fd340 --- /dev/null +++ b/sys-fs/fuse-python/fuse-python-0.2.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/fuse-python/fuse-python-0.2_pre2.ebuild,v 1.2 2007/06/27 20:22:55 swegener Exp $ + +inherit eutils distutils + +KEYWORDS="~amd64 ~x86" +DESCRIPTION="Python FUSE bindings" +HOMEPAGE="http://fuse.sourceforge.net/wiki/index.php/FusePython" +SRC_URI="mirror://sourceforge/fuse/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +RDEPEND=">=dev-lang/python-2.3 + >=sys-fs/fuse-2.0" + +src_compile () { + epatch "${FILESDIR}/fuse_python_accept_none.patch" + distutils_src_compile +} |