On 2022/11/22 11:00, Stefan Sperling wrote:
> ping

While we _can_ do the BUILD_DEPENDS=games/zelda3-rom:patch thing here,
I don't think there any benefit over just using a standard dependency.
So while I don't object to doing it that way, I think it's better to
keep that for cases which actually require it.

Normally we only use that construct if some port requires private
headers or similar which aren't normally installed, or for a port to
be built in a special way. Specifically, only the following ports use it:

converters/k2pdfopt (which is marked BROKEN anyway); wants to build
its own special copy of mupdf and tesseract with patches applied

security/sslscan; builds static openssl lib with special build
options (i.e. to enable ciphers/features that we don't normally want)

sysutils/flashrom; needs a patch to pciutils libpci to emulate <32 bit
access to PCI, which pciutils maintainer didn't want

x11/mplayer; iirc wants ffmpeg private headers

So I would replace the games/zelda3-data/Makefile diff with this.
But either that or your diff is OK with me.


Index: Makefile
===================================================================
RCS file: /cvs/ports/games/zelda3-data/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile    12 Nov 2022 20:54:28 -0000      1.2
+++ Makefile    22 Nov 2022 11:36:04 -0000
@@ -2,9 +2,6 @@ COMMENT =       game data files for zelda3
 
 DISTNAME =     zelda3-0.1pre20221101
 PKGNAME =      zelda3-data-0.1pre20221101
-# GH_DISTFILE contains curly braces { } which won't work here
-ZELDA3_DISTFILE = ${DISTNAME}-${GH_COMMIT:C/(........).*/\1/}${EXTRACT_SUFX}
-DISTFILES =    zelda3.sfc ${ZELDA3_DISTFILE}
 
 # use a commit hash, for now; the latest tag (v0.1-beta) is quite outdated
 GH_ACCOUNT =   snesrev
@@ -22,26 +19,18 @@ MODPY_RUNDEP =  No
 USE_GMAKE =    Yes
 
 BUILD_DEPENDS =        graphics/py-Pillow${MODPY_FLAVOR} \
-               textproc/py-yaml${MODPY_FLAVOR}
-
-FETCH_MANUALLY += "zelda3.sfc has sha256 checksum"
-FETCH_MANUALLY += 
"66871d66be19ad2c34c927d6b14cd8eb6fc3181965b6e517cb361f7316009cfb"
-FETCH_MANUALLY += "and must be placed into ${DISTDIR}."
-FETCH_MANUALLY += "It can be extracted from a retail SNES cartridge using"
-FETCH_MANUALLY += "tools such as https://github.com/sanni/cartreader";
+               textproc/py-yaml${MODPY_FLAVOR} \
+               games/zelda3-rom
 
 PERMIT_PACKAGE =       proprietary ROM image
 PERMIT_DISTFILES =     ${PERMIT_PACKAGE}
 
-# do not attempt to extract zelda3.sfc
-EXTRACT_CASES =                *.sfc) ;;
-
 CONFIGURE_STYLE =      none
 # the game program is compiled by games/zelda3; we just build the assets
 ALL_TARGET =           tables/zelda3_assets.dat
 
 pre-build:
-       ${INSTALL_DATA} ${DISTDIR}/zelda3.sfc ${WRKSRC}/tables/zelda3.sfc
+       ln -sf ${LOCALBASE}/share/zelda3/zelda3.sfc ${WRKSRC}/tables/zelda3.sfc
 
 do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/zelda3

Reply via email to