Skip to content

Commit

Permalink
Added SNI support and other small improvements
Browse files Browse the repository at this point in the history
  * Updated all libraries to latest versions
  * Simplified JHBuild moduleset, removed unused dependencies
  * Backported some pathes from Debian (SNI support, etc)
  * Fixed separator style before 'Remove attachments' menu item
  * Added support for switch app language via system settings ('Language & Region')
  * Added DMG customization like last official macOS build (3.4.1-osx-test1)
  • Loading branch information
AlienCowEatCake committed Jun 7, 2022
1 parent 095b4cf commit b9b7224
Show file tree
Hide file tree
Showing 96 changed files with 8,435 additions and 270 deletions.
49 changes: 25 additions & 24 deletions build_sylpheed_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ export PKG_CONFIG_PATH="${HOME}/gtk/inst/lib/pkgconfig"

git clone https://gitlab.gnome.org/GNOME/gtk-osx.git
cd gtk-osx
git checkout bc3f9ca8a9e536cfde747a96e7973e99897976c1
cp -a "${SOURCE_DIR}/modulesets/bootstrap.modules" "./modulesets-stable/"
git checkout e9fc8c35ea404420d5bf700e835f7d48d2d38ac2
./gtk-osx-setup.sh
cd ..

Expand All @@ -25,7 +24,7 @@ make install
cd ..

pushd "${HOME}/Source/jhbuild" >/dev/null
git checkout 30ef98f32c357ed3f2290a466c94bc728279cd1e
git checkout 95b4d6efdfbb54d5dd5def8d0082e629ce5f7249
popd >/dev/null

curl -LO 'https://github.com/ninja-build/ninja/releases/download/v1.11.0/ninja-mac.zip'
Expand All @@ -47,22 +46,13 @@ EOF
cp -a ~/.config/jhbuildrc-custom ~/.config/jhbuildrc-custom.bak
cat << EOF > ~/.config/jhbuildrc-custom
use_local_modulesets = True
modulesets_dir = '${PWD}/gtk-osx/modulesets-stable'
modulesets_dir = '${SOURCE_DIR}/modulesets'
setup_sdk(target="${MACOSX_DEPLOYMENT_TARGET}", architectures=["arm64"])
setup_release()
append_autogenargs("murrine-engine", 'LDFLAGS="\$LDFLAGS -lpixman-1" CFLAGS="\$CFLAGS -Wno-implicit-function-declaration"')
EOF

jhbuild bootstrap
jhbuild build -s python2,python3,python,xz,gettext,autoconf,libtool,automake,bison,pkg-config,m4-common,cmake,intltool,libxml2,libxslt,gtk-osx-docbook,libffi,libpng,expat,dbus,pixman,libtasn1,libjpeg,sqlite,zlib,freetype2,fontconfig,itstool,xorg-macros gtk+-2.0
jhbuild build openssl
cp -a "${SOURCE_DIR}/modulesets/gtk-osx-obsolete.modules" "${HOME}/.cache/jhbuild/gtk-osx-obsolete-custom.modules"
cp -a "${SOURCE_DIR}/modulesets/gtk-osx-obsolete.modules" "${HOME}/Source/jhbuild/modulesets/gtk-osx-obsolete-custom.modules"
sed -i '' 's|\(<include href="gtk-osx-random.modules"/>\)|\1<include href="gtk-osx-obsolete-custom.modules"/>|' "${HOME}/.cache/jhbuild/gtk-osx.modules"
jhbuild build tango-icon-theme
jhbuild build gtk-engines
jhbuild build murrine-engine
jhbuild build gtk-mac-integration

curl -LO https://sylpheed.sraoss.jp/sylpheed/v3.7/sylpheed-3.7.0.tar.bz2
tar -xvpf sylpheed-3.7.0.tar.bz2
Expand All @@ -72,6 +62,10 @@ patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0002-Fix-warning-on-macOS-10.15.pat
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0003-Update-sylpheed-3.4.1-osx-test1.patch-for-3.7.0.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0004-Fix-linking-with-modern-gtkmacintegration.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0005-Update-Info.plist-strings.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0006-fix-small-bug-in-addressbook-window.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0007-escape-From-lines-for-not-breaking-GPG-MIME-signatur.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0008-libsylph-ssl.c-Support-SNI-some-servers-imap.gmail.c.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0009-Fix-separator-style-before-Remove-attachments-menu-i.patch"
jhbuild run ./makeosx.sh
cd macosx/bundle
jhbuild run gtk-mac-bundler sylpheed.bundle
Expand All @@ -96,7 +90,7 @@ arch -x86_64 make install
cd ..

pushd "${HOME}/Source/jhbuild" >/dev/null
git checkout 30ef98f32c357ed3f2290a466c94bc728279cd1e
git checkout 95b4d6efdfbb54d5dd5def8d0082e629ce5f7249
popd >/dev/null

unzip ninja-mac.zip
Expand All @@ -116,22 +110,13 @@ EOF

cat << EOF > ~/.config/jhbuildrc-custom
use_local_modulesets = True
modulesets_dir = '${PWD}/gtk-osx/modulesets-stable'
modulesets_dir = '${SOURCE_DIR}/modulesets'
setup_sdk(target="${MACOSX_DEPLOYMENT_TARGET}", architectures=["x86_64"])
setup_release()
append_autogenargs("murrine-engine", 'LDFLAGS="\$LDFLAGS -lpixman-1" CFLAGS="\$CFLAGS -Wno-implicit-function-declaration"')
EOF

