To build games-misc/fortune-mod-1.99.1-r2 on arm64 requires the following patch. --- fortune/fortune.c 2016-08-13 18:07:29.687293797 +0100 +++ fortune/fortune.c_new 2016-08-13 18:05:16.796074190 +0100 @@ -286,6 +286,46 @@ #define STR(str) ((str) == NULL ? "NULL" : (str)) +/* arm64 does not seem to have rpl_realloc and hates malloc + returning NULL unless its an error*/ + +#undef malloc + +void *malloc (); + +/* Allocate an N-byte block of memory from the heap. + If N is zero, allocate a 1-byte block. */ + +void* rpl_malloc (size_t n) +{ + if (n == 0) + n = 1; + return malloc (n); +} + +#undef realloc +void * rpl_realloc (void *p, size_t n) +{ + void *result; + + if (n == 0) + { + n = 1; + } + + if (p == NULL) + { + result = malloc (n); + } + else + result = realloc (p, n); + + if (result == NULL) + errno = ENOMEM; + + return result; +} + /* * calc_equal_probs: Reproducible: Always Actual Results: Tested on Raspberry Pi3 in 64 bit mode. CFLAGS="-march=armv8-a+crc -mtune=cortex-a53
Does fortune 1.99.3 build on arm64? If not, this patch should be submitted upstream: https://github.com/shlomif/fortune-mod
--- fortune-mod-1.99.1-r2.ebuild 2018-03-10 11:09:51.802293561 -0000 +++ fortune-mod-1.99.5.ebuild 2018-03-10 11:29:50.256782616 -0000 @@ -5,8 +5,8 @@ inherit eutils toolchain-funcs DESCRIPTION="The notorious fortune program" -HOMEPAGE="http://www.redellipse.net/code/fortune" -SRC_URI="http://www.redellipse.net/code/downloads/${P}.tar.gz" +HOMEPAGE="http://www.shlomifish.org/open-source/projects/fortune-mod" +SRC_URI="http://www.shlomifish.org/open-source/projects/fortune-mod/arcs/${P}.tar.xz" LICENSE="BSD" SLOT="0" @@ -17,8 +17,6 @@ RDEPEND="${DEPEND}" src_prepare() { - epatch "${FILESDIR}"/${P}-gentoo.patch \ - "${FILESDIR}"/01_all_fortune_all-fix.patch sed -i \ -e 's:/games::' \ fortune-mod-1.99.5 works on arm64, however, that also installs all the fortune files too, so the above patch is no more than a proof of concept. USE=offensive still works. In view of bug https://bugs.gentoo.org/634288 this package is unlikely to be a suitable version bump in its present form.
Now has keywords on ~arm64.