Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 591206 - games-misc/fortune-mod-1.99.1-r2: ~arm64 keyword request
Summary: games-misc/fortune-mod-1.99.1-r2: ~arm64 keyword request
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-08-13 17:34 UTC by Roy Bamford
Modified: 2020-05-01 04:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Bamford gentoo-dev 2016-08-13 17:34:57 UTC
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
Comment 1 Craig Andrews gentoo-dev 2016-12-30 13:49:52 UTC
Does fortune 1.99.3 build on arm64? If not, this patch should be submitted upstream: https://github.com/shlomif/fortune-mod
Comment 2 Roy Bamford gentoo-dev 2018-03-10 12:05:12 UTC
--- 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.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-01 04:11:05 UTC
Now has keywords on ~arm64.