git: d2d9373bc737 - main - www/waterfox: update to G6.0.17

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Tue, 09 Jul 2024 01:14:26 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d2d9373bc737d06fdb90b8dbe2f3ba465e707543

commit d2d9373bc737d06fdb90b8dbe2f3ba465e707543
Author:     Martin Filla <freebsd@sysctl.cz>
AuthorDate: 2024-07-09 00:49:07 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-09 01:07:25 +0000

    www/waterfox: update to G6.0.17
    
    There have been many releases since then:
    https://github.com/BrowserWorks/Waterfox/releases
    Changelogs: https://www.waterfox.net/docs/releases/G6.0.17/
    
    This release is based on Firefox ESR 115.
    
    New maintainer: Martin Filla <freebsd@sysctl.cz>
    
    PR:     278672
---
 www/waterfox/Makefile                              |   118 +-
 www/waterfox/distinfo                              |     6 +-
 www/waterfox/files/patch-addon-search              |    71 +-
 .../patch-browser_installer_package-manifest.in    |    19 +
 www/waterfox/files/patch-bug1021761                |  1218 -
 www/waterfox/files/patch-bug1036008                |   523 -
 www/waterfox/files/patch-bug1134077                |    65 -
 www/waterfox/files/patch-bug1144632                |    23 -
 www/waterfox/files/patch-bug1186967                |    41 -
 www/waterfox/files/patch-bug1203273                |    68 -
 www/waterfox/files/patch-bug1231203                |   203 -
 www/waterfox/files/patch-bug1246883                |    56 -
 www/waterfox/files/patch-bug1269654_comment5       |    43 +
 www/waterfox/files/patch-bug1275062                |   344 -
 www/waterfox/files/patch-bug1288587                |    67 -
 www/waterfox/files/patch-bug1321069                |   100 -
 www/waterfox/files/patch-bug1321960                |   134 -
 www/waterfox/files/patch-bug1324042                |    33 -
 www/waterfox/files/patch-bug1325888                |    39 -
 www/waterfox/files/patch-bug1331209                |   571 -
 www/waterfox/files/patch-bug1334465                |    62 -
 www/waterfox/files/patch-bug1334981                |    29 -
 www/waterfox/files/patch-bug1338764                |   120 -
 www/waterfox/files/patch-bug1340039                |   232 -
 www/waterfox/files/patch-bug1343147                |   117 -
 www/waterfox/files/patch-bug1345058                |   620 -
 www/waterfox/files/patch-bug1346126                |    27 -
 www/waterfox/files/patch-bug1346535                |   504 -
 www/waterfox/files/patch-bug1347984                |    96 -
 www/waterfox/files/patch-bug1352453                |    27 -
 www/waterfox/files/patch-bug1355576                |   262 -
 www/waterfox/files/patch-bug1356854                |    28 -
 www/waterfox/files/patch-bug1357523                |    96 -
 www/waterfox/files/patch-bug1360278                |   184 -
 www/waterfox/files/patch-bug1360603                |   101 -
 www/waterfox/files/patch-bug1363038                |    68 -
 www/waterfox/files/patch-bug1370508                |    79 -
 www/waterfox/files/patch-bug1370791                |   104 -
 www/waterfox/files/patch-bug1372107                |    82 -
 www/waterfox/files/patch-bug1373371                |    44 -
 www/waterfox/files/patch-bug1377158                |   285 -
 www/waterfox/files/patch-bug1377587                |   929 -
 www/waterfox/files/patch-bug1379148                |   366 -
 www/waterfox/files/patch-bug1381761                |   362 -
 www/waterfox/files/patch-bug1381815                |   278 -
 www/waterfox/files/patch-bug1382359                |   138 -
 www/waterfox/files/patch-bug1383501                |    83 -
 www/waterfox/files/patch-bug1384121                |   218 -
 www/waterfox/files/patch-bug1384701                |   796 -
 www/waterfox/files/patch-bug1385013                |    92 -
 www/waterfox/files/patch-bug1385609                |   102 -
 www/waterfox/files/patch-bug1387170                |   148 -
 www/waterfox/files/patch-bug1387811                |    42 -
 www/waterfox/files/patch-bug1388020                |   158 -
 www/waterfox/files/patch-bug1388319                |    30 -
 www/waterfox/files/patch-bug1388744                |    14 -
 www/waterfox/files/patch-bug1393235                |    88 -
 www/waterfox/files/patch-bug1393283                |   144 -
 www/waterfox/files/patch-bug1393627                |    30 -
 www/waterfox/files/patch-bug1394146                |   119 -
 www/waterfox/files/patch-bug1394601                |    26 -
 www/waterfox/files/patch-bug1395246                |    83 -
 www/waterfox/files/patch-bug1395486                |    53 -
 www/waterfox/files/patch-bug1396722                |  1426 -
 www/waterfox/files/patch-bug1397114                |   105 -
 www/waterfox/files/patch-bug1397671                |   105 -
 www/waterfox/files/patch-bug1397686                |    69 -
 www/waterfox/files/patch-bug1397795                |    61 -
 www/waterfox/files/patch-bug1397989                |    42 -
 www/waterfox/files/patch-bug1398021                |  2737 -
 www/waterfox/files/patch-bug1398539                |   159 -
 www/waterfox/files/patch-bug1398581                |   125 -
 www/waterfox/files/patch-bug1398806                |   438 -
 www/waterfox/files/patch-bug1398983                |    25 -
 www/waterfox/files/patch-bug1399091                |    36 -
 www/waterfox/files/patch-bug1399177                |    47 -
 www/waterfox/files/patch-bug1399336                |   153 -
 www/waterfox/files/patch-bug1399412                |    31 -
 www/waterfox/files/patch-bug1399520                |    93 -
 www/waterfox/files/patch-bug1399939                |    36 -
 www/waterfox/files/patch-bug1400238                |    30 -
 www/waterfox/files/patch-bug1400540                |    47 -
 www/waterfox/files/patch-bug1400674                |    70 -
 www/waterfox/files/patch-bug1400839                |    49 -
 www/waterfox/files/patch-bug1401063                |   160 -
 www/waterfox/files/patch-bug1401416                |    29 -
 www/waterfox/files/patch-bug1401522                |    34 -
 www/waterfox/files/patch-bug1401573                |    27 -
 www/waterfox/files/patch-bug1401726                |    60 -
 www/waterfox/files/patch-bug1401876                |    48 -
 www/waterfox/files/patch-bug1401878                |    70 -
 www/waterfox/files/patch-bug1401909                |    30 -
 www/waterfox/files/patch-bug1401992                |   239 -
 www/waterfox/files/patch-bug1402025                |   201 -
 www/waterfox/files/patch-bug1402094                |    57 -
 www/waterfox/files/patch-bug1402205                |    77 -
 www/waterfox/files/patch-bug1402218                |    91 -
 www/waterfox/files/patch-bug1402366                |    87 -
 www/waterfox/files/patch-bug1402377                |    36 -
 www/waterfox/files/patch-bug1402380                |   257 -
 www/waterfox/files/patch-bug1402442                |   181 -
 www/waterfox/files/patch-bug1402469                |   182 -
 www/waterfox/files/patch-bug1402681                |   138 -
 www/waterfox/files/patch-bug1402715                |    44 -
 www/waterfox/files/patch-bug1402766                |    69 -
 www/waterfox/files/patch-bug1402871                |    28 -
 www/waterfox/files/patch-bug1402951                |   164 -
 www/waterfox/files/patch-bug1402966                |    51 -
 www/waterfox/files/patch-bug1402981                |   172 -
 www/waterfox/files/patch-bug1403282                |   180 -
 www/waterfox/files/patch-bug1403349                |  1216 -
 www/waterfox/files/patch-bug1403465                |    60 -
 www/waterfox/files/patch-bug1403466                |    50 -
 www/waterfox/files/patch-bug1403473                |    27 -
 www/waterfox/files/patch-bug1403592                |   157 -
 www/waterfox/files/patch-bug1403721                |   182 -
 www/waterfox/files/patch-bug1403998                |   167 -
 www/waterfox/files/patch-bug1404057                |   139 -
 www/waterfox/files/patch-bug1404180                |    68 -
 www/waterfox/files/patch-bug1404323                |    27 -
 www/waterfox/files/patch-bug1404324                |   299 -
 www/waterfox/files/patch-bug1404568                |   120 -
 www/waterfox/files/patch-bug1404651                |    39 -
 www/waterfox/files/patch-bug1404714                |    34 -
 www/waterfox/files/patch-bug1404760                |    65 -
 www/waterfox/files/patch-bug1404910                |   170 -
 www/waterfox/files/patch-bug1405199                |    45 -
 www/waterfox/files/patch-bug1405267                |    32 -
 www/waterfox/files/patch-bug1405364                |    84 -
 www/waterfox/files/patch-bug1405377                |    31 -
 www/waterfox/files/patch-bug1405635                |   100 -
 www/waterfox/files/patch-bug1405655                |   256 -
 www/waterfox/files/patch-bug1405720                |   122 -
 www/waterfox/files/patch-bug1405761                |   109 -
 www/waterfox/files/patch-bug1405878                |   120 -
 www/waterfox/files/patch-bug1406222                |    39 -
 www/waterfox/files/patch-bug1406229                |    32 -
 www/waterfox/files/patch-bug1406254                |   155 -
 www/waterfox/files/patch-bug1406396                |   211 -
 www/waterfox/files/patch-bug1406474                |    37 -
 www/waterfox/files/patch-bug1406859                |    50 -
 www/waterfox/files/patch-bug1407001                |    33 -
 www/waterfox/files/patch-bug1407092                |    28 -
 www/waterfox/files/patch-bug1407243                |    31 -
 www/waterfox/files/patch-bug1407245                |    34 -
 www/waterfox/files/patch-bug1407414                |    25 -
 www/waterfox/files/patch-bug1407680                |   115 -
 www/waterfox/files/patch-bug1407936                |    71 -
 www/waterfox/files/patch-bug1408017                |    40 -
 www/waterfox/files/patch-bug1408276                |   170 -
 www/waterfox/files/patch-bug1408397                |   185 -
 www/waterfox/files/patch-bug1408631                |   174 -
 www/waterfox/files/patch-bug1408672                |    37 -
 www/waterfox/files/patch-bug1408990                |    34 -
 www/waterfox/files/patch-bug1409101                |    23 -
 www/waterfox/files/patch-bug1409277                |    38 -
 www/waterfox/files/patch-bug1409496                |    25 -
 www/waterfox/files/patch-bug1409649                |    34 -
 www/waterfox/files/patch-bug1409951                |   177 -
 www/waterfox/files/patch-bug1410134                |    52 -
 www/waterfox/files/patch-bug1410146                |    27 -
 www/waterfox/files/patch-bug1410420                |   140 -
 www/waterfox/files/patch-bug1410457                |   117 -
 www/waterfox/files/patch-bug1410634                |   145 -
 www/waterfox/files/patch-bug1410808                |    27 -
 www/waterfox/files/patch-bug1411415                |   383 -
 www/waterfox/files/patch-bug1411745                |    26 -
 www/waterfox/files/patch-bug1412011                |   100 -
 www/waterfox/files/patch-bug1412145                |   286 -
 www/waterfox/files/patch-bug1412420                |   284 -
 www/waterfox/files/patch-bug1412558                |    42 -
 www/waterfox/files/patch-bug1412741                |    87 -
 www/waterfox/files/patch-bug1412882                |   192 -
 www/waterfox/files/patch-bug1413143                |   306 -
 www/waterfox/files/patch-bug1413741                |    25 -
 www/waterfox/files/patch-bug1414292                |   171 -
 www/waterfox/files/patch-bug1414425                |   231 -
 www/waterfox/files/patch-bug1414452                |    70 -
 www/waterfox/files/patch-bug1414945                |    43 -
 www/waterfox/files/patch-bug1415291                |    52 -
 www/waterfox/files/patch-bug1415441                |    22 -
 www/waterfox/files/patch-bug1415582                |    34 -
 www/waterfox/files/patch-bug1415598                |    58 -
 www/waterfox/files/patch-bug1415883                |    44 -
 www/waterfox/files/patch-bug1415946                |    33 -
 www/waterfox/files/patch-bug1416307                |    94 -
 www/waterfox/files/patch-bug1416529                |   101 -
 www/waterfox/files/patch-bug1417661                |    37 -
 www/waterfox/files/patch-bug1417751                |   379 -
 www/waterfox/files/patch-bug1417797                |    25 -
 www/waterfox/files/patch-bug1417869                |    42 -
 www/waterfox/files/patch-bug1418009                |    28 -
 www/waterfox/files/patch-bug1418152                |    36 -
 www/waterfox/files/patch-bug1418757                |   169 -
 www/waterfox/files/patch-bug1418854                |   102 -
 www/waterfox/files/patch-bug1418894                |   244 -
 www/waterfox/files/patch-bug1419508                |    29 -
 www/waterfox/files/patch-bug1419762                |    69 -
 www/waterfox/files/patch-bug1420001                |    67 -
 www/waterfox/files/patch-bug1421009                |    24 -
 www/waterfox/files/patch-bug1421963                |    39 -
 www/waterfox/files/patch-bug1422036                |   229 -
 www/waterfox/files/patch-bug1422389                |    28 -
 www/waterfox/files/patch-bug1422518                |    27 -
 www/waterfox/files/patch-bug1422545                |    38 -
 www/waterfox/files/patch-bug1423647                |    37 -
 www/waterfox/files/patch-bug1423770                |    44 -
 www/waterfox/files/patch-bug1424311                |    66 -
 www/waterfox/files/patch-bug1424373                |   305 -
 www/waterfox/files/patch-bug1424469                |    36 -
 www/waterfox/files/patch-bug1425107                |    43 -
 www/waterfox/files/patch-bug1425267                |    55 -
 www/waterfox/files/patch-bug1425520                |    27 -
 www/waterfox/files/patch-bug1425612                |    85 -
 www/waterfox/files/patch-bug1425780                |    34 -
 www/waterfox/files/patch-bug1425878                |    46 -
 www/waterfox/files/patch-bug1426042                |    31 -
 www/waterfox/files/patch-bug1426087                |    80 -
 www/waterfox/files/patch-bug1426783                |    38 -
 www/waterfox/files/patch-bug1426801                |    38 -
 www/waterfox/files/patch-bug1426869                |    25 -
 www/waterfox/files/patch-bug1426996                |    29 -
 www/waterfox/files/patch-bug1427118                |    84 -
 www/waterfox/files/patch-bug1427126                |    25 -
 www/waterfox/files/patch-bug1427152                |    10 +
 www/waterfox/files/patch-bug1427480                |    40 -
 www/waterfox/files/patch-bug1428589                |    50 -
 www/waterfox/files/patch-bug1428612                |    69 -
 www/waterfox/files/patch-bug1429373                |   142 -
 www/waterfox/files/patch-bug1429666                |   212 -
 www/waterfox/files/patch-bug1429764                |   207 -
 www/waterfox/files/patch-bug1430508                |    56 -
 www/waterfox/files/patch-bug1430511                |    72 -
 www/waterfox/files/patch-bug1430557                |    51 -
 www/waterfox/files/patch-bug1431192                |    44 -
 www/waterfox/files/patch-bug1431285                |    34 -
 www/waterfox/files/patch-bug1431370                |    30 -
 www/waterfox/files/patch-bug1431434                |    48 -
 www/waterfox/files/patch-bug1431781                |    30 -
 www/waterfox/files/patch-bug1432793                |   218 -
 www/waterfox/files/patch-bug1432870                |    29 -
 www/waterfox/files/patch-bug1432915                |    27 -
 www/waterfox/files/patch-bug1433609                |   103 -
 www/waterfox/files/patch-bug1433671                |   179 -
 www/waterfox/files/patch-bug1433747                |    24 -
 www/waterfox/files/patch-bug1434384                |    41 -
 www/waterfox/files/patch-bug1434580                |    29 -
 www/waterfox/files/patch-bug1435036                |    97 -
 www/waterfox/files/patch-bug1435098                |    46 -
 www/waterfox/files/patch-bug1435286                |   294 -
 www/waterfox/files/patch-bug1435320                |    42 -
 www/waterfox/files/patch-bug1435530                |   208 -
 www/waterfox/files/patch-bug1435859                |    38 -
 www/waterfox/files/patch-bug1436117                |    42 -
 www/waterfox/files/patch-bug1436768                |   106 -
 www/waterfox/files/patch-bug1437087                |    88 -
 www/waterfox/files/patch-bug1437214                |   217 -
 www/waterfox/files/patch-bug1437450                |    30 -
 www/waterfox/files/patch-bug1437507                |    38 -
 www/waterfox/files/patch-bug1437880                |    26 -
 www/waterfox/files/patch-bug1438425                |   662 -
 www/waterfox/files/patch-bug1438645                |   210 -
 www/waterfox/files/patch-bug1439236                |    35 -
 www/waterfox/files/patch-bug1439396                |    39 -
 www/waterfox/files/patch-bug1440943                |    60 -
 www/waterfox/files/patch-bug1442504                |    50 -
 www/waterfox/files/patch-bug1443149                |    32 -
 www/waterfox/files/patch-bug1444083                |    17 -
 www/waterfox/files/patch-bug1444231                |    45 -
 www/waterfox/files/patch-bug1444521                |    26 -
 www/waterfox/files/patch-bug1444541                |    63 -
 www/waterfox/files/patch-bug1445582                |    32 -
 www/waterfox/files/patch-bug1447131                |   160 -
 www/waterfox/files/patch-bug1447519                |    22 -
 www/waterfox/files/patch-bug1447969                |    26 -
 www/waterfox/files/patch-bug1447989                |    25 -
 www/waterfox/files/patch-bug1448089                |   207 -
 www/waterfox/files/patch-bug1448136                |    71 -
 www/waterfox/files/patch-bug1448200                |    36 -
 www/waterfox/files/patch-bug1448612                |    72 -
 www/waterfox/files/patch-bug1448863                |   214 -
 www/waterfox/files/patch-bug1449157                |    26 -
 www/waterfox/files/patch-bug1449352                |    52 -
 www/waterfox/files/patch-bug1450448                |    40 -
 www/waterfox/files/patch-bug1450538                |    27 -
 www/waterfox/files/patch-bug1450565                |    27 -
 www/waterfox/files/patch-bug1451262                |    62 -
 www/waterfox/files/patch-bug1451673                |    28 -
 www/waterfox/files/patch-bug1452619                |   234 -
 www/waterfox/files/patch-bug1453127                |   605 -
 www/waterfox/files/patch-bug1453339                |   172 -
 www/waterfox/files/patch-bug1453555                |    34 -
 www/waterfox/files/patch-bug1453740                |    35 -
 www/waterfox/files/patch-bug1454285                |   713 -
 www/waterfox/files/patch-bug1454572                |    43 -
 www/waterfox/files/patch-bug1455235                |    67 -
 www/waterfox/files/patch-bug1455261                |    27 -
 www/waterfox/files/patch-bug1456512                |   144 -
 www/waterfox/files/patch-bug1456524                |   122 -
 www/waterfox/files/patch-bug1457912                |   169 -
 www/waterfox/files/patch-bug1458166                |    75 -
 www/waterfox/files/patch-bug1458720                |    99 -
 www/waterfox/files/patch-bug1461203                |    41 -
 www/waterfox/files/patch-bug1461448                |    80 -
 www/waterfox/files/patch-bug1464872                |    96 -
 www/waterfox/files/patch-bug1465108                |   520 -
 www/waterfox/files/patch-bug1466606                |   124 -
 www/waterfox/files/patch-bug1466863                |    36 -
 www/waterfox/files/patch-bug1467882                |    74 -
 www/waterfox/files/patch-bug1467938                |    43 -
 www/waterfox/files/patch-bug1469257                |    50 -
 www/waterfox/files/patch-bug1469879                |    44 -
 www/waterfox/files/patch-bug1473041                |    30 -
 www/waterfox/files/patch-bug1504834_comment10      |    36 +
 www/waterfox/files/patch-bug1504834_comment5       |    83 +
 www/waterfox/files/patch-bug1559213                |   123 +
 www/waterfox/files/patch-bug1612181_comment1       |   191 +
 www/waterfox/files/patch-bug1626236                |    88 +
 www/waterfox/files/patch-bug1628567                |    32 +
 www/waterfox/files/patch-bug1659612                |    41 +
 www/waterfox/files/patch-bug1680982                |   388 +
 www/waterfox/files/patch-bug1716707                |    56 +
 www/waterfox/files/patch-bug1841919                |    75 +
 www/waterfox/files/patch-bug1859752                |    42 +
 www/waterfox/files/patch-bug1873379                |    34 +
 www/waterfox/files/patch-bug1874059                |    25 +
 www/waterfox/files/patch-bug702179                 |    12 -
 www/waterfox/files/patch-bug712130                 |   481 -
 www/waterfox/files/patch-bug730495                 |   545 -
 www/waterfox/files/patch-bug826985                 |   171 -
 www/waterfox/files/patch-bug847568                 |   297 +-
 www/waterfox/files/patch-bug991253                 |    17 -
 www/waterfox/files/patch-config-baseconfig.mk      |    17 -
 .../files/patch-dom_media_flac_FlacDecoder.cpp     |    23 +
 www/waterfox/files/patch-env-api-keys              |    14 +-
 .../files/patch-gfx_skia_skia_src_base_SkEndian.h  |    11 +
 .../files/patch-gfx_skia_skia_src_core_SkCpu.cpp   |    32 +
 ...patch-gfx_skia_skia_src_core_SkRasterPipeline.h |    11 +
 www/waterfox/files/patch-i386-protobuf-alignment   |    15 +
 www/waterfox/files/patch-ijg-libjpeg               |   383 -
 .../files/patch-ipc_glue_MessageChannel.cpp        |    16 -
 www/waterfox/files/patch-js_public_Utility.h       |    35 +
 www/waterfox/files/patch-libwebrtc-generated       | 95952 +++++++++++++++++++
 www/waterfox/files/patch-libwebrtc-powerpc64       |   264 +
 .../files/patch-memory_mozalloc_throw__gcc.h       |    69 +
 .../files/patch-modules_fdlibm_src_math__private.h |    27 +
 .../files/patch-modules_libpref_init_all.js        |    17 -
 www/waterfox/files/patch-pipewire_init             |   105 +
 ...patch-python_mozbuild_mozbuild_gn__processor.py |    48 +
 www/waterfox/files/patch-revert-bug1393954         |    36 -
 www/waterfox/files/patch-rust-1.78.0               |  3582 +
 www/waterfox/files/patch-sample-type               |    13 -
 ...rd__party_libwebrtc_build_config_BUILDCONFIG.gn |    37 +
 ..._party_libwebrtc_third__party_pffft_src_pffft.c |    10 +
 .../files/patch-third__party_sqlite3_src_moz.build |    12 +
 ...toolkit_components_processtools_procinfo__bsd.c |   104 +
 www/waterfox/files/patch-toolkit_xre_glxtest.cpp   |    17 +
 .../files/patch-tools_profiler_core_patform.cpp    |    51 +
 www/waterfox/files/patch-waterfox286               |    15 -
 www/waterfox/files/patch-z-bug1355143              |   384 -
 www/waterfox/files/patch-z-bug1382366              |   159 -
 www/waterfox/files/patch-z-bug1392739              |    28 -
 www/waterfox/files/patch-z-bug1436267              |    37 -
 www/waterfox/files/patch-z-bug1461619              |   151 -
 www/waterfox/files/patch-z-bug517422               |   502 -
 www/waterfox/pkg-descr                             |    25 +-
 www/waterfox/pkg-message                           |    59 +-
 367 files changed, 101995 insertions(+), 43316 deletions(-)

