aboutsummaryrefslogtreecommitdiff
path: root/comms/gammu
diff options
context:
space:
mode:
authorBoris Samorodov <bsam@FreeBSD.org>2011-07-30 19:27:29 +0000
committerBoris Samorodov <bsam@FreeBSD.org>2011-07-30 19:27:29 +0000
commit9b494490e7042fc18ce3ea7d83b4d47653026c08 (patch)
tree0c1e5ac987b5b43d34541515391b2fcbe67ef401 /comms/gammu
parentaa9f84a17d783c498c7a55a6eac4e5e2071e97c5 (diff)
downloadports-9b494490e7042fc18ce3ea7d83b4d47653026c08.tar.gz
ports-9b494490e7042fc18ce3ea7d83b4d47653026c08.zip
Notes
Diffstat (limited to 'comms/gammu')
-rw-r--r--comms/gammu/Makefile13
-rw-r--r--comms/gammu/files/extra-patch-contrib_CMakeLists.txt11
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)