head	1.1;
access;
symbols
	pkgsrc-2026Q3:1.1.0.2
	pkgsrc-2026Q3-base:1.1;
locks; strict;
comment	@# @;


1.1
date	2026.07.16.11.03.32;	author nia;	state Exp;
branches;
next	;
commitid	GcfF8fzJbA7dTRNG;


desc
@@


1.1
log
@tsugaru: Initial import.

Tsugaru is an emulator of the legendary Fujitsu FM TOWNS computer,
including the Marty video game console. It primarily targets emulating
Model II MX, including undocumented hardware features.

If you do not own your FM TOWNS hardware, you can use the following free
version of the ROM:

http://ysflight.com/FM/towns/FreeTOWNS/e.html

Editor's notes: the package name was chosen as tsugaru and not townsemu
(like the upstream repository) to match the few other package mangers
that package this software. Similarly, the program is installed as a
lowercase binary matching the package name to match Unix conventions.
As far as I can tell this software is developed for Windows and macOS;
it working on more traditional Unixes is a nice side effect.

This package was verified to build on macOS, CentOS 7, NetBSD.
@
text
@# $NetBSD$

DISTNAME=	tsugaru-20260522
CATEGORIES=	emulators
MASTER_SITES=	${MASTER_SITE_GITHUB:=captainys/}
GITHUB_PROJECT=	TOWNSEMU
GITHUB_TAG=	v${PKGVERSION_NOREV}

# Should use the most recent commit at the time of when a new release is made.
GITHUB_SUBMODULES+=	captainys public 8cabce7e045b23ad68fdb8592aeacd8d9101e362 gui/src/public

MAINTAINER=	pkgsrc-users@@NetBSD.org
HOMEPAGE=	http://ysflight.in.coocan.jp/FM/towns/Tsugaru/e.html
COMMENT=	FM Towns emulator
LICENSE=	modified-bsd

TOOL_DEPENDS+=	ImageMagick-[0-9]*:../../graphics/ImageMagick

USE_LANGUAGES=	c c++

USE_CXX_FEATURES+=	c++17

CMAKE_CONFIGURE_ARGS=	${WRKSRC}/gui/src

CFLAGS.NetBSD+=	-DEBADFD=EBADF
CFLAGS.NetBSD+=	-DESTRPIPE=EPIPE

INSTALLATION_DIRS+=	bin
INSTALLATION_DIRS+=	share/applications
INSTALLATION_DIRS+=	share/pixmaps

pre-build:
	${PREFIX}/bin/magick ${WRKSRC}/src/resources/tsugaru_icon.ico \
		${WRKDIR}/${PKGBASE}.png

.include "../../mk/bsd.fast.prefs.mk"

do-install:
.if ${OPSYS} != "Darwin"
	${INSTALL_PROGRAM} ${WRKSRC}/${CMAKE_BUILD_DIR}/main_gui/Tsugaru_GUI \
		${DESTDIR}${PREFIX}/bin/${PKGBASE}
.else
	${INSTALL_PROGRAM} ${WRKSRC}/${CMAKE_BUILD_DIR}/main_gui/Tsugaru_GUI.app/Contents/MacOS/Tsugaru_GUI \
		${DESTDIR}${PREFIX}/bin/${PKGBASE}
.endif
	${INSTALL_DATA} ${WRKDIR}/${PKGBASE}.png \
		${DESTDIR}${PREFIX}/share/pixmaps/${PKGBASE}.png
	${INSTALL_DATA} ${FILESDIR}/${PKGBASE}.desktop \
		${DESTDIR}${PREFIX}/share/applications

.include "../../devel/cmake/build.mk"
.if ${OPSYS} != "Darwin"
.  include "../../audio/alsa-lib/buildlink3.mk"
.endif
.include "../../graphics/glu/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../x11/libX11/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
@
