---- src/gui/debugger/dbg_bkpts.c
-+++ src/gui/debugger/dbg_bkpts.c
+--- a/src/gui/debugger/dbg_bkpts.c
++++ b/src/gui/debugger/dbg_bkpts.c
@@ -29,10 +29,15 @@
# include <config.h>
#endif
#include "intl.h"
#include "paths.h"
#include "support.h"
---- src/gui/debugger/dbg_regs.c
-+++ src/gui/debugger/dbg_regs.c
+--- a/src/gui/debugger/dbg_regs.c
++++ b/src/gui/debugger/dbg_regs.c
@@ -28,14 +28,19 @@
# include <config.h>
#endif
#include "intl.h"
#include "paths.h"
#include "support.h"
---- src/gui/debugger/dbg_pclog.c
-+++ src/gui/debugger/dbg_pclog.c
+--- a/src/gui/debugger/dbg_pclog.c
++++ b/src/gui/debugger/dbg_pclog.c
@@ -31,6 +31,11 @@
#include <gtk/gtk.h>
#include <glade/glade.h>
#include "intl.h"
#include "paths.h"
#include "support.h"
---- src/gui/debugger/dbg_wnds.c
-+++ src/gui/debugger/dbg_wnds.c
+--- a/src/gui/debugger/dbg_wnds.c
++++ b/src/gui/debugger/dbg_wnds.c
@@ -38,6 +38,11 @@
#include <windows.h>\r
#endif\r
#include "intl.h"\r
#include "ti68k_int.h"\r
#include "struct.h"\r
---- src/gui/debugger/dbg_mem.c
-+++ src/gui/debugger/dbg_mem.c
+--- a/src/gui/debugger/dbg_mem.c
++++ b/src/gui/debugger/dbg_mem.c
@@ -33,6 +33,11 @@
#include <glade/glade.h>
#include <gdk/gdkkeysyms.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
---- src/gui/debugger/dbg_iop.c
-+++ src/gui/debugger/dbg_iop.c
+--- a/src/gui/debugger/dbg_iop.c
++++ b/src/gui/debugger/dbg_iop.c
@@ -28,13 +28,18 @@
# include <config.h>
#endif
#include "intl.h"
#include "paths.h"
#include "support.h"
---- src/gui/debugger/dbg_stack.c
-+++ src/gui/debugger/dbg_stack.c
+--- a/src/gui/debugger/dbg_stack.c
++++ b/src/gui/debugger/dbg_stack.c
@@ -28,11 +28,16 @@
# include <config.h>
#endif
#include "intl.h"
#include "paths.h"
#include "support.h"
---- src/gui/debugger/dbg_all.c
-+++ src/gui/debugger/dbg_all.c
+--- a/src/gui/debugger/dbg_all.c
++++ b/src/gui/debugger/dbg_all.c
@@ -38,6 +38,13 @@
#include <windows.h>
#endif
#include "ti68k_int.h"
#include "struct.h"
#include "dbg_all.h"
---- src/gui/debugger/dbg_code.c
-+++ src/gui/debugger/dbg_code.c
+--- a/src/gui/debugger/dbg_code.c
++++ b/src/gui/debugger/dbg_code.c
@@ -28,11 +28,16 @@
# include <config.h>
#endif
#include "intl.h"
#include "paths.h"
#include "support.h"
---- src/gui/debugger/dbg_heap.c
-+++ src/gui/debugger/dbg_heap.c
+--- a/src/gui/debugger/dbg_heap.c
++++ b/src/gui/debugger/dbg_heap.c
@@ -31,6 +31,11 @@
#include <gtk/gtk.h>
#include <glade/glade.h>
#include "intl.h"
#include "paths.h"
#include "support.h"
---- src/gui/debugger/dbg_dock.c
-+++ src/gui/debugger/dbg_dock.c
+--- a/src/gui/debugger/dbg_dock.c
++++ b/src/gui/debugger/dbg_dock.c
@@ -37,11 +37,16 @@
# include <config.h>\r
#endif\r
#include "intl.h"\r
#include "paths.h"\r
#include "support.h"\r
---- src/gui/calc/calc.c
-+++ src/gui/calc/calc.c
+--- a/src/gui/calc/calc.c
++++ b/src/gui/calc/calc.c
@@ -39,6 +39,11 @@
#include <glade/glade.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "intl.h"
#include "paths.h"
#include "skinops.h"
---- src/gui/calc/screen.c
-+++ src/gui/calc/screen.c
+--- a/src/gui/calc/screen.c
++++ b/src/gui/calc/screen.c
@@ -29,11 +29,16 @@
# include <config.h>
#endif /* */
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit eutils
+
+DESCRIPTION="Texas Instruments hand-helds emulator"
+HOMEPAGE="http://lpg.ticalc.org/prj_tiemu/"
+SRC_URI="http://repo.calcforge.org/debian/source/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dbus nls sdl threads xinerama"
+
+RDEPEND="sci-libs/libticables2
+ sci-libs/libticalcs2
+ sci-libs/libtifiles2
+ sci-libs/libticonv
+ gnome-base/libglade:2.0
+ x11-libs/gtk+:2
+ dbus? ( >=dev-libs/dbus-glib-0.60 )
+ nls? ( virtual/libintl )
+ sdl? ( media-libs/libsdl )
+ xinerama? ( x11-libs/libXinerama )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ xinerama? ( x11-proto/xineramaproto )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-remove_depreciated_gtk_calls.patch
+ "${FILESDIR}"/${P}-r2820.patch
+)
+
+src_prepare() {
+ default
+ # Don't use GTK_DISABLE_DEPRECATED flags
+ sed 's:-DGTK_DISABLE_DEPRECATED::g' -i configure.ac configure || die
+}
+
+src_configure() {
+ econf \
+ --disable-rpath \
+ --disable-debugger \
+ --disable-gdb \
+ $(use_enable nls) \
+ $(use_enable sdl sound) \
+ $(use_enable threads) \
+ $(use_enable threads threading) \
+ $(use_with dbus) \
+ --without-kde \
+ $(use_with xinerama)
+}
+
+src_install() {
+ default
+ rm -f "${ED%/}"/usr/share/tiemu/{Manpage.txt,COPYING,RELEASE,AUTHORS,LICENSES} || die
+ make_desktop_entry tiemu "TiEmu Calculator" \
+ "${EPREFIX}"/usr/share/tiemu/pixmaps/icon.xpm
+}