diff options
author | Koop Mast <kwm@rainbow-runner.nl> | 2019-09-14 15:46:01 +0800 |
---|---|---|
committer | Koop Mast <kwm@rainbow-runner.nl> | 2019-09-14 15:46:01 +0800 |
commit | fe87ebd172e9d689d85015844fb5a85fb32b3e50 (patch) | |
tree | 958ebf674156898f1471c7935ce7eae2ef9908dd /mail | |
parent | f44e2881c913e6863249652cf73fca4a93296a47 (diff) | |
parent | 98a57491f987db2e46a747d8c66690c5180e2916 (diff) | |
download | freebsd-ports-gnome-fe87ebd172e9d689d85015844fb5a85fb32b3e50.tar.gz freebsd-ports-gnome-fe87ebd172e9d689d85015844fb5a85fb32b3e50.tar.zst freebsd-ports-gnome-fe87ebd172e9d689d85015844fb5a85fb32b3e50.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mail')
28 files changed, 1034 insertions, 84 deletions
diff --git a/mail/Makefile b/mail/Makefile index ad087b1e6528..4ee03707d9ed 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -36,6 +36,8 @@ SUBDIR += bincimap SUBDIR += bmf SUBDIR += bogofilter + SUBDIR += bogofilter-kc + SUBDIR += bogofilter-lmdb SUBDIR += bogofilter-sqlite SUBDIR += bogofilter-tc SUBDIR += bsfilter @@ -96,6 +98,7 @@ SUBDIR += dma SUBDIR += dot-forward SUBDIR += dovecot + SUBDIR += dovecot-fts-xapian SUBDIR += dovecot-pigeonhole SUBDIR += dspam SUBDIR += ecartis diff --git a/mail/bogofilter-kc/Makefile b/mail/bogofilter-kc/Makefile new file mode 100644 index 000000000000..d6c1a0235557 --- /dev/null +++ b/mail/bogofilter-kc/Makefile @@ -0,0 +1,21 @@ +# $FreeBSD$ + +PORTNAME= bogofilter +PORTREVISION= 0 +CATEGORIES= mail +PKGNAMESUFFIX= -kc + +MAINTAINER= mandree@FreeBSD.org + +LIB_DEPENDS= libkyotocabinet.so:databases/kyotocabinet + +CONFLICTS_INSTALL= bogofilter-[0-9]* bogofilter-lmdb-[0-9]* bogofilter-sqlite-[0-9]* bogofilter-tc-[0-9]* + +CONFIGURE_ARGS= --with-database=kyotocabinet +BF_CPPFLAGS= -I${LOCALBASE}/include +BF_LIBS= +DESCR= ${PKGDIR}/pkg-descr + +MASTERDIR= ${.CURDIR}/../bogofilter + +.include "${MASTERDIR}/Makefile" diff --git a/mail/bogofilter-lmdb/Makefile b/mail/bogofilter-lmdb/Makefile new file mode 100644 index 000000000000..1c0068bd3670 --- /dev/null +++ b/mail/bogofilter-lmdb/Makefile @@ -0,0 +1,21 @@ +# $FreeBSD$ + +PORTNAME= bogofilter +PORTREVISION= 0 +CATEGORIES= mail +PKGNAMESUFFIX= -lmdb + +MAINTAINER= mandree@FreeBSD.org + +LIB_DEPENDS= liblmdb.so:databases/lmdb + +CONFLICTS_INSTALL= bogofilter-[0-9]* bogofilter-kc-[0-9]* bogofilter-sqlite-[0-9]* *bogofilter-tc-[0-9]* + +CONFIGURE_ARGS= --with-database=lmdb +BF_CPPFLAGS= -I${LOCALBASE}/include +BF_LIBS= +DESCR= ${PKGDIR}/pkg-descr + +MASTERDIR= ${.CURDIR}/../bogofilter + +.include "${MASTERDIR}/Makefile" diff --git a/mail/bogofilter-sqlite/Makefile b/mail/bogofilter-sqlite/Makefile index 963813e95b3b..07f2a58c2b1f 100644 --- a/mail/bogofilter-sqlite/Makefile +++ b/mail/bogofilter-sqlite/Makefile @@ -2,14 +2,13 @@ # $FreeBSD$ PORTNAME= bogofilter -PORTREVISION= 4 CATEGORIES= mail PKGNAMESUFFIX= -sqlite MAINTAINER= mandree@FreeBSD.org USES= sqlite -CONFLICTS_INSTALL= bogofilter-[0-9]* bogofilter-qdbm-[0-9]* bogofilter-tc-[0-9]* [a-z][a-z]-bogofilter-[0-9]* +CONFLICTS_INSTALL= bogofilter-[0-9]* bogofilter-lmdb-[0-9]* bogofilter-kc-[0-9]* bogofilter-tc-[0-9]* CONFIGURE_ARGS= --with-database=sqlite BF_CPPFLAGS= -I${LOCALBASE}/include diff --git a/mail/bogofilter-tc/Makefile b/mail/bogofilter-tc/Makefile index f1a672b5b867..9e03b3e6eb9b 100644 --- a/mail/bogofilter-tc/Makefile +++ b/mail/bogofilter-tc/Makefile @@ -2,16 +2,18 @@ # $FreeBSD$ PORTNAME= bogofilter -PORTREVISION= 3 CATEGORIES= mail PKGNAMESUFFIX= -tc +DEPRECATED= TokyoCabinet is being phased out in favor of KyotoCabinet. +EXPIRATION_DATE=2020-12-31 + MAINTAINER= mandree@FreeBSD.org # Blanket approval for changes by Zach Thompson (address above) LIB_DEPENDS= libtokyocabinet.so:databases/tokyocabinet -CONFLICTS_INSTALL= bogofilter-[0-9]* [a-z][a-z]-bogofilter-[1-9]* bogofilter-sqlite-[0-9]* bogofilter-qdbm-[0-9]* +CONFLICTS_INSTALL= bogofilter-[0-9]* bogofilter-sqlite-[0-9]* bogofilter-kc-[0-9]* bogofilter-lmdb-[0-9]* CONFIGURE_ARGS= --with-database=tokyocabinet BF_CPPFLAGS= -I${LOCALBASE}/include diff --git a/mail/bogofilter/Makefile b/mail/bogofilter/Makefile index a244c05ba566..a07141515ce1 100644 --- a/mail/bogofilter/Makefile +++ b/mail/bogofilter/Makefile @@ -2,10 +2,10 @@ # $FreeBSD$ PORTNAME= bogofilter -PORTVERSION= 1.2.4 -PORTREVISION?= 8 +DISTVERSION= 1.2.5.rc1 +PORTREVISION?= 0 CATEGORIES?= mail -MASTER_SITES= SF/bogofilter/bogofilter-current/bogofilter-${PORTVERSION} +MASTER_SITES= SF/bogofilter/bogofilter-current/bogofilter-1.2.5/ MAINTAINER?= mandree@FreeBSD.org COMMENT= Fast, teachable, learning spam detector @@ -22,9 +22,13 @@ OPTIONS_DEFAULT= GSL UNICODE GSL_DESC= Link with system-wide GSL dynamically (recommended) UNICODE_DESC= Normalize tokens to Unicode (UTF-8) (recommended) -CONFLICTS_INSTALL?= bogofilter-sqlite-[0-9]* bogofilter-qdbm-[0-9]* bogofilter-tc-[0-9]* [a-z][a-z]-bogofilter-[0-9]* +CONFLICTS_INSTALL?= bogofilter-sqlite-[0-9]* bogofilter-tc-[0-9]* bogofilter-lmdb-[0-9]* \ + bogofilter-kc-[0-9]* -USES+= cpe perl5 shebangfix tar:bzip2 +# XXX FIXME: autoreconf:build should not be required, +# but something hoses timestamps on src/tests/Makefile.am +# but not src/tests/Makefile.in. +USES+= autoreconf:build cpe perl5 shebangfix tar:xz SHEBANG_FILES= contrib/randomtrain.sh contrib/scramble.sh \ src/tests/unsort.pl contrib/*.pl USE_PERL5= run @@ -59,16 +63,16 @@ post-patch: -e 's/ENVIRON_TESTS = t.abort/ENVIRON_TESTS =/' \ ${WRKSRC}/src/tests/Makefile.am -# XXX: disable self-tests until issue with automake-1.13 is sorted out -# post-build:: -# cd ${WRKSRC}/src && make check SHELL=${SH} +post-build: + cd ${WRKSRC}/src && ${SETENV} SHELL=${SH} ${MAKE_CMD} ${TEST_TARGET} ${_MAKE_JOBS} SHELL=${SH} \ + || { r=$$? ; head -n30000 ${WRKSRC}/src/tests/test-suite.log ; exit $$r ; } -post-install:: +post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR}/contrib .for i in html programmer xml @${MKDIR} ${STAGEDIR}${DOCSDIR}/${i} .endfor -.for i in AUTHORS COPYING INSTALL NEWS README README.svn \ +.for i in AUTHORS COPYING INSTALL NEWS README README.git \ doc/README.validation TODO GETTING.STARTED \ RELEASE.NOTES doc/README.db doc/README.sqlite \ doc/integrating-with-postfix doc/integrating-with-qmail \ diff --git a/mail/bogofilter/distinfo b/mail/bogofilter/distinfo index edf94524a2e7..18176c8f62d7 100644 --- a/mail/bogofilter/distinfo +++ b/mail/bogofilter/distinfo @@ -1,2 +1,3 @@ -SHA256 (bogofilter-1.2.4.tar.bz2) = e10287a58d135feaea26880ce7d4b9fa2841fb114a2154bf7da8da98aab0a6b4 -SIZE (bogofilter-1.2.4.tar.bz2) = 887848 +TIMESTAMP = 1567975270 +SHA256 (bogofilter-1.2.5.rc1.tar.xz) = 62a9a00ca575b1253bafd5ae308049cbf388816e5ef0a9a18ee8167cf6c42680 +SIZE (bogofilter-1.2.5.rc1.tar.xz) = 802008 diff --git a/mail/crm114/Makefile b/mail/crm114/Makefile index 5e4e5787a17c..e68b744d8fca 100644 --- a/mail/crm114/Makefile +++ b/mail/crm114/Makefile @@ -3,7 +3,7 @@ PORTNAME= crm114 PORTVERSION= 20100106 -PORTREVISION= 2 +PORTREVISION= 3 # WARNING change versionname in CRM114RELEASENAME too. # portlint didn't like this variable at this place. # So I have to put it down in this file. @@ -14,7 +14,7 @@ MASTER_SITES= http://crm114.sourceforge.net/tarballs/ # .css extention. DISTNAME= ${PORTNAME}-${PORTVERSION}-${CRM114RELEASENAME}.src -MAINTAINER= chalpin@cs.wisc.edu +MAINTAINER= ports@FreeBSD.org COMMENT= Markov based SpamFilter LICENSE= GPLv2 @@ -23,7 +23,7 @@ LIB_DEPENDS= libtre.so:textproc/libtre CRM114RELEASENAME=BlameMichelson -USES= gettext iconv +USES= gettext-runtime USE_CSTD=gnu89 OPTIONS_DEFINE= NORMALIZEMIME DOCS EXAMPLES @@ -35,7 +35,7 @@ MAKE_ARGS= CC="${CC}" prefix="${STAGEDIR}${PREFIX}" \ CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -LIBS+= -L${LOCALBASE}/lib ${ICONV_LIB} -lintl +LIBS+= -L${LOCALBASE}/lib -lintl CFLAGS+= -DVERSION='\"${PORTVERSION}-${CRM114RELEASENAME}\"' CFLAGS+= -DNO_LOGL @@ -57,6 +57,12 @@ post-patch: # Peter Jeremy recommended the use of b64decode and md5 20040302 post-install: + ${STRIP_CMD} \ + ${STAGEDIR}${PREFIX}/bin/crm \ + ${STAGEDIR}${PREFIX}/bin/cssdiff \ + ${STAGEDIR}${PREFIX}/bin/cssutil \ + ${STAGEDIR}${PREFIX}/bin/osbf-util \ + ${STAGEDIR}${PREFIX}/bin/cssmerge @${REINPLACE_CMD} -Ee 's|^(.*/openssl base64 -d/)|#\1|' \ -e 's|/mewdecode/|/b64decode -pr/|' ${WRKSRC}/mailfilter.cf @${REINPLACE_CMD} -e 's|/md5sum/|/md5 -r/|' \ diff --git a/mail/dovecot-fts-xapian/Makefile b/mail/dovecot-fts-xapian/Makefile new file mode 100644 index 000000000000..cc44a72adca8 --- /dev/null +++ b/mail/dovecot-fts-xapian/Makefile @@ -0,0 +1,35 @@ +# $FreeBSD$ + +PORTNAME= fts-xapian +PORTVERSION= 1.2.1 +PORTREVISION= 1 +CATEGORIES= mail +PKGNAMEPREFIX= dovecot- + +MAINTAINER= bapt@FreeBSD.org +COMMENT= Dovecot FTS plugin based on Xapian + +LICENSE= LGPL21 + +LIB_DEPENDS= libxapian.so:databases/xapian-core \ + libicuuc.so:devel/icu +BUILD_DEPENDS= dovecot>=2.3.7:mail/dovecot +RUN_DEPENDS= dovecot>=2.3.7:mail/dovecot + +USES= autoreconf libtool pkgconfig + +USE_LDCONFIG= yes + +USE_GITHUB=yes +GH_ACCOUNT= grosjo +GH_TAGNAME= ${PORTNAME}-${PORTVERSION} + +GNU_CONFIGURE= yes + +PLIST_FILES= lib/dovecot/lib21_fts_xapian_plugin.a \ + lib/dovecot/lib21_fts_xapian_plugin.so + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/dovecot/lib21_fts_xapian_plugin.so + +.include <bsd.port.mk> diff --git a/mail/dovecot-fts-xapian/distinfo b/mail/dovecot-fts-xapian/distinfo new file mode 100644 index 000000000000..8aed9f022c74 --- /dev/null +++ b/mail/dovecot-fts-xapian/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1568284001 +SHA256 (grosjo-fts-xapian-1.2.1-fts-xapian-1.2.1_GH0.tar.gz) = 9c8dbaa3ddf5f489356a3ec40af012c02aaa6af7ae513ade5b208d3d19771277 +SIZE (grosjo-fts-xapian-1.2.1-fts-xapian-1.2.1_GH0.tar.gz) = 27267 diff --git a/mail/dovecot-fts-xapian/files/patch-reduce-verbosity b/mail/dovecot-fts-xapian/files/patch-reduce-verbosity new file mode 100644 index 000000000000..b3dcf493a18d --- /dev/null +++ b/mail/dovecot-fts-xapian/files/patch-reduce-verbosity @@ -0,0 +1,74 @@ +diff --git src/fts-backend-xapian-functions.cpp src/fts-backend-xapian-functions.cpp +index e7f8324..ed0ab1a 100644 +--- src/fts-backend-xapian-functions.cpp ++++ src/fts-backend-xapian-functions.cpp +@@ -35,7 +35,6 @@ class XQuerySet + bool item_neg; // for the term + long qsize; + long limit; +- bool display; + + XQuerySet() + { +@@ -45,7 +44,6 @@ class XQuerySet + header=NULL; + text=NULL; + global_neg=false; +- display=false; + } + + XQuerySet(bool is_and, bool is_neg, long l) +@@ -57,7 +55,6 @@ class XQuerySet + text=NULL; + global_and=is_and; + global_neg=is_neg; +- display=true; + } + + ~XQuerySet() +@@ -293,7 +290,7 @@ class XQuerySet + + char *s = i_strdup(get_string().c_str()); + +- if(display) { i_info("FTS Xapian: Query= %s",s); } ++ i_debug("FTS Xapian: Query= %s",s); + + qp->set_database(*db); + +@@ -452,7 +449,7 @@ static void fts_backend_xapian_oldbox(struct xapian_fts_backend *backend) + } + /* End Performance calculator*/ + +- i_info("FTS Xapian: Done indexing '%s' (%ld msgs in %ld ms, rate: %.1f)",backend->oldbox,backend->perf_nb,dt,r); ++ i_debug("FTS Xapian: Done indexing '%s' (%ld msgs in %ld ms, rate: %.1f)",backend->oldbox,backend->perf_nb,dt,r); + i_free(backend->oldbox); + backend->oldbox=NULL; + } +diff --git src/fts-backend-xapian.cpp src/fts-backend-xapian.cpp +index 5ff83d0..d55852c 100644 +--- src/fts-backend-xapian.cpp ++++ src/fts-backend-xapian.cpp +@@ -442,12 +442,12 @@ static int fts_backend_xapian_lookup(struct fts_backend *_backend, struct mailbo + + if((flags & FTS_LOOKUP_FLAG_AND_ARGS) != 0) + { +- i_info("FTS Xapian: FLAG=AND"); ++ i_debug("FTS Xapian: FLAG=AND"); + is_and=true; + } + else + { +- i_info("FTS Xapian: FLAG=OR"); ++ i_debug("FTS Xapian: FLAG=OR"); + } + + XQuerySet * qs = new XQuerySet(is_and,false,backend->partial); +@@ -480,7 +480,7 @@ static int fts_backend_xapian_lookup(struct fts_backend *_backend, struct mailbo + /* Performance calc */ + gettimeofday(&tp, NULL); + dt = tp.tv_sec * 1000 + tp.tv_usec / 1000 - dt; +- i_info("FTS Xapian: %ld results in %ld ms",n,dt); ++ i_debug("FTS Xapian: %ld results in %ld ms",n,dt); + + return 0; + } diff --git a/mail/dovecot-fts-xapian/files/patch-src_fts-backend-xapian.cpp b/mail/dovecot-fts-xapian/files/patch-src_fts-backend-xapian.cpp new file mode 100644 index 000000000000..de42b3940487 --- /dev/null +++ b/mail/dovecot-fts-xapian/files/patch-src_fts-backend-xapian.cpp @@ -0,0 +1,13 @@ +--- src/fts-backend-xapian.cpp.orig 2019-08-18 16:36:45 UTC ++++ src/fts-backend-xapian.cpp +@@ -115,9 +115,7 @@ static int fts_backend_xapian_init(struct fts_backend + } + + const char * path = mailbox_list_get_root_forced(_backend->ns->list, MAILBOX_LIST_PATH_TYPE_INDEX); +- long l=strlen(path)+strlen(XAPIAN_FILE_PREFIX)+2; +- backend->path = (char *)i_malloc(l*sizeof(char)); +- snprintf(backend->path,l,"%s/%s",path,XAPIAN_FILE_PREFIX); ++ backend->path = i_strconcat(path, "/" XAPIAN_FILE_PREFIX, NULL); + + struct stat sb; + if(!( (stat(backend->path, &sb)==0) && S_ISDIR(sb.st_mode))) diff --git a/mail/dovecot-fts-xapian/pkg-descr b/mail/dovecot-fts-xapian/pkg-descr new file mode 100644 index 000000000000..c10d90f14bd5 --- /dev/null +++ b/mail/dovecot-fts-xapian/pkg-descr @@ -0,0 +1,8 @@ +This project intends to provide a straightforward and simple way to configure +FTS plugin for Dovecot, leveraging the efforts by the Xapian.org team. + +This effort came after Dovecot team decided to deprecate "fts_squat" included in +the dovecot core, and due to the complexity of the Solr plugin capabilitles, +un-needed for most users. + +WWW: https://github.com/grosjo/fts-xapian diff --git a/mail/libspf2/Makefile b/mail/libspf2/Makefile index 129ad28cfcf5..a42d52371d11 100644 --- a/mail/libspf2/Makefile +++ b/mail/libspf2/Makefile @@ -9,7 +9,7 @@ MASTER_SITES= http://www.libspf2.org/spf/ \ LOCAL/sunpoet MAINTAINER= sunpoet@FreeBSD.org -COMMENT= Sender Rewriting Scheme 2 C Implementation +COMMENT= Sender Policy Framework 2 C Implementation LICENSE= BSD2CLAUSE LGPL21 LGPL3 LICENSE_COMB= dual diff --git a/mail/libsrs2/Makefile b/mail/libsrs2/Makefile index 4ff8d48f789a..d10df17c12f9 100644 --- a/mail/libsrs2/Makefile +++ b/mail/libsrs2/Makefile @@ -5,11 +5,16 @@ PORTNAME= libsrs2 PORTVERSION= 1.0.18 PORTREVISION= 4 CATEGORIES= mail -MASTER_SITES= http://www.libsrs2.org/srs/ +MASTER_SITES= https://www.libsrs2.org/srs/ MAINTAINER= pi@FreeBSD.org COMMENT= Sender Rewriting Scheme 2 C Implementation +LICENSE= BSD3CLAUSE GPLv2 +LICENSE_COMB= dual +LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE.BSD +LICENSE_FILE_GPLv2= ${WRKSRC}/LICENSE.GPL-2 + CONFLICTS= p5-Mail-SRS* USES= libtool diff --git a/mail/libsrs2/pkg-descr b/mail/libsrs2/pkg-descr index 61592b55f453..a14711211aa2 100644 --- a/mail/libsrs2/pkg-descr +++ b/mail/libsrs2/pkg-descr @@ -1,4 +1,4 @@ libsrs2 is the next generation SRS library from the original designer of SRS. It implements the Sender Rewriting Scheme, a part of the SPF/SRS protocol pair. -WWW: http://www.libsrs2.org/ +WWW: https://www.libsrs2.org/ diff --git a/mail/p5-Sisimai/Makefile b/mail/p5-Sisimai/Makefile index dd0a03422e97..f2ef5c30d3d5 100644 --- a/mail/p5-Sisimai/Makefile +++ b/mail/p5-Sisimai/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= Sisimai -PORTVERSION= 4.25.2 +PORTVERSION= 4.25.3 DISTVERSIONPREFIX= v CATEGORIES= mail perl5 MASTER_SITES= CPAN diff --git a/mail/p5-Sisimai/distinfo b/mail/p5-Sisimai/distinfo index 2f2a394a52e1..b62aad78274b 100644 --- a/mail/p5-Sisimai/distinfo +++ b/mail/p5-Sisimai/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1564837264 -SHA256 (Sisimai-v4.25.2.tar.gz) = 308b52fa07e153b2940df45d0d2a8a09b8e0660698943dfca5c0e108e64c9649 -SIZE (Sisimai-v4.25.2.tar.gz) = 1202287 +TIMESTAMP = 1567842516 +SHA256 (Sisimai-v4.25.3.tar.gz) = 102936c7f345b0266fbd4408af981c17a3bd988768e59fb99da03119cb27b8ce +SIZE (Sisimai-v4.25.3.tar.gz) = 1204149 diff --git a/mail/sieve-connect/Makefile b/mail/sieve-connect/Makefile index cf7474668d9c..63c2a0f8fcaf 100644 --- a/mail/sieve-connect/Makefile +++ b/mail/sieve-connect/Makefile @@ -2,12 +2,11 @@ # $FreeBSD$ PORTNAME= sieve-connect -DISTVERSION= 0.89 -PORTREVISION= 1 +DISTVERSION= 0.90 CATEGORIES= mail MASTER_SITES= http://people.spodhuis.org/phil.pennock/software/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= bapt@FreeBSD.org COMMENT= Command-line client for the MANAGESIEVE protocol LICENSE= BSD3CLAUSE diff --git a/mail/sieve-connect/distinfo b/mail/sieve-connect/distinfo index f4c5a6e2ba90..e989a4b4a0d6 100644 --- a/mail/sieve-connect/distinfo +++ b/mail/sieve-connect/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1531954128 -SHA256 (sieve-connect-0.89.tar.bz2) = 6d8962516458a27d4d904cfb370db01ca7e495e61c966f236ba6b65f5b4caa5f -SIZE (sieve-connect-0.89.tar.bz2) = 45683 +TIMESTAMP = 1568022315 +SHA256 (sieve-connect-0.90.tar.bz2) = 4a188ba50009170b5a7a51cbd0dbaab972eb1e42a3ad7c2d8d22fb63f2f77603 +SIZE (sieve-connect-0.90.tar.bz2) = 46481 diff --git a/mail/sieve-connect/files/patch-sieve-connect.pl b/mail/sieve-connect/files/patch-sieve-connect.pl deleted file mode 100644 index 26c66da83ed9..000000000000 --- a/mail/sieve-connect/files/patch-sieve-connect.pl +++ /dev/null @@ -1,29 +0,0 @@ ---- sieve-connect.pl.orig 2019-05-23 07:31:11 UTC -+++ sieve-connect.pl -@@ -927,7 +927,7 @@ if (defined $realm) { - if (/^"(.*)"\r?\n?$/) { - $challenge = $1; - } else { -- unless (/^{(\d+)\+?}\r?$/m) { -+ unless (/^\{(\d+)\+?}\r?$/m) { - sfinish $sock, "*"; - closedie($sock, "Failure to parse server SASL response.\n"); - } -@@ -1510,7 +1510,7 @@ sub sieve_download - warn qq{Empty script "$remotefn"? Not saved.\n}; - return; - } -- unless (/^{(\d+)\+?}\r?$/m) { -+ unless (/^\{(\d+)\+?}\r?$/m) { - die "QUIT:Failed to parse server response to GETSCRIPT"; - } - my $contentdata = $_; -@@ -1526,7 +1526,7 @@ sub sieve_download - or die "write-open($localfn) failed: $!\n"; - $oldouthandle = select $fh; - } -- $contentdata =~ s/^{\d+\+?}\r?\n?//m; -+ $contentdata =~ s/^\{\d+\+?}\r?\n?//m; - print $contentdata; - select $oldouthandle if defined $oldouthandle; - if (defined $fh) { diff --git a/mail/sieve-connect/pkg-descr b/mail/sieve-connect/pkg-descr index 4fb636f6a4f1..53994abd8998 100644 --- a/mail/sieve-connect/pkg-descr +++ b/mail/sieve-connect/pkg-descr @@ -17,4 +17,4 @@ sieve-connect is designed to be both a tool which can be invoked from scripts and also a decent interactive client. It should also be a drop-in replacement for "sieveshell", as supplied with Cyrus IMAP. -WWW: https://people.spodhuis.org/phil.pennock/software/ +WWW: https://github.com/philpennock/sieve-connect diff --git a/mail/simscan/Makefile b/mail/simscan/Makefile index c33f6ece3ce0..bccdd3f584ed 100644 --- a/mail/simscan/Makefile +++ b/mail/simscan/Makefile @@ -91,12 +91,6 @@ CONFIGURE_ARGS+=--enable-qmail-queue=${QMAIL_QUEUE} PORTDOCS= AUTHORS ChangeLog README TODO -if ! ${TEST} -f ${QMAIL_QUEUE}; then \ - ${ECHO_MSG} "Unable to find qmail-queue binary trying '${QMAIL_QUEUE}'."; \ - ${ECHO_MSG} "Please set QMAIL_PREFIX to your qmail installation directory !"; \ - exit 1; \ -fi - post-patch: @${REINPLACE_CMD} -E 's,($f/daily.cvd"),\1 || test -d "$$f/daily.inc",' \ ${WRKSRC}/configure diff --git a/mail/smtprelay/Makefile b/mail/smtprelay/Makefile index 2b6c93f55494..18e0979611cb 100644 --- a/mail/smtprelay/Makefile +++ b/mail/smtprelay/Makefile @@ -2,7 +2,7 @@ PORTNAME= smtprelay DISTVERSIONPREFIX=v -DISTVERSION= 1.2.0 +DISTVERSION= 1.3.0 CATEGORIES= mail MASTER_SITES= https://code.bluelife.at/decke/smtprelay/archive/ \ LOCAL/decke/smtprelay/ @@ -15,15 +15,13 @@ COMMENT= Simple Go SMTP relay/proxy server LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -USES= go +USES= go:modules USE_RC_SUBR= smtprelay USE_GITHUB= nodefault GH_TUPLE= chrj:smtpd:v0.1.2:smtpd/vendor/github.com/chrj/smtpd \ vharitonsky:iniflags:a33cd0b5f3de:iniflags/vendor/github.com/vharitonsky/iniflags \ - golang:crypto:505ab145d0a9:golang/vendor/golang.org/x/crypto - -MAKE_ENV+= GOFLAGS=-mod=vendor + golang:crypto:9756ffdc2472:golang/vendor/golang.org/x/crypto PLIST_FILES= bin/${PORTNAME} \ "@sample ${ETCDIR}/smtprelay.ini.sample" diff --git a/mail/smtprelay/distinfo b/mail/smtprelay/distinfo index e641783f398e..185ef074c6bb 100644 --- a/mail/smtprelay/distinfo +++ b/mail/smtprelay/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1546979068 -SHA256 (smtprelay/v1.2.0.tar.gz) = 924864ecaeeebb52895d1b16a25a9ad7ac407b9000c2c83ec1763d106cbf145e -SIZE (smtprelay/v1.2.0.tar.gz) = 8960 +TIMESTAMP = 1567882351 +SHA256 (smtprelay/v1.3.0.tar.gz) = b5eca3889beb56b0c4632905ddde5df0ca9dd57249a3f7eabe531d5944e62f4c +SIZE (smtprelay/v1.3.0.tar.gz) = 9650 SHA256 (smtprelay/chrj-smtpd-v0.1.2_GH0.tar.gz) = f290b7233bf781222e40184f32bfa4550424f96a9d69cbb75241d744080eb8f7 SIZE (smtprelay/chrj-smtpd-v0.1.2_GH0.tar.gz) = 13676 SHA256 (smtprelay/vharitonsky-iniflags-a33cd0b5f3de_GH0.tar.gz) = d60f3292be138071158e47e794c2ba93ea9dfc866c44e6472833e2d8566024aa SIZE (smtprelay/vharitonsky-iniflags-a33cd0b5f3de_GH0.tar.gz) = 7498 -SHA256 (smtprelay/golang-crypto-505ab145d0a9_GH0.tar.gz) = 33a4ff7a15a69640a7ce2c65ba94680643554b744c69f3ed3623bd9557c985e7 -SIZE (smtprelay/golang-crypto-505ab145d0a9_GH0.tar.gz) = 1644681 +SHA256 (smtprelay/golang-crypto-9756ffdc2472_GH0.tar.gz) = 6af409930c3a9313b33f9b8da1a2c24da8ffa07c4fcd55356a77a2f09a0d6326 +SIZE (smtprelay/golang-crypto-9756ffdc2472_GH0.tar.gz) = 1693048 diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile index 0bd2f861213d..01ed1701cde5 100644 --- a/mail/thunderbird/Makefile +++ b/mail/thunderbird/Makefile @@ -3,10 +3,10 @@ PORTNAME= thunderbird DISTVERSION= 68.1.0 -PORTREVISION= 2 +PORTREVISION= 4 CATEGORIES= mail news net-im ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ - MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build2/source + MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build3/source DISTFILES= ${DISTNAME}.source${EXTRACT_SUFX} MAINTAINER= gecko@FreeBSD.org diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo index 84baffda75f9..60c3a909b64c 100644 --- a/mail/thunderbird/distinfo +++ b/mail/thunderbird/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1567687294 -SHA256 (thunderbird-68.1.0.source.tar.xz) = a7880622859a8560b65c725f8f0e8c99424cc9efdd2dffeb606b29decda7fd40 -SIZE (thunderbird-68.1.0.source.tar.xz) = 333358404 +TIMESTAMP = 1568072652 +SHA256 (thunderbird-68.1.0.source.tar.xz) = de0e5c7d1d5576f451e386e4779f155b7af97621a4e22caac0c6dee3c9d76eef +SIZE (thunderbird-68.1.0.source.tar.xz) = 333332920 diff --git a/mail/thunderbird/files/patch-cubeb-dlopen b/mail/thunderbird/files/patch-cubeb-dlopen new file mode 100644 index 000000000000..9314ede79256 --- /dev/null +++ b/mail/thunderbird/files/patch-cubeb-dlopen @@ -0,0 +1,793 @@ +https://github.com/kinetiknz/cubeb/pull/539 + +diff --git media/libcubeb/gtest/moz.build media/libcubeb/gtest/moz.build +index 1ff0c02545251..ca364d1ef7845 100644 +--- media/libcubeb/gtest/moz.build ++++ media/libcubeb/gtest/moz.build +@@ -67,13 +67,6 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit': + '-framework CoreFoundation', + '-framework AudioToolbox', + ] +-elif CONFIG['OS_TARGET'] == 'OpenBSD': +- OS_LIBS += [ +- 'sndio', +- ] +-else: +- OS_LIBS += CONFIG['MOZ_ALSA_LIBS'] +- OS_LIBS += CONFIG['MOZ_PULSEAUDIO_LIBS'] + + if CONFIG['CC_TYPE'] in ('clang', 'gcc'): + CXXFLAGS += ['-Wno-error=shadow'] +diff --git media/libcubeb/src/cubeb.c media/libcubeb/src/cubeb.c +index 98a735f..db294b3 100644 +--- media/libcubeb/src/cubeb.c ++++ media/libcubeb/src/cubeb.c +@@ -180,6 +180,9 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam + #if defined(USE_JACK) + jack_init, + #endif ++#if defined(USE_SNDIO) ++ sndio_init, ++#endif + #if defined(USE_ALSA) + alsa_init, + #endif +@@ -192,9 +195,6 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam + #if defined(USE_WINMM) + winmm_init, + #endif +-#if defined(USE_SNDIO) +- sndio_init, +-#endif + #if defined(USE_OPENSL) + opensl_init, + #endif +diff --git media/libcubeb/src/cubeb_alsa.c media/libcubeb/src/cubeb_alsa.c +index bfd4d8f..a29eed0 100644 +--- media/libcubeb/src/cubeb_alsa.c ++++ media/libcubeb/src/cubeb_alsa.c +@@ -14,10 +14,58 @@ + #include <limits.h> + #include <poll.h> + #include <unistd.h> ++#include <dlfcn.h> + #include <alsa/asoundlib.h> + #include "cubeb/cubeb.h" + #include "cubeb-internal.h" + ++#ifdef DISABLE_LIBASOUND_DLOPEN ++#define WRAP(x) x ++#else ++#define WRAP(x) cubeb_##x ++#define LIBASOUND_API_VISIT(X) \ ++ X(snd_config) \ ++ X(snd_config_add) \ ++ X(snd_config_copy) \ ++ X(snd_config_delete) \ ++ X(snd_config_get_id) \ ++ X(snd_config_get_string) \ ++ X(snd_config_imake_integer) \ ++ X(snd_config_search) \ ++ X(snd_config_search_definition) \ ++ X(snd_lib_error_set_handler) \ ++ X(snd_pcm_avail_update) \ ++ X(snd_pcm_close) \ ++ X(snd_pcm_delay) \ ++ X(snd_pcm_drain) \ ++ X(snd_pcm_frames_to_bytes) \ ++ X(snd_pcm_get_params) \ ++ X(snd_pcm_hw_params_any) \ ++ X(snd_pcm_hw_params_get_channels_max) \ ++ X(snd_pcm_hw_params_get_rate) \ ++ X(snd_pcm_hw_params_set_rate_near) \ ++ X(snd_pcm_hw_params_sizeof) \ ++ X(snd_pcm_nonblock) \ ++ X(snd_pcm_open) \ ++ X(snd_pcm_open_lconf) \ ++ X(snd_pcm_pause) \ ++ X(snd_pcm_poll_descriptors) \ ++ X(snd_pcm_poll_descriptors_count) \ ++ X(snd_pcm_poll_descriptors_revents) \ ++ X(snd_pcm_readi) \ ++ X(snd_pcm_recover) \ ++ X(snd_pcm_set_params) \ ++ X(snd_pcm_start) \ ++ X(snd_pcm_state) \ ++ X(snd_pcm_writei) \ ++ ++#define MAKE_TYPEDEF(x) static typeof(x) * cubeb_##x; ++LIBASOUND_API_VISIT(MAKE_TYPEDEF); ++#undef MAKE_TYPEDEF ++/* snd_pcm_hw_params_alloca is actually a macro */ ++#define snd_pcm_hw_params_sizeof cubeb_snd_pcm_hw_params_sizeof ++#endif ++ + #define CUBEB_STREAM_MAX 16 + #define CUBEB_WATCHDOG_MS 10000 + +@@ -36,6 +84,7 @@ static struct cubeb_ops const alsa_ops; + + struct cubeb { + struct cubeb_ops const * ops; ++ void * libasound; + + pthread_t thread; + +@@ -245,8 +294,8 @@ set_timeout(struct timeval * timeout, unsigned int ms) + static void + stream_buffer_decrement(cubeb_stream * stm, long count) + { +- char * bufremains = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, count); +- memmove(stm->buffer, bufremains, snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes - count)); ++ char * bufremains = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, count); ++ memmove(stm->buffer, bufremains, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes - count)); + stm->bufframes -= count; + } + +@@ -278,9 +327,9 @@ alsa_process_stream(cubeb_stream * stm) + /* Call _poll_descriptors_revents() even if we don't use it + to let underlying plugins clear null events. Otherwise poll() + may wake up again and again, producing unnecessary CPU usage. */ +- snd_pcm_poll_descriptors_revents(stm->pcm, stm->fds, stm->nfds, &revents); ++ WRAP(snd_pcm_poll_descriptors_revents)(stm->pcm, stm->fds, stm->nfds, &revents); + +- avail = snd_pcm_avail_update(stm->pcm); ++ avail = WRAP(snd_pcm_avail_update)(stm->pcm); + + /* Got null event? Bail and wait for another wakeup. */ + if (avail == 0) { +@@ -303,7 +352,7 @@ alsa_process_stream(cubeb_stream * stm) + // TODO: should it be marked as DRAINING? + } + +- got = snd_pcm_readi(stm->pcm, stm->buffer+stm->bufframes, avail); ++ got = WRAP(snd_pcm_readi)(stm->pcm, stm->buffer+stm->bufframes, avail); + + if (got < 0) { + avail = got; // the error handler below will recover us +@@ -347,7 +396,7 @@ alsa_process_stream(cubeb_stream * stm) + (!stm->other_stream || stm->other_stream->bufframes > 0)) { + long got = avail - stm->bufframes; + void * other_buffer = stm->other_stream ? stm->other_stream->buffer : NULL; +- char * buftail = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes); ++ char * buftail = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes); + + /* Correct read size to the other stream available frames */ + if (stm->other_stream && got > (snd_pcm_sframes_t) stm->other_stream->bufframes) { +@@ -374,8 +423,8 @@ alsa_process_stream(cubeb_stream * stm) + long drain_frames = avail - stm->bufframes; + double drain_time = (double) drain_frames / stm->params.rate; + +- char * buftail = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes); +- memset(buftail, 0, snd_pcm_frames_to_bytes(stm->pcm, drain_frames)); ++ char * buftail = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes); ++ memset(buftail, 0, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, drain_frames)); + stm->bufframes = avail; + + /* Mark as draining, unless we're waiting for capture */ +@@ -402,7 +451,7 @@ alsa_process_stream(cubeb_stream * stm) + } + } + +- wrote = snd_pcm_writei(stm->pcm, stm->buffer, avail); ++ wrote = WRAP(snd_pcm_writei)(stm->pcm, stm->buffer, avail); + if (wrote < 0) { + avail = wrote; // the error handler below will recover us + } else { +@@ -415,13 +464,13 @@ alsa_process_stream(cubeb_stream * stm) + + /* Got some error? Let's try to recover the stream. */ + if (avail < 0) { +- avail = snd_pcm_recover(stm->pcm, avail, 0); ++ avail = WRAP(snd_pcm_recover)(stm->pcm, avail, 0); + + /* Capture pcm must be started after initial setup/recover */ + if (avail >= 0 && + stm->stream_type == SND_PCM_STREAM_CAPTURE && +- snd_pcm_state(stm->pcm) == SND_PCM_STATE_PREPARED) { +- avail = snd_pcm_start(stm->pcm); ++ WRAP(snd_pcm_state)(stm->pcm) == SND_PCM_STATE_PREPARED) { ++ avail = WRAP(snd_pcm_start)(stm->pcm); + } + } + +@@ -537,26 +586,26 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm) + + slave_def = NULL; + +- r = snd_config_search(root_pcm, "slave", &slave_pcm); ++ r = WRAP(snd_config_search)(root_pcm, "slave", &slave_pcm); + if (r < 0) { + return NULL; + } + +- r = snd_config_get_string(slave_pcm, &string); ++ r = WRAP(snd_config_get_string)(slave_pcm, &string); + if (r >= 0) { +- r = snd_config_search_definition(lconf, "pcm_slave", string, &slave_def); ++ r = WRAP(snd_config_search_definition)(lconf, "pcm_slave", string, &slave_def); + if (r < 0) { + return NULL; + } + } + + do { +- r = snd_config_search(slave_def ? slave_def : slave_pcm, "pcm", &pcm); ++ r = WRAP(snd_config_search)(slave_def ? slave_def : slave_pcm, "pcm", &pcm); + if (r < 0) { + break; + } + +- r = snd_config_get_string(slave_def ? slave_def : slave_pcm, &string); ++ r = WRAP(snd_config_get_string)(slave_def ? slave_def : slave_pcm, &string); + if (r < 0) { + break; + } +@@ -565,7 +614,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm) + if (r < 0 || r > (int) sizeof(node_name)) { + break; + } +- r = snd_config_search(lconf, node_name, &pcm); ++ r = WRAP(snd_config_search)(lconf, node_name, &pcm); + if (r < 0) { + break; + } +@@ -574,7 +623,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm) + } while (0); + + if (slave_def) { +- snd_config_delete(slave_def); ++ WRAP(snd_config_delete)(slave_def); + } + + return NULL; +@@ -597,22 +646,22 @@ init_local_config_with_workaround(char const * pcm_name) + + lconf = NULL; + +- if (snd_config == NULL) { ++ if (*WRAP(snd_config) == NULL) { + return NULL; + } + +- r = snd_config_copy(&lconf, snd_config); ++ r = WRAP(snd_config_copy)(&lconf, *WRAP(snd_config)); + if (r < 0) { + return NULL; + } + + do { +- r = snd_config_search_definition(lconf, "pcm", pcm_name, &pcm_node); ++ r = WRAP(snd_config_search_definition)(lconf, "pcm", pcm_name, &pcm_node); + if (r < 0) { + break; + } + +- r = snd_config_get_id(pcm_node, &string); ++ r = WRAP(snd_config_get_id)(pcm_node, &string); + if (r < 0) { + break; + } +@@ -621,7 +670,7 @@ init_local_config_with_workaround(char const * pcm_name) + if (r < 0 || r > (int) sizeof(node_name)) { + break; + } +- r = snd_config_search(lconf, node_name, &pcm_node); ++ r = WRAP(snd_config_search)(lconf, node_name, &pcm_node); + if (r < 0) { + break; + } +@@ -632,12 +681,12 @@ init_local_config_with_workaround(char const * pcm_name) + } + + /* Fetch the PCM node's type, and bail out if it's not the PulseAudio plugin. */ +- r = snd_config_search(pcm_node, "type", &node); ++ r = WRAP(snd_config_search)(pcm_node, "type", &node); + if (r < 0) { + break; + } + +- r = snd_config_get_string(node, &string); ++ r = WRAP(snd_config_get_string)(node, &string); + if (r < 0) { + break; + } +@@ -648,18 +697,18 @@ init_local_config_with_workaround(char const * pcm_name) + + /* Don't clobber an explicit existing handle_underrun value, set it only + if it doesn't already exist. */ +- r = snd_config_search(pcm_node, "handle_underrun", &node); ++ r = WRAP(snd_config_search)(pcm_node, "handle_underrun", &node); + if (r != -ENOENT) { + break; + } + + /* Disable pcm_pulse's asynchronous underrun handling. */ +- r = snd_config_imake_integer(&node, "handle_underrun", 0); ++ r = WRAP(snd_config_imake_integer)(&node, "handle_underrun", 0); + if (r < 0) { + break; + } + +- r = snd_config_add(pcm_node, node); ++ r = WRAP(snd_config_add)(pcm_node, node); + if (r < 0) { + break; + } +@@ -667,7 +716,7 @@ init_local_config_with_workaround(char const * pcm_name) + return lconf; + } while (0); + +- snd_config_delete(lconf); ++ WRAP(snd_config_delete)(lconf); + + return NULL; + } +@@ -679,9 +728,9 @@ alsa_locked_pcm_open(snd_pcm_t ** pcm, char const * pcm_name, snd_pcm_stream_t s + + pthread_mutex_lock(&cubeb_alsa_mutex); + if (local_config) { +- r = snd_pcm_open_lconf(pcm, pcm_name, stream, SND_PCM_NONBLOCK, local_config); ++ r = WRAP(snd_pcm_open_lconf)(pcm, pcm_name, stream, SND_PCM_NONBLOCK, local_config); + } else { +- r = snd_pcm_open(pcm, pcm_name, stream, SND_PCM_NONBLOCK); ++ r = WRAP(snd_pcm_open)(pcm, pcm_name, stream, SND_PCM_NONBLOCK); + } + pthread_mutex_unlock(&cubeb_alsa_mutex); + +@@ -694,7 +743,7 @@ alsa_locked_pcm_close(snd_pcm_t * pcm) + int r; + + pthread_mutex_lock(&cubeb_alsa_mutex); +- r = snd_pcm_close(pcm); ++ r = WRAP(snd_pcm_close)(pcm); + pthread_mutex_unlock(&cubeb_alsa_mutex); + + return r; +@@ -750,6 +799,7 @@ silent_error_handler(char const * file, int line, char const * function, + alsa_init(cubeb ** context, char const * context_name) + { + (void)context_name; ++ void * libasound = NULL; + cubeb * ctx; + int r; + int i; +@@ -760,9 +810,27 @@ alsa_init(cubeb ** context, char const * context_name) + assert(context); + *context = NULL; + ++#ifndef DISABLE_LIBASOUND_DLOPEN ++ libasound = dlopen("libasound.so", RTLD_LAZY); ++ if (!libasound) { ++ return CUBEB_ERROR; ++ } ++ ++#define LOAD(x) { \ ++ cubeb_##x = dlsym(libasound, #x); \ ++ if (!cubeb_##x) { \ ++ dlclose(libasound); \ ++ return CUBEB_ERROR; \ ++ } \ ++ } ++ ++ LIBASOUND_API_VISIT(LOAD); ++#undef LOAD ++#endif ++ + pthread_mutex_lock(&cubeb_alsa_mutex); + if (!cubeb_alsa_error_handler_set) { +- snd_lib_error_set_handler(silent_error_handler); ++ WRAP(snd_lib_error_set_handler)(silent_error_handler); + cubeb_alsa_error_handler_set = 1; + } + pthread_mutex_unlock(&cubeb_alsa_mutex); +@@ -771,6 +839,7 @@ alsa_init(cubeb ** context, char const * context_name) + assert(ctx); + + ctx->ops = &alsa_ops; ++ ctx->libasound = libasound; + + r = pthread_mutex_init(&ctx->mutex, NULL); + assert(r == 0); +@@ -819,7 +888,7 @@ alsa_init(cubeb ** context, char const * context_name) + config fails with EINVAL, the PA PCM is too old for this workaround. */ + if (r == -EINVAL) { + pthread_mutex_lock(&cubeb_alsa_mutex); +- snd_config_delete(ctx->local_config); ++ WRAP(snd_config_delete)(ctx->local_config); + pthread_mutex_unlock(&cubeb_alsa_mutex); + ctx->local_config = NULL; + } else if (r >= 0) { +@@ -861,10 +930,14 @@ alsa_destroy(cubeb * ctx) + + if (ctx->local_config) { + pthread_mutex_lock(&cubeb_alsa_mutex); +- snd_config_delete(ctx->local_config); ++ WRAP(snd_config_delete)(ctx->local_config); + pthread_mutex_unlock(&cubeb_alsa_mutex); + } + ++ if (ctx->libasound) { ++ dlclose(ctx->libasound); ++ } ++ + free(ctx); + } + +@@ -948,7 +1021,7 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream + return CUBEB_ERROR; + } + +- r = snd_pcm_nonblock(stm->pcm, 1); ++ r = WRAP(snd_pcm_nonblock)(stm->pcm, 1); + assert(r == 0); + + latency_us = latency_frames * 1e6 / stm->params.rate; +@@ -961,7 +1034,7 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream + latency_us = latency_us < min_latency ? min_latency: latency_us; + } + +- r = snd_pcm_set_params(stm->pcm, format, SND_PCM_ACCESS_RW_INTERLEAVED, ++ r = WRAP(snd_pcm_set_params)(stm->pcm, format, SND_PCM_ACCESS_RW_INTERLEAVED, + stm->params.channels, stm->params.rate, 1, + latency_us); + if (r < 0) { +@@ -969,20 +1042,20 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream + return CUBEB_ERROR_INVALID_FORMAT; + } + +- r = snd_pcm_get_params(stm->pcm, &stm->buffer_size, &period_size); ++ r = WRAP(snd_pcm_get_params)(stm->pcm, &stm->buffer_size, &period_size); + assert(r == 0); + + /* Double internal buffer size to have enough space when waiting for the other side of duplex connection */ + stm->buffer_size *= 2; +- stm->buffer = calloc(1, snd_pcm_frames_to_bytes(stm->pcm, stm->buffer_size)); ++ stm->buffer = calloc(1, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->buffer_size)); + assert(stm->buffer); + +- stm->nfds = snd_pcm_poll_descriptors_count(stm->pcm); ++ stm->nfds = WRAP(snd_pcm_poll_descriptors_count)(stm->pcm); + assert(stm->nfds > 0); + + stm->saved_fds = calloc(stm->nfds, sizeof(struct pollfd)); + assert(stm->saved_fds); +- r = snd_pcm_poll_descriptors(stm->pcm, stm->saved_fds, stm->nfds); ++ r = WRAP(snd_pcm_poll_descriptors)(stm->pcm, stm->saved_fds, stm->nfds); + assert((nfds_t) r == stm->nfds); + + if (alsa_register_stream(ctx, stm) != 0) { +@@ -1054,7 +1127,7 @@ alsa_stream_destroy(cubeb_stream * stm) + pthread_mutex_lock(&stm->mutex); + if (stm->pcm) { + if (stm->state == DRAINING) { +- snd_pcm_drain(stm->pcm); ++ WRAP(snd_pcm_drain)(stm->pcm); + } + alsa_locked_pcm_close(stm->pcm); + stm->pcm = NULL; +@@ -1100,12 +1173,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels) + + assert(stm); + +- r = snd_pcm_hw_params_any(stm->pcm, hw_params); ++ r = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params); + if (r < 0) { + return CUBEB_ERROR; + } + +- r = snd_pcm_hw_params_get_channels_max(hw_params, max_channels); ++ r = WRAP(snd_pcm_hw_params_get_channels_max)(hw_params, max_channels); + if (r < 0) { + return CUBEB_ERROR; + } +@@ -1126,34 +1199,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) { + + /* get a pcm, disabling resampling, so we get a rate the + * hardware/dmix/pulse/etc. supports. */ +- r = snd_pcm_open(&pcm, CUBEB_ALSA_PCM_NAME, SND_PCM_STREAM_PLAYBACK, SND_PCM_NO_AUTO_RESAMPLE); ++ r = WRAP(snd_pcm_open)(&pcm, CUBEB_ALSA_PCM_NAME, SND_PCM_STREAM_PLAYBACK, SND_PCM_NO_AUTO_RESAMPLE); + if (r < 0) { + return CUBEB_ERROR; + } + +- r = snd_pcm_hw_params_any(pcm, hw_params); ++ r = WRAP(snd_pcm_hw_params_any)(pcm, hw_params); + if (r < 0) { +- snd_pcm_close(pcm); ++ WRAP(snd_pcm_close)(pcm); + return CUBEB_ERROR; + } + +- r = snd_pcm_hw_params_get_rate(hw_params, rate, &dir); ++ r = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir); + if (r >= 0) { + /* There is a default rate: use it. */ +- snd_pcm_close(pcm); ++ WRAP(snd_pcm_close)(pcm); + return CUBEB_OK; + } + + /* Use a common rate, alsa may adjust it based on hw/etc. capabilities. */ + *rate = 44100; + +- r = snd_pcm_hw_params_set_rate_near(pcm, hw_params, rate, NULL); ++ r = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL); + if (r < 0) { +- snd_pcm_close(pcm); ++ WRAP(snd_pcm_close)(pcm); + return CUBEB_ERROR; + } + +- snd_pcm_close(pcm); ++ WRAP(snd_pcm_close)(pcm); + + return CUBEB_OK; + } +@@ -1186,10 +1259,10 @@ alsa_stream_start(cubeb_stream * stm) + pthread_mutex_lock(&stm->mutex); + /* Capture pcm must be started after initial setup/recover */ + if (stm->stream_type == SND_PCM_STREAM_CAPTURE && +- snd_pcm_state(stm->pcm) == SND_PCM_STATE_PREPARED) { +- snd_pcm_start(stm->pcm); ++ WRAP(snd_pcm_state)(stm->pcm) == SND_PCM_STATE_PREPARED) { ++ WRAP(snd_pcm_start)(stm->pcm); + } +- snd_pcm_pause(stm->pcm, 0); ++ WRAP(snd_pcm_pause)(stm->pcm, 0); + gettimeofday(&stm->last_activity, NULL); + pthread_mutex_unlock(&stm->mutex); + +@@ -1229,7 +1302,7 @@ alsa_stream_stop(cubeb_stream * stm) + pthread_mutex_unlock(&ctx->mutex); + + pthread_mutex_lock(&stm->mutex); +- snd_pcm_pause(stm->pcm, 1); ++ WRAP(snd_pcm_pause)(stm->pcm, 1); + pthread_mutex_unlock(&stm->mutex); + + return CUBEB_OK; +@@ -1245,8 +1318,8 @@ alsa_stream_get_position(cubeb_stream * stm, uint64_t * position) + pthread_mutex_lock(&stm->mutex); + + delay = -1; +- if (snd_pcm_state(stm->pcm) != SND_PCM_STATE_RUNNING || +- snd_pcm_delay(stm->pcm, &delay) != 0) { ++ if (WRAP(snd_pcm_state)(stm->pcm) != SND_PCM_STATE_RUNNING || ++ WRAP(snd_pcm_delay)(stm->pcm, &delay) != 0) { + *position = stm->last_position; + pthread_mutex_unlock(&stm->mutex); + return CUBEB_OK; +@@ -1271,7 +1344,7 @@ alsa_stream_get_latency(cubeb_stream * stm, uint32_t * latency) + snd_pcm_sframes_t delay; + /* This function returns the delay in frames until a frame written using + snd_pcm_writei is sent to the DAC. The DAC delay should be < 1ms anyways. */ +- if (snd_pcm_delay(stm->pcm, &delay)) { ++ if (WRAP(snd_pcm_delay)(stm->pcm, &delay)) { + return CUBEB_ERROR; + } + +diff --git media/libcubeb/src/cubeb_sndio.c media/libcubeb/src/cubeb_sndio.c +index 9e99b2c..0559af4 100644 +--- media/libcubeb/src/cubeb_sndio.c ++++ media/libcubeb/src/cubeb_sndio.c +@@ -12,6 +12,7 @@ + #include <stdbool.h> + #include <stdlib.h> + #include <stdio.h> ++#include <dlfcn.h> + #include <assert.h> + #include "cubeb/cubeb.h" + #include "cubeb-internal.h" +@@ -22,10 +23,35 @@ + #define DPR(...) do {} while(0) + #endif + ++#ifdef DISABLE_LIBSNDIO_DLOPEN ++#define WRAP(x) x ++#else ++#define WRAP(x) cubeb_##x ++#define LIBSNDIO_API_VISIT(X) \ ++ X(sio_close) \ ++ X(sio_eof) \ ++ X(sio_getpar) \ ++ X(sio_initpar) \ ++ X(sio_onmove) \ ++ X(sio_open) \ ++ X(sio_pollfd) \ ++ X(sio_read) \ ++ X(sio_revents) \ ++ X(sio_setpar) \ ++ X(sio_start) \ ++ X(sio_stop) \ ++ X(sio_write) \ ++ ++#define MAKE_TYPEDEF(x) static typeof(x) * cubeb_##x; ++LIBSNDIO_API_VISIT(MAKE_TYPEDEF); ++#undef MAKE_TYPEDEF ++#endif ++ + static struct cubeb_ops const sndio_ops; + + struct cubeb { + struct cubeb_ops const * ops; ++ void * libsndio; + }; + + struct cubeb_stream { +@@ -119,7 +145,7 @@ sndio_mainloop(void *arg) + DPR("sndio_mainloop()\n"); + s->state_cb(s, s->arg, CUBEB_STATE_STARTED); + pthread_mutex_lock(&s->mtx); +- if (!sio_start(s->hdl)) { ++ if (!WRAP(sio_start)(s->hdl)) { + pthread_mutex_unlock(&s->mtx); + return NULL; + } +@@ -203,7 +229,7 @@ sndio_mainloop(void *arg) + events |= POLLIN; + if ((s->mode & SIO_PLAY) && pstart < pend) + events |= POLLOUT; +- nfds = sio_pollfd(s->hdl, pfds, events); ++ nfds = WRAP(sio_pollfd)(s->hdl, pfds, events); + + if (nfds > 0) { + pthread_mutex_unlock(&s->mtx); +@@ -213,7 +239,7 @@ sndio_mainloop(void *arg) + continue; + } + +- revents = sio_revents(s->hdl, pfds); ++ revents = WRAP(sio_revents)(s->hdl, pfds); + + if (revents & POLLHUP) { + state = CUBEB_STATE_ERROR; +@@ -221,8 +247,8 @@ sndio_mainloop(void *arg) + } + + if (revents & POLLOUT) { +- n = sio_write(s->hdl, s->pbuf + pstart, pend - pstart); +- if (n == 0 && sio_eof(s->hdl)) { ++ n = WRAP(sio_write)(s->hdl, s->pbuf + pstart, pend - pstart); ++ if (n == 0 && WRAP(sio_eof)(s->hdl)) { + DPR("sndio_mainloop() werr\n"); + state = CUBEB_STATE_ERROR; + break; +@@ -231,8 +257,8 @@ sndio_mainloop(void *arg) + } + + if (revents & POLLIN) { +- n = sio_read(s->hdl, s->rbuf + rstart, rend - rstart); +- if (n == 0 && sio_eof(s->hdl)) { ++ n = WRAP(sio_read)(s->hdl, s->rbuf + rstart, rend - rstart); ++ if (n == 0 && WRAP(sio_eof)(s->hdl)) { + DPR("sndio_mainloop() rerr\n"); + state = CUBEB_STATE_ERROR; + break; +@@ -244,7 +270,7 @@ sndio_mainloop(void *arg) + if (prime > 0 && (s->mode & SIO_REC)) + rstart = rend; + } +- sio_stop(s->hdl); ++ WRAP(sio_stop)(s->hdl); + s->hwpos = s->swpos; + pthread_mutex_unlock(&s->mtx); + s->state_cb(s, s->arg, state); +@@ -254,8 +280,31 @@ sndio_mainloop(void *arg) + /*static*/ int + sndio_init(cubeb **context, char const *context_name) + { ++ void * libsndio = NULL; ++ ++#ifndef DISABLE_LIBSNDIO_DLOPEN ++ libsndio = dlopen("libsndio.so", RTLD_LAZY); ++ if (!libsndio) { ++ DPR("sndio_init(%s) failed dlopen(libsndio.so)\n", context_name); ++ return CUBEB_ERROR; ++ } ++ ++#define LOAD(x) { \ ++ cubeb_##x = dlsym(libsndio, #x); \ ++ if (!cubeb_##x) { \ ++ DPR("sndio_init(%s) failed dlsym(%s)\n", context_name, #x); \ ++ dlclose(libsndio); \ ++ return CUBEB_ERROR; \ ++ } \ ++ } ++ ++ LIBSNDIO_API_VISIT(LOAD); ++#undef LOAD ++#endif ++ + DPR("sndio_init(%s)\n", context_name); + *context = malloc(sizeof(*context)); ++ (*context)->libsndio = libsndio; + (*context)->ops = &sndio_ops; + (void)context_name; + return CUBEB_OK; +@@ -271,6 +320,8 @@ static void + sndio_destroy(cubeb *context) + { + DPR("sndio_destroy()\n"); ++ if (context->libsndio) ++ dlclose(context->libsndio); + free(context); + } + +@@ -323,12 +374,12 @@ sndio_stream_init(cubeb * context, + goto err; + } + s->context = context; +- s->hdl = sio_open(NULL, s->mode, 1); ++ s->hdl = WRAP(sio_open)(NULL, s->mode, 1); + if (s->hdl == NULL) { + DPR("sndio_stream_init(), sio_open() failed\n"); + goto err; + } +- sio_initpar(&wpar); ++ WRAP(sio_initpar)(&wpar); + wpar.sig = 1; + wpar.bits = 16; + switch (format) { +@@ -351,7 +402,7 @@ sndio_stream_init(cubeb * context, + if (s->mode & SIO_PLAY) + wpar.pchan = output_stream_params->channels; + wpar.appbufsz = latency_frames; +- if (!sio_setpar(s->hdl, &wpar) || !sio_getpar(s->hdl, &rpar)) { ++ if (!WRAP(sio_setpar)(s->hdl, &wpar) || !WRAP(sio_getpar)(s->hdl, &rpar)) { + DPR("sndio_stream_init(), sio_setpar() failed\n"); + goto err; + } +@@ -362,7 +413,7 @@ sndio_stream_init(cubeb * context, + DPR("sndio_stream_init() unsupported params\n"); + goto err; + } +- sio_onmove(s->hdl, sndio_onmove, s); ++ WRAP(sio_onmove)(s->hdl, sndio_onmove, s); + s->active = 0; + s->nfr = rpar.round; + s->rbpf = rpar.bps * rpar.rchan; +@@ -400,7 +451,7 @@ sndio_stream_init(cubeb * context, + return CUBEB_OK; + err: + if (s->hdl) +- sio_close(s->hdl); ++ WRAP(sio_close)(s->hdl); + if (s->pbuf) + free(s->pbuf); + if (s->rbuf) +@@ -446,7 +497,7 @@ static void + sndio_stream_destroy(cubeb_stream *s) + { + DPR("sndio_stream_destroy()\n"); +- sio_close(s->hdl); ++ WRAP(sio_close)(s->hdl); + if (s->mode & SIO_PLAY) + free(s->pbuf); + if (s->mode & SIO_REC) +diff --git toolkit/library/moz.build toolkit/library/moz.build +index 8ce595ff96bff..c318e96a1fdfc 100644 +--- toolkit/library/moz.build ++++ toolkit/library/moz.build +@@ -231,9 +231,6 @@ if CONFIG['MOZ_SYSTEM_LIBVPX']: + if not CONFIG['MOZ_TREE_PIXMAN']: + OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS'] + +-if CONFIG['MOZ_ALSA']: +- OS_LIBS += CONFIG['MOZ_ALSA_LIBS'] +- + if CONFIG['HAVE_CLOCK_MONOTONIC']: + OS_LIBS += CONFIG['REALTIME_LIBS'] + +@@ -242,11 +239,6 @@ OS_LIBS += CONFIG['ICONV_LIBS'] + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'): + OS_LIBS += CONFIG['TK_LIBS'] + +-if CONFIG['OS_ARCH'] == 'OpenBSD': +- OS_LIBS += [ +- 'sndio', +- ] +- + if CONFIG['MOZ_ENABLE_DBUS']: + OS_LIBS += CONFIG['MOZ_DBUS_GLIB_LIBS'] + |