1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

emulators/frodo: update to 4.4

- new LICENSE
- support gtk3
- support sdl2
This commit is contained in:
Dirk Meyer 2024-11-04 18:15:06 +01:00
parent 144a678285
commit 7277db3ac0
14 changed files with 28 additions and 261 deletions

View File

@ -1,60 +1,29 @@
PORTNAME= frodo
PORTVERSION= 4.1b
PORTREVISION= 11
PORTVERSION= 4.4
PORTREVISION= 0
CATEGORIES= emulators tk
MASTER_SITES= http://frodo.cebix.net/downloads/
DISTNAME= FrodoV4_1b.Src
DISTNAME= Frodo-${PORTVERSION}
MAINTAINER= dinoex@FreeBSD.org
COMMENT= Emulates a Commodore 64
WWW= https://frodo.cebix.net/
USES= shebangfix tk:run xorg
USE_CXXSTD= gnu++98
CXXFLAGS+= -std=gnu++98
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
USES= gmake xorg pkgconfig sdl gnome desktop-file-utils
USE_XORG= x11 xt xext sm ice
USE_SDL= sdl2
USE_GNOME= gtk30 pango cairo gdkpixbuf2 glib20
GNU_CONFIGURE= yes
CONFIGURE_ENV= CXXFLAGS='${CXXFLAGS}'
MAKE_ENV= LDFLAGS='${LDFLAGS}'
ALL_TARGET= Frodo
INSTALL_WRKSRC= ${WRKDIR}/Frodo-4.1b
SHEBANG_FILES= ../TkGui.tcl
WRKSRC= ${INSTALL_WRKSRC}/Src
DATADIR= ${PREFIX}/share/Frodo
DOCSDIR= ${PREFIX}/share/doc/Frodo
ROM= 1541 Basic Char Kernal
OPTIONS_DEFINE= NLS DOCS
OPTIONS_DEFAULT=
OPTIONS_DEFINE= SDL DOCS
OPTIONS_DEFAULT=SDL
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSDL}
USES+= sdl
USE_SDL= sdl
.endif
.if ${ARCH:Mpowerpc*}
USE_GCC= yes
.endif
pre-configure:
${REINPLACE_CMD} -e 's|wish|wish${TK_VER}|' \
${WRKSRC}/C64_x.i
do-install:
${SED} -e 's=\$${PREFIX}=${PREFIX}=g' \
< ${FILESDIR}/frodo > ${WRKDIR}/frodo
${INSTALL_SCRIPT} ${WRKDIR}/frodo ${STAGEDIR}${PREFIX}/bin/
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/frodo
${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/Frodo ${STAGEDIR}${PREFIX}/libexec/frodo/
.for i in ${ROM}
${INSTALL_DATA} "${INSTALL_WRKSRC}/${i} ROM" ${STAGEDIR}${PREFIX}/libexec/frodo/
.endfor
${INSTALL_DATA} "${INSTALL_WRKSRC}/Frodo Logo" ${STAGEDIR}${PREFIX}/libexec/frodo/
${INSTALL_SCRIPT} "${INSTALL_WRKSRC}/TkGui.tcl" ${STAGEDIR}${PREFIX}/libexec/frodo/
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/frodo/64prgs
${TAR} -C ${INSTALL_WRKSRC}/64prgs -cf - . | \
${TAR} -C ${STAGEDIR}${PREFIX}/libexec/frodo/64prgs -xf -
NLS_USES= gettext-runtime
do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}

View File

@ -1,2 +1,3 @@
SHA256 (FrodoV4_1b.Src.tar.gz) = ffae146dc20458698acf5ccc384dc32317cea1df0c95b44b5d47cca8b26bc986
SIZE (FrodoV4_1b.Src.tar.gz) = 377002
TIMESTAMP = 1730735398
SHA256 (Frodo-4.4.tar.gz) = 7f143384db9d713ca899eeebafb9c0e86556ce49949fb20e56acf035c396aabb
SIZE (Frodo-4.4.tar.gz) = 426719

View File

@ -1,6 +0,0 @@
#!/bin/sh
#
cd ${PREFIX}/libexec/frodo
exec ${PREFIX}/libexec/frodo/Frodo
#
# eof

View File

