Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jul 2015 10:28:03 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r393228 - in head/emulators/fmsx: . files
Message-ID:  <201507301028.t6UAS3WN067631@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Thu Jul 30 10:28:02 2015
New Revision: 393228
URL: https://svnweb.freebsd.org/changeset/ports/393228

Log:
  - Update to 4.2
  - Don't hardcode version in distfile names
  - Update USE_XORG
  - Improve and simplify wrapper script handling
  - Improve and simplify options handling
  
  PR:		201547
  Submitted by:	amdmi3
  Approved by:	maintainer timeout (dk@farm.org, 2 weeks)

Added:
  head/emulators/fmsx/files/fmsx.in
     - copied, changed from r391914, head/emulators/fmsx/files/fmsx
Deleted:
  head/emulators/fmsx/files/fmsx
Modified:
  head/emulators/fmsx/Makefile
  head/emulators/fmsx/distinfo
  head/emulators/fmsx/files/patch-EMULib_Rules.Unix
  head/emulators/fmsx/pkg-plist

Modified: head/emulators/fmsx/Makefile
==============================================================================
--- head/emulators/fmsx/Makefile	Thu Jul 30 09:37:16 2015	(r393227)
+++ head/emulators/fmsx/Makefile	Thu Jul 30 10:28:02 2015	(r393228)
@@ -2,63 +2,47 @@
 # $FreeBSD$
 
 PORTNAME=	fmsx
-PORTVERSION=	4.0
+PORTVERSION=	4.2
 CATEGORIES=	emulators
 MASTER_SITES=	http://fms.komkon.org/fMSX/:code \
