summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/mtpfs')
-rw-r--r--sys-fs/mtpfs/Manifest2
-rw-r--r--sys-fs/mtpfs/files/mtpfs-1.1-fix-mutex-crash.patch70
-rw-r--r--sys-fs/mtpfs/files/mtpfs-1.1-unitialized-variable.patch12
-rw-r--r--sys-fs/mtpfs/metadata.xml21
-rw-r--r--sys-fs/mtpfs/mtpfs-1.0.ebuild46
-rw-r--r--sys-fs/mtpfs/mtpfs-1.1-r1.ebuild54
-rw-r--r--sys-fs/mtpfs/mtpfs-1.1-r2.ebuild55
-rw-r--r--sys-fs/mtpfs/mtpfs-1.1.ebuild50
8 files changed, 310 insertions, 0 deletions
diff --git a/sys-fs/mtpfs/Manifest b/sys-fs/mtpfs/Manifest
new file mode 100644
index 000000000000..23e56876edc6
--- /dev/null
+++ b/sys-fs/mtpfs/Manifest
@@ -0,0 +1,2 @@
+DIST mtpfs-1.0.tar.gz 104242 SHA256 879ccf929a7ce395af30ae81314850a5cb55a0056107477016121b9392c49c13 SHA512 af3bd067410f51bf76619a5d98a23c2a5755d2f5e2764221af145a463ab1b819332b00e358887488f2e26e29c91dcabceedf5f8637d97a9b2ba06b91281a6a4d WHIRLPOOL 074effa8933a26cf6a98af92c7629833cd0a831baae3fb3c296eda62b22477df9d43404b2452644e83ae0902e427717854ec9c4cd5fa1c9705d83b82471f3476
+DIST mtpfs-1.1.tar.gz 108329 SHA256 1baf357de16995a5f0b5bc1b6833517a77456481d861cdba70f1ce1316ce4c1d SHA512 627f1a5efa024276f58857e0cb2a2b3057ab9ba6c26d8dcba9de066f4c0efc56a5c991e000e67763b874ee9feb1d9a1e176872b56dd13b146823e8724f2052c8 WHIRLPOOL 891b84f52cbb1ab19f25a45ac73253b0fd1c0f3340d5989eca7cc33ac04c964e3a21062969e9995f90bd0b3b82ebe819854c5de2a729a3efe95d06da1d094d7b
diff --git a/sys-fs/mtpfs/files/mtpfs-1.1-fix-mutex-crash.patch b/sys-fs/mtpfs/files/mtpfs-1.1-fix-mutex-crash.patch
new file mode 100644
index 000000000000..b344fc44bc1e
--- /dev/null
+++ b/sys-fs/mtpfs/files/mtpfs-1.1-fix-mutex-crash.patch
@@ -0,0 +1,70 @@
+commit c30d53648a713a3f7f7711f081732aa814c6e74d
+Author: Sergei Trofimovich <siarheit@google.com>
+Date: Sat May 30 23:20:42 2015 +0100
+
+ mtpfs.c: remove all unlocking calls from mtpfs_getattr_real
+
+ Lock is already acquired/freed in the caller function 'mtpfs_getattr'.
+ Noticed when trying to use mtpfs today :)
+
+ Should also fix the same issue https://github.com/cjd/mtpfs/issues/1
+ as I get the same backtrace.
+
+ Signed-off-by: Sergei Trofimovich <siarheit@google.com>
+
+diff --git a/mtpfs.c b/mtpfs.c
+index e5e1b03..553d282 100644
+--- a/mtpfs.c
++++ b/mtpfs.c
+@@ -776,5 +776,5 @@ mtpfs_getattr_real (const gchar * path, struct stat *stbuf)
+ {
+ int ret = 0;
+- if (path==NULL) return_unlock(-ENOENT);
++ if (path==NULL) return -ENOENT;
+ memset (stbuf, 0, sizeof (struct stat));
+
+@@ -787,5 +787,5 @@ mtpfs_getattr_real (const gchar * path, struct stat *stbuf)
+ stbuf->st_mode = S_IFDIR | 0777;
+ stbuf->st_nlink = 2;
+- return_unlock(0);
++ return 0;
+ }
+
+@@ -799,5 +799,5 @@ mtpfs_getattr_real (const gchar * path, struct stat *stbuf)
+ stbuf->st_blocks = 2;
+ stbuf->st_mtime = time(NULL);
+- return_unlock(0);
++ return 0;
+ }
+ }
+@@ -808,5 +808,5 @@ mtpfs_getattr_real (const gchar * path, struct stat *stbuf)
+ stbuf->st_mode = S_IFDIR | 0777;
+ stbuf->st_nlink = 2;
+- return_unlock(0);
++ return 0;
+ }
+
+@@ -843,9 +843,9 @@ mtpfs_getattr_real (const gchar * path, struct stat *stbuf)
+ stbuf->st_blocks = 2;
+ stbuf->st_mtime = time(NULL);
+- return_unlock(0);
++ return 0;
+ }
+ playlist = playlist->next;
+ }
+- return_unlock(-ENOENT);
++ return -ENOENT;
+ }
+
+@@ -864,9 +864,9 @@ mtpfs_getattr_real (const gchar * path, struct stat *stbuf)
+ stbuf->st_mode = S_IFREG | 0777;
+ stbuf->st_mtime = file->modificationdate;
+- return_unlock(0);
++ return 0;
+ }
+ }
+
+- return_unlock(-ENOENT);
++ return -ENOENT;
+ }
+
diff --git a/sys-fs/mtpfs/files/mtpfs-1.1-unitialized-variable.patch b/sys-fs/mtpfs/files/mtpfs-1.1-unitialized-variable.patch
new file mode 100644
index 000000000000..fb49624515b8
--- /dev/null
+++ b/sys-fs/mtpfs/files/mtpfs-1.1-unitialized-variable.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/556690
+--- mtpfs.c.old 2015-08-04 21:56:13.080712801 +0200
++++ mtpfs.c 2015-08-04 21:20:54.822965092 +0200
+@@ -1324,7 +1324,7 @@ main (int argc, char *argv[])
+ LIBMTP_raw_device_t * rawdevices;
+ int numrawdevices;
+ LIBMTP_error_number_t err;
+- int i;
++ int i = 0;
+
+ int opt;
+ extern int optind;
diff --git a/sys-fs/mtpfs/metadata.xml b/sys-fs/mtpfs/metadata.xml
new file mode 100644
index 000000000000..086187b8c231
--- /dev/null
+++ b/sys-fs/mtpfs/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <maintainer>
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+
+ <longdescription>
+ MTPfs is a FUSE filesystem that supports reading and writing from any
+ MTP device, as supported by libmtp. MTPfs includes extra features such
+ as playlist and meta information support for MP3 players.
+ </longdescription>
+ <use>
+ <flag name='mad'>Enable handling of MP3's metadata</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-fs/mtpfs/mtpfs-1.0.ebuild b/sys-fs/mtpfs/mtpfs-1.0.ebuild
new file mode 100644
index 000000000000..9d206f9a332c
--- /dev/null
+++ b/sys-fs/mtpfs/mtpfs-1.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A FUSE filesystem providing access to MTP devices"
+HOMEPAGE="http://www.adebenham.com/mtpfs/"
+SRC_URI="http://www.adebenham.com/debian/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+DEPEND="dev-libs/glib:2
+ media-libs/libid3tag
+ media-libs/libmad
+ media-libs/libmtp
+ sys-fs/fuse"
+RDEPEND="${DEPEND}"
+
+DOCS=(AUTHORS NEWS README)
+
+src_prepare() {
+ sed -e "/#include <string.h>/ a\
+ #include <stdlib.h>" -i mtpfs.h id3read.c || die #implicit
+}
+
+src_configure() {
+ econf $(use_enable debug)
+}
+
+pkg_postinst() {
+ einfo "To mount your MTP device, issue:"
+ einfo " /usr/bin/mtpfs <mountpoint>"
+ echo
+ einfo "To unmount your MTP device, issue:"
+ einfo " /usr/bin/fusermount -u <mountpoint>"
+
+ if use debug; then
+ echo
+ einfo "You have enabled debugging output."
+ einfo "Please make sure you run mtpfs with the -d flag."
+ fi
+}
diff --git a/sys-fs/mtpfs/mtpfs-1.1-r1.ebuild b/sys-fs/mtpfs/mtpfs-1.1-r1.ebuild
new file mode 100644
index 000000000000..ceaa24f3e521
--- /dev/null
+++ b/sys-fs/mtpfs/mtpfs-1.1-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A FUSE filesystem providing access to MTP devices"
+HOMEPAGE="http://www.adebenham.com/mtpfs/"
+SRC_URI="http://www.adebenham.com/files/mtp/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug mad"
+
+RDEPEND="dev-libs/glib:2
+ >=media-libs/libmtp-1.1.2
+ sys-fs/fuse
+ mad? (
+ media-libs/libid3tag
+ media-libs/libmad
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=(AUTHORS NEWS README)
+
+src_prepare() {
+ sed -e "/#include <string.h>/ a\
+ #include <stdlib.h>" -i mtpfs.h id3read.c || die #implicit
+
+ epatch "${FILESDIR}"/${P}-fix-mutex-crash.patch
+}
+
+src_configure() {
+ econf $(use_enable debug) \
+ $(use_enable mad)
+}
+
+pkg_postinst() {
+ einfo "To mount your MTP device, issue:"
+ einfo " /usr/bin/mtpfs <mountpoint>"
+ echo
+ einfo "To unmount your MTP device, issue:"
+ einfo " /usr/bin/fusermount -u <mountpoint>"
+
+ if use debug; then
+ echo
+ einfo "You have enabled debugging output."
+ einfo "Please make sure you run mtpfs with the -d flag."
+ fi
+}
diff --git a/sys-fs/mtpfs/mtpfs-1.1-r2.ebuild b/sys-fs/mtpfs/mtpfs-1.1-r2.ebuild
new file mode 100644
index 000000000000..e15536c203db
--- /dev/null
+++ b/sys-fs/mtpfs/mtpfs-1.1-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A FUSE filesystem providing access to MTP devices"
+HOMEPAGE="http://www.adebenham.com/mtpfs/"
+SRC_URI="http://www.adebenham.com/files/mtp/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug mad"
+
+RDEPEND="dev-libs/glib:2
+ >=media-libs/libmtp-1.1.2
+ sys-fs/fuse
+ mad? (
+ media-libs/libid3tag
+ media-libs/libmad
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=(AUTHORS NEWS README)
+
+src_prepare() {
+ sed -e "/#include <string.h>/ a\
+ #include <stdlib.h>" -i mtpfs.h id3read.c || die #implicit
+
+ epatch "${FILESDIR}"/${P}-fix-mutex-crash.patch
+ epatch "${FILESDIR}"/${P}-unitialized-variable.patch
+}
+
+src_configure() {
+ econf $(use_enable debug) \
+ $(use_enable mad)
+}
+
+pkg_postinst() {
+ einfo "To mount your MTP device, issue:"
+ einfo " /usr/bin/mtpfs <mountpoint>"
+ echo
+ einfo "To unmount your MTP device, issue:"
+ einfo " /usr/bin/fusermount -u <mountpoint>"
+
+ if use debug; then
+ echo
+ einfo "You have enabled debugging output."
+ einfo "Please make sure you run mtpfs with the -d flag."
+ fi
+}
diff --git a/sys-fs/mtpfs/mtpfs-1.1.ebuild b/sys-fs/mtpfs/mtpfs-1.1.ebuild
new file mode 100644
index 000000000000..3ed46ff9da61
--- /dev/null
+++ b/sys-fs/mtpfs/mtpfs-1.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A FUSE filesystem providing access to MTP devices"
+HOMEPAGE="http://www.adebenham.com/mtpfs/"
+SRC_URI="http://www.adebenham.com/files/mtp/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug mad"
+
+RDEPEND="dev-libs/glib:2
+ >=media-libs/libmtp-1.1.2
+ sys-fs/fuse
+ mad? (
+ media-libs/libid3tag
+ media-libs/libmad
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=(AUTHORS NEWS README)
+
+src_prepare() {
+ sed -e "/#include <string.h>/ a\
+ #include <stdlib.h>" -i mtpfs.h id3read.c || die #implicit
+}
+
+src_configure() {
+ econf $(use_enable debug) \
+ $(use_enable mad)
+}
+
+pkg_postinst() {
+ einfo "To mount your MTP device, issue:"
+ einfo " /usr/bin/mtpfs <mountpoint>"
+ echo
+ einfo "To unmount your MTP device, issue:"
+ einfo " /usr/bin/fusermount -u <mountpoint>"
+
+ if use debug; then
+ echo
+ einfo "You have enabled debugging output."
+ einfo "Please make sure you run mtpfs with the -d flag."
+ fi
+}