diff --git a/www/waterfox/Makefile b/www/waterfox/Makefile
index 4afa9bb2ce3f..fba46cae9160 100644
--- a/www/waterfox/Makefile
+++ b/www/waterfox/Makefile
@@ -1,76 +1,108 @@
-# $FreeBSD$
-
 PORTNAME=	waterfox
-DISTVERSION=	56.2.3
-PORTREVISION=	2
-CATEGORIES=	www ipv6
+DISTVERSIONPREFIX=	G
+DISTVERSION=	6.0.17
+CATEGORIES=	www
 
-MAINTAINER=	jbeich@FreeBSD.org
+MAINTAINER=	freebsd@sysctl.cz
 COMMENT=	Distilled fork of Firefox
+WWW=		https://www.waterfox.net/
 
-DEPRECATED=	Temporary experiment
-EXPIRATION_DATE=2018-09-27
+LICENSE=	MPL20
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	nspr>=4.16:devel/nspr \
-		nss>=3.32.1:security/nss \
-		icu>=59.1,1:devel/icu \
+BUILD_DEPENDS=	nspr>=4.32:devel/nspr \
+		nss>=3.95:security/nss \
+		icu>=74.2:devel/icu \
 		libevent>=2.1.8:devel/libevent \
-		harfbuzz>=1.4.7:print/harfbuzz \
-		graphite2>=1.3.10:graphics/graphite2 \
-		png>=1.6.31:graphics/png \
-		libvorbis>=1.3.5,3:audio/libvorbis \
-		libvpx>=1.5.0:multimedia/libvpx \
-		sqlite3>=3.19.3:databases/sqlite3 \
+		harfbuzz>=8.3.0:print/harfbuzz \
+		graphite2>=1.3.14:graphics/graphite2 \
+		png>=1.6.39:graphics/png \
+		dav1d>=1.0.0:multimedia/dav1d \
+		libvpx>=1.13.0:multimedia/libvpx \
 		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
 		v4l_compat>0:multimedia/v4l_compat \