-		http://fms.komkon.org/fMSX/src/:rom \
-		http://mirror.amdmi3.ru/distfiles/:code # delete me
-DISTFILES=	fMSX40.zip:code \
+		http://fms.komkon.org/fMSX/src/:rom
+DISTFILES=	fMSX${PORTVERSION:C/\.//}.zip:code \
 		MSX.ROM:rom MSX2.ROM:rom MSX2EXT.ROM:rom MSX2P.ROM:rom \
 		MSX2PEXT.ROM:rom FMPAC.ROM:rom DISK.ROM:rom MSXDOS2.ROM:rom \
 		PAINTER.ROM:rom KANJI.ROM:rom
 DIST_SUBDIR=	fmsx4
-EXTRACT_ONLY=	fMSX40.zip
+EXTRACT_ONLY=	fMSX${PORTVERSION:C/\.//}.zip
 
 MAINTAINER=	dk@farm.org
 COMMENT=	Portable MSX/MSX2/MSX2+ Emulator
 
-USE_XORG=	xi x11
-USES=		gmake dos2unix zip
+USE_XORG=	x11 xext
+USES=		dos2unix gmake zip
 DOS2UNIX_FILES=	EMULib/Unix/LibUnix.c EMULib/Unix/NetUnix.c EMULib/Rules.gcc \
 		EMULib/Rules.Unix
 RESTRICTED=	Legal status of distributed ROM images unclear
-WRKSRC=		${WRKDIR}
-
-OPTIONS_DEFINE=	BPP8 BPP16 BPP24 BPP32 DOCS
+NO_WRKSUBDIR=	yes
+SUB_FILES=	${PORTNAME}
+BUILD_WRKSRC=	${WRKSRC}/fMSX/Unix
+
+OPTIONS_DEFINE=	DOCS
+OPTIONS_SINGLE=	BPP
+OPTIONS_SINGLE_BPP=	BPP8 BPP16 BPP24 BPP32
 OPTIONS_DEFAULT=	BPP32
 BPP8_DESC=	With BPP8
 BPP16_DESC=	With BPP16
 BPP24_DESC=	With BPP24
 BPP32_DESC=	With BPP32 (see pkg-message)
-
-.include <bsd.port.options.mk>
-
-post-patch:
-	@${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},' \
-		${WRKSRC}/fMSX/Unix/Makefile \
-		${WRKSRC}/EMULib/Rules.Unix
-.if ${PORT_OPTIONS:MBPP32}
-	@${REINPLACE_CMD} -e 's/BPP16/BPP32/' ${WRKSRC}/fMSX/Unix/Makefile
-.endif
-.if ${PORT_OPTIONS:MBPP24}
-	@${REINPLACE_CMD} -e 's/BPP16/BPP24/' ${WRKSRC}/fMSX/Unix/Makefile
-.endif
-.if ${PORT_OPTIONS:MBPP16}
-	@${REINPLACE_CMD} -e 's/BPP16/BPP16/' ${WRKSRC}/fMSX/Unix/Makefile
-.endif
-.if ${PORT_OPTIONS:MBPP8}
-	@${REINPLACE_CMD} -e 's/BPP16/BPP8/' ${WRKSRC}/fMSX/Unix/Makefile
-.endif
-
-do-build:
-	(cd ${WRKSRC}/fMSX/Unix && ${MAKE_CMD} DEBUG_FLAGS=${DEBUG_FLAGS})
+BPP8_CFLAGS=	-DBPP8
+BPP16_CFLAGS=	-DBPP16
+BPP24_CFLAGS=	-DBPP24
+BPP32_CFLAGS=	-DBPP32
 
 do-install:
-	${INSTALL_SCRIPT} ${FILESDIR}/fmsx ${STAGEDIR}${PREFIX}/bin
-	@${REINPLACE_CMD} -i "" -e "s,PREFIX,${PREFIX},g" ${STAGEDIR}${PREFIX}/bin/fmsx
-	${INSTALL_PROGRAM} ${WRKSRC}/fMSX/Unix/fmsx ${STAGEDIR}${PREFIX}/bin/fmsx.bin
-	@${MKDIR} ${STAGEDIR}${PREFIX}/share/fmsx
-	${INSTALL_DATA} ${WRKSRC}/fMSX/ROMs/*.FNT ${STAGEDIR}${DATADIR}
+	${INSTALL_SCRIPT} ${WRKSRC}/fmsx ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/fMSX/Unix/fmsx ${STAGEDIR}${PREFIX}/libexec/fmsx
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/ROMs/*.FNT ${STAGEDIR}${DATADIR}
 	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/*.ROM ${STAGEDIR}${DATADIR}
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/fMSX/*.html ${STAGEDIR}${DOCSDIR}

Modified: head/emulators/fmsx/distinfo
==============================================================================
--- head/emulators/fmsx/distinfo	Thu Jul 30 09:37:16 2015	(r393227)
+++ head/emulators/fmsx/distinfo	Thu Jul 30 10:28:02 2015	(r393228)
@@ -1,5 +1,5 @@
-SHA256 (fmsx4/fMSX40.zip) = 9ce21d69ccff09c1b886660eca28c34d9da92f142b469b7f76e5f853d50f7c1f
-SIZE (fmsx4/fMSX40.zip) = 572095
+SHA256 (fmsx4/fMSX42.zip) = 7040bd61b309d4b514c20c7413d48f9b816e2f91e8bf7bb268d6143cbaa75e00
+SIZE (fmsx4/fMSX42.zip) = 580876
 SHA256 (fmsx4/MSX.ROM) = 999564a371dd2fdf7fbe8d853e82a68d557c27b7d87417639b2fa17704b83f78
 SIZE (fmsx4/MSX.ROM) = 32768
 SHA256 (fmsx4/MSX2.ROM) = 4bc4ae85ca5f28246cd3e7b7e017d298ddd375603657f84ef2c7954bc2d9b919

Copied and modified: head/emulators/fmsx/files/fmsx.in (from r391914, head/emulators/fmsx/files/fmsx)
==============================================================================
--- head/emulators/fmsx/files/fmsx	Mon Jul 13 15:46:35 2015	(r391914, copy source)
+++ head/emulators/fmsx/files/fmsx.in	Thu Jul 30 10:28:02 2015	(r393228)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-exec PREFIX/bin/fmsx.bin -home PREFIX/share/fmsx "$@"
+exec %%PREFIX%%/libexec/fmsx -home %%DATADIR%% "$@"

Modified: head/emulators/fmsx/files/patch-EMULib_Rules.Unix
==============================================================================
--- head/emulators/fmsx/files/patch-EMULib_Rules.Unix	Thu Jul 30 09:37:16 2015	(r393227)
+++ head/emulators/fmsx/files/patch-EMULib_Rules.Unix	Thu Jul 30 10:28:02 2015	(r393228)
@@ -5,8 +5,8 @@
  include ../../EMULib/Rules.gcc
  
 -CFLAGS += -I$(EMULIB)/Unix -I/usr/X11R6/include
-+CFLAGS += -I$(EMULIB)/Unix -I%%LOCALBASE%%/include $(DEBUG_FLAGS)
++CFLAGS += -I$(EMULIB)/Unix -I${LOCALBASE}/include $(DEBUG_FLAGS)
  DEFINES+= -DUNIX -DMITSHM -DBPS16
 -LIBS   += -lX11 -lXext
-+LIBS   += -L%%LOCALBASE%%/lib -lX11 -lXext
++LIBS   += -L${LOCALBASE}/lib -lX11 -lXext
  OBJECTS+= $(EMUUNIX)

Modified: head/emulators/fmsx/pkg-plist
==============================================================================
--- head/emulators/fmsx/pkg-plist	Thu Jul 30 09:37:16 2015	(r393227)
+++ head/emulators/fmsx/pkg-plist	Thu Jul 30 10:28:02 2015	(r393228)
@@ -1,5 +1,5 @@
 bin/fmsx
-bin/fmsx.bin
+libexec/fmsx
 %%DATADIR%%/CYRILLIC.FNT
 %%DATADIR%%/DISK.ROM
 %%DATADIR%%/FMPAC.ROM



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507301028.t6UAS3WN067631>