arch -x86_64 jhbuild bootstrap
arch -x86_64 jhbuild build -s python2,python3,python,xz,gettext,autoconf,libtool,automake,bison,pkg-config,m4-common,cmake,intltool,libxml2,libxslt,gtk-osx-docbook,libffi,libpng,expat,dbus,pixman,libtasn1,libjpeg,sqlite,zlib,freetype2,fontconfig,itstool,xorg-macros gtk+-2.0
arch -x86_64 jhbuild build openssl
cp -a "${SOURCE_DIR}/modulesets/gtk-osx-obsolete.modules" "${HOME}/.cache/jhbuild/gtk-osx-obsolete-custom.modules"
cp -a "${SOURCE_DIR}/modulesets/gtk-osx-obsolete.modules" "${HOME}/Source/jhbuild/modulesets/gtk-osx-obsolete-custom.modules"
sed -i '' 's|\(<include href="gtk-osx-random.modules"/>\)|\1<include href="gtk-osx-obsolete-custom.modules"/>|' "${HOME}/.cache/jhbuild/gtk-osx.modules"
arch -x86_64 jhbuild build tango-icon-theme
arch -x86_64 jhbuild build gtk-engines
arch -x86_64 jhbuild build murrine-engine
arch -x86_64 jhbuild build gtk-mac-integration

tar -xvpf sylpheed-3.7.0.tar.bz2
cd sylpheed-3.7.0
Expand All @@ -140,6 +125,10 @@ patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0002-Fix-warning-on-macOS-10.15.pat
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0003-Update-sylpheed-3.4.1-osx-test1.patch-for-3.7.0.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0004-Fix-linking-with-modern-gtkmacintegration.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0005-Update-Info.plist-strings.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0006-fix-small-bug-in-addressbook-window.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0007-escape-From-lines-for-not-breaking-GPG-MIME-signatur.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0008-libsylph-ssl.c-Support-SNI-some-servers-imap.gmail.c.patch"
patch -p1 -i "${SOURCE_DIR}/patches_sylpheed/0009-Fix-separator-style-before-Remove-attachments-menu-i.patch"
arch -x86_64 jhbuild run ./makeosx.sh
cd macosx/bundle
arch -x86_64 jhbuild run gtk-mac-bundler sylpheed.bundle
Expand All @@ -159,6 +148,13 @@ do
fi
done

cd sylpheed-3.7.0
for i in en $(find po -name '*.po' | sed 's|.*/|| ; s|\..*|| ; s|@.*||' | sort | uniq)
do
mkdir -p "${HOME}/Desktop/Sylpheed.app/Contents/Resources/${i}.lproj"
done
cd ..

rm -rf \
"${HOME}/.cache/g-ir-scanner" \
"${HOME}/.cache/jhbuild" \
Expand Down Expand Up @@ -231,6 +227,11 @@ find "${INSTALL_DIR}/Sylpheed.app/Contents/MacOS" -type f -print0 | while IFS= r
sign "${INSTALL_DIR}/Sylpheed.app"
notarize "${INSTALL_DIR}/Sylpheed.app" "${BUNDLE_IDENTIFIER}"

pushd "${INSTALL_DIR}" >/dev/null
cp "${SOURCE_DIR}/misc/README.rtf" ./
/usr/bin/python3 "${SOURCE_DIR}/scripts/DMGCustomizer.py"
popd >/dev/null

hdiutil create -format UDBZ -fs HFS+ -srcfolder "Sylpheed" -volname "Sylpheed" "Sylpheed_${BUNDLE_VERSION}.dmg"
sign "Sylpheed_${BUNDLE_VERSION}.dmg"
notarize "Sylpheed_${BUNDLE_VERSION}.dmg" "${BUNDLE_IDENTIFIER}"
38 changes: 38 additions & 0 deletions misc/README.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{\rtf1\ansi\ansicpg932\cocoartf1038\cocoasubrtf360
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset128 HiraKakuProN-W3;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww12140\viewh13760\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural

\f0\i\fs46 \cf0 Sylpheed for Mac OS X\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural
\i0\fs28 \cf0 version 3.7.0
\fs46 \
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural

\fs26 \cf0 \
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\sl480\slmult1\ql\qnatural\pardirnatural

\b \cf0 About Sylpheed\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
{\field{\*\fldinst{HYPERLINK "http://sylpheed.sraoss.jp/"}}{\fldrslt
\b0 \cf0 Sylpheed}}
\b0 is a simple, lightweight but featureful, and easy-to-use e-mail client.\
Sylpheed is a free software distributed under the GNU GPL.\
\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\sl480\slmult1\ql\qnatural\pardirnatural

\b \cf0 About Sylpheed for Mac OS X\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
\b0 \cf0 This software works on Mac OS X 10.9 (Mavericks) or later. It runs on any Mac with a 64-bit Intel processor or an Apple Silicon chip. It has been tested on 10.9.5 (Mavericks), 10.11.6 (El Capitan) and 12.4 (Monterey).\
Though Sylpheed for Mac OS X is stable, please note that it has various issues because it is still testing stage.\
\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\sl480\slmult1\ql\qnatural\pardirnatural

\b \cf0 Installation
\b0 \
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
\cf0 Copy Sylpheed.app to appropriate location ("Application" folder etc.).\
}
Loading

0 comments on commit b9b7224

Please sign in to comment.