Wednesday, July 31, 2024

Re: [Maintainer update] Add FLAVOR to emulator/minivmac

Omg this was the whole issue! I felt like I was going crazy. Thank you
this fixed my issues with installing minivmac and minivmac-ii so it
works for me now.

Thank you for all the help and guidance, Omar & Stuart!

On Wed, 2024-07-31 at 20:54 +0200, Omar Polo wrote:
> Not sure why you're getting that error.  Maybe you have to clean the
> package?
>
> $ make clean='package plist'
>
> If you've build a "bad" package and then fixed it without bumping
> REVISION then subsequent `make package' will reuse the previously
> built
> one and this could explain your error.  That's in part why we have to
> bump REVISION when changing the content of a package, but usually
> during
> development I believe it's better to just clean the package (and
> plist)
> and re-build them.
>
> Otherwise, except for a cosmetic thing the diff looks fine to me. 
> Here's
> the minor tweak I'd do:
>
> : --- Makefile.orig Wed Jul 31 20:27:53 2024
> : +++ Makefile Wed Jul 31 20:28:21 2024
> : @@ -37,13 +37,9 @@
> :  FLAVORS =  plus ii
> :  FLAVOR ?= plus
> : 
> : -# Macintosh Plus
> : -.if ${FLAVOR:L:Mplus}
> : +.if ${FLAVOR:Mplus}
> :  MODEL =  -m Plus
> : -.endif
> : -
> : -# Macintosh II
> : -.if ${FLAVOR:L:Mii}
> : +.elif ${FLAVOR:Mii}
> :  MODEL =  -m II
> :  SUFFIX =  -${FLAVOR}
> :  .endif
>
> so:
>
>  - drop :L as it's not really useful and could hide typos
>  - use a .if / .elif
>
> (ok, maybe I've also fmt(1)'ed your DESCR :P)
>
> I'm also attaching a full diff, even if it's not enough since there
> is
> an additional image...  Still, can be useful for review.
>
> I'm not sure how useful is to install a README file per-flavor, but
> there's no easy way around it: we either move that text to the DESCR
> or
> do this.  skimming thru bsd.port.mk(5) I don't see a way to have
> different README per flavor.
>
> anyway, assuming the README situation is decent, this is ok op@,
> although I haven't really tried it, I just checked that the port
> looks
> good (and it does to me.)
>
> (to whomever will commit it, remember to cvs add -ko the pngs :-)
>
>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/emulators/minivmac/Makefile,v
> diff -u -p -r1.2 Makefile
> --- Makefile 24 Jul 2024 01:02:27 -0000 1.2
> +++ Makefile 31 Jul 2024 18:28:21 -0000
> @@ -1,14 +1,15 @@
>  ONLY_FOR_ARCHS = i386 amd64 powerpc
>  
>  COMMENT = early macintosh emulator
> +
>  V = 36.04
> -REVISION = 0
> +REVISION = 1
> +
>  DISTNAME = minivmac-${V}
>  
>  CATEGORIES = emulators
>  
>  HOMEPAGE =  https://gryphel.com/c/minivmac/
> -
>  MAINTAINER = Jag Talon <jag@aangat.lahat.computer>
>  
>  WANTLIB = X11 c sndio
> @@ -33,24 +34,37 @@ SETUP_FLAGS-amd64 =  -t ob64
>  SETUP_FLAGS-i386 =  -t obsd
>  SETUP_FLAGS-powerpc =  -t obsd -cpu ppc
>  
> +FLAVORS =  plus ii
> +FLAVOR ?= plus
> +
> +.if ${FLAVOR:Mplus}
> +MODEL =  -m Plus
> +.elif ${FLAVOR:Mii}
> +MODEL =  -m II
> +SUFFIX =  -${FLAVOR}
> +.endif
> +
> +FULLPKGNAME = minivmac${SUFFIX}-${V}
> +SUBST_VARS = SUFFIX
> +
>  post-extract:
>   cp ${FILESDIR}/SGLUSNIO.h ${WRKSRC}/src
>  
>  do-gen:
>   cd ${WRKSRC}; cc setup/tool.c -o setup_t && \
> - ./setup_t ${SETUP_FLAGS-${MACHINE_ARCH}} > gen && \
> + ./setup_t ${SETUP_FLAGS-${MACHINE_ARCH}} ${MODEL} > gen && \
>   sh ./gen
>  
>  do-install:
> - ${INSTALL_SCRIPT} ${WRKSRC}/minivmac ${PREFIX}/bin/minivmac
> + ${INSTALL_SCRIPT} ${WRKSRC}/minivmac
> ${PREFIX}/bin/minivmac${SUFFIX}
>  
>  post-install:
>   ${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps/
> - ${INSTALL_DATA} ${FILESDIR}/minivmac.png \
> - ${PREFIX}/share/pixmaps/
> + ${INSTALL_DATA} ${FILESDIR}/minivmac${SUFFIX}.png \
> + ${PREFIX}/share/pixmaps/minivmac${SUFFIX}.png
>  
>   ${INSTALL_DATA_DIR} ${PREFIX}/share/applications/
> - ${INSTALL_DATA} ${FILESDIR}/minivmac.desktop \
> - ${PREFIX}/share/applications/
> + ${INSTALL_DATA} ${FILESDIR}/minivmac${SUFFIX}.desktop \
> + ${PREFIX}/share/applications/minivmac${SUFFIX}.desktop
>  
>  .include <bsd.port.mk>
> Index: files/minivmac-ii.desktop
> ===================================================================
> RCS file: files/minivmac-ii.desktop
> diff -N files/minivmac-ii.desktop
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ files/minivmac-ii.desktop 30 Jul 2024 18:21:58 -0000
> @@ -0,0 +1,9 @@
> +[Desktop Entry]
> +GenericName=Macintosh Emulator
> +Name=Mini vMac (Macintosh II)
> +Comment=Early Macintosh emulator
> +Exec=minivmac-ii
> +Terminal=false
> +Type=Application
> +Categories=Emulator;Graphics;
> +Icon=minivmac
> Index: files/minivmac-ii.png
> ===================================================================
> RCS file: files/minivmac-ii.png
> diff -N files/minivmac-ii.png
> Binary files /dev/null and minivmac-ii.png differ
> Index: files/minivmac.desktop
> ===================================================================
> RCS file: /home/cvs/ports/emulators/minivmac/files/minivmac.desktop,v
> diff -u -p -r1.1.1.1 minivmac.desktop
> --- files/minivmac.desktop 18 Jul 2024 01:58:15 -0000 1.1.1.1
> +++ files/minivmac.desktop 30 Jul 2024 18:22:07 -0000
> @@ -1,6 +1,6 @@
>  [Desktop Entry]
>  GenericName=Macintosh Emulator
> -Name=Mini vMac
> +Name=Mini vMac (Macintosh Plus)
>  Comment=Early Macintosh emulator
>  Exec=minivmac
>  Terminal=false
> Index: pkg/DESCR
> ===================================================================
> RCS file: /home/cvs/ports/emulators/minivmac/pkg/DESCR,v
> diff -u -p -r1.1.1.1 DESCR
> --- pkg/DESCR 18 Jul 2024 01:58:15 -0000 1.1.1.1
> +++ pkg/DESCR 31 Jul 2024 18:53:22 -0000
> @@ -1 +1,6 @@
> -Macintosh Plus emulator.
> +Mini vMac is an emulator for computers that Apple sold from 1984 to
> 1996
> +based on Motorola's 680x0 microprocessors. The default emulates the
> +Macintosh Plus.
> +
> +Flavors:
> + ii - Emulate the Macintosh II
> Index: pkg/PLIST
> ===================================================================
> RCS file: /home/cvs/ports/emulators/minivmac/pkg/PLIST,v
> diff -u -p -r1.1.1.1 PLIST
> --- pkg/PLIST 18 Jul 2024 01:58:15 -0000 1.1.1.1
> +++ pkg/PLIST 30 Jul 2024 14:34:50 -0000
> @@ -1,6 +1,6 @@
> -@bin bin/minivmac
> -share/applications/minivmac.desktop
> +@bin bin/minivmac${SUFFIX}
> +share/applications/minivmac${SUFFIX}.desktop
>  share/doc/pkg-readmes/${PKGSTEM}
>  share/pixmaps/
> +share/pixmaps/minivmac${SUFFIX}.png
>  @tag update-desktop-database
> -share/pixmaps/minivmac.png
> Index: pkg/README
> ===================================================================
> RCS file: /home/cvs/ports/emulators/minivmac/pkg/README,v
> diff -u -p -r1.2 README
> --- pkg/README 24 Jul 2024 01:02:27 -0000 1.2
> +++ pkg/README 30 Jul 2024 14:37:37 -0000
> @@ -2,11 +2,12 @@
>  | Running ${PKGSTEM} on OpenBSD
>  +-------------------------------------------------------------------
> ----
>  
> -Mini vMac can emulate the Macintosh Plus.
> +Mini vMac can emulate early Macintoshes. The Macintosh Plus
> (minivmac)
> +and the Macintosh II (minivmac-ii) are supported on OpenBSD.
>  
> -Mini vMac requires a correct ROM for the Mac model to emulate, named
> -"vMac.ROM". This can be in the current directory before executing
> the
> -"minivmac" command.
> +Mini vMac requires a correct ROM for the Mac model to emulate, named
> either
> +"vMac.ROM" or "MacII.ROM". This can be in the current directory
> before
> +executing the "minivmac" command.
>  
>  Mini vMac can boot an image file (such as an OS). This can be named
>  "disk1.dsk" and if placed in the current directory before executing
>

--
he/him
jagtalon.net
weirder.earth/@jag

No comments:

Post a Comment