Index: head/sysutils/Makefile =================================================================== --- head/sysutils/Makefile +++ head/sysutils/Makefile @@ -764,6 +764,7 @@ SUBDIR += parafly SUBDIR += parallel SUBDIR += password-store + SUBDIR += passwordsafe SUBDIR += patchelf SUBDIR += pax-utils SUBDIR += pbi-manager Index: head/sysutils/passwordsafe/Makefile =================================================================== --- head/sysutils/passwordsafe/Makefile +++ head/sysutils/passwordsafe/Makefile @@ -0,0 +1,59 @@ +# $FreeBSD$ + +PORTNAME= passwordsafe +DISTVERSION= 1.01BETA +CATEGORIES= sysutils + +MAINTAINER= brnrd@FreeBSD.org +COMMENT= Popular secure and convenient password manager + +LICENSE= ART20 + +LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid \ + libxerces-c-3.1.so:textproc/xerces-c3 +BUILD_DEPENDS= zip:archivers/zip + +CONFLICTS= pwsafe-[0-9]* + +USES= gmake +USE_GITHUB= yes +USE_WX= 3.0+ +USE_XORG= x11 xtst + +GH_ACCOUNT= pwsafe +GH_PROJECT= ${GH_ACCOUNT} + +WX_COMP= wx +WANT_WX_VER= 3.0 + +ALL_TARGET= unicoderelease + +OPTIONS_DEFINE= NLS +OPTIONS_SUB= yes +NLS_USES= gettext + +post-patch: +. for f in Makefile.freebsd help/Makefile.freebsd src/os/unix/Makefile \ + src/os/unix/dir.cpp src/ui/wxWidgets/pwsafeapp.cpp \ + src/ui/wxWidgets/Makefile + ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/$f +. endfor + +post-build: + ${GMAKE} -C ${WRKSRC}/src/ui/wxWidgets/I18N mos + ${GMAKE} -C ${WRKSRC}/help all + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/ui/wxWidgets/GCCUnicodeRelease/pwsafe \ + ${STAGEDIR}${PREFIX}/bin + ${MKDIR} ${STAGEDIR}${DOCSDIR}/help + ${CP} ${WRKSRC}/help/help*.zip ${STAGEDIR}${DOCSDIR}/help + +post-install-NLS-on: +.for l in da de es fr it ko nl pl ru sv zh + ${MKDIR} ${STAGEDIR}${PREFIX}/locale/$l/LC_MESSAGES + ${INSTALL_DATA} ${WRKSRC}/src/ui/wxWidgets/I18N/mos/$l/LC_MESSAGES/pwsafe.mo \ + ${STAGEDIR}${PREFIX}/locale/$l/LC_MESSAGES +.endfor + +.include Index: head/sysutils/passwordsafe/distinfo =================================================================== --- head/sysutils/passwordsafe/distinfo +++ head/sysutils/passwordsafe/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1486296870 +SHA256 (pwsafe-pwsafe-1.01BETA_GH0.tar.gz) = dc1e7e012009309f57a8611adad9ec62fdafe5b326f66dd0cefe2b5988ee52aa +SIZE (pwsafe-pwsafe-1.01BETA_GH0.tar.gz) = 13984971 Index: head/sysutils/passwordsafe/files/patch-help_Makefile =================================================================== --- head/sysutils/passwordsafe/files/patch-help_Makefile +++ head/sysutils/passwordsafe/files/patch-help_Makefile @@ -0,0 +1,23 @@ +From fad7654fc8f709712211700d3ad02272dd2e6963 Mon Sep 17 00:00:00 2001 +From: Bernard Spil +Date: Sun, 5 Feb 2017 15:35:35 +0100 +Subject: [PATCH] Fix helpfile building on FreeBSD + +Signed-off-by: Bernard Spil +--- + help/Makefile | 2 ++ + help/Makefile.freebsd | 21 +++++++++++++++++++++ + 2 files changed, 23 insertions(+) + create mode 100644 help/Makefile.freebsd + +--- help/Makefile.orig 2016-12-21 20:10:25 UTC ++++ help/Makefile +@@ -7,6 +7,8 @@ include Makefile.windows + else ifeq ($(findstring Darwin, $(shell uname -s)), Darwin) + #include Makefile.macos + $(error "MacOS unsupported (yet)") ++else ifeq ($(findstring FreeBSD, $(shell uname -s)), FreeBSD) ++include Makefile.freebsd + else + $(error "Unsupported OS or unable to determine OS") + endif Index: head/sysutils/passwordsafe/files/patch-help_Makefile.freebsd =================================================================== --- head/sysutils/passwordsafe/files/patch-help_Makefile.freebsd +++ head/sysutils/passwordsafe/files/patch-help_Makefile.freebsd @@ -0,0 +1,36 @@ +From fad7654fc8f709712211700d3ad02272dd2e6963 Mon Sep 17 00:00:00 2001 +From: Bernard Spil +Date: Sun, 5 Feb 2017 15:35:35 +0100 +Subject: [PATCH] Fix helpfile building on FreeBSD + +Signed-off-by: Bernard Spil +--- + help/Makefile | 2 ++ + help/Makefile.freebsd | 21 +++++++++++++++++++++ + 2 files changed, 23 insertions(+) + create mode 100644 help/Makefile.freebsd + +--- help/Makefile.freebsd.orig 2017-02-05 14:51:25 UTC ++++ help/Makefile.freebsd +@@ -0,0 +1,21 @@ ++BASEDIRNAME=pwsafe ++LANGS=RU DE ES FR ZH PL ++ ++ZIP = /usr/local/bin/zip ++ ++all: default $(LANGS) ++ ++default: ++ @cd default ; $(ZIP) -Xqr ../helpEN ./* ++ ++$(LANGS): ++ @cd $(BASEDIRNAME)$@ ; $(ZIP) -Xqr ../help$@ ./* ++ ++clean: ++ $(RM) *.zip ++ ++.PHONY: all clean default $(LANGS) ++ ++# Local variables: ++# mode: makefile ++# End: Index: head/sysutils/passwordsafe/files/patch-src_os_unix_dir.cpp =================================================================== --- head/sysutils/passwordsafe/files/patch-src_os_unix_dir.cpp +++ head/sysutils/passwordsafe/files/patch-src_os_unix_dir.cpp @@ -0,0 +1,31 @@ +From 9cdf2cd3ad5de5034d367b8283c071ad90ad2055 Mon Sep 17 00:00:00 2001 +From: Bernard Spil +Date: Sun, 5 Feb 2017 15:36:48 +0100 +Subject: [PATCH] Obey hier(8) on FreeBSD + +Signed-off-by: Bernard Spil +--- + src/os/unix/dir.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- src/os/unix/dir.cpp.orig 2016-12-21 20:10:25 UTC ++++ src/os/unix/dir.cpp +@@ -173,10 +173,18 @@ stringT pws_os::getsafedir(void) + + stringT pws_os::getxmldir(void) + { ++#ifdef __FreeBSD__ ++ return _S("/usr/local/share/pwsafe/xml/"); ++#else + return _S("/usr/share/pwsafe/xml/"); ++#endif + } + + stringT pws_os::gethelpdir(void) + { ++#ifdef __FreeBSD__ ++ return _S("/usr/local/share/doc/passwordsafe/help/"); ++#else + return _S("/usr/share/doc/passwordsafe/help/"); ++#endif + } Index: head/sysutils/passwordsafe/pkg-descr =================================================================== --- head/sysutils/passwordsafe/pkg-descr +++ head/sysutils/passwordsafe/pkg-descr @@ -0,0 +1,5 @@ +Password Safe is a password database utility. Users can keep their +passwords securely encrypted on their computers. A single Safe Combination +unlocks them all. + +WWW: https://pwsafe.org Index: head/sysutils/passwordsafe/pkg-plist =================================================================== --- head/sysutils/passwordsafe/pkg-plist +++ head/sysutils/passwordsafe/pkg-plist @@ -0,0 +1,19 @@ +bin/pwsafe +%%DOCSDIR%%/help/helpDE.zip +%%DOCSDIR%%/help/helpEN.zip +%%DOCSDIR%%/help/helpES.zip +%%DOCSDIR%%/help/helpFR.zip +%%DOCSDIR%%/help/helpPL.zip +%%DOCSDIR%%/help/helpRU.zip +%%DOCSDIR%%/help/helpZH.zip +%%NLS%%locale/da/LC_MESSAGES/pwsafe.mo +%%NLS%%locale/de/LC_MESSAGES/pwsafe.mo +%%NLS%%locale/es/LC_MESSAGES/pwsafe.mo +%%NLS%%locale/fr/LC_MESSAGES/pwsafe.mo +%%NLS%%locale/it/LC_MESSAGES/pwsafe.mo +%%NLS%%locale/ko/LC_MESSAGES/pwsafe.mo +%%NLS%%locale/nl/LC_MESSAGES/pwsafe.mo +%%NLS%%locale/pl/LC_MESSAGES/pwsafe.mo +%%NLS%%locale/ru/LC_MESSAGES/pwsafe.mo +%%NLS%%locale/sv/LC_MESSAGES/pwsafe.mo +%%NLS%%locale/zh/LC_MESSAGES/pwsafe.mo