aboutsummaryrefslogtreecommitdiff
path: root/shells/fish
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2013-12-19 22:12:49 +0000
committerPawel Pekala <pawel@FreeBSD.org>2013-12-19 22:12:49 +0000
commit08004f22d70de637e258c269b8b9fe7110bfe8c1 (patch)
treea234f2e72714c5d596f973c4f0387f093748fd8d /shells/fish
parent86f3097928fb7b940a21961ce98111974186757e (diff)
downloadports-08004f22d70de637e258c269b8b9fe7110bfe8c1.tar.gz
ports-08004f22d70de637e258c269b8b9fe7110bfe8c1.zip
- Fix build on -current
- Support staging PR: ports/184844 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Notes
Notes: svn path=/head/; revision=336965
Diffstat (limited to 'shells/fish')
-rw-r--r--shells/fish/Makefile32
-rw-r--r--shells/fish/files/patch-exec.cpp26
-rw-r--r--shells/fish/files/patch-io.h11
-rw-r--r--shells/fish/pkg-plist5
4 files changed, 48 insertions, 26 deletions
diff --git a/shells/fish/Makefile b/shells/fish/Makefile
index 8052e80f32ca..44f6293b0fc1 100644
--- a/shells/fish/Makefile
+++ b/shells/fish/Makefile
@@ -11,30 +11,19 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= User friendly command line shell
OPTIONS_DEFINE= DOCS NLS
+OPTIONS_SUB= yes
WRKSRC= ${WRKDIR}/${PORTNAME}
-USES= iconv
-USE_GMAKE= yes
+USES= gmake iconv
USE_AUTOTOOLS= autoconf
-CONFIGURE_ARGS= --docdir=${WRKDIR}/tmproot
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib -pthread ${ICONV_LIB}
-MAN1= fish.1 fish_indent.1 fish_pager.1 fishd.1 mimedb.1
-
-NO_STAGE= yes
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MNLS}
-USES+= gettext
-CONFIGURE_ENV+= ac_cv_func_gettext=yes
-PLIST_SUB+= NLS=""
-.else
-CONFIGURE_ARGS+=--without-gettext
-PLIST_SUB+= NLS="@comment "
-.endif
+NLS_USES= gettext
+NLS_CONFIGURE_ENV= ac_cv_func_gettext=yes
+NLS_CONFIGURE_OFF= --without-gettext
post-patch:
@${REINPLACE_CMD} -e \
@@ -49,17 +38,8 @@ post-patch:
s|ncurses.h||' ${WRKSRC}/configure.ac
post-install:
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- @(cd ${WRKDIR}/tmproot && ${COPYTREE_SHARE} . ${DOCSDIR})
-.endif
.for i in fish fish_indent fish_pager fishd mimedb
- @${STRIP_CMD} ${PREFIX}/bin/${i}
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${i}
.endfor
- if ${GREP} -q '${PREFIX}/bin/${PORTNAME}' /etc/shells; then \
- ${TRUE}; \
- else \
- ${ECHO_CMD} '${PREFIX}/bin/${PORTNAME}' >> /etc/shells; \
- fi
.include <bsd.port.mk>
diff --git a/shells/fish/files/patch-exec.cpp b/shells/fish/files/patch-exec.cpp
new file mode 100644
index 000000000000..6d0c4c79ae09
--- /dev/null
+++ b/shells/fish/files/patch-exec.cpp
@@ -0,0 +1,26 @@
+--- exec.cpp.orig
++++ exec.cpp
+@@ -343,7 +343,11 @@
+ */
+ static int has_fd(const io_chain_t &d, int fd)
+ {
++#if defined(_LIBCPP_VERSION)
++ return io_chain_get(d, fd) != nullptr;
++#else
+ return io_chain_get(d, fd) != NULL;
++#endif
+ }
+
+ /**
+@@ -606,7 +610,11 @@
+ j->io.insert(j->io.begin(), parser.block_io.begin(), parser.block_io.end());
+ }
+
++#if defined(LIBCPP_VERSION)
++ const io_buffer_t *input_redirect = nullptr;
++#else
+ const io_buffer_t *input_redirect = NULL;
++#endif
+ for (size_t idx = 0; idx < j->io.size(); idx++)
+ {
+ const shared_ptr<io_data_t> &io = j->io.at(idx);
diff --git a/shells/fish/files/patch-io.h b/shells/fish/files/patch-io.h
new file mode 100644
index 000000000000..4540762b554e
--- /dev/null
+++ b/shells/fish/files/patch-io.h
@@ -0,0 +1,11 @@
+--- io.h.orig
++++ io.h
+@@ -2,7 +2,7 @@
+ #define FISH_IO_H
+
+ #include <vector>
+-#if __cplusplus > 199711L
++#if __cplusplus > 199711L || defined(_LIBCPP_VERSION)
+ // C++11
+ #include <memory>
+ using std::shared_ptr;
diff --git a/shells/fish/pkg-plist b/shells/fish/pkg-plist
index 24b9de67f80d..fadc688de3bf 100644
--- a/shells/fish/pkg-plist
+++ b/shells/fish/pkg-plist
@@ -4,6 +4,11 @@ bin/fish_pager
bin/fishd
bin/mimedb
%%ETCDIR%%/config.fish
+man/man1/fish.1.gz
+man/man1/fish_indent.1.gz
+man/man1/fish_pager.1.gz
+man/man1/fishd.1.gz
+man/man1/mimedb.1.gz
%%PORTDOCS%%%%DOCSDIR%%/commands.html
%%PORTDOCS%%%%DOCSDIR%%/design.html
%%PORTDOCS%%%%DOCSDIR%%/doc_8h_source.html