diff --git a/devel/subversion-lts/Makefile b/devel/subversion-lts/Makefile index 7790ec677a67..5c228c600386 100644 --- a/devel/subversion-lts/Makefile +++ b/devel/subversion-lts/Makefile @@ -1,237 +1,234 @@ -PORTREVISION= 3 +PORTREVISION= 4 PKGNAMESUFFIX= -lts MAINTAINER= lev@FreeBSD.org COMMENT= Version control system, long-time-support version WWW= https://subversion.apache.org/ CONFLICTS_INSTALL= subversion USE_RC_SUBR= svnserve PORTDOCS= BUGS CHANGES COMMITTERS INSTALL README OPTIONS_DEFINE= \ BDB \ DOCS \ FREEBSD_TEMPLATE\ GPG_AGENT \ NLS \ SASL \ SERF \ STATIC \ SVNSERVE_WRAPPER\ TEST \ TOOLS OPTIONS_DEFAULT=SERF TOOLS -FREEBSD_TEMPLATE_DESC= FreeBSD Project log template GPG_AGENT_DESC= Enable GPG agent password store SERF_DESC= WebDAV/Delta-V (HTTP/HTTPS) repo access module STATIC_DESC= Build static version (no shared libs) SVNSERVE_WRAPPER_DESC= Enable svnserve wrapper (umask setter) TEST_DESC= Run subversion test suite TOOLS_DESC= Install several tools -# Patches required for use with the FreeBSD Project repository only -FREEBSD_TEMPLATE_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-fbsd-template SVNSERVE_WRAPPER_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-svnserve-wrapper USES+= shebangfix python:2.7,env python_OLD_CMD+= "/bin/env python" SHEBANG_REGEX= ./tools/.* .include "Makefile.common" SVNREPOS?= /home/svn/repos SVNFSTYPE?= fsfs SVNGROUP?= svn SVNUSER?= svn CONFIGURE_ARGS+= --without-gnome-keyring \ --without-kwallet \ --with-apxs=no .if ${PORT_OPTIONS:MSVNSERVE_WRAPPER} SUB_LIST+= SVNSERVE_BIN_EXT=".bin" PLIST_SUB+= NO_SVNSERVE_WRAPPER="@comment " SVNSERVE_EXT= .bin .else SUB_LIST+= SVNSERVE_BIN_EXT="" PLIST_SUB+= NO_SVNSERVE_WRAPPER="" SVNSERVE_EXT= .endif .if ${PORT_OPTIONS:MTEST} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} .endif .if ${PORT_OPTIONS:MSTATIC} . if ${PORT_OPTIONS:MNLS} USES+= gettext-tools . endif . if ${PORT_OPTIONS:MBDB} BDB_BUILD_DEPENDS= yes . endif OLD_LIB_DEPENDS:= ${LIB_DEPENDS:S!^!${LOCALBASE}/lib/!:C!(\.so|\.[0-9]+)?:!.a:!} BUILD_DEPENDS+= ${OLD_LIB_DEPENDS} LIB_DEPENDS= .endif .if make(repository) WITH_REPOSITORY_CREATION= yes .endif .if defined(WITH_REPOSITORY_CREATION) MKREPOS_TARGET= _mkrepos .endif pre-everything:: @${ECHO_MSG} "" .if defined(WITH_REPOSITORY_CREATION) @${ECHO_MSG} "I will create (or use, if it exists) '${SVNUSER}' user and '${SVNGROUP}' group." @${ECHO_MSG} "Make sure that all committers are its members." @${ECHO_MSG} "" @${ECHO_MSG} "Repository will be created at '${SVNREPOS}' with user '${SVNUSER}' and group '${SVNGROUP}'." @${ECHO_MSG} "Type of repository will be '${SVNFSTYPE}'." @${ECHO_MSG} "You could change these settings by defining SVNREPOS, SVNGROUP and SVNFSTYPE." .else @${ECHO_MSG} "You can have the repository created for you by defining" @${ECHO_MSG} "WITH_REPOSITORY_CREATION." @${ECHO_MSG} "" @${ECHO_MSG} "Make sure that:" @${ECHO_MSG} "* all your svn users are members of a common group" @${ECHO_MSG} "* this group is the group id of the db/ and locks/" @${ECHO_MSG} " subdirectories of your repository" @${ECHO_MSG} "* the above subdirectories are writable by this group" .endif @${ECHO_MSG} "" .if ${PORT_OPTIONS:MSTATIC} @${ECHO_MSG} "Static binaries will be built." .endif # STATIC @${ECHO_MSG} "Many useful scripts will be installed into ${DATADIR}" pre-configure: .if ${PORT_OPTIONS:MBDB} @BDB_VERSION=`${APR_APU_DIR}/${APU_CONFIG} --db-version`; \ if [ "$${BDB_VERSION}" != "4" -a "$${BDB_VERSION}" != "5" -a "$${BDB_VERSION}" != "6" ] ; then \ ${ECHO_MSG} "" ; \ ${ECHO_MSG} 'You should build `'"devel/apr1' with Berkeley DB (4, 5 or 6) support to use subversion with it." ; \ ${ECHO_MSG} 'Please rebuild `'"devel/apr1' with option "'`'"BDB' and try again." ; \ ${ECHO_MSG} "" ; \ ${ECHO_MSG} "Or you can disable Berkeley DB support. Only 'fs' repository backend will be available." ; \ ${ECHO_MSG} "" ; \ ${FALSE} ; \ fi .endif .if ${PORT_OPTIONS:MSTATIC} LIBS_SQLITE3!= pkgconf --libs --static sqlite3 LIBS+= ${LIBS_SQLITE3} # for work with ICU LIBS+= -lc++ -lm .endif BINS_TO_STRIP= svn svnadmin svnbench svndumpfilter svnfsfs svnlook svnmucc \ svnrdump svnserve${SVNSERVE_EXT} svnsync svnversion TOOLS_TO_STRIP= fsfs-access-map svn-mergeinfo-normalizer \ svn-populate-node-origins-index svnauthz \ svnauthz-validate svnconflict svndiff svndiff3 \ svndiff4 svnmover svnraisetreeconflict x509-parser post-configure: # Enable GNOME Keyring / KWallet support in main code, as it is harmless @${REINPLACE_CMD} -E 's%.*#undef SVN_HAVE_(GNOME_KEYRING|KWALLET).*%#define SVN_HAVE_\1 1%' ${WRKSRC}/subversion/svn_private_config.h # ugly hack: save tools directory so we don't have to cleanup before installing @${CP} -R ${WRKSRC}/tools ${WRKSRC}/tools.examples @${CHMOD} -R a-st,o+rX ${WRKSRC}/tools.examples # takes a long time, and will fail but gives maintainer a good oversight .if ${PORT_OPTIONS:MTEST} test: build -@make check -C ${WRKSRC} .endif post-build-TOOLS-on: @${MAKE} -C ${WRKSRC} tools ${MAKE_ARGS} post-install: ${MKREPOS_TARGET} for F in ${BINS_TO_STRIP} ; do \ ${STRIP_CMD} "${STAGEDIR}${PREFIX}/bin/$${F}" ; \ done @${MKDIR} ${STAGEDIR}${DATADIR} (cd ${WRKSRC}/tools.examples && ${TAR} --exclude '*.in' -cf - * | ${TAR} -C ${STAGEDIR}${DATADIR} -xof - ) @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} post-install-STATIC-off: -@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so post-install-SVNSERVE_WRAPPER-on: @${INSTALL_SCRIPT} ${FILESDIR}/svnserve.wrapper ${STAGEDIR}${PREFIX}/bin/svnserve.sample post-install-TOOLS-on: @${MAKE} -C ${WRKSRC} install-tools ${MAKE_ARGS} for F in ${TOOLS_TO_STRIP} ; do \ ${STRIP_CMD} "${STAGEDIR}${PREFIX}/bin/$${F}" ; \ done # =============================================================================== repository: _mkrepos _SVNGRPFILES= db locks locks/db.lock locks/db-logs.lock SVNGRPFILES= ${_SVNGRPFILES:S,^,${SVNREPOS}/,} _mkrepos: .USE .if !exists(${SVNREPOS}) .if ${PORT_OPTIONS:MSVNSERVE_WRAPPER} @if /usr/sbin/pw groupshow "${SVNGROUP}" >/dev/null 2>&1; then \ ${ECHO_MSG} "You already have a group \"${SVNGROUP}\", so I will use it."; \ else \ if /usr/sbin/pw groupadd ${SVNGROUP} -h -; \ then \ ${ECHO_MSG} "Added group \"${SVNGROUP}\"."; \ else \ ${ECHO_MSG} "Adding group \"${SVNGROUP}\" failed..."; \ ${ECHO_MSG} "Please create it, and try again."; \ ${FALSE}; \ fi; \ fi @if /usr/sbin/pw usershow "${SVNUSER}" >/dev/null 2>&1; then \ ${ECHO_MSG} "You already have a user \"${SVNUSER}\", so I will use it."; \ else \ if /usr/sbin/pw useradd ${SVNUSER} -h -; \ then \ ${ECHO_MSG} "Added user \"${SVNUSER}\"."; \ else \ ${ECHO_MSG} "Adding user \"${SVNUSER}\" failed..."; \ ${ECHO_MSG} "Please create it, and try again."; \ ${FALSE}; \ fi; \ fi .endif @${MKDIR} ${SVNREPOS} @${PREFIX}/bin/svnadmin create --fs-type ${SVNFSTYPE} ${SVNREPOS} .if ${PORT_OPTIONS:MSVNSERVE_WRAPPER} @${CHOWN} ${SVNUSER}:${SVNGROUP} ${SVNGRPFILES} @${CHMOD} g+w ${SVNGRPFILES} @for i in ${SVNREPOS}/db/* ; do \ i=$${i##*/}; \ case $$i in \ DB_CONFIG|fs-type|uuid) ;; \ *) ${CHOWN} -R ${SVNUSER}:${SVNGROUP} ${SVNREPOS}/db/$$i; \ ${CHMOD} -R g+w ${SVNREPOS}/db/$$i; \ ;; \ esac; \ done .endif .endif svn-build-outputs-hack: (cd ${WRKSRC} && ${PATCH} ${PATCH_DIST_ARGS} -p0 < ${PATCHDIR}/extra-patch-build.conf) (cd ${WRKSRC} && python2.7 gen-make.py --release --installed-libs libsvn_client,libsvn_delta,libsvn_diff,libsvn_fs,libsvn_fs_x,libsvn_ra,libsvn_repos,libsvn_subr,libsvn_wc) ${MV} ${WRKSRC}/build-outputs.mk ${FILESDIR}/build-outputs.mk.addons .include diff --git a/devel/subversion-lts/files/extra-patch-fbsd-template b/devel/subversion-lts/files/extra-patch-fbsd-template deleted file mode 100644 index ee4bf924c32e..000000000000 --- a/devel/subversion-lts/files/extra-patch-fbsd-template +++ /dev/null @@ -1,164 +0,0 @@ ---- subversion/svn/util.c.orig 2015-02-28 13:37:27.000000000 +0300 -+++ subversion/svn/util.c 2016-03-19 16:53:13.016472654 +0300 -@@ -66,6 +66,9 @@ - #include "private/svn_client_private.h" - #include "private/svn_cmdline_private.h" - #include "private/svn_string_private.h" -+#ifdef HAS_ORGANIZATION_NAME -+#include "freebsd-organization.h" -+#endif - - - -@@ -331,6 +334,71 @@ - } - - -+/* -+ * Since we're adding freebsd-specific tokens to the log message, -+ * clean out any leftovers to avoid accidently sending them to other -+ * projects that won't be expecting them. -+ */ -+ -+static const char *prefixes[] = { -+ "PR:", -+ "Submitted by:", -+ "Reported by:", -+ "Reviewed by:", -+ "Approved by:", -+ "Obtained from:", -+ "MFC after:", -+ "MFH:", -+ "Relnotes:", -+ "Security:", -+ "Sponsored by:", -+ "Differential Revision:", -+}; -+ -+void -+cleanmsg(apr_size_t *l, char *s) -+{ -+ int i; -+ char *pos; -+ char *kw; -+ char *p; -+ int empty; -+ -+ for (i = 0; i < sizeof(prefixes) / sizeof(prefixes[0]); i++) { -+ pos = s; -+ while ((kw = strstr(pos, prefixes[i])) != NULL) { -+ /* Check to see if keyword is at start of line (or buffer) */ -+ if (!(kw == s || kw[-1] == '\r' || kw[-1] == '\n')) { -+ pos = kw + 1; -+ continue; -+ } -+ p = kw + strlen(prefixes[i]); -+ empty = 1; -+ while (1) { -+ if (*p == ' ' || *p == '\t') { -+ p++; -+ continue; -+ } -+ if (*p == '\0' || *p == '\r' || *p == '\n') -+ break; -+ empty = 0; -+ break; -+ } -+ if (empty && (*p == '\r' || *p == '\n')) { -+ memmove(kw, p + 1, strlen(p + 1) + 1); -+ if (l) -+ *l -= (p + 1 - kw); -+ } else if (empty) { -+ *kw = '\0'; -+ if (l) -+ *l -= (p - kw); -+ } else { -+ pos = p; -+ } -+ } -+ } -+} -+ - #define EDITOR_EOF_PREFIX _("--This line, and those below, will be ignored--") - - svn_error_t * -@@ -343,11 +411,56 @@ - svn_stringbuf_t *default_msg = NULL; - struct log_msg_baton *lmb = baton; - svn_stringbuf_t *message = NULL; -+ svn_config_t *cfg; -+ const char *mfc_after, *sponsored_by; -+ -+ cfg = lmb->config ? svn_hash_gets(lmb->config, SVN_CONFIG_CATEGORY_CONFIG) : NULL; - - /* Set default message. */ - default_msg = svn_stringbuf_create(APR_EOL_STR, pool); -+ svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "PR:\t\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Submitted by:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Reported by:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Reviewed by:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Approved by:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Obtained from:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "MFC after:\t"); -+ svn_config_get(cfg, &mfc_after, SVN_CONFIG_SECTION_MISCELLANY, "freebsd-mfc-after", NULL); -+ if (mfc_after != NULL) -+ svn_stringbuf_appendcstr(default_msg, mfc_after); -+ svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "MFH:\t\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Relnotes:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Security:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Sponsored by:\t"); -+ svn_config_get(cfg, &sponsored_by, SVN_CONFIG_SECTION_MISCELLANY, "freebsd-sponsored-by", -+#ifdef HAS_ORGANIZATION_NAME -+ ORGANIZATION_NAME); -+#else -+ NULL); -+#endif -+ if (sponsored_by != NULL) -+ svn_stringbuf_appendcstr(default_msg, sponsored_by); -+ svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Differential Revision:\t" APR_EOL_STR); - svn_stringbuf_appendcstr(default_msg, EDITOR_EOF_PREFIX); -- svn_stringbuf_appendcstr(default_msg, APR_EOL_STR APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Description of fields to fill in above: 76 columns --|" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> PR: If and which Problem Report is related." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Submitted by: If someone else sent in the change." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Reported by: If someone else reported the issue." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Reviewed by: If someone else reviewed your modification." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Approved by: If you needed approval for this commit." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Obtained from: If the change is from a third party." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> MFH: Ports tree branch name. Request approval for merge." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Relnotes: Set to 'yes' for mention in release notes." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Security: Vulnerability reference (one per line) or description." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Sponsored by: If the change was sponsored by an organization (each collaborator)." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed)." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Empty fields above will be automatically removed." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); - - *tmp_file = NULL; - if (lmb->message) -@@ -362,6 +475,7 @@ - /* Strip off the EOF marker text and the junk that follows it. */ - truncate_buffer_at_prefix(&(log_msg_str->len), (char *)log_msg_str->data, - EDITOR_EOF_PREFIX); -+ cleanmsg(NULL, (char*)log_msg_str->data); - - *log_msg = log_msg_str->data; - return SVN_NO_ERROR; -@@ -472,6 +586,13 @@ - if (message) - truncate_buffer_at_prefix(&message->len, message->data, - EDITOR_EOF_PREFIX); -+ /* -+ * Since we're adding freebsd-specific tokens to the log message, -+ * clean out any leftovers to avoid accidently sending them to other -+ * projects that won't be expecting them. -+ */ -+ if (message) -+ cleanmsg(&message->len, message->data); - - if (message) - { diff --git a/devel/subversion/Makefile b/devel/subversion/Makefile index b317b2fe8ee7..9b5b6f5e62e5 100644 --- a/devel/subversion/Makefile +++ b/devel/subversion/Makefile @@ -1,235 +1,231 @@ -PORTREVISION= 2 +PORTREVISION= 3 MAINTAINER= lev@FreeBSD.org COMMENT= Version control system WWW= https://subversion.apache.org/ CONFLICTS_INSTALL= subversion-lts USE_RC_SUBR= svnserve PORTDOCS= BUGS CHANGES COMMITTERS INSTALL README OPTIONS_DEFINE= \ BDB \ DOCS \ - FREEBSD_TEMPLATE\ GPG_AGENT \ NLS \ SASL \ SERF \ STATIC \ SVNSERVE_WRAPPER\ TEST \ TOOLS OPTIONS_DEFAULT=GPG_AGENT SERF TOOLS -FREEBSD_TEMPLATE_DESC= FreeBSD Project log template GPG_AGENT_DESC= Enable GPG agent password store SERF_DESC= WebDAV/Delta-V (HTTP/HTTPS) repo access module STATIC_DESC= No shared libs (disables SVN integration) SVNSERVE_WRAPPER_DESC= Enable svnserve wrapper (umask setter) TEST_DESC= Run subversion test suite TOOLS_DESC= Install several tools -# Patches required for use with the FreeBSD Project repository only -FREEBSD_TEMPLATE_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-fbsd-template SVNSERVE_WRAPPER_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-svnserve-wrapper USES+= shebangfix python:3.5+,env python_OLD_CMD+= "/bin/env python" SHEBANG_REGEX= ./tools/.* .include "Makefile.common" SVNREPOS?= /home/svn/repos SVNFSTYPE?= fsfs SVNGROUP?= svn SVNUSER?= svn CONFIGURE_ARGS+= --without-gnome-keyring \ --without-kwallet \ --with-apxs=no .if ${PORT_OPTIONS:MSVNSERVE_WRAPPER} SUB_LIST+= SVNSERVE_BIN_EXT=".bin" PLIST_SUB+= NO_SVNSERVE_WRAPPER="@comment " SVNSERVE_EXT= .bin .else SUB_LIST+= SVNSERVE_BIN_EXT="" PLIST_SUB+= NO_SVNSERVE_WRAPPER="" SVNSERVE_EXT= .endif .if ${PORT_OPTIONS:MTEST} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} .endif .if ${PORT_OPTIONS:MSTATIC} . if ${PORT_OPTIONS:MNLS} USES+= gettext-tools . endif . if ${PORT_OPTIONS:MBDB} BDB_BUILD_DEPENDS= yes . endif OLD_LIB_DEPENDS:= ${LIB_DEPENDS:S!^!${LOCALBASE}/lib/!:C!(\.so|\.[0-9]+)?:!.a:!} BUILD_DEPENDS+= ${OLD_LIB_DEPENDS} LIB_DEPENDS= .endif .if make(repository) WITH_REPOSITORY_CREATION= yes .endif .if defined(WITH_REPOSITORY_CREATION) MKREPOS_TARGET= _mkrepos .endif BINS_TO_STRIP= svn svnadmin svnbench svndumpfilter svnfsfs svnlook svnmucc \ svnrdump svnserve${SVNSERVE_EXT} svnsync svnversion TOOLS_TO_STRIP= fsfs-access-map svn-mergeinfo-normalizer \ svn-populate-node-origins-index svnauthz \ svnauthz-validate svnconflict svndiff svndiff3 \ svndiff4 svnmover svnraisetreeconflict x509-parser pre-everything:: @${ECHO_MSG} "" .if defined(WITH_REPOSITORY_CREATION) @${ECHO_MSG} "I will create (or use, if it exists) '${SVNUSER}' user and '${SVNGROUP}' group." @${ECHO_MSG} "Make sure that all committers are its members." @${ECHO_MSG} "" @${ECHO_MSG} "Repository will be created at '${SVNREPOS}' with user '${SVNUSER}' and group '${SVNGROUP}'." @${ECHO_MSG} "Type of repository will be '${SVNFSTYPE}'." @${ECHO_MSG} "You could change these settings by defining SVNREPOS, SVNGROUP and SVNFSTYPE." .else @${ECHO_MSG} "You can have the repository created for you by defining" @${ECHO_MSG} "WITH_REPOSITORY_CREATION." @${ECHO_MSG} "" @${ECHO_MSG} "Make sure that:" @${ECHO_MSG} "* all your svn users are members of a common group" @${ECHO_MSG} "* this group is the group id of the db/ and locks/" @${ECHO_MSG} " subdirectories of your repository" @${ECHO_MSG} "* the above subdirectories are writable by this group" .endif @${ECHO_MSG} "" .if ${PORT_OPTIONS:MSTATIC} @${ECHO_MSG} "Static binaries will be built." .endif # STATIC @${ECHO_MSG} "Many useful scripts will be installed into ${DATADIR}" pre-configure: .if ${PORT_OPTIONS:MBDB} @BDB_VERSION=`${APR_APU_DIR}/${APU_CONFIG} --db-version`; \ if [ "$${BDB_VERSION}" != "4" -a "$${BDB_VERSION}" != "5" -a "$${BDB_VERSION}" != "6" -a "$${BDB_VERSION}" != "18" ] ; then \ ${ECHO_MSG} "" ; \ ${ECHO_MSG} 'You should build `'"devel/apr1' with Berkeley DB (4, 5, 6 or 18) support to use subversion with it." ; \ ${ECHO_MSG} 'Please rebuild `'"devel/apr1' with option "'`'"BDB' and try again." ; \ ${ECHO_MSG} "" ; \ ${ECHO_MSG} "Or you can disable Berkeley DB support. Only 'fs' repository backend will be available." ; \ ${ECHO_MSG} "" ; \ ${FALSE} ; \ fi .endif .if ${PORT_OPTIONS:MSTATIC} LIBS_SQLITE3!= pkgconf --libs --static sqlite3 LIBS+= ${LIBS_SQLITE3} # for work with ICU LIBS+= -lc++ -lm .endif post-configure: # Enable GNOME Keyring / KWallet support in main code, as it is harmless @${REINPLACE_CMD} -E 's%.*#undef SVN_HAVE_(GNOME_KEYRING|KWALLET).*%#define SVN_HAVE_\1 1%' ${WRKSRC}/subversion/svn_private_config.h # ugly hack: save tools directory so we don't have to cleanup before installing @${CP} -R ${WRKSRC}/tools ${WRKSRC}/tools.examples @${CHMOD} -R a-st,o+rX ${WRKSRC}/tools.examples # takes a long time, and will fail but gives maintainer a good oversight .if ${PORT_OPTIONS:MTEST} test: build -@make check -C ${WRKSRC} .endif post-build-TOOLS-on: @${MAKE} -C ${WRKSRC} tools ${MAKE_ARGS} post-install: ${MKREPOS_TARGET} for F in ${BINS_TO_STRIP} ; do \ ${STRIP_CMD} "${STAGEDIR}${PREFIX}/bin/$${F}" ; \ done @${MKDIR} ${STAGEDIR}${DATADIR} (cd ${WRKSRC}/tools.examples && ${TAR} --exclude '*.in' -cf - * | ${TAR} -C ${STAGEDIR}${DATADIR} -xof - ) @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} post-install-STATIC-off: -@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so post-install-SVNSERVE_WRAPPER-on: @${INSTALL_SCRIPT} ${FILESDIR}/svnserve.wrapper ${STAGEDIR}${PREFIX}/bin/svnserve.sample post-install-TOOLS-on: @${MAKE} -C ${WRKSRC} install-tools ${MAKE_ARGS} for F in ${TOOLS_TO_STRIP} ; do \ ${STRIP_CMD} "${STAGEDIR}${PREFIX}/bin/$${F}" ; \ done # =============================================================================== repository: _mkrepos _SVNGRPFILES= db locks locks/db.lock locks/db-logs.lock SVNGRPFILES= ${_SVNGRPFILES:S,^,${SVNREPOS}/,} _mkrepos: .USE .if !exists(${SVNREPOS}) .if ${PORT_OPTIONS:MSVNSERVE_WRAPPER} @if /usr/sbin/pw groupshow "${SVNGROUP}" >/dev/null 2>&1; then \ ${ECHO_MSG} "You already have a group \"${SVNGROUP}\", so I will use it."; \ else \ if /usr/sbin/pw groupadd ${SVNGROUP} -h -; \ then \ ${ECHO_MSG} "Added group \"${SVNGROUP}\"."; \ else \ ${ECHO_MSG} "Adding group \"${SVNGROUP}\" failed..."; \ ${ECHO_MSG} "Please create it, and try again."; \ ${FALSE}; \ fi; \ fi @if /usr/sbin/pw usershow "${SVNUSER}" >/dev/null 2>&1; then \ ${ECHO_MSG} "You already have a user \"${SVNUSER}\", so I will use it."; \ else \ if /usr/sbin/pw useradd ${SVNUSER} -h -; \ then \ ${ECHO_MSG} "Added user \"${SVNUSER}\"."; \ else \ ${ECHO_MSG} "Adding user \"${SVNUSER}\" failed..."; \ ${ECHO_MSG} "Please create it, and try again."; \ ${FALSE}; \ fi; \ fi .endif @${MKDIR} ${SVNREPOS} @${PREFIX}/bin/svnadmin create --fs-type ${SVNFSTYPE} ${SVNREPOS} .if ${PORT_OPTIONS:MSVNSERVE_WRAPPER} @${CHOWN} ${SVNUSER}:${SVNGROUP} ${SVNGRPFILES} @${CHMOD} g+w ${SVNGRPFILES} @for i in ${SVNREPOS}/db/* ; do \ i=$${i##*/}; \ case $$i in \ DB_CONFIG|fs-type|uuid) ;; \ *) ${CHOWN} -R ${SVNUSER}:${SVNGROUP} ${SVNREPOS}/db/$$i; \ ${CHMOD} -R g+w ${SVNREPOS}/db/$$i; \ ;; \ esac; \ done .endif .endif svn-build-outputs-hack: (cd ${WRKSRC} && python gen-make.py --release --installed-libs libsvn_client,libsvn_delta,libsvn_diff,libsvn_fs,libsvn_fs_x,libsvn_ra,libsvn_repos,libsvn_subr,libsvn_wc) ${MV} ${WRKSRC}/build-outputs.mk ${FILESDIR}/build-outputs.mk.addons .include diff --git a/devel/subversion/files/extra-patch-fbsd-template b/devel/subversion/files/extra-patch-fbsd-template deleted file mode 100644 index ee4bf924c32e..000000000000 --- a/devel/subversion/files/extra-patch-fbsd-template +++ /dev/null @@ -1,164 +0,0 @@ ---- subversion/svn/util.c.orig 2015-02-28 13:37:27.000000000 +0300 -+++ subversion/svn/util.c 2016-03-19 16:53:13.016472654 +0300 -@@ -66,6 +66,9 @@ - #include "private/svn_client_private.h" - #include "private/svn_cmdline_private.h" - #include "private/svn_string_private.h" -+#ifdef HAS_ORGANIZATION_NAME -+#include "freebsd-organization.h" -+#endif - - - -@@ -331,6 +334,71 @@ - } - - -+/* -+ * Since we're adding freebsd-specific tokens to the log message, -+ * clean out any leftovers to avoid accidently sending them to other -+ * projects that won't be expecting them. -+ */ -+ -+static const char *prefixes[] = { -+ "PR:", -+ "Submitted by:", -+ "Reported by:", -+ "Reviewed by:", -+ "Approved by:", -+ "Obtained from:", -+ "MFC after:", -+ "MFH:", -+ "Relnotes:", -+ "Security:", -+ "Sponsored by:", -+ "Differential Revision:", -+}; -+ -+void -+cleanmsg(apr_size_t *l, char *s) -+{ -+ int i; -+ char *pos; -+ char *kw; -+ char *p; -+ int empty; -+ -+ for (i = 0; i < sizeof(prefixes) / sizeof(prefixes[0]); i++) { -+ pos = s; -+ while ((kw = strstr(pos, prefixes[i])) != NULL) { -+ /* Check to see if keyword is at start of line (or buffer) */ -+ if (!(kw == s || kw[-1] == '\r' || kw[-1] == '\n')) { -+ pos = kw + 1; -+ continue; -+ } -+ p = kw + strlen(prefixes[i]); -+ empty = 1; -+ while (1) { -+ if (*p == ' ' || *p == '\t') { -+ p++; -+ continue; -+ } -+ if (*p == '\0' || *p == '\r' || *p == '\n') -+ break; -+ empty = 0; -+ break; -+ } -+ if (empty && (*p == '\r' || *p == '\n')) { -+ memmove(kw, p + 1, strlen(p + 1) + 1); -+ if (l) -+ *l -= (p + 1 - kw); -+ } else if (empty) { -+ *kw = '\0'; -+ if (l) -+ *l -= (p - kw); -+ } else { -+ pos = p; -+ } -+ } -+ } -+} -+ - #define EDITOR_EOF_PREFIX _("--This line, and those below, will be ignored--") - - svn_error_t * -@@ -343,11 +411,56 @@ - svn_stringbuf_t *default_msg = NULL; - struct log_msg_baton *lmb = baton; - svn_stringbuf_t *message = NULL; -+ svn_config_t *cfg; -+ const char *mfc_after, *sponsored_by; -+ -+ cfg = lmb->config ? svn_hash_gets(lmb->config, SVN_CONFIG_CATEGORY_CONFIG) : NULL; - - /* Set default message. */ - default_msg = svn_stringbuf_create(APR_EOL_STR, pool); -+ svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "PR:\t\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Submitted by:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Reported by:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Reviewed by:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Approved by:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Obtained from:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "MFC after:\t"); -+ svn_config_get(cfg, &mfc_after, SVN_CONFIG_SECTION_MISCELLANY, "freebsd-mfc-after", NULL); -+ if (mfc_after != NULL) -+ svn_stringbuf_appendcstr(default_msg, mfc_after); -+ svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "MFH:\t\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Relnotes:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Security:\t" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Sponsored by:\t"); -+ svn_config_get(cfg, &sponsored_by, SVN_CONFIG_SECTION_MISCELLANY, "freebsd-sponsored-by", -+#ifdef HAS_ORGANIZATION_NAME -+ ORGANIZATION_NAME); -+#else -+ NULL); -+#endif -+ if (sponsored_by != NULL) -+ svn_stringbuf_appendcstr(default_msg, sponsored_by); -+ svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "Differential Revision:\t" APR_EOL_STR); - svn_stringbuf_appendcstr(default_msg, EDITOR_EOF_PREFIX); -- svn_stringbuf_appendcstr(default_msg, APR_EOL_STR APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Description of fields to fill in above: 76 columns --|" APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> PR: If and which Problem Report is related." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Submitted by: If someone else sent in the change." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Reported by: If someone else reported the issue." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Reviewed by: If someone else reviewed your modification." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Approved by: If you needed approval for this commit." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Obtained from: If the change is from a third party." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> MFH: Ports tree branch name. Request approval for merge." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Relnotes: Set to 'yes' for mention in release notes." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Security: Vulnerability reference (one per line) or description." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Sponsored by: If the change was sponsored by an organization (each collaborator)." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed)." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, "> Empty fields above will be automatically removed." APR_EOL_STR); -+ svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); - - *tmp_file = NULL; - if (lmb->message) -@@ -362,6 +475,7 @@ - /* Strip off the EOF marker text and the junk that follows it. */ - truncate_buffer_at_prefix(&(log_msg_str->len), (char *)log_msg_str->data, - EDITOR_EOF_PREFIX); -+ cleanmsg(NULL, (char*)log_msg_str->data); - - *log_msg = log_msg_str->data; - return SVN_NO_ERROR; -@@ -472,6 +586,13 @@ - if (message) - truncate_buffer_at_prefix(&message->len, message->data, - EDITOR_EOF_PREFIX); -+ /* -+ * Since we're adding freebsd-specific tokens to the log message, -+ * clean out any leftovers to avoid accidently sending them to other -+ * projects that won't be expecting them. -+ */ -+ if (message) -+ cleanmsg(&message->len, message->data); - - if (message) - {