@ -1,24 +0,0 @@
--- CmdPipe.cpp.orig 2002-01-02 21:19:34 UTC
+++ CmdPipe.cpp
@@ -17,9 +17,11 @@ extern "C" {
#include <string.h>
#include <signal.h>
+#if !defined(__FreeBSD__)
#if defined(__alpha__)
#include <cma.h>
#endif
+#endif
#if defined(AIX)
#include <sys/select.h>
@@ -30,6 +32,9 @@ extern "C" {
#if defined(__linux__)
#include <sys/time.h>
#endif
+#if defined(__FreeBSD__)
+ #include <sys/time.h>
+#endif
#include <time.h>
#include <errno.h>

View File

@ -1,11 +0,0 @@
--- Display.h.orig 2002-01-02 21:31:34 UTC
+++ Display.h
@@ -121,7 +121,7 @@ private:
#ifdef __unix
void draw_led(int num, int state); // Draw one LED
- static void pulse_handler(...); // LED error blinking
+ static void pulse_handler(int sig); // LED error blinking
#endif
#ifdef WIN32

View File

@ -1,11 +0,0 @@
--- Display_SDL.i.orig 2002-01-02 21:42:42 UTC
+++ Display_SDL.i
@@ -213,7 +213,7 @@ void C64Display::draw_string(SDL_Surface
* LED error blink
*/
-void C64Display::pulse_handler(...)
+void C64Display::pulse_handler(int dummy)
{
for (int i=0; i<4; i++)
switch (c64_disp->led_state[i]) {

View File

@ -1,11 +0,0 @@
--- Display_x.i.orig 2002-01-02 21:17:29 UTC
+++ Display_x.i
@@ -519,7 +519,7 @@ void C64Display::draw_led(int num, int s
* LED error blink
*/
-void C64Display::pulse_handler(...)
+void C64Display::pulse_handler(int sig)
{
for (int i=0; i<4; i++)
switch (c64_disp->led_state[i]) {

View File

@ -1,23 +0,0 @@
--- Makefile.in.orig 2002-01-02 16:44:04 UTC
+++ Makefile.in
@@ -9,6 +9,7 @@ REVISION = 1
CXX = @CXX@
LIBS = @LIBS@
CFLAGS = @CFLAGS@ -I./ -DFRODO_HPUX_REV=@HPUX_REV@ -DKBD_LANG=@KBD_LANG@
+CXXFLAGS = @CXXFLAGS@ @CFLAGS@ -I./ -DFRODO_HPUX_REV=@HPUX_REV@ -DKBD_LANG=@KBD_LANG@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -62,10 +63,10 @@ depend dep:
makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
.cpp.o:
- $(CC) $(INCLUDES) $(CFLAGS) -o $@ -c $*.cpp
+ $(CC) $(INCLUDES) $(CXXFLAGS) -o $@ -c $*.cpp
.cpp.s:
- $(CC) $(INCLUDES) $(CFLAGS) $(EXTRAFLAGS) -o $@ -S $*.cpp -g0
+ $(CC) $(INCLUDES) $(CXXFLAGS) $(EXTRAFLAGS) -o $@ -S $*.cpp -g0
C64_PC.o: C64.cpp C64.h C64_x.i CmdPipe.h CPUC64.h CPU1541.h VIC.h SID.h CIA.h REU.h IEC.h 1541job.h Display.h Prefs.h
$(CC) $(INCLUDES) $(CFLAGS) $(PCFLAGS) -o $@ -c $*.cpp

View File

@ -1,20 +0,0 @@
--- SAM.cpp.orig 2002-01-02 21:20:16 UTC
+++ SAM.cpp
@@ -205,7 +205,7 @@ static const char adr_length[] = {1, 1,
// Prototypes
static void error(char *s);
-static void handle_abort(...);
+static void handle_abort(int sig);
static void init_abort(void);
static void exit_abort(void);
static bool aborted(void);
@@ -470,7 +470,7 @@ static bool WasAborted;
struct sigaction my_sa;
#endif
-static void handle_abort(...)
+static void handle_abort(int sig)
{
WasAborted = true;
#if !defined(HAVE_SIGACTION) && defined(HAVE_SIGNAL)

View File

@ -1,20 +0,0 @@
--- SID.cpp.orig 2002-01-02 21:18:59 UTC
+++ SID.cpp
@@ -428,7 +428,7 @@ private:
int play_buf; // Number of buffer currently playing
#endif
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
int devfd, sndbufsize, buffer_rate;
int16 *sound_buffer;
#endif
@@ -1351,7 +1351,7 @@ void DigitalRenderer::calc_buffer(int16
#elif defined(AMIGA)
#include "SID_Amiga.i"
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__FreeBSD__)
#include "SID_linux.i"
#elif defined(SUN)

View File

@ -1,16 +0,0 @@
--- SID_linux.i.orig 2002-01-02 21:17:00 UTC
+++ SID_linux.i
@@ -8,7 +8,12 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-#include <linux/soundcard.h>
+
+#if defined(__linux__)
+# include <linux/soundcard.h>
+#elif defined(__FreeBSD__)
+# include <sys/soundcard.h>
+#endif
#include "VIC.h"

View File

@ -1,31 +0,0 @@
--- configure.orig 2002-01-02 16:44:11 UTC
+++ configure
@@ -1602,15 +1602,15 @@ if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
- CFLAGS="-g -O2"
+ CFLAGS="${CFLAGS} -g -O2"
else
- CFLAGS="-g"
+ CFLAGS="${CFLAGS} -g"
fi
else
if test "$GCC" = yes; then
- CFLAGS="-O2"
+ CFLAGS="${CFLAGS} -O2"
else
- CFLAGS=
+ CFLAGS="${CFLAGS}"
fi
fi
# Some people use a C++ compiler to compile C. Since we use `exit',
@@ -2283,7 +2283,7 @@ echo "${ECHO_T}no" >&6
fi
if [ x"$GXX" = "xyes" ]; then
- CFLAGS="-O2 -g -fomit-frame-pointer -Wall -Wno-unused -Wno-format"
+ CFLAGS="${CFLAGS} -O2 -g -fomit-frame-pointer -Wall -Wno-unused -Wno-format"
fi
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown

View File

@ -1,13 +0,0 @@
--- sysdeps.h.orig 2002-01-02 21:15:27 UTC
+++ sysdeps.h
@@ -25,8 +25,10 @@ extern "C"
#endif
#ifdef HAVE_VALUES_H
+#if !defined(__FreeBSD__)
#include <values.h>
#endif
+#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>

View File

@ -1,41 +1,24 @@
bin/frodo
libexec/frodo/Frodo
libexec/frodo/1541 ROM
libexec/frodo/Basic ROM
libexec/frodo/Char ROM
libexec/frodo/Kernal ROM
libexec/frodo/Frodo Logo
libexec/frodo/TkGui.tcl
libexec/frodo/64prgs/3fff
libexec/frodo/64prgs/colorbars
libexec/frodo/64prgs/d011h3
libexec/frodo/64prgs/dadb
libexec/frodo/64prgs/de00all
libexec/frodo/64prgs/dycp
libexec/frodo/64prgs/fld
libexec/frodo/64prgs/lrborder
libexec/frodo/64prgs/sprsync
libexec/frodo/64prgs/stretch
libexec/frodo/64prgs/tech-tech
libexec/frodo/64prgs/text26
bin/Frodo
bin/FrodoLite
%%DATADIR%%/Frodo.ui
%%DATADIR%%/Frodo_Logo.png
share/applications/Frodo.desktop
share/applications/FrodoLite.desktop
share/icons/hicolor/128x128/apps/Frodo.png
%%PORTDOCS%%%%DOCSDIR%%/CHANGES
%%PORTDOCS%%%%DOCSDIR%%/Main.html
%%PORTDOCS%%%%DOCSDIR%%/author.html
%%PORTDOCS%%%%DOCSDIR%%/bugreports.html
%%PORTDOCS%%%%DOCSDIR%%/demoprograms.html
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/contact.html
%%PORTDOCS%%%%DOCSDIR%%/emulwindow.html
%%PORTDOCS%%%%DOCSDIR%%/files.html
%%PORTDOCS%%%%DOCSDIR%%/flavours.html
%%PORTDOCS%%%%DOCSDIR%%/future.html
%%PORTDOCS%%%%DOCSDIR%%/history.html
%%PORTDOCS%%%%DOCSDIR%%/index.html
%%PORTDOCS%%%%DOCSDIR%%/installation.html
%%PORTDOCS%%%%DOCSDIR%%/kernal.html
%%PORTDOCS%%%%DOCSDIR%%/keyboard.html
%%PORTDOCS%%%%DOCSDIR%%/legalmush.html
%%PORTDOCS%%%%DOCSDIR%%/overview.html
%%PORTDOCS%%%%DOCSDIR%%/sam.html
%%PORTDOCS%%%%DOCSDIR%%/settings.html
%%PORTDOCS%%%%DOCSDIR%%/systemspecific.html
%%PORTDOCS%%%%DOCSDIR%%/technicalinfo.html
%%PORTDOCS%%%%DOCSDIR%%/thanks.html
%%PORTDOCS%%%%DOCSDIR%%/tutorial.html
%%PORTDOCS%%%%DOCSDIR%%/whatsnew.html