aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2021-03-25 19:09:35 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2021-03-25 19:09:35 +0000
commit4ca9027198b0dd3eef2f2e6bba75dac979f56cca (patch)
treeda1d7c57f0f103dd7399de6d607db0de06a878c3 /misc
parent862a720c830ac23e16b2644b91b122ca4aca2dbf (diff)
downloadports-4ca9027198b0dd3eef2f2e6bba75dac979f56cca.tar.gz
ports-4ca9027198b0dd3eef2f2e6bba75dac979f56cca.zip
misc/free42: fix build on non-x86
1. fexcept_t is available on FreeBSD via fenv.h. 2. new_g and new_rad in core_commands6.cc actually need signed char. 3. Add FreeBSD's names for ARM and POWER to build-intel-lib.sh. PR: 254556 Approved by: yuri (maintainer)
Notes
Notes: svn path=/head/; revision=569222
Diffstat (limited to 'misc')
-rw-r--r--misc/free42/Makefile8
-rw-r--r--misc/free42/files/patch-common_bid__functions.h14
-rw-r--r--misc/free42/files/patch-common_core__commands6.cc13
-rw-r--r--misc/free42/files/patch-gtk_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h14
-rw-r--r--misc/free42/files/patch-gtk_IntelRDFPMathLib20U1_TESTS_test__bid__functions.h14
-rw-r--r--misc/free42/files/patch-gtk_build-intel-lib.sh26
-rw-r--r--misc/free42/files/patch-gtk_intel-lib-freebsd.patch17
7 files changed, 99 insertions, 7 deletions
diff --git a/misc/free42/Makefile b/misc/free42/Makefile
index 883146317176..9f16b113a259 100644
--- a/misc/free42/Makefile
+++ b/misc/free42/Makefile
@@ -12,19 +12,13 @@ COMMENT= Simulation of the HP-42S scientific calculator and HP-82240 printer
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
-BROKEN_aarch64= fails to link: c++: error: no such file or directory: 'gcc111libbid.a'
-BROKEN_armv6= fails to link: c++: error: no such file or directory: 'gcc111libbid.a'
-BROKEN_mips64= fails to link: c++: error: no such file or directory: 'gcc111libbid.a'
-BROKEN_powerpc64= fails to link: c++: error: no such file or directory: 'gcc111libbid.a'
-BROKEN_riscv64= fails to link: c++: error: no such file or directory: 'gcc111libbid.a'
-
LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2
USES= compiler dos2unix gmake gnome localbase pkgconfig tar:tgz xorg
USE_GNOME= atk cairo gdkpixbuf2 gtk30 pango
USE_XORG= x11 xmu
-DOS2UNIX_FILES= gtk/IntelRDFPMathLib20U1/LIBRARY/float128/op_system.h gtk/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h
+DOS2UNIX_FILES= gtk/IntelRDFPMathLib20U1/LIBRARY/float128/op_system.h gtk/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h gtk/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h common/bid_functions.h gtk/IntelRDFPMathLib20U1/TESTS/test_bid_functions.h
CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}}
CXXFLAGS_clang= -Wno-c++11-narrowing -Wno-constant-conversion # to accommodate some code breaking with clang-50
diff --git a/misc/free42/files/patch-common_bid__functions.h b/misc/free42/files/patch-common_bid__functions.h
new file mode 100644
index 000000000000..816794317f02
--- /dev/null
+++ b/misc/free42/files/patch-common_bid__functions.h
@@ -0,0 +1,14 @@
+--- common/bid_functions.h.orig 2021-03-25 17:43:15 UTC
++++ common/bid_functions.h
+@@ -159,11 +159,7 @@ typedef unsigned long fexcept_t;
+ typedef unsigned bid__int64 fexcept_t;
+ #endif
+ #else
+-#ifdef __QNX__
+ #include <fenv.h>
+-#else
+-typedef unsigned short int fexcept_t;
+-#endif
+ #endif
+ #endif
+
diff --git a/misc/free42/files/patch-common_core__commands6.cc b/misc/free42/files/patch-common_core__commands6.cc
new file mode 100644
index 000000000000..55583b8e7f28
--- /dev/null
+++ b/misc/free42/files/patch-common_core__commands6.cc
@@ -0,0 +1,13 @@
+--- common/core_commands6.cc.orig 2021-03-17 00:38:17 UTC
++++ common/core_commands6.cc
+@@ -1096,8 +1096,8 @@ int docmd_stoflag(arg_struct *arg) {
+ p <<= 1;
+ }
+
+- char new_g = !flags.f.rad && flags.f.grad;
+- char new_rad = flags.f.rad || flags.f.grad;
++ signed char new_g = !flags.f.rad && flags.f.grad;
++ signed char new_rad = flags.f.rad || flags.f.grad;
+ if (new_g == old_g)
+ new_g = -1;
+ if (new_rad == old_rad)
diff --git a/misc/free42/files/patch-gtk_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h b/misc/free42/files/patch-gtk_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h
new file mode 100644
index 000000000000..1369a7f697f9
--- /dev/null
+++ b/misc/free42/files/patch-gtk_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h
@@ -0,0 +1,14 @@
+--- gtk/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h.orig 2021-03-25 17:43:14 UTC
++++ gtk/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
+@@ -159,11 +159,7 @@ typedef unsigned long fexcept_t;
+ typedef unsigned bid__int64 fexcept_t;
+ #endif
+ #else
+-#ifdef __QNX__
+ #include <fenv.h>
+-#else
+-typedef unsigned short int fexcept_t;
+-#endif
+ #endif
+ #endif
+
diff --git a/misc/free42/files/patch-gtk_IntelRDFPMathLib20U1_TESTS_test__bid__functions.h b/misc/free42/files/patch-gtk_IntelRDFPMathLib20U1_TESTS_test__bid__functions.h
new file mode 100644
index 000000000000..f63506109004
--- /dev/null
+++ b/misc/free42/files/patch-gtk_IntelRDFPMathLib20U1_TESTS_test__bid__functions.h
@@ -0,0 +1,14 @@
+--- gtk/IntelRDFPMathLib20U1/TESTS/test_bid_functions.h.orig 2021-03-25 17:58:53 UTC
++++ gtk/IntelRDFPMathLib20U1/TESTS/test_bid_functions.h
+@@ -165,11 +165,7 @@ typedef unsigned long fexcept_t;
+ typedef unsigned bid__int64 fexcept_t;
+ #endif
+ #else
+-#ifdef __QNX__
+ #include <fenv.h>
+-#else
+-typedef unsigned short int fexcept_t;
+-#endif
+ #endif
+ #endif
+
diff --git a/misc/free42/files/patch-gtk_build-intel-lib.sh b/misc/free42/files/patch-gtk_build-intel-lib.sh
new file mode 100644
index 000000000000..a7d873ad9e8f
--- /dev/null
+++ b/misc/free42/files/patch-gtk_build-intel-lib.sh
@@ -0,0 +1,26 @@
+--- gtk/build-intel-lib.sh.orig 2021-03-05 01:52:42 UTC
++++ gtk/build-intel-lib.sh
+@@ -43,6 +43,8 @@ fi
+
+ tar xvfz ../inteldecimal/IntelRDFPMathLib20U1.tar.gz
+ cd IntelRDFPMathLib20U1
++sed -i '' -e 's/\r//g' LIBRARY/src/bid_functions.h
++patch -p0 <../intel-lib-freebsd.patch
+ patch -p0 <../intel-lib-linux.patch
+
+ # When building for architectures other than x86 or x86_64, I remove the
+@@ -55,11 +58,11 @@ patch -p0 <../intel-lib-linux.patch
+ # it to x86_64 works when targeting arm64, a 64-bit platform.
+ # Of course, proceed with caution. Your mileage may vary.
+
+-case `uname -m` in
+- armv7|armv7l|ppc)
++case `uname -p` in
++ armv6|armv7|armv7l|ppc|powerpc|powerpcspe|mips)
+ patch -p0 <../intel-lib-unknown-32bit.patch
+ ;;
+- aarch64|arm64|i86pc)
++ aarch64|arm64|i86pc|powerpc64|powerpc64le|mips64|riscv64)
+ patch -p0 <../intel-lib-unknown-64bit.patch
+ ;;
+ esac
diff --git a/misc/free42/files/patch-gtk_intel-lib-freebsd.patch b/misc/free42/files/patch-gtk_intel-lib-freebsd.patch
new file mode 100644
index 000000000000..8cbba70bb94e
--- /dev/null
+++ b/misc/free42/files/patch-gtk_intel-lib-freebsd.patch
@@ -0,0 +1,17 @@
+--- gtk/intel-lib-freebsd.patch.orig 2021-03-25 18:27:04 UTC
++++ gtk/intel-lib-freebsd.patch
+@@ -0,0 +1,14 @@
++--- LIBRARY/src/bid_functions.h.orig 2021-03-25 17:43:14 UTC
+++++ LIBRARY/src/bid_functions.h
++@@ -159,11 +159,7 @@ typedef unsigned long fexcept_t;
++ typedef unsigned bid__int64 fexcept_t;
++ #endif
++ #else
++-#ifdef __QNX__
++ #include <fenv.h>
++-#else
++-typedef unsigned short int fexcept_t;
++-#endif
++ #endif
++ #endif
++