diff --git a/www/sogo/Makefile b/www/sogo/Makefile new file mode 100644 index 000000000000..cde2ea1c7bbc --- /dev/null +++ b/www/sogo/Makefile @@ -0,0 +1,80 @@ +# $FreeBSD$ + +PORTNAME= sogo +PORTVERSION= 5.0.1 +CATEGORIES= www gnustep +MASTER_SITES= http://www.sogo.nu/files/downloads/SOGo/Sources/ +DISTNAME= SOGo-${PORTVERSION} + +MAINTAINER= acm@FreeBSD.org +COMMENT= Groupware server with a focus on scalability and open standards + +LICENSE= GPLv2 + +LIB_DEPENDS= libmemcached.so:databases/libmemcached \ + libcurl.so:ftp/curl \ + libsodium.so:security/libsodium \ + libzip.so:archivers/libzip \ + libDOM.so:devel/sope +RUN_DEPENDS= zip:archivers/zip + +OPTIONS_DEFAULT= MFA +OPTIONS_DEFINE= ACTIVESYNC MFA SAML2 +OPTIONS_SUB= yes + +ACTIVESYNC_DESC= Enable support for ActiveSync protocol +MFA_DESC= Enable support for multi-factor authentication +SAML2_DESC= Enable support for SAML2 authentication + +SAML2_USES= python:build gnome +SAML2_USE= gnome=glib20 + +ACTIVESYNC_LIB_DEPENDS= libwbxml2.so:textproc/wbxml2 +MFA_LIB_DEPENDS= liboath.so:security/oath-toolkit +SAML2_LIB_DEPENDS= liblasso.so:security/lasso + +MFA_CONFIGURE_ON= --enable-mfa +MFA_CONFIGURE_OFF= --disable-mfa +SAML2_CONFIGURE_ON= --enable-saml2 + +USERS= sogod +GROUPS= sogod +USES= gettext-runtime gnustep objc pkgconfig shebangfix ssl +USE_GNUSTEP= base build +USE_LDCONFIG= ${GNUSTEP_LOCAL_LIBRARIES}/sogo + +SHEBANG_LANG= python +SHEBANG_FILES= ${WRKSRC}/SoObjects/SOGo/gen-saml2-exceptions.py + +CONFLICTS?= sogo[2-4]-activesync-[0-9]* sogo[2-4]-[0-9]* + +USE_RC_SUBR= sogod + +SUB_FILES+= pkg-message +SUB_LIST+= GNUSTEP_LOCAL_TOOLS=${GNUSTEP_LOCAL_TOOLS} \ + GNUSTEP_MAKEFILES=${GNUSTEP_MAKEFILES} +CONFIGURE_ARGS+= --disable-debug --enable-strip + +post-patch: + @${GREP} -rlF '/etc/sogo' ${WRKSRC} \ + | ${XARGS} ${REINPLACE_CMD} 's#/etc/sogo#${PREFIX}/etc/sogo#g' + @${REINPLACE_CMD} -e 's|/usr/lib/GNUstep/|${LOCALBASE}/GNUstep/Local/Library|g' ${WRKSRC}/Apache/SOGo.conf + +post-patch-ACTIVESYNC-on: + @${REINPLACE_CMD} -e 's/Tools/Tools ActiveSync/' ${WRKSRC}/GNUmakefile + +do-configure: + cd ${WRKSRC} ; . ${GNUSTEP_MAKEFILES}/GNUstep.sh ; ./configure ${CONFIGURE_ARGS} + +post-install: + ${MKDIR} ${STAGEDIR}/var/spool/sogo + ${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/Scripts/sogo.conf ${STAGEDIR}${ETCDIR}/sogo.conf.sample + ${INSTALL_DATA} ${WRKSRC}/Apache/SOGo.conf ${STAGEDIR}${ETCDIR}/SOGo-Apache.conf.sample + ${INSTALL_DATA} ${WRKSRC}/Apache/SOGo-apple-ab.conf ${STAGEDIR}${ETCDIR}/SOGo-apple-ab.Apache.conf.sample + ${INSTALL_DATA} ${FILESDIR}/expire-autoreply.creds.sample ${STAGEDIR}${ETCDIR}/ + ${INSTALL_DATA} ${FILESDIR}/ealarms-notify.creds.sample ${STAGEDIR}${ETCDIR}/ + ${INSTALL_DATA} ${FILESDIR}/cron-ealarms-notify.sample ${STAGEDIR}${PREFIX}/GNUstep/Local/Tools/Admin/ + ${INSTALL_DATA} ${FILESDIR}/cron-expire-autoreply.sample ${STAGEDIR}${PREFIX}/GNUstep/Local/Tools/Admin/ + +.include diff --git a/www/sogo/distinfo b/www/sogo/distinfo new file mode 100644 index 000000000000..84c5f798ab9e --- /dev/null +++ b/www/sogo/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1606284903 +SHA256 (SOGo-5.0.1.tar.gz) = e2af4b0b1642dc6094043360bb4b3f3a653d63029139d5c41ed0585ac1b944ed +SIZE (SOGo-5.0.1.tar.gz) = 34678734 diff --git a/www/sogo/files/cron-ealarms-notify.sample b/www/sogo/files/cron-ealarms-notify.sample new file mode 100644 index 000000000000..bd7bd6342781 --- /dev/null +++ b/www/sogo/files/cron-ealarms-notify.sample @@ -0,0 +1,7 @@ +#!/bin/sh + +TZ=Europe/London; export TZ +PATH=$PATH:/usr/local/GNUstep/System/Tools; export PATH +. /usr/local/GNUstep/System/Library/Makefiles/GNUstep.sh + +/usr/local/GNUstep/Local/Tools/Admin/sogo-ealarms-notify -p /usr/local/etc/sogo/ealarms-notify.creds >> /var/log/sogo/cron-ealarms-notify.log 2>&1 diff --git a/www/sogo/files/cron-expire-autoreply.sample b/www/sogo/files/cron-expire-autoreply.sample new file mode 100644 index 000000000000..032c5f7eefd5 --- /dev/null +++ b/www/sogo/files/cron-expire-autoreply.sample @@ -0,0 +1,7 @@ +#!/bin/sh + +TZ=Europe/London; export TZ +PATH=$PATH:/usr/local/GNUstep/System/Tools; export PATH +. /usr/local/GNUstep/System/Library/Makefiles/GNUstep.sh + +/usr/local/GNUstep/Local/Tools/Admin/sogo-tool expire-autoreply -p /usr/local/etc/sogo/expire-autoreply.creds > /var/log/sogo/cron-expire-autoreply.out 2>&1 diff --git a/www/sogo/files/ealarms-notify.creds.sample b/www/sogo/files/ealarms-notify.creds.sample new file mode 100644 index 000000000000..9b3cde958144 --- /dev/null +++ b/www/sogo/files/ealarms-notify.creds.sample @@ -0,0 +1 @@ +username:password diff --git a/www/sogo/files/expire-autoreply.creds.sample b/www/sogo/files/expire-autoreply.creds.sample new file mode 100644 index 000000000000..9b3cde958144 --- /dev/null +++ b/www/sogo/files/expire-autoreply.creds.sample @@ -0,0 +1 @@ +username:password diff --git a/www/sogo/files/patch-ActiveSync_GNUmakefile b/www/sogo/files/patch-ActiveSync_GNUmakefile new file mode 100644 index 000000000000..5c56206ace77 --- /dev/null +++ b/www/sogo/files/patch-ActiveSync_GNUmakefile @@ -0,0 +1,11 @@ +--- ActiveSync/GNUmakefile.orig 2016-07-12 16:56:33 UTC ++++ ActiveSync/GNUmakefile +@@ -34,7 +34,7 @@ ActiveSync_RESOURCE_FILES += \ + ADDITIONAL_OBJCFLAGS += -Wno-deprecated-declarations + ADDITIONAL_INCLUDE_DIRS += -I../SOPE/ -I../SoObjects/ + ADDITIONAL_LIB_DIRS += -L../SOPE/GDLContentStore/obj/ -L../SOPE/NGCards/obj/ +-ADDITIONAL_INCLUDE_DIRS += -I/usr/include/libwbxml-1.0/ ++ADDITIONAL_INCLUDE_DIRS += -I${LOCALBASE}/include/libwbxml-1.0/ + ADDITIONAL_LDFLAGS += -Wl,--no-as-needed -lwbxml2 + + -include GNUmakefile.preamble diff --git a/www/sogo/files/patch-Main_GNUmakefile.preamble b/www/sogo/files/patch-Main_GNUmakefile.preamble new file mode 100644 index 000000000000..aa378d945f94 --- /dev/null +++ b/www/sogo/files/patch-Main_GNUmakefile.preamble @@ -0,0 +1,8 @@ +--- Main/GNUmakefile.preamble.orig 2016-07-12 16:56:34 UTC ++++ Main/GNUmakefile.preamble +@@ -22,4 +22,4 @@ $(SOGOD)_TOOL_LIBS += \ + -lNGObjWeb \ + -lNGMime -lNGLdap \ + -lNGStreams -lNGExtensions -lEOControl \ +- -lDOM -lSaxObjC ++ -lDOM -lSaxObjC -lSBJson diff --git a/www/sogo/files/patch-Tests_Unit_GNUmakefile b/www/sogo/files/patch-Tests_Unit_GNUmakefile new file mode 100644 index 000000000000..02c2a84baa88 --- /dev/null +++ b/www/sogo/files/patch-Tests_Unit_GNUmakefile @@ -0,0 +1,15 @@ +--- Tests/Unit/GNUmakefile.orig 2020-10-07 15:11:26.000000000 +0000 ++++ Tests/Unit/GNUmakefile 2020-11-18 10:55:28.954241000 +0000 +@@ -43,8 +43,11 @@ + -Wall -D_GNU_SOURCE -I../../SOPE/ -I../../SoObjects/ -I../../UI/ -I../../OpenChange + + ADDITIONAL_LIB_DIRS += \ +- -L../../SoObjects/SOGo/SOGo.framework/Versions/Current/sogo -L../../SOPE/NGCards/obj -L../../SOPE/GDLContentStore/obj -lSOGo -lNGMime -lNGCards -lGDLContentStore -lNGExtensions -lSBJson -lobjc \ +- -L/usr/local/lib -lSaxObjC -lNGStreams \ ++ -L../../SoObjects/SOGo/SOGo.framework/Versions/Current/sogo -L../../SOPE/NGCards/obj -L../../SOPE/GDLContentStore/obj \ ++ -lSOGo -lNGMime -lNGCards -lGDLContentStore -lNGExtensions \ ++ -lSBJson -lGDLAccess -lNGObjWeb -lNGStreams -lEOControl -lDOM \ ++ -lNGLdap -lobjc \ ++ -L${LOCALBASE}/lib -lSaxObjC \ + -Wl,-rpath,../../SoObjects/SOGo/SOGo.framework/Versions/Current/sogo -Wl,-rpath,../../SOPE/NGCards/obj -Wl,-rpath,../../SOPE/GDLContentStore/obj + ADDITIONAL_LDFLAGS += -Wl,--no-as-needed diff --git a/www/sogo/files/patch-Tools_GNUmakefile.preamble b/www/sogo/files/patch-Tools_GNUmakefile.preamble new file mode 100644 index 000000000000..65bf13f26828 --- /dev/null +++ b/www/sogo/files/patch-Tools_GNUmakefile.preamble @@ -0,0 +1,9 @@ +--- Tools/GNUmakefile.preamble.orig 2016-07-12 16:56:44 UTC ++++ Tools/GNUmakefile.preamble +@@ -13,4 +13,5 @@ ADDITIONAL_LIB_DIRS += \ + -L../SoObjects/SOGo/SOGo.framework/sogo -lSOGo \ + -L../SOPE/GDLContentStore/$(GNUSTEP_OBJ_DIR)/ -lGDLContentStore \ + -L../SOPE/NGCards/$(GNUSTEP_OBJ_DIR)/ -lNGCards \ +- -lEOControl -lNGStreams -lNGMime -lNGExtensions -lNGObjWeb ++ -lEOControl -lNGStreams -lNGMime -lNGExtensions -lNGObjWeb \ ++ -lGDLAccess -lDOM -lSaxObjC -lNGLdap -lSBJson -lWEExtensions diff --git a/www/sogo/files/patch-UI-MailPartViewers_UIxMailPartEncryptedViewer.m b/www/sogo/files/patch-UI-MailPartViewers_UIxMailPartEncryptedViewer.m new file mode 100644 index 000000000000..af912631dc0f --- /dev/null +++ b/www/sogo/files/patch-UI-MailPartViewers_UIxMailPartEncryptedViewer.m @@ -0,0 +1,18 @@ +--- UI/MailPartViewers/UIxMailPartEncryptedViewer.m 2019-12-09 16:41:38.841316000 -0500 ++++ UI/MailPartViewers/UIxMailPartEncryptedViewer.m 2019-12-09 16:42:17.792368000 -0500 +@@ -171,13 +171,13 @@ + if (err) + { + #ifdef HAVE_GNUTLS +- const char* sslError; ++ NSString* sslError; + ERR_load_crypto_strings(); + SSL_load_error_strings(); + sslError = ERR_reason_error_string(err); + validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : @"No error information available"]] retain]; + #elif OPENSSL_VERSION_NUMBER < 0x10100000L +- const char* sslError; ++ NSString* sslError; + ERR_load_crypto_strings(); + SSL_load_error_strings(); + sslError = ERR_reason_error_string(err); diff --git a/www/sogo/files/patch-UI-MailPartViewers_UIxMailPartSignedViewer.m b/www/sogo/files/patch-UI-MailPartViewers_UIxMailPartSignedViewer.m new file mode 100644 index 000000000000..507a2be2ec9c --- /dev/null +++ b/www/sogo/files/patch-UI-MailPartViewers_UIxMailPartSignedViewer.m @@ -0,0 +1,18 @@ +--- UI/MailPartViewers/UIxMailPartSignedViewer.m 2018-10-23 14:22:36.000000000 -0500 ++++ UI/MailPartViewers/UIxMailPartSignedViewer.m 2018-11-06 13:02:05.090224000 -0500 +@@ -169,13 +169,13 @@ + if (err) + { + #ifdef HAVE_GNUTLS +- const char* sslError; ++ NSString* sslError; + ERR_load_crypto_strings(); + SSL_load_error_strings(); + sslError = ERR_reason_error_string(err); + validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : @"No error information available"]] retain]; + #elif OPENSSL_VERSION_NUMBER < 0x10100000L +- const char* sslError; ++ NSString* sslError; + ERR_load_crypto_strings(); + SSL_load_error_strings(); + sslError = ERR_reason_error_string(err); diff --git a/www/sogo/files/patch-general.make b/www/sogo/files/patch-general.make new file mode 100644 index 000000000000..d97256eeef86 --- /dev/null +++ b/www/sogo/files/patch-general.make @@ -0,0 +1,16 @@ +--- general.make.orig 2020-12-24 01:44:13.874889000 -0500 ++++ general.make 2020-12-24 01:44:34.714359000 -0500 +@@ -16,6 +16,7 @@ + ADDITIONAL_OBJCFLAGS=-O2 + ifeq ($(debug),yes) + ADDITIONAL_OBJCFLAGS=-O0 ++ADDITIONAL_OBJCFLAGS += -g $(call cc-option,-frecord-gcc-switches) + else + ADDITIONAL_OBJCFLAGS=-Wuninitialized + endif +@@ -23,5 +24,3 @@ + # information plus the compiler flags used; that can + # be afterwards read with: + # readelf -p .GCC.command.line /path/to/elf_file +-ADDITIONAL_OBJCFLAGS += -g $(call cc-option,-frecord-gcc-switches) +- diff --git a/www/sogo/files/pkg-message.in b/www/sogo/files/pkg-message.in new file mode 100644 index 000000000000..9baf3e5aa606 --- /dev/null +++ b/www/sogo/files/pkg-message.in @@ -0,0 +1,61 @@ +[ +{ type: install + message: <