Gentoo Archives: gentoo-commits

From: Bernard Cafarelli <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/plus42/files/, app-emulation/plus42/
Date: Sun, 06 Nov 2022 21:30:26
Message-Id: 1667770158.b7b4a593afb2ecb7e3f96c78626ab2ef76e97ada.voyageur@gentoo
1 commit: b7b4a593afb2ecb7e3f96c78626ab2ef76e97ada
2 Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 6 21:29:18 2022 +0000
4 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 6 21:29:18 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7b4a593
7
8 app-emulation/plus42: add 1.0.12
9
10 Closes: https://bugs.gentoo.org/847031
11 Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
12
13 app-emulation/plus42/Manifest | 1 +
14 .../files/plus42-1.0.12-fix-build-intel-lib.patch | 65 ++++++++++++++++++++++
15 app-emulation/plus42/plus42-1.0.12.ebuild | 50 +++++++++++++++++
16 3 files changed, 116 insertions(+)
17
18 diff --git a/app-emulation/plus42/Manifest b/app-emulation/plus42/Manifest
19 index 9eb537e8a8d3..0435510e248f 100644
20 --- a/app-emulation/plus42/Manifest
21 +++ b/app-emulation/plus42/Manifest
22 @@ -1,2 +1,3 @@
23 DIST plus42-upstream-1.0.10.tgz 7585424 BLAKE2B c27f5e653e07986a092efc34ed6aaf7de2b1e6c20db3300fc6bd35337032a57b4623cf9d5ecb1b0e56e1a7b6d92a4b5d04be0b9dea9fade9d0e7efe86901ca8d SHA512 d504988c5bfcf1e554ee7478c5c6d0cc7472e3ba9904fb45d2ea77bf05307e0def79002785551b6a876d714d5d4279728b329c63c7108a935b06967c65441083
24 +DIST plus42-upstream-1.0.12.tgz 7587652 BLAKE2B 22238d0e0b315f682063803d01cc2c1e943b152d8dd37998fbf81827d311f13b43e7529bf9fc229697b865dfe630ff1024052e119b5753386ac9a06db0f2c0e4 SHA512 31e380ab45d11a2e1a02ade6b9ce61aa756ee20ad8424eb404986ff536be8e91dea63b00baea607d7f0e41e0406d2bbab9f91123a637a2c87bbfe25bcabbbaa7
25 DIST plus42-upstream-1.0.9.tgz 7585218 BLAKE2B e6c09c985fcf3f037a0c1dc1f4f445ef18c4f73962ffbf46939b91d5a96c9f079bd36b328b30fcae42f0bc13ebee7a1f56e51762f225f41fb715ab88e8b93d56 SHA512 77c06cf33d375f513c6806910f6b8bdda865853e7890922174364a7d2a07e35a6bbae2e62800c7658be01fe8b3aafbfc7f53a19451475b411865fe69bef090d8
26
27 diff --git a/app-emulation/plus42/files/plus42-1.0.12-fix-build-intel-lib.patch b/app-emulation/plus42/files/plus42-1.0.12-fix-build-intel-lib.patch
28 new file mode 100644
29 index 000000000000..283c6c1435be
30 --- /dev/null
31 +++ b/app-emulation/plus42/files/plus42-1.0.12-fix-build-intel-lib.patch
32 @@ -0,0 +1,65 @@
33 +diff -Naur free42-nologo-3.0.16.orig/gtk/build-intel-lib.sh free42-nologo-3.0.16/gtk/build-intel-lib.sh
34 +--- free42-nologo-3.0.16.orig/gtk/build-intel-lib.sh 2022-10-29 17:03:11.000000000 +0200
35 ++++ free42-nologo-3.0.16/gtk/build-intel-lib.sh 2022-11-06 22:09:42.384802729 +0100
36 +@@ -10,13 +10,6 @@
37 + fi
38 + fi
39 +
40 +-which gcc >/dev/null
41 +-if [ $? -eq 0 ]; then
42 +- CC=gcc
43 +-else
44 +- CC=cc
45 +-fi
46 +-
47 + # Hack to support FreeBSD; not 100% sure what this does, but it produces a
48 + # library that passes all tests.
49 +
50 +@@ -64,8 +57,11 @@
51 + ;;
52 + esac
53 +
54 ++patch -p0 <../intel-lib-custom-cc.patch
55 ++
56 + cd LIBRARY
57 +-$MK $OS_ARG CC=$CC CALL_BY_REF=1 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=0 $ENDIAN_ARG
58 ++echo $MK $OS_ARG A=a CC=$CC CALL_BY_REF=1 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=0 $ENDIAN_ARG
59 ++$MK $OS_ARG A=a CC=$CC CALL_BY_REF=1 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=0 $ENDIAN_ARG
60 + mv libbid.a ../../gcc111libbid.a
61 + cd ../..
62 + ( echo '#ifdef FREE42_FPTEST'; echo 'const char *readtest_lines[] = {'; tr -d '\r' < IntelRDFPMathLib20U1/TESTS/readtest.in | sed 's/^\(.*\)$/"\1",/'; echo '0 };'; echo '#endif' ) > readtest_lines.cc
63 +diff -Naur free42-nologo-3.0.16.orig/gtk/intel-lib-custom-cc.patch free42-nologo-3.0.16/gtk/intel-lib-custom-cc.patch
64 +--- free42-nologo-3.0.16.orig/gtk/intel-lib-custom-cc.patch 1970-01-01 01:00:00.000000000 +0100
65 ++++ free42-nologo-3.0.16/gtk/intel-lib-custom-cc.patch 2022-11-06 22:18:35.428433045 +0100
66 +@@ -0,0 +1,31 @@
67 ++diff -Naur orig/LIBRARY/makefile.iml_head LIBRARY/makefile.iml_head
68 ++--- orig/LIBRARY/makefile.iml_head 2011-07-12 17:26:21.000000000 +0200
69 +++++ LIBRARY/makefile.iml_head 2022-11-06 22:18:17.048411637 +0100
70 ++@@ -527,12 +527,8 @@
71 ++ CC_TYPES := gcc cl
72 ++ INTEL_CC_LIST := icc icl
73 ++
74 ++-CC_NAME_INDEX := $(call GetIndex,$(CC_NAME),$(CC_NAME_LIST))
75 ++-ifeq ($(CC_NAME_INDEX),)
76 ++- $(error "Unknown CC_NAME ($(CC_NAME)). Must be one of $(CC_NAME_LIST))
77 ++-endif
78 ++
79 ++-CC_INDEX := $(call GetIndex,$(CC_NAME),$(CC_NAME_LIST))
80 +++CC_INDEX := 3
81 ++ CC_TYPE := $(word $(CC_INDEX),$(CC_TYPE_LIST))
82 ++ CC_TYPE_INDEX := $(call GetIndex,$(CC_TYPE),$(CC_TYPES))
83 ++
84 ++@@ -543,13 +539,6 @@
85 ++ _CPP := $(CC_NAME) $(call CcNameSelect,-EP,-EP,-E -P,-EP)
86 ++ _CC := $(CC_NAME) $(call CcNameSelect,, -nologo,, -nologo)
87 ++
88 ++-ifeq ($(origin CC),default)
89 ++- CC := $(_CC)
90 ++-endif
91 ++-ifeq ($(origin CPP),default)
92 ++- CPP := $(_CPP)
93 ++-endif
94 ++-
95 ++ CselCc = $(call Cset,$1,$(call CcTypeSelect,$2,$3))
96 ++
97 ++ QOPT := $(call CselCc, QOPT, -, /Q )
98
99 diff --git a/app-emulation/plus42/plus42-1.0.12.ebuild b/app-emulation/plus42/plus42-1.0.12.ebuild
100 new file mode 100644
101 index 000000000000..3812fdade255
102 --- /dev/null
103 +++ b/app-emulation/plus42/plus42-1.0.12.ebuild
104 @@ -0,0 +1,50 @@
105 +# Copyright 1999-2022 Gentoo Authors
106 +# Distributed under the terms of the GNU General Public License v2
107 +
108 +EAPI=8
109 +
110 +inherit toolchain-funcs
111 +
112 +MY_PV="${PN}-upstream-${PV}"
113 +
114 +DESCRIPTION="An Enhanced HP-42S Calculator Simulator"
115 +HOMEPAGE="https://thomasokken.com/plus42/"
116 +SRC_URI="https://thomasokken.com/plus42/upstream/${MY_PV}.tgz"
117 +
118 +LICENSE="GPL-2"
119 +SLOT="0"
120 +KEYWORDS="~amd64 ~x86"
121 +IUSE="+alsa"
122 +
123 +DEPEND="app-accessibility/at-spi2-core
124 + x11-libs/cairo
125 + x11-libs/gdk-pixbuf
126 + x11-libs/gtk+:3
127 + alsa? ( media-libs/alsa-lib )"
128 +
129 +RDEPEND="${DEPEND}"
130 +
131 +DOCS=( CREDITS HISTORY README )
132 +S="${WORKDIR}/${MY_PV}"
133 +
134 +PATCHES=(
135 + "${FILESDIR}/${PN}-1.0.9-fix-makefile.patch"
136 + "${FILESDIR}/${PN}-1.0.12-fix-build-intel-lib.patch"
137 +)
138 +
139 +src_prepare() {
140 + default
141 +}
142 +
143 +src_compile() {
144 + local myconf
145 + use alsa && myconf="AUDIO_ALSA=yes"
146 + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" ${myconf} -C gtk
147 + emake -C gtk clean
148 + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" BCD_MATH=1 ${myconf} -C gtk
149 +}
150 +
151 +src_install() {
152 + default
153 + dobin gtk/plus42bin gtk/plus42dec
154 +}