site  contact  subhomenews

libetpan and bogofilter compiled in OE

December 09, 2021 — BarryK

Earlier today I posted about package 'litehtml' compiled in OpenEmbedded:

https://bkhome.org/news/202112/litehtml-compiled-in-openembedded.html

Two more optional dependencies of Claws Mail are 'libetpan' and 'bogofilter', now also compiled in OE. Recipe for libetpan:

# Recipe created by recipetool
# recipetool create -o libetpan_1.9.4.bb https://github.com/dinhvh/libetpan/archive/refs/tags/1.9.4.tar.gz

LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f18ebe7e452708c26f83954f81062ba7"

SRC_URI = "https://github.com/dinhvh/libetpan/archive/refs/tags/${PV}.tar.gz"
SRC_URI[md5sum] = "66bc8ccb241123aa61d405a576763a44"
SRC_URI[sha256sum] = "82ec8ea11d239c9967dbd1717cac09c8330a558e025b3e4dc6a7594e80d13bb1"

#just threw in all those -native in case needed...
DEPENDS = "gnutls gnutls-native openssl openssl-native zlib curl curl-native \
db db-native expat expat-native nettle nettle-native libunistring gmp"

inherit autotools pkgconfig gettext

EXTRA_OECONF = " --with-zlib --enable-ipv6 --disable-lockfile --enable-shared --disable-static"

do_configure_prepend() {
touch ${S}/README
}

HOMEPAGE = "http://www.etpan.org"
SECTION = "libs"
SUMMARY = "A library for communicating with mail and news servers"

As commented above, those *-native dependencies are probably not needed. OE is a cross-compiled environment, for example, you might run OE on a x86_64 host system and compile for a aarch64 target.
Unfortunately, some packages need to run a binary executable, either compiled within the package being built, or in a dependency. To cater for that, there are these -native packages, that have binary executables that will execute in th host system.
An example was in the previous blog post, where the 'xxd' binary executable was required to build litehtml.
OE is very sophisticated.

Here is the recipe for bogofilter:

# Recipe created by recipetool
# recipetool create -o bogofilter_1.2.5.bb https://downloads.sourceforge.net/project/bogofilter/bogofilter-stable/bogofilter-1.2.5.tar.xz

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=4eedb06443f9256fd583c69b43864b6e"

SRC_URI = "https://downloads.sourceforge.net/project/bogofilter/bogofilter-stable/bogofilter-${PV}.tar.xz"
SRC_URI[md5sum] = "8763f87adfff7b802ced177d8c654539"
SRC_URI[sha256sum] = "3248a1373bff552c500834adbea4b6caee04224516ae581fb25a4c6a6dee89ea"

DEPENDS = "flex-native gsl sqlite3 sqlite3-native xmlto-native"

inherit pkgconfig perlnative autotools

EXTRA_OECONF = " --without-included-gsl --with-database=sqlite3 \
--with-charset=iso-8859-1 --enable-unicode"

#/usr/bin/pogoupgrade perl script has corrupted shebang, delete it:
do_install_append() {
rm -f ${D}/usr/bin/bogoupgrade
}

HOMEPAGE = "https://sourceforge.net/projects/bogofilter/"
SUMMARY = "A fast Bayesian spam filter"

Next step is compile Claws Mail in OE. I mentioned that already compiled it in a running EasyOS, but would like it to be automated in OE. So, when next do a aarch64 build in OE, will just be able to sit back and watch it compile 850+ packages.    

Tags: easy