summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Vinson <nvinson234@gmail.com>2016-06-13 07:33:58 -0700
committerGöktürk Yüksek <gokturk@gentoo.org>2016-06-14 21:34:29 -0400
commit9b897d91dd4f6a7b8434b08798a9187e54b9c007 (patch)
treeb57a4f1baf2b1c14356765abe29944653364baef /net-firewall/nftables/files
parentsci-geosciences/josm: Version bump to 10327 (diff)
downloadgentoo-9b897d91dd4f6a7b8434b08798a9187e54b9c007.tar.gz
gentoo-9b897d91dd4f6a7b8434b08798a9187e54b9c007.tar.bz2
gentoo-9b897d91dd4f6a7b8434b08798a9187e54b9c007.zip
net-firewall/nftables: Remove bashism from nftables.sh
Remove [[ ... ]] bashism from use_legacy() function. Add missing dependencies and add doc use flag. Mask doc USE flag on arm due to the unkeyworded dep. Gentoo-bug: 585800 Closes: https://github.com/gentoo/gentoo/pull/1673 Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'net-firewall/nftables/files')
-rwxr-xr-xnet-firewall/nftables/files/libexec/nftables.sh2
-rw-r--r--net-firewall/nftables/files/nftables-0.5-pdf-doc.patch52
2 files changed, 53 insertions, 1 deletions
diff --git a/net-firewall/nftables/files/libexec/nftables.sh b/net-firewall/nftables/files/libexec/nftables.sh
index 0d7c091d07f4..2d8c9f04d69d 100755
--- a/net-firewall/nftables/files/libexec/nftables.sh
+++ b/net-firewall/nftables/files/libexec/nftables.sh
@@ -100,7 +100,7 @@ use_legacy() {
major_ver=$(uname -r | cut -d '.' -f1)
minor_ver=$(uname -r | cut -d '.' -f2)
- [[ $major_ver -ge 4 || $major_ver -eq 3 && $minor_ver -ge 18 ]] && return 1
+ [ $major_ver -ge 4 -o $major_ver -eq 3 -a $minor_ver -ge 18 ] && return 1
return 0
}
diff --git a/net-firewall/nftables/files/nftables-0.5-pdf-doc.patch b/net-firewall/nftables/files/nftables-0.5-pdf-doc.patch
new file mode 100644
index 000000000000..b6f7834f920e
--- /dev/null
+++ b/net-firewall/nftables/files/nftables-0.5-pdf-doc.patch
@@ -0,0 +1,52 @@
+Update configure script to include option to enable and disable PDF man page
+generation.
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,10 +27,16 @@
+ AS_IF([test "x$enable_debug" = "xno"], [with_debug=no], [with_debug=yes]),
+ [with_debug=yes])
+ AC_SUBST(with_debug)
+ AM_CONDITIONAL([BUILD_DEBUG], [test "x$with_debug" != xno])
+
++AC_ARG_ENABLE([pdf-doc],
++ AS_HELP_STRING([--enable-pdf-doc], [Enable PDF documentation]),
++ AS_IF([test "x$enable_pdf_doc" = "xno"], [enable_pdf_doc=no],
++ [enable_pdf_doc=yes]), [enable_pdf_doc=no])
++AM_CONDITIONAL([BUILD_PDF], [test "x$enable_pdf_doc" == "xyes" ])
++
+ # Checks for programs.
+ AC_PROG_CC
+ AC_PROG_MKDIR_P
+ AC_PROG_INSTALL
+ AC_PROG_SED
+@@ -61,15 +67,15 @@
+ )]
+ )
+ AC_SUBST(DB2MAN)
+ AM_CONDITIONAL([BUILD_MAN], [test -n "$DB2MAN"])
+
+-AC_CHECK_PROG(DBLATEX, [dblatex], [found], [no])
+-AS_IF([test "$DBLATEX" == "no"],
+- [AC_MSG_WARN([dblatex not found, no PDF manpages will be built])]
+-)
+-AM_CONDITIONAL([BUILD_PDF], [test "$DBLATEX" == "found"])
++AM_COND_IF([BUILD_PDF], [
++ AC_CHECK_PROG(DBLATEX, [dblatex], [found], [no])
++ AS_IF([test "$DBLATEX" == "no"],
++ [AC_MSG_ERROR([dblatex not found])])
++])
+
+ # Checks for libraries.
+ PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3])
+ PKG_CHECK_MODULES([LIBNFTNL], [libnftnl >= 1.0.5])
+
+@@ -134,6 +140,7 @@
+
+ echo "
+ nft configuration:
+ cli support: ${with_cli}
+ enable debugging: ${with_debug}
+- use mini-gmp: ${with_mini_gmp}"
++ use mini-gmp: ${with_mini_gmp}
++ enable pdf documentation: ${enable_pdf_doc}"