1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Fix build with clang

- Stage support

PR:		ports/185692
Submitted by:	KATO Tsuguru
This commit is contained in:
Antoine Brodin 2014-01-14 20:23:34 +00:00
parent 2ed1a54400
commit c2533ffdba
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=339712
5 changed files with 60 additions and 26 deletions

View File

@ -12,33 +12,29 @@ COMMENT= Change directory in full-screen visual mode
LICENSE= GPLv2
USES= gettext perl5
USES= gettext ncurses perl5
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib -lintl
MAN1= kcd.1
NO_STAGE= yes
.include <bsd.port.options.mk>
OPTIONS_DEFINE= DOCS EXAMPLES
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/kcd-inst ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/kcdscr ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/kcdmain ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/kcd.1 ${MANPREFIX}/man/man1
${INSTALL_SCRIPT} ${WRKSRC}/kcd-inst ${STAGEDIR}${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/kcdscr ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/kcdmain ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/kcd.1 ${STAGEDIR}${MANPREFIX}/man/man1
.for i in en_GB en_GB.UTF-8 en_US.UTF-8
@${MKDIR} ${PREFIX}/share/locale/${i}/LC_MESSAGES
@${MKDIR} ${STAGEDIR}${PREFIX}/share/locale/${i}/LC_MESSAGES
${INSTALL_DATA} ${WRKSRC}/po/${i}.gmo \
${PREFIX}/share/locale/${i}/LC_MESSAGES/kcd.mo
${STAGEDIR}${PREFIX}/share/locale/${i}/LC_MESSAGES/kcd.mo
.endfor
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/kcd.csh.init ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/kcd.sh.init ${EXAMPLESDIR}
.endif
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/kcd.csh.init ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/kcd.sh.init ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk>

View File

@ -1,6 +1,17 @@
--- dirtree.cc.orig 2009-02-18 13:01:05.000000000 +0100
+++ dirtree.cc 2013-05-27 18:11:32.183060000 +0200
@@ -170,12 +170,12 @@
@@ -25,6 +25,10 @@
#include "cstrlib.h"
#include "gentree.h"
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
sptr_list<DirectoryEntry> dirTree;
const char uniqueTag[] = "<KCDID#9>"; // File ID
@@ -170,12 +174,12 @@
ReadSaveFile(dirTree, filegz);
}
catch(ErrorBadFileFormat &) {

View File

@ -0,0 +1,13 @@
--- gentree.cc.orig
+++ gentree.cc
@@ -29,6 +29,10 @@
#include "cstrlib.h"
#include "scandir.h"
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
//#define DUMP_HTML
#ifdef DUMP_HTML
# include <fcntl.h>

View File

@ -0,0 +1,13 @@
--- scandir.cc.orig
+++ scandir.cc
@@ -32,6 +32,10 @@
#include "cstrlib.h"
#include "dirtree.h"
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/*************************************************************************
Log scan results to command line output
*************************************************************************/

View File

@ -1,15 +1,16 @@
bin/kcd-inst
bin/kcdmain
bin/kcdscr
man/man1/kcd.1.gz
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/kcd.csh.init
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/kcd.sh.init
share/locale/en_GB/LC_MESSAGES/kcd.mo
share/locale/en_GB.UTF-8/LC_MESSAGES/kcd.mo
share/locale/en_US.UTF-8/LC_MESSAGES/kcd.mo
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%EXAMPLESDIR%%/kcd.csh.init
%%PORTDOCS%%%%EXAMPLESDIR%%/kcd.sh.init
%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrmtry share/locale/en_GB.UTF-8/LC_MESSAGES
@dirrmtry share/locale/en_GB.UTF-8
@dirrmtry share/locale/en_US.UTF-8/LC_MESSAGES
@dirrmtry share/locale/en_US.UTF-8
@dirrmtry share/locale/en_GB.UTF-8/LC_MESSAGES
@dirrmtry share/locale/en_GB.UTF-8
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%