Gentoo Archives: gentoo-commits

From: "José María Alonso" <nimiux@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/free42/files/, app-emulation/free42/
Date: Sun, 10 Dec 2017 13:24:08
Message-Id: 1512912237.2c7f79b001b83723254fba87569fdbaf515503cf.nimiux@gentoo
1 commit: 2c7f79b001b83723254fba87569fdbaf515503cf
2 Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 10 13:23:18 2017 +0000
4 Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 10 13:23:57 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c7f79b0
7
8 app-emulation/free42: Bumps version to 2.0.7
9
10 Package-Manager: Portage-2.3.13, Repoman-2.3.3
11
12 app-emulation/free42/Manifest | 1 +
13 .../files/free42-2.0.7-fix-build-intel-lib.patch | 12 +++++
14 .../free42/files/free42-2.0.7-fix-makefile.patch | 58 ++++++++++++++++++++++
15 app-emulation/free42/free42-2.0.7.ebuild | 49 ++++++++++++++++++
16 4 files changed, 120 insertions(+)
17
18 diff --git a/app-emulation/free42/Manifest b/app-emulation/free42/Manifest
19 index 6543a8b94b1..f31517cf680 100644
20 --- a/app-emulation/free42/Manifest
21 +++ b/app-emulation/free42/Manifest
22 @@ -1 +1,2 @@
23 DIST free42-nologo-2.0.6.tgz 7348647 BLAKE2B 708c88b4903358c23989d515c61884ffc9feae3d43fc54f1ac8a18779cfe8aa2d0e1a2ec667e24f78da58cd94ad515399191b7dc968adbc59bb97517b34680be SHA512 078a79cc4dfa36ae7342be5b90350f4b7269f4e71777f2620c2043510d6313acbc1fa9415b75f8b01bebb2de747b9af8a26738f877c34a4d82a1fdd52c75a61d
24 +DIST free42-nologo-2.0.7.tgz 7354850 BLAKE2B 6be2f2ea912a1d47bdf8c9016e8a32e5203d982e34cbe5ef6624eac078297cd967cf08ae2bdeb7c6ad158f96e77032f449a47f01c3c8d8e312f6d46e20237cf0 SHA512 1adfccb37bdf35ecd57a6da1633ceb3bcfd0681efbc34fc9a4e4580ce235e35db9281de0d9ba659ecd33ef2b3a17eae596047b6790ffbf3e5e5ebfad600dcb8b
25
26 diff --git a/app-emulation/free42/files/free42-2.0.7-fix-build-intel-lib.patch b/app-emulation/free42/files/free42-2.0.7-fix-build-intel-lib.patch
27 new file mode 100644
28 index 00000000000..04fc844599e
29 --- /dev/null
30 +++ b/app-emulation/free42/files/free42-2.0.7-fix-build-intel-lib.patch
31 @@ -0,0 +1,12 @@
32 +diff -Nuar a/gtk/build-intel-lib.sh b/gtk/build-intel-lib.sh
33 +--- a/gtk/build-intel-lib.sh 2017-11-29 06:03:45.000000000 +0100
34 ++++ b/gtk/build-intel-lib.sh 2017-12-10 13:57:27.485971521 +0100
35 +@@ -4,7 +4,7 @@
36 + cd IntelRDFPMathLib20U1
37 + patch -p0 <../intel-lib-linux.patch
38 + cd LIBRARY
39 +-make CC=gcc CALL_BY_REF=1 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=0
40 ++make A=a CC=gcc CALL_BY_REF=1 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=0
41 + mv libbid.a ../../gcc111libbid.a
42 + cd ../..
43 + ( 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
44
45 diff --git a/app-emulation/free42/files/free42-2.0.7-fix-makefile.patch b/app-emulation/free42/files/free42-2.0.7-fix-makefile.patch
46 new file mode 100644
47 index 00000000000..ccf18766bae
48 --- /dev/null
49 +++ b/app-emulation/free42/files/free42-2.0.7-fix-makefile.patch
50 @@ -0,0 +1,58 @@
51 +diff -Nuar a/gtk/Makefile b/gtk/Makefile
52 +--- a/gtk/Makefile 2017-11-29 06:03:45.000000000 +0100
53 ++++ b/gtk/Makefile 2017-12-10 14:01:06.715970583 +0100
54 +@@ -15,11 +15,11 @@
55 + # along with this program; if not, see http://www.gnu.org/licenses/.
56 + ###############################################################################
57 +
58 +-CFLAGS = -MMD \
59 ++CFLAGS := -MMD \
60 + -Wall \
61 + -Wno-parentheses \
62 + -Wno-write-strings \
63 +- -g \
64 ++ -Wno-error=narrowing \
65 + -I/usr/X11R6/include \
66 + $(shell pkg-config --cflags gtk+-2.0) \
67 + -DVERSION="\"$(shell cat ../VERSION)\"" \
68 +@@ -27,21 +27,25 @@
69 + -DDECIMAL_GLOBAL_ROUNDING=1 \
70 + -DDECIMAL_GLOBAL_ROUNDING_ACCESS_FUNCTIONS=1 \
71 + -DDECIMAL_GLOBAL_EXCEPTION_FLAGS=1 \
72 +- -DDECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS=1
73 ++ -DDECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS=1 \
74 ++ ${CFLAGS}
75 +
76 +-CXXFLAGS = $(CFLAGS) \
77 ++CXXFLAGS := $(CFLAGS) \
78 + -fno-exceptions \
79 + -fno-rtti \
80 +- -D_WCHAR_T_DEFINED
81 ++ -D_WCHAR_T_DEFINED \
82 ++ ${CXXFLAGS}
83 +
84 +-LDFLAGS = -L/usr/X11R6/lib
85 +-LIBS = gcc111libbid.a -lXmu $(shell pkg-config --libs gtk+-2.0)
86 ++MYLDFLAGS = -L/usr/X11R6/lib
87 ++LIBS = gcc111libbid.a -lX11 -ldl -lXmu $(shell pkg-config --libs gtk+-2.0)
88 +
89 + ifeq "$(shell uname -s)" "Linux"
90 +-LDFLAGS += -Wl,--hash-style=both
91 ++MYLDFLAGS += -Wl,--hash-style=both
92 + LIBS += -lpthread
93 + endif
94 +
95 ++MYLDFLAGS += ${LDFLAGS}
96 ++
97 + SRCS = shell_main.cc shell_skin.cc skins.cc keymap.cc shell_loadimage.cc \
98 + shell_spool.cc core_main.cc core_commands1.cc core_commands2.cc \
99 + core_commands3.cc core_commands4.cc core_commands5.cc \
100 +@@ -83,7 +87,7 @@
101 + endif
102 +
103 + $(EXE): $(OBJS)
104 +- $(CXX) -o $(EXE) $(LDFLAGS) $(OBJS) $(LIBS)
105 ++ $(CXX) -o $(EXE) $(MYLDFLAGS) $(OBJS) $(LIBS)
106 +
107 + $(SRCS) skin2cc.cc keymap2cc.cc skin2cc.conf: symlinks
108 +
109
110 diff --git a/app-emulation/free42/free42-2.0.7.ebuild b/app-emulation/free42/free42-2.0.7.ebuild
111 new file mode 100644
112 index 00000000000..6e2ba52edf2
113 --- /dev/null
114 +++ b/app-emulation/free42/free42-2.0.7.ebuild
115 @@ -0,0 +1,49 @@
116 +# Copyright 1999-2017 Gentoo Foundation
117 +# Distributed under the terms of the GNU General Public License v2
118 +
119 +EAPI=6
120 +
121 +inherit eutils toolchain-funcs
122 +
123 +MY_PV="${PN}-nologo-${PV}"
124 +
125 +DESCRIPTION="An HP-42S Calculator Simulator"
126 +HOMEPAGE="http://thomasokken.com/free42/"
127 +SRC_URI="http://thomasokken.com/free42/upstream/${MY_PV}.tgz"
128 +
129 +LICENSE="GPL-2"
130 +SLOT="0"
131 +KEYWORDS="~amd64 ~x86"
132 +IUSE="alsa"
133 +
134 +DEPEND="dev-libs/atk
135 + x11-libs/cairo
136 + x11-libs/gdk-pixbuf
137 + x11-libs/gtk+:2
138 + x11-libs/pango
139 + alsa? ( media-libs/alsa-lib )"
140 +
141 +RDEPEND="${DEPEND}
142 + x11-libs/libX11
143 + x11-libs/libXmu"
144 +
145 +S="${WORKDIR}/${MY_PV}"
146 +
147 +src_prepare() {
148 + default
149 + sed -i -e 's/print_gif_name\[FILENAMELEN\]/print_gif_name\[1000\]/' \
150 + "${S}/gtk/shell_main.cc" || die
151 + epatch "${FILESDIR}"/${P}-fix-makefile.patch
152 + epatch "${FILESDIR}"/${P}-fix-build-intel-lib.patch
153 +}
154 +
155 +src_compile() {
156 + local myconf
157 + use alsa && myconf="AUDIO_ALSA=yes"
158 + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" BCD_MATH=1 ${myconf} -C "${S}/gtk"
159 +}
160 +
161 +src_install() {
162 + dodoc CREDITS HISTORY README
163 + dobin gtk/free42dec
164 +}