Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: [Maintainer update] Add FLAVOR to emulator/minivmac
To:
Jag Talon <jag@aangat.lahat.computer>
Cc:
ports@openbsd.org, Stuart Henderson <stu@spacehopper.org>
Date:
Tue, 06 Aug 2024 15:31:24 +0200

Download raw body.

Thread
On 2024/08/05 18:02:45 -0400, Jag Talon <jag@aangat.lahat.computer> wrote:
> On Mon, 2024-08-05 at 20:30 +0100, Stuart Henderson wrote:
> > > > 
> > 
> > was there a version without requiring adding binaries to cvs yet?
> > 
> 
> Ok, turns out we don't need to add the images--we can just directly
> copy the .ico file from WRKSRC and use that. I thought it needed to be
> converted with ImageMagick first into a png but ico works for me on
> GNOME.
> 
> It seems that a relative reference to the icon doesn't work however so
> the desktop has the full path to the icon I hope that's ok.
> 
> The diff is attached.

oh yeah, this is nicer.  Still a couple of nits however :P

> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/emulators/minivmac/Makefile,v
> retrieving revision 1.2
> diff -u -p -u -r1.2 Makefile
> --- Makefile	24 Jul 2024 01:02:27 -0000	1.2
> +++ Makefile	5 Aug 2024 21:57:08 -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

Instead of these two flavors, can't we have "plus" by default and only
"ii" as flavors?  Otherwise we fall into the slightly awkward situation
of having only flavors and no "unflavored" version of a port.  (sorry, i
didn't notice this the other time.)

btw, if minivmac was "hooked" in the emulators/Makefile than this would
also have required a @pkgpath and a quirks entry to allow pkg_add to
upgrade from "unflavored" to -plus.

> +.if ${FLAVOR:Mplus}
> +MODEL = 		-m Plus
> +.elif ${FLAVOR:Mii}
> +MODEL = 		-m II
> +SUFFIX = 		-${FLAVOR}
> +.endif

it's not strictly required, but I'd consider adding a .else part that
throws an error to catch unsupported combinations.

For example, since flavors "stacks", it should be possible to build with
both flavors, something that it's not supported.  So, i'd go with
something along the lines of

	[...]
	.else
	ERRORS += unsupported flavor ${FLAVOR}
	.endif

(maybe with a better verbiage)

> +FULLPKGNAME =		minivmac${SUFFIX}-${V}
> +SUBST_VARS =		SUFFIX
> +
> [...]
> --- pkg/DESCR	18 Jul 2024 01:58:15 -0000	1.1.1.1
> +++ pkg/DESCR	5 Aug 2024 21:57:08 -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

regarding the flavors, if -plus has to stay here we should also list
it i think?


(there's also the thing about the hardcoded paths in the desktop files
that could use ${TRUEPREFIX} + SUBST_DATA instead, but i think it's also
fine like it is now)