diff --git a/misc/kcd/Makefile b/misc/kcd/Makefile index 79f9203aaef4..86e0ce18f1df 100644 --- a/misc/kcd/Makefile +++ b/misc/kcd/Makefile @@ -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 +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 diff --git a/misc/kcd/files/patch-dirtree.cc b/misc/kcd/files/patch-dirtree.cc index 740126bc9bb5..48fe15fc68ca 100644 --- a/misc/kcd/files/patch-dirtree.cc +++ b/misc/kcd/files/patch-dirtree.cc @@ -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 ++#endif ++ + sptr_list dirTree; + + const char uniqueTag[] = ""; // File ID +@@ -170,12 +174,12 @@ ReadSaveFile(dirTree, filegz); } catch(ErrorBadFileFormat &) { diff --git a/misc/kcd/files/patch-gentree.cc b/misc/kcd/files/patch-gentree.cc new file mode 100644 index 000000000000..6bc4ad877ddc --- /dev/null +++ b/misc/kcd/files/patch-gentree.cc @@ -0,0 +1,13 @@ +--- gentree.cc.orig ++++ gentree.cc +@@ -29,6 +29,10 @@ + #include "cstrlib.h" + #include "scandir.h" + ++#ifdef HAVE_UNISTD_H ++# include ++#endif ++ + //#define DUMP_HTML + #ifdef DUMP_HTML + # include diff --git a/misc/kcd/files/patch-scandir.cc b/misc/kcd/files/patch-scandir.cc new file mode 100644 index 000000000000..5fcf718dddc9 --- /dev/null +++ b/misc/kcd/files/patch-scandir.cc @@ -0,0 +1,13 @@ +--- scandir.cc.orig ++++ scandir.cc +@@ -32,6 +32,10 @@ + #include "cstrlib.h" + #include "dirtree.h" + ++#ifdef HAVE_UNISTD_H ++# include ++#endif ++ + /************************************************************************* + Log scan results to command line output + *************************************************************************/ diff --git a/misc/kcd/pkg-plist b/misc/kcd/pkg-plist index ab84fab3b7e4..ce5b30cd0bac 100644 --- a/misc/kcd/pkg-plist +++ b/misc/kcd/pkg-plist @@ -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%%