diff --git a/devel/sope/Makefile b/devel/sope/Makefile index 03d6d5a42b1a..caf8817a6268 100644 --- a/devel/sope/Makefile +++ b/devel/sope/Makefile @@ -1,72 +1,87 @@ PORTNAME= sope PORTVERSION= 5.11.2 +PORTREVISION= 1 CATEGORIES= devel gnustep MASTER_SITES= https://packages.sogo.nu/sources/ DISTNAME= SOPE-${PORTVERSION} +PKGNAMESUFFIX= -${FLAVOR} MAINTAINER= acm@FreeBSD.org COMMENT= Extensive set of GNUstep web application frameworks WWW= https://sogo.nu/ LICENSE= LGPL20 -LIB_DEPENDS= libmemcached.so:databases/libmemcached +FLAVORS= mysql pgsql +FLAVOR?= ${FLAVORS[1]} USES= gmake gnome iconv gnustep USE_GNOME= libxml2 USE_GNUSTEP= base build USE_LDCONFIG= ${GNUSTEP_LOCAL_LIBRARIES} CONFIGURE_ARGS= --with-gnustep --disable-debug --disable-strip CONFIGURE_ENV+= CC="${CC}" LLD_UNSAFE= yes # PR 230608 -CONFLICTS= sope2 +mysql_CONFLICTS_INSTALL= sope2 ${PORTNAME}-pgsql +pgsql_CONFLICTS_INSTALL= sope2 ${PORTNAME}-mysql SUB_LIST+= GNUSTEP_LOCAL_TOOLS=${GNUSTEP_LOCAL_TOOLS} \ GNUSTEP_MAKEFILES=${GNUSTEP_MAKEFILES} WRKSRC= ${WRKDIR}/SOPE -OPTIONS_DEFINE= LDAP MYSQL PGSQL MEMCACHED -OPTIONS_DEFAULT= LDAP PGSQL MEMCACHED +OPTIONS_DEFINE= LDAP +OPTIONS_DEFAULT= LDAP + +OPTIONS_SINGLE_DATABASE=MYSQL PGSQL +OPTIONS_SINGLE= DATABASE +DATABASE_DESC= Database support + OPTIONS_SUB= yes LDAP_DESC= Build with LDAP support -MEMCACHED_DESC= Install memcached MYSQL_DESC= Build with MySQL support PGSQL_DESC= Build with PostgreSQL support LDAP_USES= ldap -MEMCACHED_RUN_DEPENDS= ${LOCALBASE}/bin/memcached:databases/memcached MYSQL_USES= mysql PGSQL_USES= pgsql +.if ${FLAVOR:U} == pgsql +OPTIONS_DEFAULT+= PGSQL +.endif + +.if ${FLAVOR:U} == mysql +OPTIONS_DEFAULT+= MYSQL +.endif + .include .if ${OPSYS} == FreeBSD CPPFLAGS+= -Wno-error=incompatible-function-pointer-types .endif post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|gcc|${CC}|g' ${WRKSRC}/sope-core/NGStreams/configure @${REINPLACE_CMD} -e 's|LDAP_OPT_ON|1|g' ${WRKSRC}/sope-ldap/NGLdap/NGLdapConnection.m .for f in config.guess config.sub @${CP} ${TEMPLATES}/$f ${WRKSRC}/sope-core/NGStreams/ .endfor post-patch-LDAP-off: @${REINPLACE_CMD} -e '/checkLinking "ldap"/d' ${WRKSRC}/configure post-patch-MYSQL-off: @${REINPLACE_CMD} -e '/checkLinking "mysqlclient"/d' ${WRKSRC}/configure post-patch-PGSQL-off: @${REINPLACE_CMD} -e '/checkLinking "pq"/d' ${WRKSRC}/configure do-configure: cd ${WRKSRC} ; . ${GNUSTEP_MAKEFILES}/GNUstep.sh ; ./configure ${CONFIGURE_ARGS} .include diff --git a/www/sogo/Makefile b/www/sogo/Makefile index 33b99616f73c..7a28fcd6f8f7 100644 --- a/www/sogo/Makefile +++ b/www/sogo/Makefile @@ -1,97 +1,127 @@ PORTNAME= sogo PORTVERSION= 5.11.2 +PORTREVISION= 1 CATEGORIES= www gnustep MASTER_SITES= https://packages.sogo.nu/sources/ DISTNAME= SOGo-${PORTVERSION} +PKGNAMESUFFIX= -${FLAVOR} MAINTAINER= acm@FreeBSD.org COMMENT= Groupware server with a focus on scalability and open standards WWW= https://sogo.nu/ LICENSE= GPLv2 +FLAVORS= mysql mysqlactivesync pgsql pgsqlactivesync +FLAVOR?= ${FLAVORS[1]} + LIB_DEPENDS= libmemcached.so:databases/libmemcached \ libcurl.so:ftp/curl \ libsodium.so:security/libsodium \ libzip.so:archivers/libzip \ - libDOM.so:devel/sope \ libytnef.so:converters/ytnef RUN_DEPENDS= zip:archivers/zip USES= cpe gettext-runtime gnustep objc pkgconfig shebangfix ssl CPE_VENDOR= inverse USE_GNUSTEP= base build USE_LDCONFIG= ${GNUSTEP_LOCAL_LIBRARIES}/sogo USE_RC_SUBR= sogod SHEBANG_LANG= python SHEBANG_FILES= ${WRKSRC}/SoObjects/SOGo/gen-saml2-exceptions.py CONFIGURE_ARGS+= --disable-debug --disable-strip -CONFLICTS?= sogo[2-4]-activesync sogo[2-4] +mysql_CONFLICTS_INSTALL= sogo2 ${PORTNAME}-pgsql ${PORTNAME}-pgsqlactivesync +pgsql_CONFLICTS_INSTALL= sogo2 ${PORTNAME}-mysql ${PORTNAME}-mysqlactivesync +mysqlactivesync_CONFLICTS_INSTALL=sogo2 ${PORTNAME}-pgsql ${PORTNAME}-pgsqlactivesync +pgsqlactivesync_CONFLICTS_INSTALL=sogo2 ${PORTNAME}-mysql ${PORTNAME}-mysqlactivesync -OPTIONS_DEFAULT= MFA -OPTIONS_DEFINE= ACTIVESYNC MFA SAML2 +OPTIONS_DEFAULT= MEMCACHED MFA SAML2 +OPTIONS_DEFINE= ACTIVESYNC MEMCACHED MFA SAML2 OPTIONS_SUB= yes +OPTIONS_SINGLE_DATABASE=MYSQL PGSQL +OPTIONS_SINGLE= DATABASE +DATABASE_DESC= Database support ACTIVESYNC_DESC= Enable support for ActiveSync protocol +MEMCACHED_DESC= Install memcached MFA_DESC= Enable support for multi-factor authentication SAML2_DESC= Enable support for SAML2 authentication ACTIVESYNC_LIB_DEPENDS= libwbxml2.so:textproc/libwbxml +MEMCACHED_RUN_DEPENDS= ${LOCALBASE}/bin/memcached:databases/memcached + MFA_LIB_DEPENDS= liboath.so:security/oath-toolkit MFA_CONFIGURE_ON= --enable-mfa SAML2_LIB_DEPENDS= liblasso.so:security/lasso SAML2_USES= python:build gnome SAML2_USE= gnome=glib20 SAML2_CONFIGURE_ON= --enable-saml2 +PGSQL_BUILD_DEPENDS= ${LOCALBASE}/GNUstep/Local/Library/GDLAdaptors-4.9/PostgreSQL.gdladaptor/PostgreSQL:devel/sope@pgsql +PGSQL_RUN_DEPENDS= ${LOCALBASE}/GNUstep/Local/Library/GDLAdaptors-4.9/PostgreSQL.gdladaptor/PostgreSQL:devel/sope@pgsql +MYSQL_BUILD_DEPENDS= ${LOCALBASE}/GNUstep/Local/Library/GDLAdaptors-4.9/MySQL.gdladaptor/MySQL:devel/sope@mysql +MYSQL_RUN_DEPENDS= ${LOCALBASE}/GNUstep/Local/Library/GDLAdaptors-4.9/MySQL.gdladaptor/MySQL:devel/sope@mysql + USERS= sogod GROUPS= sogod SUB_FILES+= pkg-message SUB_LIST+= GNUSTEP_LOCAL_TOOLS=${GNUSTEP_LOCAL_TOOLS} \ GNUSTEP_MAKEFILES=${GNUSTEP_MAKEFILES} -.include +.if ${FLAVOR:U} == pgsql +OPTIONS_DEFAULT+= PGSQL +.endif -.if ${OPSYS} == FreeBSD -CPPFLAGS+= -Wno-error=int-conversion +.if ${FLAVOR:U} == mysql +OPTIONS_DEFAULT+= MYSQL .endif +.if ${FLAVOR:U} == mysqlactivesync +OPTIONS_DEFAULT+= ACTIVESYNC MYSQL +.endif + +.if ${FLAVOR:U} == pgsqlactivesync +OPTIONS_DEFAULT+= ACTIVESYNC PGSQL +.endif + +.include + .if ${OPSYS} == FreeBSD -CPPFLAGS+= -Wno-error=incompatible-function-pointer-types +CPPFLAGS+= -Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types .endif 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 @${REINPLACE_CMD} -e 's|srcBuffer\[stringLength\]|srcBuffer\[stringLength+1\]|g' \ ${WRKSRC}/SoObjects/SOGo/NSData+Crypto.m @${RM} ${WRKSRC}/Scripts/*.bak 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} ${MKDIR} ${STAGEDIR}${DATADIR} ${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/ cd ${WRKSRC}/Scripts && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR} .include