Bug 184844 - shells/fish: Fix build on -current
Summary: shells/fish: Fix build on -current
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 18:10 UTC by tkato432
Modified: 2013-12-20 08:20 UTC (History)
0 users

See Also:


Attachments
file.diff (3.18 KB, patch)
2013-12-16 18:10 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-12-16 18:10:11 UTC
- Fix build on -current

New file:
files/patch-exec.cpp
files/patch-io.h
Comment 1 Pawel Pekala freebsd_committer freebsd_triage 2013-12-19 22:02:49 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pawel

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-12-19 22:13:04 UTC
Author: pawel
Date: Thu Dec 19 22:12:49 2013
New Revision: 336965
URL: http://svnweb.freebsd.org/changeset/ports/336965

Log:
  - Fix build on -current
  - Support staging
  
  PR:		ports/184844
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Added:
  head/shells/fish/files/
  head/shells/fish/files/patch-exec.cpp   (contents, props changed)
  head/shells/fish/files/patch-io.h   (contents, props changed)
Modified:
  head/shells/fish/Makefile
  head/shells/fish/pkg-plist

Modified: head/shells/fish/Makefile
==============================================================================
--- head/shells/fish/Makefile	Thu Dec 19 21:48:22 2013	(r336964)
+++ head/shells/fish/Makefile	Thu Dec 19 22:12:49 2013	(r336965)
@@ -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>

Added: head/shells/fish/files/patch-exec.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/shells/fish/files/patch-exec.cpp	Thu Dec 19 22:12:49 2013	(r336965)
@@ -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);

Added: head/shells/fish/files/patch-io.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/shells/fish/files/patch-io.h	Thu Dec 19 22:12:49 2013	(r336965)
@@ -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;

Modified: head/shells/fish/pkg-plist
==============================================================================
--- head/shells/fish/pkg-plist	Thu Dec 19 21:48:22 2013	(r336964)
+++ head/shells/fish/pkg-plist	Thu Dec 19 22:12:49 2013	(r336965)
@@ -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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Pawel Pekala freebsd_committer freebsd_triage 2013-12-19 22:13:09 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-12-20 08:11:46 UTC
Author: bapt
Date: Fri Dec 20 08:11:38 2013
New Revision: 336991
URL: http://svnweb.freebsd.org/changeset/ports/336991

Log:
  MFH: r336965
  
  - Fix build on -current
  - Support staging
  
  PR:		ports/184844
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Added:
  branches/2014Q1/shells/fish/files/
     - copied from r336965, head/shells/fish/files/
Modified:
  branches/2014Q1/shells/fish/Makefile
  branches/2014Q1/shells/fish/pkg-plist
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/shells/fish/Makefile
==============================================================================
--- branches/2014Q1/shells/fish/Makefile	Fri Dec 20 08:10:51 2013	(r336990)
+++ branches/2014Q1/shells/fish/Makefile	Fri Dec 20 08:11:38 2013	(r336991)
@@ -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>

Modified: branches/2014Q1/shells/fish/pkg-plist
==============================================================================
--- branches/2014Q1/shells/fish/pkg-plist	Fri Dec 20 08:10:51 2013	(r336990)
+++ branches/2014Q1/shells/fish/pkg-plist	Fri Dec 20 08:11:38 2013	(r336991)
@@ -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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"