# Maintainer: Levente Polyak # Contributor: Jan Alexander Steffens (heftig) # Contributor: Ionut Biru # Contributor: Alexander Baldeck # Contributor: Dale Blount # Contributor: Anders Bostrom # ALARM: Kevin Mihelich # - mozconfig changes for ARM # - disable rust lto for v7 highmem=1 pkgbase=thunderbird pkgname=(thunderbird) pkgver=128.2.3 pkgrel=1 pkgdesc='Standalone mail and news reader from mozilla.org' url='https://www.thunderbird.net/' arch=(x86_64) license=('MPL-2.0' 'GPL-2.0-only' 'LGPL-2.1-only') depends=( glibc gtk3 libgdk-3.so libgtk-3.so mime-types dbus libdbus-1.so dbus-glib alsa-lib nss hunspell sqlite ttf-font libvpx libvpx.so zlib bzip2 libbz2.so botan2 libwebp libwebp.so libwebpdemux.so libevent libjpeg-turbo libffi libffi.so nspr gcc-libs libx11 libxrender libxfixes libxext libxcomposite libxdamage pango libpango-1.0.so cairo gdk-pixbuf2 freetype2 libfreetype.so fontconfig libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg json-c libcanberra ffmpeg icu libicui18n.so libicuuc.so ) makedepends=( unzip zip diffutils python nasm mesa libpulse libice libsm rust clang llvm cbindgen nodejs-lts-iron lld gawk perl findutils libotr ) options=(!emptydirs !makeflags !lto) source=(https://archive.mozilla.org/pub/thunderbird/releases/${pkgver}esr/source/thunderbird-${pkgver}esr.source.tar.xz{,.asc} vendor-prefs.js distribution.ini mozconfig.cfg metainfo.patch org.mozilla.Thunderbird.desktop thunderbird-system-icu-74.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=1862601 ) validpgpkeys=( 14F26682D0916CDD81E37B6D61B7B526D98F0353 # Mozilla Software Releases 4360FE2109C49763186F8E21EBE41E90F6F12F6D # Mozilla Software Releases ) # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) # Note: These are for Arch Linux use ONLY. For your own distribution, please # get your own set of keys. Feel free to contact foutrelis@archlinux.org for # more information. _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM # Mozilla API keys (see https://location.services.mozilla.com/api) # Note: These are for Arch Linux use ONLY. For your own distribution, please # get your own set of keys. Feel free to contact heftig@archlinux.org for # more information. _mozilla_api_key=16674381-f021-49de-8622-3021c5942aff prepare() { cd $pkgname-$pkgver echo "${noextract[@]}" local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" done sed -e 's|73114a5c28472e77082ad259113ffafb418ed602c1741f26da3e10278b0bf93e|a88d6cc10ec1322b53a8f4c782b5133135ace0fdfcf03d1624b768788e17be0f|' \ -i third_party/rust/mp4parse/.cargo-checksum.json sed -e 's|880c982df0843cbdff38b9f9c3829a2d863a224e4de2260c41c3ac69e9148ad4|239b3e4d20498f69ed5f94481ed932340bd58cb485b26c35b09517f249d20d11|' \ -i third_party/rust/bindgen/.cargo-checksum.json # Make icon transparent sed -i '/^google-api-key printf "%s" "$_mozilla_api_key" >mozilla-api-key cp ../mozconfig.cfg .mozconfig sed "s|@PWD@|${PWD@Q}|g" -i .mozconfig if [[ $CARCH == "armv7h" ]]; then echo "ac_add_options --disable-elf-hack" >> .mozconfig MAKEFLAGS="-j4" # disable hard-coded LTO sed -i '/cargo_rustc_flags += -Clto/d' config/makefiles/rust.mk sed -i '/RUSTFLAGS += -Cembed-bitcode=yes/d' config/makefiles/rust.mk # increase codegen-units due to RAM constraints sed -i 's/codegen-units=1/codegen-units=16/' config/makefiles/rust.mk fi echo 'ac_add_options --enable-optimize="-g0 -O2"' >> .mozconfig echo "mk_add_options MOZ_MAKE_FLAGS=\"${MAKEFLAGS}\"" >> .mozconfig export MOZ_DEBUG_FLAGS=" " export CFLAGS+=" -g0" export CXXFLAGS+=" -g0" #export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" export LDFLAGS+=" -Wl,--no-keep-memory" export RUSTFLAGS="-Cdebuginfo=0" CFLAGS=${CFLAGS/-fstack-clash-protection} CXXFLAGS=${CXXFLAGS/-fstack-clash-protection} } build() { cd $pkgname-$pkgver if [[ -n "${SOURCE_DATE_EPOCH}" ]]; then export MOZ_BUILD_DATE=$(date --date "@${SOURCE_DATE_EPOCH}" "+%Y%m%d%H%M%S") fi export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none export MOZBUILD_STATE_PATH="${srcdir}/mozbuild" # malloc_usable_size is used in various parts of the codebase CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" CFLAGS="${CFLAGS/-fexceptions/}" CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" CXXFLAGS="${CXXFLAGS/-fexceptions/}" ./mach configure ./mach build ./mach buildsymbols } package_thunderbird() { optdepends=( 'hunspell-en_us: Spell checking, American English' 'libotr: OTR support for active one-to-one chats' 'libnotify: Notification integration' ) cd $pkgname-$pkgver DESTDIR="$pkgdir" ./mach install install -Dm 644 ../vendor-prefs.js -t "$pkgdir/usr/lib/$pkgname/defaults/pref" install -Dm 644 ../distribution.ini -t "$pkgdir/usr/lib/$pkgname/distribution" install -Dm 644 ../org.mozilla.Thunderbird.desktop -t "$pkgdir/usr/share/applications" install -Dm 644 comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml \ "$pkgdir/usr/share/metainfo/net.thunderbird.Thunderbird.appdata.xml" for i in 16 22 24 32 48 64 128 256; do install -Dm644 comm/mail/branding/thunderbird/default${i}.png \ "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/org.mozilla.Thunderbird.png" done install -Dm644 comm/mail/branding/thunderbird/TB-symbolic.svg \ "$pkgdir/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg" # Use system-provided dictionaries ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries" ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation" # Install a wrapper to avoid confusion about binary path install -Dm755 /dev/stdin "$pkgdir/usr/bin/$pkgname" <=$pkgver") install -Dm644 thunderbird-i18n-$pkgver-$1.xpi \ "$pkgdir/usr/lib/thunderbird/extensions/langpack-$1@thunderbird.mozilla.org.xpi" } _languages=( 'af "Afrikaans"' 'ar "Arabic"' 'ast "Asturian"' 'be "Belarusian"' 'bg "Bulgarian"' 'br "Breton"' 'ca "Catalan"' 'cak "Kaqchikel"' 'cs "Czech"' 'cy "Welsh"' 'da "Danish"' 'de "German"' 'dsb "Lower Sorbian"' 'el "Greek"' 'en-GB "English (British)"' 'en-US "English (US)"' 'es-AR "Spanish (Argentina)"' 'es-ES "Spanish (Spain)"' 'et "Estonian"' 'eu "Basque"' 'fi "Finnish"' 'fr "French"' 'fy-NL "Frisian"' 'ga-IE "Irish"' 'gd "Gaelic (Scotland)"' 'gl "Galician"' 'he "Hebrew"' 'hr "Croatian"' 'hsb "Upper Sorbian"' 'hu "Hungarian"' 'hy-AM "Armenian"' 'id "Indonesian"' 'is "Icelandic"' 'it "Italian"' 'ja "Japanese"' 'ka "Georgian"' 'kab "Kabyle"' 'kk "Kazakh"' 'ko "Korean"' 'lt "Lithuanian"' 'ms "Malay"' 'nb-NO "Norwegian (Bokmål)"' 'nl "Dutch"' 'nn-NO "Norwegian (Nynorsk)"' 'pa-IN "Punjabi (India)"' 'pl "Polish"' 'pt-BR "Portuguese (Brazilian)"' 'pt-PT "Portuguese (Portugal)"' 'rm "Romansh"' 'ro "Romanian"' 'ru "Russian"' 'sk "Slovak"' 'sl "Slovenian"' 'sq "Albanian"' 'sr "Serbian"' 'sv-SE "Swedish"' 'th "Thai"' 'tr "Turkish"' 'uk "Ukrainian"' 'uz "Uzbek"' 'vi "Vietnamese"' 'zh-CN "Chinese (Simplified)"' 'zh-TW "Chinese (Traditional)"' ) _url=https://archive.mozilla.org/pub/thunderbird/releases/${pkgver}esr/linux-x86_64/xpi for _lang in "${_languages[@]}"; do _locale=${_lang%% *} _pkgname=thunderbird-i18n-${_locale,,} pkgname+=($_pkgname) source+=("thunderbird-i18n-$pkgver-$_locale.xpi::$_url/$_locale.xpi") eval "package_$_pkgname() { _package_i18n $_lang }" done # Don't extract languages noextract=() for _src in "${source[@]%%::*}"; do case "$_src" in *.xpi) noextract+=("$_src") ;; esac done sha512sums=('f852d1fe6b8d41aa2f0fbc0fceae93cccf1e5f88d9c0447f504de775283289b82b246b79a01e8eb26e9c87197fb33138fb18c75ecc3f5f1bcfefa3920a7c7512' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' '32799387dd5976f2765bdde160f4a63e0943970605afa697f0cc33929a99d8fe26f049dd03743e5ea051c1fe817d9530b83041ed124b8fad01087860f7675861' 'c06229ec5ba3517a11f63a74060ef539a40df1eb69966c473cbc8c02e090524b4cf04b1f65f5815680a90745d2f287f8d8b7f2b7412305700abf8203ffb96711' '06b3821672e5e3266008ef1b0006eab3adb485824902b1819e5ab7b9934a81ddc0b98be0be81ed0502bc6eb2aa0415e36b1dd1632f9f91c988678ea5680ceb99' '121dfbdfa4dd1e882b31e19be5061ab6ee9540ead08105f7fe19d8d96e079f6125b5d607083dba7b0394acc7eb5d94adf06dfb46ccecc9d362180fe6e221b243' '2f14b9942a2b274eaada910db4ea2bb077c89839a2353f535cded5d6e9931a36504dfbbe5a9b176987de053a9a6b7d14163cdafaa77c372de2b9a2003770cd49' 'fd7864aa685c8e0528e28f11ddcc475f497a1761487f57a3e2818e385a93cce5f094cef3a87f986efc747f9c06ca6edc15d4e9722f9bab5702f51161de19395f' 'f67349ddb4a11047ec4cc9ff81b86a9e62c0360231537deddef05b699722eda1b4a1babeb1dd302234118d86ade7321665fbb554a4d47dca4cac3c180279b7e1' '810463d933fe2c2f842edf8600142730bb7e62b4d7787d2ec94b0cb958b9a5a99e9a4fb5c5857581e1dec61fffb6ab15cd667b5ee4a11c04ae4d3118d3f8cd80' 'f2bee313f571c0dadc42002d14ae44c87da4b85dfa224c236e3a452916a8696daca3833f6e1c0749be9f47b4c0e30c8bea4de9a3a8610c9278c81f8c4938fabd' '07260b39f0743b2959cdbac5ed2204089a75131374e664f58af9adcbbe0cd20e542ea606e5e1857674fd2a34f8408dfb9e7ecda02d2c3b75965ebabea200e9c9' '9ed710942242a17004ca67ea47b3f888ea5bc01b191d53b0e973ea45a3483f9a9d84172dc7bb8d219017918d9639d892b3311dbb2461b0d5ece3fa2634f40427' '5c5ba44a13014f65a304136a38e9ccc376202db274c0d4daeb511beb5ea45b75c8008eef41d28d984fcd295e233c67e4f81cfe51f6ab42eb64788e32c4239673' 'b4a145f85cdba1bbe8d13ed3481c9140d3bdee2bd499080f73ec7a490e0c995596fdb488da65a2048daf687617fbdf5d9ce963560b444a90d498c99ceec3aa06' '53b75b9c98933284c4e551eb0d0e6cc610c83e416b2537d668976ec594d7ef07c15abaa6b88105090b585ad53ff848462842e0d222db45fc61a66f3658529c0a' '884764e2e957d434ae7908b0d98eb7807114fd0fb38f9a6ab88aab848e06369e57e30d4403a70d054bf0b637754b6191d3cfdf42de30317f61822cf638bddd7a' '147c041bcd602400951923286c1c5448f44a9d8241017fe354cc4424da381678d9c2dffb76b956d01274fe9811b3710de144f06ece30941a73a675f31d2815b4' 'dd21bbffbbbd4e342eb5474d83ae0ed1c6d7a0b85b54f3dca3c6929d96f2bce408a4b7db19b093a8c0946b5c636ab0514399f6bbc2525929eb1af1d6c50c36f9' '236353230d32caeafac611cdc977a0f51d8dd354a458e741827fa9057238699780485ea42de8665970159f38ccf978e46a33b8213003675e81a21c25718e341b' '3485be28ba289f811a1cafc64c4e4b2208110eac115df5cbd4a4e2ac5ec33c0b29f050c0805759f07b0098f282feef1387b1adee9a6ae1e6b3727d929ab982c4' 'b5b306270445429fb071c139a1e144e2d9379e425568787f0f878f4412d8124b2638f4499e161b3f7fe70a6f8f01b87c721d06f92795c1dc9d90d2431e452978' '52f9fde6f297e31892bc6ded2c97e104082c3569e68cd71a3b668477875fe896953f8f5eb175825904003b663dce5cec7b27df1ed3f61e911f7a82ceeb5a07bf' '13aa3a0814f38cd3fd018882e61a769de65b237f0bbe6e506464922363318ceadf4bafacfcfe2c4880dc5fbc77eed82b2cb621e96da086100cd201bbafdb0bd5' 'ad29a5ee2a29f80c7cf4a2bbed47544846261849ad14c36a375e40794208c4c28f9ec863d8a18f45fa3377b085aa7f6a58f26d6f333d981398b0c3f3aea9dfd2' '395b56b68af0e9b248cf5b3d1c12f17ca912dcc74456035906a3cc3a832648ebf3ab71978817118fff132c436782ab5128c8b87c92d5a625c7be2d86448d8441' '5621a60df17c1f115facfc14864ab3bb2e19501c3f1fc268faa40f085dba83cace61cbfe3fbd411954a4aa0bc517758a4addda49111718ae9ec4f2ba76d0b54c' '25722ad053e6a4ef0ef42386587c103619c43eafeb77b9761834fd7c3a2defeeda78da47f39ae972ca89184eb11c410938600f1ec69d068fdbbf1c38ecf4441c' 'c72bdfd9d007b6d6f6f9f6a868593b589260dbd98ba0053e9abd0adf0beb4e8aa154f7eaad75d020e0cb870f5e9c0016b7e3cebb85245e22b8c84bb712dbdb94' '4d6cfe8dfe2412cd644ebbf5837878ca3caf87be0d07f4443abf4fce5f8d20687f1a2eed69430b3da59d16b9f9ccf2677708dd69910ecb2ed082996a97da1e03' 'd04171abdb3474dc30f520e5c5d6aa4bbe39f749f6d3447b3bfa65a9c97c2cf92742a85049844f65fb6979b92fb429ec6be75c8033fe2907e8b6307fce039b2c' '83522b6f181b701929c26a804f4e83025156a553181daab0cf7b7cd504c7618bba77a80360221719f96f0839d2ef6085bd6767e6c67fd04b93f0d66341eee741' 'e858f2e53fdc2a219fbd82c27ac38417bbfffeb6ce9d97868ff57772fa1fd2a5edb0f1f165ba2a64ed73acdb07cbfd8fbb1fe0ace30a23be6a6099d9a179a226' '5753e509fe4c62e84f9da28bf39cb34b088bd512cbd7716050b1a236367b4347fc1a7b4bec79ce69a9b1669a798a0f99fb1b98fb4cc552fde5bf82d64379c13a' '1648151bdff1910aa931890b0fda724d92fe83e2b0b2fae06c4cc6e483d0b4909139af053b1489b8538e284ad2f3e0c2526a1d009ff4aa430d6878e9e7ffff93' '970f5f4b23992d98431ede90fbc15e2163a26c3559d251a4a834653bfde6a61a48450a79304343261ffbf7326b47d5ec43aafa14682732d369f96ab02f27d32a' 'c7e16a74ab4a7075dab9fcd6d5eca97bcc5f4615a14ea54b393b27beb29ae2a9f3a196b653d77beb1053a80b8730f6f9b029d56e675626c98e858e15ede6b792' '3b496548a99ce40a7443679f12e5e24db5fa8616d1a3f92e138d753355f5b0deb452811c2e1374893af79b15e8ddd576fa1e86f04a6c27cbd50fe4d178d387f9' 'a0c823c189c61f2bd9eea059d72bb574ed28c1b25921908c9f91c943903dd0e38c856f1bbc72bfc087c53792a53d08a9c15cc951ef03c0cd2de7daaac630d095' '85eba822d16425daee7a0a262759bbd67a84b3a9b0964e3b4b5810209f74678ff938b0a803c65e6fdd903ed08d549528a5b352c7d757b91c9f1002e78b7ae835' '5a84c696af0d86ecbe2ef7bdd8f00e090b5ec4ea5cfd9dbd12437ca85b58a97ac9df9fd00e0617d45b698337b810cc37715f0b77231121d669e3415dcf5ca487' 'b2b011945544684b8feba7337e99d7c9b2f7433b9984891916d9a712816ce72cecf6a5cb066e3ea0a8a506e03de38e0c81b5450af4e56a74e9f190db1f609d5e' '2b334336edcd962040f3dd0631bf8cafc975831d4db4a702b024aaa8e1eacd5e804cfef39da342fb52addab6ce46339e0424e51ddec9a5d6c889c3f4f35c7ccf' '7bed62a3f549382cf1104a467e947bc0a5fc815785f0c4d34ab674e48a216bd9502b021e42e5111fa9243294a821c137daeb2f0b94bf7d05336c7f7b6f111aae' 'b383c5712dbeda8ca7215a9974759c366cc43df927d6ec9906cca22aca4a0631930c9f83fd01bc86d2ab1727a464d4b110a69e1f9c5df16de2ae722417f887ba' 'cb2fe3637d568c6fa09962f047cd4070a7a5ce217c036f16e39060a25bea8d08f55df708c72daa81d3ae8d15d349d36ba4a07c068bc023c15f8815537593e7d1' 'd5f385c2e11f4e42984e635546ecf3c635e7011c1544f85bc1ebc11a064b2c4ba36621c220643721e9b6afe10a9abbbae4c45ab4554a449dcae96e147b32d70a' '86322abc42d22bc18185b468cc6221f5b09c4f0aa52ac1e372a26557cd29814b57a2f6fa56f6f64835a2a8d5e16394f41dbdc042904f9d2f802d0621bcced03d' 'b1e7bcb05dbc30421b3ddf1faa036d8ca459553de980173a371e7820113460096d159c906bc753b0bd34fe41b907e4a18a6f238a87d516db9431bd2efb7db0fa' '0887d9294ef5010c4e8cd842b2ec03a75d41e5fdf6ea58ca624667b75933f84806c998548e05d574e2dd765e650c6defe52eca136b54ae792e2d406068a18160' '28ee3b0fbdc1f6065483e27e7e7a7faee247e9f899d3e3eaee7775d5d9b9495d193fcc740f18b960b3d47948fb8e5116f3ffa81c95f2babfae6dfeb562270dd5' '00f91287cdcb7ca12a0369ecc4ea091d238f7757716f80cb43fa545466bdd891a65cf8f5b4de840a0c2086e8b8cbeda6908fa57595f387a15ccdc8187212413d' 'ddabb2e2e3a47b6d6c99f3cbdc06ed99f0660029a6dbd5070c155be17fadf7dbbf1bb7342586fac194ce2c694e8b4619f4eb5333f7107fadd23e3db4a84a2973' '3aa13c254e5d0d7bb62e242fa2aeebc5ed8b38dd7f623d1c592708727abb231b703514f621ca15d0519cb449605a07156a1391071e7450ce4ee058df1e69e957' 'ae5fa42f0c61bf1e22a572b9b137a85a0e4e08ec8ee04841e4ee6d98efbf913e319583460216e3e52cec90f9e88ec1e7d6c0a5639c717c950892ae1d86d4a6a8' '5c29a91ed1ee4b48bde070e73a1e5972639d6bade766db2325b186ef33bf083a6b596a48775c0f7c492da30598ba3f013746f46d818f3220c62696897ab9df8e' '3abe0a6c6e3c467cf7410a4466a1be50fefed5b27229e4eb2b69538e5e2707764e978d7984035fc45503e8df8989bc79f2821774806f7597b13049f5cf3f51e2' 'd6e2ee6c9cd9c75ec32ca36856da1637ad14d842d625f0424f7b5e3a63f46af2790de9bacb5d87f6e426684271ca8ce99261b4bff12d7cbfae4f977f67b93120' 'a76970e0114c3e11eea7b5c5b662e0e71a8157a1f6f185d63029824700a0afdc281649b82b6fb455dc3e45f97e2af208a20f9df20471491e105cf61d6983ce58' '53ced8767e14e3e35ada7beff6a1acf609d64d82b0a3f8049dafa253d7f2af30d464fc4e7f6f69fb55d55fab4d54a507fc22be5dda435f9fc1f5da4b4753a1c3' '4640757ade6d6e033a2f920b7dd31654b6d3aa44f6b6ea1e5457916a8814daa2140bb5a37ba003113c27fd3afcadaa54e8220b49e5f37ab39c684005a7f82244' '74795147371204a1f4a5cbbd34833b38c3b313c43f851e0f163fe99b849a52eedf3f0164f03c859bb624b52344e7b3bf0cb8fd88e5dc607ed4f660799631e110' '8e2d93832638cadad63459d3ae56c0fdcd6d4e263183d18868b30e8248b0d967a209e0141726d48e905ad9df6c127a55aebcc90aa89daa3b1e553b95e778d4ec' '5f96714f241516c8f1427a038d7a64ed60f4a4be08b270f2b1b84ccb2655471a78e9bd25af908666e5be79e8c151b7dcfadf41a81b6ea34f9fe49e3767872301' '1706061452933c5d332353ec096adc296d14e8738c647a7d52048f090bb244f37890abd821e7b7872c1ee138035285c71ac0a220c4d04150aa7ce84026f529b6') # vim:set sw=2 et: