diff options
author | bsam <bsam@FreeBSD.org> | 2011-07-31 03:27:29 +0800 |
---|---|---|
committer | bsam <bsam@FreeBSD.org> | 2011-07-31 03:27:29 +0800 |
commit | b599aa293692acd6f99c0edb6f214c5ba23b1d65 (patch) | |
tree | f0a17452ed0f30f3bcf8b7b107b0b60186b13de9 /comms | |
parent | 77c076813011e309745937260cd6671e59e5eb4c (diff) | |
download | freebsd-ports-gnome-b599aa293692acd6f99c0edb6f214c5ba23b1d65.tar.gz freebsd-ports-gnome-b599aa293692acd6f99c0edb6f214c5ba23b1d65.tar.zst freebsd-ports-gnome-b599aa293692acd6f99c0edb6f214c5ba23b1d65.zip |
Create an OPTION to install a bash completion script (off by default).
Do not install the script when this option is disabled. I.e. even
if bash is installed one should define the option "on" (or define
the environment option WITH_BASH) to install the script.
PR: ports/158840 (based on)
Submitted by: Ruslan Mahmatkhanov <cvs-src@yandex.ru>
Diffstat (limited to 'comms')
-rw-r--r-- | comms/gammu/Makefile | 13 | ||||
-rw-r--r-- | comms/gammu/files/extra-patch-contrib_CMakeLists.txt | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/comms/gammu/Makefile b/comms/gammu/Makefile index 733a9b104d94..b9d3e21c391e 100644 --- a/comms/gammu/Makefile +++ b/comms/gammu/Makefile @@ -18,6 +18,8 @@ RUN_DEPENDS= cdialog:${PORTSDIR}/devel/cdialog CONFLICTS= gammu-devel-[1-9]* gammu-python-[1-9]* +OPTIONS= BASH "Install bash completion script" off + CMAKE_ARGS+= -DINSTALL_LIBDATA_DIR=${LOCALBASE}/libdata USE_CMAKE= yes @@ -50,8 +52,19 @@ post-install: post-patch: @${REINPLACE_CMD} -i '' -e 's:bash:sh:' -e 's:dialog:cdialog:' ${WRKSRC}/utils/gammu-config + @${REINPLACE_CMD} -i '' -e 's:/etc/bash_completion.d:${PREFIX}/etc/bash_completion.d:' \ + ${WRKSRC}/contrib/CMakeLists.txt .if ${OSVERSION} < 700042 @${REINPLACE_CMD} -e 's@ -Wno-pointer-sign@@g' ${WRKSRC}/CMakeLists.txt .endif +.if defined(WITH_BASH) +BUILD_DEPENDS+= bash:${PORTSDIR}/shells/bash +RUN_DEPENDS+= bash:${PORTSDIR}/shells/bash +PLIST_FILES+= etc/bash_completion.d/gammu +PLIST_DIRSTRY+= etc/bash_completion.d +.else +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-contrib_CMakeLists.txt +.endif + .include <bsd.port.post.mk> diff --git a/comms/gammu/files/extra-patch-contrib_CMakeLists.txt b/comms/gammu/files/extra-patch-contrib_CMakeLists.txt new file mode 100644 index 000000000000..4e61c160a2b0 --- /dev/null +++ b/comms/gammu/files/extra-patch-contrib_CMakeLists.txt @@ -0,0 +1,11 @@ +--- contrib/CMakeLists.txt.orig 2011-07-30 22:17:01.433135057 +0400 ++++ contrib/CMakeLists.txt 2011-07-30 22:17:27.233149981 +0400 +@@ -10,7 +10,7 @@ + option(INSTALL_PHP_EXAMPLES "Install PHP example scripts" ON) + + if (BASH_BIN) +- option(INSTALL_BASH_COMPLETION "Install bash completion script for Gammu" ON) ++ option(INSTALL_BASH_COMPLETION "Install bash completion script for Gammu" OFF) + else (BASH_BIN) + option(INSTALL_BASH_COMPLETION "Install bash completion script for Gammu" OFF) + endif (BASH_BIN) |