meta-openembedded/meta-oe/recipes-support/procmail/procmail_3.22.bb
Liu Yiding 1b421ef711
procmail: fix compile failure with gcc-15
These failures doesn't broken compiling, but not generate files under /usr/bin
| userland@pumpkin3:/mnt/test/build_auh/tmp/work/core2-64-poky-linux/procmail/3.22/image/usr/bin$ ls
| formail  lockfile  mailstat  procmail

part of error messages:
| In file included from recommend.c:6:
| includes.h:334:12: error: conflicting types for 'uname'; have 'int(void)'
|   334 | extern int uname();                                      /* so we fix it :-) /
|       |            ^~~~~
| In file included from sublib.c:13:
| includes.h:334:12: error: conflicting types for 'uname'; have 'int(void)'
|   334 | extern int uname();                                      / so we fix it :-) /
|       |            ^~~~~
| In file included from procmail.h:3,
|                  from procmail.c:20:
| includes.h:334:12: error: conflicting types for 'uname'; have 'int(void)'
|   334 | extern int uname();                                      / so we fix it :-) */
|       |            ^~~~~
| In file included from includes.h:67:
| /datadrive/ubinux/workdir/build-dir/202506/build-ubinux-armv8/tmp/work/aarch64-ubinux-linux/procmail/3.22/recipe-sysroot/usr/include/sys/utsname.h:81:12: note: previous declaration of 'uname' with type 'int(struct utsname *)'
|    81 | extern int uname (struct utsname *__name) _THROW;
|       |            ^~~~~
| In file included from includes.h:67:
| /datadrive/ubinux/workdir/build-dir/202506/build-ubinux-armv8/tmp/work/aarch64-ubinux-linux/procmail/3.22/recipe-sysroot/usr/include/sys/utsname.h:81:12: note: previous declaration of 'uname' with type 'int(struct utsname )'
|    81 | extern int uname (struct utsname _name) THROW;
|       |            ^~~~~
| In file included from includes.h:67:
| /datadrive/ubinux/workdir/build-dir/202506/build-ubinux-armv8/tmp/work/aarch64-ubinux-linux/procmail/3.22/recipe-sysroot/usr/include/sys/utsname.h:81:12: note: previous declaration of 'uname' with type 'int(struct utsname )'
|    81 | extern int uname (struct utsname __name) __THROW;
|       |            ^~~~~
| In file included from includes.h:67:
| /datadrive/ubinux/workdir/build-dir/202506/build-ubinux-armv8/tmp/work/aarch64-ubinux-linux/procmail/3.22/recipe-sysroot/usr/include/sys/utsname.h:81:12: note: previous declaration of 'uname' with type 'int(struct utsname )'
|    81 | extern int uname (struct utsname __name) __THROW;
|       |            ^~~~~
| recommend.c: In function 'main':
| recommend.c:15:5: warning: old-style function definition [-Wold-style-definition]
|    15 | int main(argc,argv)const int argc;const charconst argv[];
|       |     ^~~~
| procmail.c: In function 'savepass':
| procmail.c:71:22: warning: old-style function definition [-Wold-style-definition]
|    71 | static auth_identitysavepass(spass,uid)auth_identityconst spass;
|       |                      ^~~~~~~~
| procmail.c:76:12: error: too many arguments to function 'auth_finduid'; expected 0, have 2
|    76 |   if(tpass=auth_finduid(uid,0))                           / save by copying */
|       |            ^~~~~~~~~~~~ ~~~
| In file included from procmail.c:36:
| authenticate.h:15:3: note: declared here
|    15 |  auth_finduid Q((const uid_t uid,const int sock));
|       |   ^~~~~~~~~~~~
| procmail.c: In function 'main':
| procmail.c:97:5: warning: old-style function definition [-Wold-style-definition]
|    97 | int main(argc,argv)int argc;const charconst argv[];
|       |     ^~~~
| procmail.c:212:9: error: too many arguments to function 'checkprivFrom'; expected 0, have 3
|   212 |         checkprivFrom(euid,passinvk?auth_username(passinvk):0,override);
|       |         ^~~~~~~~~~~~~~ ~~~~
| In file included from procmail.c:41:
| from.h:9:2: note: declared here
|     9 |  checkprivFrom Q((uid_t euid,const charlogname,int override));
|       |  ^~~~~~~~~~~~~~
| procmail.c:213:9: error: too many arguments to function 'doumask'; expected 0, have 1
|   213 |         doumask(INIT_UMASK);               / allowed to set the From line? */
|       |         ^~~~~~~

Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-06-09 21:24:07 -07:00

54 lines
2.2 KiB
BlitzBasic

SUMMARY = "Mail processing program"
DESCRIPTION = "Procmail can be used to create mail-servers, mailing lists, sort your\
incoming mail into separate folders/files (real convenient when subscribing\
to one or more mailing lists or for prioritising your mail), preprocess\
your mail, start any programs upon mail arrival (e.g. to generate different\
chimes on your workstation for different types of mail) or selectively\
forward certain incoming mail automatically to someone."
HOMEPAGE = "http://www.procmail.org/"
SECTION = "Applications/System"
SRC_URI = "http://www.ring.gr.jp/archives/net/mail/${BPN}/${BP}.tar.gz \
file://from-debian-to-fix-compile-errors.patch \
file://from-debian-to-modify-parameters.patch \
file://from-debian-to-fix-man-file.patch \
file://man-file-mailstat.1-from-debian.patch \
file://CVE-2014-3618.patch \
file://CVE-2017-16844.patch \
file://gcc14.patch \
file://0001-fix-uname-declaration.patch \
file://0001-fix-too-many-arguments-issue.patch \
"
SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117"
LICENSE = "GPL-2.0-only & Artistic-1.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=a71e50e197a992c862379e576e669757 \
file://Artistic;md5=505e00d03c3428cde21b17b2a386590e"
DEPENDS = "libnet"
inherit autotools-brokensep
do_configure() {
find examples -type f | xargs chmod 644
export CC="${BUILD_CC}"
export LD="${BUILD_LD}"
export CFLAGS="${BUILD_CFLAGS}"
export AR="${BUILD_AR}"
export AS="${BUILD_AS}"
make TARGET_CFLAGS="$TARGET_CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${BUILD_LDFLAGS}" autoconf.h
}
do_compile() {
oe_runmake -i CFLAGS="$TARGET_CFLAGS -Wno-comments -Wno-implicit-int -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}"
}
do_install() {
install -d ${D}${bindir}
install -d ${D}${mandir}/man1
install -d ${D}${mandir}/man5
oe_runmake -i BASENAME=${D}/usr MANDIR=${D}${mandir} install
install -m 0644 debian/mailstat.1 ${D}${mandir}/man1
}
CVE_STATUS[CVE-1999-0475] = "fixed-version: No action required. The current version (3.22) is not affected by the CVE."