-		autoconf-2.13:devel/autoconf213 \
+		autoconf2.13:devel/autoconf2.13 \
+		nasm:devel/nasm \
 		yasm:devel/yasm \
 		zip:archivers/zip
-#		soundtouch>=1.9.0:audio/soundtouch \
-
-LIB_DEPENDS=	libv4l2.so:multimedia/libv4l
 
 USE_GITHUB=	yes
-GH_ACCOUNT=	MrAlex94
+GH_ACCOUNT=	BrowserWorks
 GH_PROJECT=	Waterfox
 
+.include "${.CURDIR}/../../www/firefox/Makefile.options"
+.include <bsd.port.options.mk>
+
+.if ${ARCH} != powerpc64
+BUILD_DEPENDS+=	${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc++abi.a:devel/wasi-libcxx${LLVM_VERSION} \
+		${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc.a:devel/wasi-libc \
+		wasi-compiler-rt${LLVM_VERSION}>0:devel/wasi-compiler-rt${LLVM_VERSION}
+.endif
+
 USE_GECKO=	gecko
-MOZ_PKGCONFIG_FILES=	# empty
-USE_MOZILLA=	-soundtouch
-MOZILLA_NAME=	Waterfox
+USE_MOZILLA=	-sqlite
+
+CFLAGS_powerpc64le=	-DSQLITE_BYTEORDER=1234
+# work around bindgen not finding ICU, e.g.
+# dist/include/mozilla/intl/ICU4CGlue.h:8:10: fatal error: 'unicode/uenum.h' file not found, err: true
+MOZILLA_CAP=	${MOZILLA:C/^(.).*/\1/:tu}${MOZILLA:C/^.//}
+CONFIGURE_ENV+=	BINDGEN_CFLAGS="-I${LOCALBASE}/include" \
+		MOZ_REQUIRE_SIGNING=""
+MOZ_EXPORT+=	MOZ_TELEMETRY_REPORTING="" \
+		MOZILLA_OFFICIAL="1" \
+		MOZ_OFFICIAL_BRANDING="1" \
+		MOZ_APP_DISPLAYNAME="${MOZILLA_CAP}" \
+		MOZ_APP_NAME="${MOZILLA}"
+
+MOZ_OPTIONS+=	--enable-application=browser \
+		--allow-addon-sideload \
+		--disable-crashreporter \
+		--disable-debug \
+		--disable-default-browser-agent \
+		--disable-tests \
+		--disable-updater \
+		--enable-hardening \
+		--enable-optimize \
+		--enable-release \
+		--with-app-name=${MOZILLA} \
+		--with-unsigned-addon-scopes=app,system \
+		--enable-bootstrap \
+		MOZ_CRASHREPORTER=0 \
+		MOZ_DATA_REPORTING=0
 
-USE_GL=		gl
+BINARY_ALIAS+=	python3=${PYTHON_CMD}
+
+USE_GECKO=	gecko
 
 WATERFOX_ICON=		${MOZILLA}.png
-WATERFOX_ICON_SRC=	${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default256.png
+WATERFOX_ICON_SRC=	${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png
 WATERFOX_DESKTOP=	${MOZSRC}/taskcluster/docker/firefox-snap/firefox.desktop
-MOZ_OPTIONS=	--enable-application=browser \
-		--with-app-name=${MOZILLA} \
-		--with-app-basename=${MOZILLA_NAME} \
-		--with-distribution-id=org.${MOZILLA}project
 
-OPTIONS_DEFAULT=	BUNDLED_CAIRO
+.if ${ARCH} == amd64
+MOZ_OPTIONS+=	--enable-rust-simd
+.endif
 
-.include "${.CURDIR}/../../www/firefox/Makefile.options"
-
-# Inconsistent fallback order (libcubeb vs. audio_device)
-SNDIO_PREVENTS=		${OPTIONS_MULTI_AUDIO:NSNDIO}
+.if ${ARCH} == powerpc64
+CFLAGS+=	-DHWY_COMPILE_ONLY_SCALAR
+MOZ_OPTIONS+=	--without-wasm-sandboxed-libraries
+.else
+BUILD_DEPENDS+=	${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc++abi.a:devel/wasi-libcxx${LLVM_VERSION} \
+		${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc.a:devel/wasi-libc \
+		wasi-compiler-rt${LLVM_VERSION}>0:devel/wasi-compiler-rt${LLVM_VERSION}
+MOZ_OPTIONS+=	--with-wasi-sysroot=${LOCALBASE}/share/wasi-sysroot
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e 's/%u/%U/' -e '/X-MultipleArgs/d' \
 		-e 's/firefox/${MOZILLA}/' \
-		-e 's/Firefox/${MOZILLA_NAME}/' \
+		-e 's/Firefox/${MOZILLA_CAP}/' \
+		-e '/^Icon/s/=.*/=${WATERFOX_ICON:R}/' \
 		${WATERFOX_DESKTOP}
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 		${WRKSRC}/browser/app/nsBrowserApp.cpp
 
-pre-configure:
-	(cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13)
-	(cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13)
-
 post-install:
-	${INSTALL_DATA} ${WATERFOX_DESKTOP} \
-		${STAGEDIR}${PREFIX}/share/applications/${MOZILLA}.desktop
+	${INSTALL_DATA} ${WATERFOX_DESKTOP} ${STAGEDIR}${PREFIX}/share/applications/${MOZILLA}.desktop
 	${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
 	${LN} -sf ${WATERFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${WATERFOX_ICON}
 
diff --git a/www/waterfox/distinfo b/www/waterfox/distinfo
index fc8b4ed55cf6..fd7b8b8ebec8 100644
--- a/www/waterfox/distinfo
+++ b/www/waterfox/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1536644593
-SHA256 (MrAlex94-Waterfox-56.2.3_GH0.tar.gz) = 6134501bf3325d3bcd9632405a46f1f1278988e57bf4ca88b61926eb49ef1465
-SIZE (MrAlex94-Waterfox-56.2.3_GH0.tar.gz) = 395126627
+TIMESTAMP = 1720469416
+SHA256 (BrowserWorks-Waterfox-G6.0.17_GH0.tar.gz) = 5090fceb677c1f1973b510c7cec93a930dfef5d03728506c78eb0573ce2dda19
+SIZE (BrowserWorks-Waterfox-G6.0.17_GH0.tar.gz) = 762471555
diff --git a/www/waterfox/files/patch-addon-search b/www/waterfox/files/patch-addon-search
index a2fabaa456b7..b6dbf7924b43 100644
--- a/www/waterfox/files/patch-addon-search
+++ b/www/waterfox/files/patch-addon-search
@@ -2,27 +2,19 @@ https://github.com/mozilla/addons/issues/708
 https://github.com/mozilla/addons-frontend/issues/4610
 
 diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js
-index 75c2c5e435e35..4d8c09c02759b 100644
+index 621900f90fc1..401ef9074bd0 100644
 --- browser/app/profile/firefox.js
 +++ browser/app/profile/firefox.js
-@@ -48,12 +48,12 @@ pref("extensions.webextOptionalPermissionPrompts", true);
- sticky_pref("extensions.getAddons.cache.enabled", true);
- pref("extensions.getAddons.showPane", false);
- pref("extensions.getAddons.maxResults", 15);
--pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/guid:%IDS%?src=firefox&appOS=%OS%&appVersion=%VERSION%");
-+pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/guid:%IDS%?src=firefox&appOS=Linux&appVersion=%VERSION%");
- pref("extensions.getAddons.getWithPerformance.url", "");
+@@ -38,7 +38,7 @@ pref("extensions.postDownloadThirdPartyPrompt", true);
+ // Preferences for AMO integration
+ pref("extensions.getAddons.cache.enabled", true);
+ pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v4/addons/search/?guid=%IDS%&lang=%LOCALE%");
 -pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=%OS%&appver=%VERSION%");
--pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%/%COMPATIBILITY_MODE%?src=firefox");
 +pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=Linux&appver=%VERSION%");
-+pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/Linux/%VERSION%/%COMPATIBILITY_MODE%?src=firefox");
- pref("extensions.webservice.discoverURL", "");
--pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/%OS%/%VERSION%?src=firefox");
-+pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/Linux/%VERSION%?src=firefox");
  pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/");
- pref("extensions.getAddons.themes.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/themes/?src=firefox");
- 
-@@ -204,8 +204,8 @@ pref("app.update.service.enabled", true);
+ pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%");
+ pref("extensions.getAddons.discovery.api_url", "https://services.addons.mozilla.org/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%");
+@@ -204,8 +204,8 @@ pref("app.update.langpack.enabled", true);
  //  .. etc ..
  //
  pref("extensions.update.enabled", true);
@@ -32,34 +24,25 @@ index 75c2c5e435e35..4d8c09c02759b 100644
 +pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=Linux&appABI=%APP_ABI%&locale=%APP_LOCALE%&currentAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
  pref("extensions.update.interval", 86400);  // Check for updates to Extensions and
                                              // Themes every day
- // Non-symmetric (not shared by extensions) extension-specific [update] preferences
-diff --git toolkit/mozapps/extensions/internal/AddonRepository.jsm toolkit/mozapps/extensions/internal/AddonRepository.jsm
-index f70fd8d7e3bd8..81e8cd7764fdf 100644
---- toolkit/mozapps/extensions/internal/AddonRepository.jsm
-+++ toolkit/mozapps/extensions/internal/AddonRepository.jsm
-@@ -1179,7 +1179,7 @@ this.AddonRepository = {
-           let nodes = node.getElementsByTagName("os");
-           addon.isPlatformCompatible = Array.some(nodes, function(aNode) {
-             let text = aNode.textContent.toLowerCase().trim();
--            return text == "all" || text == Services.appinfo.OS.toLowerCase();
-+            return text == "all" || text == "linux" || text == Services.appinfo.OS.toLowerCase();
-           });
-           break;
-         case "install":
-@@ -1187,7 +1187,7 @@ this.AddonRepository = {
-           if (node.hasAttribute("os")) {
-             let os = node.getAttribute("os").trim().toLowerCase();
-             // If the os is not ALL and not the current OS then ignore this xpi
--            if (os != "all" && os != Services.appinfo.OS.toLowerCase())
-+            if (os != "all" && os != "linux" && os != Services.appinfo.OS.toLowerCase())
-               break;
-           }
  
-diff --git toolkit/mozapps/extensions/internal/XPIProvider.jsm toolkit/mozapps/extensions/internal/XPIProvider.jsm 
-index f70fd8d7e3bd8..81e8cd7764fdf 100644
---- toolkit/mozapps/extensions/internal/XPIProvider.jsm
-+++ toolkit/mozapps/extensions/internal/XPIProvider.jsm
-@@ -7186,7 +7186,7 @@ AddonInternal.prototype = {
+diff --git toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
+index f906f244b658..7bb2eb6697c6 100644
+--- toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
++++ toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
+@@ -596,7 +596,7 @@ export var AddonRepository = {
+       addon.version = String(aEntry.current_version.version);
+       if (Array.isArray(aEntry.current_version.files)) {
+         for (let file of aEntry.current_version.files) {
+-          if (file.platform == "all" || file.platform == lazy.PLATFORM) {
++          if (file.platform == "all" || file.platform == "linux" || file.platform == lazy.PLATFORM) {
+             if (file.url) {
+               addon.sourceURI = lazy.NetUtil.newURI(file.url);
+             }
+diff --git toolkit/mozapps/extensions/internal/XPIDatabase.jsm toolkit/mozapps/extensions/internal/XPIDatabase.jsm
+index 03186dad43a4..4053fc6f2702 100644
+--- toolkit/mozapps/extensions/internal/XPIDatabase.jsm
++++ toolkit/mozapps/extensions/internal/XPIDatabase.jsm
+@@ -634,7 +634,7 @@ class AddonInternal {
      // Something is causing errors in here
      try {
        for (let platform of this.targetPlatforms) {
@@ -67,4 +50,4 @@ index f70fd8d7e3bd8..81e8cd7764fdf 100644
 +        if (platform.os == "Linux" || platform.os == Services.appinfo.OS) {
            if (platform.abi) {
              needsABI = true;
-             if (platform.abi === abi)
+             if (platform.abi === abi) {
diff --git a/www/waterfox/files/patch-browser_installer_package-manifest.in b/www/waterfox/files/patch-browser_installer_package-manifest.in
new file mode 100644
index 000000000000..adb03232bb0b
--- /dev/null
+++ b/www/waterfox/files/patch-browser_installer_package-manifest.in
@@ -0,0 +1,19 @@
+--- browser/installer/package-manifest.in.orig	2024-04-30 12:34:17 UTC
++++ browser/installer/package-manifest.in
+@@ -227,13 +227,13 @@
+ @RESPATH@/chrome/toolkit.manifest
+ #ifdef MOZ_GTK
+ @RESPATH@/browser/chrome/icons/default/default16.png
+-@RESPATH@/browser/chrome/icons/default/default22.png
+-@RESPATH@/browser/chrome/icons/default/default24.png
++;@RESPATH@/browser/chrome/icons/default/default22.png
++;@RESPATH@/browser/chrome/icons/default/default24.png
+ @RESPATH@/browser/chrome/icons/default/default32.png
+ @RESPATH@/browser/chrome/icons/default/default48.png
+ @RESPATH@/browser/chrome/icons/default/default64.png
+ @RESPATH@/browser/chrome/icons/default/default128.png
+-@RESPATH@/browser/chrome/icons/default/default256.png
++;@RESPATH@/browser/chrome/icons/default/default256.png
+ #endif
+ @RESPATH@/browser/features/*
+ 
diff --git a/www/waterfox/files/patch-bug1021761 b/www/waterfox/files/patch-bug1021761
deleted file mode 100644
index f0764a8c4b22..000000000000
--- a/www/waterfox/files/patch-bug1021761
+++ /dev/null
@@ -1,1218 +0,0 @@
-diff --git build/moz.configure/old.configure build/moz.configure/old.configure
-index cd6c37cf4c7c..e98dc7973a6a 100644
---- build/moz.configure/old.configure
-+++ build/moz.configure/old.configure
-@@ -275,6 +275,7 @@ def old_configure_options(*options):
-     '--with-nspr-prefix',
-     '--with-nss-exec-prefix',
-     '--with-nss-prefix',
-+    '--with-oss',
-     '--with-pthreads',
-     '--with-qemu-exe',
-     '--with-sixgill',
-diff --git old-configure.in old-configure.in
-index dff46614635e..dbbfdb76ab78 100644
---- old-configure.in
-+++ old-configure.in
-@@ -3128,6 +3128,67 @@ AC_DEFINE(MOZ_WEBM_ENCODER)
- AC_SUBST(MOZ_WEBM_ENCODER)
- 
- dnl ==================================
-+dnl = Check OSS availability
-+dnl ==================================
-+
-+dnl If using Linux, Solaris or BSDs, ensure that OSS is available
-+case "$OS_TARGET" in
-+Linux|SunOS|DragonFly|FreeBSD|NetBSD|GNU/kFreeBSD)
-+    MOZ_OSS=1
-+    ;;
-+esac
-+
-+MOZ_ARG_WITH_STRING(oss,
-+[  --with-oss[=PFX]        Enable OpenSoundSystem support [installed at prefix PFX]],
-+   OSSPREFIX=$withval)
-+
-+if test -n "$OSSPREFIX"; then
-+    if test "$OSSPREFIX" != "no"; then
-+        MOZ_OSS=1
-+    else
-+        MOZ_OSS=
-+    fi
-+fi
-+
-+_SAVE_CFLAGS=$CFLAGS
-+_SAVE_LIBS=$LIBS
-+if test -n "$MOZ_OSS"; then
-+    dnl Prefer 4Front implementation
-+    AC_MSG_CHECKING([MOZ_OSS_CFLAGS])
-+    if test "$OSSPREFIX" != "yes"; then
-+        oss_conf=${OSSPREFIX%/usr}/etc/oss.conf
-+        if test -f "$oss_conf"; then
-+            . "$oss_conf"
-+        else
-+            OSSLIBDIR=$OSSPREFIX/lib/oss
-+        fi
-+        if test -d "$OSSLIBDIR"; then
-+            MOZ_OSS_CFLAGS="$MOZ_OSS_CFLAGS -I$OSSLIBDIR/include"
-+        fi
-+    fi
-+    AC_MSG_RESULT([$MOZ_OSS_CFLAGS])
-+
-+    CFLAGS="$CFLAGS $MOZ_OSS_CFLAGS"
-+    MOZ_CHECK_HEADERS(sys/soundcard.h soundcard.h)
-+
-+    if test "$ac_cv_header_sys_soundcard_h" != "yes" -a \
-+            "$ac_cv_header_soundcard_h" != "yes"; then
-+        AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET.  Disable with --without-oss.])
-+    fi
-+
-+    dnl Assume NetBSD implementation over SunAudio
-+    AC_CHECK_LIB(ossaudio, _oss_ioctl,
-+        [AC_DEFINE_UNQUOTED(CUBEB_OSS_DEFAULT_OUTPUT, "/dev/sound")
-+         MOZ_OSS_LIBS="$MOZ_OSS_LIBS -lossaudio"])
-+fi
-+CFLAGS=$_SAVE_CFLAGS
-+LIBS=$_SAVE_LIBS
-+
-+AC_SUBST(MOZ_OSS)
-+AC_SUBST_LIST(MOZ_OSS_CFLAGS)
-+AC_SUBST_LIST(MOZ_OSS_LIBS)
-+
-+dnl ==================================
- dnl = Check alsa availability on Linux
- dnl ==================================
- 
-diff --git dom/media/CubebUtils.cpp dom/media/CubebUtils.cpp
-index e10e07e06ade..1fd561bea113 100644
---- dom/media/CubebUtils.cpp
-+++ dom/media/CubebUtils.cpp
-@@ -71,7 +71,8 @@ const char* AUDIOSTREAM_BACKEND_ID_STR[] = {
-   "sndio",
-   "opensl",
-   "audiotrack",
--  "kai"
-+  "kai",
-+  "oss",
- };
- /* Index for failures to create an audio stream the first time. */
- const int CUBEB_BACKEND_INIT_FAILURE_FIRST =
-diff --git media/libcubeb/AUTHORS media/libcubeb/AUTHORS
-index 0fde65baad34..f8663c43b475 100644
---- media/libcubeb/AUTHORS
-+++ media/libcubeb/AUTHORS
-@@ -4,6 +4,7 @@ Michael Wu <mwu@mozilla.com>
- Paul Adenot <paul@paul.cx>
- David Richards <drichards@mozilla.com>
- Sebastien Alaiwan <sebastien.alaiwan@gmail.com>
-+Evgeniy Vodolazskiy <waterlaz@gmail.com>
- KO Myung-Hun <komh@chollian.net>
- Haakon Sporsheim <haakon.sporsheim@telenordigital.com>
- Alex Chronopoulos <achronop@gmail.com>
-diff --git media/libcubeb/src/cubeb.c media/libcubeb/src/cubeb.c
-index 57bcb4c13652..68be024f4a68 100644
---- media/libcubeb/src/cubeb.c
-+++ media/libcubeb/src/cubeb.c
-@@ -54,6 +54,9 @@ int audiotrack_init(cubeb ** context, char const * context_name);
- #if defined(USE_KAI)
- int kai_init(cubeb ** context, char const * context_name);
- #endif
-+#if defined(USE_OSS)
-+int oss_init(cubeb ** context, char const * context_name);
-+#endif
- 
- static int
- validate_stream_params(cubeb_stream_params * input_stream_params,
-@@ -155,6 +158,10 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam
- #if defined(USE_KAI)
-       init_oneshot = kai_init;
- #endif
-+    } else if (!strcmp(backend_name, "oss")) {
-+#if defined(USE_OSS)
-+      init_oneshot = oss_init;
-+#endif
-     } else {
-       /* Already set */
-     }
-@@ -196,6 +203,9 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam
- #if defined(USE_KAI)
-     kai_init,
- #endif
-+#if defined(USE_OSS)
-+    oss_init,
-+#endif
-   };
-   int i;
- 
-diff --git media/libcubeb/src/cubeb_alsa.c media/libcubeb/src/cubeb_alsa.c
-index 05ad27fef53b..3ea78e994f59 100644
---- media/libcubeb/src/cubeb_alsa.c
-+++ media/libcubeb/src/cubeb_alsa.c
-@@ -12,6 +12,7 @@
- #include <sys/time.h>
- #include <assert.h>
- #include <limits.h>
-+#include <dlfcn.h>
- #include <poll.h>
- #include <unistd.h>
- #include <alsa/asoundlib.h>
-@@ -25,6 +26,52 @@
- 
- #define ALSA_PA_PLUGIN "ALSA <-> PulseAudio PCM I/O Plugin"
- 
-+#ifdef DISABLE_LIBASOUND_DLOPEN
-+#define WRAP(x) x
-+#else
-+#define WRAP(x) cubeb_##x
-+#define MAKE_TYPEDEF(x) static typeof(x) * cubeb_##x
-+MAKE_TYPEDEF(snd_config);
-+MAKE_TYPEDEF(snd_config_add);
-+MAKE_TYPEDEF(snd_config_copy);
-+MAKE_TYPEDEF(snd_config_delete);
-+MAKE_TYPEDEF(snd_config_get_id);
-+MAKE_TYPEDEF(snd_config_get_string);
-+MAKE_TYPEDEF(snd_config_imake_integer);
-+MAKE_TYPEDEF(snd_config_search);
-+MAKE_TYPEDEF(snd_config_search_definition);
-+MAKE_TYPEDEF(snd_lib_error_set_handler);
-+MAKE_TYPEDEF(snd_pcm_avail_update);
-+MAKE_TYPEDEF(snd_pcm_close);
-+MAKE_TYPEDEF(snd_pcm_delay);
-+MAKE_TYPEDEF(snd_pcm_drain);
-+MAKE_TYPEDEF(snd_pcm_frames_to_bytes);
-+MAKE_TYPEDEF(snd_pcm_get_params);
-+/* snd_pcm_hw_params_alloca is actually a macro */
-+/* MAKE_TYPEDEF(snd_pcm_hw_params_alloca); */
-+MAKE_TYPEDEF(snd_pcm_hw_params_sizeof);
-+#define snd_pcm_hw_params_sizeof cubeb_snd_pcm_hw_params_sizeof
-+MAKE_TYPEDEF(snd_pcm_hw_params_any);
-+MAKE_TYPEDEF(snd_pcm_hw_params_get_channels_max);
-+MAKE_TYPEDEF(snd_pcm_hw_params_get_rate);
-+MAKE_TYPEDEF(snd_pcm_hw_params_set_rate_near);
-+MAKE_TYPEDEF(snd_pcm_nonblock);
-+MAKE_TYPEDEF(snd_pcm_open);
-+MAKE_TYPEDEF(snd_pcm_open_lconf);
-+MAKE_TYPEDEF(snd_pcm_pause);
-+MAKE_TYPEDEF(snd_pcm_poll_descriptors);
-+MAKE_TYPEDEF(snd_pcm_poll_descriptors_count);
-+MAKE_TYPEDEF(snd_pcm_poll_descriptors_revents);
-+MAKE_TYPEDEF(snd_pcm_readi);
-+MAKE_TYPEDEF(snd_pcm_recover);
-+MAKE_TYPEDEF(snd_pcm_set_params);
-+MAKE_TYPEDEF(snd_pcm_start);
-+MAKE_TYPEDEF(snd_pcm_state);
-+MAKE_TYPEDEF(snd_pcm_writei);
-+
-+#undef MAKE_TYPEDEF
-+#endif
-+
- /* ALSA is not thread-safe.  snd_pcm_t instances are individually protected
-    by the owning cubeb_stream's mutex.  snd_pcm_t creation and destruction
-    is not thread-safe until ALSA 1.0.24 (see alsa-lib.git commit 91c9c8f1),
-@@ -65,6 +112,8 @@ struct cubeb {
-      workaround is not required. */
-   snd_config_t * local_config;
-   int is_pa;
-+
-+  void * libasound;
- };
- 
- enum stream_state {
-@@ -243,8 +292,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;
- }
- 
-@@ -276,9 +325,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) {
-@@ -301,7 +350,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
-@@ -345,7 +394,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) {
-@@ -372,8 +421,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 */
-@@ -400,7 +449,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 {
-@@ -413,13 +462,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);
-     }
-   }
- 
-@@ -535,26 +584,26 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
- 
*** 147099 LINES SKIPPED ***