From owner-freebsd-ports@freebsd.org Tue Feb 4 06:37:57 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A0A923D684 for ; Tue, 4 Feb 2020 06:37:57 +0000 (UTC) (envelope-from dave@661.org) Received: from hermes.661.org (hermes.661.org [192.81.131.210]) by mx1.freebsd.org (Postfix) with ESMTP id 48BZkq5zZQz4kRX for ; Tue, 4 Feb 2020 06:37:55 +0000 (UTC) (envelope-from dave@661.org) Received: by hermes.661.org (Postfix, from userid 1000) id 0F7AC1FFD0; Tue, 4 Feb 2020 06:37:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hermes.661.org (Postfix) with ESMTP id 0D6651E1C7 for ; Tue, 4 Feb 2020 06:37:53 +0000 (UTC) Date: Tue, 4 Feb 2020 06:37:53 +0000 (UTC) From: David Griffith To: FreeBSD Ports Subject: Seeking flavors examples and advice Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Rspamd-Queue-Id: 48BZkq5zZQz4kRX X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of dave@661.org has no SPF policy when checking 192.81.131.210) smtp.mailfrom=dave@661.org X-Spamd-Result: default: False [-1.13 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.90)[-0.904,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.96)[-0.963,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; DMARC_NA(0.00)[661.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-0.26)[asn: 63949(-1.24), country: US(-0.05)]; TO_DN_ALL(0.00)[]; R_SPF_NA(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:63949, ipnet:192.81.131.0/24, country:US]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2020 06:37:57 -0000 Would someone please point me to a simple example of FLAVORS being used to build something in ports to select different targets. I recently took over games/frotz for which I am also upstream. This package can be built with three different user interfaces with one of them having two sub-variations. There are curses-nosound, curses (uses libao for audio output), dumb (no screen handling at all), and SDL (uses libsdl for graphics and audio). When building straight from source, you simply do "gmake curses", "gmake nosound", "gmake dumb", or "gmake sdl" and you get the interface specified by the parameter supplied to gmake. I can't seem to find any webpage that goes into any more detail than https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/flavors-using.html and this leaves me wondering just how to even start. Here's what I have so far: targeting noaudio and dumb for starters. I'm leaving out documentation and examples for now until I figure this out. Both the noaudio and dumb targets will build, but when I do "make install" or "make FLAVOR=dumb install", nothing actually gets put into /usr/local/bin. # Created by: Andrey Zakhvatov # $FreeBSD: head/games/frotz/Makefile 522166 2020-01-05 19:39:46Z tcberner $ PORTNAME= frotz PORTVERSION= 2.50 CATEGORIES= games MAINTAINER= dave@661.org COMMENT= Infocom Z-machine games interpreter LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING USE_GITLAB= yes GL_ACCOUNT= DavidGriffith GL_COMMIT= 9867a1f14da1e9c0707492d2ac74d1e8ffdd3a64 USES= gmake FLAVORS= curses dumb FLAVOR?= ${FLAVORS:[1]} curses_PKGNAMESUFFIX= -curses dumb_PKGNAMESUFFIX= -dumb curses_PLIST= bin/frotz\ man/man6/frotz.6.gz dumb_PLIST= bin/dfrotz\ man/man6/dfrotz.6.gz .if ${FLAVOR:U} == curses COMMENT+= (curses interface, no audio) ALL_TARGET= nosound USES+= ncurses .elif ${FLAVOR:U} == dumb COMMENT+= (dumb interface) ALL_TARGET= dumb dumb_PKGNAMEPREFIX= d .endif MAKE_ENV= OPTS="${CFLAGS}" CONFIG_DIR="${PREFIX}/etc" do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PKGNAMEPREFIX}${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_MAN} ${WRKSRC}/doc/${PKGNAMEPREFIX}${PORTNAME}.6 ${STAGEDIR}${MAN6PREFIX}/man/man6/ .include -- David Griffith dave@661.org A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?