mailnews: update recipe to build again (#2146)

Practically copying large parts of the BeZilla recipe and patch.
Thanks, Diver!
This commit is contained in:
humdinger
2018-01-27 07:10:05 +01:00
committed by Sergei Reznikov
parent 65646fad14
commit 259001925d
2 changed files with 557 additions and 43 deletions

View File

@@ -1,62 +1,138 @@
SUMMARY="Fork of Mozilla Thunderbird for Haiku"
SUMMARY="A fork of Mozilla's email client Thunderbird"
DESCRIPTION="Thunderbird is an open source mail client. \
It achieves balance between ease of use and customization, catering to the \
needs of both casual and power users."
needs of both casual and power users. So does its fork MailNews."
HOMEPAGE="https://github.com/mmadia/bezilla"
SOURCE_URI="git+https://github.com/mmadia/bezilla.git#686254"
REVISION="1"
LICENSE="MPL v1.1"
COPYRIGHT="1995-2009 Mozilla Developers and Contributors"
LICENSE="MPL v1.1"
REVISION="2"
gitSrcRevision="6862542e81d0407f8fbdb8cf96a48fdc3156e902"
SOURCE_URI="$HOMEPAGE/archive/$gitSrcRevision.tar.gz"
CHECKSUM_SHA256="ecdb6e15bd3a48e4b3e036e7fe3c12341c36ddef621403c558a15441cf364d79"
SOURCE_DIR="bezilla-$gitSrcRevision"
PATCHES="mailnews-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 ?arm"
SECONDARY_ARCHITECTURES="x86_gcc2 x86 ?arm"
ARCHITECTURES="x86_gcc2 x86_64"
PROVIDES="
mailnews$secondaryArchSuffix = $portVersion
cmd:thunderbird$secondaryArchSuffix = $portVersion
app:MailNews$secondaryArchSuffix = $portVersion
mailnews = $portVersion
cmd:thunderbird = $portVersion
app:MailNews = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
haiku
lib:libglib_2.0
lib:libIDL_2
lib:libintl
lib:libpng16
lib:libz
"
if [ $effectiveTargetArchitecture == x86_64 ]; then
REQUIRES+="
lib:libnspr4
"
fi
PROVIDES_devel="
mailnews_devel = $portVersion
cmd:thunderbird_config = $portVersion
"
REQUIRES_devel="
mailnews == $portVersion base
"
BUILD_REQUIRES="
devel:libidl$secondaryArchSuffix
devel:libglib$secondaryArchSuffix
haiku_devel
devel:libIDL_2
devel:libglib_2.0
devel:libpng16
"
if [ $effectiveTargetArchitecture == x86_64 ]; then
BUILD_REQUIRES+="
devel:libnspr4
"
fi
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:gcc
cmd:m4
cmd:make
cmd:gawk
cmd:perl
cmd:xargs
cmd:tar
cmd:zip
cmd:autoconf_2.13$secondaryArchSuffix
"
PATCHES="mailnews-2.0.0.25.patchset"
cmd:autoconf_2.13
cmd:libtoolize
cmd:pkg_config
"
BUILD()
{
cd mozilla
pushd build/autoconf
chmod +x mozconfig-find
libtoolize -fci
popd
autoconf-2.13
pushd nsprpub
autoconf-2.13
popd
# builtin version of libnspr4 doesn't built on x86_64
if [ $effectiveTargetArchitecture = x86_gcc2 ]; then
pushd nsprpub
autoconf-2.13
popd
fi
pushd directory/c-sdk
autoconf-2.13
popd
export MOZCONFIG=../supporting-files/mozilla-configs/mailnews.mozconfig
export MOZ_CO_PROJECT=mail
export MOZ_APP_NAME=MailNews
export MOZ_APP_DISPLAYNAME=MailNews
export AUTOCONF='autoconf-2.13'
export BUILD_OPT=1
if [ $effectiveTargetArchitecture == x86_64 ]; then
opt_flags='--enable-optimize=-O3 -fno-strict-aliasing -fpermissive'
fi
if [ $effectiveTargetArchitecture = x86_gcc2 ]; then
opt_flags='--enable-optimize=-O3 -fthread-jumps -fforce-addr -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -malign-functions=4 -malign-jumps=4'
fi
# export MOZCONFIG=../supporting-files/mozilla-configs/browser.mozconfig
# runConfigure breaks configure with opt_flags
# runConfigure --omit-dirs 'docDir dataRootDir' configure
./configure \
--prefix=$prefix \
--bindir=$binDir \
--libdir=$libDir \
--datadir=$prefix/data \
--includedir=$includeDir \
--mandir=$manDir \
--enable-application=mail \
--disable-updater \
--disable-oji \
--disable-svg \
--disable-canvas \
--with-system-png \
--with-system-zlib \
--with-system-nspr \
--enable-nspr-threads \
--disable-tests \
--disable-ipv6 \
--enable-cpp-rtti \
--disable-cpp-exceptions \
--disable-pedantic \
--enable-static --disable-shared \
--enable-strip \
--enable-reorder \
--disable-debug \
"$opt_flags"
runConfigure --omit-dirs 'docDir dataRootDir' configure
make $jobArgs
}
@@ -71,8 +147,7 @@ INSTALL()
mv $appsDir/MailNews/thunderbird-bin $appsDir/MailNews/MailNews
# creating the lib and add-ons
mkdir $appsDir/MailNews/lib
mkdir $appsDir/MailNews/add-ons
mkdir -p $appsDir/MailNews/{add-ons,lib}
# arranging the files in lib and add-ons directories
cd $appsDir/MailNews
@@ -102,13 +177,3 @@ INSTALL()
addAppDeskbarSymlink $appsDir/MailNews/MailNews
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
mailnews${secondaryArchSuffix}_devel = $portVersion
cmd:thunderbird_config$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
mailnews$secondaryArchSuffix == $portVersion base
"