Re: Frotz build targets
On Jun 27, 2022, at 17:47, Nils Breunese 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 { … }’. Many ports currently use variants for this, yes, but partly that's because they got done that way before the subport feature existed. Separate ports (whether implemented as subports within a single Portfile or as separate Portfiles) are better because, if done correctly, any number of those ports can be installed simultaneously, and we can build binaries of them on our automated buildbot system. (We only build ports' default variants.) This in turn is preferred by users, who would rather not have to compile things from source just because they want a different set of options compiled in. The freeciv and freeciv-x11 ports are examples of this, and Chris has recently indicated a desire to undertake the restructuring necessary to do the same separation for glib, gtk, and everything depending on them; see https://trac.macports.org/ticket/63680.
Re: Frotz build targets
I removed the default_variants statement and added the “requires” keyword in the sdl variant statement. Portfile Description: Binary data Mark > On Jun 27, 2022, at 10:31 PM, Mark Brethen wrote: > > Here is a working portfile that adds sound and sdl graphics to the original. > Anyone care to test it out? > > > > Thanks, > > Mark Brethen > mark.bret...@gmail.com > > > >> On Jun 27, 2022, at 5:47 PM, Nils Breunese 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 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) >>> >>> >>> Mark Brethen >>> mark.bret...@gmail.com >>> >>> >>> On Jun 27, 2022, at 5:16 PM, Nils Breunese 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 het > volgende geschreven: > > Can a subport have variants? > > Mark Brethen > mark.bret...@gmail.com > > > >> On Jun 26, 2022, at 9:03 PM, Mark Brethen wrote: >> >> I’ll do that. It’s been so long that I’ve forgotten how they’re set up. >> >> Mark Brethen >> mark.bret...@gmail.com >> >> >> >>> On Jun 26, 2022, at 8:56 PM, Ryan Schmidt >>> 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? >>> >> > >>> >> >
Re: Frotz build targets
Here is a working portfile that adds sound and sdl graphics to the original. Anyone care to test it out? Portfile Description: Binary data Thanks, Mark Brethen mark.bret...@gmail.com > On Jun 27, 2022, at 5:47 PM, Nils Breunese 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 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) >> >> >> Mark Brethen >> mark.bret...@gmail.com >> >> >> >>> On Jun 27, 2022, at 5:16 PM, Nils Breunese 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 het volgende geschreven: Can a subport have variants? Mark Brethen mark.bret...@gmail.com > On Jun 26, 2022, at 9:03 PM, Mark Brethen wrote: > > I’ll do that. It’s been so long that I’ve forgotten how they’re set up. > > Mark Brethen > mark.bret...@gmail.com > > > >> On Jun 26, 2022, at 8:56 PM, Ryan Schmidt >> 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? >> > >>> >> >
Re: Frotz build targets
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 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) > > > Mark Brethen > mark.bret...@gmail.com > > > >> On Jun 27, 2022, at 5:16 PM, Nils Breunese 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 het >>> volgende geschreven: >>> >>> Can a subport have variants? >>> >>> Mark Brethen >>> mark.bret...@gmail.com >>> >>> >>> On Jun 26, 2022, at 9:03 PM, Mark Brethen wrote: I’ll do that. It’s been so long that I’ve forgotten how they’re set up. Mark Brethen mark.bret...@gmail.com > On Jun 26, 2022, at 8:56 PM, Ryan Schmidt 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? > >>> >> >
Re: Frotz build targets
On Mon, Jun 27, 2022 at 5:35 PM Mark Brethen wrote: > Can a subport have variants? Yes, they can. As Nils points out, subports can have variants that are specific to that subport by using conditional logic: if {$subport eq "mySubport"} { variant theVariant description {This variant only exists for subport "mySubport"} { ... } } -- Jason Liu On Mon, Jun 27, 2022 at 6:17 PM Nils Breunese 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 > het volgende geschreven: > > > > Can a subport have variants? > > > > Mark Brethen > > mark.bret...@gmail.com > > > > > > > >> On Jun 26, 2022, at 9:03 PM, Mark Brethen > wrote: > >> > >> I’ll do that. It’s been so long that I’ve forgotten how they’re set up. > >> > >> Mark Brethen > >> mark.bret...@gmail.com > >> > >> > >> > >>> On Jun 26, 2022, at 8:56 PM, Ryan Schmidt > 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? > >>> > >> > > > >
Re: Frotz build targets
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 Description: Binary data Mark Brethen mark.bret...@gmail.com > On Jun 27, 2022, at 5:16 PM, Nils Breunese 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 het >> volgende geschreven: >> >> Can a subport have variants? >> >> Mark Brethen >> mark.bret...@gmail.com >> >> >> >>> On Jun 26, 2022, at 9:03 PM, Mark Brethen wrote: >>> >>> I’ll do that. It’s been so long that I’ve forgotten how they’re set up. >>> >>> Mark Brethen >>> mark.bret...@gmail.com >>> >>> >>> On Jun 26, 2022, at 8:56 PM, Ryan Schmidt 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? >>> >> >
Re: Frotz build targets
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 het > volgende geschreven: > > Can a subport have variants? > > Mark Brethen > mark.bret...@gmail.com > > > >> On Jun 26, 2022, at 9:03 PM, Mark Brethen wrote: >> >> I’ll do that. It’s been so long that I’ve forgotten how they’re set up. >> >> Mark Brethen >> mark.bret...@gmail.com >> >> >> >>> On Jun 26, 2022, at 8:56 PM, Ryan Schmidt 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? >>> >> >
Re: Frotz build targets
Can a subport have variants? Mark Brethen mark.bret...@gmail.com > On Jun 26, 2022, at 9:03 PM, Mark Brethen wrote: > > I’ll do that. It’s been so long that I’ve forgotten how they’re set up. > > Mark Brethen > mark.bret...@gmail.com > > > >> On Jun 26, 2022, at 8:56 PM, Ryan Schmidt 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? >> >
Re: Frotz build targets
I’ll do that. It’s been so long that I’ve forgotten how they’re set up. Mark Brethen mark.bret...@gmail.com > On Jun 26, 2022, at 8:56 PM, Ryan Schmidt 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? >
Re: Frotz build targets
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?
Re: Frotz build targets
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. Portfile Description: Binary data Mark Brethen mark.bret...@gmail.com > On Jun 26, 2022, at 5:01 PM, Ryan Schmidt wrote: > > On Jun 26, 2022, at 14:23, Mark Brethen wrote: > >> But is there an interest in building for X11 anymore? > > I do not know about frotz, but in MacPorts ports in general, yes, there is > still interest in X11. Ports that have optional X11 components can make them > available in an +x11 variant. >
Re: Frotz build targets
On Jun 26, 2022, at 14:23, Mark Brethen wrote: > But is there an interest in building for X11 anymore? I do not know about frotz, but in MacPorts ports in general, yes, there is still interest in X11. Ports that have optional X11 components can make them available in an +x11 variant.
Frotz build targets
The Frotz Makefile has all: $(FROTZ_BIN) $(DFROTZ_BIN) $(SFROTZ_BIN) $(XFROTZ_BIN) The existing port is limited to frotz_bin only. If build.target is not specified all 4 are built. But is there an interest in building for X11 anymore? The next decision is to install them individually as variants or subports. But I wonder if it is advantageous (or even possible) to do something like this: def install targets = %w[frotz dumb sdl] targets.each do |target| system "make", target, *args end targets.each do |target| system "make", "install_#{target}", *args end end Mark Brethen mark.bret...@gmail.com