summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2022-05-22 21:54:34 +0200
committerBernard Cafarelli <voyageur@gentoo.org>2022-05-22 22:03:44 +0200
commit5bcd3e98832a86d3335c0f5bbf30f2b4ba83f56b (patch)
tree1fe9c7b5a89435107a5350dcfc0b0bec1f5772db /app-emulation
parentwww-client/falkon: Drop 3.1.0-r1 (diff)
downloadgentoo-5bcd3e98832a86d3335c0f5bbf30f2b4ba83f56b.tar.gz
gentoo-5bcd3e98832a86d3335c0f5bbf30f2b4ba83f56b.tar.bz2
gentoo-5bcd3e98832a86d3335c0f5bbf30f2b4ba83f56b.zip
app-emulation/plus42: new package, add 1.0.4
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/plus42/Manifest1
-rw-r--r--app-emulation/plus42/files/plus42-1.0.4-fix-build-intel-lib.patch12
-rw-r--r--app-emulation/plus42/files/plus42-1.0.4-fix-makefile.patch38
-rw-r--r--app-emulation/plus42/metadata.xml11
-rw-r--r--app-emulation/plus42/plus42-1.0.4.ebuild50
5 files changed, 112 insertions, 0 deletions
diff --git a/app-emulation/plus42/Manifest b/app-emulation/plus42/Manifest
new file mode 100644
index 000000000000..2cd97749f5d4
--- /dev/null
+++ b/app-emulation/plus42/Manifest
@@ -0,0 +1 @@
+DIST plus42-upstream-1.0.4.tgz 7583399 BLAKE2B 801c125e8b320a2ae2220595aa6244451f55938db644beb5e619c7789b506ada86b4f22e62c724af19da1240aa6c0fad791e2d6176eb4787435f16c1a44aaccc SHA512 a9c23b582047767fe0c57f35fdb4dfb72d7fdf480106a64f1d1151541c5d08e8a1a973156b0e2e5e9ca2f4f74acfbde2a1d69590c02f480d52dec20981be6c6e
diff --git a/app-emulation/plus42/files/plus42-1.0.4-fix-build-intel-lib.patch b/app-emulation/plus42/files/plus42-1.0.4-fix-build-intel-lib.patch
new file mode 100644
index 000000000000..e1e2ea89897a
--- /dev/null
+++ b/app-emulation/plus42/files/plus42-1.0.4-fix-build-intel-lib.patch
@@ -0,0 +1,12 @@
+diff -Naur free42-nologo-2.5.3.orig/gtk/build-intel-lib.sh free42-nologo-2.5.3/gtk/build-intel-lib.sh
+--- free42-nologo-2.5.3.orig/gtk/build-intel-lib.sh 2019-09-01 17:44:47.000000000 +0200
++++ free42-nologo-2.5.3/gtk/build-intel-lib.sh 2019-09-03 23:58:30.604579443 +0200
+@@ -65,7 +65,7 @@
+ esac
+
+ cd LIBRARY
+-$MK $OS_ARG CC=$CC CALL_BY_REF=1 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=0 $ENDIAN_ARG
++$MK $OS_ARG A=a CC=$CC CALL_BY_REF=1 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=0 $ENDIAN_ARG
+ mv libbid.a ../../gcc111libbid.a
+ cd ../..
+ ( 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
diff --git a/app-emulation/plus42/files/plus42-1.0.4-fix-makefile.patch b/app-emulation/plus42/files/plus42-1.0.4-fix-makefile.patch
new file mode 100644
index 000000000000..be7b40fbcd48
--- /dev/null
+++ b/app-emulation/plus42/files/plus42-1.0.4-fix-makefile.patch
@@ -0,0 +1,38 @@
+diff -Naur plus42-upstream-1.0.4.orig/gtk/Makefile plus42-upstream-1.0.4/gtk/Makefile
+--- plus42-upstream-1.0.4.orig/gtk/Makefile 2022-05-17 11:47:13.000000000 +0200
++++ plus42-upstream-1.0.4/gtk/Makefile 2022-05-22 21:41:34.492591806 +0200
+@@ -15,7 +15,7 @@
+ # along with this program; if not, see http://www.gnu.org/licenses/.
+ ###############################################################################
+
+-CFLAGS = -MMD \
++CFLAGS := -MMD \
+ -Wall \
+ -Wno-parentheses \
+ -Wno-write-strings \
+@@ -35,11 +35,13 @@
+ -DDECIMAL_GLOBAL_ROUNDING=1 \
+ -DDECIMAL_GLOBAL_ROUNDING_ACCESS_FUNCTIONS=1 \
+ -DDECIMAL_GLOBAL_EXCEPTION_FLAGS=1 \
+- -DDECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS=1
++ -DDECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS=1 \
++ ${CFLAGS}
+
+-CXXFLAGS = $(CFLAGS) \
++CXXFLAGS := $(CFLAGS) \
+ -fno-rtti \
+- -D_WCHAR_T_DEFINED
++ -D_WCHAR_T_DEFINED \
++ ${CXXFLAGS}
+
+ LIBS = gcc111libbid.a $(shell pkg-config --libs gtk+-3.0)
+
+@@ -118,7 +120,7 @@
+ ./keymap2cc
+
+ gcc111libbid.a:
+- sh ./build-intel-lib.sh
++ +sh ./build-intel-lib.sh
+ ln -s IntelRDFPMathLib20U1/TESTS/readtest.c
+
+ symlinks:
diff --git a/app-emulation/plus42/metadata.xml b/app-emulation/plus42/metadata.xml
new file mode 100644
index 000000000000..3104198ce549
--- /dev/null
+++ b/app-emulation/plus42/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">thomasokken/plus42desktop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-emulation/plus42/plus42-1.0.4.ebuild b/app-emulation/plus42/plus42-1.0.4.ebuild
new file mode 100644
index 000000000000..8239110a87e8
--- /dev/null
+++ b/app-emulation/plus42/plus42-1.0.4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_PV="${PN}-upstream-${PV}"
+
+DESCRIPTION="An Enhanced HP-42S Calculator Simulator"
+HOMEPAGE="https://thomasokken.com/plus42/"
+SRC_URI="https://thomasokken.com/plus42/upstream/${MY_PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+alsa"
+
+DEPEND="dev-libs/atk
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:3
+ alsa? ( media-libs/alsa-lib )"
+
+RDEPEND="${DEPEND}"
+
+DOCS=( CREDITS HISTORY README )
+S="${WORKDIR}/${MY_PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.0.4-fix-makefile.patch"
+ "${FILESDIR}/${PN}-1.0.4-fix-build-intel-lib.patch"
+)
+
+src_prepare() {
+ default
+}
+
+src_compile() {
+ local myconf
+ use alsa && myconf="AUDIO_ALSA=yes"
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" ${myconf} -C gtk
+ emake -C gtk clean
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" BCD_MATH=1 ${myconf} -C gtk
+}
+
+src_install() {
+ default
+ dobin gtk/plus42bin gtk/plus42dec
+}