diff options
author | flo <flo@FreeBSD.org> | 2012-07-27 05:49:58 +0800 |
---|---|---|
committer | flo <flo@FreeBSD.org> | 2012-07-27 05:49:58 +0800 |
commit | 85b904b679203420da0f901ae5b1f3bb29dfb7cd (patch) | |
tree | 89c0045d73cc71a8a86842d8aa10f24e71cb5f26 /mail | |
parent | 864283a90c51467eba734e03bd14aeec892b4542 (diff) | |
download | freebsd-ports-gnome-85b904b679203420da0f901ae5b1f3bb29dfb7cd.tar.gz freebsd-ports-gnome-85b904b679203420da0f901ae5b1f3bb29dfb7cd.tar.zst freebsd-ports-gnome-85b904b679203420da0f901ae5b1f3bb29dfb7cd.zip |
- update firefox/thunderbird ESR versions to 10.0.6
- update firefox 14.0.1
- update thunderbird to 14.0
- update seamonkey to 2.11
- switch to new options framework
- add experimental rendering via cairo-qt (QT4 option)
- add audio backend options (ALSA and PulseAudio)
- rename SMB option to GNOMEVFS2
- turn on LOGGING by default (like upstream linux builds)
- improve about:memory output
- unbreak PGO
- use system libs [1]
- switch to libevent2 [2]
- fix conflict with devel/libunwind and base gcc [3]
- unbreak clang/libc++ build [4]
- unbreak build with base gcc on >= 9.x [5]
- use common IPC code with other BSDs[6]
- and *miscellaneous improvements*
PR: ports/146231 [1], ports/161421 [2]
ports/150631, ports/168369, ports/168637, ports/168793, ports/168978 [3]
ports/163454, ports/164905, ports/169231 [4]
ports/169389, ports/169479 [5]
Obtained from: pkgsrc via bugzilla #753046 [6]
In collaboration with: Jan Beich (who did the major part of this work and
deserves a special thank you!)
Diffstat (limited to 'mail')
102 files changed, 3925 insertions, 1550 deletions
diff --git a/mail/linux-thunderbird/Makefile b/mail/linux-thunderbird/Makefile index eddcb22092d4..ff14eedb9af9 100644 --- a/mail/linux-thunderbird/Makefile +++ b/mail/linux-thunderbird/Makefile @@ -6,7 +6,7 @@ # PORTNAME= thunderbird -PORTVERSION= 10.0.5 +PORTVERSION= 10.0.6 CATEGORIES= mail MASTER_SITE_SUBDIR?= ${PORTNAME}/releases/${PORTVERSION}esr/linux-i686/en-US DISTNAME= ${PORTNAME}-${DISTVERSION}esr @@ -16,7 +16,7 @@ COMMENT= Mozilla Thunderbird is standalone mail and news that stands above USE_BZIP2= yes -USE_LINUX_APPS= dbusglib dbuslibs alsalib +USE_LINUX_APPS= dbusglib dbuslibs alsalib alsa-plugins-oss .include "${.CURDIR}/../../www/linux-seamonkey/Makefile.common" .include <bsd.port.mk> diff --git a/mail/linux-thunderbird/distinfo b/mail/linux-thunderbird/distinfo index ec21c53f7220..0d5506944265 100644 --- a/mail/linux-thunderbird/distinfo +++ b/mail/linux-thunderbird/distinfo @@ -1,2 +1,2 @@ -SHA256 (thunderbird-10.0.5esr.tar.bz2) = 38258c5357ff398bb8ebcd7eb4749269b81f44915994b72c781c3688a431e441 -SIZE (thunderbird-10.0.5esr.tar.bz2) = 18569797 +SHA256 (thunderbird-10.0.6esr.tar.bz2) = 7051b910825a2838ac9a1bcb23c520d82be5fed4871266f1cd8954a8e876776b +SIZE (thunderbird-10.0.6esr.tar.bz2) = 18574190 diff --git a/mail/thunderbird-esr-i18n/Makefile b/mail/thunderbird-esr-i18n/Makefile index de812d2bfa73..6d043771bc8d 100644 --- a/mail/thunderbird-esr-i18n/Makefile +++ b/mail/thunderbird-esr-i18n/Makefile @@ -6,7 +6,7 @@ # PORTNAME= thunderbird-i18n -PORTVERSION= 10.0.5 +PORTVERSION= 10.0.6 CATEGORIES= mail MASTER_SITE_SUBDIR= thunderbird/releases/${PORTVERSION}esr/linux-i686/xpi PKGNAMEPREFIX= diff --git a/mail/thunderbird-esr-i18n/distinfo b/mail/thunderbird-esr-i18n/distinfo index acf410efda91..ae2f424be6b1 100644 --- a/mail/thunderbird-esr-i18n/distinfo +++ b/mail/thunderbird-esr-i18n/distinfo @@ -1,84 +1,84 @@ -SHA256 (xpi/thunderbird-i18n-10.0.5/ar.xpi) = b69d852ba95ab5c14a8da84fb653d2163b2c37d808c9fae92d39ee9b8388a86e -SIZE (xpi/thunderbird-i18n-10.0.5/ar.xpi) = 441466 -SHA256 (xpi/thunderbird-i18n-10.0.5/br.xpi) = e2d9d3049ad4036737e58aa018c63cdea9726d801b9fa319e94263cc4cbbf829 -SIZE (xpi/thunderbird-i18n-10.0.5/br.xpi) = 415527 -SHA256 (xpi/thunderbird-i18n-10.0.5/ca.xpi) = e65a1eb51c07a1a114db98e6b7a9b7473f35d86b9e82dbcabb60871a67feade6 -SIZE (xpi/thunderbird-i18n-10.0.5/ca.xpi) = 416069 -SHA256 (xpi/thunderbird-i18n-10.0.5/cs.xpi) = b4af7f2f9161412e40b9d54d51ca8351b8c353335a2b5e4ddb155a4c1699a7e1 -SIZE (xpi/thunderbird-i18n-10.0.5/cs.xpi) = 419418 -SHA256 (xpi/thunderbird-i18n-10.0.5/da.xpi) = 60477ce2c2f1cf98e341d810ef38a7352ce93af3d11a1687dd40c6b9a83fe69b -SIZE (xpi/thunderbird-i18n-10.0.5/da.xpi) = 363376 -SHA256 (xpi/thunderbird-i18n-10.0.5/de.xpi) = 72bfe1498f4f21e19a53e3ad3875e55dd005f2dfe91a5b9f3d598433452d83d2 -SIZE (xpi/thunderbird-i18n-10.0.5/de.xpi) = 418266 -SHA256 (xpi/thunderbird-i18n-10.0.5/en-GB.xpi) = 50a52ed103c76542b60ebff6302c256e3404fbbdcae1ac8699fb5ef9bde630c0 -SIZE (xpi/thunderbird-i18n-10.0.5/en-GB.xpi) = 391743 -SHA256 (xpi/thunderbird-i18n-10.0.5/en-US.xpi) = bb5f56a0a97c7a0c7e060ff26fa5a4c55ae8fc36227abf052704b3fc1912ec21 -SIZE (xpi/thunderbird-i18n-10.0.5/en-US.xpi) = 391242 -SHA256 (xpi/thunderbird-i18n-10.0.5/es-AR.xpi) = 3d13e3b98a4f98ca28dd3f704cfd35b836588307ac9c1126a0b6ab3390dbfb78 -SIZE (xpi/thunderbird-i18n-10.0.5/es-AR.xpi) = 410726 -SHA256 (xpi/thunderbird-i18n-10.0.5/es-ES.xpi) = 447f96ded904518422519c48dc3fb6a031bed6202f3f3d2bdb6c35aa86a8d651 -SIZE (xpi/thunderbird-i18n-10.0.5/es-ES.xpi) = 355142 -SHA256 (xpi/thunderbird-i18n-10.0.5/et.xpi) = 2fa43e19032210a713203e6df3ad2ecd48bc5c4904f53bd7109cfa23741ac17a -SIZE (xpi/thunderbird-i18n-10.0.5/et.xpi) = 410724 -SHA256 (xpi/thunderbird-i18n-10.0.5/eu.xpi) = 517cb9354440924029bace7447d4573d1e076258da452e6339d4ed3013cbdc4a -SIZE (xpi/thunderbird-i18n-10.0.5/eu.xpi) = 406387 -SHA256 (xpi/thunderbird-i18n-10.0.5/fi.xpi) = 724861217296f7f4f9bbe8ded334ac028ba60ec10b6c4b59b47f62783317d8f9 -SIZE (xpi/thunderbird-i18n-10.0.5/fi.xpi) = 411928 -SHA256 (xpi/thunderbird-i18n-10.0.5/fr.xpi) = d4fbba44e7f37fde324d8dc8b296e2891051febd77526188816f1fd63b133b2d -SIZE (xpi/thunderbird-i18n-10.0.5/fr.xpi) = 414749 -SHA256 (xpi/thunderbird-i18n-10.0.5/fy-NL.xpi) = 9505cde98c321854c4abec4b3f347adffbcd39089bdb22184f4c6f38f7a35fac -SIZE (xpi/thunderbird-i18n-10.0.5/fy-NL.xpi) = 413985 -SHA256 (xpi/thunderbird-i18n-10.0.5/ga-IE.xpi) = 9b50f292645ab8b920cb293f559ab78e5270a034589635d796bc6032ff402c27 -SIZE (xpi/thunderbird-i18n-10.0.5/ga-IE.xpi) = 423260 -SHA256 (xpi/thunderbird-i18n-10.0.5/gd.xpi) = 0ff6ed5d17eb0126638b4e0d64be6fb923f9882a95676fec380b1e7ae8f68dc2 -SIZE (xpi/thunderbird-i18n-10.0.5/gd.xpi) = 425875 -SHA256 (xpi/thunderbird-i18n-10.0.5/gl.xpi) = 1e8c7b4dd21ef0bca2d550300b99feaafc18b7d585cc27124201d5cfe8e67b10 -SIZE (xpi/thunderbird-i18n-10.0.5/gl.xpi) = 409228 -SHA256 (xpi/thunderbird-i18n-10.0.5/he.xpi) = 00a4807bfcc0bbe5b9e7333ced32b1f94fecfdfd662069ecfc02976417e47aea -SIZE (xpi/thunderbird-i18n-10.0.5/he.xpi) = 439206 -SHA256 (xpi/thunderbird-i18n-10.0.5/hu.xpi) = 2df737386b9cec55081b2795cd3a1c3920359878739aec5f3b8a4ec0ccf2b97d -SIZE (xpi/thunderbird-i18n-10.0.5/hu.xpi) = 426356 -SHA256 (xpi/thunderbird-i18n-10.0.5/is.xpi) = 64257028a6b24cd33b5e54a8c06c99e6745eb03a1e8481eaee6e7d44dca0e4f7 -SIZE (xpi/thunderbird-i18n-10.0.5/is.xpi) = 412634 -SHA256 (xpi/thunderbird-i18n-10.0.5/it.xpi) = 3b230b10edaaca08b0de5a60e80fccf5e14b210e92c7caaa52f1b2c231ecb177 -SIZE (xpi/thunderbird-i18n-10.0.5/it.xpi) = 347633 -SHA256 (xpi/thunderbird-i18n-10.0.5/ja.xpi) = 4e910ae6b8db167b66d25981f86a337421d4b890aaa60aadf2298c2eae9bfb54 -SIZE (xpi/thunderbird-i18n-10.0.5/ja.xpi) = 459031 -SHA256 (xpi/thunderbird-i18n-10.0.5/ko.xpi) = 1f6f07a2c84902bad9a1f78eff13c94bd07757ff7117bec23d3371cde092158e -SIZE (xpi/thunderbird-i18n-10.0.5/ko.xpi) = 372016 -SHA256 (xpi/thunderbird-i18n-10.0.5/lt.xpi) = 34832a1c54ba4874d67ae8af17554f275e15b7a2319b4cbe19503631ec1c4c27 -SIZE (xpi/thunderbird-i18n-10.0.5/lt.xpi) = 531022 -SHA256 (xpi/thunderbird-i18n-10.0.5/nb-NO.xpi) = fcbeb3ffb602a8253f8a07f0eb8cdb925b62a2ad81c8d26360656295da4dbecf -SIZE (xpi/thunderbird-i18n-10.0.5/nb-NO.xpi) = 407729 -SHA256 (xpi/thunderbird-i18n-10.0.5/nl.xpi) = 6610a240a3991f5d848bb1304516cd1caac99a14978a2900949387384a0ca02f -SIZE (xpi/thunderbird-i18n-10.0.5/nl.xpi) = 407985 -SHA256 (xpi/thunderbird-i18n-10.0.5/nn-NO.xpi) = fecdcd06715ad18b0425f429e8ccef5a168239979898aff8e81751b7ef0abf82 -SIZE (xpi/thunderbird-i18n-10.0.5/nn-NO.xpi) = 409458 -SHA256 (xpi/thunderbird-i18n-10.0.5/pl.xpi) = d1929ec5647a790c3079ced6d526e1ceb2c19c140e6569990d5a862d12048519 -SIZE (xpi/thunderbird-i18n-10.0.5/pl.xpi) = 393578 -SHA256 (xpi/thunderbird-i18n-10.0.5/pt-BR.xpi) = 60f0912f612c2ebf3ab4ab89cddd1b3a7222f5f18475a7a05cb5cbc5524e0e78 -SIZE (xpi/thunderbird-i18n-10.0.5/pt-BR.xpi) = 417229 -SHA256 (xpi/thunderbird-i18n-10.0.5/pt-PT.xpi) = b8ef82bf9e56914915023f787ce94ca62c6e390ccd0a2ffbf77716aa54bddc97 -SIZE (xpi/thunderbird-i18n-10.0.5/pt-PT.xpi) = 414265 -SHA256 (xpi/thunderbird-i18n-10.0.5/rm.xpi) = ae1cdccfe338e81039d8a50cbc77739e4e93e65f33701bc7a8d5ff5c89f9b080 -SIZE (xpi/thunderbird-i18n-10.0.5/rm.xpi) = 414709 -SHA256 (xpi/thunderbird-i18n-10.0.5/ru.xpi) = 72dd2420c89af9d056594bde8fea1764bbb504bf8399219cf6369d180b090ba3 -SIZE (xpi/thunderbird-i18n-10.0.5/ru.xpi) = 411634 -SHA256 (xpi/thunderbird-i18n-10.0.5/si.xpi) = a43f9eb2b7cb5b3ff150b7399a025233a379e7b9ec1ba6e18c91faeb484cc9a3 -SIZE (xpi/thunderbird-i18n-10.0.5/si.xpi) = 456607 -SHA256 (xpi/thunderbird-i18n-10.0.5/sk.xpi) = f3e69874812ab562ccaf5eb3ea3132261694fb0ab06794fa3789098414e07c37 -SIZE (xpi/thunderbird-i18n-10.0.5/sk.xpi) = 425029 -SHA256 (xpi/thunderbird-i18n-10.0.5/sl.xpi) = 08f3af3962eeb07fa6df745adfff8795eba53a372c149713d2af144a89dd8ec4 -SIZE (xpi/thunderbird-i18n-10.0.5/sl.xpi) = 410431 -SHA256 (xpi/thunderbird-i18n-10.0.5/sq.xpi) = 55f4a9d6bc65d5623b9570ebb861987e9229a9867d800bb2589e204906d220bc -SIZE (xpi/thunderbird-i18n-10.0.5/sq.xpi) = 360480 -SHA256 (xpi/thunderbird-i18n-10.0.5/sv-SE.xpi) = 35b43033dec37f5de2026343e6b17d32878fce9f51eb3abd44d594aa418d6277 -SIZE (xpi/thunderbird-i18n-10.0.5/sv-SE.xpi) = 478280 -SHA256 (xpi/thunderbird-i18n-10.0.5/ta-LK.xpi) = cb7d78d90b7380f85c83093307934ff09471eb707be58a3d6c43914686eefc88 -SIZE (xpi/thunderbird-i18n-10.0.5/ta-LK.xpi) = 475718 -SHA256 (xpi/thunderbird-i18n-10.0.5/tr.xpi) = 748f9a5c2660f2da480eff9bf40373567d5a8ce59c0fe07192335a73541458d2 -SIZE (xpi/thunderbird-i18n-10.0.5/tr.xpi) = 418209 -SHA256 (xpi/thunderbird-i18n-10.0.5/uk.xpi) = 7bb99378a48c12da258dc21c511267251b864ed26a31a653ca8c0188765ca78a -SIZE (xpi/thunderbird-i18n-10.0.5/uk.xpi) = 463925 -SHA256 (xpi/thunderbird-i18n-10.0.5/zh-TW.xpi) = a6acbc39e441f148a68776de671a3a365bda2a8b388b2ed0d235ca082e174faf -SIZE (xpi/thunderbird-i18n-10.0.5/zh-TW.xpi) = 431827 +SHA256 (xpi/thunderbird-i18n-10.0.6/ar.xpi) = 0223cc4a79d98945a20cd5b686a90d996b90211c5b6d704fd2b0e1493f9adb32 +SIZE (xpi/thunderbird-i18n-10.0.6/ar.xpi) = 441466 +SHA256 (xpi/thunderbird-i18n-10.0.6/br.xpi) = b796d258b77b4d8374956456e98977e7d29e759e1e598e4d800fb5ba84cca28b +SIZE (xpi/thunderbird-i18n-10.0.6/br.xpi) = 415527 +SHA256 (xpi/thunderbird-i18n-10.0.6/ca.xpi) = 1c050afcb257d664c0c4aaf5488e9d27081d0987757e5c0e6238abef64cd68fc +SIZE (xpi/thunderbird-i18n-10.0.6/ca.xpi) = 416069 +SHA256 (xpi/thunderbird-i18n-10.0.6/cs.xpi) = 3c27c5b2b08c108cf2411dd00294950b56249b145ed356b422c7b240d3b16412 +SIZE (xpi/thunderbird-i18n-10.0.6/cs.xpi) = 419419 +SHA256 (xpi/thunderbird-i18n-10.0.6/da.xpi) = 505540bde73c21243ba088b04a08e8a6bf2578a1b1b44daae080b8806f191377 +SIZE (xpi/thunderbird-i18n-10.0.6/da.xpi) = 363376 +SHA256 (xpi/thunderbird-i18n-10.0.6/de.xpi) = 174841c6b26c1a35b97eb234df220223f6391be0155e05ae547acd3509eb63e6 +SIZE (xpi/thunderbird-i18n-10.0.6/de.xpi) = 418266 +SHA256 (xpi/thunderbird-i18n-10.0.6/en-GB.xpi) = 5ace1c398328d5c2e00c046edab1543faf5fcda1f13647ee50778d72c6107596 +SIZE (xpi/thunderbird-i18n-10.0.6/en-GB.xpi) = 391743 +SHA256 (xpi/thunderbird-i18n-10.0.6/en-US.xpi) = 71ab52853aaa8f55c22392937c3b3bb700d2ea2443cf4b1275269f7fa5811a70 +SIZE (xpi/thunderbird-i18n-10.0.6/en-US.xpi) = 391242 +SHA256 (xpi/thunderbird-i18n-10.0.6/es-AR.xpi) = 53d467243b613ce076add339959175d98b688e70cf22191116f97309f1fbf2ae +SIZE (xpi/thunderbird-i18n-10.0.6/es-AR.xpi) = 410726 +SHA256 (xpi/thunderbird-i18n-10.0.6/es-ES.xpi) = 27ea8ee4d12811805612009c0d0be3246d5af8f2b509d27cc1aef47527d51565 +SIZE (xpi/thunderbird-i18n-10.0.6/es-ES.xpi) = 355143 +SHA256 (xpi/thunderbird-i18n-10.0.6/et.xpi) = 82bc9cd8e9a2a4eb4dadff80706a31fdb762fc7baee3c0310da68c22de71b175 +SIZE (xpi/thunderbird-i18n-10.0.6/et.xpi) = 410724 +SHA256 (xpi/thunderbird-i18n-10.0.6/eu.xpi) = 46c4a9ef3ae80053157393fe767afaf1dc130268fe4a650ca41d72e0ce790487 +SIZE (xpi/thunderbird-i18n-10.0.6/eu.xpi) = 406387 +SHA256 (xpi/thunderbird-i18n-10.0.6/fi.xpi) = c2bea42568a928a293844a5ed172ac7dc289f56988bf8a29a047b0e2efa2074e +SIZE (xpi/thunderbird-i18n-10.0.6/fi.xpi) = 411928 +SHA256 (xpi/thunderbird-i18n-10.0.6/fr.xpi) = 909ccf3f85e488a686766e3a1c54868fb8c91a305ffd42031a1a747c7ecb7f9e +SIZE (xpi/thunderbird-i18n-10.0.6/fr.xpi) = 414749 +SHA256 (xpi/thunderbird-i18n-10.0.6/fy-NL.xpi) = 000d97b67290869298ce4550b8c5dacf81d36eddaefb116a504dddd8bafd0a9a +SIZE (xpi/thunderbird-i18n-10.0.6/fy-NL.xpi) = 413985 +SHA256 (xpi/thunderbird-i18n-10.0.6/ga-IE.xpi) = 17aa3b5092df7411f6a2039f245ce255a128938dee34e6977224cdfa1d6ec765 +SIZE (xpi/thunderbird-i18n-10.0.6/ga-IE.xpi) = 423261 +SHA256 (xpi/thunderbird-i18n-10.0.6/gd.xpi) = 2bb47d383359cd860155b1e71efa085a8d8b2a5a0b2ab41559468c48229b94af +SIZE (xpi/thunderbird-i18n-10.0.6/gd.xpi) = 425876 +SHA256 (xpi/thunderbird-i18n-10.0.6/gl.xpi) = c6aad0c59e6e8917c00373d6dd9b12ae8a5dae51fbd63d84937aee632af3410a +SIZE (xpi/thunderbird-i18n-10.0.6/gl.xpi) = 409229 +SHA256 (xpi/thunderbird-i18n-10.0.6/he.xpi) = f9b681d750defe2bd03c5f3129ee7d855b3e84733d680b94f433b6acce172f08 +SIZE (xpi/thunderbird-i18n-10.0.6/he.xpi) = 439206 +SHA256 (xpi/thunderbird-i18n-10.0.6/hu.xpi) = c88c902234b5878bae444c4133d17d58464ff401cccd7196d86279f26ba9c0b2 +SIZE (xpi/thunderbird-i18n-10.0.6/hu.xpi) = 426356 +SHA256 (xpi/thunderbird-i18n-10.0.6/is.xpi) = 351ff4311732a4b8127ed2642841bf3b92b5bcb1336666fa460352ec9afb09db +SIZE (xpi/thunderbird-i18n-10.0.6/is.xpi) = 412634 +SHA256 (xpi/thunderbird-i18n-10.0.6/it.xpi) = f2a225ad1b5d7e5292b5589cf03e880477d572a597c849c62a57584237f30335 +SIZE (xpi/thunderbird-i18n-10.0.6/it.xpi) = 347634 +SHA256 (xpi/thunderbird-i18n-10.0.6/ja.xpi) = a8e350421416229b93e7e825e072adb34d50dde91c81864be7463ce8470d8d67 +SIZE (xpi/thunderbird-i18n-10.0.6/ja.xpi) = 459031 +SHA256 (xpi/thunderbird-i18n-10.0.6/ko.xpi) = c13e33783f8d1bea548be5095716e84c36df00c610707612d80ca01a9ec5c814 +SIZE (xpi/thunderbird-i18n-10.0.6/ko.xpi) = 372016 +SHA256 (xpi/thunderbird-i18n-10.0.6/lt.xpi) = a00be860b6c1a7844a08ca0c0b4803e076817788c3049caa4c4343bdd394f6a4 +SIZE (xpi/thunderbird-i18n-10.0.6/lt.xpi) = 531022 +SHA256 (xpi/thunderbird-i18n-10.0.6/nb-NO.xpi) = 1a309be14b4b04722c91c10dbe490de9c64e8f185abde0489662b659f1fcd8d7 +SIZE (xpi/thunderbird-i18n-10.0.6/nb-NO.xpi) = 407729 +SHA256 (xpi/thunderbird-i18n-10.0.6/nl.xpi) = 472b2e8b6271e7be5beccd644563f043b89b38db3ff26778912fc2af476cf765 +SIZE (xpi/thunderbird-i18n-10.0.6/nl.xpi) = 407985 +SHA256 (xpi/thunderbird-i18n-10.0.6/nn-NO.xpi) = bc575d2c7c48c760aa5703326cc6a4b2bd387a7d364b9b77d5f32444315c015f +SIZE (xpi/thunderbird-i18n-10.0.6/nn-NO.xpi) = 409459 +SHA256 (xpi/thunderbird-i18n-10.0.6/pl.xpi) = 606585843ba8407f407d130a4522b42a5b60b7b64c4dc0a60078f16fac862bdf +SIZE (xpi/thunderbird-i18n-10.0.6/pl.xpi) = 393578 +SHA256 (xpi/thunderbird-i18n-10.0.6/pt-BR.xpi) = 0833f32f278ce2d1f74c884007d4731b21eab0075bbf27f0307d7ea238bcbfb4 +SIZE (xpi/thunderbird-i18n-10.0.6/pt-BR.xpi) = 417229 +SHA256 (xpi/thunderbird-i18n-10.0.6/pt-PT.xpi) = 25e1dca1ff07a60938867905147cea68bd724e5f40e5950e1fc7e3e5e8f2dc82 +SIZE (xpi/thunderbird-i18n-10.0.6/pt-PT.xpi) = 414266 +SHA256 (xpi/thunderbird-i18n-10.0.6/rm.xpi) = a5b541a4d3048c5396ffc35336354b71f2cef500a60ed2f9c65b0dab125dc49a +SIZE (xpi/thunderbird-i18n-10.0.6/rm.xpi) = 414709 +SHA256 (xpi/thunderbird-i18n-10.0.6/ru.xpi) = 38012fb38ea4fefcb1ebd7e7a57151ae7e8fbfa20fa463c34bf3ee7e4c2cad83 +SIZE (xpi/thunderbird-i18n-10.0.6/ru.xpi) = 411634 +SHA256 (xpi/thunderbird-i18n-10.0.6/si.xpi) = 4602f33aed0ce5af558482a2a4098edf4f24a6b2726ae6ebc0fbee77dfaf6931 +SIZE (xpi/thunderbird-i18n-10.0.6/si.xpi) = 456607 +SHA256 (xpi/thunderbird-i18n-10.0.6/sk.xpi) = e6c7104d138922fee7941929361331246ac2e9df655b8e7025d7dc066ef1c880 +SIZE (xpi/thunderbird-i18n-10.0.6/sk.xpi) = 425029 +SHA256 (xpi/thunderbird-i18n-10.0.6/sl.xpi) = 2ce183f0cb08f241c8aa12c07932e69ac418af66a43a4886890cb1f649f81f57 +SIZE (xpi/thunderbird-i18n-10.0.6/sl.xpi) = 410432 +SHA256 (xpi/thunderbird-i18n-10.0.6/sq.xpi) = 84361c6f6c9d9516fc405b24eb23cef2ef3ff03f633fdd87da1fe0d6dde499a8 +SIZE (xpi/thunderbird-i18n-10.0.6/sq.xpi) = 360480 +SHA256 (xpi/thunderbird-i18n-10.0.6/sv-SE.xpi) = 07d22a2988abb9618004e9ef19255389db08e86758f520000de5fa9f82b204f3 +SIZE (xpi/thunderbird-i18n-10.0.6/sv-SE.xpi) = 478281 +SHA256 (xpi/thunderbird-i18n-10.0.6/ta-LK.xpi) = a8214f2fd01af7fd8aa13462bee23dbaef8e08a4990aaf7b00df17f303514d04 +SIZE (xpi/thunderbird-i18n-10.0.6/ta-LK.xpi) = 475718 +SHA256 (xpi/thunderbird-i18n-10.0.6/tr.xpi) = 6911cc3ab94d64c62dd63481435ed675bc39bab109b3b1aa8ce1bc7a309e830e +SIZE (xpi/thunderbird-i18n-10.0.6/tr.xpi) = 418210 +SHA256 (xpi/thunderbird-i18n-10.0.6/uk.xpi) = 81774654be422fb766f54f18e1856ddcdd5a46c78ff95ff0c16d7e33f29f7589 +SIZE (xpi/thunderbird-i18n-10.0.6/uk.xpi) = 463925 +SHA256 (xpi/thunderbird-i18n-10.0.6/zh-TW.xpi) = 16f1f0e110da8f2c3cb27a202e60ff38b66de97973fee92e7b0192e57f972ea8 +SIZE (xpi/thunderbird-i18n-10.0.6/zh-TW.xpi) = 431827 diff --git a/mail/thunderbird-esr/Makefile b/mail/thunderbird-esr/Makefile index 8829354123ce..44618e494fc9 100644 --- a/mail/thunderbird-esr/Makefile +++ b/mail/thunderbird-esr/Makefile @@ -6,7 +6,7 @@ # PORTNAME= thunderbird -DISTVERSION= 10.0.5 +DISTVERSION= 10.0.6 CATEGORIES= mail ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA} MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}esr/source @@ -15,39 +15,34 @@ DISTNAME= ${PORTNAME}-${DISTVERSION}esr.source MAINTAINER= gecko@FreeBSD.org COMMENT= Mozilla Thunderbird is standalone mail and news that stands above -BUILD_DEPENDS= nspr>=4.8.7:${PORTSDIR}/devel/nspr \ +BUILD_DEPENDS= nspr>=4.8.8:${PORTSDIR}/devel/nspr \ + nss>=3.13.1:${PORTSDIR}/security/nss \ + sqlite3>=3.7.7.1:${PORTSDIR}/databases/sqlite3 \ cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \ unzip:${PORTSDIR}/archivers/unzip -LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo \ - event-1.4:${PORTSDIR}/devel/libevent CONFLICTS_BUILD= spidermonkey-* -USE_AUTOTOOLS= autoconf213 +USE_AUTOTOOLS= autoconf213:env LATEST_LINK= thunderbird-esr USE_GECKO= gecko CONFLICTS= thunderbird-1[1-9].* -USE_MOZILLA= -png -nss -dbm -jpeg -xft -MOZ_TOOLKIT= cairo-gtk2 +USE_MOZILLA= # empty MAKE_JOBS_SAFE= yes WANT_GNOME= yes +USE_QT4= # empty +QT_NONSTANDARD= yes ALL_TARGET= default -CONFIGURE_ENV= LOCALBASE=${LOCALBASE} -MAKE_ENV= PTHREAD_LDFLAGS="${PTHREAD_LIBS}" -HAS_CONFIGURE= yes +GNU_CONFIGURE= yes USE_BZIP2= yes USE_GMAKE= yes USE_GL= gl MOZ_PROTOCOLS= http,ftp,file,viewsource,res,data,wyciwyg,websocket -MOZ_GRAPHICS= default,-xbm MOZ_OPTIONS= --program-transform-name='s/thunderbird/${MOZILLA}/' \ - --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \ --enable-single-profile --disable-profilesharing \ - --enable-application=mail --enable-official-branding \ - --disable-updater --disable-necko-wifi \ - --with-system-libevent=${LOCALBASE} + --enable-application=mail --enable-official-branding MOZ_MK_OPTIONS= MOZ_MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1 MOZ_EXPORT= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1 MOZ_PKGCONFIG_FILES= @@ -58,45 +53,38 @@ PORTNAME_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png SYSTEM_PREFS= ${FAKEDIR}/lib/${PORTNAME}/defaults/pref/${PORTNAME}.js MOZ_PIS_SCRIPTS=moz_pis_S50cleanhome -OPTIONS= LIGHTNING "Enable calendar extension" off +OPTIONS_DEFINE= LIGHTNING +.include "${.CURDIR}/../../www/firefox/Makefile.options" .include <bsd.port.pre.mk> WRKSRC= ${WRKDIR}/comm-esr10 MOZSRC:= ${WRKSRC}/mozilla -.if ${ARCH} == powerpc64 +.if ${ARCH} == amd64 +CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL} +.elif ${ARCH} == powerpc64 .if ${OSVERSION} < 900033 BROKEN= Needs binutils 2.17.50 to build .else -CONFIGURE_ENV+= UNAME_m="powerpc64" +MOZ_EXPORT+= UNAME_m="powerpc64" CFLAGS+= -mminimal-toc .endif .endif -.if ${HAVE_GNOME:Mlibgnomeui}!="" -USE_GNOME+= libgnomeui -MOZ_OPTIONS+= --enable-gnomeui -.else -MOZ_OPTIONS+= --disable-gnomeui -.endif - -.if defined(WITHOUT_DBUS) -MOZ_OPTIONS+= --disable-dbus --disable-libnotify -.else -LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ - notify.4:${PORTSDIR}/devel/libnotify -.endif - .if ${ARCH} == amd64 || ${ARCH} == i386 BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm .endif -.if defined(WITH_LIGHTNING) +.if !empty(CXX:M*clang++*) +CFLAGS+= -Wno-return-type-c-linkage +.endif + +.if ${PORT_OPTIONS:MLIGHTNING} MOZ_OPTIONS+= --enable-calendar MOZ_MK_OPTIONS+= MOZ_CO_PROJECT=calendar LIGHTNING_DIR= share/lightning -XPI_FILE= ${MOZSRC}/dist/xpi-stage/lightning.xpi +XPI_FILE= ${MOZ_OBJDIR}/mozilla/dist/xpi-stage/lightning.xpi XPI_LIBDIR= ${PREFIX}/lib/xpi XPI_ORIG_ID= {e2fda1a4-762b-4020-b5ad-a41df1933103} XPI_ID= lightning@thunderbird.mozilla.org @@ -109,22 +97,8 @@ post-extract: <${FILESDIR}/thunderbird.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop post-patch: - @${GREP} -Flr \"/proc ${MOZSRC}/ipc/chromium/src/base | ${XARGS} ${REINPLACE_CMD} \ - -e 's|/proc/self/fd|/dev/fd|' \ - -e 's|/proc["/]|/compat/linux&|' - @${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \ - ${MOZSRC}/storage/build/Makefile.in \ - ${MOZSRC}/toolkit/library/Makefile.in \ - ${MOZSRC}/db/sqlite3/src/Makefile.in - @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ - ${MOZSRC}/security/manager/ssl/src/Makefile.in \ - ${MOZSRC}/js/src/config/mkdepend/Makefile.in \ - ${MOZSRC}/js/src/config/config.mk - @${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \ - s|-lpthread|${PTHREAD_LIBS}|g ; \ - s|echo aout|echo elf|g ; \ - s|/usr/X11R6|${LOCALBASE}|g' \ - ${MOZSRC}/js/src/configure + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + ${WRKSRC}/mail/app/nsMailApp.cpp pre-configure: (cd ${WRKSRC} && ${AUTOCONF}) @@ -143,7 +117,7 @@ post-install: ${MKDIR} ${PREFIX}/share/applications ${INSTALL_DATA} ${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop ${PREFIX}/share/applications ${LN} -sf ${PORTNAME_ICON_SRC} ${PREFIX}/share/pixmaps/${PORTNAME_ICON} -.if defined(WITH_LIGHTNING) +.if ${PORT_OPTIONS:MLIGHTNING} @${MKDIR} ${XPI_LIBDIR}/${XPI_ID} ${XPI_LIBDIR}/symlinks/thunderbird @(cd ${XPI_LIBDIR}/${XPI_ID}; ${TAR} -xf ${XPI_FILE}) @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${XPI_ID} diff --git a/mail/thunderbird-esr/distinfo b/mail/thunderbird-esr/distinfo index 6333e4c500a5..7dccd06e81a7 100644 --- a/mail/thunderbird-esr/distinfo +++ b/mail/thunderbird-esr/distinfo @@ -1,2 +1,2 @@ -SHA256 (thunderbird-10.0.5esr.source.tar.bz2) = d9e94cf730b6ce8974a63cbc240f27671a74c662942c26a6f4264ed24af4281f -SIZE (thunderbird-10.0.5esr.source.tar.bz2) = 97617123 +SHA256 (thunderbird-10.0.6esr.source.tar.bz2) = 0962399e13ea4b97816730ea81260ec304a6da49c9562840c776f4d1a536c1e8 +SIZE (thunderbird-10.0.6esr.source.tar.bz2) = 97779445 diff --git a/mail/thunderbird-esr/files/patch-alsapulse b/mail/thunderbird-esr/files/patch-alsapulse new file mode 100644 index 000000000000..47580cd562b3 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-alsapulse @@ -0,0 +1,119 @@ +--- mozilla/config/autoconf.mk.in~ ++++ mozilla/config/autoconf.mk.in +@@ -568,7 +568,13 @@ MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CF + MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@ + MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@ + ++MOZ_ALSA = @MOZ_ALSA@ + MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@ ++MOZ_ALSA_CFLAGS = @MOZ_ALSA_CFLAGS@ ++ ++MOZ_PULSEAUDIO = @MOZ_PULSEAUDIO@ ++MOZ_PULSEAUDIO_LIBS = @MOZ_PULSEAUDIO_LIBS@ ++MOZ_PULSEAUDIO_CFLAGS = @MOZ_PULSEAUDIO_CFLAGS@ + + GLIB_CFLAGS = @GLIB_CFLAGS@ + GLIB_LIBS = @GLIB_LIBS@ +--- mozilla/configure.in~ ++++ mozilla/configure.in +@@ -5758,17 +5775,48 @@ dnl ==================================== + dnl = Check alsa availability on Linux if using sydneyaudio + dnl ======================================================== + ++MOZ_ARG_ENABLE_BOOL(alsa, ++[ --enable-alsa Enable Alsa support], ++MOZ_ALSA=1, ++MOZ_ALSA= MOZ_ALSA_FORCE=$enableval) ++ + dnl If using sydneyaudio with Linux, ensure that the alsa library is available +-if test -n "$MOZ_SYDNEYAUDIO"; then ++if test -n "$MOZ_SYDNEYAUDIO" -a "$MOZ_ALSA_FORCE" != "no"; then + case "$target_os" in + linux*) ++ MOZ_ALSA=1 ++ ;; ++ esac ++fi ++ ++if test -n "$MOZ_ALSA"; then + PKG_CHECK_MODULES(MOZ_ALSA, alsa, , + [echo "$MOZ_ALSA_PKG_ERRORS" + AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) +- ;; +- esac + fi + ++AC_SUBST(MOZ_ALSA_CFLAGS) ++AC_SUBST(MOZ_ALSA) ++ ++dnl ======================================================== ++dnl = Enable PulseAudio ++dnl ======================================================== ++ ++MOZ_ARG_ENABLE_BOOL(pulseaudio, ++[ --enable-pulseaudio Enable PulseAudio support], ++MOZ_PULSEAUDIO=1, ++MOZ_PULSEAUDIO=) ++ ++if test -n "$MOZ_PULSEAUDIO"; then ++ PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, , ++ [echo "$MOZ_PULSEAUDIO_PKG_ERRORS" ++ AC_MSG_ERROR([pulseaudio audio backend requires libpulse package])]) ++fi ++ ++AC_SUBST(MOZ_PULSEAUDIO_CFLAGS) ++AC_SUBST(MOZ_PULSEAUDIO_LIBS) ++AC_SUBST(MOZ_PULSEAUDIO) ++ + dnl ======================================================== + dnl Permissions System + dnl ======================================================== +--- mozilla/media/libsydneyaudio/src/Makefile.in~ ++++ mozilla/media/libsydneyaudio/src/Makefile.in +@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android) + CSRCS = \ + sydney_audio_android.c \ + $(NULL) +-else ifeq ($(OS_ARCH),Linux) +-CSRCS = \ +- sydney_audio_alsa.c \ +- $(NULL) + endif + + ifeq ($(OS_ARCH),WINNT) +@@ -68,6 +64,18 @@ CSRCS = \ + $(NULL) + endif + ++ifdef MOZ_ALSA ++CSRCS = \ ++ sydney_audio_alsa.c \ ++ $(NULL) ++endif ++ ++ifdef MOZ_PULSEAUDIO ++CSRCS = \ ++ sydney_audio_pulseaudio.c \ ++ $(NULL) ++endif ++ + ifeq ($(OS_ARCH),WINNT) + OS_LIBS += winmm.lib + endif +--- mozilla/toolkit/library/libxul-config.mk~ ++++ mozilla/toolkit/library/libxul-config.mk +@@ -348,10 +348,12 @@ ifdef MOZ_NATIVE_LIBVPX + EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS) + endif + +-ifdef MOZ_SYDNEYAUDIO +-ifeq ($(OS_ARCH),Linux) ++ifdef MOZ_ALSA + EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) + endif ++ ++ifdef MOZ_PULSEAUDIO ++EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) + endif + + ifdef HAVE_CLOCK_MONOTONIC diff --git a/mail/thunderbird-esr/files/patch-bug685258 b/mail/thunderbird-esr/files/patch-bug685258 new file mode 100644 index 000000000000..cac425d6adba --- /dev/null +++ b/mail/thunderbird-esr/files/patch-bug685258 @@ -0,0 +1,17 @@ +# HG changeset patch +# User Oleg Romashin <romaxa@gmail.com> +# Parent a2291c212856ad27622416e83c8311b6a33b52f1 +Bug 685258 - Pulse audio backend does not check provided playback and crashes r=derf + +diff --git a/content/media/nsAudioStream.cpp b/content/media/nsAudioStream.cpp +--- mozilla/content/media/nsAudioStream.cpp ++++ mozilla/content/media/nsAudioStream.cpp +@@ -429,7 +429,7 @@ nsresult nsNativeAudioStream::Init(PRInt32 aNumChannels, PRInt32 aRate, SampleFo + mFormat = aFormat; + + if (sa_stream_create_pcm(reinterpret_cast<sa_stream_t**>(&mAudioHandle), +- NULL, ++ "Mozilla", + SA_MODE_WRONLY, + SA_PCM_FORMAT_S16_NE, + aRate, diff --git a/mail/thunderbird-esr/files/patch-bug741737 b/mail/thunderbird-esr/files/patch-bug741737 new file mode 100644 index 000000000000..d4ceffbe8cef --- /dev/null +++ b/mail/thunderbird-esr/files/patch-bug741737 @@ -0,0 +1,90 @@ +changeset: 91900:eee73897136b +user: Martin Stransky <stransky@redhat.com> +date: Tue Apr 17 19:57:40 2012 -0400 +summary: Bug 741737 - Configure libvpx with pkgconfig. r=khuey, a=npotb + +diff --git a/configure.in b/configure.in +--- mozilla/configure.in ++++ mozilla/configure.in +@@ -5588,12 +5588,10 @@ MOZ_ARG_DISABLE_BOOL(webm, + + dnl system libvpx Support + dnl ======================================================== +-MOZ_ARG_WITH_STRING(system-libvpx, +-[ --with-system-libvpx=[PFX] +- Use system libvpx [installed at prefix PFX]], +- LIBVPX_DIR=$withval) ++MOZ_ARG_WITH_BOOL(system-libvpx, ++[ --with-system-libvpx Use system libvpx (located with pkgconfig)], ++ MOZ_NATIVE_LIBVPX=1) + +-MOZ_NATIVE_LIBVPX= + MOZ_LIBVPX_INCLUDES= + MOZ_LIBVPX_LIBS= + +@@ -5606,53 +5604,18 @@ if test -n "$MOZ_WEBM"; then + AC_DEFINE(MOZ_VP8_ENCODER) + fi + +- if test -n "$LIBVPX_DIR" -a "$LIBVPX_DIR" != no; then +- _SAVE_CFLAGS=$CFLAGS +- _SAVE_LDFLAGS=$LDFLAGS +- _SAVE_LIBS=$LIBS +- if test "${LIBVPX_DIR}" = "yes"; then +- LIBVPX_DIR=/usr +- fi +- CFLAGS="-I${LIBVPX_DIR}/include $CFLAGS" +- LDFLAGS="-L${LIBVPX_DIR}/lib $LDFLAGS" +- MOZ_NATIVE_LIBVPX_DEC_TEST= +- MOZ_CHECK_HEADER(vpx/vpx_decoder.h, +- [if test ! -f "${LIBVPX_DIR}/include/vpx/vpx_decoder.h"; then +- AC_MSG_ERROR([vpx/vpx_decoder.h found, but is not in ${LIBVPX_DIR}/include]) +- fi], +- AC_MSG_ERROR([--with-system-libvpx requested but vpx/vpx_decoder.h not found])) +- AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver, +- [MOZ_NATIVE_LIBVPX_DEC_TEST=1], +- ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])) +- if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then +- AC_MSG_CHECKING([for libvpx version >= v0.9.7]) +- dnl We need at least v0.9.7 to fix several crash bugs (for which we +- dnl had local patches prior to v0.9.7). +- dnl +- dnl This is a terrible test for the library version, but we don't +- dnl have a good one. There is no version number in a public header, +- dnl and testing the headers still doesn't guarantee we link against +- dnl the right version. While we could call vpx_codec_version() at +- dnl run-time, that would break cross-compiling. There are no +- dnl additional exported symbols between the v0.9.7 release and the +- dnl v0.9.6 one to check for. +- AC_TRY_COMPILE([ +- #include <vpx/vpx_decoder.h> +- #if !defined(VPX_CODEC_USE_INPUT_PARTITION) +- #error "test failed." +- #endif +- ], +- [return 0;], +- [AC_MSG_RESULT([yes]) +- MOZ_NATIVE_LIBVPX=1 +- MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include" +- MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"], +- [AC_MSG_RESULT([no]) +- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])]) +- fi +- CFLAGS=$_SAVE_CFLAGS +- LDFLAGS=$_SAVE_LDFLAGS +- LIBS=$_SAVE_LIBS ++ if test -n "$MOZ_NATIVE_LIBVPX"; then ++ dnl ============================ ++ dnl === libvpx Version check === ++ dnl ============================ ++ dnl Check to see if we have a system libvpx package. ++ PKG_CHECK_MODULES(LIBVPX, vpx >= 0.9.7) ++ ++ MOZ_CHECK_HEADER([vpx/vpx_decoder.h], [], ++ [AC_MSG_ERROR([Couldn't find vpx/vpx_decoder.h which is required for build with system libvpx. Use --without-system-libvpx to build with in-tree libvpx.])]) ++ ++ AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver, [], ++ [AC_MSG_ERROR([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])]) + fi + fi + diff --git a/mail/thunderbird-esr/files/patch-bug753046 b/mail/thunderbird-esr/files/patch-bug753046 new file mode 100644 index 000000000000..ba42ffbde6c4 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-bug753046 @@ -0,0 +1,1267 @@ +# Bug 753046 - Add support for DragonFly/NetBSD + +$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000 ++++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp +@@ -33,6 +33,8 @@ + #include "nsPluginsDir.h" + #include "nsXULAppAPI.h" + ++#include <unistd.h> ++ + #ifdef MOZ_X11 + # include "mozilla/X11Util.h" + #endif +@@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin + + // TODO: use PluginPRLibrary here + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + mShutdownFunc = + (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown"); + +@@ -1790,7 +1790,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin + PLUGIN_LOG_DEBUG_METHOD; + AssertPluginThread(); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + return true; + #elif defined(OS_WIN) || defined(OS_MACOSX) + *_retval = mGetEntryPointsFunc(&mFunctions); +@@ -1823,7 +1823,7 @@ PluginModuleChild::AnswerNP_Initialize(N + SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/)); + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions); + return true; + #elif defined(OS_WIN) || defined(OS_MACOSX) +$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig 2011-12-20 23:28:14.000000000 +0000 ++++ mozilla/dom/plugins/ipc/PluginModuleChild.h +@@ -340,7 +340,7 @@ private: + + // we get this from the plugin + NP_PLUGINSHUTDOWN mShutdownFunc; +-#ifdef OS_LINUX ++#if defined(OS_LINUX) || defined(OS_BSD) + NP_PLUGINUNIXINIT mInitializeFunc; + #elif defined(OS_WIN) || defined(OS_MACOSX) + NP_PLUGININIT mInitializeFunc; +$NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000 ++++ mozilla/ipc/chromium/Makefile.in +@@ -278,6 +278,34 @@ endif + + endif # } OS_LINUX + ++ifdef OS_BSD # { ++ ++CPPSRCS += \ ++ atomicops_internals_x86_gcc.cc \ ++ file_util_bsd.cc \ ++ process_util_bsd.cc \ ++ time_posix.cc \ ++ $(NULL) ++ ++ifdef MOZ_ENABLE_GTK2 ++CPPSRCS += \ ++ message_pump_glib.cc \ ++ $(NULL) ++endif ++ ++ifdef MOZ_ENABLE_QT ++MOCSRCS = \ ++ moc_message_pump_qt.cc \ ++ $(NULL) ++ ++CPPSRCS += \ ++ $(MOCSRCS) \ ++ message_pump_qt.cc \ ++ $(NULL) ++endif ++ ++endif # } OS_BSD ++ + # libevent + + ifndef MOZ_NATIVE_LIBEVENT # { +$NetBSD: patch-ipc_chromium_chromium-config.mk,v 1.2 2012/03/15 08:30:06 ryoon Exp $ + +--- mozilla/ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100 ++++ mozilla/ipc/chromium/chromium-config.mk 2012-03-11 11:05:40.397182000 +0100 +@@ -56,17 +56,6 @@ + -I$(DEPTH)/ipc/ipdl/_ipdlheaders \ + $(NULL) + +-ifeq ($(OS_ARCH),Darwin) # { +- +-OS_MACOSX = 1 +-OS_POSIX = 1 +- +-DEFINES += \ +- -DOS_MACOSX=1 \ +- -DOS_POSIX=1 \ +- $(NULL) +- +-else # } { + ifeq ($(OS_ARCH),WINNT) # { + OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp) + +@@ -93,13 +82,65 @@ + endif + + else # } { +- +-OS_LINUX = 1 + OS_POSIX = 1 ++DEFINES += -DOS_POSIX=1 ++ ++ifeq ($(OS_ARCH),Darwin) # { ++ ++OS_MACOSX = 1 ++DEFINES += \ ++ -DOS_MACOSX=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),DragonFly) # { ++ ++OS_DRAGONFLY = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_DRAGONFLY=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),FreeBSD) # { ++ ++OS_FREEBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_FREEBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) + ++else # } { ++ifeq ($(OS_ARCH),NetBSD) # { ++ ++OS_NETBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_NETBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),OpenBSD) # { ++ ++OS_OPENBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_OPENBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ ++OS_LINUX = 1 + DEFINES += \ + -DOS_LINUX=1 \ +- -DOS_POSIX=1 \ + $(NULL) + + # NB: to stop gcc warnings about exporting template instantiation +@@ -107,4 +147,8 @@ + + endif # } + endif # } ++endif # } ++endif # } ++endif # } ++endif # } + +$NetBSD: patch-ipc_chromium_src_base_base__paths.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/base_paths.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/base_paths.h +@@ -13,7 +13,7 @@ + #include "base/base_paths_win.h" + #elif defined(OS_MACOSX) + #include "base/base_paths_mac.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #include "base/base_paths_linux.h" + #endif + #include "base/path_service.h" +$NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/debug_util_posix.cc +@@ -5,7 +5,7 @@ + #include "build/build_config.h" + #include "base/debug_util.h" + +-#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__)) ++#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID)) + + #include <errno.h> + #include <fcntl.h> +@@ -17,8 +17,13 @@ + #include <unistd.h> + #if MOZ_HAVE_EXECINFO_H + #include <execinfo.h> +-#include <sys/sysctl.h> + #endif ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) ++#include <sys/user.h> ++#elif defined(OS_FREEBSD) ++#include <sys/proc.h> ++#endif ++#include <sys/sysctl.h> + + #include "base/basictypes.h" + #include "base/eintr_wrapper.h" +@@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u + return false; + } + +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + + // Based on Apple's recommended method as described in + // http://developer.apple.com/qa/qa2004/qa1361.html +@@ -71,7 +76,13 @@ bool DebugUtil::BeingDebugged() { + + // This process is being debugged if the P_TRACED flag is set. + is_set = true; ++#if defined(OS_DRAGONFLY) ++ being_debugged = (info.kp_flags & P_TRACED) != 0; ++#elif defined(OS_FREEBSD) ++ being_debugged = (info.ki_flag & P_TRACED) != 0; ++#else + being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; ++#endif + return being_debugged; + } + +diff --git ipc/chromium/src/base/dir_reader_bsd.h ipc/chromium/src/base/dir_reader_bsd.h +new file mode 100644 +index 0000000..3fc1a87 +--- /dev/null ++++ mozilla/ipc/chromium/src/base/dir_reader_bsd.h +@@ -0,0 +1,108 @@ ++// Copyright (c) 2010 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// derived from dir_reader_linux.h ++ ++#ifndef BASE_DIR_READER_BSD_H_ ++#define BASE_DIR_READER_BSD_H_ ++#pragma once ++ ++#include <dirent.h> ++#include <errno.h> ++#include <fcntl.h> ++#include <stdint.h> ++#include <unistd.h> ++ ++#include "base/logging.h" ++#include "base/eintr_wrapper.h" ++ ++// See the comments in dir_reader_posix.h about this. ++ ++namespace base { ++ ++class DirReaderBSD { ++ public: ++ explicit DirReaderBSD(const char* directory_path) ++#ifdef O_DIRECTORY ++ : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), ++#else ++ : fd_(open(directory_path, O_RDONLY)), ++#endif ++ offset_(0), ++ size_(0) { ++ memset(buf_, 0, sizeof(buf_)); ++ } ++ ++ ~DirReaderBSD() { ++ if (fd_ >= 0) { ++ if (HANDLE_EINTR(close(fd_))) ++ DLOG(ERROR) << "Failed to close directory handle"; ++ } ++ } ++ ++ bool IsValid() const { ++ return fd_ >= 0; ++ } ++ ++ // Move to the next entry returning false if the iteration is complete. ++ bool Next() { ++ if (size_) { ++ struct dirent* dirent = reinterpret_cast<struct dirent*>(&buf_[offset_]); ++ offset_ += dirent->d_reclen; ++ } ++ ++ if (offset_ != size_) ++ return true; ++ ++#ifdef OS_OPENBSD ++ const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_); ++#else ++ const int r = getdents(fd_, buf_, sizeof(buf_)); ++#endif ++ if (r == 0) ++ return false; ++ if (r == -1) { ++#ifdef OS_OPENBSD ++ DLOG(ERROR) << "getdirentries returned an error: " << errno; ++#else ++ DLOG(ERROR) << "getdents returned an error: " << errno; ++#endif ++ return false; ++ } ++ size_ = r; ++ offset_ = 0; ++ return true; ++ } ++ ++ const char* name() const { ++ if (!size_) ++ return NULL; ++ ++ const struct dirent* dirent = ++ reinterpret_cast<const struct dirent*>(&buf_[offset_]); ++ return dirent->d_name; ++ } ++ ++ int fd() const { ++ return fd_; ++ } ++ ++ static bool IsFallback() { ++ return false; ++ } ++ ++ private: ++ const int fd_; ++ char buf_[512]; ++#ifdef OS_OPENBSD ++ off_t *basep_; ++#endif ++ size_t offset_, size_; ++ ++ DISALLOW_COPY_AND_ASSIGN(DirReaderBSD); ++}; ++ ++} // namespace base ++ ++#endif // BASE_DIR_READER_BSD_H_ +diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_reader_posix.h +index 9a34492..62b280c 100644 +--- mozilla/ipc/chromium/src/base/dir_reader_posix.h ++++ mozilla/ipc/chromium/src/base/dir_reader_posix.h +@@ -18,6 +18,8 @@ + + #if defined(OS_LINUX) + #include "base/dir_reader_linux.h" ++#elif defined(OS_BSD) ++#include "base/dir_reader_bsd.h" + #else + #include "base/dir_reader_fallback.h" + #endif +@@ -26,6 +28,8 @@ + + #if defined(OS_LINUX) + typedef DirReaderLinux DirReaderPosix; ++#elif defined(OS_BSD) ++typedef DirReaderBSD DirReaderPosix; + #else + typedef DirReaderFallback DirReaderPosix; + #endif +$NetBSD: patch-ipc_chromium_src_base_file__util.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util.h +@@ -16,8 +16,8 @@ + #include <sys/stat.h> + #elif defined(OS_POSIX) + #include <sys/types.h> +-#include <fts.h> + #include <sys/stat.h> ++#include <fts.h> + #endif + + #include <stdio.h> +$NetBSD: patch-ipc_chromium_src_base_file__util__bsd.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util_bsd.cc.orig 2012-01-07 18:21:18.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util_bsd.cc +@@ -0,0 +1,80 @@ ++// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// this is a derivative of file_util_linux.cc ++ ++#include "base/file_util.h" ++ ++#include <fcntl.h> ++#include <unistd.h> ++ ++#include <string> ++#include <vector> ++ ++#include "base/eintr_wrapper.h" ++#include "base/file_path.h" ++#include "base/string_util.h" ++ ++namespace file_util { ++ ++bool GetTempDir(FilePath* path) { ++ const char* tmp = getenv("TMPDIR"); ++ if (tmp) ++ *path = FilePath(tmp); ++ else ++ *path = FilePath("/tmp"); ++ return true; ++} ++ ++bool GetShmemTempDir(FilePath* path) { ++ return GetTempDir(path); ++} ++ ++bool CopyFile(const FilePath& from_path, const FilePath& to_path) { ++ int infile = open(from_path.value().c_str(), O_RDONLY); ++ if (infile < 0) ++ return false; ++ ++ int outfile = creat(to_path.value().c_str(), 0666); ++ if (outfile < 0) { ++ close(infile); ++ return false; ++ } ++ ++ const size_t kBufferSize = 32768; ++ std::vector<char> buffer(kBufferSize); ++ bool result = true; ++ ++ while (result) { ++ ssize_t bytes_read = HANDLE_EINTR(read(infile, &buffer[0], buffer.size())); ++ if (bytes_read < 0) { ++ result = false; ++ break; ++ } ++ if (bytes_read == 0) ++ break; ++ // Allow for partial writes ++ ssize_t bytes_written_per_read = 0; ++ do { ++ ssize_t bytes_written_partial = HANDLE_EINTR(write( ++ outfile, ++ &buffer[bytes_written_per_read], ++ bytes_read - bytes_written_per_read)); ++ if (bytes_written_partial < 0) { ++ result = false; ++ break; ++ } ++ bytes_written_per_read += bytes_written_partial; ++ } while (bytes_written_per_read < bytes_read); ++ } ++ ++ if (HANDLE_EINTR(close(infile)) < 0) ++ result = false; ++ if (HANDLE_EINTR(close(outfile)) < 0) ++ result = false; ++ ++ return result; ++} ++ ++} // namespace file_util +$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util_posix.cc +@@ -31,7 +31,7 @@ + #include "base/time.h" + + // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine +-#if defined(OS_FREEBSD) || defined(OS_OPENBSD) ++#ifndef OS_LINUX + #define stat64 stat + #endif + +$NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 07:40:33.000000000 +0100 ++++ mozilla/ipc/chromium/src/base/message_loop.cc 2012-02-21 21:24:41.000000000 +0100 +@@ -19,7 +19,7 @@ + #if defined(OS_POSIX) + #include "base/message_pump_libevent.h" + #endif +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #ifdef MOZ_WIDGET_GTK2 + #include "base/message_pump_glib.h" + #endif +@@ -119,7 +119,7 @@ + if (type_ == TYPE_UI) { + #if defined(OS_MACOSX) + pump_ = base::MessagePumpMac::Create(); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + pump_ = new base::MessagePumpForUI(); + #endif // OS_LINUX + } else if (type_ == TYPE_IO) { +$NetBSD: patch-ipc_chromium_src_base_platform__file__posix.cc,v 1.1 2011/07/12 15:12:36 tnn Exp $ + +--- mozilla/ipc/chromium/src/base/platform_file_posix.cc.orig 2011-06-15 21:57:27.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_file_posix.cc +@@ -9,6 +9,7 @@ + #ifdef ANDROID + #include <linux/stat.h> + #endif ++#include <sys/stat.h> /* for S_IRUSR */ + + #include "base/logging.h" + #include "base/string_util.h" +$NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_thread.h +@@ -25,6 +25,8 @@ typedef pthread_t PlatformThreadHandle; + #if defined(OS_LINUX) + #include <unistd.h> + typedef pid_t PlatformThreadId; ++#elif defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined (OS_NETBSD) ++typedef lwpid_t PlatformThreadId; + #elif defined(OS_MACOSX) + #include <mach/mach.h> + typedef mach_port_t PlatformThreadId; +$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc +@@ -9,9 +9,18 @@ + + #if defined(OS_MACOSX) + #include <mach/mach.h> ++#elif defined(OS_NETBSD) ++#include <lwp.h> + #elif defined(OS_LINUX) + #include <sys/syscall.h> + #include <unistd.h> ++#elif defined(OS_DRAGONFLY) ++#include <unistd.h> ++#elif defined(OS_FREEBSD) ++_Pragma("GCC visibility push(default)") ++extern "C" int thr_self(long *); // XXX #include <sys/thr.h> ++_Pragma("GCC visibility pop") ++#include <pthread_np.h> + #endif + + #if defined(OS_MACOSX) +@@ -38,7 +45,19 @@ + // into the kernel. + #if defined(OS_MACOSX) + return mach_thread_self(); +-#elif defined (__OpenBSD__) ++#elif defined(OS_NETBSD) ++ return _lwp_self(); ++#elif defined(OS_DRAGONFLY) ++ return lwp_gettid(); ++#elif defined(OS_FREEBSD) ++# if __FreeBSD_version > 900030 ++ return pthread_getthreadid_np(); ++# else ++ long lwpid; ++ thr_self(&lwpid); ++ return lwpid; ++# endif ++#elif defined(OS_OPENBSD) + // TODO(BSD): find a better thread ID + return (intptr_t)(pthread_self()); + #elif defined(OS_LINUX) +$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100 ++++ mozilla/ipc/chromium/src/base/process_util.h 2012-01-31 13:14:54.000000000 +0100 +@@ -280,6 +280,7 @@ class NamedProcessIterator { + const ProcessEntry* NextProcessEntry(); + + private: ++#if !defined(OS_BSD) + // Determines whether there's another process (regardless of executable) + // left in the list of all processes. Returns true and sets entry_ to + // that process's info if there is one, false otherwise. +@@ -292,18 +292,24 @@ + void InitProcessEntry(ProcessEntry* entry); + + std::wstring executable_name_; ++#endif + + #if defined(OS_WIN) + HANDLE snapshot_; + bool started_iteration_; + #elif defined(OS_LINUX) + DIR *procfs_dir_; ++#elif defined(OS_BSD) ++ std::vector<ProcessEntry> content; ++ size_t nextEntry; + #elif defined(OS_MACOSX) + std::vector<kinfo_proc> kinfo_procs_; + size_t index_of_kinfo_proc_; + #endif ++#if !defined(OS_BSD) + ProcessEntry entry_; + const ProcessFilter* filter_; ++#endif + + DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator); + }; +$NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/process_util_bsd.cc +@@ -0,0 +1,326 @@ ++// Copyright (c) 2008 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// derived from process_util_linux.cc and process_util_mac.cc ++ ++#include "base/process_util.h" ++ ++#include <ctype.h> ++#include <fcntl.h> ++#include <unistd.h> ++#include <string> ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) ++/* DragonFly, as of v3.0.1, and FreeBSD 9.0-RELEASE do not explicitly mark symbols public */ ++#define PRE_SYS_INCLUDE _Pragma("GCC visibility push(default)") ++#define POST_SYS_INCLUDE _Pragma("GCC visibility pop") ++#else ++#define PRE_SYS_INCLUDE ++#define POST_SYS_INCLUDE ++#endif ++PRE_SYS_INCLUDE ++#include <kvm.h> ++POST_SYS_INCLUDE ++#include <sys/sysctl.h> ++#include <sys/types.h> ++#include <sys/wait.h> ++#if defined(OS_DRAGONFLY) ++PRE_SYS_INCLUDE ++#include <sys/user.h> ++POST_SYS_INCLUDE ++#define HAVE_POSIX_SPAWN 1 ++#endif ++#if defined(OS_FREEBSD) ++PRE_SYS_INCLUDE ++#include <sys/user.h> ++POST_SYS_INCLUDE ++#endif ++ ++#include "base/debug_util.h" ++#include "base/eintr_wrapper.h" ++#include "base/file_util.h" ++#include "base/logging.h" ++#include "base/string_tokenizer.h" ++#include "base/string_util.h" ++ ++#if defined(OS_NETBSD) ++#include <sys/param.h> ++#if __NetBSD_Version__ >= 600000000 ++#define HAVE_POSIX_SPAWN 1 ++#endif ++#endif ++ ++#ifdef HAVE_POSIX_SPAWN ++PRE_SYS_INCLUDE ++#include <spawn.h> ++POST_SYS_INCLUDE ++extern "C" char **environ __dso_public; ++#endif ++ ++namespace { ++ ++enum ParsingState { ++ KEY_NAME, ++ KEY_VALUE ++}; ++ ++static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG"); ++ ++} // namespace ++ ++namespace base { ++ ++#ifdef HAVE_POSIX_SPAWN ++ ++void FreeEnvVarsArray(char* array[], int length) ++{ ++ for (int i = 0; i < length; i++) { ++ free(array[i]); ++ } ++ delete[] array; ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ bool wait, ProcessHandle* process_handle) { ++ return LaunchApp(argv, fds_to_remap, environment_map(), ++ wait, process_handle); ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ const environment_map& env_vars_to_set, ++ bool wait, ProcessHandle* process_handle, ++ ProcessArchitecture arch) { ++ bool retval = true; ++ ++ char* argv_copy[argv.size() + 1]; ++ for (size_t i = 0; i < argv.size(); i++) { ++ argv_copy[i] = const_cast<char*>(argv[i].c_str()); ++ } ++ argv_copy[argv.size()] = NULL; ++ ++ // Make sure we don't leak any FDs to the child process by marking all FDs ++ // as close-on-exec. ++ SetAllFDsToCloseOnExec(); ++ ++ // Copy environment to a new char array and add the variables ++ // in env_vars_to_set. ++ // Existing variables are overwritten by env_vars_to_set. ++ int pos = 0; ++ environment_map combined_env_vars = env_vars_to_set; ++ while(environ[pos] != NULL) { ++ std::string varString = environ[pos]; ++ std::string varName = varString.substr(0, varString.find_first_of('=')); ++ std::string varValue = varString.substr(varString.find_first_of('=') + 1); ++ if (combined_env_vars.find(varName) == combined_env_vars.end()) { ++ combined_env_vars[varName] = varValue; ++ } ++ pos++; ++ } ++ int varsLen = combined_env_vars.size() + 1; ++ ++ char** vars = new char*[varsLen]; ++ int i = 0; ++ for (environment_map::const_iterator it = combined_env_vars.begin(); ++ it != combined_env_vars.end(); ++it) { ++ std::string entry(it->first); ++ entry += "="; ++ entry += it->second; ++ vars[i] = strdup(entry.c_str()); ++ i++; ++ } ++ vars[i] = NULL; ++ ++ posix_spawn_file_actions_t file_actions; ++ if (posix_spawn_file_actions_init(&file_actions) != 0) { ++ FreeEnvVarsArray(vars, varsLen); ++ return false; ++ } ++ ++ // Turn fds_to_remap array into a set of dup2 calls. ++ for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin(); ++ it != fds_to_remap.end(); ++ ++it) { ++ int src_fd = it->first; ++ int dest_fd = it->second; ++ ++ if (src_fd == dest_fd) { ++ int flags = fcntl(src_fd, F_GETFD); ++ if (flags != -1) { ++ fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC); ++ } ++ } else { ++ if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) { ++ posix_spawn_file_actions_destroy(&file_actions); ++ FreeEnvVarsArray(vars, varsLen); ++ return false; ++ } ++ } ++ } ++ ++ pid_t pid = 0; ++ int spawn_succeeded = (posix_spawnp(&pid, ++ argv_copy[0], ++ &file_actions, ++ NULL, ++ argv_copy, ++ vars) == 0); ++ ++ FreeEnvVarsArray(vars, varsLen); ++ ++ posix_spawn_file_actions_destroy(&file_actions); ++ ++ bool process_handle_valid = pid > 0; ++ if (!spawn_succeeded || !process_handle_valid) { ++ retval = false; ++ } else { ++ if (wait) ++ HANDLE_EINTR(waitpid(pid, 0, 0)); ++ ++ if (process_handle) ++ *process_handle = pid; ++ } ++ ++ return retval; ++} ++ ++bool LaunchApp(const CommandLine& cl, ++ bool wait, bool start_hidden, ProcessHandle* process_handle) { ++ // TODO(playmobil): Do we need to respect the start_hidden flag? ++ file_handle_mapping_vector no_files; ++ return LaunchApp(cl.argv(), no_files, wait, process_handle); ++} ++ ++#else // no posix_spawn, use fork/exec ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ bool wait, ProcessHandle* process_handle) { ++ return LaunchApp(argv, fds_to_remap, environment_map(), ++ wait, process_handle); ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ const environment_map& env_vars_to_set, ++ bool wait, ProcessHandle* process_handle, ++ ProcessArchitecture arch) { ++ scoped_array<char*> argv_cstr(new char*[argv.size() + 1]); ++ // Illegal to allocate memory after fork and before execvp ++ InjectiveMultimap fd_shuffle1, fd_shuffle2; ++ fd_shuffle1.reserve(fds_to_remap.size()); ++ fd_shuffle2.reserve(fds_to_remap.size()); ++ ++ pid_t pid = fork(); ++ if (pid < 0) ++ return false; ++ ++ if (pid == 0) { ++ for (file_handle_mapping_vector::const_iterator ++ it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) { ++ fd_shuffle1.push_back(InjectionArc(it->first, it->second, false)); ++ fd_shuffle2.push_back(InjectionArc(it->first, it->second, false)); ++ } ++ ++ if (!ShuffleFileDescriptors(&fd_shuffle1)) ++ _exit(127); ++ ++ CloseSuperfluousFds(fd_shuffle2); ++ ++ for (environment_map::const_iterator it = env_vars_to_set.begin(); ++ it != env_vars_to_set.end(); ++it) { ++ if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/)) ++ _exit(127); ++ } ++ ++ for (size_t i = 0; i < argv.size(); i++) ++ argv_cstr[i] = const_cast<char*>(argv[i].c_str()); ++ argv_cstr[argv.size()] = NULL; ++ execvp(argv_cstr[0], argv_cstr.get()); ++ // if we get here, we're in serious trouble and should complain loudly ++ DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0]; ++ exit(127); ++ } else { ++ gProcessLog.print("==> process %d launched child process %d\n", ++ GetCurrentProcId(), pid); ++ if (wait) ++ HANDLE_EINTR(waitpid(pid, 0, 0)); ++ ++ if (process_handle) ++ *process_handle = pid; ++ } ++ ++ return true; ++} ++ ++bool LaunchApp(const CommandLine& cl, ++ bool wait, bool start_hidden, ++ ProcessHandle* process_handle) { ++ file_handle_mapping_vector no_files; ++ return LaunchApp(cl.argv(), no_files, wait, process_handle); ++} ++ ++#endif ++ ++NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name, ++ const ProcessFilter* filter) ++{ ++ int numEntries; ++ kvm_t *kvm; ++ std::string exe(WideToASCII(executable_name)); ++ ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) ++ kvm = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); ++ struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries); ++ if (procs != NULL && numEntries > 0) { ++ for (int i = 0; i < numEntries; i++) { ++# if defined(OS_DRAGONFLY) ++ if (exe != procs[i].kp_comm) continue; ++ if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].kp_pid; ++ e.ppid = procs[i].kp_ppid; ++ strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile); ++ content.push_back(e); ++# elif defined(OS_FREEBSD) ++ if (exe != procs[i].ki_comm) continue; ++ if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].ki_pid; ++ e.ppid = procs[i].ki_ppid; ++ strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile); ++ content.push_back(e); ++# endif ++#else ++ kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL); ++ struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries); ++ if (procs != NULL && numEntries > 0) { ++ for (int i = 0; i < numEntries; i++) { ++ if (exe != procs[i].p_comm) continue; ++ if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].p_pid; ++ e.ppid = procs[i].p_ppid; ++ strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile); ++ content.push_back(e); ++#endif ++ } ++ } ++ nextEntry = 0; ++ kvm_close(kvm); ++} ++ ++NamedProcessIterator::~NamedProcessIterator() { ++} ++ ++const ProcessEntry* NamedProcessIterator::NextProcessEntry() { ++ if (nextEntry >= content.size()) return NULL; ++ return &content[nextEntry++]; ++} ++ ++bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { ++ return false; ++} ++ ++} // namespace base +$NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/process_util_posix.cc +@@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj + #elif defined(OS_MACOSX) + static const rlim_t kSystemDefaultMaxFds = 256; + static const char kFDDir[] = "/dev/fd"; ++#elif defined(OS_BSD) ++ // the getrlimit below should never fail, so whatever .. ++ static const rlim_t kSystemDefaultMaxFds = 1024; ++ // at least /dev/fd will exist ++ static const char kFDDir[] = "/dev/fd"; + #endif + + // Get the maximum number of FDs possible. +@@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj + void SetAllFDsToCloseOnExec() { + #if defined(OS_LINUX) + const char fd_dir[] = "/proc/self/fd"; +-#elif defined(OS_MACOSX) ++#elif defined(OS_MACOSX) || defined(OS_BSD) + const char fd_dir[] = "/dev/fd"; + #endif + ScopedDIR dir_closer(opendir(fd_dir)); +$NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $ + +--- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/sys_info_posix.cc +@@ -18,6 +18,11 @@ + #include <mach/mach_init.h> + #endif + ++#if defined(OS_NETBSD) ++#include <sys/param.h> ++#include <sys/sysctl.h> ++#endif ++ + #include "base/logging.h" + #include "base/string_util.h" + +@@ -26,7 +31,11 @@ namespace base { + int SysInfo::NumberOfProcessors() { + // It seems that sysconf returns the number of "logical" processors on both + // mac and linux. So we get the number of "online logical" processors. ++#ifdef _SC_NPROCESSORS_ONLN + static long res = sysconf(_SC_NPROCESSORS_ONLN); ++#else ++ static long res = 1; ++#endif + if (res == -1) { + NOTREACHED(); + return 1; +@@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory() + } + + return static_cast<int64>(hostinfo.max_mem); ++#elif defined(OS_NETBSD) ++ int mib[2]; ++ int rc; ++ int64_t memSize; ++ size_t len = sizeof(memSize); ++ ++ mib[0] = CTL_HW; ++ mib[1] = HW_PHYSMEM64; ++ rc = sysctl( mib, 2, &memSize, &len, NULL, 0 ); ++ if (-1 != rc) { ++ return memSize; ++ } ++ return 0; ++ + #else + long pages = sysconf(_SC_PHYS_PAGES); + long page_size = sysconf(_SC_PAGE_SIZE); +$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h +@@ -34,7 +34,7 @@ + #include "base/third_party/nspr/prcpucfg_win.h" + #elif defined(__APPLE__) + #include "base/third_party/nspr/prcpucfg_mac.h" +-#elif defined(__linux__) || defined(ANDROID) ++#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) + #include "base/third_party/nspr/prcpucfg_linux.h" + #elif defined(__OpenBSD__) + #include "base/third_party/nspr/prcpucfg_openbsd.h" +$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc +@@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp + LL_ADD(retVal, retVal, temp); + + return retVal; +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_DRAGONFLY) + struct tm exp_tm = {0}; + exp_tm.tm_sec = exploded->tm_sec; + exp_tm.tm_min = exploded->tm_min; +@@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp + result *= kSecondsToMicroseconds; + result += exploded->tm_usec; + return result; ++#elif defined(OS_FREEBSD) || defined(OS_NETBSD) ++ struct tm exp_tm = {0}; ++ exp_tm.tm_sec = exploded->tm_sec; ++ exp_tm.tm_min = exploded->tm_min; ++ exp_tm.tm_hour = exploded->tm_hour; ++ exp_tm.tm_mday = exploded->tm_mday; ++ exp_tm.tm_mon = exploded->tm_month; ++ exp_tm.tm_year = exploded->tm_year - 1900; ++ ++ // time_t is 64bit ++ time_t absolute_time = timegm(&exp_tm); ++ ++ PRTime result = static_cast<PRTime>(absolute_time); ++ result -= exploded->tm_params.tp_gmt_offset + ++ exploded->tm_params.tp_dst_offset; ++ result *= kSecondsToMicroseconds; ++ result += exploded->tm_usec; ++ return result; + #else + #error No PR_ImplodeTime implemented on your platform. + #endif +diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc +index abf2a56..48791f6 100644 +--- mozilla/ipc/chromium/src/base/time_posix.cc ++++ mozilla/ipc/chromium/src/base/time_posix.cc +@@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() { + // With numer and denom = 1 (the expected case), the 64-bit absolute time + // reported in nanoseconds is enough to last nearly 585 years. + +-#elif defined(__OpenBSD__) || defined(OS_POSIX) && \ ++#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \ + defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 + + struct timespec ts; +$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000 ++++ mozilla/ipc/chromium/src/build/build_config.h +@@ -19,17 +19,23 @@ + #define OS_MACOSX 1 + #elif defined(__linux__) || defined(ANDROID) + #define OS_LINUX 1 ++#elif defined(__NetBSD__) ++#define OS_NETBSD 1 ++#elif defined(__DragonFly__) ++#define OS_DRAGONFLY 1 + #elif defined(__OpenBSD__) + #define OS_OPENBSD 1 + #elif defined(_WIN32) + #define OS_WIN 1 ++#elif defined(__FreeBSD__) ++#define OS_FREEBSD 1 + #else + #error Please add support for your platform in build/build_config.h + #endif + + // For access to standard POSIX features, use OS_POSIX instead of a more + // specific macro. +-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD) ++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + #define OS_POSIX 1 + #endif + +diff --git ipc/chromium/src/chrome/common/ipc_channel_posix.cc ipc/chromium/src/chrome/common/ipc_channel_posix.cc +index bd866ee..2ea5b19 100644 +--- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc ++++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc +@@ -7,6 +7,7 @@ + #include <errno.h> + #include <fcntl.h> + #include <stddef.h> ++#include <unistd.h> + #include <sys/types.h> + #include <sys/socket.h> + #include <sys/stat.h> +$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2011/07/11 12:46:14 tnn Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2011-06-15 21:57:27.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h +@@ -92,7 +92,7 @@ class Channel::ChannelImpl : public Mess + }; + + // This is a control message buffer large enough to hold kMaxReadFDs +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_NETBSD) + // TODO(agl): OSX appears to have non-constant CMSG macros! + char input_cmsg_buf_[1024]; + #else +$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h +@@ -195,7 +195,7 @@ + }; + #endif + +-#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) ++#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined(OS_NETBSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) + // There size_t is a synonym for |unsigned long| ... + template <> + struct ParamTraits<size_t> { +@@ -248,7 +248,7 @@ + }; + #endif // defined(OS_MACOSX) + +-#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) ++#if !((defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined(OS_NETBSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) + // int64 is |long int| on 64-bit systems, uint64 is |unsigned long| + template <> + struct ParamTraits<int64> { +$NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/transport_dib.h +@@ -7,7 +7,7 @@ + + #include "base/basictypes.h" + +-#if defined(OS_WIN) || defined(OS_MACOSX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + #include "base/shared_memory.h" + #endif + +@@ -66,7 +66,7 @@ class TransportDIB { + uint32 sequence_num; + }; + typedef HandleAndSequenceNum Id; +-#elif defined(OS_MACOSX) ++#elif defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + typedef base::SharedMemoryHandle Handle; + // On Mac, the inode number of the backing file is used as an id. + typedef base::SharedMemoryId Id; +@@ -108,7 +108,7 @@ class TransportDIB { + + private: + TransportDIB(); +-#if defined(OS_WIN) || defined(OS_MACOSX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + explicit TransportDIB(base::SharedMemoryHandle dib); + base::SharedMemory shared_memory_; + uint32 sequence_num_; +$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoon Exp $ + +--- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/glue/GeckoChildProcessHost.cpp +@@ -430,7 +430,7 @@ + // and passing wstrings from one config to the other is unsafe. So + // we split the logic here. + +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + base::environment_map newEnvVars; + // XPCOM may not be initialized in some subprocesses. We don't want + // to initialize XPCOM just for the directory service, especially +@@ -445,8 +445,8 @@ + if (NS_SUCCEEDED(rv)) { + nsCString path; + greDir->GetNativePath(path); +-# ifdef OS_LINUX +-# ifdef ANDROID ++# if defined(OS_LINUX) || defined(OS_BSD) ++# if defined(ANDROID) || defined(OS_BSD) + path += "/lib"; + # endif // ANDROID + const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH"); +@@ -557,7 +557,7 @@ + childArgv.push_back(pidstring); + + #if defined(MOZ_CRASHREPORTER) +-# if defined(OS_LINUX) ++# if defined(OS_LINUX) || defined(OS_BSD) + int childCrashFd, childCrashRemapFd; + if (!CrashReporter::CreateNotificationPipeForChild( + &childCrashFd, &childCrashRemapFd)) +@@ -594,7 +594,7 @@ + #endif + + base::LaunchApp(childArgv, mFileMap, +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + newEnvVars, + #endif + false, &process, arch); +$NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $ + +--- mozilla/toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000 ++++ mozilla/toolkit/library/Makefile.in +@@ -534,6 +538,10 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle + endif + endif + ++ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH))) ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++endif ++ + ifeq ($(OS_ARCH),WINNT) + OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet) + ifdef ACCESSIBILITY diff --git a/mail/thunderbird-esr/files/patch-configure.in b/mail/thunderbird-esr/files/patch-configure.in deleted file mode 100644 index 4e91d33a273a..000000000000 --- a/mail/thunderbird-esr/files/patch-configure.in +++ /dev/null @@ -1,112 +0,0 @@ ---- configure.in.orig 2011-12-19 14:48:06.000000000 +0100 -+++ configure.in 2011-12-19 15:51:19.000000000 +0100 -@@ -1410,7 +1410,7 @@ - CPU_ARCH=sparc - ;; - --x86_64 | ia64) -+amd64 | x86_64 | ia64) - CPU_ARCH="$OS_TEST" - ;; - -@@ -1430,7 +1430,7 @@ - dnl =============================================================== - INTEL_ARCHITECTURE= - case "$OS_TEST" in -- x86_64|i?86) -+ amd64|x86_64|i?86) - INTEL_ARCHITECTURE=1 - esac - -@@ -1753,7 +1753,7 @@ - esac - - case "${host_cpu}" in -- x86_64) -+ amd64 | x86_64) - HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_" - ;; - esac -@@ -2415,6 +2415,9 @@ - x86_64-*) - AC_DEFINE(_AMD64_) - ;; -+ amd64*) -+ AC_DEFINE(_AMD64_) -+ ;; - *) - AC_DEFINE(_CPU_ARCH_NOT_DEFINED) - ;; -@@ -2486,7 +2489,7 @@ - else - DLL_SUFFIX=".so.1.0" - fi -- MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib -Wl,-rpath-link,$(if $(X11BASE),$(X11BASE),/usr/X11R6)/lib' -+ MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib -Wl,-rpath-link,$(if $(X11BASE),$(X11BASE),/usr/local)/lib' - DSO_CFLAGS='' - DSO_PIC_CFLAGS='-fPIC' - DSO_LDOPTS='-shared -fPIC' -@@ -3304,11 +3307,11 @@ - ;; - *) - MOZ_CHECK_PTHREADS(pthreads, -- USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads", -+ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-pthreads", - MOZ_CHECK_PTHREADS(pthread, -- USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread", -+ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-pthread", - MOZ_CHECK_PTHREADS(c_r, -- USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r", -+ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-pthread", - MOZ_CHECK_PTHREADS(c, - USE_PTHREADS=1 - ) -@@ -3383,18 +3386,18 @@ - *-*-freebsd*) - AC_DEFINE(_REENTRANT) - AC_DEFINE(_THREAD_SAFE) -- dnl -pthread links in -lc_r, so don't specify it explicitly. -+ dnl -pthread links in -pthread, so don't specify it explicitly. - if test "$ac_cv_have_dash_pthread" = "yes"; then - _PTHREAD_LDFLAGS="-pthread" - else -- _PTHREAD_LDFLAGS="-lc_r" -+ _PTHREAD_LDFLAGS="-pthread" - fi - ;; - - *-*-openbsd*|*-*-bsdi*) - AC_DEFINE(_REENTRANT) - AC_DEFINE(_THREAD_SAFE) -- dnl -pthread links in -lc_r, so don't specify it explicitly. -+ dnl -pthread links in -pthread, so don't specify it explicitly. - if test "$ac_cv_have_dash_pthread" = "yes"; then - _PTHREAD_LDFLAGS="-pthread" - fi -@@ -3569,7 +3572,7 @@ - ac_cv_func_iconv, - [AC_TRY_LINK([ - #include <stdlib.h> -- #include <iconv.h> -+ #include "/usr/local/include/iconv.h" - ], - [ - iconv_t h = iconv_open("", ""); -@@ -3590,7 +3593,7 @@ - ac_cv_func_const_iconv, - [AC_TRY_COMPILE([ - #include <stdlib.h> -- #include <iconv.h> -+ #include "/usr/local/include/iconv.h" - ], - [ - const char *input = "testing"; -@@ -4383,7 +4386,7 @@ - LDFLAGS=$_SAVE_LDFLAGS - LIBS=$_SAVE_LIBS - --if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then -+if test "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "/usr" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then - ZLIB_CFLAGS="-I${ZLIB_DIR}/include" - ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" - fi diff --git a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc deleted file mode 100644 index ffb56ac25100..000000000000 --- a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- mozilla/ipc/chromium/src/base/atomicops_internals_mutex.cc~ -+++ mozilla/ipc/chromium/src/base/atomicops_internals_mutex.cc -@@ -39,6 +39,7 @@ - * ***** END LICENSE BLOCK ***** */ - - #include "base/atomicops.h" -+#include "base/lock.h" - - namespace base { - namespace subtle { diff --git a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc index d0cc3b14e68b..e146174b2e2e 100644 --- a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc +++ b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc @@ -1,11 +1,8 @@ --- mozilla/ipc/chromium/src/base/file_util_linux.cc~ +++ mozilla/ipc/chromium/src/base/file_util_linux.cc -@@ -28,7 +28,7 @@ bool GetShmemTempDir(FilePath* path) { - #ifdef ANDROID - return GetTempDir(path); - #else -- *path = FilePath("/dev/shm"); -+ *path = FilePath("/tmp"); - return true; - #endif - } +@@ -5,6 +5,7 @@ + #include "base/file_util.h" + + #include <fcntl.h> ++#include <unistd.h> + diff --git a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_posix.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_posix.cc deleted file mode 100644 index 3c722016e77b..000000000000 --- a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/ipc/chromium/src/base/file_util_posix.cc~ -+++ mozilla/ipc/chromium/src/base/file_util_posix.cc -@@ -30,6 +30,8 @@ - #include "base/string_util.h" - #include "base/time.h" - -+#define stat64 stat -+ - namespace file_util { - - #if defined(GOOGLE_CHROME_BUILD) diff --git a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_file_posix.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_file_posix.cc deleted file mode 100644 index 14e333ca339b..000000000000 --- a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_file_posix.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- mozilla/ipc/chromium/src/base/platform_file_posix.cc~ -+++ mozilla/ipc/chromium/src/base/platform_file_posix.cc -@@ -9,6 +9,7 @@ - #ifdef ANDROID - #include <linux/stat.h> - #endif -+#include <sys/stat.h> - - #include "base/logging.h" - #include "base/string_util.h" diff --git a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_thread_posix.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_thread_posix.cc deleted file mode 100644 index 3445b281bc48..000000000000 --- a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_thread_posix.cc +++ /dev/null @@ -1,12 +0,0 @@ ---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2011-04-27 09:34:28.000000000 +0200 -+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc 2011-04-27 19:47:36.344446266 +0200 -@@ -34,7 +33,8 @@ - #if defined(OS_MACOSX) - return mach_thread_self(); - #elif defined(OS_LINUX) -- return syscall(__NR_gettid); -+ // TODO(BSD): find a better thread ID -+ return reinterpret_cast<int64>(pthread_self()); - #endif - } - diff --git a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h deleted file mode 100644 index ca7b24fa4860..000000000000 --- a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h~ -+++ mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h -@@ -34,7 +34,7 @@ - #include "base/third_party/nspr/prcpucfg_win.h" - #elif defined(__APPLE__) - #include "base/third_party/nspr/prcpucfg_mac.h" --#elif defined(__linux__) || defined(ANDROID) -+#elif defined(__FreeBSD__) || defined(ANDROID) - #include "base/third_party/nspr/prcpucfg_linux.h" - #else - #error Provide a prcpucfg.h appropriate for your platform diff --git a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-time_posix.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-time_posix.cc new file mode 100644 index 000000000000..27461ccd3fb6 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-time_posix.cc @@ -0,0 +1,10 @@ +--- mozilla/ipc/chromium/src/base/time_posix.cc~ ++++ mozilla/ipc/chromium/src/base/time_posix.cc +@@ -8,6 +9,7 @@ + #include <mach/mach_time.h> + #endif + #include <sys/time.h> ++#include <unistd.h> + #ifdef ANDROID + #include <time64.h> + #else diff --git a/mail/thunderbird-esr/files/patch-ipc-chromium-src-build-build_config.h b/mail/thunderbird-esr/files/patch-ipc-chromium-src-build-build_config.h deleted file mode 100644 index e7540d38eceb..000000000000 --- a/mail/thunderbird-esr/files/patch-ipc-chromium-src-build-build_config.h +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/ipc/chromium/src/build/build_config.h~ -+++ mozilla/ipc/chromium/src/build/build_config.h -@@ -17,7 +17,7 @@ - // A set of macros to use for platform detection. - #if defined(__APPLE__) - #define OS_MACOSX 1 --#elif defined(__linux__) || defined(ANDROID) -+#elif defined(__FreeBSD__) || defined(ANDROID) - #define OS_LINUX 1 - #elif defined(_WIN32) - #define OS_WIN 1 diff --git a/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in b/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in new file mode 100644 index 000000000000..4ec8205074ee --- /dev/null +++ b/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in @@ -0,0 +1,12 @@ +--- ldap/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in~ ++++ ldap/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in +@@ -188,6 +188,9 @@ endif + + OBJDEST = $(OBJDIR_NAME) + ++# accept -pthread with MOZ_NATIVE_NSS ++LINK_DLL = $(CC_FOR_LINK) -shared -o $@ $(OBJS) $(EXTRA_DLL_LIBS) ++ + ########################################################################### + + ifeq ($(USE_DLL_EXPORTS_FILE), 1) diff --git a/mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp b/mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp new file mode 100644 index 000000000000..0d17050c939c --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp @@ -0,0 +1,10 @@ +--- mail/app/nsMailApp.cpp~ ++++ mail/app/nsMailApp.cpp +@@ -154,6 +154,7 @@ int main(int argc, char* argv[]) + TriggerQuirks(); + #endif + ++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko19:%%LOCALBASE%%/lib/npapi/symlinks/thunderbird", 0); + nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); + if (NS_FAILED(rv)) { + Output("Couldn't calculate the application directory.\n"); diff --git a/mail/thunderbird-esr/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp b/mail/thunderbird-esr/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp new file mode 100644 index 000000000000..9bae143f2e26 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp @@ -0,0 +1,20 @@ +--- mailnews/addrbook/src/nsDirPrefs.cpp~ ++++ mailnews/addrbook/src/nsDirPrefs.cpp +@@ -375,7 +375,7 @@ static bool DIR_SetServerPosition(nsVoid + DIR_Server *s=nsnull; + + switch (position) { +- case DIR_POS_APPEND: ++ case (PRInt32)DIR_POS_APPEND: + /* Do nothing if the request is to append a server that is already + * in the list. + */ +@@ -401,7 +401,7 @@ static bool DIR_SetServerPosition(nsVoid + wholeList->AppendElement(server); + break; + +- case DIR_POS_DELETE: ++ case (PRInt32)DIR_POS_DELETE: + /* Remove the prefs corresponding to the given server. If the prefName + * value is nsnull, the server has never been saved and there are no + * prefs to remove. diff --git a/mail/thunderbird-esr/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp b/mail/thunderbird-esr/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp new file mode 100644 index 000000000000..b3a6df4d2c90 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp @@ -0,0 +1,29 @@ +--- mailnews/compose/src/nsSmtpProtocol.cpp~ ++++ mailnews/compose/src/nsSmtpProtocol.cpp +@@ -127,16 +127,16 @@ nsresult nsExplainErrorDetails(nsISmtpUr + + switch (code) + { +- case NS_ERROR_SMTP_SERVER_ERROR: +- case NS_ERROR_TCP_READ_ERROR: +- case NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED: +- case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1: +- case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2: +- case NS_ERROR_SENDING_FROM_COMMAND: +- case NS_ERROR_SENDING_RCPT_COMMAND: +- case NS_ERROR_SENDING_DATA_COMMAND: +- case NS_ERROR_SENDING_MESSAGE: +- case NS_ERROR_SMTP_GREETING: ++ case (int)NS_ERROR_SMTP_SERVER_ERROR: ++ case (int)NS_ERROR_TCP_READ_ERROR: ++ case (int)NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED: ++ case (int)NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1: ++ case (int)NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2: ++ case (int)NS_ERROR_SENDING_FROM_COMMAND: ++ case (int)NS_ERROR_SENDING_RCPT_COMMAND: ++ case (int)NS_ERROR_SENDING_DATA_COMMAND: ++ case (int)NS_ERROR_SENDING_MESSAGE: ++ case (int)NS_ERROR_SMTP_GREETING: + bundle->GetStringFromID(NS_ERROR_GET_CODE(code), getter_Copies(eMsg)); + msg = nsTextFormatter::vsmprintf(eMsg.get(), args); + break; diff --git a/mail/thunderbird-esr/files/patch-mozilla-build-autoconf-config.sub b/mail/thunderbird-esr/files/patch-mozilla-build-autoconf-config.sub deleted file mode 100644 index 12a704ade44b..000000000000 --- a/mail/thunderbird-esr/files/patch-mozilla-build-autoconf-config.sub +++ /dev/null @@ -1,12 +0,0 @@ ---- mozilla/build/autoconf/config.sub.orig 2010-01-05 12:26:13.000000000 +0100 -+++ mozilla/build/autoconf/config.sub 2010-01-05 12:26:46.000000000 +0100 -@@ -403,9 +403,6 @@ - amd64) - basic_machine=x86_64-pc - ;; -- amd64-*) -- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; - amdahl) - basic_machine=580-amdahl - os=-sysv diff --git a/mail/thunderbird-esr/files/patch-mozilla-configure.in b/mail/thunderbird-esr/files/patch-mozilla-configure.in index 4ccc7bfe5017..832f967abc9a 100644 --- a/mail/thunderbird-esr/files/patch-mozilla-configure.in +++ b/mail/thunderbird-esr/files/patch-mozilla-configure.in @@ -1,23 +1,5 @@ --- mozilla/configure.in.orig 2010-11-04 21:05:18.000000000 +0100 +++ mozilla/configure.in 2010-11-09 12:59:28.000000000 +0100 -@@ -1549,7 +1549,7 @@ - CPU_ARCH=sparc - ;; - --x86_64 | ia64) -+amd64 | x86_64 | ia64) - CPU_ARCH="$OS_TEST" - ;; - -@@ -1567,7 +1567,7 @@ dnl Set INTEL_ARCHITECTURE if we're comp - dnl =============================================================== - INTEL_ARCHITECTURE= - case "$OS_TEST" in -- x86_64|i?86) -+ amd64|x86_64|i?86) - INTEL_ARCHITECTURE=1 - esac - @@ -3803,19 +3803,21 @@ AC_CHECK_FUNCS(localtime_r strtok_r) @@ -45,15 +27,29 @@ AC_DEFINE(HAVE_CLOCK_MONOTONIC) AC_SUBST(HAVE_CLOCK_MONOTONIC) AC_SUBST(REALTIME_LIBS) -@@ -4808,7 +4810,7 @@ CFLAGS=$_SAVE_CFLAGS +@@ -4230,6 +4233,9 @@ + if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then + MOZ_NATIVE_LIBEVENT= + else ++PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, ++ [MOZ_NATIVE_LIBEVENT=1 ++ MOZ_LIBEVENT_INCLUDES="$MOZ_LIBEVENT_CFLAGS"], [ + if test "${LIBEVENT_DIR}" = "yes"; then + LIBEVENT_DIR=/usr + fi +@@ -4242,10 +4248,11 @@ else + AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) + AC_CHECK_LIB(event, event_init, + [MOZ_NATIVE_LIBEVENT=1 +- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" ++ MOZ_LIBEVENT_INCLUDES="-I${LIBEVENT_DIR}/include" + MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], + [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) + fi ++]) + CFLAGS=$_SAVE_CFLAGS LDFLAGS=$_SAVE_LDFLAGS LIBS=$_SAVE_LIBS - --if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then -+if test "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "/usr" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then - ZLIB_CFLAGS="-I${ZLIB_DIR}/include" - ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" - fi @@ -6022,6 +6024,14 @@ VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" VPX_X86_ASM=1 @@ -62,7 +58,7 @@ + VPX_ASFLAGS="-f elf32 -rnasm -pnasm" + VPX_X86_ASM=1 + ;; -+ FreeBSD:amd64) ++ FreeBSD:x86_64) + VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" + VPX_X86_ASM=1 + ;; @@ -77,7 +73,7 @@ + LIBJPEG_TURBO_ASFLAGS="-f elf32 -rnasm -pnasm -DPIC -DELF" + LIBJPEG_TURBO_X86_ASM=1 + ;; -+ FreeBSD:amd64) ++ FreeBSD:x86_64) + LIBJPEG_TURBO_ASFLAGS="-f elf64 -rnasm -pnasm -D__x86_64__ -DPIC -DELF" + LIBJPEG_TURBO_X64_ASM=1 + ;; diff --git a/mail/thunderbird-esr/files/patch-mozilla-db-sqlite3-src-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-db-sqlite3-src-Makefile.in deleted file mode 100644 index 24a7d6206604..000000000000 --- a/mail/thunderbird-esr/files/patch-mozilla-db-sqlite3-src-Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/db/sqlite3/src/Makefile.in.orig 2008-06-19 11:03:17.000000000 -0500 -+++ mozilla/db/sqlite3/src/Makefile.in 2008-06-19 11:04:15.000000000 -0500 -@@ -45,6 +45,8 @@ - - include $(DEPTH)/config/autoconf.mk - -+OS_CFLAGS = -I../../../dist/include/sqlite3 -+OS_LIBS = %%PTHREAD_LIBS%% - MODULE = sqlite3 - LIBRARY_NAME = sqlite3 - FORCE_SHARED_LIB = 1 diff --git a/mail/thunderbird-esr/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp b/mail/thunderbird-esr/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp new file mode 100644 index 000000000000..f088ed439b95 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp @@ -0,0 +1,11 @@ +--- mozilla/dom/plugins/ipc/PluginMessageUtils.cpp~ ++++ mozilla/dom/plugins/ipc/PluginMessageUtils.cpp +@@ -94,7 +94,7 @@ ReplaceAll(const string& haystack, const + i += with.length(); + } + +- return munged; ++ return munged.c_str(); + } + #endif + diff --git a/mail/thunderbird-esr/files/patch-mozilla-gfx-qcms-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-gfx-qcms-Makefile.in deleted file mode 100644 index bad2cf563256..000000000000 --- a/mail/thunderbird-esr/files/patch-mozilla-gfx-qcms-Makefile.in +++ /dev/null @@ -1,14 +0,0 @@ ---- mozilla/gfx/qcms/Makefile.in.orig 2010-11-25 20:10:32.000000000 +0100 -+++ mozilla/gfx/qcms/Makefile.in 2010-11-25 20:10:06.000000000 +0100 -@@ -44,6 +44,11 @@ - endif - endif - endif -+ifeq ($(OS_TEST),amd64) -+ CSRCS += transform-sse2.c transform-sse1.c -+ SSE1_FLAGS=-msse -+ SSE2_FLAGS=-msse2 -+endif - - FORCE_STATIC_LIB = 1 - # This library is used by other shared libs diff --git a/mail/thunderbird-esr/files/patch-mozilla-gfx-ycbcr-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-gfx-ycbcr-Makefile.in new file mode 100644 index 000000000000..041689a51995 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-gfx-ycbcr-Makefile.in @@ -0,0 +1,21 @@ +--- mozilla/gfx/ycbcr/Makefile.in~ ++++ mozilla/gfx/ycbcr/Makefile.in +@@ -58,6 +58,10 @@ ifeq ($(OS_ARCH),Linux) + CPPSRCS += yuv_row_posix.cpp \ + $(NULL) + else ++ifeq ($(OS_ARCH),FreeBSD) ++CPPSRCS += yuv_row_posix.cpp \ ++ $(NULL) ++else + ifeq ($(OS_ARCH),SunOS) + CPPSRCS += yuv_row_posix.cpp \ + $(NULL) +@@ -70,6 +74,7 @@ CPPSRCS += yuv_row_other.cpp \ + $(NULL) + endif # Darwin + endif # SunOS ++endif # FreeBSD + endif # linux + endif # windows +
\ No newline at end of file diff --git a/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in new file mode 100644 index 000000000000..5d2e72cd0a96 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in @@ -0,0 +1,28 @@ +--- mozilla/ipc/chromium/Makefile.in~ ++++ mozilla/ipc/chromium/Makefile.in +@@ -43,6 +43,14 @@ include $(DEPTH)/config/autoconf.mk + + OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS)) + ++# workaround IPC hang with libevent2 ++ifndef MOZ_DEBUG ++ifneq (,$(filter 4.2.%, $(CXX_VERSION))) ++MOZ_OPTIMIZE_FLAGS = -O1 ++OS_CXXFLAGS += $(MOZ_OPTIMIZE_FLAGS) ++endif ++endif ++ + LIBRARY_NAME = chromium_s + FORCE_STATIC_LIB = 1 + LIBXUL_LIBRARY = 1 +@@ -55,9 +60,7 @@ vpath %.c \ + $(srcdir)/src/third_party/libevent \ + $(NULL) + else # } else { +-# message_pump_libevent.cc includes third_party/libevent/event.h, +-# which we put in $(DIST), see export rule below +-LOCAL_INCLUDES += -I$(DIST) ++LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_INCLUDES)) + endif # } + + vpath %.cc \ diff --git a/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h b/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h deleted file mode 100644 index 5c4e5b79f3d1..000000000000 --- a/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h +++ /dev/null @@ -1,45 +0,0 @@ ---- mozilla/ipc/chromium/src/base/dir_reader_linux.h.orig 2011-12-16 21:29:22.000000000 +0100 -+++ mozilla/ipc/chromium/src/base/dir_reader_linux.h 2011-12-19 21:00:27.000000000 +0100 -@@ -9,6 +9,7 @@ - #include <errno.h> - #include <fcntl.h> - #include <stdint.h> -+#include <sys/dirent.h> - #include <sys/syscall.h> - #include <unistd.h> - -@@ -19,6 +20,8 @@ - - namespace base { - -+#define linux_dirent struct dirent -+#if 0 - struct linux_dirent { - uint64_t d_ino; - int64_t d_off; -@@ -26,11 +29,16 @@ - unsigned char d_type; - char d_name[0]; - }; -+#endif - - class DirReaderLinux { - public: - explicit DirReaderLinux(const char* directory_path) -+#ifdef O_DIRECTORY - : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), -+#else -+ : fd_(open(directory_path, O_RDONLY)), -+#endif - offset_(0), - size_(0) { - memset(buf_, 0, sizeof(buf_)); -@@ -57,7 +65,7 @@ - if (offset_ != size_) - return true; - -- const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_)); -+ const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_)); - if (r == 0) - return false; - if (r == -1) { diff --git a/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc b/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc new file mode 100644 index 000000000000..4532ca933738 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc @@ -0,0 +1,19 @@ +--- mozilla/ipc/chromium/src/base/message_pump_libevent.cc~ ++++ mozilla/ipc/chromium/src/base/message_pump_libevent.cc +@@ -6,6 +6,7 @@ + + #include <errno.h> + #include <fcntl.h> ++#include <unistd.h> + + #include "eintr_wrapper.h" + #include "base/logging.h" +@@ -15,7 +15,7 @@ + #include "base/scoped_nsautorelease_pool.h" + #include "base/scoped_ptr.h" + #include "base/time.h" +-#include "third_party/libevent/event.h" ++#include "event.h" + + // Lifecycle of struct event + // Libevent uses two main data structures: diff --git a/mail/thunderbird-esr/files/patch-mozilla-js-src-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-js-src-Makefile.in index f203d1dce232..e4ffc32e619c 100644 --- a/mail/thunderbird-esr/files/patch-mozilla-js-src-Makefile.in +++ b/mail/thunderbird-esr/files/patch-mozilla-js-src-Makefile.in @@ -1,24 +1,5 @@ --- mozilla/js/src/Makefile.in.orig 2011-07-06 05:09:22.000000000 +0200 +++ mozilla/js/src/Makefile.in 2011-07-06 22:23:46.363233778 +0200 -@@ -416,7 +416,7 @@ - # END enclude sources for V8 dtoa - ############################################# - --ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU))) -+ifeq (,$(filter arm% sparc %86 amd64 x86_64,$(TARGET_CPU))) - - VPATH += $(srcdir)/assembler \ - $(srcdir)/assembler/wtf \ -@@ -469,6 +469,9 @@ - else - #CPPSRCS += only_on_x86.cpp - endif -+ifeq (amd64, $(TARGET_CPU)) -+#CPPSRCS += only_on_x86_64.cpp -+endif - endif - ifeq (arm, $(TARGET_CPU)) - #CPPSRCS += only_on_arm.cpp @@ -793,7 +796,7 @@ endif # WINNT diff --git a/mail/thunderbird-esr/files/patch-mozilla-js-src-config-mkdepend-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-js-src-config-mkdepend-Makefile.in index 6129066e1afd..37f9d4c61f3e 100644 --- a/mail/thunderbird-esr/files/patch-mozilla-js-src-config-mkdepend-Makefile.in +++ b/mail/thunderbird-esr/files/patch-mozilla-js-src-config-mkdepend-Makefile.in @@ -5,7 +5,7 @@ include $(topsrcdir)/config/rules.mk -HOST_CFLAGS += -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -+HOST_CFLAGS += -DINCLUDEDIR=\"%%LOCALBASE%%/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -I/usr/local/include ++HOST_CFLAGS += -DINCLUDEDIR=\"$(LOCALBASE)/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -I/usr/local/include ifdef GNU_CC _GCCDIR = $(shell $(CC) -print-file-name=include) diff --git a/mail/thunderbird-esr/files/patch-mozilla-js-src-config_config.mk b/mail/thunderbird-esr/files/patch-mozilla-js-src-config_config.mk index c5b42ad3457c..0bacb7ee6f1a 100644 --- a/mail/thunderbird-esr/files/patch-mozilla-js-src-config_config.mk +++ b/mail/thunderbird-esr/files/patch-mozilla-js-src-config_config.mk @@ -4,7 +4,7 @@ -I$(srcdir) \ -I. \ -I$(DIST)/include -I$(DIST)/include/nsprpub \ -+ -I%%LOCALBASE%%/include \ ++ -I$(LOCALBASE)/include \ $(if $(LIBXUL_SDK),-I$(LIBXUL_SDK)/include -I$(LIBXUL_SDK)/include/nsprpub) \ $(OS_INCLUDES) \ $(NULL) diff --git a/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in b/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in index 32d7d18a0aa0..4cbf768d1180 100644 --- a/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in +++ b/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in @@ -1,40 +1,5 @@ --- mozilla/js/src/configure.in.orig 2012-01-29 15:44:24.000000000 +0100 +++ mozilla/js/src/configure.in 2012-01-30 23:37:46.541060008 +0100 -@@ -1410,7 +1410,7 @@ - CPU_ARCH=sparc - ;; - --x86_64 | ia64) -+amd64 | x86_64 | ia64) - CPU_ARCH="$OS_TEST" - ;; - -@@ -1432,7 +1432,7 @@ - dnl =============================================================== - INTEL_ARCHITECTURE= - case "$OS_TEST" in -- x86_64|i?86) -+ amd64|x86_64|i?86) - INTEL_ARCHITECTURE=1 - esac - -@@ -2713,6 +2713,16 @@ - AC_DEFINE(JS_CPU_X86) - AC_DEFINE(JS_NUNBOX32) - ;; -+amd64*-*) -+ ENABLE_TRACEJIT=1 -+ NANOJIT_ARCH=X64 -+ ENABLE_METHODJIT=1 -+ ENABLE_MONOIC=1 -+ ENABLE_POLYIC=1 -+ ENABLE_POLYIC_TYPED_ARRAY=1 -+ AC_DEFINE(JS_CPU_X64) -+ AC_DEFINE(JS_PUNBOX64) -+ ;; - x86_64*-*) - NANOJIT_ARCH=X64 - ENABLE_METHODJIT=1 @@ -2732,6 +2742,7 @@ AC_DEFINE(JS_NUNBOX32) ;; @@ -51,14 +16,11 @@ ;; esac -@@ -2795,6 +2807,10 @@ - i?86-*) - AC_DEFINE(AVMPLUS_IA32) - ;; -+amd64*-*) -+ AC_DEFINE(AVMPLUS_AMD64) -+ AC_DEFINE(AVMPLUS_64BIT) -+ ;; - x86_64*-*) - AC_DEFINE(AVMPLUS_AMD64) - AC_DEFINE(AVMPLUS_64BIT) +@@ -5946,6 +5946,7 @@ _EGREP_PATTERN="${_EGREP_PATTERN}dummy_n + * C++ implementations should define these macros only when __STDC_LIMIT_MACROS + * is defined before <stdint.h> is included. */ + #define __STDC_LIMIT_MACROS ++#define __STDC_CONSTANT_MACROS + + #endif /* _JS_CONFDEFS_H_ */ + diff --git a/mail/thunderbird-esr/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp b/mail/thunderbird-esr/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp new file mode 100644 index 000000000000..009b469dcd7f --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp @@ -0,0 +1,20 @@ +--- mozilla/js/src/methodjit/MethodJIT.cpp~ ++++ mozilla/js/src/methodjit/MethodJIT.cpp +@@ -171,7 +171,7 @@ + + JS_STATIC_ASSERT(offsetof(FrameRegs, sp) == 0); + +-#if defined(__linux__) && defined(JS_CPU_X64) ++#if defined(__ELF__) && defined(JS_CPU_X64) + # define SYMBOL_STRING_RELOC(name) #name "@plt" + #else + # define SYMBOL_STRING_RELOC(name) SYMBOL_STRING(name) +@@ -149,7 +149,7 @@ + + #if defined(XP_MACOSX) + # define HIDE_SYMBOL(name) ".private_extern _" #name +-#elif defined(__linux__) ++#elif defined(__ELF__) + # define HIDE_SYMBOL(name) ".hidden" #name + #else + # define HIDE_SYMBOL(name) diff --git a/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h b/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h deleted file mode 100644 index e2c52f080518..000000000000 --- a/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/media/libsydneyaudio/include/sydney_audio.h.orgi 2009-04-10 12:24:01.000000000 +0200 -+++ mozilla/media/libsydneyaudio/include/sydney_audio.h 2009-04-10 12:24:30.000000000 +0200 -@@ -73,7 +73,7 @@ - # endif - #elif defined(WIN32) - # define SA_LITTLE_ENDIAN 1 --#elif defined(__APPLE__) -+#elif defined(__APPLE__) || defined(__FreeBSD__) - # if defined(__BIG_ENDIAN__) - # define SA_BIG_ENDIAN 1 - # else diff --git a/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c b/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c new file mode 100644 index 000000000000..ddb42a92a1e3 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c @@ -0,0 +1,13 @@ +--- mozilla/media/libsydneyaudio/src/sydney_audio_oss.c~ ++++ mozilla/media/libsydneyaudio/src/sydney_audio_oss.c +@@ -446,6 +446,10 @@ static void audio_callback(void* data) + printf("!"); /* not enough audio data */ + #endif + bytes = bytes-bytes_to_copy; ++ struct timespec ts = {0, 1000000}; ++ pthread_mutex_unlock(&s->mutex); ++ nanosleep(&ts, NULL); ++ pthread_mutex_lock(&s->mutex); + break; + } + free(s->bl_head); diff --git a/mail/thunderbird-esr/files/patch-mozilla-memory-mozalloc-mozalloc.cpp b/mail/thunderbird-esr/files/patch-mozilla-memory-mozalloc-mozalloc.cpp new file mode 100644 index 000000000000..2a792aba9aa0 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-memory-mozalloc-mozalloc.cpp @@ -0,0 +1,21 @@ +--- mozilla/memory/mozalloc/mozalloc.cpp~ ++++ mozilla/memory/mozalloc/mozalloc.cpp +@@ -52,6 +52,9 @@ + #if defined(XP_UNIX) + # include <unistd.h> // for valloc on *BSD + #endif //if defined(XP_UNIX) ++#ifdef __FreeBSD__ ++# include <malloc_np.h> // for malloc_usable_size ++#endif + + #if defined(MOZ_MEMORY) + // jemalloc.h doesn't redeclare symbols if they're provided by the OS +@@ -259,7 +262,7 @@ moz_malloc_usable_size(void *ptr) + + #if defined(XP_MACOSX) + return malloc_size(ptr); +-#elif defined(MOZ_MEMORY) ++#elif defined(MOZ_MEMORY) || defined(__FreeBSD__) + return malloc_usable_size(ptr); + #elif defined(XP_WIN) + return _msize(ptr); diff --git a/mail/thunderbird-esr/files/patch-mozilla-security-coreconf-FreeBSD.mk b/mail/thunderbird-esr/files/patch-mozilla-security-coreconf-FreeBSD.mk index dc4e96c7c439..f5a47988bcc5 100644 --- a/mail/thunderbird-esr/files/patch-mozilla-security-coreconf-FreeBSD.mk +++ b/mail/thunderbird-esr/files/patch-mozilla-security-coreconf-FreeBSD.mk @@ -1,6 +1,6 @@ --- mozilla/security/coreconf/FreeBSD.mk.orig 2010-02-28 23:30:04.000000000 +0000 +++ mozilla/security/coreconf/FreeBSD.mk 2010-03-03 02:05:22.000000000 +0000 -@@ -49,8 +49,20 @@ +@@ -49,8 +49,24 @@ ifeq ($(CPU_ARCH),pc98) CPU_ARCH = x86 endif @@ -9,12 +9,16 @@ +ifeq ($(OS_TEST),alpha) +CPU_ARCH = alpha +endif -+ifeq ($(OS_TEST),amd64) -+CPU_ARCH = amd64 ++ifeq ($(OS_TEST),x86_64) ++CPU_ARCH = x86_64 +endif +ifeq ($(OS_TEST),ia64) +CPU_ARCH = ia64 +endif ++ifeq ($(OS_TEST),powerpc64) ++CPU_ARCH = powerpc ++USE_64 = 1 ++endif +ifeq ($(OS_TEST),powerpc) +CPU_ARCH = powerpc +endif @@ -32,9 +36,11 @@ ifdef MAPFILE MKSHLIB += -Wl,--version-script,$(MAPFILE) endif -@@ -87,4 +99,4 @@ +@@ -87,4 +99,6 @@ G++INCLUDES = -I/usr/include/g++ -INCLUDES += -I/usr/X11R6/include -+#INCLUDES += -I/usr/local/include ++USE_SYSTEM_ZLIB = 1 ++ZLIB_LIBS = -lz ++INCLUDES += -I$(LOCALBASE)/include diff --git a/mail/thunderbird-esr/files/patch-mozilla-security-nss-lib-Makefile b/mail/thunderbird-esr/files/patch-mozilla-security-nss-lib-Makefile new file mode 100644 index 000000000000..195e44014456 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-security-nss-lib-Makefile @@ -0,0 +1,11 @@ +--- mozilla/security/nss/lib/Makefile~ ++++ mozilla/security/nss/lib/Makefile +@@ -63,7 +63,7 @@ ZLIB_SRCDIR = zlib # Add the zlib direc + endif + + ifndef MOZILLA_CLIENT +-ifndef NSS_USE_SYSTEM_SQLITE ++ifndef MOZ_NATIVE_SQLITE + SQLITE_SRCDIR = sqlite # Add the sqlite directory to DIRS. + endif + endif diff --git a/mail/thunderbird-esr/files/patch-mozilla-toolkit-library-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-toolkit-library-Makefile.in deleted file mode 100644 index f222b6dca9e9..000000000000 --- a/mail/thunderbird-esr/files/patch-mozilla-toolkit-library-Makefile.in +++ /dev/null @@ -1,12 +0,0 @@ ---- mozilla/toolkit/library/Makefile.in.orig 2010-01-11 12:13:08.000000000 -0500 -+++ mozilla/toolkit/library/Makefile.in 2010-01-11 12:15:05.000000000 -0500 -@@ -181,7 +181,7 @@ - export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS) - $(INSTALL) $^ . - --EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -+EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%% - - ifdef MOZ_ENABLE_LIBXUL - include $(srcdir)/libxul-rules.mk - diff --git a/mail/thunderbird-esr/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp b/mail/thunderbird-esr/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp new file mode 100644 index 000000000000..64e61b4ccfa7 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp @@ -0,0 +1,11 @@ +--- mozilla/toolkit/xre/nsAppRunner.cpp~ ++++ mozilla/toolkit/xre/nsAppRunner.cpp +@@ -2998,7 +2998,7 @@ XRE_main(int argc, char* argv[], const n + gQtOnlyArgv[gQtOnlyArgc] = nsnull; + #endif + #if defined(MOZ_WIDGET_GTK2) +-#ifdef MOZ_MEMORY ++#if defined(MOZ_MEMORY) || defined(__FreeBSD__) + // Disable the slice allocator, since jemalloc already uses similar layout + // algorithms, and using a sub-allocator tends to increase fragmentation. + // This must be done before g_thread_init() is called. diff --git a/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsNativeThemeQt.cpp b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsNativeThemeQt.cpp new file mode 100644 index 000000000000..bbd5fb825595 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsNativeThemeQt.cpp @@ -0,0 +1,12 @@ +--- mozilla/widget/src/qt/nsNativeThemeQt.cpp~ ++++ mozilla/widget/src/qt/nsNativeThemeQt.cpp +@@ -25,7 +25,9 @@ + #include "nsThemeConstants.h" + #include "nsIServiceManager.h" + #include "nsIDOMHTMLInputElement.h" ++#ifdef __GLIBC__ + #include <malloc.h> ++#endif + + + #include "gfxASurface.h" diff --git a/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsSound.cpp b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsSound.cpp new file mode 100644 index 000000000000..d8b82936a718 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsSound.cpp @@ -0,0 +1,10 @@ +--- mozilla/widget/src/qt/nsSound.cpp~ ++++ mozilla/widget/src/qt/nsSound.cpp +@@ -40,6 +40,7 @@ + #include <QSound> + + #include <string.h> ++#include <unistd.h> + + #include "nscore.h" + #include "plstr.h" diff --git a/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsWindow.cpp b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsWindow.cpp new file mode 100644 index 000000000000..aa6817839692 --- /dev/null +++ b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsWindow.cpp @@ -0,0 +1,10 @@ +--- mozilla/widget/src/qt/nsWindow.cpp~ ++++ mozilla/widget/src/qt/nsWindow.cpp +@@ -43,6 +43,7 @@ using namespace QtMobility; + + #ifdef MOZ_X11 + #include <X11/Xlib.h> ++#include "mozilla/X11Util.h" + #endif //MOZ_X11 + + #include "nsXULAppAPI.h" diff --git a/mail/thunderbird-esr/files/patch-mozilla-xpcom-base-nsStackWalk.cpp b/mail/thunderbird-esr/files/patch-mozilla-xpcom-base-nsStackWalk.cpp index 4d2bca2ca692..817014333627 100644 --- a/mail/thunderbird-esr/files/patch-mozilla-xpcom-base-nsStackWalk.cpp +++ b/mail/thunderbird-esr/files/patch-mozilla-xpcom-base-nsStackWalk.cpp @@ -8,3 +8,11 @@ #if defined(_WIN32) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)) && !defined(WINCE) // WIN32 x86 stack walking code +@@ -1123,6 +1123,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb + + #elif defined(HAVE__UNWIND_BACKTRACE) + ++#define _GNU_SOURCE + // libgcc_s.so symbols _Unwind_Backtrace@@GCC_3.3 and _Unwind_GetIP@@GCC_3.0 + #include <unwind.h> + diff --git a/mail/thunderbird-esr/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in index e896cec90613..252912459191 100644 --- a/mail/thunderbird-esr/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in +++ b/mail/thunderbird-esr/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in @@ -1,16 +1,6 @@ ---- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2011-05-28 15:26:21.000000000 +0200 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2011-06-03 18:39:42.769434047 +0200 -@@ -74,6 +74,9 @@ - # NOTE: MODULE_OPTIMIZE_FLAGS must be set before including config.mk - MODULE_OPTIMIZE_FLAGS=-O3 - endif -+ifeq (x86_64,$(OS_TEST)) -+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp -+endif - endif - endif - -@@ -117,7 +120,7 @@ +--- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2011-04-26 23:22:05.000000000 +0200 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2011-04-26 23:48:09.637442986 +0200 +@@ -70,7 +70,7 @@ endif endif # IA64 Linux @@ -19,36 +9,6 @@ ifneq (,$(findstring ia64,$(OS_TEST))) CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s -@@ -129,6 +132,12 @@ - ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDx86_64) - CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp - endif -+# FreeBSD/amd64 -+# -+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDamd64) -+CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp -+endif -+# - # - # Neutrino/Intel (uses the same unixish_x86 code) - # -@@ -184,9 +193,15 @@ - ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s - endif - # -+# FreeBSD/Alpha -+# -+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDalpha) -+CPPSRCS := xptcinvoke_freebsd_alpha.cpp xptcstubs_freebsd_alpha.cpp -+endif -+# - # Linux/Alpha - # --ifneq (,$(filter Linuxalpha FreeBSDalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) -+ifneq (,$(filter Linuxalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) - CPPSRCS := xptcinvoke_linux_alpha.cpp xptcstubs_linux_alpha.cpp - endif - # @@ -341,7 +356,7 @@ # # Linux/PPC @@ -58,19 +18,21 @@ CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s AS := $(CC) -c -x assembler-with-cpp -@@ -419,6 +434,15 @@ - ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s - endif +@@ -350,7 +365,7 @@ # -+# FreeBSD/SPARC64 -+# -+ifeq ($(OS_ARCH),FreeBSD) -+ifneq (,$(findstring sparc,$(OS_TEST))) -+CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp -+ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s -+endif -+endif -+# - # OpenBSD/SPARC + # Linux/PPC64 # - ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc) +-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64) ++ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST))) + CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp + ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s + AS := $(CC) -c -x assembler-with-cpp +@@ -350,7 +350,7 @@ + # + # OpenBSD/SPARC64 + # +-ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc64) ++ifneq (,$(filter OpenBSDsparc64 FreeBSDsparc64,$(OS_ARCH)$(OS_TEST))) + CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp + ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s + endif diff --git a/mail/thunderbird-i18n/Makefile b/mail/thunderbird-i18n/Makefile index ebcc4fe45b44..5361479271d5 100644 --- a/mail/thunderbird-i18n/Makefile +++ b/mail/thunderbird-i18n/Makefile @@ -6,7 +6,7 @@ # PORTNAME= thunderbird-i18n -PORTVERSION= 13.0.1 +PORTVERSION= 14.0 CATEGORIES= mail MASTER_SITE_SUBDIR= thunderbird/releases/${PORTVERSION}/linux-i686/xpi PKGNAMEPREFIX= @@ -27,7 +27,7 @@ RUN_DEPENDS+= xpi-quick-locale-switcher>=0:${PORTSDIR}/www/xpi-quick-locale-swit .endif NO_BUILD= yes -USE_THUNDERBIRD= 13 +USE_THUNDERBIRD= 14 USE_XPI= thunderbird linux-thunderbird THUNDERBIRD_I18N_ALL= ar br ca cs da de en-GB en-US es-AR es-ES et eu fi fr \ diff --git a/mail/thunderbird-i18n/distinfo b/mail/thunderbird-i18n/distinfo index 6db95af221e0..9a0025196bcd 100644 --- a/mail/thunderbird-i18n/distinfo +++ b/mail/thunderbird-i18n/distinfo @@ -1,84 +1,84 @@ -SHA256 (xpi/thunderbird-i18n-13.0.1/ar.xpi) = 49b03ea3ae216b8d13f2e062f06ac38d3ce2d6cf196b5b19c06732c8167bed1a -SIZE (xpi/thunderbird-i18n-13.0.1/ar.xpi) = 464600 -SHA256 (xpi/thunderbird-i18n-13.0.1/br.xpi) = 520e025ab04d6a4bce1240aea85b09b52ab7da8f6677ca10b2b05bdf797363fb -SIZE (xpi/thunderbird-i18n-13.0.1/br.xpi) = 438441 -SHA256 (xpi/thunderbird-i18n-13.0.1/ca.xpi) = 4d907f21cef8f123c58d667784459dc0fcdcafca75f00ef56aa86843eabc2694 -SIZE (xpi/thunderbird-i18n-13.0.1/ca.xpi) = 438907 -SHA256 (xpi/thunderbird-i18n-13.0.1/cs.xpi) = 94b577286492dcbc90360d43231d996c78253a2b1f3bcf1323df2ff4823f6acd -SIZE (xpi/thunderbird-i18n-13.0.1/cs.xpi) = 442218 -SHA256 (xpi/thunderbird-i18n-13.0.1/da.xpi) = 0cc862d2d380483dcc0070b054625754198c2b7e47bcbf6b08b1e43ba4e06ef2 -SIZE (xpi/thunderbird-i18n-13.0.1/da.xpi) = 386029 -SHA256 (xpi/thunderbird-i18n-13.0.1/de.xpi) = 98950e7a3a316be8780d5aefe02ddcdf4456540f76c087d3b692f3706acf3b33 -SIZE (xpi/thunderbird-i18n-13.0.1/de.xpi) = 441537 -SHA256 (xpi/thunderbird-i18n-13.0.1/en-GB.xpi) = f555ae053c8861aa96d6b1e39d22322a6f17f6b4aae18062caef57362f3468c0 -SIZE (xpi/thunderbird-i18n-13.0.1/en-GB.xpi) = 413052 -SHA256 (xpi/thunderbird-i18n-13.0.1/en-US.xpi) = 18c09a514dbc07737d6db55d387420b009319af2deff4c3c236820737dfc9f76 -SIZE (xpi/thunderbird-i18n-13.0.1/en-US.xpi) = 412556 -SHA256 (xpi/thunderbird-i18n-13.0.1/es-AR.xpi) = 5bfc35b36a8472d107939ad7c688b9f1a35546e7cd4de197f6be0f2dc024314a -SIZE (xpi/thunderbird-i18n-13.0.1/es-AR.xpi) = 433356 -SHA256 (xpi/thunderbird-i18n-13.0.1/es-ES.xpi) = e643404531bd49c137027efa3e630d20756c125c42360b8aff58b62a9ff781f2 -SIZE (xpi/thunderbird-i18n-13.0.1/es-ES.xpi) = 372017 -SHA256 (xpi/thunderbird-i18n-13.0.1/et.xpi) = 8316b645906a06dead18f9e9b50407cba06fda0563a3d02847ba80244db93f8b -SIZE (xpi/thunderbird-i18n-13.0.1/et.xpi) = 433404 -SHA256 (xpi/thunderbird-i18n-13.0.1/eu.xpi) = da7b9c996beb74a63bc8f144858f25df39ce576fc923398c7b3c22154bab6314 -SIZE (xpi/thunderbird-i18n-13.0.1/eu.xpi) = 428885 -SHA256 (xpi/thunderbird-i18n-13.0.1/fi.xpi) = 3f054cebae8de427a88196bced05fd6f3fc94f0a3f639de4ffd2c18f9eaa3c4c -SIZE (xpi/thunderbird-i18n-13.0.1/fi.xpi) = 434513 -SHA256 (xpi/thunderbird-i18n-13.0.1/fr.xpi) = 765e197921e191ce0708facd29b3d7953554c21ef71a7d3a3a31dc3acac418c8 -SIZE (xpi/thunderbird-i18n-13.0.1/fr.xpi) = 437825 -SHA256 (xpi/thunderbird-i18n-13.0.1/fy-NL.xpi) = 35049723d6c1ab696987c8d2a5726a1c2607489c9658b3c61a37a78bebd14e3f -SIZE (xpi/thunderbird-i18n-13.0.1/fy-NL.xpi) = 436856 -SHA256 (xpi/thunderbird-i18n-13.0.1/ga-IE.xpi) = 218f0cba1023082c35ebfd982eb7aaaeb21c17cbd11125375cdd488211760b74 -SIZE (xpi/thunderbird-i18n-13.0.1/ga-IE.xpi) = 445906 -SHA256 (xpi/thunderbird-i18n-13.0.1/gd.xpi) = 36591ce169662057e692256b42849d51693c6ef473d69256f7030f1202e91b2f -SIZE (xpi/thunderbird-i18n-13.0.1/gd.xpi) = 449540 -SHA256 (xpi/thunderbird-i18n-13.0.1/gl.xpi) = b16482165194c46ae89bb112e1d8912db1f07a21943154845b6e95268adb8a6c -SIZE (xpi/thunderbird-i18n-13.0.1/gl.xpi) = 431836 -SHA256 (xpi/thunderbird-i18n-13.0.1/he.xpi) = 56d0ee32829c0e4eec4bbf979e40311e26a6c3358ea5f84b3eb4bb8d34041e92 -SIZE (xpi/thunderbird-i18n-13.0.1/he.xpi) = 462891 -SHA256 (xpi/thunderbird-i18n-13.0.1/hu.xpi) = df0bb7abe1d9b5b6f5bfbf03037d61f082801d92e820bd7acb1e67ee71e107e4 -SIZE (xpi/thunderbird-i18n-13.0.1/hu.xpi) = 448913 -SHA256 (xpi/thunderbird-i18n-13.0.1/is.xpi) = 61d36431358a0f691508c89b0e38fd17f0ff767489b7ea735d3795c7528cebe3 -SIZE (xpi/thunderbird-i18n-13.0.1/is.xpi) = 435541 -SHA256 (xpi/thunderbird-i18n-13.0.1/it.xpi) = c61b6760fd967029c408c97946959cff325950e9594a1ff13a7953decc369844 -SIZE (xpi/thunderbird-i18n-13.0.1/it.xpi) = 363044 -SHA256 (xpi/thunderbird-i18n-13.0.1/ja.xpi) = 3dda3cdff458abf74edd467dae3e14625a31b2802acda3f079e704928feeac4a -SIZE (xpi/thunderbird-i18n-13.0.1/ja.xpi) = 485921 -SHA256 (xpi/thunderbird-i18n-13.0.1/ko.xpi) = 68747390f71725ea2fcffd188f9d762d2f9a32044bbc4ee2dab45f77bd4d848e -SIZE (xpi/thunderbird-i18n-13.0.1/ko.xpi) = 396780 -SHA256 (xpi/thunderbird-i18n-13.0.1/lt.xpi) = e519b6d6ce6a893e33fbe12efee827c08ab0dcb6e603412aae90d3d1eec9890c -SIZE (xpi/thunderbird-i18n-13.0.1/lt.xpi) = 528697 -SHA256 (xpi/thunderbird-i18n-13.0.1/nb-NO.xpi) = 1cc38ba351d14c19eae3bccf43514b0c378eafe999a00e2ad193fc964bcbf2c5 -SIZE (xpi/thunderbird-i18n-13.0.1/nb-NO.xpi) = 430103 -SHA256 (xpi/thunderbird-i18n-13.0.1/nl.xpi) = a660539714585c26765f107c1fab212a6958eee6625889bb4262d08adba1d117 -SIZE (xpi/thunderbird-i18n-13.0.1/nl.xpi) = 430442 -SHA256 (xpi/thunderbird-i18n-13.0.1/nn-NO.xpi) = 41bfe84c379ebfb848d609c768c127de4c41a4994d4207466d637f475a198c68 -SIZE (xpi/thunderbird-i18n-13.0.1/nn-NO.xpi) = 432244 -SHA256 (xpi/thunderbird-i18n-13.0.1/pl.xpi) = 1e0d2be8b80e0a48c8cc759aef6affad7455e3abbfb4ef9f41902d815722a023 -SIZE (xpi/thunderbird-i18n-13.0.1/pl.xpi) = 411543 -SHA256 (xpi/thunderbird-i18n-13.0.1/pt-BR.xpi) = 7724489eaba56aaa6b1fc95561f5c028e679813c918a39d4e9ddbc773e21f7ed -SIZE (xpi/thunderbird-i18n-13.0.1/pt-BR.xpi) = 440128 -SHA256 (xpi/thunderbird-i18n-13.0.1/pt-PT.xpi) = 666db898090397fbcecd737dc272b099114f54105102929b2e8a28289fd6ad85 -SIZE (xpi/thunderbird-i18n-13.0.1/pt-PT.xpi) = 437092 -SHA256 (xpi/thunderbird-i18n-13.0.1/rm.xpi) = dd6b8461a0d55dd3a9eaa85e65a5a97bfdfc7b48640d2570e90b933ec8e2beea -SIZE (xpi/thunderbird-i18n-13.0.1/rm.xpi) = 437475 -SHA256 (xpi/thunderbird-i18n-13.0.1/ru.xpi) = 93f05f86752702a18003dab2cc54ac73361a7d8671d5e0c9efde068ad840deb4 -SIZE (xpi/thunderbird-i18n-13.0.1/ru.xpi) = 430597 -SHA256 (xpi/thunderbird-i18n-13.0.1/si.xpi) = f1faa45d947133cfcb324e429ece68be3a5c5fb698fd2c9cbda775f6f1e3e3f6 -SIZE (xpi/thunderbird-i18n-13.0.1/si.xpi) = 480817 -SHA256 (xpi/thunderbird-i18n-13.0.1/sk.xpi) = 4d9729ee737251949f65aa66142f9bb475d5c3388e810f5000df7d36f83bfcf4 -SIZE (xpi/thunderbird-i18n-13.0.1/sk.xpi) = 449078 -SHA256 (xpi/thunderbird-i18n-13.0.1/sl.xpi) = b39f695a34984c8d45962fb52567663c95af18f4488139aa56866b73d0c5c69c -SIZE (xpi/thunderbird-i18n-13.0.1/sl.xpi) = 433152 -SHA256 (xpi/thunderbird-i18n-13.0.1/sq.xpi) = 199bac5070f170803959096313504e26e545d8f40b51d998895f8e3173a9244e -SIZE (xpi/thunderbird-i18n-13.0.1/sq.xpi) = 384120 -SHA256 (xpi/thunderbird-i18n-13.0.1/sv-SE.xpi) = ba1d1f9bc1dc0ff32a725fcce1ee8277b56c871f2adf6514b93176a57efc20b1 -SIZE (xpi/thunderbird-i18n-13.0.1/sv-SE.xpi) = 501341 -SHA256 (xpi/thunderbird-i18n-13.0.1/ta-LK.xpi) = 447c27407c55307958fbc6f732a3841bcca64b69f79545807b5c55050dd363dd -SIZE (xpi/thunderbird-i18n-13.0.1/ta-LK.xpi) = 499173 -SHA256 (xpi/thunderbird-i18n-13.0.1/tr.xpi) = 5d8db2a902b8cfe7671128985400b255b722a03d5e3d7179172a750eb8fbc041 -SIZE (xpi/thunderbird-i18n-13.0.1/tr.xpi) = 440499 -SHA256 (xpi/thunderbird-i18n-13.0.1/uk.xpi) = d754b7daf2c6c2f0b5932b477eeef746bc323b935f43c7216beb630303177714 -SIZE (xpi/thunderbird-i18n-13.0.1/uk.xpi) = 487737 -SHA256 (xpi/thunderbird-i18n-13.0.1/zh-TW.xpi) = dabb72384cb9f83cf448901f5cde7e425ff6102e422a08298cd5d680816c05d1 -SIZE (xpi/thunderbird-i18n-13.0.1/zh-TW.xpi) = 456145 +SHA256 (xpi/thunderbird-i18n-14.0/ar.xpi) = 97ca912e205e6096c4ae6955e805be2c237a3537e2d4118184cb8452bcbd6c19 +SIZE (xpi/thunderbird-i18n-14.0/ar.xpi) = 468471 +SHA256 (xpi/thunderbird-i18n-14.0/br.xpi) = f82b5b8ba3505eae9d92a627a5c9f4fed4c694e1a9ea35a43e2821f88deb67c2 +SIZE (xpi/thunderbird-i18n-14.0/br.xpi) = 441402 +SHA256 (xpi/thunderbird-i18n-14.0/ca.xpi) = c18fba9e0bf9248a7ef174b2954215623bc8157a8f6c33694dd6565b0a24d54d +SIZE (xpi/thunderbird-i18n-14.0/ca.xpi) = 441959 +SHA256 (xpi/thunderbird-i18n-14.0/cs.xpi) = 57645fdec1175a807f6ea5bd8faf3f019b50baddb42c69ab59202ab37ba28b5e +SIZE (xpi/thunderbird-i18n-14.0/cs.xpi) = 445223 +SHA256 (xpi/thunderbird-i18n-14.0/da.xpi) = 675e54e1b89d8b791a2a0723eaab370679da18048167d6fc7a46311843974d02 +SIZE (xpi/thunderbird-i18n-14.0/da.xpi) = 388981 +SHA256 (xpi/thunderbird-i18n-14.0/de.xpi) = e4bbcd8316e4a0578f2417747c3e058e064a34c681ae0444756daf0b2abd1e5e +SIZE (xpi/thunderbird-i18n-14.0/de.xpi) = 444537 +SHA256 (xpi/thunderbird-i18n-14.0/en-GB.xpi) = a05380eeb102402acea8eea83e0e248e9735fe3296b8a78ac57c42e3acc5eb7d +SIZE (xpi/thunderbird-i18n-14.0/en-GB.xpi) = 415845 +SHA256 (xpi/thunderbird-i18n-14.0/en-US.xpi) = be0cf753b15f519d9b2f27706c9efd67c8e8365e82ee4d97a9782107fa2930ee +SIZE (xpi/thunderbird-i18n-14.0/en-US.xpi) = 415339 +SHA256 (xpi/thunderbird-i18n-14.0/es-AR.xpi) = 4cd51236f68d9f779a8a7d6fd3c00e8396a8c0c3347b8b5f75e5ffea485b3020 +SIZE (xpi/thunderbird-i18n-14.0/es-AR.xpi) = 435596 +SHA256 (xpi/thunderbird-i18n-14.0/es-ES.xpi) = ea8d686cf8defd60f40c328e19631e5389ee44244c1f6e9016ab9768ee30b214 +SIZE (xpi/thunderbird-i18n-14.0/es-ES.xpi) = 374376 +SHA256 (xpi/thunderbird-i18n-14.0/et.xpi) = 14d0613bb7c92b90d9d9c52681695de143bfd056e0a93f037393122fe12680bb +SIZE (xpi/thunderbird-i18n-14.0/et.xpi) = 436427 +SHA256 (xpi/thunderbird-i18n-14.0/eu.xpi) = 3adf7b7ef6223c4849bf243cc1a4a65e2a526a37df2221971f692394abc0302e +SIZE (xpi/thunderbird-i18n-14.0/eu.xpi) = 431890 +SHA256 (xpi/thunderbird-i18n-14.0/fi.xpi) = 78d1950534ce69ba4006f500ba67ca308383223209210e5c0ad4280ce47ccdbe +SIZE (xpi/thunderbird-i18n-14.0/fi.xpi) = 437544 +SHA256 (xpi/thunderbird-i18n-14.0/fr.xpi) = c7b0badc57954f834582024c5c8b8af56de8c40ec80e6f3fecadd842a3d62dae +SIZE (xpi/thunderbird-i18n-14.0/fr.xpi) = 440943 +SHA256 (xpi/thunderbird-i18n-14.0/fy-NL.xpi) = 5df1411b90c95ade19ba3c2da4263fe21d80ba510e264a356ac01a7210c444fd +SIZE (xpi/thunderbird-i18n-14.0/fy-NL.xpi) = 440194 +SHA256 (xpi/thunderbird-i18n-14.0/ga-IE.xpi) = 8cd0945fc4aa3ac24d795afdda51776bdf9cfdd4fc5431ebcf1a66e1a90e6ef4 +SIZE (xpi/thunderbird-i18n-14.0/ga-IE.xpi) = 449246 +SHA256 (xpi/thunderbird-i18n-14.0/gd.xpi) = a1f3597796e005485d09bb38d86855b4fb84c9e54b7f04daffba59c8aec1f408 +SIZE (xpi/thunderbird-i18n-14.0/gd.xpi) = 452703 +SHA256 (xpi/thunderbird-i18n-14.0/gl.xpi) = a223d853fc33f9d630d6d3b602b1c7dc7ff3775b9bcb3ac5a6975a0a3951c76b +SIZE (xpi/thunderbird-i18n-14.0/gl.xpi) = 434802 +SHA256 (xpi/thunderbird-i18n-14.0/he.xpi) = aa7b6af605712a6199e0651ed9bfb34c1c6d96a96fbab9527592b8ca9125efa4 +SIZE (xpi/thunderbird-i18n-14.0/he.xpi) = 466181 +SHA256 (xpi/thunderbird-i18n-14.0/hu.xpi) = 827896aa8d3452974858dad400aa61d7edcdb88ca26411ccfa293b59f1e04be4 +SIZE (xpi/thunderbird-i18n-14.0/hu.xpi) = 453028 +SHA256 (xpi/thunderbird-i18n-14.0/is.xpi) = e3101d02e79122a7573ea5da1a0af51e306f6996e3e12a4f6da1c590d6ac3826 +SIZE (xpi/thunderbird-i18n-14.0/is.xpi) = 438431 +SHA256 (xpi/thunderbird-i18n-14.0/it.xpi) = ebea4142a48a7ca1dbc178ff91d6172c4af1be25c2279a41636dfb32d64ea76a +SIZE (xpi/thunderbird-i18n-14.0/it.xpi) = 365345 +SHA256 (xpi/thunderbird-i18n-14.0/ja.xpi) = 2a74ee1670634290b648ebe897bc2f27a29c024ea35500125283d4a068d0437f +SIZE (xpi/thunderbird-i18n-14.0/ja.xpi) = 490107 +SHA256 (xpi/thunderbird-i18n-14.0/ko.xpi) = 817db00cc9870885a5d0ca1f7bb6a2739cd5ac3ee3b00b39a6100d479b327d37 +SIZE (xpi/thunderbird-i18n-14.0/ko.xpi) = 399787 +SHA256 (xpi/thunderbird-i18n-14.0/lt.xpi) = b0c3fbc2b30b54ebea79e53d170a5b01870512a1d21b8b3ad8beb2240c8b7cda +SIZE (xpi/thunderbird-i18n-14.0/lt.xpi) = 528818 +SHA256 (xpi/thunderbird-i18n-14.0/nb-NO.xpi) = e0663f24db9cc6eafb2a1dec93e8ac376bdf0ad35e75eea19bc0eb6062d58e43 +SIZE (xpi/thunderbird-i18n-14.0/nb-NO.xpi) = 433122 +SHA256 (xpi/thunderbird-i18n-14.0/nl.xpi) = ac0bf170175530b1f6c8bd3c5f4dcaef76e82a17fbef31821c66b203b0caf52c +SIZE (xpi/thunderbird-i18n-14.0/nl.xpi) = 433399 +SHA256 (xpi/thunderbird-i18n-14.0/nn-NO.xpi) = 1f8b59432035722493b5bcaa5169dc50a4f83cd451522ab8d9f57982b54aee67 +SIZE (xpi/thunderbird-i18n-14.0/nn-NO.xpi) = 434946 +SHA256 (xpi/thunderbird-i18n-14.0/pl.xpi) = a0851e2cecdb4d7c80e04e6456c2f8798bd48aee981fa31371298612513aef74 +SIZE (xpi/thunderbird-i18n-14.0/pl.xpi) = 414643 +SHA256 (xpi/thunderbird-i18n-14.0/pt-BR.xpi) = 0c2c0cc99e46d7422f1fe8890112274493fd06c39c714fc942bda9d78fb0b9fd +SIZE (xpi/thunderbird-i18n-14.0/pt-BR.xpi) = 439531 +SHA256 (xpi/thunderbird-i18n-14.0/pt-PT.xpi) = d36ebd12aa11287f263bab13559ad0312f495b5fca176a5dcac3665045b9c662 +SIZE (xpi/thunderbird-i18n-14.0/pt-PT.xpi) = 440166 +SHA256 (xpi/thunderbird-i18n-14.0/rm.xpi) = 31d62ad2f849e86c02f6b976a7fc0505818478d93a25a5bdc06077a8053269cb +SIZE (xpi/thunderbird-i18n-14.0/rm.xpi) = 440423 +SHA256 (xpi/thunderbird-i18n-14.0/ru.xpi) = 2dd885e994802347c64df1c2680ada45a97190adb3e0be2b5a1b0fe52d54d3d1 +SIZE (xpi/thunderbird-i18n-14.0/ru.xpi) = 432767 +SHA256 (xpi/thunderbird-i18n-14.0/si.xpi) = cb2ca9f90bbee71e55d1465a39923c01d7672d036f4c6b8ee9089316cfcb6967 +SIZE (xpi/thunderbird-i18n-14.0/si.xpi) = 484240 +SHA256 (xpi/thunderbird-i18n-14.0/sk.xpi) = 135874a448ed464845641b778e6ee54cc8239dd8de49d58277bbc15c30dc23c6 +SIZE (xpi/thunderbird-i18n-14.0/sk.xpi) = 452407 +SHA256 (xpi/thunderbird-i18n-14.0/sl.xpi) = ecf0baaabbe15bd88b54bd067b8275fdbb8b75936cf4eaa33b2a4603faec3014 +SIZE (xpi/thunderbird-i18n-14.0/sl.xpi) = 436385 +SHA256 (xpi/thunderbird-i18n-14.0/sq.xpi) = d58f9943763ab94c59f2a866d02902124e44612f0e3adfeab3e301b4137d4e1a +SIZE (xpi/thunderbird-i18n-14.0/sq.xpi) = 387214 +SHA256 (xpi/thunderbird-i18n-14.0/sv-SE.xpi) = 46e606ea9d031cdcfcda9c1f88b0ba48931077e1d45e5aac512ea531076c1c3b +SIZE (xpi/thunderbird-i18n-14.0/sv-SE.xpi) = 504695 +SHA256 (xpi/thunderbird-i18n-14.0/ta-LK.xpi) = b5c72866cfcc11de14a56c7a5a1148d18a5a91a43ad7f5202480feffdf21f41a +SIZE (xpi/thunderbird-i18n-14.0/ta-LK.xpi) = 502497 +SHA256 (xpi/thunderbird-i18n-14.0/tr.xpi) = f91888dfa88b762e759af39d7a6c6fff6ea655d826d90d1db67ba30a77b09ea8 +SIZE (xpi/thunderbird-i18n-14.0/tr.xpi) = 443834 +SHA256 (xpi/thunderbird-i18n-14.0/uk.xpi) = 97c8a688974674358a05c35ed7ed2f8b5d8697a900258880b8900b81444792fd +SIZE (xpi/thunderbird-i18n-14.0/uk.xpi) = 489571 +SHA256 (xpi/thunderbird-i18n-14.0/zh-TW.xpi) = 5be294dee80052dfec68eb31cdc93a256452a3d8a6694de6276966706fecdb41 +SIZE (xpi/thunderbird-i18n-14.0/zh-TW.xpi) = 459396 diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile index 4fd24fd227f5..9695b317d753 100644 --- a/mail/thunderbird/Makefile +++ b/mail/thunderbird/Makefile @@ -6,7 +6,7 @@ # PORTNAME= thunderbird -DISTVERSION= 13.0.1 +DISTVERSION= 14.0 CATEGORIES= mail ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA} MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source @@ -16,38 +16,33 @@ MAINTAINER= gecko@FreeBSD.org COMMENT= Mozilla Thunderbird is standalone mail and news that stands above BUILD_DEPENDS= nspr>=4.9:${PORTSDIR}/devel/nspr \ + nss>=3.13.2:${PORTSDIR}/security/nss \ + sqlite3>=3.7.11:${PORTSDIR}/databases/sqlite3 \ cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \ unzip:${PORTSDIR}/archivers/unzip -LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo \ - event-1.4:${PORTSDIR}/devel/libevent CONFLICTS_BUILD= spidermonkey-* -USE_AUTOTOOLS= autoconf213 +USE_AUTOTOOLS= autoconf213:env USE_GECKO= gecko CONFLICTS= thunderbird-10.* -USE_MOZILLA= -png -nss -dbm -jpeg -xft -MOZ_TOOLKIT= cairo-gtk2 +USE_MOZILLA= # empty MAKE_JOBS_SAFE= yes WANT_GNOME= yes +USE_QT4= # empty +QT_NONSTANDARD= yes ALL_TARGET= default -CONFIGURE_ENV= LOCALBASE=${LOCALBASE} -MAKE_ENV= PTHREAD_LDFLAGS="${PTHREAD_LIBS}" -EXTRA_CFLAGS= -O0 -HAS_CONFIGURE= yes +GNU_CONFIGURE= yes +OBJDIR_BUILD= yes USE_BZIP2= yes USE_GMAKE= yes USE_GL= gl MOZ_PROTOCOLS= http,ftp,file,viewsource,res,data,wyciwyg,websocket -MOZ_GRAPHICS= default,-xbm MOZ_OPTIONS= --program-transform-name='s/thunderbird/${MOZILLA}/' \ - --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \ --enable-single-profile --disable-profilesharing \ - --enable-application=mail --enable-official-branding \ - --disable-updater --disable-necko-wifi \ - --with-system-libevent=${LOCALBASE} + --enable-application=mail --enable-official-branding MOZ_MK_OPTIONS= MOZ_MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1 MOZ_EXPORT= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1 MOZ_PKGCONFIG_FILES= @@ -58,45 +53,38 @@ PORTNAME_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png SYSTEM_PREFS= ${FAKEDIR}/lib/${PORTNAME}/defaults/pref/${PORTNAME}.js MOZ_PIS_SCRIPTS=moz_pis_S50cleanhome -OPTIONS= LIGHTNING "Enable calendar extension" off +OPTIONS_DEFINE= GSTREAMER LIGHTNING +.include "${.CURDIR}/../../www/firefox/Makefile.options" .include <bsd.port.pre.mk> WRKSRC= ${WRKDIR}/comm-release MOZSRC:= ${WRKSRC}/mozilla -.if ${ARCH} == powerpc64 +.if ${ARCH} == amd64 +CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL} +.elif ${ARCH} == powerpc64 .if ${OSVERSION} < 900033 BROKEN= Needs binutils 2.17.50 to build .else -CONFIGURE_ENV+= UNAME_m="powerpc64" +MOZ_EXPORT+= UNAME_m="powerpc64" CFLAGS+= -mminimal-toc .endif .endif -.if ${HAVE_GNOME:Mlibgnomeui}!="" -USE_GNOME+= libgnomeui -MOZ_OPTIONS+= --enable-gnomeui -.else -MOZ_OPTIONS+= --disable-gnomeui -.endif - -.if defined(WITHOUT_DBUS) -MOZ_OPTIONS+= --disable-dbus --disable-libnotify -.else -LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ - notify.4:${PORTSDIR}/devel/libnotify -.endif - .if ${ARCH} == amd64 || ${ARCH} == i386 BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm .endif -.if defined(WITH_LIGHTNING) +.if !empty(CXX:M*clang++*) +CFLAGS+= -Wno-return-type-c-linkage +.endif + +.if ${PORT_OPTIONS:MLIGHTNING} MOZ_OPTIONS+= --enable-calendar MOZ_MK_OPTIONS+= MOZ_CO_PROJECT=calendar LIGHTNING_DIR= share/lightning -XPI_FILE= ${MOZSRC}/dist/xpi-stage/lightning.xpi +XPI_FILE= ${MOZ_OBJDIR}/mozilla/dist/xpi-stage/lightning.xpi XPI_LIBDIR= ${PREFIX}/lib/xpi XPI_ORIG_ID= {e2fda1a4-762b-4020-b5ad-a41df1933103} XPI_ID= lightning@thunderbird.mozilla.org @@ -109,22 +97,8 @@ post-extract: <${FILESDIR}/thunderbird.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop post-patch: - @${GREP} -Flr \"/proc ${MOZSRC}/ipc/chromium/src/base | ${XARGS} ${REINPLACE_CMD} \ - -e 's|/proc/self/fd|/dev/fd|' \ - -e 's|/proc["/]|/compat/linux&|' - @${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \ - ${MOZSRC}/storage/build/Makefile.in \ - ${MOZSRC}/toolkit/library/Makefile.in \ - ${MOZSRC}/db/sqlite3/src/Makefile.in - @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ - ${MOZSRC}/security/manager/ssl/src/Makefile.in \ - ${MOZSRC}/js/src/config/mkdepend/Makefile.in \ - ${MOZSRC}/js/src/config/config.mk - @${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \ - s|-lpthread|${PTHREAD_LIBS}|g ; \ - s|echo aout|echo elf|g ; \ - s|/usr/X11R6|${LOCALBASE}|g' \ - ${MOZSRC}/js/src/configure + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + ${WRKSRC}/mail/app/nsMailApp.cpp pre-configure: (cd ${WRKSRC} && ${AUTOCONF}) @@ -143,7 +117,7 @@ post-install: ${MKDIR} ${PREFIX}/share/applications ${INSTALL_DATA} ${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop ${PREFIX}/share/applications ${LN} -sf ${PORTNAME_ICON_SRC} ${PREFIX}/share/pixmaps/${PORTNAME_ICON} -.if defined(WITH_LIGHTNING) +.if ${PORT_OPTIONS:MLIGHTNING} @${MKDIR} ${XPI_LIBDIR}/${XPI_ID} ${XPI_LIBDIR}/symlinks/thunderbird @(cd ${XPI_LIBDIR}/${XPI_ID}; ${TAR} -xf ${XPI_FILE}) @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${XPI_ID} diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo index 934b6c455acc..603e0620591c 100644 --- a/mail/thunderbird/distinfo +++ b/mail/thunderbird/distinfo @@ -1,2 +1,2 @@ -SHA256 (thunderbird-13.0.1.source.tar.bz2) = 5696620746cf440c327aeedea428d24d513603a651a4edda02ae0072036ac434 -SIZE (thunderbird-13.0.1.source.tar.bz2) = 102705807 +SHA256 (thunderbird-14.0.source.tar.bz2) = 29225e82c1dce9d44d1b81cf0441749ef8fc4168291cc75bcbcfe9b930f10c3a +SIZE (thunderbird-14.0.source.tar.bz2) = 105235591 diff --git a/mail/thunderbird/files/patch-alsapulse b/mail/thunderbird/files/patch-alsapulse new file mode 100644 index 000000000000..7851f7348511 --- /dev/null +++ b/mail/thunderbird/files/patch-alsapulse @@ -0,0 +1,118 @@ +--- mozilla/config/autoconf.mk.in~ ++++ mozilla/config/autoconf.mk.in +@@ -568,8 +568,13 @@ MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CF + MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@ + MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@ + ++MOZ_ALSA = @MOZ_ALSA@ + MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@ + MOZ_ALSA_CFLAGS = @MOZ_ALSA_CFLAGS@ ++ ++MOZ_PULSEAUDIO = @MOZ_PULSEAUDIO@ ++MOZ_PULSEAUDIO_LIBS = @MOZ_PULSEAUDIO_LIBS@ ++MOZ_PULSEAUDIO_CFLAGS = @MOZ_PULSEAUDIO_CFLAGS@ + + GLIB_CFLAGS = @GLIB_CFLAGS@ + GLIB_LIBS = @GLIB_LIBS@ +--- mozilla/configure.in~ ++++ mozilla/configure.in +@@ -5758,17 +5775,47 @@ dnl ==================================== + dnl = Check alsa availability on Linux if using sydneyaudio + dnl ======================================================== + ++MOZ_ARG_ENABLE_BOOL(alsa, ++[ --enable-alsa Enable Alsa support], ++MOZ_ALSA=1, ++MOZ_ALSA= MOZ_ALSA_FORCE=$enableval) ++ + dnl If using sydneyaudio with Linux, ensure that the alsa library is available +-if test -n "$MOZ_SYDNEYAUDIO"; then ++if test -n "$MOZ_SYDNEYAUDIO" -a "$MOZ_ALSA_FORCE" != "no"; then + case "$target_os" in + linux*) ++ MOZ_ALSA=1 ++ ;; ++ esac ++fi ++ ++if test -n "$MOZ_ALSA"; then + PKG_CHECK_MODULES(MOZ_ALSA, alsa, , + [echo "$MOZ_ALSA_PKG_ERRORS" + AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) +- ;; +- esac + fi + ++AC_SUBST(MOZ_ALSA) ++ ++dnl ======================================================== ++dnl = Enable PulseAudio ++dnl ======================================================== ++ ++MOZ_ARG_ENABLE_BOOL(pulseaudio, ++[ --enable-pulseaudio Enable PulseAudio support], ++MOZ_PULSEAUDIO=1, ++MOZ_PULSEAUDIO=) ++ ++if test -n "$MOZ_PULSEAUDIO"; then ++ PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, , ++ [echo "$MOZ_PULSEAUDIO_PKG_ERRORS" ++ AC_MSG_ERROR([pulseaudio audio backend requires libpulse package])]) ++fi ++ ++AC_SUBST(MOZ_PULSEAUDIO_CFLAGS) ++AC_SUBST(MOZ_PULSEAUDIO_LIBS) ++AC_SUBST(MOZ_PULSEAUDIO) ++ + dnl ======================================================== + dnl Permissions System + dnl ======================================================== +--- mozilla/media/libsydneyaudio/src/Makefile.in~ ++++ mozilla/media/libsydneyaudio/src/Makefile.in +@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android) + CSRCS = \ + sydney_audio_android.c \ + $(NULL) +-else ifeq ($(OS_ARCH),Linux) +-CSRCS = \ +- sydney_audio_alsa.c \ +- $(NULL) + endif + + ifeq ($(OS_ARCH),WINNT) +@@ -68,6 +64,18 @@ CSRCS = \ + $(NULL) + endif + ++ifdef MOZ_ALSA ++CSRCS = \ ++ sydney_audio_alsa.c \ ++ $(NULL) ++endif ++ ++ifdef MOZ_PULSEAUDIO ++CSRCS = \ ++ sydney_audio_pulseaudio.c \ ++ $(NULL) ++endif ++ + ifeq ($(OS_ARCH),WINNT) + OS_LIBS += winmm.lib + endif +--- mozilla/toolkit/library/Makefile.in~ ++++ mozilla/toolkit/library/Makefile.in +@@ -375,10 +375,12 @@ endif + + EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib) + +-ifdef MOZ_SYDNEYAUDIO +-ifeq ($(OS_ARCH),Linux) ++ifdef MOZ_ALSA + EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) + endif ++ ++ifdef MOZ_PULSEAUDIO ++EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) + endif + + ifdef HAVE_CLOCK_MONOTONIC diff --git a/mail/thunderbird/files/patch-bug685258 b/mail/thunderbird/files/patch-bug685258 new file mode 100644 index 000000000000..cac425d6adba --- /dev/null +++ b/mail/thunderbird/files/patch-bug685258 @@ -0,0 +1,17 @@ +# HG changeset patch +# User Oleg Romashin <romaxa@gmail.com> +# Parent a2291c212856ad27622416e83c8311b6a33b52f1 +Bug 685258 - Pulse audio backend does not check provided playback and crashes r=derf + +diff --git a/content/media/nsAudioStream.cpp b/content/media/nsAudioStream.cpp +--- mozilla/content/media/nsAudioStream.cpp ++++ mozilla/content/media/nsAudioStream.cpp +@@ -429,7 +429,7 @@ nsresult nsNativeAudioStream::Init(PRInt32 aNumChannels, PRInt32 aRate, SampleFo + mFormat = aFormat; + + if (sa_stream_create_pcm(reinterpret_cast<sa_stream_t**>(&mAudioHandle), +- NULL, ++ "Mozilla", + SA_MODE_WRONLY, + SA_PCM_FORMAT_S16_NE, + aRate, diff --git a/mail/thunderbird/files/patch-bug753046 b/mail/thunderbird/files/patch-bug753046 new file mode 100644 index 000000000000..16b3d832490c --- /dev/null +++ b/mail/thunderbird/files/patch-bug753046 @@ -0,0 +1,1272 @@ +# Bug 753046 - Add support for DragonFly/NetBSD + +$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000 ++++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp +@@ -33,6 +33,8 @@ + #include "nsPluginsDir.h" + #include "nsXULAppAPI.h" + ++#include <unistd.h> ++ + #ifdef MOZ_X11 + # include "mozilla/X11Util.h" + #endif +@@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin + + // TODO: use PluginPRLibrary here + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + mShutdownFunc = + (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown"); + +@@ -1790,7 +1790,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin + PLUGIN_LOG_DEBUG_METHOD; + AssertPluginThread(); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + return true; + #elif defined(OS_WIN) || defined(OS_MACOSX) + *_retval = mGetEntryPointsFunc(&mFunctions); +@@ -1823,7 +1823,7 @@ PluginModuleChild::AnswerNP_Initialize(N + SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/)); + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions); + return true; + #elif defined(OS_WIN) || defined(OS_MACOSX) +$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig 2011-12-20 23:28:14.000000000 +0000 ++++ mozilla/dom/plugins/ipc/PluginModuleChild.h +@@ -340,7 +340,7 @@ private: + + // we get this from the plugin + NP_PLUGINSHUTDOWN mShutdownFunc; +-#ifdef OS_LINUX ++#if defined(OS_LINUX) || defined(OS_BSD) + NP_PLUGINUNIXINIT mInitializeFunc; + #elif defined(OS_WIN) || defined(OS_MACOSX) + NP_PLUGININIT mInitializeFunc; +$NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000 ++++ mozilla/ipc/chromium/Makefile.in +@@ -278,6 +278,34 @@ endif + + endif # } OS_LINUX + ++ifdef OS_BSD # { ++ ++CPPSRCS += \ ++ atomicops_internals_x86_gcc.cc \ ++ file_util_bsd.cc \ ++ process_util_bsd.cc \ ++ time_posix.cc \ ++ $(NULL) ++ ++ifdef MOZ_ENABLE_GTK2 ++CPPSRCS += \ ++ message_pump_glib.cc \ ++ $(NULL) ++endif ++ ++ifdef MOZ_ENABLE_QT ++MOCSRCS = \ ++ moc_message_pump_qt.cc \ ++ $(NULL) ++ ++CPPSRCS += \ ++ $(MOCSRCS) \ ++ message_pump_qt.cc \ ++ $(NULL) ++endif ++ ++endif # } OS_BSD ++ + # libevent + + ifndef MOZ_NATIVE_LIBEVENT # { +$NetBSD: patch-ipc_chromium_chromium-config.mk,v 1.2 2012/03/15 08:30:06 ryoon Exp $ + +--- mozilla/ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100 ++++ mozilla/ipc/chromium/chromium-config.mk 2012-03-11 11:05:40.397182000 +0100 +@@ -56,17 +56,6 @@ + -I$(DEPTH)/ipc/ipdl/_ipdlheaders \ + $(NULL) + +-ifeq ($(OS_ARCH),Darwin) # { +- +-OS_MACOSX = 1 +-OS_POSIX = 1 +- +-DEFINES += \ +- -DOS_MACOSX=1 \ +- -DOS_POSIX=1 \ +- $(NULL) +- +-else # } { + ifeq ($(OS_ARCH),WINNT) # { + OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp) + +@@ -93,13 +82,65 @@ + endif + + else # } { +- +-OS_LINUX = 1 + OS_POSIX = 1 ++DEFINES += -DOS_POSIX=1 ++ ++ifeq ($(OS_ARCH),Darwin) # { ++ ++OS_MACOSX = 1 ++DEFINES += \ ++ -DOS_MACOSX=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),DragonFly) # { ++ ++OS_DRAGONFLY = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_DRAGONFLY=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),FreeBSD) # { ++ ++OS_FREEBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_FREEBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) + ++else # } { ++ifeq ($(OS_ARCH),NetBSD) # { ++ ++OS_NETBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_NETBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),OpenBSD) # { ++ ++OS_OPENBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_OPENBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ ++OS_LINUX = 1 + DEFINES += \ + -DOS_LINUX=1 \ +- -DOS_POSIX=1 \ + $(NULL) + + # NB: to stop gcc warnings about exporting template instantiation +@@ -107,4 +147,8 @@ + + endif # } + endif # } ++endif # } ++endif # } ++endif # } ++endif # } + +$NetBSD: patch-ipc_chromium_src_base_base__paths.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/base_paths.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/base_paths.h +@@ -13,7 +13,7 @@ + #include "base/base_paths_win.h" + #elif defined(OS_MACOSX) + #include "base/base_paths_mac.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #include "base/base_paths_linux.h" + #endif + #include "base/path_service.h" +$NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/debug_util_posix.cc +@@ -5,7 +5,7 @@ + #include "build/build_config.h" + #include "base/debug_util.h" + +-#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__)) ++#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID)) + + #include <errno.h> + #include <fcntl.h> +@@ -17,8 +17,13 @@ + #include <unistd.h> + #if MOZ_HAVE_EXECINFO_H + #include <execinfo.h> +-#include <sys/sysctl.h> + #endif ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) ++#include <sys/user.h> ++#elif defined(OS_FREEBSD) ++#include <sys/proc.h> ++#endif ++#include <sys/sysctl.h> + + #include "base/basictypes.h" + #include "base/eintr_wrapper.h" +@@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u + return false; + } + +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + + // Based on Apple's recommended method as described in + // http://developer.apple.com/qa/qa2004/qa1361.html +@@ -71,7 +76,13 @@ bool DebugUtil::BeingDebugged() { + + // This process is being debugged if the P_TRACED flag is set. + is_set = true; ++#if defined(OS_DRAGONFLY) ++ being_debugged = (info.kp_flags & P_TRACED) != 0; ++#elif defined(OS_FREEBSD) ++ being_debugged = (info.ki_flag & P_TRACED) != 0; ++#else + being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; ++#endif + return being_debugged; + } + +diff --git ipc/chromium/src/base/dir_reader_bsd.h ipc/chromium/src/base/dir_reader_bsd.h +new file mode 100644 +index 0000000..3fc1a87 +--- /dev/null ++++ mozilla/ipc/chromium/src/base/dir_reader_bsd.h +@@ -0,0 +1,108 @@ ++// Copyright (c) 2010 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// derived from dir_reader_linux.h ++ ++#ifndef BASE_DIR_READER_BSD_H_ ++#define BASE_DIR_READER_BSD_H_ ++#pragma once ++ ++#include <dirent.h> ++#include <errno.h> ++#include <fcntl.h> ++#include <stdint.h> ++#include <unistd.h> ++ ++#include "base/logging.h" ++#include "base/eintr_wrapper.h" ++ ++// See the comments in dir_reader_posix.h about this. ++ ++namespace base { ++ ++class DirReaderBSD { ++ public: ++ explicit DirReaderBSD(const char* directory_path) ++#ifdef O_DIRECTORY ++ : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), ++#else ++ : fd_(open(directory_path, O_RDONLY)), ++#endif ++ offset_(0), ++ size_(0) { ++ memset(buf_, 0, sizeof(buf_)); ++ } ++ ++ ~DirReaderBSD() { ++ if (fd_ >= 0) { ++ if (HANDLE_EINTR(close(fd_))) ++ DLOG(ERROR) << "Failed to close directory handle"; ++ } ++ } ++ ++ bool IsValid() const { ++ return fd_ >= 0; ++ } ++ ++ // Move to the next entry returning false if the iteration is complete. ++ bool Next() { ++ if (size_) { ++ struct dirent* dirent = reinterpret_cast<struct dirent*>(&buf_[offset_]); ++ offset_ += dirent->d_reclen; ++ } ++ ++ if (offset_ != size_) ++ return true; ++ ++#ifdef OS_OPENBSD ++ const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_); ++#else ++ const int r = getdents(fd_, buf_, sizeof(buf_)); ++#endif ++ if (r == 0) ++ return false; ++ if (r == -1) { ++#ifdef OS_OPENBSD ++ DLOG(ERROR) << "getdirentries returned an error: " << errno; ++#else ++ DLOG(ERROR) << "getdents returned an error: " << errno; ++#endif ++ return false; ++ } ++ size_ = r; ++ offset_ = 0; ++ return true; ++ } ++ ++ const char* name() const { ++ if (!size_) ++ return NULL; ++ ++ const struct dirent* dirent = ++ reinterpret_cast<const struct dirent*>(&buf_[offset_]); ++ return dirent->d_name; ++ } ++ ++ int fd() const { ++ return fd_; ++ } ++ ++ static bool IsFallback() { ++ return false; ++ } ++ ++ private: ++ const int fd_; ++ char buf_[512]; ++#ifdef OS_OPENBSD ++ off_t *basep_; ++#endif ++ size_t offset_, size_; ++ ++ DISALLOW_COPY_AND_ASSIGN(DirReaderBSD); ++}; ++ ++} // namespace base ++ ++#endif // BASE_DIR_READER_BSD_H_ +diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_reader_posix.h +index 9a34492..62b280c 100644 +--- mozilla/ipc/chromium/src/base/dir_reader_posix.h ++++ mozilla/ipc/chromium/src/base/dir_reader_posix.h +@@ -18,16 +18,20 @@ + // seems worse than falling back to enumerating all file descriptors so we will + // probably never implement this on the Mac. + +-#if defined(OS_LINUX) && !defined(OS_OPENBSD) ++#if defined(OS_LINUX) + #include "base/dir_reader_linux.h" ++#elif defined(OS_BSD) ++#include "base/dir_reader_bsd.h" + #else + #include "base/dir_reader_fallback.h" + #endif + + namespace base { + +-#if defined(OS_LINUX) && !defined(OS_OPENBSD) ++#if defined(OS_LINUX) + typedef DirReaderLinux DirReaderPosix; ++#elif defined(OS_BSD) ++typedef DirReaderBSD DirReaderPosix; + #else + typedef DirReaderFallback DirReaderPosix; + #endif +$NetBSD: patch-ipc_chromium_src_base_file__util.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util.h +@@ -16,8 +16,8 @@ + #include <sys/stat.h> + #elif defined(OS_POSIX) + #include <sys/types.h> +-#include <fts.h> + #include <sys/stat.h> ++#include <fts.h> + #endif + + #include <stdio.h> +$NetBSD: patch-ipc_chromium_src_base_file__util__bsd.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util_bsd.cc.orig 2012-01-07 18:21:18.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util_bsd.cc +@@ -0,0 +1,80 @@ ++// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// this is a derivative of file_util_linux.cc ++ ++#include "base/file_util.h" ++ ++#include <fcntl.h> ++#include <unistd.h> ++ ++#include <string> ++#include <vector> ++ ++#include "base/eintr_wrapper.h" ++#include "base/file_path.h" ++#include "base/string_util.h" ++ ++namespace file_util { ++ ++bool GetTempDir(FilePath* path) { ++ const char* tmp = getenv("TMPDIR"); ++ if (tmp) ++ *path = FilePath(tmp); ++ else ++ *path = FilePath("/tmp"); ++ return true; ++} ++ ++bool GetShmemTempDir(FilePath* path) { ++ return GetTempDir(path); ++} ++ ++bool CopyFile(const FilePath& from_path, const FilePath& to_path) { ++ int infile = open(from_path.value().c_str(), O_RDONLY); ++ if (infile < 0) ++ return false; ++ ++ int outfile = creat(to_path.value().c_str(), 0666); ++ if (outfile < 0) { ++ close(infile); ++ return false; ++ } ++ ++ const size_t kBufferSize = 32768; ++ std::vector<char> buffer(kBufferSize); ++ bool result = true; ++ ++ while (result) { ++ ssize_t bytes_read = HANDLE_EINTR(read(infile, &buffer[0], buffer.size())); ++ if (bytes_read < 0) { ++ result = false; ++ break; ++ } ++ if (bytes_read == 0) ++ break; ++ // Allow for partial writes ++ ssize_t bytes_written_per_read = 0; ++ do { ++ ssize_t bytes_written_partial = HANDLE_EINTR(write( ++ outfile, ++ &buffer[bytes_written_per_read], ++ bytes_read - bytes_written_per_read)); ++ if (bytes_written_partial < 0) { ++ result = false; ++ break; ++ } ++ bytes_written_per_read += bytes_written_partial; ++ } while (bytes_written_per_read < bytes_read); ++ } ++ ++ if (HANDLE_EINTR(close(infile)) < 0) ++ result = false; ++ if (HANDLE_EINTR(close(outfile)) < 0) ++ result = false; ++ ++ return result; ++} ++ ++} // namespace file_util +$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util_posix.cc +@@ -31,7 +31,7 @@ + #include "base/time.h" + + // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine +-#if defined(OS_FREEBSD) || defined(OS_OPENBSD) ++#ifndef OS_LINUX + #define stat64 stat + #endif + +$NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 07:40:33.000000000 +0100 ++++ mozilla/ipc/chromium/src/base/message_loop.cc 2012-02-21 21:24:41.000000000 +0100 +@@ -19,7 +19,7 @@ + #if defined(OS_POSIX) + #include "base/message_pump_libevent.h" + #endif +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #ifdef MOZ_WIDGET_GTK2 + #include "base/message_pump_glib.h" + #endif +@@ -119,7 +119,7 @@ + if (type_ == TYPE_UI) { + #if defined(OS_MACOSX) + pump_ = base::MessagePumpMac::Create(); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + pump_ = new base::MessagePumpForUI(); + #endif // OS_LINUX + } else if (type_ == TYPE_IO) { +$NetBSD: patch-ipc_chromium_src_base_platform__file__posix.cc,v 1.1 2011/07/12 15:12:36 tnn Exp $ + +--- mozilla/ipc/chromium/src/base/platform_file_posix.cc.orig 2011-06-15 21:57:27.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_file_posix.cc +@@ -9,6 +9,7 @@ + #ifdef ANDROID + #include <linux/stat.h> + #endif ++#include <sys/stat.h> /* for S_IRUSR */ + + #include "base/logging.h" + #include "base/string_util.h" +$NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_thread.h +@@ -25,6 +25,8 @@ typedef pthread_t PlatformThreadHandle; + #if defined(OS_LINUX) + #include <unistd.h> + typedef pid_t PlatformThreadId; ++#elif defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined (OS_NETBSD) ++typedef lwpid_t PlatformThreadId; + #elif defined(OS_MACOSX) + #include <mach/mach.h> + typedef mach_port_t PlatformThreadId; +$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc +@@ -9,9 +9,18 @@ + + #if defined(OS_MACOSX) + #include <mach/mach.h> ++#elif defined(OS_NETBSD) ++#include <lwp.h> + #elif defined(OS_LINUX) + #include <sys/syscall.h> + #include <unistd.h> ++#elif defined(OS_DRAGONFLY) ++#include <unistd.h> ++#elif defined(OS_FREEBSD) ++_Pragma("GCC visibility push(default)") ++extern "C" int thr_self(long *); // XXX #include <sys/thr.h> ++_Pragma("GCC visibility pop") ++#include <pthread_np.h> + #endif + + #if defined(OS_MACOSX) +@@ -38,7 +45,19 @@ + // into the kernel. + #if defined(OS_MACOSX) + return mach_thread_self(); +-#elif defined (__OpenBSD__) ++#elif defined(OS_NETBSD) ++ return _lwp_self(); ++#elif defined(OS_DRAGONFLY) ++ return lwp_gettid(); ++#elif defined(OS_FREEBSD) ++# if __FreeBSD_version > 900030 ++ return pthread_getthreadid_np(); ++# else ++ long lwpid; ++ thr_self(&lwpid); ++ return lwpid; ++# endif ++#elif defined(OS_OPENBSD) + // TODO(BSD): find a better thread ID + return (intptr_t)(pthread_self()); + #elif defined(OS_LINUX) +$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100 ++++ mozilla/ipc/chromium/src/base/process_util.h 2012-01-31 13:14:54.000000000 +0100 +@@ -280,6 +280,7 @@ class NamedProcessIterator { + const ProcessEntry* NextProcessEntry(); + + private: ++#if !defined(OS_BSD) + // Determines whether there's another process (regardless of executable) + // left in the list of all processes. Returns true and sets entry_ to + // that process's info if there is one, false otherwise. +@@ -292,18 +292,24 @@ + void InitProcessEntry(ProcessEntry* entry); + + std::wstring executable_name_; ++#endif + + #if defined(OS_WIN) + HANDLE snapshot_; + bool started_iteration_; + #elif defined(OS_LINUX) + DIR *procfs_dir_; ++#elif defined(OS_BSD) ++ std::vector<ProcessEntry> content; ++ size_t nextEntry; + #elif defined(OS_MACOSX) + std::vector<kinfo_proc> kinfo_procs_; + size_t index_of_kinfo_proc_; + #endif ++#if !defined(OS_BSD) + ProcessEntry entry_; + const ProcessFilter* filter_; ++#endif + + DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator); + }; +$NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/process_util_bsd.cc +@@ -0,0 +1,326 @@ ++// Copyright (c) 2008 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// derived from process_util_linux.cc and process_util_mac.cc ++ ++#include "base/process_util.h" ++ ++#include <ctype.h> ++#include <fcntl.h> ++#include <unistd.h> ++#include <string> ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) ++/* DragonFly, as of v3.0.1, and FreeBSD 9.0-RELEASE do not explicitly mark symbols public */ ++#define PRE_SYS_INCLUDE _Pragma("GCC visibility push(default)") ++#define POST_SYS_INCLUDE _Pragma("GCC visibility pop") ++#else ++#define PRE_SYS_INCLUDE ++#define POST_SYS_INCLUDE ++#endif ++PRE_SYS_INCLUDE ++#include <kvm.h> ++POST_SYS_INCLUDE ++#include <sys/sysctl.h> ++#include <sys/types.h> ++#include <sys/wait.h> ++#if defined(OS_DRAGONFLY) ++PRE_SYS_INCLUDE ++#include <sys/user.h> ++POST_SYS_INCLUDE ++#define HAVE_POSIX_SPAWN 1 ++#endif ++#if defined(OS_FREEBSD) ++PRE_SYS_INCLUDE ++#include <sys/user.h> ++POST_SYS_INCLUDE ++#endif ++ ++#include "base/debug_util.h" ++#include "base/eintr_wrapper.h" ++#include "base/file_util.h" ++#include "base/logging.h" ++#include "base/string_tokenizer.h" ++#include "base/string_util.h" ++ ++#if defined(OS_NETBSD) ++#include <sys/param.h> ++#if __NetBSD_Version__ >= 600000000 ++#define HAVE_POSIX_SPAWN 1 ++#endif ++#endif ++ ++#ifdef HAVE_POSIX_SPAWN ++PRE_SYS_INCLUDE ++#include <spawn.h> ++POST_SYS_INCLUDE ++extern "C" char **environ __dso_public; ++#endif ++ ++namespace { ++ ++enum ParsingState { ++ KEY_NAME, ++ KEY_VALUE ++}; ++ ++static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG"); ++ ++} // namespace ++ ++namespace base { ++ ++#ifdef HAVE_POSIX_SPAWN ++ ++void FreeEnvVarsArray(char* array[], int length) ++{ ++ for (int i = 0; i < length; i++) { ++ free(array[i]); ++ } ++ delete[] array; ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ bool wait, ProcessHandle* process_handle) { ++ return LaunchApp(argv, fds_to_remap, environment_map(), ++ wait, process_handle); ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ const environment_map& env_vars_to_set, ++ bool wait, ProcessHandle* process_handle, ++ ProcessArchitecture arch) { ++ bool retval = true; ++ ++ char* argv_copy[argv.size() + 1]; ++ for (size_t i = 0; i < argv.size(); i++) { ++ argv_copy[i] = const_cast<char*>(argv[i].c_str()); ++ } ++ argv_copy[argv.size()] = NULL; ++ ++ // Make sure we don't leak any FDs to the child process by marking all FDs ++ // as close-on-exec. ++ SetAllFDsToCloseOnExec(); ++ ++ // Copy environment to a new char array and add the variables ++ // in env_vars_to_set. ++ // Existing variables are overwritten by env_vars_to_set. ++ int pos = 0; ++ environment_map combined_env_vars = env_vars_to_set; ++ while(environ[pos] != NULL) { ++ std::string varString = environ[pos]; ++ std::string varName = varString.substr(0, varString.find_first_of('=')); ++ std::string varValue = varString.substr(varString.find_first_of('=') + 1); ++ if (combined_env_vars.find(varName) == combined_env_vars.end()) { ++ combined_env_vars[varName] = varValue; ++ } ++ pos++; ++ } ++ int varsLen = combined_env_vars.size() + 1; ++ ++ char** vars = new char*[varsLen]; ++ int i = 0; ++ for (environment_map::const_iterator it = combined_env_vars.begin(); ++ it != combined_env_vars.end(); ++it) { ++ std::string entry(it->first); ++ entry += "="; ++ entry += it->second; ++ vars[i] = strdup(entry.c_str()); ++ i++; ++ } ++ vars[i] = NULL; ++ ++ posix_spawn_file_actions_t file_actions; ++ if (posix_spawn_file_actions_init(&file_actions) != 0) { ++ FreeEnvVarsArray(vars, varsLen); ++ return false; ++ } ++ ++ // Turn fds_to_remap array into a set of dup2 calls. ++ for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin(); ++ it != fds_to_remap.end(); ++ ++it) { ++ int src_fd = it->first; ++ int dest_fd = it->second; ++ ++ if (src_fd == dest_fd) { ++ int flags = fcntl(src_fd, F_GETFD); ++ if (flags != -1) { ++ fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC); ++ } ++ } else { ++ if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) { ++ posix_spawn_file_actions_destroy(&file_actions); ++ FreeEnvVarsArray(vars, varsLen); ++ return false; ++ } ++ } ++ } ++ ++ pid_t pid = 0; ++ int spawn_succeeded = (posix_spawnp(&pid, ++ argv_copy[0], ++ &file_actions, ++ NULL, ++ argv_copy, ++ vars) == 0); ++ ++ FreeEnvVarsArray(vars, varsLen); ++ ++ posix_spawn_file_actions_destroy(&file_actions); ++ ++ bool process_handle_valid = pid > 0; ++ if (!spawn_succeeded || !process_handle_valid) { ++ retval = false; ++ } else { ++ if (wait) ++ HANDLE_EINTR(waitpid(pid, 0, 0)); ++ ++ if (process_handle) ++ *process_handle = pid; ++ } ++ ++ return retval; ++} ++ ++bool LaunchApp(const CommandLine& cl, ++ bool wait, bool start_hidden, ProcessHandle* process_handle) { ++ // TODO(playmobil): Do we need to respect the start_hidden flag? ++ file_handle_mapping_vector no_files; ++ return LaunchApp(cl.argv(), no_files, wait, process_handle); ++} ++ ++#else // no posix_spawn, use fork/exec ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ bool wait, ProcessHandle* process_handle) { ++ return LaunchApp(argv, fds_to_remap, environment_map(), ++ wait, process_handle); ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ const environment_map& env_vars_to_set, ++ bool wait, ProcessHandle* process_handle, ++ ProcessArchitecture arch) { ++ scoped_array<char*> argv_cstr(new char*[argv.size() + 1]); ++ // Illegal to allocate memory after fork and before execvp ++ InjectiveMultimap fd_shuffle1, fd_shuffle2; ++ fd_shuffle1.reserve(fds_to_remap.size()); ++ fd_shuffle2.reserve(fds_to_remap.size()); ++ ++ pid_t pid = fork(); ++ if (pid < 0) ++ return false; ++ ++ if (pid == 0) { ++ for (file_handle_mapping_vector::const_iterator ++ it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) { ++ fd_shuffle1.push_back(InjectionArc(it->first, it->second, false)); ++ fd_shuffle2.push_back(InjectionArc(it->first, it->second, false)); ++ } ++ ++ if (!ShuffleFileDescriptors(&fd_shuffle1)) ++ _exit(127); ++ ++ CloseSuperfluousFds(fd_shuffle2); ++ ++ for (environment_map::const_iterator it = env_vars_to_set.begin(); ++ it != env_vars_to_set.end(); ++it) { ++ if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/)) ++ _exit(127); ++ } ++ ++ for (size_t i = 0; i < argv.size(); i++) ++ argv_cstr[i] = const_cast<char*>(argv[i].c_str()); ++ argv_cstr[argv.size()] = NULL; ++ execvp(argv_cstr[0], argv_cstr.get()); ++ // if we get here, we're in serious trouble and should complain loudly ++ DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0]; ++ exit(127); ++ } else { ++ gProcessLog.print("==> process %d launched child process %d\n", ++ GetCurrentProcId(), pid); ++ if (wait) ++ HANDLE_EINTR(waitpid(pid, 0, 0)); ++ ++ if (process_handle) ++ *process_handle = pid; ++ } ++ ++ return true; ++} ++ ++bool LaunchApp(const CommandLine& cl, ++ bool wait, bool start_hidden, ++ ProcessHandle* process_handle) { ++ file_handle_mapping_vector no_files; ++ return LaunchApp(cl.argv(), no_files, wait, process_handle); ++} ++ ++#endif ++ ++NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name, ++ const ProcessFilter* filter) ++{ ++ int numEntries; ++ kvm_t *kvm; ++ std::string exe(WideToASCII(executable_name)); ++ ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) ++ kvm = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); ++ struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries); ++ if (procs != NULL && numEntries > 0) { ++ for (int i = 0; i < numEntries; i++) { ++# if defined(OS_DRAGONFLY) ++ if (exe != procs[i].kp_comm) continue; ++ if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].kp_pid; ++ e.ppid = procs[i].kp_ppid; ++ strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile); ++ content.push_back(e); ++# elif defined(OS_FREEBSD) ++ if (exe != procs[i].ki_comm) continue; ++ if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].ki_pid; ++ e.ppid = procs[i].ki_ppid; ++ strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile); ++ content.push_back(e); ++# endif ++#else ++ kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL); ++ struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries); ++ if (procs != NULL && numEntries > 0) { ++ for (int i = 0; i < numEntries; i++) { ++ if (exe != procs[i].p_comm) continue; ++ if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].p_pid; ++ e.ppid = procs[i].p_ppid; ++ strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile); ++ content.push_back(e); ++#endif ++ } ++ } ++ nextEntry = 0; ++ kvm_close(kvm); ++} ++ ++NamedProcessIterator::~NamedProcessIterator() { ++} ++ ++const ProcessEntry* NamedProcessIterator::NextProcessEntry() { ++ if (nextEntry >= content.size()) return NULL; ++ return &content[nextEntry++]; ++} ++ ++bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { ++ return false; ++} ++ ++} // namespace base +$NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/process_util_posix.cc +@@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj + #elif defined(OS_MACOSX) + static const rlim_t kSystemDefaultMaxFds = 256; + static const char kFDDir[] = "/dev/fd"; ++#elif defined(OS_BSD) ++ // the getrlimit below should never fail, so whatever .. ++ static const rlim_t kSystemDefaultMaxFds = 1024; ++ // at least /dev/fd will exist ++ static const char kFDDir[] = "/dev/fd"; + #endif + + // Get the maximum number of FDs possible. +@@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj + void SetAllFDsToCloseOnExec() { + #if defined(OS_LINUX) + const char fd_dir[] = "/proc/self/fd"; +-#elif defined(OS_MACOSX) ++#elif defined(OS_MACOSX) || defined(OS_BSD) + const char fd_dir[] = "/dev/fd"; + #endif + ScopedDIR dir_closer(opendir(fd_dir)); +$NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $ + +--- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/sys_info_posix.cc +@@ -18,6 +18,11 @@ + #include <mach/mach_init.h> + #endif + ++#if defined(OS_NETBSD) ++#include <sys/param.h> ++#include <sys/sysctl.h> ++#endif ++ + #include "base/logging.h" + #include "base/string_util.h" + +@@ -26,7 +31,11 @@ namespace base { + int SysInfo::NumberOfProcessors() { + // It seems that sysconf returns the number of "logical" processors on both + // mac and linux. So we get the number of "online logical" processors. ++#ifdef _SC_NPROCESSORS_ONLN + static long res = sysconf(_SC_NPROCESSORS_ONLN); ++#else ++ static long res = 1; ++#endif + if (res == -1) { + NOTREACHED(); + return 1; +@@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory() + } + + return static_cast<int64>(hostinfo.max_mem); ++#elif defined(OS_NETBSD) ++ int mib[2]; ++ int rc; ++ int64_t memSize; ++ size_t len = sizeof(memSize); ++ ++ mib[0] = CTL_HW; ++ mib[1] = HW_PHYSMEM64; ++ rc = sysctl( mib, 2, &memSize, &len, NULL, 0 ); ++ if (-1 != rc) { ++ return memSize; ++ } ++ return 0; ++ + #else + long pages = sysconf(_SC_PHYS_PAGES); + long page_size = sysconf(_SC_PAGE_SIZE); +$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h +@@ -34,7 +34,7 @@ + #include "base/third_party/nspr/prcpucfg_win.h" + #elif defined(__APPLE__) + #include "base/third_party/nspr/prcpucfg_mac.h" +-#elif defined(__linux__) || defined(ANDROID) ++#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) + #include "base/third_party/nspr/prcpucfg_linux.h" + #elif defined(__OpenBSD__) + #include "base/third_party/nspr/prcpucfg_openbsd.h" +$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc +@@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp + LL_ADD(retVal, retVal, temp); + + return retVal; +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_DRAGONFLY) + struct tm exp_tm = {0}; + exp_tm.tm_sec = exploded->tm_sec; + exp_tm.tm_min = exploded->tm_min; +@@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp + result *= kSecondsToMicroseconds; + result += exploded->tm_usec; + return result; ++#elif defined(OS_FREEBSD) || defined(OS_NETBSD) ++ struct tm exp_tm = {0}; ++ exp_tm.tm_sec = exploded->tm_sec; ++ exp_tm.tm_min = exploded->tm_min; ++ exp_tm.tm_hour = exploded->tm_hour; ++ exp_tm.tm_mday = exploded->tm_mday; ++ exp_tm.tm_mon = exploded->tm_month; ++ exp_tm.tm_year = exploded->tm_year - 1900; ++ ++ // time_t is 64bit ++ time_t absolute_time = timegm(&exp_tm); ++ ++ PRTime result = static_cast<PRTime>(absolute_time); ++ result -= exploded->tm_params.tp_gmt_offset + ++ exploded->tm_params.tp_dst_offset; ++ result *= kSecondsToMicroseconds; ++ result += exploded->tm_usec; ++ return result; + #else + #error No PR_ImplodeTime implemented on your platform. + #endif +diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc +index abf2a56..48791f6 100644 +--- mozilla/ipc/chromium/src/base/time_posix.cc ++++ mozilla/ipc/chromium/src/base/time_posix.cc +@@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() { + // With numer and denom = 1 (the expected case), the 64-bit absolute time + // reported in nanoseconds is enough to last nearly 585 years. + +-#elif defined(__OpenBSD__) || defined(OS_POSIX) && \ ++#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \ + defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 + + struct timespec ts; +$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000 ++++ mozilla/ipc/chromium/src/build/build_config.h +@@ -19,17 +19,23 @@ + #define OS_MACOSX 1 + #elif defined(__linux__) || defined(ANDROID) + #define OS_LINUX 1 ++#elif defined(__NetBSD__) ++#define OS_NETBSD 1 ++#elif defined(__DragonFly__) ++#define OS_DRAGONFLY 1 + #elif defined(__OpenBSD__) + #define OS_OPENBSD 1 + #elif defined(_WIN32) + #define OS_WIN 1 ++#elif defined(__FreeBSD__) ++#define OS_FREEBSD 1 + #else + #error Please add support for your platform in build/build_config.h + #endif + + // For access to standard POSIX features, use OS_POSIX instead of a more + // specific macro. +-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD) ++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + #define OS_POSIX 1 + #endif + +diff --git ipc/chromium/src/chrome/common/ipc_channel_posix.cc ipc/chromium/src/chrome/common/ipc_channel_posix.cc +index bd866ee..2ea5b19 100644 +--- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc ++++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc +@@ -7,6 +7,7 @@ + #include <errno.h> + #include <fcntl.h> + #include <stddef.h> ++#include <unistd.h> + #include <sys/types.h> + #include <sys/socket.h> + #include <sys/stat.h> +$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2011/07/11 12:46:14 tnn Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2011-06-15 21:57:27.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h +@@ -92,7 +92,7 @@ class Channel::ChannelImpl : public Mess + }; + + // This is a control message buffer large enough to hold kMaxReadFDs +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_NETBSD) + // TODO(agl): OSX appears to have non-constant CMSG macros! + char input_cmsg_buf_[1024]; + #else +$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h +@@ -195,7 +195,7 @@ + }; + #endif + +-#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) ++#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined(OS_NETBSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) + // There size_t is a synonym for |unsigned long| ... + template <> + struct ParamTraits<size_t> { +@@ -248,7 +248,7 @@ + }; + #endif // defined(OS_MACOSX) + +-#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) ++#if !((defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined(OS_NETBSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) + // int64 is |long int| on 64-bit systems, uint64 is |unsigned long| + template <> + struct ParamTraits<int64> { +$NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/transport_dib.h +@@ -7,7 +7,7 @@ + + #include "base/basictypes.h" + +-#if defined(OS_WIN) || defined(OS_MACOSX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + #include "base/shared_memory.h" + #endif + +@@ -66,7 +66,7 @@ class TransportDIB { + uint32 sequence_num; + }; + typedef HandleAndSequenceNum Id; +-#elif defined(OS_MACOSX) ++#elif defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + typedef base::SharedMemoryHandle Handle; + // On Mac, the inode number of the backing file is used as an id. + typedef base::SharedMemoryId Id; +@@ -108,7 +108,7 @@ class TransportDIB { + + private: + TransportDIB(); +-#if defined(OS_WIN) || defined(OS_MACOSX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + explicit TransportDIB(base::SharedMemoryHandle dib); + base::SharedMemory shared_memory_; + uint32 sequence_num_; +$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoon Exp $ + +--- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/glue/GeckoChildProcessHost.cpp +@@ -430,7 +430,7 @@ + // and passing wstrings from one config to the other is unsafe. So + // we split the logic here. + +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + base::environment_map newEnvVars; + // XPCOM may not be initialized in some subprocesses. We don't want + // to initialize XPCOM just for the directory service, especially +@@ -445,8 +445,8 @@ + if (NS_SUCCEEDED(rv)) { + nsCString path; + greDir->GetNativePath(path); +-# ifdef OS_LINUX +-# ifdef MOZ_WIDGET_ANDROID ++# if defined(OS_LINUX) || defined(OS_BSD) ++# if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD) + path += "/lib"; + # endif // MOZ_WIDGET_ANDROID + const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH"); +@@ -557,7 +557,7 @@ + childArgv.push_back(pidstring); + + #if defined(MOZ_CRASHREPORTER) +-# if defined(OS_LINUX) ++# if defined(OS_LINUX) || defined(OS_BSD) + int childCrashFd, childCrashRemapFd; + if (!CrashReporter::CreateNotificationPipeForChild( + &childCrashFd, &childCrashRemapFd)) +@@ -594,7 +594,7 @@ + #endif + + base::LaunchApp(childArgv, mFileMap, +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + newEnvVars, + #endif + false, &process, arch); +$NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $ + +--- mozilla/toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000 ++++ mozilla/toolkit/library/Makefile.in +@@ -534,6 +538,10 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle + endif + endif + ++ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH))) ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++endif ++ + ifeq ($(OS_ARCH),WINNT) + OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet) + ifdef ACCESSIBILITY diff --git a/mail/thunderbird/files/patch-bugzilla-736961 b/mail/thunderbird/files/patch-bugzilla-736961 deleted file mode 100644 index 2b5a8cc9ae29..000000000000 --- a/mail/thunderbird/files/patch-bugzilla-736961 +++ /dev/null @@ -1,111 +0,0 @@ ---- mozilla/config/rules.mk.orig Wed May 2 05:16:35 2012 -+++ mozilla/config/rules.mk Fri May 11 08:42:50 2012 -@@ -1479,7 +1487,7 @@ $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_ - $(PYTHON_PATH) \ - -I$(topsrcdir)/other-licenses/ply \ - -I$(topsrcdir)/xpcom/idl-parser \ -- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@ -+ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@ - @if test -n "$(findstring $*.h, $(EXPORTS))"; \ - then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi - -@@ -1492,7 +1500,7 @@ $(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(XPIDL_GE - -I$(topsrcdir)/other-licenses/ply \ - -I$(topsrcdir)/xpcom/idl-parser \ - -I$(topsrcdir)/xpcom/typelib/xpt/tools \ -- $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@ -+ $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@ - - # no need to link together if XPIDLSRCS contains only XPIDL_MODULE - ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS))) ---- mozilla/js/src/config/rules.mk.orig Fri May 11 08:42:57 2012 -+++ mozilla/js/src/config/rules.mk Fri May 11 08:43:15 2012 -@@ -1479,7 +1479,7 @@ $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_ - $(PYTHON_PATH) \ - -I$(topsrcdir)/other-licenses/ply \ - -I$(topsrcdir)/xpcom/idl-parser \ -- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@ -+ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@ - @if test -n "$(findstring $*.h, $(EXPORTS))"; \ - then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi - -@@ -1492,7 +1492,7 @@ $(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(XPIDL_GE - -I$(topsrcdir)/other-licenses/ply \ - -I$(topsrcdir)/xpcom/idl-parser \ - -I$(topsrcdir)/xpcom/typelib/xpt/tools \ -- $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@ -+ $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@ - - # no need to link together if XPIDLSRCS contains only XPIDL_MODULE - ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS))) ---- mozilla/js/xpconnect/src/Makefile.in.orig Fri May 11 08:43:27 2012 -+++ mozilla/js/xpconnect/src/Makefile.in Fri May 11 08:44:03 2012 -@@ -151,7 +151,7 @@ dom_quickstubs.cpp: $(srcdir)/dom_quickstubs.qsconf \ - -I$(topsrcdir)/xpcom/idl-parser \ - $(srcdir)/qsgen.py \ - --idlpath=$(DEPTH)/dist/idl \ -- --cachedir=$(DEPTH)/xpcom/idl-parser \ -+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \ - --header-output dom_quickstubs.h \ - --stub-output dom_quickstubs.cpp \ - --makedepend-output $(MDDEPDIR)/dom_qsgen.pp \ -@@ -172,7 +172,7 @@ dombindings_gen.h: $(srcdir)/dombindings.conf \ - -I$(topsrcdir)/xpcom/idl-parser \ - $(srcdir)/dombindingsgen.py \ - --idlpath=$(DEPTH)/dist/idl \ -- --cachedir=$(DEPTH)/xpcom/idl-parser \ -+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \ - --header-output dombindings_gen.h \ - $(srcdir)/dombindings.conf - -@@ -189,7 +189,7 @@ dombindings_gen.cpp: $(srcdir)/dombindings.conf \ - -I$(topsrcdir)/xpcom/idl-parser \ - $(srcdir)/dombindingsgen.py \ - --idlpath=$(DEPTH)/dist/idl \ -- --cachedir=$(DEPTH)/xpcom/idl-parser \ -+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \ - --stub-output dombindings_gen.cpp \ - --makedepend-output $(MDDEPDIR)/dombindingsgen.pp \ - $(srcdir)/dombindings.conf -@@ -208,7 +208,7 @@ DictionaryHelpers.h: $(srcdir)/dictionary_helper_gen.c - -I$(topsrcdir)/xpcom/idl-parser \ - $(srcdir)/dictionary_helper_gen.py \ - -I $(DEPTH)/dist/idl \ -- --cachedir=$(DEPTH)/xpcom/idl-parser \ -+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \ - --header-output DictionaryHelpers.h \ - $(srcdir)/dictionary_helper_gen.conf - -@@ -223,7 +223,7 @@ DictionaryHelpers.cpp: $(srcdir)/dictionary_helper_gen - -I$(topsrcdir)/xpcom/idl-parser \ - $(srcdir)/dictionary_helper_gen.py \ - -I $(DEPTH)/dist/idl \ -- --cachedir=$(DEPTH)/xpcom/idl-parser \ -+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \ - --header-output DictionaryHelpers.h \ - --stub-output DictionaryHelpers.cpp \ - --makedepend-output $(MDDEPDIR)/dictionary_helper_gen.pp \ ---- mozilla/xpcom/idl-parser/Makefile.in.orig Fri May 11 08:44:10 2012 -+++ mozilla/xpcom/idl-parser/Makefile.in Fri May 11 08:44:29 2012 -@@ -61,7 +61,7 @@ export:: $(PARSER_SRCS) $(PLY_PROGS) - $(PYTHON_PATH) \ - -I$(topsrcdir)/other-licenses/ply \ - -I$(topsrcdir)/xpcom/idl-parser \ -- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=. --regen -+ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache --regen - - check:: - $(PYTHON_PATH) \ ---- mozilla/xpcom/typelib/xpidl/Makefile.in.orig Fri May 11 08:44:51 2012 -+++ mozilla/xpcom/typelib/xpidl/Makefile.in Fri May 11 08:45:09 2012 -@@ -48,8 +48,8 @@ SDK_BINARY = \ - $(topsrcdir)/xpcom/idl-parser/xpidl.py \ - $(topsrcdir)/xpcom/idl-parser/header.py \ - $(topsrcdir)/xpcom/idl-parser/typelib.py \ -- $(DEPTH)/xpcom/idl-parser/xpidllex.py \ -- $(DEPTH)/xpcom/idl-parser/xpidlyacc.py \ -+ $(DEPTH)/xpcom/idl-parser/cache/xpidllex.py \ -+ $(DEPTH)/xpcom/idl-parser/cache/xpidlyacc.py \ - $(NULL) - - ifndef MOZ_SYSTEM_PLY diff --git a/mail/thunderbird/files/patch-configure.in b/mail/thunderbird/files/patch-configure.in deleted file mode 100644 index 4e91d33a273a..000000000000 --- a/mail/thunderbird/files/patch-configure.in +++ /dev/null @@ -1,112 +0,0 @@ ---- configure.in.orig 2011-12-19 14:48:06.000000000 +0100 -+++ configure.in 2011-12-19 15:51:19.000000000 +0100 -@@ -1410,7 +1410,7 @@ - CPU_ARCH=sparc - ;; - --x86_64 | ia64) -+amd64 | x86_64 | ia64) - CPU_ARCH="$OS_TEST" - ;; - -@@ -1430,7 +1430,7 @@ - dnl =============================================================== - INTEL_ARCHITECTURE= - case "$OS_TEST" in -- x86_64|i?86) -+ amd64|x86_64|i?86) - INTEL_ARCHITECTURE=1 - esac - -@@ -1753,7 +1753,7 @@ - esac - - case "${host_cpu}" in -- x86_64) -+ amd64 | x86_64) - HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_" - ;; - esac -@@ -2415,6 +2415,9 @@ - x86_64-*) - AC_DEFINE(_AMD64_) - ;; -+ amd64*) -+ AC_DEFINE(_AMD64_) -+ ;; - *) - AC_DEFINE(_CPU_ARCH_NOT_DEFINED) - ;; -@@ -2486,7 +2489,7 @@ - else - DLL_SUFFIX=".so.1.0" - fi -- MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib -Wl,-rpath-link,$(if $(X11BASE),$(X11BASE),/usr/X11R6)/lib' -+ MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib -Wl,-rpath-link,$(if $(X11BASE),$(X11BASE),/usr/local)/lib' - DSO_CFLAGS='' - DSO_PIC_CFLAGS='-fPIC' - DSO_LDOPTS='-shared -fPIC' -@@ -3304,11 +3307,11 @@ - ;; - *) - MOZ_CHECK_PTHREADS(pthreads, -- USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads", -+ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-pthreads", - MOZ_CHECK_PTHREADS(pthread, -- USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread", -+ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-pthread", - MOZ_CHECK_PTHREADS(c_r, -- USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r", -+ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-pthread", - MOZ_CHECK_PTHREADS(c, - USE_PTHREADS=1 - ) -@@ -3383,18 +3386,18 @@ - *-*-freebsd*) - AC_DEFINE(_REENTRANT) - AC_DEFINE(_THREAD_SAFE) -- dnl -pthread links in -lc_r, so don't specify it explicitly. -+ dnl -pthread links in -pthread, so don't specify it explicitly. - if test "$ac_cv_have_dash_pthread" = "yes"; then - _PTHREAD_LDFLAGS="-pthread" - else -- _PTHREAD_LDFLAGS="-lc_r" -+ _PTHREAD_LDFLAGS="-pthread" - fi - ;; - - *-*-openbsd*|*-*-bsdi*) - AC_DEFINE(_REENTRANT) - AC_DEFINE(_THREAD_SAFE) -- dnl -pthread links in -lc_r, so don't specify it explicitly. -+ dnl -pthread links in -pthread, so don't specify it explicitly. - if test "$ac_cv_have_dash_pthread" = "yes"; then - _PTHREAD_LDFLAGS="-pthread" - fi -@@ -3569,7 +3572,7 @@ - ac_cv_func_iconv, - [AC_TRY_LINK([ - #include <stdlib.h> -- #include <iconv.h> -+ #include "/usr/local/include/iconv.h" - ], - [ - iconv_t h = iconv_open("", ""); -@@ -3590,7 +3593,7 @@ - ac_cv_func_const_iconv, - [AC_TRY_COMPILE([ - #include <stdlib.h> -- #include <iconv.h> -+ #include "/usr/local/include/iconv.h" - ], - [ - const char *input = "testing"; -@@ -4383,7 +4386,7 @@ - LDFLAGS=$_SAVE_LDFLAGS - LIBS=$_SAVE_LIBS - --if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then -+if test "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "/usr" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then - ZLIB_CFLAGS="-I${ZLIB_DIR}/include" - ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" - fi diff --git a/mail/thunderbird/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc b/mail/thunderbird/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc deleted file mode 100644 index ffb56ac25100..000000000000 --- a/mail/thunderbird/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- mozilla/ipc/chromium/src/base/atomicops_internals_mutex.cc~ -+++ mozilla/ipc/chromium/src/base/atomicops_internals_mutex.cc -@@ -39,6 +39,7 @@ - * ***** END LICENSE BLOCK ***** */ - - #include "base/atomicops.h" -+#include "base/lock.h" - - namespace base { - namespace subtle { diff --git a/mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_linux.cc b/mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_linux.cc deleted file mode 100644 index d0cc3b14e68b..000000000000 --- a/mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_linux.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/ipc/chromium/src/base/file_util_linux.cc~ -+++ mozilla/ipc/chromium/src/base/file_util_linux.cc -@@ -28,7 +28,7 @@ bool GetShmemTempDir(FilePath* path) { - #ifdef ANDROID - return GetTempDir(path); - #else -- *path = FilePath("/dev/shm"); -+ *path = FilePath("/tmp"); - return true; - #endif - } diff --git a/mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_posix.cc b/mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_posix.cc deleted file mode 100644 index 3c722016e77b..000000000000 --- a/mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/ipc/chromium/src/base/file_util_posix.cc~ -+++ mozilla/ipc/chromium/src/base/file_util_posix.cc -@@ -30,6 +30,8 @@ - #include "base/string_util.h" - #include "base/time.h" - -+#define stat64 stat -+ - namespace file_util { - - #if defined(GOOGLE_CHROME_BUILD) diff --git a/mail/thunderbird/files/patch-ipc-chromium-src-base-platform_file_posix.cc b/mail/thunderbird/files/patch-ipc-chromium-src-base-platform_file_posix.cc deleted file mode 100644 index 14e333ca339b..000000000000 --- a/mail/thunderbird/files/patch-ipc-chromium-src-base-platform_file_posix.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- mozilla/ipc/chromium/src/base/platform_file_posix.cc~ -+++ mozilla/ipc/chromium/src/base/platform_file_posix.cc -@@ -9,6 +9,7 @@ - #ifdef ANDROID - #include <linux/stat.h> - #endif -+#include <sys/stat.h> - - #include "base/logging.h" - #include "base/string_util.h" diff --git a/mail/thunderbird/files/patch-ipc-chromium-src-base-platform_thread_posix.cc b/mail/thunderbird/files/patch-ipc-chromium-src-base-platform_thread_posix.cc deleted file mode 100644 index 3445b281bc48..000000000000 --- a/mail/thunderbird/files/patch-ipc-chromium-src-base-platform_thread_posix.cc +++ /dev/null @@ -1,12 +0,0 @@ ---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2011-04-27 09:34:28.000000000 +0200 -+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc 2011-04-27 19:47:36.344446266 +0200 -@@ -34,7 +33,8 @@ - #if defined(OS_MACOSX) - return mach_thread_self(); - #elif defined(OS_LINUX) -- return syscall(__NR_gettid); -+ // TODO(BSD): find a better thread ID -+ return reinterpret_cast<int64>(pthread_self()); - #endif - } - diff --git a/mail/thunderbird/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h b/mail/thunderbird/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h deleted file mode 100644 index ca7b24fa4860..000000000000 --- a/mail/thunderbird/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h~ -+++ mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h -@@ -34,7 +34,7 @@ - #include "base/third_party/nspr/prcpucfg_win.h" - #elif defined(__APPLE__) - #include "base/third_party/nspr/prcpucfg_mac.h" --#elif defined(__linux__) || defined(ANDROID) -+#elif defined(__FreeBSD__) || defined(ANDROID) - #include "base/third_party/nspr/prcpucfg_linux.h" - #else - #error Provide a prcpucfg.h appropriate for your platform diff --git a/mail/thunderbird/files/patch-ipc-chromium-src-build-build_config.h b/mail/thunderbird/files/patch-ipc-chromium-src-build-build_config.h deleted file mode 100644 index e7540d38eceb..000000000000 --- a/mail/thunderbird/files/patch-ipc-chromium-src-build-build_config.h +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/ipc/chromium/src/build/build_config.h~ -+++ mozilla/ipc/chromium/src/build/build_config.h -@@ -17,7 +17,7 @@ - // A set of macros to use for platform detection. - #if defined(__APPLE__) - #define OS_MACOSX 1 --#elif defined(__linux__) || defined(ANDROID) -+#elif defined(__FreeBSD__) || defined(ANDROID) - #define OS_LINUX 1 - #elif defined(_WIN32) - #define OS_WIN 1 diff --git a/mail/thunderbird/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in b/mail/thunderbird/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in new file mode 100644 index 000000000000..4ec8205074ee --- /dev/null +++ b/mail/thunderbird/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in @@ -0,0 +1,12 @@ +--- ldap/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in~ ++++ ldap/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in +@@ -188,6 +188,9 @@ endif + + OBJDEST = $(OBJDIR_NAME) + ++# accept -pthread with MOZ_NATIVE_NSS ++LINK_DLL = $(CC_FOR_LINK) -shared -o $@ $(OBJS) $(EXTRA_DLL_LIBS) ++ + ########################################################################### + + ifeq ($(USE_DLL_EXPORTS_FILE), 1) diff --git a/mail/thunderbird/files/patch-mail-app-Makefile.in b/mail/thunderbird/files/patch-mail-app-Makefile.in deleted file mode 100644 index 237c8147bd27..000000000000 --- a/mail/thunderbird/files/patch-mail-app-Makefile.in +++ /dev/null @@ -1,254 +0,0 @@ ---- mail/app/Makefile.in 2012-06-01 19:11:49.000000000 +0200 -+++ /usr/ports/mail/thunderbird/work/comm-release/mail/app/Makefile.in 2012-04-28 21:31:30.000000000 +0200 -@@ -47,6 +47,13 @@ - GRE_MILESTONE = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone) - GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID) - -+DEFINES += \ -+ -DTHUNDERBIRD_ICO=\"$(DIST)/branding/thunderbird.ico\" \ -+ -DAB_CD=$(AB_CD) \ -+ -DGRE_MILESTONE=$(GRE_MILESTONE) \ -+ -DGRE_BUILDID=$(GRE_BUILDID) \ -+ $(NULL) -+ - MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null)) - ifdef MOZ_SOURCE_STAMP - DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)" -@@ -58,30 +65,26 @@ - endif - - ifdef MOZILLA_OFFICIAL --DEFINES += -DMOZILLA_OFFICIAL -+DEFINES += -DOFFICIAL_BUILD=1 - endif - - DIRS = profile - -+GARBAGE += \ -+ $(FINAL_TARGET)/license.html \ -+ $(NULL) -+ - PREF_JS_EXPORTS = \ - $(srcdir)/profile/all-thunderbird.js \ - $(srcdir)/profile/channel-prefs.js \ - $(NULL) - --DEFINES += \ -- -DAB_CD=$(AB_CD) \ -- -DAPP_VERSION="$(MOZ_APP_VERSION)" \ -- -DTHUNDERBIRD_ICO=\"$(DIST)/branding/thunderbird.ico\" \ -- -DGRE_MILESTONE=$(GRE_MILESTONE) \ -- -DGRE_BUILDID=$(GRE_BUILDID) \ -- $(NULL) -- --ifdef LIBXUL_SDK --include $(topsrcdir)/config/rules.mk -+ifneq (,$(filter OS2 Darwin WINNT,$(OS_ARCH))) -+PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX) - else --# Build a binary bootstrapping with XRE_main -+PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX) -+endif - --PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX) - - CPPSRCS = nsMailApp.cpp - -@@ -96,13 +99,21 @@ - DEFINES += -DXPCOM_GLUE - STL_FLAGS= - -+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -+TK_LIBS := -framework Cocoa $(TK_LIBS) -+endif -+ - LIBS += \ - $(EXTRA_DSO_LIBS) \ - $(XPCOM_STANDALONE_GLUE_LDOPTS) \ - $(NULL) - --ifdef MOZ_LINKER --LIBS += $(ZLIB_LIBS) -+ifdef MOZ_JPROF -+LIBS += -ljprof -+endif -+ -+ifdef MOZ_ENABLE_DBUS -+LIBS += $(MOZ_DBUS_GLIB_LIBS) - endif - - ifndef MOZ_WINCONSOLE -@@ -136,6 +147,8 @@ - - GARBAGE += write-message.ico address-book.ico - -+OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool) -+OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32) - RCINCLUDE = splash.rc - ifndef GNU_CC - RCFLAGS += -DMOZ_THUNDERBIRD -I$(srcdir) -@@ -147,11 +160,25 @@ - ifeq ($(OS_ARCH),OS2) - RESFILE=splashos2.res - RCFLAGS += -DMOZ_THUNDERBIRD -+ifdef DEBUG -+RCFLAGS += -DDEBUG -+endif - RCFLAGS += -DTHUNDERBIRD_ICO=\"$(DIST)/branding/thunderbird.ico\" - endif - - include $(topsrcdir)/config/rules.mk - -+ifdef MOZILLA_OFFICIAL -+DEFINES += -DMOZILLA_OFFICIAL -+endif -+ -+APP_UA_NAME = $(shell echo $(MOZ_APP_DISPLAYNAME) | sed -e's/[^A-Za-z]//g') -+DEFINES += -DAPP_VERSION="$(MOZ_APP_VERSION)" -DAPP_UA_NAME="$(APP_UA_NAME)" -+ -+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -+LIBS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon -+endif -+ - ifeq ($(OS_ARCH),WINNT) - # - # Control the default heap size. -@@ -165,22 +192,9 @@ - # - ifndef GNU_CC - LDFLAGS += /HEAP:0x40000 --ifeq ($(OS_TEST),x86_64) --# set stack to 2MB on x64 build. See bug 582910 --LDFLAGS += -STACK:2097152 --endif - endif - endif - --ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH))) --libs:: -- cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX) -- --GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, all.js all-thunderbird.js channel-prefs.js mailnews.js) --endif # ! OS 2 or WinNT -- --endif # LIBXUL_SDK -- - ifneq (,$(filter windows os2,$(MOZ_WIDGET_TOOLKIT))) - ICON_SUFFIX=.ico - -@@ -219,10 +233,36 @@ - $(SYSINSTALL) $(IFLAGS1) $(DIST)/branding/default* $(DESTDIR)$(mozappdir)/chrome/icons/default - endif - -+ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH))) -+ifneq (,$(filter-out Darwin,$(OS_ARCH))) -+$(MOZ_APP_NAME):: $(MOZILLA_DIR)/build/unix/mozilla.in $(GLOBAL_DEPS) $(DEPTH)/config/autoconf.mk -+ cat $< | sed -e "s|%MOZAPPDIR%|$(installdir)|" \ -+ -e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" > $@ -+ chmod +x $@ -+ -+libs:: $(MOZ_APP_NAME) -+ $(INSTALL) $< $(DIST)/bin -+ -+install:: $(MOZ_APP_NAME) -+ $(SYSINSTALL) $< $(DESTDIR)$(bindir) -+ -+GARBAGE += $(MOZ_APP_NAME) -+else -+libs:: -+ cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX) -+ -+endif # ! Mac -+GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, all.js all-thunderbird.js channel-prefs.js mailnews.js) -+endif # ! OS 2 or WinNT -+ -+ifeq ($(MOZ_WIDGET_TOOLKIT),photon) -+LIBS += -lphexlib -+endif -+ - libs:: $(srcdir)/profile/prefs.js - $(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/defaults/profile - --libs:: $(srcdir)/blocklist.xml -+libs:: blocklist.xml - $(INSTALL) $(IFLAGS1) $^ $(DIST)/bin - - ifdef ENABLE_TESTS -@@ -239,6 +279,8 @@ - - ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) - -+AB := $(firstword $(subst -, ,$(AB_CD))) -+ - MAC_APP_NAME = $(MOZ_APP_DISPLAYNAME) - - ifdef MOZ_DEBUG -@@ -247,55 +289,26 @@ - - LOWER_MAC_APP_NAME = $(shell echo $(MAC_APP_NAME) | tr '[A-Z]' '[a-z]') - --AB_CD = $(MOZ_UI_LOCALE) -- --AB := $(firstword $(subst -, ,$(AB_CD))) -- --clean clobber repackage:: -- $(RM) -r $(DIST)/$(MOZ_MACBUNDLE_NAME) -- --ifdef LIBXUL_SDK --APPFILES = Resources --else --APPFILES = MacOS --endif -- --libs repackage:: $(PROGRAM) -- $(MKDIR) -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS -- rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(MOZ_MACBUNDLE_NAME) --exclude English.lproj -- $(MKDIR) -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj -- rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj -+libs:: $(PROGRAM) -+ mkdir -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS -+ rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(MOZ_MACBUNDLE_NAME) --exclude English.lproj -+ mkdir -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj -+ rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj - sed -e "s/%APP_VERSION%/$(MOZ_APP_VERSION)/" -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" -e "s/%LOWER_MAC_APP_NAME%/$(LOWER_MAC_APP_NAME)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Info.plist - sed -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj/InfoPlist.strings -- rsync -a $(DIST)/bin/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/$(APPFILES) --ifdef LIBXUL_SDK -- cp $(LIBXUL_DIST)/bin/$(XR_STUB_NAME) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/thunderbird --else -- $(RM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(PROGRAM) -+ rsync -a $(DIST)/bin/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS -+ rm -f $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(PROGRAM) - rsync -aL $(PROGRAM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS --endif -- $(MKDIR) -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Library/Spotlight -+ mkdir -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Library/Spotlight - rsync -a --copy-unsafe-links $(DIST)/package/Thunderbird.mdimporter $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Library/Spotlight - cp -RL $(DIST)/branding/thunderbird.icns $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/thunderbird.icns - printf APPLMOZM > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/PkgInfo --else --ifdef LIBXUL_SDK --libs:: -- cp $(LIBXUL_DIST)/bin/$(XULRUNNER_STUB_NAME)$(BIN_SUFFIX) $(DIST)/bin/thunderbird$(BIN_SUFFIX) --endif --endif -+# remove CVS dirs from packaged app -+ find $(DIST)/$(MOZ_MACBUNDLE_NAME) -type d -name "CVS" -prune -exec rm -rf {} \; - --ifdef LIBXUL_SDK --ifndef SKIP_COPY_XULRUNNER --libs:: --ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -- rsync -a --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Frameworks --else -- $(NSINSTALL) -D $(DIST)/bin/xulrunner -- (cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -) --endif # cocoa --endif # SKIP_COPY_XULRUNNER --endif # LIBXUL_SDK -+clean clobber:: -+ rm -rf $(DIST)/$(MOZ_MACBUNDLE_NAME) -+endif - - # Note that anything you do to dist/ down here isn't going to make it into the - # Mac build, since it's already been copied over to the .app, above. diff --git a/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp b/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp new file mode 100644 index 000000000000..0d17050c939c --- /dev/null +++ b/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp @@ -0,0 +1,10 @@ +--- mail/app/nsMailApp.cpp~ ++++ mail/app/nsMailApp.cpp +@@ -154,6 +154,7 @@ int main(int argc, char* argv[]) + TriggerQuirks(); + #endif + ++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko19:%%LOCALBASE%%/lib/npapi/symlinks/thunderbird", 0); + nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); + if (NS_FAILED(rv)) { + Output("Couldn't calculate the application directory.\n"); diff --git a/mail/thunderbird/files/patch-mail-components-Makefile.in b/mail/thunderbird/files/patch-mail-components-Makefile.in new file mode 100644 index 000000000000..d3e2e8ff4433 --- /dev/null +++ b/mail/thunderbird/files/patch-mail-components-Makefile.in @@ -0,0 +1,11 @@ +--- mail/components/Makefile.in~ ++++ mail/components/Makefile.in +@@ -46,7 +46,7 @@ include $(DEPTH)/config/autoconf.mk + # least one module from search/ on all platforms + DIRS = compose cloudfile preferences addrbook migration activity search about-support wintaskbar newmailaccount im + +-ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT))) ++ifneq (,$(filter windows gtk2 cocoa qt, $(MOZ_WIDGET_TOOLKIT))) + DIRS += shell + endif + diff --git a/mail/thunderbird/files/patch-mail-components-build-Makefile.in b/mail/thunderbird/files/patch-mail-components-build-Makefile.in new file mode 100644 index 000000000000..af94e2c0bba3 --- /dev/null +++ b/mail/thunderbird/files/patch-mail-components-build-Makefile.in @@ -0,0 +1,11 @@ +--- mail/components/build/Makefile.in~ ++++ mail/components/build/Makefile.in +@@ -78,7 +78,7 @@ SHARED_LIBRARY_LIBS = \ + ../migration/src/$(LIB_PREFIX)profilemigration_s.$(LIB_SUFFIX) \ + $(NULL) + +-ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT))) ++ifneq (,$(filter windows cocoa gtk2 qt, $(MOZ_WIDGET_TOOLKIT))) + SHARED_LIBRARY_LIBS += ../shell/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX) + endif + diff --git a/mail/thunderbird/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp b/mail/thunderbird/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp new file mode 100644 index 000000000000..9bae143f2e26 --- /dev/null +++ b/mail/thunderbird/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp @@ -0,0 +1,20 @@ +--- mailnews/addrbook/src/nsDirPrefs.cpp~ ++++ mailnews/addrbook/src/nsDirPrefs.cpp +@@ -375,7 +375,7 @@ static bool DIR_SetServerPosition(nsVoid + DIR_Server *s=nsnull; + + switch (position) { +- case DIR_POS_APPEND: ++ case (PRInt32)DIR_POS_APPEND: + /* Do nothing if the request is to append a server that is already + * in the list. + */ +@@ -401,7 +401,7 @@ static bool DIR_SetServerPosition(nsVoid + wholeList->AppendElement(server); + break; + +- case DIR_POS_DELETE: ++ case (PRInt32)DIR_POS_DELETE: + /* Remove the prefs corresponding to the given server. If the prefName + * value is nsnull, the server has never been saved and there are no + * prefs to remove. diff --git a/mail/thunderbird/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp b/mail/thunderbird/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp new file mode 100644 index 000000000000..b3a6df4d2c90 --- /dev/null +++ b/mail/thunderbird/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp @@ -0,0 +1,29 @@ +--- mailnews/compose/src/nsSmtpProtocol.cpp~ ++++ mailnews/compose/src/nsSmtpProtocol.cpp +@@ -127,16 +127,16 @@ nsresult nsExplainErrorDetails(nsISmtpUr + + switch (code) + { +- case NS_ERROR_SMTP_SERVER_ERROR: +- case NS_ERROR_TCP_READ_ERROR: +- case NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED: +- case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1: +- case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2: +- case NS_ERROR_SENDING_FROM_COMMAND: +- case NS_ERROR_SENDING_RCPT_COMMAND: +- case NS_ERROR_SENDING_DATA_COMMAND: +- case NS_ERROR_SENDING_MESSAGE: +- case NS_ERROR_SMTP_GREETING: ++ case (int)NS_ERROR_SMTP_SERVER_ERROR: ++ case (int)NS_ERROR_TCP_READ_ERROR: ++ case (int)NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED: ++ case (int)NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1: ++ case (int)NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2: ++ case (int)NS_ERROR_SENDING_FROM_COMMAND: ++ case (int)NS_ERROR_SENDING_RCPT_COMMAND: ++ case (int)NS_ERROR_SENDING_DATA_COMMAND: ++ case (int)NS_ERROR_SENDING_MESSAGE: ++ case (int)NS_ERROR_SMTP_GREETING: + bundle->GetStringFromID(NS_ERROR_GET_CODE(code), getter_Copies(eMsg)); + msg = nsTextFormatter::vsmprintf(eMsg.get(), args); + break; diff --git a/mail/thunderbird/files/patch-mozilla-build-autoconf-config.sub b/mail/thunderbird/files/patch-mozilla-build-autoconf-config.sub deleted file mode 100644 index 12a704ade44b..000000000000 --- a/mail/thunderbird/files/patch-mozilla-build-autoconf-config.sub +++ /dev/null @@ -1,12 +0,0 @@ ---- mozilla/build/autoconf/config.sub.orig 2010-01-05 12:26:13.000000000 +0100 -+++ mozilla/build/autoconf/config.sub 2010-01-05 12:26:46.000000000 +0100 -@@ -403,9 +403,6 @@ - amd64) - basic_machine=x86_64-pc - ;; -- amd64-*) -- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; - amdahl) - basic_machine=580-amdahl - os=-sysv diff --git a/mail/thunderbird/files/patch-mozilla-configure.in b/mail/thunderbird/files/patch-mozilla-configure.in index 7e61ff7867c7..ce91593e1ed6 100644 --- a/mail/thunderbird/files/patch-mozilla-configure.in +++ b/mail/thunderbird/files/patch-mozilla-configure.in @@ -1,32 +1,28 @@ --- mozilla/configure.in.orig 2012-05-23 20:56:34.000000000 +0200 +++ mozilla/configure.in 2012-05-27 18:18:25.000000000 +0200 -@@ -1517,7 +1517,7 @@ - CPU_ARCH=sparc - ;; - --x86_64 | ia64) -+amd64 | x86_64 | ia64) - CPU_ARCH="$OS_TEST" - ;; - -@@ -1539,7 +1539,7 @@ - dnl =============================================================== - INTEL_ARCHITECTURE= - case "$OS_TEST" in -- x86_64|i?86) -+ amd64|x86_64|i?86) - INTEL_ARCHITECTURE=1 - esac - -@@ -4580,7 +4580,7 @@ +@@ -4230,6 +4233,9 @@ + if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then + MOZ_NATIVE_LIBEVENT= + else ++PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, ++ [MOZ_NATIVE_LIBEVENT=1 ++ MOZ_LIBEVENT_INCLUDES="$MOZ_LIBEVENT_CFLAGS"], [ + if test "${LIBEVENT_DIR}" = "yes"; then + LIBEVENT_DIR=/usr + fi +@@ -4242,10 +4248,11 @@ else + AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) + AC_CHECK_LIB(event, event_init, + [MOZ_NATIVE_LIBEVENT=1 +- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" ++ MOZ_LIBEVENT_INCLUDES="-I${LIBEVENT_DIR}/include" + MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], + [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) + fi ++]) + CFLAGS=$_SAVE_CFLAGS LDFLAGS=$_SAVE_LDFLAGS LIBS=$_SAVE_LIBS - --if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then -+if test "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "/usr" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then - ZLIB_CFLAGS="-I${ZLIB_DIR}/include" - ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" - fi @@ -5903,6 +5903,14 @@ VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" VPX_X86_ASM=1 @@ -35,7 +31,7 @@ + VPX_ASFLAGS="-f elf32 -rnasm -pnasm" + VPX_X86_ASM=1 + ;; -+ FreeBSD:amd64) ++ FreeBSD:x86_64) + VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" + VPX_X86_ASM=1 + ;; @@ -50,7 +46,7 @@ + LIBJPEG_TURBO_ASFLAGS="-f elf32 -rnasm -pnasm -DPIC -DELF" + LIBJPEG_TURBO_X86_ASM=1 + ;; -+ FreeBSD:amd64) ++ FreeBSD:x86_64) + LIBJPEG_TURBO_ASFLAGS="-f elf64 -rnasm -pnasm -D__x86_64__ -DPIC -DELF" + LIBJPEG_TURBO_X64_ASM=1 + ;; diff --git a/mail/thunderbird/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp b/mail/thunderbird/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp new file mode 100644 index 000000000000..fe7e4c54e1e7 --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp @@ -0,0 +1,76 @@ +commit f0a73aa +Author: Paul Adenot <paul@paul.cx> +Date: Thu Jun 21 20:44:39 2012 -0400 + + Bug 761419 - Build failure in content/media/gstreamer/nsGStreamerReader.cpp when using clang r=kinetik +--- + content/media/gstreamer/nsGStreamerReader.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git content/media/gstreamer/nsGStreamerReader.cpp content/media/gstreamer/nsGStreamerReader.cpp +index 06a09b5..c48f92e 100644 +--- mozilla/content/media/gstreamer/nsGStreamerReader.cpp ++++ mozilla/content/media/gstreamer/nsGStreamerReader.cpp +@@ -191,7 +191,7 @@ nsresult nsGStreamerReader::ReadMetadata(nsVideoInfo* aInfo) + * stream but that are otherwise decodeable. + */ + guint flags[3] = {GST_PLAY_FLAG_VIDEO|GST_PLAY_FLAG_AUDIO, +- ~GST_PLAY_FLAG_AUDIO, ~GST_PLAY_FLAG_VIDEO}; ++ static_cast<guint>(~GST_PLAY_FLAG_AUDIO), static_cast<guint>(~GST_PLAY_FLAG_VIDEO)}; + guint default_flags, current_flags; + g_object_get(mPlayBin, "flags", &default_flags, NULL); + +commit 667daed +Author: Stephen Moehle <stephen.moehle@gmail.com> +Date: Tue Jun 5 11:32:36 2012 +1200 + + Bug 760899 - Fix debug builds with gstreamer enabled - r=kinetik + + --HG-- + extra : rebase_source : 22598bc470d35d94991ea9f1b14df11ba19a461a +--- + content/media/gstreamer/nsGStreamerReader.cpp | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git content/media/gstreamer/nsGStreamerReader.cpp content/media/gstreamer/nsGStreamerReader.cpp +index 6a50e09..164fb2e 100644 +--- mozilla/content/media/gstreamer/nsGStreamerReader.cpp ++++ mozilla/content/media/gstreamer/nsGStreamerReader.cpp +@@ -278,7 +278,7 @@ nsresult nsGStreamerReader::ReadMetadata(nsVideoInfo* aInfo) + if (gst_element_query_duration(GST_ELEMENT(mPlayBin), + &format, &duration) && format == GST_FORMAT_TIME) { + ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor()); +- LOG(PR_LOG_DEBUG, ("returning duration %"GST_TIME_FORMAT, ++ LOG(PR_LOG_DEBUG, ("returning duration %" GST_TIME_FORMAT, + GST_TIME_ARGS (duration))); + duration = GST_TIME_AS_USECONDS (duration); + mDecoder->GetStateMachine()->SetDuration(duration); +@@ -422,8 +422,8 @@ bool nsGStreamerReader::DecodeVideoFrame(bool &aKeyFrameSkip, + nextTimestamp += gst_util_uint64_scale(GST_USECOND, fpsNum, fpsDen); + + if (timestamp < aTimeThreshold) { +- LOG(PR_LOG_DEBUG, ("skipping frame %"GST_TIME_FORMAT +- " threshold %"GST_TIME_FORMAT, ++ LOG(PR_LOG_DEBUG, ("skipping frame %" GST_TIME_FORMAT ++ " threshold %" GST_TIME_FORMAT, + GST_TIME_ARGS(timestamp), GST_TIME_ARGS(aTimeThreshold))); + gst_buffer_unref(buffer); + buffer = NULL; +@@ -489,7 +489,7 @@ nsresult nsGStreamerReader::Seek(PRInt64 aTarget, + NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread."); + + gint64 seekPos = aTarget * GST_USECOND; +- LOG(PR_LOG_DEBUG, ("%p About to seek to %"GST_TIME_FORMAT, ++ LOG(PR_LOG_DEBUG, ("%p About to seek to %" GST_TIME_FORMAT, + mDecoder, GST_TIME_ARGS(seekPos))); + + if (!gst_element_seek_simple(mPlayBin, GST_FORMAT_TIME, +@@ -592,7 +592,7 @@ PRInt64 nsGStreamerReader::QueryDuration() + if (gst_element_query_duration(GST_ELEMENT(mPlayBin), + &format, &duration)) { + if (format == GST_FORMAT_TIME) { +- LOG(PR_LOG_DEBUG, ("pipeline duration %"GST_TIME_FORMAT, ++ LOG(PR_LOG_DEBUG, ("pipeline duration %" GST_TIME_FORMAT, + GST_TIME_ARGS (duration))); + duration = GST_TIME_AS_USECONDS (duration); + } diff --git a/mail/thunderbird/files/patch-mozilla-db-sqlite3-src-Makefile.in b/mail/thunderbird/files/patch-mozilla-db-sqlite3-src-Makefile.in deleted file mode 100644 index 24a7d6206604..000000000000 --- a/mail/thunderbird/files/patch-mozilla-db-sqlite3-src-Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/db/sqlite3/src/Makefile.in.orig 2008-06-19 11:03:17.000000000 -0500 -+++ mozilla/db/sqlite3/src/Makefile.in 2008-06-19 11:04:15.000000000 -0500 -@@ -45,6 +45,8 @@ - - include $(DEPTH)/config/autoconf.mk - -+OS_CFLAGS = -I../../../dist/include/sqlite3 -+OS_LIBS = %%PTHREAD_LIBS%% - MODULE = sqlite3 - LIBRARY_NAME = sqlite3 - FORCE_SHARED_LIB = 1 diff --git a/mail/thunderbird/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp b/mail/thunderbird/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp new file mode 100644 index 000000000000..f088ed439b95 --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp @@ -0,0 +1,11 @@ +--- mozilla/dom/plugins/ipc/PluginMessageUtils.cpp~ ++++ mozilla/dom/plugins/ipc/PluginMessageUtils.cpp +@@ -94,7 +94,7 @@ ReplaceAll(const string& haystack, const + i += with.length(); + } + +- return munged; ++ return munged.c_str(); + } + #endif + diff --git a/mail/thunderbird/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc b/mail/thunderbird/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc new file mode 100644 index 000000000000..c8e84ca6768a --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc @@ -0,0 +1,11 @@ +--- mozilla/gfx/harfbuzz/src/hb-ot-layout.cc.orig 2012-06-24 22:14:46.463741874 -0400 ++++ mozilla/gfx/harfbuzz/src/hb-ot-layout.cc 2012-06-24 22:15:06.784770042 -0400 +@@ -540,4 +540,8 @@ + GPOS::position_finish (buffer); + } + ++template int SortedArrayOf<Record<LangSys> >::search<unsigned int>(unsigned int const &) const; ++template int SortedArrayOf<Record<Script> >::search<unsigned int>(unsigned int const &) const; ++template int SortedArrayOf<IntType<unsigned short> >::search<unsigned int>(unsigned int const &) const; ++template int SortedArrayOf<RangeRecord>::search<unsigned int>(unsigned int const &) const; + diff --git a/mail/thunderbird/files/patch-mozilla-gfx-qcms-Makefile.in b/mail/thunderbird/files/patch-mozilla-gfx-qcms-Makefile.in deleted file mode 100644 index bad2cf563256..000000000000 --- a/mail/thunderbird/files/patch-mozilla-gfx-qcms-Makefile.in +++ /dev/null @@ -1,14 +0,0 @@ ---- mozilla/gfx/qcms/Makefile.in.orig 2010-11-25 20:10:32.000000000 +0100 -+++ mozilla/gfx/qcms/Makefile.in 2010-11-25 20:10:06.000000000 +0100 -@@ -44,6 +44,11 @@ - endif - endif - endif -+ifeq ($(OS_TEST),amd64) -+ CSRCS += transform-sse2.c transform-sse1.c -+ SSE1_FLAGS=-msse -+ SSE2_FLAGS=-msse2 -+endif - - FORCE_STATIC_LIB = 1 - # This library is used by other shared libs diff --git a/mail/thunderbird/files/patch-mozilla-gfx-ycbcr-Makefile.in b/mail/thunderbird/files/patch-mozilla-gfx-ycbcr-Makefile.in new file mode 100644 index 000000000000..041689a51995 --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-gfx-ycbcr-Makefile.in @@ -0,0 +1,21 @@ +--- mozilla/gfx/ycbcr/Makefile.in~ ++++ mozilla/gfx/ycbcr/Makefile.in +@@ -58,6 +58,10 @@ ifeq ($(OS_ARCH),Linux) + CPPSRCS += yuv_row_posix.cpp \ + $(NULL) + else ++ifeq ($(OS_ARCH),FreeBSD) ++CPPSRCS += yuv_row_posix.cpp \ ++ $(NULL) ++else + ifeq ($(OS_ARCH),SunOS) + CPPSRCS += yuv_row_posix.cpp \ + $(NULL) +@@ -70,6 +74,7 @@ CPPSRCS += yuv_row_other.cpp \ + $(NULL) + endif # Darwin + endif # SunOS ++endif # FreeBSD + endif # linux + endif # windows +
\ No newline at end of file diff --git a/mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in b/mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in new file mode 100644 index 000000000000..5d2e72cd0a96 --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in @@ -0,0 +1,28 @@ +--- mozilla/ipc/chromium/Makefile.in~ ++++ mozilla/ipc/chromium/Makefile.in +@@ -43,6 +43,14 @@ include $(DEPTH)/config/autoconf.mk + + OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS)) + ++# workaround IPC hang with libevent2 ++ifndef MOZ_DEBUG ++ifneq (,$(filter 4.2.%, $(CXX_VERSION))) ++MOZ_OPTIMIZE_FLAGS = -O1 ++OS_CXXFLAGS += $(MOZ_OPTIMIZE_FLAGS) ++endif ++endif ++ + LIBRARY_NAME = chromium_s + FORCE_STATIC_LIB = 1 + LIBXUL_LIBRARY = 1 +@@ -55,9 +60,7 @@ vpath %.c \ + $(srcdir)/src/third_party/libevent \ + $(NULL) + else # } else { +-# message_pump_libevent.cc includes third_party/libevent/event.h, +-# which we put in $(DIST), see export rule below +-LOCAL_INCLUDES += -I$(DIST) ++LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_INCLUDES)) + endif # } + + vpath %.cc \ diff --git a/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h b/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h deleted file mode 100644 index 5c4e5b79f3d1..000000000000 --- a/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h +++ /dev/null @@ -1,45 +0,0 @@ ---- mozilla/ipc/chromium/src/base/dir_reader_linux.h.orig 2011-12-16 21:29:22.000000000 +0100 -+++ mozilla/ipc/chromium/src/base/dir_reader_linux.h 2011-12-19 21:00:27.000000000 +0100 -@@ -9,6 +9,7 @@ - #include <errno.h> - #include <fcntl.h> - #include <stdint.h> -+#include <sys/dirent.h> - #include <sys/syscall.h> - #include <unistd.h> - -@@ -19,6 +20,8 @@ - - namespace base { - -+#define linux_dirent struct dirent -+#if 0 - struct linux_dirent { - uint64_t d_ino; - int64_t d_off; -@@ -26,11 +29,16 @@ - unsigned char d_type; - char d_name[0]; - }; -+#endif - - class DirReaderLinux { - public: - explicit DirReaderLinux(const char* directory_path) -+#ifdef O_DIRECTORY - : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), -+#else -+ : fd_(open(directory_path, O_RDONLY)), -+#endif - offset_(0), - size_(0) { - memset(buf_, 0, sizeof(buf_)); -@@ -57,7 +65,7 @@ - if (offset_ != size_) - return true; - -- const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_)); -+ const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_)); - if (r == 0) - return false; - if (r == -1) { diff --git a/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc b/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc new file mode 100644 index 000000000000..3fe4995aa0f8 --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc @@ -0,0 +1,11 @@ +--- mozilla/ipc/chromium/src/base/message_pump_libevent.cc~ ++++ mozilla/ipc/chromium/src/base/message_pump_libevent.cc +@@ -15,7 +15,7 @@ + #include "base/scoped_nsautorelease_pool.h" + #include "base/scoped_ptr.h" + #include "base/time.h" +-#include "third_party/libevent/event.h" ++#include "event.h" + + // Lifecycle of struct event + // Libevent uses two main data structures: diff --git a/mail/thunderbird/files/patch-mozilla-js-src-Makefile.in b/mail/thunderbird/files/patch-mozilla-js-src-Makefile.in index e62d7b8202a2..2aa54ce69c5e 100644 --- a/mail/thunderbird/files/patch-mozilla-js-src-Makefile.in +++ b/mail/thunderbird/files/patch-mozilla-js-src-Makefile.in @@ -1,24 +1,5 @@ --- mozilla/js/src/Makefile.in.orig 2012-03-15 20:40:13.000000000 +0100 +++ mozilla/js/src/Makefile.in 2012-03-16 10:03:18.000000000 +0100 -@@ -352,7 +352,7 @@ - # For architectures without YARR JIT, PCRE is faster than the YARR - # interpreter (bug 684559). - --ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU))) -+ifeq (,$(filter arm% sparc %86 amd64 x86_64 mips%,$(TARGET_CPU))) - - VPATH += $(srcdir)/yarr/pcre \ - $(NULL) -@@ -418,6 +418,9 @@ - else - #CPPSRCS += only_on_x86.cpp - endif -+ifeq (amd64, $(TARGET_CPU)) -+#CPPSRCS += only_on_x86_64.cpp -+endif - endif - ifeq (arm, $(TARGET_CPU)) - #CPPSRCS += only_on_arm.cpp @@ -737,7 +740,7 @@ endif # WINNT diff --git a/mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in b/mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in index 6129066e1afd..37f9d4c61f3e 100644 --- a/mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in +++ b/mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in @@ -5,7 +5,7 @@ include $(topsrcdir)/config/rules.mk -HOST_CFLAGS += -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -+HOST_CFLAGS += -DINCLUDEDIR=\"%%LOCALBASE%%/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -I/usr/local/include ++HOST_CFLAGS += -DINCLUDEDIR=\"$(LOCALBASE)/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -I/usr/local/include ifdef GNU_CC _GCCDIR = $(shell $(CC) -print-file-name=include) diff --git a/mail/thunderbird/files/patch-mozilla-js-src-config_config.mk b/mail/thunderbird/files/patch-mozilla-js-src-config_config.mk index c5b42ad3457c..0bacb7ee6f1a 100644 --- a/mail/thunderbird/files/patch-mozilla-js-src-config_config.mk +++ b/mail/thunderbird/files/patch-mozilla-js-src-config_config.mk @@ -4,7 +4,7 @@ -I$(srcdir) \ -I. \ -I$(DIST)/include -I$(DIST)/include/nsprpub \ -+ -I%%LOCALBASE%%/include \ ++ -I$(LOCALBASE)/include \ $(if $(LIBXUL_SDK),-I$(LIBXUL_SDK)/include -I$(LIBXUL_SDK)/include/nsprpub) \ $(OS_INCLUDES) \ $(NULL) diff --git a/mail/thunderbird/files/patch-mozilla-js-src-configure.in b/mail/thunderbird/files/patch-mozilla-js-src-configure.in index 75344541bb15..3a2a1d3b6d0d 100644 --- a/mail/thunderbird/files/patch-mozilla-js-src-configure.in +++ b/mail/thunderbird/files/patch-mozilla-js-src-configure.in @@ -1,37 +1,10 @@ --- mozilla/js/src/configure.in.orig 2012-02-22 17:06:28.000000000 +0100 +++ mozilla/js/src/configure.in 2012-03-07 21:03:11.000000000 +0100 -@@ -1470,7 +1470,7 @@ - CPU_ARCH=sparc - ;; +@@ -5946,6 +5946,7 @@ _EGREP_PATTERN="${_EGREP_PATTERN}dummy_n + * C++ implementations should define these macros only when __STDC_LIMIT_MACROS + * is defined before <stdint.h> is included. */ + #define __STDC_LIMIT_MACROS ++#define __STDC_CONSTANT_MACROS --x86_64 | ia64) -+amd64 | x86_64 | ia64) - CPU_ARCH="$OS_TEST" - ;; + #endif /* _JS_CONFDEFS_H_ */ -@@ -1492,7 +1492,7 @@ - dnl =============================================================== - INTEL_ARCHITECTURE= - case "$OS_TEST" in -- x86_64|i?86) -+ amd64|x86_64|i?86) - INTEL_ARCHITECTURE=1 - esac - -@@ -2814,6 +2814,16 @@ - AC_DEFINE(JS_CPU_X86) - AC_DEFINE(JS_NUNBOX32) - ;; -+amd64*-*) -+ ENABLE_TRACEJIT=1 -+ NANOJIT_ARCH=X64 -+ ENABLE_METHODJIT=1 -+ ENABLE_MONOIC=1 -+ ENABLE_POLYIC=1 -+ ENABLE_POLYIC_TYPED_ARRAY=1 -+ AC_DEFINE(JS_CPU_X64) -+ AC_DEFINE(JS_PUNBOX64) -+ ;; - x86_64*-*) - ENABLE_METHODJIT=1 - ENABLE_MONOIC=1 diff --git a/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp b/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp index c52535eaca09..fdf4840c1441 100644 --- a/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp +++ b/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp @@ -1,28 +1,31 @@ ---- mozilla/js/src/jsnum.cpp.orig Sun Nov 5 18:37:07 2006 -+++ mozilla/js/src/jsnum.cpp Sun Nov 5 18:42:31 2006 -@@ -45,6 +45,9 @@ - #if defined(XP_WIN) || defined(XP_OS2) - #include <float.h> - #endif +--- mozilla/js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 ++++ mozilla/js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 +@@ -49,6 +49,9 @@ + // Avoid warnings about ASSERT being defined by the assembler as well. + #undef ASSERT + +#if defined(__FreeBSD__) +#include <sys/param.h> +#endif - #include <locale.h> - #include <limits.h> - #include <math.h> -@@ -532,7 +535,15 @@ static jsdouble NaN; + #ifdef XP_OS2 + #define _PC_53 PC_53 + #define _MCW_EM MCW_EM +@@ -691,8 +694,18 @@ #else -+#if defined(__FreeBSD__) && __FreeBSD_version >= 601000 ++#if defined(__FreeBSD__) ++#if __BSD_VISIBLE == 0 ++#error __BSD_VISIBLE is zero, so fedisableexcept is not defined ++#endif +#include <fenv.h> -+#define FIX_FPU() (fedisableexcept(FE_ALL_EXCEPT)) -+ ++#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) +#else + #define FIX_FPU() ((void)0) -+ -+#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ ++#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ ++ #endif + JSBool diff --git a/mail/thunderbird/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp b/mail/thunderbird/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp new file mode 100644 index 000000000000..009b469dcd7f --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp @@ -0,0 +1,20 @@ +--- mozilla/js/src/methodjit/MethodJIT.cpp~ ++++ mozilla/js/src/methodjit/MethodJIT.cpp +@@ -171,7 +171,7 @@ + + JS_STATIC_ASSERT(offsetof(FrameRegs, sp) == 0); + +-#if defined(__linux__) && defined(JS_CPU_X64) ++#if defined(__ELF__) && defined(JS_CPU_X64) + # define SYMBOL_STRING_RELOC(name) #name "@plt" + #else + # define SYMBOL_STRING_RELOC(name) SYMBOL_STRING(name) +@@ -149,7 +149,7 @@ + + #if defined(XP_MACOSX) + # define HIDE_SYMBOL(name) ".private_extern _" #name +-#elif defined(__linux__) ++#elif defined(__ELF__) + # define HIDE_SYMBOL(name) ".hidden" #name + #else + # define HIDE_SYMBOL(name) diff --git a/mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in b/mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in index 6356b9f6e9d7..9742d56bde44 100644 --- a/mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in +++ b/mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in @@ -1,15 +1,14 @@ ---- mozilla/layout/generic/Makefile.in.orig 2011-07-06 05:09:28.000000000 +0200 -+++ mozilla/layout/generic/Makefile.in 2011-07-06 21:49:25.105659269 +0200 -@@ -159,9 +159,10 @@ - -I$(srcdir)/../../content/html/content/src \ +--- mozilla/layout/generic/Makefile.in~ ++++ mozilla/layout/generic/Makefile.in +@@ -154,9 +154,10 @@ LOCAL_INCLUDES += \ -I$(srcdir)/../../dom/base \ -I$(srcdir)/../../dom/plugins/base \ + -I$(srcdir)/../svg/base/src \ - $(MOZ_CAIRO_CFLAGS) \ $(NULL) -+ CXXFLAGS += $(MOZ_CAIRO_CFLAGS) ++CXXFLAGS += $(MOZ_CAIRO_CFLAGS) + ifdef MOZ_ENABLE_GTK2 CXXFLAGS += $(MOZ_GTK2_CFLAGS) endif - diff --git a/mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h b/mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h deleted file mode 100644 index e2c52f080518..000000000000 --- a/mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/media/libsydneyaudio/include/sydney_audio.h.orgi 2009-04-10 12:24:01.000000000 +0200 -+++ mozilla/media/libsydneyaudio/include/sydney_audio.h 2009-04-10 12:24:30.000000000 +0200 -@@ -73,7 +73,7 @@ - # endif - #elif defined(WIN32) - # define SA_LITTLE_ENDIAN 1 --#elif defined(__APPLE__) -+#elif defined(__APPLE__) || defined(__FreeBSD__) - # if defined(__BIG_ENDIAN__) - # define SA_BIG_ENDIAN 1 - # else diff --git a/mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c b/mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c new file mode 100644 index 000000000000..ddb42a92a1e3 --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c @@ -0,0 +1,13 @@ +--- mozilla/media/libsydneyaudio/src/sydney_audio_oss.c~ ++++ mozilla/media/libsydneyaudio/src/sydney_audio_oss.c +@@ -446,6 +446,10 @@ static void audio_callback(void* data) + printf("!"); /* not enough audio data */ + #endif + bytes = bytes-bytes_to_copy; ++ struct timespec ts = {0, 1000000}; ++ pthread_mutex_unlock(&s->mutex); ++ nanosleep(&ts, NULL); ++ pthread_mutex_lock(&s->mutex); + break; + } + free(s->bl_head); diff --git a/mail/thunderbird/files/patch-mozilla-memory-mozalloc-mozalloc.cpp b/mail/thunderbird/files/patch-mozilla-memory-mozalloc-mozalloc.cpp new file mode 100644 index 000000000000..72eba848047d --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-memory-mozalloc-mozalloc.cpp @@ -0,0 +1,21 @@ +--- mozilla/memory/mozalloc/mozalloc.cpp~ ++++ mozilla/memory/mozalloc/mozalloc.cpp +@@ -19,6 +19,9 @@ + #if defined(XP_UNIX) + # include <unistd.h> // for valloc on *BSD + #endif //if defined(XP_UNIX) ++#ifdef __FreeBSD__ ++# include <malloc_np.h> // for malloc_usable_size ++#endif + + #if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec)) + # define MOZALLOC_EXPORT __declspec(dllexport) +@@ -210,7 +213,7 @@ moz_malloc_usable_size(void *ptr) + + #if defined(XP_MACOSX) + return malloc_size(ptr); +-#elif defined(MOZ_MEMORY) || (defined(XP_LINUX) && !defined(ANDROID)) ++#elif defined(MOZ_MEMORY) || (defined(XP_LINUX) && !defined(ANDROID)) || defined(__FreeBSD__) + // Android bionic libc doesn't have malloc_usable_size. + return malloc_usable_size(ptr); + #elif defined(XP_WIN) diff --git a/mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk b/mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk index dc4e96c7c439..f5a47988bcc5 100644 --- a/mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk +++ b/mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk @@ -1,6 +1,6 @@ --- mozilla/security/coreconf/FreeBSD.mk.orig 2010-02-28 23:30:04.000000000 +0000 +++ mozilla/security/coreconf/FreeBSD.mk 2010-03-03 02:05:22.000000000 +0000 -@@ -49,8 +49,20 @@ +@@ -49,8 +49,24 @@ ifeq ($(CPU_ARCH),pc98) CPU_ARCH = x86 endif @@ -9,12 +9,16 @@ +ifeq ($(OS_TEST),alpha) +CPU_ARCH = alpha +endif -+ifeq ($(OS_TEST),amd64) -+CPU_ARCH = amd64 ++ifeq ($(OS_TEST),x86_64) ++CPU_ARCH = x86_64 +endif +ifeq ($(OS_TEST),ia64) +CPU_ARCH = ia64 +endif ++ifeq ($(OS_TEST),powerpc64) ++CPU_ARCH = powerpc ++USE_64 = 1 ++endif +ifeq ($(OS_TEST),powerpc) +CPU_ARCH = powerpc +endif @@ -32,9 +36,11 @@ ifdef MAPFILE MKSHLIB += -Wl,--version-script,$(MAPFILE) endif -@@ -87,4 +99,4 @@ +@@ -87,4 +99,6 @@ G++INCLUDES = -I/usr/include/g++ -INCLUDES += -I/usr/X11R6/include -+#INCLUDES += -I/usr/local/include ++USE_SYSTEM_ZLIB = 1 ++ZLIB_LIBS = -lz ++INCLUDES += -I$(LOCALBASE)/include diff --git a/mail/thunderbird/files/patch-mozilla-security-nss-lib-Makefile b/mail/thunderbird/files/patch-mozilla-security-nss-lib-Makefile new file mode 100644 index 000000000000..195e44014456 --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-security-nss-lib-Makefile @@ -0,0 +1,11 @@ +--- mozilla/security/nss/lib/Makefile~ ++++ mozilla/security/nss/lib/Makefile +@@ -63,7 +63,7 @@ ZLIB_SRCDIR = zlib # Add the zlib direc + endif + + ifndef MOZILLA_CLIENT +-ifndef NSS_USE_SYSTEM_SQLITE ++ifndef MOZ_NATIVE_SQLITE + SQLITE_SRCDIR = sqlite # Add the sqlite directory to DIRS. + endif + endif diff --git a/mail/thunderbird/files/patch-mozilla-toolkit-library-Makefile.in b/mail/thunderbird/files/patch-mozilla-toolkit-library-Makefile.in deleted file mode 100644 index f222b6dca9e9..000000000000 --- a/mail/thunderbird/files/patch-mozilla-toolkit-library-Makefile.in +++ /dev/null @@ -1,12 +0,0 @@ ---- mozilla/toolkit/library/Makefile.in.orig 2010-01-11 12:13:08.000000000 -0500 -+++ mozilla/toolkit/library/Makefile.in 2010-01-11 12:15:05.000000000 -0500 -@@ -181,7 +181,7 @@ - export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS) - $(INSTALL) $^ . - --EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -+EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%% - - ifdef MOZ_ENABLE_LIBXUL - include $(srcdir)/libxul-rules.mk - diff --git a/mail/thunderbird/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp b/mail/thunderbird/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp new file mode 100644 index 000000000000..78cb22fd4702 --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp @@ -0,0 +1,11 @@ +--- mozilla/toolkit/xre/nsAppRunner.cpp~ ++++ mozilla/toolkit/xre/nsAppRunner.cpp +@@ -3819,7 +3819,7 @@ XREMain::XRE_main(int argc, char* argv[] + ScopedLogging log; + + #if defined(MOZ_WIDGET_GTK2) +-#ifdef MOZ_MEMORY ++#if defined(MOZ_MEMORY) || defined(__FreeBSD__) + // Disable the slice allocator, since jemalloc already uses similar layout + // algorithms, and using a sub-allocator tends to increase fragmentation. + // This must be done before g_thread_init() is called. diff --git a/mail/thunderbird/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp b/mail/thunderbird/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp new file mode 100644 index 000000000000..7305a04e1c33 --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp @@ -0,0 +1,12 @@ +--- mozilla/widget/qt/nsNativeThemeQt.cpp~ ++++ mozilla/widget/qt/nsNativeThemeQt.cpp +@@ -25,7 +25,9 @@ + #include "nsThemeConstants.h" + #include "nsIServiceManager.h" + #include "nsIDOMHTMLInputElement.h" ++#ifdef __GLIBC__ + #include <malloc.h> ++#endif + + + #include "gfxASurface.h" diff --git a/mail/thunderbird/files/patch-mozilla-widget-qt-nsSound.cpp b/mail/thunderbird/files/patch-mozilla-widget-qt-nsSound.cpp new file mode 100644 index 000000000000..601b917a3347 --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-widget-qt-nsSound.cpp @@ -0,0 +1,10 @@ +--- mozilla/widget/qt/nsSound.cpp~ ++++ mozilla/widget/qt/nsSound.cpp +@@ -40,6 +40,7 @@ + #include <QSound> + + #include <string.h> ++#include <unistd.h> + + #include "nscore.h" + #include "plstr.h" diff --git a/mail/thunderbird/files/patch-mozilla-widget-qt-nsWindow.cpp b/mail/thunderbird/files/patch-mozilla-widget-qt-nsWindow.cpp new file mode 100644 index 000000000000..30a42b431da5 --- /dev/null +++ b/mail/thunderbird/files/patch-mozilla-widget-qt-nsWindow.cpp @@ -0,0 +1,10 @@ +--- mozilla/widget/qt/nsWindow.cpp~ ++++ mozilla/widget/qt/nsWindow.cpp +@@ -43,6 +43,7 @@ using namespace QtMobility; + + #ifdef MOZ_X11 + #include <X11/Xlib.h> ++#include "mozilla/X11Util.h" + #endif //MOZ_X11 + + #include "nsXULAppAPI.h" diff --git a/mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp b/mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp index 4d2bca2ca692..817014333627 100644 --- a/mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp +++ b/mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp @@ -8,3 +8,11 @@ #if defined(_WIN32) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)) && !defined(WINCE) // WIN32 x86 stack walking code +@@ -1123,6 +1123,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb + + #elif defined(HAVE__UNWIND_BACKTRACE) + ++#define _GNU_SOURCE + // libgcc_s.so symbols _Unwind_Backtrace@@GCC_3.3 and _Unwind_GetIP@@GCC_3.0 + #include <unwind.h> + diff --git a/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in b/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in index e896cec90613..252912459191 100644 --- a/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in +++ b/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in @@ -1,16 +1,6 @@ ---- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2011-05-28 15:26:21.000000000 +0200 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2011-06-03 18:39:42.769434047 +0200 -@@ -74,6 +74,9 @@ - # NOTE: MODULE_OPTIMIZE_FLAGS must be set before including config.mk - MODULE_OPTIMIZE_FLAGS=-O3 - endif -+ifeq (x86_64,$(OS_TEST)) -+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp -+endif - endif - endif - -@@ -117,7 +120,7 @@ +--- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2011-04-26 23:22:05.000000000 +0200 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2011-04-26 23:48:09.637442986 +0200 +@@ -70,7 +70,7 @@ endif endif # IA64 Linux @@ -19,36 +9,6 @@ ifneq (,$(findstring ia64,$(OS_TEST))) CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s -@@ -129,6 +132,12 @@ - ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDx86_64) - CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp - endif -+# FreeBSD/amd64 -+# -+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDamd64) -+CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp -+endif -+# - # - # Neutrino/Intel (uses the same unixish_x86 code) - # -@@ -184,9 +193,15 @@ - ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s - endif - # -+# FreeBSD/Alpha -+# -+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDalpha) -+CPPSRCS := xptcinvoke_freebsd_alpha.cpp xptcstubs_freebsd_alpha.cpp -+endif -+# - # Linux/Alpha - # --ifneq (,$(filter Linuxalpha FreeBSDalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) -+ifneq (,$(filter Linuxalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) - CPPSRCS := xptcinvoke_linux_alpha.cpp xptcstubs_linux_alpha.cpp - endif - # @@ -341,7 +356,7 @@ # # Linux/PPC @@ -58,19 +18,21 @@ CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s AS := $(CC) -c -x assembler-with-cpp -@@ -419,6 +434,15 @@ - ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s - endif +@@ -350,7 +365,7 @@ # -+# FreeBSD/SPARC64 -+# -+ifeq ($(OS_ARCH),FreeBSD) -+ifneq (,$(findstring sparc,$(OS_TEST))) -+CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp -+ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s -+endif -+endif -+# - # OpenBSD/SPARC + # Linux/PPC64 # - ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc) +-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64) ++ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST))) + CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp + ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s + AS := $(CC) -c -x assembler-with-cpp +@@ -350,7 +350,7 @@ + # + # OpenBSD/SPARC64 + # +-ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc64) ++ifneq (,$(filter OpenBSDsparc64 FreeBSDsparc64,$(OS_ARCH)$(OS_TEST))) + CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp + ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s + endif |