Frotz build targets

Mark Brethen mark.brethen at gmail.com
Tue Jun 28 04:59:50 UTC 2022


I removed the default_variants statement and added the “requires” keyword in the sdl variant statement.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Portfile
Type: application/octet-stream
Size: 2370 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220627/18fa781f/attachment.obj>
-------------- next part --------------


Mark



> On Jun 27, 2022, at 10:31 PM, Mark Brethen <mark.brethen at gmail.com> wrote:
> 
> Here is a working portfile that adds sound and sdl graphics to the original. Anyone care to test it out?
> 
> <Portfile>
> 
> Thanks,
> 
> Mark Brethen
> mark.brethen at gmail.com
> 
> 
> 
>> On Jun 27, 2022, at 5:47 PM, Nils Breunese <nils at breun.nl> wrote:
>> 
>> I don’t maintain any ports with GUI’s myself, but I believe flavors like x11, sdl, etc. are usually provided as variants of a port instead of as subports. You can also specify conflicts between variants if there are any to avoid users installing conflicting variants. For instance the glib2 port contains 'variant x11 conflicts quartz { … }’.
>> 
>> Nils.
>> 
>>> Op 28 jun. 2022, om 00:40 heeft Mark Brethen <mark.brethen at gmail.com> het volgende geschreven:
>>> 
>>> Frotz Makefile:
>>> 
>>> # Build recipes
>>> #
>>> curses: $(FROTZ_BIN)
>>> ncurses: $(FROTZ_BIN)
>>> $(FROTZ_BIN): $(FROTZ_LIBS)
>>> 	$(CC) $+ -o $@$(EXTENSION) $(LDFLAGS) $(CURSES_LDFLAGS) $(CURSES_SOUND_LDFLAGS)
>>> 	@echo "** Done building Frotz with curses interface"
>>> 	@echo "** Audio support $(CURSES_SOUND) (type $(SOUND_TYPE))"
>>> 	@echo "** Blorb support $(BLORB_SUPPORT)"
>>> 
>>> nosound: nosound_helper $(FROTZ_BIN) | nosound_helper
>>> nosound_helper:
>>> 	$(eval SOUND_TYPE= none)
>>> 	$(eval NO_SOUND= -DNO_SOUND)
>>> 	$(eval CURSES_SOUND_LDFLAGS= )
>>> 	$(eval CURSES_SOUND= disabled)
>>> 
>>> dumb: $(DFROTZ_BIN)
>>> $(DFROTZ_BIN): $(DFROTZ_LIBS)
>>> 	$(CC) $+ -o $@$(EXTENSION) $(LDFLAGS)
>>> 	@echo "** Done building Frotz with dumb interface."
>>> 	@echo "** Blorb support $(BLORB_SUPPORT)"
>>> 
>>> x11: $(XFROTZ_BIN)
>>> $(XFROTZ_BIN): $(XFROTZ_LIBS)
>>> 	$(CC) $+ -o $@$(EXTENSION) $(LDFLAGS) $(X11_LDFLAGS)
>>> 	@echo "** Done building Frotz with X11 interface."
>>> 
>>> sdl: $(SFROTZ_BIN)
>>> $(SFROTZ_BIN): $(SFROTZ_LIBS)
>>> 	$(CC) $+ -o $@$(EXTENSION) $(LDFLAGS) $(SDL_LDFLAGS)
>>> 	@echo "** Done building Frotz with SDL interface."
>>> 
>>> 
>>> I’ve created subports for the frotz Portfile, i.e. curses_frotz, dumb_frotz and sdl_frotz. frotz can be compiled without sound using "build.target nosound” which I’d like to implement as a variant for curses frotz. (see the attached Portfile)
>>> <Portfile>
>>> 
>>> Mark Brethen
>>> mark.brethen at gmail.com
>>> 
>>> 
>>> 
>>>> On Jun 27, 2022, at 5:16 PM, Nils Breunese <nils at breun.nl> wrote:
>>>> 
>>>> I believe variants are global for a port, but Iyou could use conditional logic based on which subport gets installed for a variant. What are you trying to achieve?
>>>> 
>>>> Nils.
>>>> 
>>>>> Op 27 jun. 2022, om 23:35 heeft Mark Brethen <mark.brethen at gmail.com> het volgende geschreven:
>>>>> 
>>>>> Can a subport have variants?
>>>>> 
>>>>> Mark Brethen
>>>>> mark.brethen at gmail.com
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Jun 26, 2022, at 9:03 PM, Mark Brethen <mark.brethen at gmail.com> wrote:
>>>>>> 
>>>>>> I’ll do that. It’s been so long that I’ve forgotten how they’re set up.
>>>>>> 
>>>>>> Mark Brethen
>>>>>> mark.brethen at gmail.com
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> On Jun 26, 2022, at 8:56 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
>>>>>>> 
>>>>>>> On Jun 26, 2022, at 17:39, Mark Brethen wrote:
>>>>>>>> 
>>>>>>>> Attaching a Portfile that uses variants—downside is you can only install one. Maybe that is sufficient? I couldn’t find any documentation for using subports.
>>>>>>> 
>>>>>>> What would you like to know about subports? Have you looked at any existing portfiles that use subports to see how they work?
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
> 



More information about the macports-dev mailing list