Date: Sun, 30 Aug 2020 00:22:31 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r546961 - in branches/2020Q3: mail/thunderbird mail/thunderbird/files www/firefox www/firefox-esr www/firefox-esr/files www/firefox/files Message-ID: <202008300022.07U0MVxV051934@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Sun Aug 30 00:22:31 2020 New Revision: 546961 URL: https://svnweb.freebsd.org/changeset/ports/546961 Log: MFH: r546956 gecko: update OSS patches Changes: https://github.com/kinetiknz/cubeb/compare/957847c...49312d4 Approved by: ports-secteam blanket Modified: branches/2020Q3/mail/thunderbird/Makefile branches/2020Q3/mail/thunderbird/files/patch-cubeb-oss branches/2020Q3/www/firefox-esr/Makefile branches/2020Q3/www/firefox-esr/files/patch-cubeb-oss branches/2020Q3/www/firefox/Makefile branches/2020Q3/www/firefox/files/patch-cubeb-oss Directory Properties: branches/2020Q3/ (props changed) Modified: branches/2020Q3/mail/thunderbird/Makefile ============================================================================== --- branches/2020Q3/mail/thunderbird/Makefile Sun Aug 30 00:21:27 2020 (r546960) +++ branches/2020Q3/mail/thunderbird/Makefile Sun Aug 30 00:22:31 2020 (r546961) @@ -3,6 +3,7 @@ PORTNAME= thunderbird DISTVERSION= 68.12.0 +PORTREVISION= 1 CATEGORIES= mail news net-im MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source Modified: branches/2020Q3/mail/thunderbird/files/patch-cubeb-oss ============================================================================== --- branches/2020Q3/mail/thunderbird/files/patch-cubeb-oss Sun Aug 30 00:21:27 2020 (r546960) +++ branches/2020Q3/mail/thunderbird/files/patch-cubeb-oss Sun Aug 30 00:22:31 2020 (r546961) @@ -61,7 +61,7 @@ https://github.com/kinetiknz/cubeb/pull/600 #endif --- /dev/null +++ media/libcubeb/src/cubeb_oss.c -@@ -0,0 +1,1129 @@ +@@ -0,0 +1,1151 @@ +/* + * Copyright © 2019-2020 Nia Alarie <nia@NetBSD.org> + * Copyright © 2020 Ka Ho Ng <khng300@gmail.com> @@ -150,6 +150,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + struct cubeb_ops const * ops; + + /* Our intern string store */ ++ pthread_mutex_t mutex; /* protects devid_strs */ + cubeb_strings *devid_strs; +}; + @@ -184,6 +185,16 @@ https://github.com/kinetiknz/cubeb/pull/600 + unsigned int nfr; /* Number of frames allocated */ +}; + ++static char const * ++oss_cubeb_devid_intern(cubeb *context, char const * devid) ++{ ++ char const *is; ++ pthread_mutex_lock(&context->mutex); ++ is = cubeb_strings_intern(context->devid_strs, devid); ++ pthread_mutex_unlock(&context->mutex); ++ return is; ++} ++ +int +oss_init(cubeb **context, char const *context_name) { + cubeb * c; @@ -192,18 +203,29 @@ https://github.com/kinetiknz/cubeb/pull/600 + if ((c = calloc(1, sizeof(cubeb))) == NULL) { + return CUBEB_ERROR; + } ++ + if (cubeb_strings_init(&c->devid_strs) == CUBEB_ERROR) { -+ free(c); -+ return CUBEB_ERROR; ++ goto fail; + } ++ ++ if (pthread_mutex_init(&c->mutex, NULL) != 0) { ++ goto fail; ++ } ++ + c->ops = &oss_ops; + *context = c; + return CUBEB_OK; ++ ++fail: ++ cubeb_strings_destroy(c->devid_strs); ++ free(c); ++ return CUBEB_ERROR; +} + +static void +oss_destroy(cubeb * context) +{ ++ pthread_mutex_destroy(&context->mutex); + cubeb_strings_destroy(context->devid_strs); + free(context); +} @@ -433,7 +455,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + if (oss_probe_open(sinfo.devname, type, NULL, &ai)) + continue; + -+ devid = cubeb_strings_intern(context->devid_strs, sinfo.devname); ++ devid = oss_cubeb_devid_intern(context, sinfo.devname); + if (devid == NULL) + continue; + @@ -546,7 +568,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + } + cdi.type = type; + -+ devid = cubeb_strings_intern(context->devid_strs, ai.devnode); ++ devid = oss_cubeb_devid_intern(context, ai.devnode); + cdi.device_id = strdup(ai.name); + cdi.friendly_name = strdup(ai.name); + cdi.group_id = strdup(ai.name); @@ -877,7 +899,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + + if ((pfds[0].revents & (POLLERR|POLLHUP)) || + (pfds[1].revents & (POLLERR|POLLHUP))) { -+ LOG("Error occured on playback or record fds", errno); ++ LOG("Error %d occured on playback or record fds", errno); + state = CUBEB_STATE_ERROR; + break; + } Modified: branches/2020Q3/www/firefox-esr/Makefile ============================================================================== --- branches/2020Q3/www/firefox-esr/Makefile Sun Aug 30 00:21:27 2020 (r546960) +++ branches/2020Q3/www/firefox-esr/Makefile Sun Aug 30 00:22:31 2020 (r546961) @@ -3,7 +3,7 @@ PORTNAME= firefox DISTVERSION= 68.12.0 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= www MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \ Modified: branches/2020Q3/www/firefox-esr/files/patch-cubeb-oss ============================================================================== --- branches/2020Q3/www/firefox-esr/files/patch-cubeb-oss Sun Aug 30 00:21:27 2020 (r546960) +++ branches/2020Q3/www/firefox-esr/files/patch-cubeb-oss Sun Aug 30 00:22:31 2020 (r546961) @@ -61,7 +61,7 @@ https://github.com/kinetiknz/cubeb/pull/600 #endif --- /dev/null +++ media/libcubeb/src/cubeb_oss.c -@@ -0,0 +1,1129 @@ +@@ -0,0 +1,1151 @@ +/* + * Copyright © 2019-2020 Nia Alarie <nia@NetBSD.org> + * Copyright © 2020 Ka Ho Ng <khng300@gmail.com> @@ -150,6 +150,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + struct cubeb_ops const * ops; + + /* Our intern string store */ ++ pthread_mutex_t mutex; /* protects devid_strs */ + cubeb_strings *devid_strs; +}; + @@ -184,6 +185,16 @@ https://github.com/kinetiknz/cubeb/pull/600 + unsigned int nfr; /* Number of frames allocated */ +}; + ++static char const * ++oss_cubeb_devid_intern(cubeb *context, char const * devid) ++{ ++ char const *is; ++ pthread_mutex_lock(&context->mutex); ++ is = cubeb_strings_intern(context->devid_strs, devid); ++ pthread_mutex_unlock(&context->mutex); ++ return is; ++} ++ +int +oss_init(cubeb **context, char const *context_name) { + cubeb * c; @@ -192,18 +203,29 @@ https://github.com/kinetiknz/cubeb/pull/600 + if ((c = calloc(1, sizeof(cubeb))) == NULL) { + return CUBEB_ERROR; + } ++ + if (cubeb_strings_init(&c->devid_strs) == CUBEB_ERROR) { -+ free(c); -+ return CUBEB_ERROR; ++ goto fail; + } ++ ++ if (pthread_mutex_init(&c->mutex, NULL) != 0) { ++ goto fail; ++ } ++ + c->ops = &oss_ops; + *context = c; + return CUBEB_OK; ++ ++fail: ++ cubeb_strings_destroy(c->devid_strs); ++ free(c); ++ return CUBEB_ERROR; +} + +static void +oss_destroy(cubeb * context) +{ ++ pthread_mutex_destroy(&context->mutex); + cubeb_strings_destroy(context->devid_strs); + free(context); +} @@ -433,7 +455,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + if (oss_probe_open(sinfo.devname, type, NULL, &ai)) + continue; + -+ devid = cubeb_strings_intern(context->devid_strs, sinfo.devname); ++ devid = oss_cubeb_devid_intern(context, sinfo.devname); + if (devid == NULL) + continue; + @@ -546,7 +568,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + } + cdi.type = type; + -+ devid = cubeb_strings_intern(context->devid_strs, ai.devnode); ++ devid = oss_cubeb_devid_intern(context, ai.devnode); + cdi.device_id = strdup(ai.name); + cdi.friendly_name = strdup(ai.name); + cdi.group_id = strdup(ai.name); @@ -877,7 +899,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + + if ((pfds[0].revents & (POLLERR|POLLHUP)) || + (pfds[1].revents & (POLLERR|POLLHUP))) { -+ LOG("Error occured on playback or record fds", errno); ++ LOG("Error %d occured on playback or record fds", errno); + state = CUBEB_STATE_ERROR; + break; + } Modified: branches/2020Q3/www/firefox/Makefile ============================================================================== --- branches/2020Q3/www/firefox/Makefile Sun Aug 30 00:21:27 2020 (r546960) +++ branches/2020Q3/www/firefox/Makefile Sun Aug 30 00:22:31 2020 (r546961) @@ -3,7 +3,7 @@ PORTNAME= firefox DISTVERSION= 80.0 -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= www MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ Modified: branches/2020Q3/www/firefox/files/patch-cubeb-oss ============================================================================== --- branches/2020Q3/www/firefox/files/patch-cubeb-oss Sun Aug 30 00:21:27 2020 (r546960) +++ branches/2020Q3/www/firefox/files/patch-cubeb-oss Sun Aug 30 00:22:31 2020 (r546961) @@ -61,7 +61,7 @@ https://github.com/kinetiknz/cubeb/pull/600 #endif --- /dev/null +++ media/libcubeb/src/cubeb_oss.c -@@ -0,0 +1,1130 @@ +@@ -0,0 +1,1152 @@ +/* + * Copyright © 2019-2020 Nia Alarie <nia@NetBSD.org> + * Copyright © 2020 Ka Ho Ng <khng300@gmail.com> @@ -150,6 +150,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + struct cubeb_ops const * ops; + + /* Our intern string store */ ++ pthread_mutex_t mutex; /* protects devid_strs */ + cubeb_strings *devid_strs; +}; + @@ -184,6 +185,16 @@ https://github.com/kinetiknz/cubeb/pull/600 + unsigned int nfr; /* Number of frames allocated */ +}; + ++static char const * ++oss_cubeb_devid_intern(cubeb *context, char const * devid) ++{ ++ char const *is; ++ pthread_mutex_lock(&context->mutex); ++ is = cubeb_strings_intern(context->devid_strs, devid); ++ pthread_mutex_unlock(&context->mutex); ++ return is; ++} ++ +int +oss_init(cubeb **context, char const *context_name) { + cubeb * c; @@ -192,18 +203,29 @@ https://github.com/kinetiknz/cubeb/pull/600 + if ((c = calloc(1, sizeof(cubeb))) == NULL) { + return CUBEB_ERROR; + } ++ + if (cubeb_strings_init(&c->devid_strs) == CUBEB_ERROR) { -+ free(c); -+ return CUBEB_ERROR; ++ goto fail; + } ++ ++ if (pthread_mutex_init(&c->mutex, NULL) != 0) { ++ goto fail; ++ } ++ + c->ops = &oss_ops; + *context = c; + return CUBEB_OK; ++ ++fail: ++ cubeb_strings_destroy(c->devid_strs); ++ free(c); ++ return CUBEB_ERROR; +} + +static void +oss_destroy(cubeb * context) +{ ++ pthread_mutex_destroy(&context->mutex); + cubeb_strings_destroy(context->devid_strs); + free(context); +} @@ -433,7 +455,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + if (oss_probe_open(sinfo.devname, type, NULL, &ai)) + continue; + -+ devid = cubeb_strings_intern(context->devid_strs, sinfo.devname); ++ devid = oss_cubeb_devid_intern(context, sinfo.devname); + if (devid == NULL) + continue; + @@ -546,7 +568,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + } + cdi.type = type; + -+ devid = cubeb_strings_intern(context->devid_strs, ai.devnode); ++ devid = oss_cubeb_devid_intern(context, ai.devnode); + cdi.device_id = strdup(ai.name); + cdi.friendly_name = strdup(ai.name); + cdi.group_id = strdup(ai.name); @@ -877,7 +899,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + + if ((pfds[0].revents & (POLLERR|POLLHUP)) || + (pfds[1].revents & (POLLERR|POLLHUP))) { -+ LOG("Error occured on playback or record fds", errno); ++ LOG("Error %d occured on playback or record fds", errno); + state = CUBEB_STATE_ERROR; + break; + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008300022.07U0MVxV051934>