[nautilus-actions/file-manager-actions] Review the file-managers targeting
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions/file-manager-actions] Review the file-managers targeting
- Date: Wed, 9 Sep 2015 11:26:22 +0000 (UTC)
commit 888d10a1da4351cf06b1fd994d6eb09a32a5ce7c
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Sep 9 13:23:56 2015 +0200
Review the file-managers targeting
Now generate the plugins for every found file manager, unless explicitely disabled.
m4/fma-file-manager.m4 | 132 +++++++++-------------
m4/{na-nautilus-extdir.m4 => fma-fm-nautilus.m4} | 58 ++++++----
m4/fma-fm-nemo.m4 | 79 +++++++++++++
maintainer/run-autogen.sh | 1 -
na_required_versions | 7 +-
5 files changed, 174 insertions(+), 103 deletions(-)
---
diff --git a/m4/fma-file-manager.m4 b/m4/fma-file-manager.m4
index 78f968b..06a3531 100644
--- a/m4/fma-file-manager.m4
+++ b/m4/fma-file-manager.m4
@@ -27,98 +27,70 @@
# serial 3 renamed as FMA_TARGET_FILE_MANAGER
-# target file manager: nautilus
-# when working in a test environment, nautilus extensions are typically
-# installed in a non-standard location; lets specify this location here
-# --with-nautilus-extdir=<dir>
+dnl Usage: FMA_TARGET_FILE_MANAGER
+dnl Object: choose the target file-manager
+dnl Principe: FileManager-Actions plugins must be compiled for targeting
+dnl a specific file manager because each file manager has its own set
+dnl of extensions.
+dnl The macro examines the available installed packages, and compiles
+dnl our plugins for every suitable found API.
+dnl Each file manager may also have specific extensions with may be
+dnl configured via relative macros.
+dnl
+AC_DEFUN([FMA_TARGET_FILE_MANAGER],[
-AC_DEFUN([_AC_FMA_FILE_MANAGER_NAUTILUS],[
+ let fma_fm_count=0
- AC_MSG_NOTICE([targeting Nautilus file-manager])
+ AC_REQUIRE([_AC_FMA_WITH_NAUTILUS])
+ AC_REQUIRE([_AC_FMA_WITH_NEMO])
- if test "${with_nautilus_extdir}" = ""; then
- if test "{PKG_CONFIG}" != ""; then
- with_nautilus_extdir=`${PKG_CONFIG} --variable=extensiondir libnautilus-extension`
- fi
+ if test ${fma_fm_count} -eq 0; then
+ _FMA_CHECK_MODULE_MSG([yes],[No suitable target file manager found])
fi
- if test "${with_nautilus_extdir}" = ""; then
- AC_MSG_ERROR([Unable to determine nautilus extension folder, please use
--with-nautilus-extdir option])
- else
- AC_MSG_NOTICE([installing plugins in ${with_nautilus_extdir}])
- AC_SUBST([NAUTILUS_EXTENSIONS_DIR],[${with_nautilus_extdir}])
- AC_DEFINE_UNQUOTED([NA_NAUTILUS_EXTENSIONS_DIR],[${with_nautilus_extdir}],[Nautilus
extensions directory])
- fi
-
- FMA_CHECK_MODULE([NAUTILUS_EXTENSION],[libnautilus-extension],[${nautilus_required}])
-
- # Check for menu update function
- AC_CHECK_LIB([nautilus-extension],[nautilus_menu_item_new])
- AC_CHECK_FUNCS([nautilus_menu_provider_emit_items_updated_signal])
-
- # starting with 2.91.90, Nautilus no more allows extensions to
- # add toolbar items
- AC_CHECK_FUNCS([nautilus_menu_provider_get_toolbar_items])
])
-# target file manager: nemo
-# when working in a test environment, nemo extensions are typically
-# installed in a non-standard location; lets specify this location here
-# --with-nemo-extdir=<dir>
-
-AC_DEFUN([_AC_FMA_FILE_MANAGER_NEMO],[
-
- AC_MSG_NOTICE([targeting Nemo file-manager])
-
- if test "${with_nemo_extdir}" = ""; then
- if test "{PKG_CONFIG}" != ""; then
- with_nemo_extdir=`${PKG_CONFIG} --variable=extensiondir libnemo-extension`
- fi
+# targeting file manager: nautilus
+# user may specify --with[out]-nautilus; default is to rely on the
+# availability of the extensions libraries/apis
+# requires: nautilus-devel be installed
+# supplementary options: --with-nautilus-extdir
+AC_DEFUN([_AC_FMA_WITH_NAUTILUS],[
+
+ AC_ARG_WITH([nautilus],
+ [AS_HELP_STRING([--with-nautilus],
+ [compile plugins for Nautilus @<:@default=auto@:>@])],
+ [],
+ [with_nautilus=auto])
+
+ AS_IF([test "$with_nautilus" != "no"],[FMA_CHECK_FOR_NAUTILUS])
+
+ dnl AS_ECHO([with_nautilus_ok=${with_nautilus_ok}])
+ if test "${with_nautilus_ok}" = "yes"; then
+ let fma_fm_count+=1
+ dnl AS_ECHO([fma_fm_count=${fma_fm_count}])
fi
- if test "${with_nemo_extdir}" = ""; then
- AC_MSG_ERROR([Unable to determine nemo extension folder, please use --with-nemo-extdir
option])
- else
- AC_MSG_NOTICE([installing plugins in ${with_nemo_extdir}])
- AC_SUBST([NEMO_EXTENSIONS_DIR],[${with_nemo_extdir}])
- AC_DEFINE_UNQUOTED([NA_NEMO_EXTENSIONS_DIR],[${with_nemo_extdir}],[Nemo extensions directory])
- fi
-
- FMA_CHECK_MODULE([NEMO_EXTENSION],[libnemo-extension],[${nemo_required}])
- # Check for menu update function
- AC_CHECK_LIB([nemo-extension],[nemo_menu_item_new])
- AC_CHECK_FUNCS([nemo_menu_provider_emit_items_updated_signal])
+ AM_CONDITIONAL([HAVE_NAUTILUS], [test "${with_nautilus_ok}" = "yes"])
])
-dnl defaults to nautilus
-dnl manages nemo
-dnl
-AC_DEFUN([FMA_TARGET_FILE_MANAGER],[
+# targeting file manager: nemo
+# user may specify --with[out]-nemo; default is to rely on the
+# availability of the extensions libraries/apis
+# requires: nemo-devel be installed
+# supplementary options: --with-nemo-extdir
+AC_DEFUN([_AC_FMA_WITH_NEMO],[
- AC_ARG_ENABLE([file-manager],
- AC_HELP_STRING(
- [--enable-file-manager=@<:@nautilus|nemo@:>@],
- [the targeted file manager @<:@nautilus@:>@]),
- [enable_file_manager=$enableval],
- [enable_file_manager="nautilus"])
+ AC_ARG_WITH([nemo],
+ [AS_HELP_STRING([--with-nemo],
+ [compile plugins for Nemo @<:@default=auto@:>@])],
+ [],
+ [with_nemo=auto])
- AC_ARG_WITH(
- [nautilus-extdir],
- AC_HELP_STRING(
- [--with-nautilus-extdir=DIR],
- [nautilus plugins extension directory @<:@auto@:>@]),
- [with_nautilus_extdir=$withval],
- [with_nautilus_extdir=""])
+ AS_IF([test "$with_nemo" != "no"],[FMA_CHECK_FOR_NEMO])
- AC_ARG_WITH(
- [nemo-extdir],
- AC_HELP_STRING(
- [--with-nemo-extdir=DIR],
- [nemo plugins extension directory @<:@auto@:>@]),
- [with_nemo_extdir=$withval],
- [with_nemo_extdir=""])
+ if test "${with_nemo_ok}" = "yes"; then
+ let fma_fm_count+=1
+ fi
- AS_IF(
- [test "${enable_file_manager}" = "nautilus"],[_AC_FMA_FILE_MANAGER_NAUTILUS()],
- [test "${enable_file_manager}" = "nemo"],[_AC_FMA_FILE_MANAGER_NEMO()],
- [AC_MSG_NOTICE([no target file-manager specified])])
+ AM_CONDITIONAL([HAVE_NEMO], [test "${with_nemo_ok}" = "yes"])
])
diff --git a/m4/na-nautilus-extdir.m4 b/m4/fma-fm-nautilus.m4
similarity index 50%
rename from m4/na-nautilus-extdir.m4
rename to m4/fma-fm-nautilus.m4
index d4fede2..06e996e 100644
--- a/m4/na-nautilus-extdir.m4
+++ b/m4/fma-fm-nautilus.m4
@@ -25,36 +25,54 @@
# Pierre Wieser <pwieser trychlos org>
# ... and many others (see AUTHORS)
-# serial 2 change NACT_ prefix to NA_ (FileManager-Actions)
+# serial 3 introduce FMA_CHECK_FOR_NAUTILUS
-# let the user specify an alternate nautilus-extension dir
-# --with-nautilus-extdir=<dir>
-
-AC_DEFUN([NA_NAUTILUS_EXTDIR],[
- AC_REQUIRE([_AC_ARG_NA_NAUTILUS_EXTDIR])dnl
- AC_REQUIRE([_AC_NA_CHECK_NAUTILUS_EXTDIR])dnl
+dnl Usage: FMA_CHECK_FOR_NAUTILUS
+dnl Decription: Whether the user has specified '--with-nautilus' or does
+dnl not have specified anything (while he does not have specified
+dnl --without-nautilus), we are checking here if Nautilus is a suitable
+dnl target file manager.
+dnl This requires that the extensions library be installed, and that
+dnl the extensions directory be defined.
+dnl
+AC_DEFUN([FMA_CHECK_FOR_NAUTILUS],[
+ with_nautilus_ok="no"
+ AC_REQUIRE([_FMA_NAUTILUS_EXTDIR])
if test "${with_nautilus_extdir}" = ""; then
- AC_MSG_ERROR([Unable to determine nautilus extension folder, please use
--with-nautilus-extdir option])
+ AC_MSG_WARN([Unable to determine Nautilus extension folder, please use --with-nautilus-extdir
option])
else
- AC_MSG_NOTICE([installing plugin in ${with_nautilus_extdir}])
+ FMA_CHECK_MODULE([NAUTILUS_EXTENSION],[libnautilus-extension],[${nautilus_required}],[yes])
+ if test "${have_NAUTILUS_EXTENSION}" = "yes"; then
+ with_nautilus_ok="yes"
+ fi
+ fi
+ if test "${with_nautilus_ok}" = "yes"; then
+ # Check for menu update function
+ AC_CHECK_LIB([nautilus-extension],[nautilus_menu_item_new],[],[with_nautilus_ok="no"])
+ # doesn't make the two following checks fatal
+ AC_CHECK_FUNCS([nautilus_menu_provider_emit_items_updated_signal])
+ # starting with 2.91.90, Nautilus no more allows extensions to
+ # add toolbar items
+ AC_CHECK_FUNCS([nautilus_menu_provider_get_toolbar_items])
+ fi
+ if test "${with_nautilus_ok}" = "yes"; then
+ AC_MSG_NOTICE([installing Nautilus plugins in ${with_nautilus_extdir}])
AC_SUBST([NAUTILUS_EXTENSIONS_DIR],[${with_nautilus_extdir}])
- AC_DEFINE_UNQUOTED([NA_NAUTILUS_EXTENSIONS_DIR],[${with_nautilus_extdir}],[Nautilus
extensions directory])
fi
])
-AC_DEFUN([_AC_ARG_NA_NAUTILUS_EXTDIR],[
- AC_ARG_WITH(
- [nautilus-extdir],
+# let the user specify an alternate nautilus-extension dir
+# --with-nautilus-extdir=<dir>
+#
+AC_DEFUN([_FMA_NAUTILUS_EXTDIR],[
+
+ AC_ARG_WITH([nautilus-extdir],
AC_HELP_STRING(
[--with-nautilus-extdir=DIR],
- [nautilus plugins extension directory @<:@auto@:>@]
- ),
- [with_nautilus_extdir=$withval],
- [with_nautilus_extdir=""]
- )
-])
+ [Nautilus extensions directory @<:@auto@:>@]),
+ [with_nautilus_extdir=$withval],
+ [with_nautilus_extdir=""])
-AC_DEFUN([_AC_NA_CHECK_NAUTILUS_EXTDIR],[
if test "${with_nautilus_extdir}" = ""; then
if test "{PKG_CONFIG}" != ""; then
with_nautilus_extdir=`${PKG_CONFIG} --variable=extensiondir libnautilus-extension`
diff --git a/m4/fma-fm-nemo.m4 b/m4/fma-fm-nemo.m4
new file mode 100644
index 0000000..4ddf6e4
--- /dev/null
+++ b/m4/fma-fm-nemo.m4
@@ -0,0 +1,79 @@
+# FileManager-Actions
+# A file-manager extension which offers configurable context menu actions.
+#
+# Copyright (C) 2005 The GNOME Foundation
+# Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
+# Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
+#
+# FileManager-Actions is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# FileManager-Actions is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with FileManager-Actions; see the file COPYING. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+# Authors:
+# Frederic Ruaudel <grumz grumz net>
+# Rodrigo Moya <rodrigo gnome-db org>
+# Pierre Wieser <pwieser trychlos org>
+# ... and many others (see AUTHORS)
+
+# serial 1 introduce FMA_CHECK_FOR_NEMO
+
+dnl Usage: FMA_CHECK_FOR_NEMO
+dnl Decription: Whether the user has specified '--with-nemo' or does
+dnl not have specified anything (while he does not have specified
+dnl --without-nemo), we are checking here if Nemo is a suitable
+dnl target file manager.
+dnl This requires that the extensions library be installed, and that
+dnl the extensions directory be defined.
+dnl
+AC_DEFUN([FMA_CHECK_FOR_NEMO],[
+ with_nemo_ok="no"
+ AC_REQUIRE([_FMA_NEMO_EXTDIR])
+ if test "${with_nemo_extdir}" = ""; then
+ AC_MSG_WARN([Unable to determine Nemo extension folder, please use --with-nemo-extdir option])
+ else
+ FMA_CHECK_MODULE([NEMO_EXTENSION],[libnemo-extension],[${nemo_required}],[yes])
+ if test "${have_NEMO_EXTENSION}" = "yes"; then
+ with_nemo_ok="yes"
+ fi
+ fi
+ if test "${with_nemo_ok}" = "yes"; then
+ # Check for menu update function
+ AC_CHECK_LIB([nemo-extension],[nemo_menu_item_new],[],[with_nemo_ok="no"])
+ # doesn't make these two checks fatal
+ AC_CHECK_FUNCS([nemo_menu_provider_emit_items_updated_signal])
+ AC_CHECK_FUNCS([nemo_menu_provider_get_toolbar_items])
+ fi
+ if test "${with_nemo_ok}" = "yes"; then
+ AC_MSG_NOTICE([installing Nemo plugins in ${with_nemo_extdir}])
+ AC_SUBST([NEMO_EXTENSIONS_DIR],[${with_nemo_extdir}])
+ fi
+])
+
+# let the user specify an alternate nemo-extension dir
+# --with-nemo-extdir=<dir>
+#
+AC_DEFUN([_FMA_NEMO_EXTDIR],[
+
+ AC_ARG_WITH([nemo-extdir],
+ AC_HELP_STRING(
+ [--with-nemo-extdir=DIR],
+ [Nemo extensions directory @<:@auto@:>@]),
+ [with_nemo_extdir=$withval],
+ [with_nemo_extdir=""])
+
+ if test "${with_nemo_extdir}" = ""; then
+ if test "{PKG_CONFIG}" != ""; then
+ with_nemo_extdir=`${PKG_CONFIG} --variable=extensiondir libnemo-extension`
+ fi
+ fi
+])
diff --git a/maintainer/run-autogen.sh b/maintainer/run-autogen.sh
index a697330..65d2261 100755
--- a/maintainer/run-autogen.sh
+++ b/maintainer/run-autogen.sh
@@ -143,7 +143,6 @@ conf_cmd="\${top_srcdir}/configure"
conf_args="${conf_args}"
conf_args="\${conf_args} --prefix=\${heredir}/_install"
conf_args="\${conf_args} --sysconfdir=/etc"
-conf_args="\${conf_args} --enable-file-manager=nautilus"
conf_args="\${conf_args} --with-nautilus-extdir=\${heredir}/_install/lib/nautilus"
conf_args="\${conf_args} --enable-maintainer-mode"
conf_args="\${conf_args} $*"
diff --git a/na_required_versions b/na_required_versions
index 0ce4922..49f09f2 100644
--- a/na_required_versions
+++ b/na_required_versions
@@ -1,6 +1,7 @@
# This file is to be sourced as shell definitions from:
# - maintainer/run-autogen.sh
# - configure.ac
+# - some m4/ modules
#
# Build tools
intltool_required=0.50.2
@@ -8,12 +9,13 @@ REQUIRED_INTLTOOL_VERSION=${intltool_required}
# Libraries
# Supported distribution as of Feb. 2015:
-# distribution release date end of life GLib Gtk+
-# --------------------------------- ------------ ----------- ------- ------
+# distribution release date end of life GLib Gtk+ Nautilus Nemo
+# --------------------------------- ------------ ----------- ------- ------ -------- -----
# Debian 7.0 Wheezy 2013-05-04 2016 2.33.12 3.4.2
# Debian 8.0 Jessie 2015-04-25 2018 2.42.1 3.14.5
# Fedora 20 Heisenbug 2013-12-17 2015 2.38.2 3.10.9
# Fedora 21 2014-12-09 2016 2.42.1 3.14.9
+# Fedora 22 3.16.2 2.6.7
# Ubuntu 12.04 LTS Precise Pangolin 2012-04-26 2017-04-xx 2.32.1 3.4.2
# Ubuntu 14.04 LTS Trusty Thar 2014-04-17 2019-04-xx 2.40.0 3.10.8
@@ -24,3 +26,4 @@ xml_required=2.6
# File-managers
nautilus_required=3.4.1
+nemo_required=2.6
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]