Date: Tue, 17 Dec 2013 02:51:12 +0900 From: KATO Tsuguru <tkato432@yahoo.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/184844: shells/fish: Fix build on -current Message-ID: <20131217025112.6ca674763b73bd42315bdf5c@yahoo.com> Resent-Message-ID: <201312161810.rBGIABC6016135@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 184844 >Category: ports >Synopsis: shells/fish: Fix build on -current >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Dec 16 18:10:11 UTC 2013 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 8.4-RELEASE-p4 i386 >Organization: >Environment: >Description: - Fix build on -current New file: files/patch-exec.cpp files/patch-io.h >How-To-Repeat: >Fix: diff -urN /usr/ports/shells/fish/Makefile shells/fish/Makefile --- /usr/ports/shells/fish/Makefile 2013-11-06 21:54:00.000000000 +0900 +++ shells/fish/Makefile 2013-12-17 00:00:00.000000000 +0900 @@ -11,29 +11,23 @@ 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 post-patch: @@ -49,17 +43,8 @@ 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 -urN /usr/ports/shells/fish/files/patch-exec.cpp shells/fish/files/patch-exec.cpp --- /usr/ports/shells/fish/files/patch-exec.cpp 1970-01-01 09:00:00.000000000 +0900 +++ shells/fish/files/patch-exec.cpp 2013-12-17 00:00:00.000000000 +0900 @@ -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 -urN /usr/ports/shells/fish/files/patch-io.h shells/fish/files/patch-io.h --- /usr/ports/shells/fish/files/patch-io.h 1970-01-01 09:00:00.000000000 +0900 +++ shells/fish/files/patch-io.h 2013-12-17 00:00:00.000000000 +0900 @@ -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 -urN /usr/ports/shells/fish/pkg-plist shells/fish/pkg-plist --- /usr/ports/shells/fish/pkg-plist 2013-11-06 21:54:00.000000000 +0900 +++ shells/fish/pkg-plist 2013-12-17 00:00:00.000000000 +0900 @@ -4,6 +4,11 @@ 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 >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131217025112.6ca674763b73bd42315bdf5c>