From 6988098c27ed6407c80ce09a256a635bf7242f08 Mon Sep 17 00:00:00 2001 From: Danilo Egea Gondolfo Date: Thu, 16 Jan 2014 20:34:06 +0000 Subject: [PATCH] - Update from 2.12a to 2.15.5 - Add LICENSE - Convert USE_GMAKE to USES PR: ports/185343 Submitted by: KATO Tsuguru --- emulators/gens/Makefile | 52 ++++---- emulators/gens/distinfo | 5 +- emulators/gens/files/gens.in | 26 ---- emulators/gens/files/patch-Makefile | 26 ---- .../files/patch-src__gens__segacd__cd_aspi.c | 116 ++++++++++++++++++ emulators/gens/pkg-descr | 9 +- emulators/gens/pkg-plist | 52 +++++--- 7 files changed, 182 insertions(+), 104 deletions(-) delete mode 100644 emulators/gens/files/gens.in delete mode 100644 emulators/gens/files/patch-Makefile create mode 100644 emulators/gens/files/patch-src__gens__segacd__cd_aspi.c diff --git a/emulators/gens/Makefile b/emulators/gens/Makefile index f3c7f95511aa..cdb8a2939975 100644 --- a/emulators/gens/Makefile +++ b/emulators/gens/Makefile @@ -2,42 +2,44 @@ # $FreeBSD$ PORTNAME= gens -PORTVERSION= 2.12a -PORTREVISION= 10 +PORTVERSION= 2.15.5 CATEGORIES= emulators -MASTER_SITES= SF/${PORTNAME}/Gens%20Source%20Code/Gens%20WIP%20linux -DISTNAME= Gens212a1SrcL +MASTER_SITES= SF/${PORTNAME}/Gens%20Source%20Code/Gens%20${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Sega Genesis/CD/32X emulator +LICENSE= GPLv2 + BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm -WRKSRC= ${WRKDIR}/${PORTNAME}_linux/${PORTNAME} -USE_ZIP= yes -USE_SDL= sdl -USE_GNOME= gtk20 -USE_GMAKE= yes +OPTIONS_DEFINE= DOCS ONLY_FOR_ARCHS= i386 +ONLY_FOR_ARCHS_REASON= uses i386 assembly code + +USES= gmake pkgconfig +USE_GNOME= gtk20 +USE_GL= gl +USE_SDL= sdl +GNU_CONFIGURE= yes + +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +DESKTOP_ENTRIES="Gens" "" "${DATADIR}/gens_small.png" "${PORTNAME}" "" "" + +.include -NO_STAGE= yes post-patch: - ${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|' ${WRKSRC}/Makefile - ${REINPLACE_CMD} -e 's|gcc|${CC}|' ${WRKSRC}/Makefile - ${REINPLACE_CMD} -e 's|g++|${CXX}|' ${WRKSRC}/Makefile - ${REINPLACE_CMD} -e 's|%%LDFLAGS%%|${LDFLAGS}|' ${WRKSRC}/Makefile - @${CAT} ${FILESDIR}/gens.in | ${SED} -e 's,%%PREFIX%%,${PREFIX},g' > ${WRKDIR}/gens +.for i in gens_core/sound/ym2612.h mp3_dec/mpg123.h + @${REINPLACE_CMD} -e \ + 's|\(^#define INLINE\).*|\1 static inline|' \ + ${WRKSRC}/src/gens/${i} +.endfor -do-install: - ${MKDIR} ${PREFIX}/share/gens - ${MKDIR} ${PREFIX}/share/gens/resource - ${INSTALL_SCRIPT} ${WRKDIR}/gens ${PREFIX}/bin/gens - ${INSTALL_PROGRAM} ${WRKSRC}/gens ${PREFIX}/share/gens/gens - ${INSTALL_DATA} ${WRKSRC}/resource/* ${PREFIX}/share/gens/resource -.if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}_linux/README ${DOCSDIR}/README -.endif +post-install: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} README ${STAGEDIR}${DOCSDIR}) .include diff --git a/emulators/gens/distinfo b/emulators/gens/distinfo index ac478eaeb887..039d9af64096 100644 --- a/emulators/gens/distinfo +++ b/emulators/gens/distinfo @@ -1,2 +1,3 @@ -SHA256 (Gens212a1SrcL.zip) = 49a745afab2c2d7c4c7cc7cffd025cb934e1c34011a0b3e41ec4b538d77e5338 -SIZE (Gens212a1SrcL.zip) = 572647 +MD5 (gens-2.15.5.tar.gz) = 1496a49be056d65bf76b52de62e932d7 +SHA256 (gens-2.15.5.tar.gz) = 51910d3056da9ffbb2c01cfec064998c9a4cad0cb379d703ec1b93c83dba305a +SIZE (gens-2.15.5.tar.gz) = 741852 diff --git a/emulators/gens/files/gens.in b/emulators/gens/files/gens.in deleted file mode 100644 index e4600cf75700..000000000000 --- a/emulators/gens/files/gens.in +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# gens - gens 2.12a wrapper script -# -# 2005 Travis Poppe - -USERDIR=$HOME/.gens - -if [ -d $USERDIR ]; then - echo "gens working directory appears to be $USERDIR/" - echo "" - - cd $USERDIR - ./gens $* - exit -fi - -mkdir $USERDIR -mkdir $USERDIR/resource -ln -s %%PREFIX%%/share/gens/gens $USERDIR/gens -ln -s %%PREFIX%%/share/gens/resource/* $USERDIR/resource - -echo "Installed gens to $USERDIR/" -echo "" - -cd $USERDIR -./gens $* diff --git a/emulators/gens/files/patch-Makefile b/emulators/gens/files/patch-Makefile deleted file mode 100644 index ae53e756d7ce..000000000000 --- a/emulators/gens/files/patch-Makefile +++ /dev/null @@ -1,26 +0,0 @@ ---- Makefile.orig Wed Jun 22 16:18:29 2005 -+++ Makefile Wed Jun 22 16:19:44 2005 -@@ -59,7 +59,7 @@ - glade/interface.o\ - glade/support.o - --GTKCFLAGS=-DWITH_GTK -DGTK_DISABLE_DEPRECATED `pkg-config gtk+-2.0 --cflags` -+GTKCFLAGS=-DWITH_GTK `pkg-config gtk+-2.0 --cflags` - - - #uncomment this if you want to enable GTK support (default) -@@ -73,12 +73,12 @@ - GTKLDFLAGS=`pkg-config gtk+-2.0 --libs` - - #uncomment this if you want to enable GTK support (default) --LDFLAGS=-lm `sdl-config --libs` -lz -lstdc++ -s $(GTKLDFLAGS) -+LDFLAGS=-lm `sdl-config --libs` -lz -lstdc++ -s $(GTKLDFLAGS) %%LDFLAGS%% - #uncomment this if you want to disable GTK support - #LDFLAGS=-lm `sdl-config --libs` -lz -lstdc++ -s - - --NASMFLAGS=-D__GCC2 -f elf -O3 -+NASMFLAGS=-D__GCC2 -f elf - CC=gcc - CXX=g++ - TARGET=gens diff --git a/emulators/gens/files/patch-src__gens__segacd__cd_aspi.c b/emulators/gens/files/patch-src__gens__segacd__cd_aspi.c new file mode 100644 index 000000000000..139a74b20d0c --- /dev/null +++ b/emulators/gens/files/patch-src__gens__segacd__cd_aspi.c @@ -0,0 +1,116 @@ +--- src/gens/segacd/cd_aspi.c.orig ++++ src/gens/segacd/cd_aspi.c +@@ -8,6 +8,8 @@ + #include "cd_aspi.h" + #include "mem_s68k.h" + ++#ifdef linux ++ + #define HIBYTE(x) x >> 8 + #define LOBYTE(x) x & 0xff + void Sleep (int i); +@@ -760,3 +762,104 @@ + + CD_Present = 0; + } ++ ++#else ++ ++int CUR_DEV; ++int Num_CD_Drive; ++ ++int ++ASPI_Close_Tray_CDD_cC_COMP (SRB_ExecSCSICmd * s) ++{ ++ return -1; ++} ++ ++int ++ASPI_End (void) ++{ ++ return 1; ++} ++ ++int ++ASPI_Fast_Seek_COMP (SRB_ExecSCSICmd * s) ++{ ++ return 0; ++} ++ ++void ++ASPI_Flush_Cache_CDC (void) ++{ ++ return; ++} ++ ++int ++ASPI_Init (void) ++{ ++ Num_CD_Drive = 0; ++ return 0; ++} ++ ++int ++ASPI_Lock (int flock) ++{ ++ return 5; ++} ++ ++int ++ASPI_Open_Tray_CDD_cD_COMP (SRB_ExecSCSICmd * s) ++{ ++ return -1; ++} ++ ++void ++ASPI_Read_One_LBA_CDC (void) ++{ ++ return; ++} ++ ++void ++ASPI_Reset_Drive (char *buf) ++{ ++ return; ++} ++ ++int ++ASPI_Seek (int pos, int async, ++ int (*PostProc) (struct tagSRB32_ExecSCSICmd *)) ++{ ++ return 5; ++} ++ ++int ++ASPI_Seek_CDD_c4_COMP (SRB_ExecSCSICmd * s) ++{ ++ return -1; ++} ++ ++int ++ASPI_Star_Stop_Unit (int op, ++ int (*PostProc) (struct tagSRB32_ExecSCSICmd *)) ++{ ++ return 5; ++} ++ ++int ++ASPI_Stop_CDD_c1_COMP (SRB_ExecSCSICmd * s) ++{ ++ return 0; ++} ++ ++int ++ASPI_Stop_Play_Scan (int async, ++ int (*PostProc) (struct tagSRB32_ExecSCSICmd *)) ++{ ++ return 5; ++} ++ ++void ++Wait_Read_Complete (void) ++{ ++ return; ++} ++ ++#endif diff --git a/emulators/gens/pkg-descr b/emulators/gens/pkg-descr index 478280859394..1982934d209c 100644 --- a/emulators/gens/pkg-descr +++ b/emulators/gens/pkg-descr @@ -1,11 +1,4 @@ A Sega Genesis/CD/32X emulator that uses the SDL library and has a GTK user interface. -Note: This is not the latest version of gens available for *nix. The -latest version makes use of the Linux-specific header file 'linux/cdrom.h' -which causes the build to fail. - -Patches to get the latest version working on FreeBSD are more than -welcome! - -WWW: http://gens.consolemul.com/ +WWW: http://www.gens.me/ diff --git a/emulators/gens/pkg-plist b/emulators/gens/pkg-plist index f95b31ef3f9a..b5878dd15983 100644 --- a/emulators/gens/pkg-plist +++ b/emulators/gens/pkg-plist @@ -1,20 +1,38 @@ bin/gens -%%DATADIR%%/gens -%%DATADIR%%/resource/Gens2.ico -%%DATADIR%%/resource/bitmap1.bmp -%%DATADIR%%/resource/bmp00000.bmp -%%DATADIR%%/resource/bmp00001.bmp -%%DATADIR%%/resource/bmp00002.bmp -%%DATADIR%%/resource/bmp00003.bmp -%%DATADIR%%/resource/bmp00004.bmp -%%DATADIR%%/resource/bmp00005.bmp -%%DATADIR%%/resource/bmp00006.bmp -%%DATADIR%%/resource/gens.ico -%%DATADIR%%/resource/gens_big.bmp -%%DATADIR%%/resource/gens_small.bmp -%%DATADIR%%/resource/sonic.ico -%%DATADIR%%/resource/sonic2.ico %%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%@dirrm %%DOCSDIR%% -@dirrm %%DATADIR%%/resource +%%DATADIR%%/2rightarrow.png +%%DATADIR%%/Gens2.ico +%%DATADIR%%/Modem.png +%%DATADIR%%/binary.png +%%DATADIR%%/bitmap1.png +%%DATADIR%%/bmp00000.png +%%DATADIR%%/bmp00001.png +%%DATADIR%%/bmp00002.png +%%DATADIR%%/bmp00003.png +%%DATADIR%%/bmp00004.png +%%DATADIR%%/bmp00005.png +%%DATADIR%%/bmp00006.png +%%DATADIR%%/cdrom2_unmount.png +%%DATADIR%%/editcopy.png +%%DATADIR%%/file_text.png +%%DATADIR%%/filleclose.png +%%DATADIR%%/folder_slin_open.png +%%DATADIR%%/gens.ico +%%DATADIR%%/gens_big.bmp +%%DATADIR%%/gens_small.png +%%DATADIR%%/history.png +%%DATADIR%%/kmix.png +%%DATADIR%%/ksysguard.png +%%DATADIR%%/memory.png +%%DATADIR%%/package_games.png +%%DATADIR%%/package_settings.png +%%DATADIR%%/password.png +%%DATADIR%%/reload.png +%%DATADIR%%/resource.png +%%DATADIR%%/sonic.ico +%%DATADIR%%/sonic2.ico +%%DATADIR%%/viewmag.png +%%DATADIR%%/viewmag1.png +%%DATADIR%%/xpaint.png @dirrm %%DATADIR%% +%%PORTDOCS%%@dirrm %%DOCSDIR%%