From nobody Fri Feb 23 07:05:07 2024 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Th1Hh74n7z5BvFk for ; Fri, 23 Feb 2024 07:05:36 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Th1Hh50NDz44bm for ; Fri, 23 Feb 2024 07:05:36 +0000 (UTC) (envelope-from 6yearold@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vk1-f169.google.com with SMTP id 71dfb90a1353d-4affeacaff9so117560e0c.3 for ; Thu, 22 Feb 2024 23:05:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708671935; x=1709276735; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y80fvHsC1BbQvFUGzwdUa3kvK51BhQVtOsv1cq0IgyY=; b=JQlctttjLxP8uAdcrTGU9RJITc76NGAFzRlybixn7TkIuV73BqDdOi5Dll1tpSS/1V ngMW4Q3hRzh04eLC4MeADIQX7V3H+k1M8CbhldUGOJUxN2uS0ZCcw3WFuy3s78W+GK+U ghqngt6m55pSaZiJoBwyM9iSKni0QQBG0ynqOmO5QREuX9mKkkF3EDdoJi3lLj7x7Ihd K4Z50CO7BTj4/gSSaqtXQHkTstS0CjTdm90iJWHpF1RbzOTkqHwbth87g0vAatXKxy23 hkNEB9OgdPHySi0a3cnHBFT2n+licGkc8sh6dgcGDeAdnlCcE+LJ4ieSJYTy5lG7bHXT RpYQ== X-Gm-Message-State: AOJu0Yy/BDqKx8B/xWG05QYqAKiSnIOLzA5aYTeuE1MY6g7AuPcHCkCc 25MqNnL3O4DeLm6KwVimakKAHbwqH3qQWTklBNRCgnGk03cSpPnleNYJhx0Z51U= X-Google-Smtp-Source: AGHT+IHdfkq5KfpNT8Mr+0IPNrDEY7OWSoZgfohzVEMd98LHufAgjGy53HWZlUlrbskav+TBEiK+gA== X-Received: by 2002:a1f:cac1:0:b0:4ce:36d7:49b9 with SMTP id a184-20020a1fcac1000000b004ce36d749b9mr1188338vkg.14.1708671934630; Thu, 22 Feb 2024 23:05:34 -0800 (PST) Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com. [209.85.222.46]) by smtp.gmail.com with ESMTPSA id j16-20020ac5c310000000b004cc4f2df3edsm1287436vkk.31.2024.02.22.23.05.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Feb 2024 23:05:34 -0800 (PST) Received: by mail-ua1-f46.google.com with SMTP id a1e0cc1a2514c-7d2e1a0337bso362872241.3 for ; Thu, 22 Feb 2024 23:05:34 -0800 (PST) X-Received: by 2002:a67:e448:0:b0:470:4530:33e8 with SMTP id n8-20020a67e448000000b00470453033e8mr1051609vsm.23.1708671934234; Thu, 22 Feb 2024 23:05:34 -0800 (PST) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 References: <0f7f4f5675d1e75e504ad67d963e8874@riseup.net> In-Reply-To: <0f7f4f5675d1e75e504ad67d963e8874@riseup.net> From: Gleb Popov Date: Fri, 23 Feb 2024 10:05:07 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: emulators/mame: Increasing option granularity woes To: Alastair Hogge Cc: freebsd-ports@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4Th1Hh50NDz44bm X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On Fri, Feb 23, 2024 at 5:51=E2=80=AFAM Alastair Hogge wro= te: > > Hello, > > The current in-tree port of mame, 0.261, is built around the core > multi-emulation framework, which results in the usual mega monolithic > mame binary. There are options for TOOLS, which include two other > emulators. The current upstream release, 0.262 has enabled separation of > mame from the rest of the project=E2=80=94TOOLS can now be built separate= ly. I > would like to reflect this in the Port, however, that means moving the > two added emulators (LaserDisk player, and Netlist resolver) out of > TOOLS (which I think the correct path to take). Considering the new > upstream build pattern, I would like to configure the Port to option any > of the emulators, and existing TOOLS. The problem I am facing, the three > emulators require the same (or close to it) runtime config/resources, > the assets are currently covered by the do-install target[1], how do I > cover the assets in the Port, specifically in the pkg-plist to be > conditioned on either of 3 potential emulator options? Should I add an > option MAMEDATA? You're almost right. Indeed there is no need in the user-visible option, but you want all other machinery to kick in. Basically, it boils down to .if somecond PLIST_SUB+=3D MAMEDATA=3D .else PLIST_SUB+=3D MAMEDATA=3D"@comment " .endif where "somecond" defines if the files should be present in the package. For OPTIONS (and when OPTIONS_SUB=3Dyes is present [1]) it happens automatically. If you end up with "somecond" being in form "${PORT_OPTIONS:MFOO} || ${PORT_OPTIONS:MBAR}" then you could simplify it even more FOO_PLIST_SUB=3D MAMEDATA=3D FOO_PLIST_SUB_OFF=3D MAMEDATA=3D"@comment " BAR_PLIST_SUB=3D MAMEDATA=3D BAR_PLIST_SUB_OFF=3D MAMEDATA=3D"@comment " [1] https://docs.freebsd.org/en/books/porters-handbook/makefiles/#options_s= ub