Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FL-127, decrease udisks version, gvfs fork
- Loading branch information
Oleg Vinichenko
committed
Oct 3, 2012
1 parent
994a5a3
commit 7e6e97d
Showing
5 changed files
with
339 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
From 259a09183f7c96b5fb0f6453bb4b0bcf92e3eaa2 Mon Sep 17 00:00:00 2001 | ||
From: Cosimo Cecchi <cosimoc@gnome.org> | ||
Date: Wed, 8 Aug 2012 13:14:19 +0200 | ||
Subject: [PATCH] gphoto: build with libgphoto 2.5 API | ||
|
||
Patch taken from the Fedora package | ||
Author: Jindrich Novy <jnovy@redhat.com> | ||
|
||
http://pkgs.fedoraproject.org/cgit/gvfs.git/commit/?id=cd0c6218df85bf3de101402c1aa9d79aae7c3019 | ||
--- | ||
configure.ac | 3 +++ | ||
daemon/gvfsbackendgphoto2.c | 12 +++++++++++- | ||
2 files changed, 14 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/configure.ac b/configure.ac | ||
index 3215694..3280666 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -436,6 +436,9 @@ if test "x$enable_gphoto2" != "xno" -a \( "x$msg_hal" = "xyes" -o "x$msg_gudev" | ||
if test "x$msg_gphoto2" = "xyes"; then | ||
if test "x$use_gphoto2" = "xyes"; then | ||
AC_DEFINE(HAVE_GPHOTO2, 1, [Define to 1 if gphoto2 is available]) | ||
+ PKG_CHECK_MODULES(GPHOTO2, libgphoto2 >= 2.5.0, | ||
+ AC_DEFINE(HAVE_GPHOTO25, 1, [Define to 1 if libgphoto2 2.5 is available]) | ||
+ ) | ||
else | ||
if test "x$enable_gphoto2" = "xyes"; then | ||
AC_MSG_ERROR([Cannot build with gphoto2 support. Need OS tweaks in hal volume monitor.]) | ||
diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c | ||
index 0d2c594..75b4b02 100644 | ||
--- a/daemon/gvfsbackendgphoto2.c | ||
+++ b/daemon/gvfsbackendgphoto2.c | ||
@@ -1647,7 +1647,9 @@ do_mount (GVfsBackend *backend, | ||
return; | ||
} | ||
|
||
+#ifndef HAVE_GPHOTO25 | ||
DEBUG (" '%s' '%s' '%s'", info.name, info.path, info.library_filename); | ||
+#endif | ||
|
||
/* set port */ | ||
rc = gp_camera_set_port_info (gphoto2_backend->camera, info); | ||
@@ -2590,7 +2592,11 @@ do_slow_file_rename_in_same_dir (GVfsBackendGphoto2 *gphoto2_backend, | ||
} | ||
} | ||
|
||
+#ifdef HAVE_GPHOTO25 | ||
+ rc = gp_camera_folder_put_file (gphoto2_backend->camera, dir, new_name, GP_FILE_TYPE_NORMAL, file_dest, gphoto2_backend->context); | ||
+#else | ||
rc = gp_camera_folder_put_file (gphoto2_backend->camera, dir, file_dest, gphoto2_backend->context); | ||
+#endif | ||
if (rc != 0) | ||
goto out; | ||
|
||
@@ -3222,14 +3228,18 @@ commit_write_handle (GVfsBackendGphoto2 *gphoto2_backend, WriteHandle *write_han | ||
if (rc != 0) | ||
goto out; | ||
|
||
- gp_file_set_type (file, GP_FILE_TYPE_NORMAL); | ||
gp_file_set_name (file, write_handle->name); | ||
gp_file_set_mtime (file, time (NULL)); | ||
gp_file_set_data_and_size (file, | ||
dup_for_gphoto2 (write_handle->data, write_handle->size), | ||
write_handle->size); | ||
|
||
+#ifdef HAVE_GPHOTO25 | ||
+ rc = gp_camera_folder_put_file (gphoto2_backend->camera, write_handle->dir, write_handle->name, GP_FILE_TYPE_NORMAL, file, gphoto2_backend->context); | ||
+#else | ||
+ gp_file_set_type (file, GP_FILE_TYPE_NORMAL); | ||
rc = gp_camera_folder_put_file (gphoto2_backend->camera, write_handle->dir, file, gphoto2_backend->context); | ||
+#endif | ||
if (rc != 0) | ||
{ | ||
gp_file_unref (file); | ||
-- | ||
1.7.12 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From ef1578c9fef421a22c030d728fb5ef77bb7b86f6 Mon Sep 17 00:00:00 2001 | ||
From: Dominique Leuenberger <dimstar@opensuse.org> | ||
Date: Wed, 8 Aug 2012 15:11:24 +0200 | ||
Subject: [PATCH] gphoto: support 2.5, but do not require it. | ||
|
||
Using GPHOTO2 for a 2nd PKG_CHECK_MODULE does not give the expected | ||
result, as the flag 'FOUND' is already set and the higher version | ||
requirement will not be honored. | ||
|
||
https://bugzilla.gnome.org/show_bug.cgi?id=681448 | ||
--- | ||
configure.ac | 5 +++-- | ||
1 file changed, 3 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/configure.ac b/configure.ac | ||
index c32d425..6ffe06d 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -436,8 +436,9 @@ if test "x$enable_gphoto2" != "xno" -a \( "x$msg_hal" = "xyes" -o "x$msg_gudev" | ||
if test "x$msg_gphoto2" = "xyes"; then | ||
if test "x$use_gphoto2" = "xyes"; then | ||
AC_DEFINE(HAVE_GPHOTO2, 1, [Define to 1 if gphoto2 is available]) | ||
- PKG_CHECK_MODULES(GPHOTO2, libgphoto2 >= 2.5.0, | ||
- AC_DEFINE(HAVE_GPHOTO25, 1, [Define to 1 if libgphoto2 2.5 is available]) | ||
+ PKG_CHECK_MODULES(GPHOTO25, libgphoto2 >= 2.5.0, | ||
+ AC_DEFINE(HAVE_GPHOTO25, 1, [Define to 1 if libgphoto2 2.5 is available]), | ||
+ [] | ||
) | ||
else | ||
if test "x$enable_gphoto2" = "xyes"; then | ||
-- | ||
1.7.12 | ||
|
48 changes: 48 additions & 0 deletions
48
gnome-base/gvfs/files/gvfs-1.12.3-gphoto2-stricter-checks.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
From 7d0127ee181c0b282b8f99f461d26fce1c3a27b0 Mon Sep 17 00:00:00 2001 | ||
From: Arun Raghavan <arun@accosted.net> | ||
Date: Mon, 30 Apr 2012 11:15:49 +0100 | ||
Subject: [PATCH] build: Bail if gphoto support is requested but not available | ||
|
||
https://bugzilla.gnome.org/show_bug.cgi?id=578027 | ||
--- | ||
configure.ac | 13 ++++++++++--- | ||
1 file changed, 10 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/configure.ac b/configure.ac | ||
index e55ab58..91621a9 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -402,7 +402,7 @@ GPHOTO2_LIBS= | ||
GPHOTO2_CFLAGS= | ||
|
||
if test "x$enable_gphoto2" != "xno" -a \( "x$msg_hal" = "xyes" -o "x$msg_gudev" = "xyes" \); then | ||
- PKG_CHECK_EXISTS(libgphoto2, msg_gphoto2=yes) | ||
+ PKG_CHECK_MODULES(GPHOTO2, libgphoto2 >= 2.4.0, [msg_gphoto2=yes]) | ||
|
||
# Need OS tweaks in hal volume monitor backend | ||
case "$host" in | ||
@@ -414,12 +414,19 @@ if test "x$enable_gphoto2" != "xno" -a \( "x$msg_hal" = "xyes" -o "x$msg_gudev" | ||
;; | ||
esac | ||
|
||
+ if test "x$enable_gphoto2" = "xyes" -a "x$msg_gphoto2" != "xyes"; then | ||
+ AC_MSG_ERROR([gphoto2 support requested but not available]) | ||
+ fi | ||
+ | ||
if test "x$msg_gphoto2" = "xyes"; then | ||
if test "x$use_gphoto2" = "xyes"; then | ||
- PKG_CHECK_MODULES(GPHOTO2, libgphoto2 >= 2.4.0) | ||
AC_DEFINE(HAVE_GPHOTO2, 1, [Define to 1 if gphoto2 is available]) | ||
else | ||
- AC_MSG_WARN([Not building with gphoto2 support. Need OS tweaks in hal volume monitor.]) | ||
+ if test "x$enable_gphoto2" = "xyes"; then | ||
+ AC_MSG_ERROR([Cannot build with gphoto2 support. Need OS tweaks in hal volume monitor.]) | ||
+ else | ||
+ AC_MSG_WARN([Not building with gphoto2 support. Need OS tweaks in hal volume monitor.]) | ||
+ fi | ||
msg_gphoto2=no | ||
fi | ||
fi | ||
-- | ||
1.7.12 | ||
|
56 changes: 56 additions & 0 deletions
56
gnome-base/gvfs/files/gvfs-1.2.2-expose-archive-backend.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Upstream bug: http://bugzilla.gnome.org/show_bug.cgi?id=567235 (Fedora) | ||
Our bug: http://bugs.gentoo.org/show_bug.cgi?id=249829 | ||
---- | ||
Index: mount-archive.desktop.in.in | ||
=================================================================== | ||
--- mount-archive.desktop.in.in (revision 0) | ||
+++ mount-archive.desktop.in.in (revision 0) | ||
@@ -0,0 +1,14 @@ | ||
+[Desktop Entry] | ||
+Encoding=UTF-8 | ||
+_Name=Archive Mounter | ||
+Exec=@libexecdir@/gvfsd-archive file=%u | ||
+X-Gnome-Vfs-System=gio | ||
+MimeType=application/x-cd-image;application/x-bzip-compressed-tar;application/x-compressed-tar;application/x-tar;application/x-cpio;application/x-zip;application/zip;application/x-lzma-compressed-tar; | ||
+Terminal=false | ||
+StartupNotify=false | ||
+Type=Application | ||
+NoDisplay=true | ||
+X-GNOME-Bugzilla-Bugzilla=GNOME | ||
+X-GNOME-Bugzilla-Product=gvfs | ||
+X-GNOME-Bugzilla-Component=archive-backend | ||
+X-GNOME-Bugzilla-Version=@VERSION@ | ||
Index: Makefile.am | ||
=================================================================== | ||
--- Makefile.am.orig 2008-07-22 15:35:49.000000000 +0200 | ||
+++ Makefile.am 2008-07-22 17:56:59.417180064 +0200 | ||
@@ -1,5 +1,20 @@ | ||
NULL = | ||
|
||
+@INTLTOOL_DESKTOP_RULE@ | ||
+ | ||
+desktop_in_files = mount-archive.desktop.in | ||
+ | ||
+mount-archive.desktop.in: mount-archive.desktop.in.in | ||
+ sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ | ||
+ | ||
+desktopdir = $(datadir)/applications | ||
+if HAVE_ARCHIVE | ||
+desktop_DATA = mount-archive.desktop | ||
+else | ||
+desktop_DATA = | ||
+endif | ||
+ | ||
+ | ||
SUBDIRS = \ | ||
common \ | ||
client \ | ||
@@ -15,6 +30,8 @@ | ||
|
||
EXTRA_DIST = \ | ||
MAINTAINERS \ | ||
+ mount-archive.desktop.in.in \ | ||
+ $(desktop_in_files) \ | ||
$(NULL) | ||
|
||
DISTCLEANFILES = \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# Copyright 1999-2012 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Header: /var/cvsroot/gentoo-x86/gnome-base/gvfs/gvfs-1.12.3-r1.ebuild,v 1.1 2012/09/26 10:54:41 ssuominen Exp $ | ||
|
||
EAPI=4 | ||
GCONF_DEBUG=no | ||
GNOME2_LA_PUNT=yes | ||
|
||
inherit autotools bash-completion-r1 eutils gnome2 | ||
|
||
[[ ${PV} = 9999 ]] && inherit gnome2-live | ||
|
||
DESCRIPTION="GNOME Virtual Filesystem Layer" | ||
HOMEPAGE="http://www.gnome.org" | ||
|
||
LICENSE="LGPL-2+" | ||
SLOT="0" | ||
|
||
if [[ ${PV} = 9999 ]]; then | ||
KEYWORDS="" | ||
DOCS="" | ||
else | ||
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris" | ||
DOCS="AUTHORS ChangeLog NEWS MAINTAINERS README TODO" # ChangeLog.pre-1.2 README.commits | ||
fi | ||
|
||
SRC_URI="${SRC_URI} | ||
http://dev.gentoo.org/~tetromino/distfiles/aclocal/libgcrypt.m4.bz2" | ||
|
||
IUSE="afp archive avahi bluetooth bluray cdda doc fuse gdu gnome-keyring gphoto2 +http ios samba +udev udisks" | ||
|
||
RDEPEND=">=dev-libs/glib-2.31.0:2 | ||
sys-apps/dbus | ||
dev-libs/libxml2 | ||
net-misc/openssh | ||
afp? ( >=dev-libs/libgcrypt-1.2.2 ) | ||
archive? ( app-arch/libarchive ) | ||
avahi? ( >=net-dns/avahi-0.6 ) | ||
bluetooth? ( | ||
>=app-mobilephone/obex-data-server-0.4.5 | ||
dev-libs/dbus-glib | ||
net-wireless/bluez | ||
dev-libs/expat ) | ||
bluray? ( media-libs/libbluray ) | ||
fuse? ( >=sys-fs/fuse-2.8.0 ) | ||
gdu? ( || ( | ||
>=gnome-base/libgdu-3.0.2 | ||
=sys-apps/gnome-disk-utility-3.0.2-r300 | ||
=sys-apps/gnome-disk-utility-3.0.2-r200 ) ) | ||
gnome-keyring? ( >=gnome-base/gnome-keyring-1.0 ) | ||
gphoto2? ( >=media-libs/libgphoto2-2.4.7 ) | ||
ios? ( | ||
>=app-pda/libimobiledevice-1.1.0 | ||
>=app-pda/libplist-1 ) | ||
udev? ( | ||
cdda? ( >=dev-libs/libcdio-0.78.2[-minimal] ) | ||
|| ( >=sys-fs/udev-171[gudev] >=sys-fs/udev-164-r2[extras] ) ) | ||
udisks? ( =sys-fs/udisks-1.0.4-r2 ) | ||
http? ( >=net-libs/libsoup-gnome-2.26.0 ) | ||
samba? ( >=net-fs/samba-3.4.6[smbclient] )" | ||
DEPEND="${RDEPEND} | ||
>=dev-util/intltool-0.40 | ||
virtual/pkgconfig | ||
dev-util/gtk-doc-am | ||
doc? ( >=dev-util/gtk-doc-1 )" | ||
|
||
REQUIRED_USE="cdda? ( udev )" | ||
|
||
pkg_setup() { | ||
G2CONF="${G2CONF} | ||
--disable-bash-completion | ||
--disable-hal | ||
--disable-schemas-compile | ||
--with-dbus-service-dir="${EPREFIX}"/usr/share/dbus-1/services | ||
$(use_enable afp) | ||
$(use_enable archive) | ||
$(use_enable avahi) | ||
$(use_enable bluetooth obexftp) | ||
$(use_enable bluray) | ||
$(use_enable cdda) | ||
$(use_enable fuse) | ||
$(use_enable gdu) | ||
$(use_enable gphoto2) | ||
$(use_enable ios afc) | ||
$(use_enable udev) | ||
$(use_enable udev gudev) | ||
$(use_enable http) | ||
$(use_enable gnome-keyring keyring) | ||
$(use_enable samba) | ||
$(use_enable udisks)" | ||
} | ||
|
||
src_prepare() { | ||
# Conditional patching purely to avoid eautoreconf | ||
if use gphoto2; then | ||
epatch "${FILESDIR}"/${PN}-1.12.3-gphoto2-stricter-checks.patch | ||
epatch "${FILESDIR}"/${PN}-1.12.3-gphoto2-2.5-{1,2}.patch | ||
fi | ||
|
||
if use archive; then | ||
epatch "${FILESDIR}"/${PN}-1.2.2-expose-archive-backend.patch | ||
echo mount-archive.desktop.in >> po/POTFILES.in | ||
echo mount-archive.desktop.in.in >> po/POTFILES.in | ||
fi | ||
|
||
if ! use udev; then | ||
sed -i -e 's/gvfsd-burn/ /' daemon/Makefile.am || die | ||
sed -i -e 's/burn.mount.in/ /' daemon/Makefile.am || die | ||
sed -i -e 's/burn.mount/ /' daemon/Makefile.am || die | ||
fi | ||
|
||
if use gphoto2 || use archive || ! use udev; then | ||
# libgcrypt.m4 needed for eautoreconf, bug #399043 | ||
mv "${WORKDIR}/libgcrypt.m4" "${S}"/ || die | ||
|
||
AT_M4DIR=. eautoreconf | ||
fi | ||
|
||
gnome2_src_prepare | ||
} | ||
|
||
src_install() { | ||
gnome2_src_install | ||
newbashcomp programs/gvfs-bash-completion.sh ${PN} | ||
} |