ping

On Mon, Nov 14, 2022 at 01:23:19PM +0100, Stefan Sperling wrote:
> On Mon, Nov 14, 2022 at 12:40:19PM +0100, Stefan Sperling wrote:
> > espie@ suggested that the FETCH_MANUALLY distfile should be isolated
> > into a separate port. This should make things easier for bulk builders,
> > and avoids hacks around GH_DISTFILE.
> > 
> > ok?
> 
> Updated patch which adds a pseudo do-install target and DESCR and PLIST
> to the zelda3-rom port, to make it less weird.
> The -rom package is not installed when building zelda3-data, since -data
> depends on the :patch stage of -rom.
> 
> diff refs/heads/master refs/heads/zelda3-rom
> commit - f2ea66a16674d866fb6e818ad75e4e519e7728bd
> commit + bc6407c16e7c7e7018301833f9273e4d2b65d6d7
> blob - 1a80c28c114a3c8b36b855d1596be2641044d1b9
> blob + 228e407ca8d76ee862a8d69f7e201f841a15d33e
> --- games/zelda3-data/Makefile
> +++ games/zelda3-data/Makefile
> @@ -2,9 +2,6 @@ PKGNAME =     zelda3-data-0.1pre20221101
>  
>  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 @@ BUILD_DEPENDS =   graphics/py-Pillow${MODPY_FLAVOR} \
>  USE_GMAKE =  Yes
>  
>  BUILD_DEPENDS =      graphics/py-Pillow${MODPY_FLAVOR} \
> -             textproc/py-yaml${MODPY_FLAVOR}
> +             textproc/py-yaml${MODPY_FLAVOR} \
> +             games/zelda3-rom:patch
>  
> -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";
> -
>  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 ${WRKDIR}/games/zelda3-rom/zelda3.sfc ${WRKSRC}/tables/zelda3.sfc
>  
>  do-install:
>       ${INSTALL_DATA_DIR} ${PREFIX}/share/zelda3
> blob - 0e3952cc28d06092f7485a00198f9a520c61f0e4
> blob + 8aad0c00a804349edb6222698a454cbbf2d149e5
> --- games/zelda3-data/distinfo
> +++ games/zelda3-data/distinfo
> @@ -1,4 +1,2 @@
>  SHA256 (zelda3-0.1pre20221101-91d771ec.tar.gz) = 
> nQ8+nFZQ+PW9nAzYSRuXVVOp+fewoYsbt37ympzqcwc=
> -SHA256 (zelda3.sfc) = ZocdZr4ZrSw0ySfWsUzY62/DGBlltuUXyzYfcxYAnPs=
>  SIZE (zelda3-0.1pre20221101-91d771ec.tar.gz) = 3907372
> -SIZE (zelda3.sfc) = 1048576
> blob - d923b6760bfe6054a57653e906069a58fb521827
> blob + a4dc2ea1bd7763689d3a7a5b098d943498eb45ac
> --- games/zelda3-data/pkg/DESCR
> +++ games/zelda3-data/pkg/DESCR
> @@ -1,3 +1,3 @@
> -Zelda 3 - A Link to the Past (US) ROM image.
> +Zelda 3 - A Link to the Past game assets.
>  
>  Copyright 1991, 1992 Nintendo.
> blob - /dev/null
> blob + 9ac39d5e085609a96ed5d8c6b0d5d849338729a2 (mode 644)
> --- /dev/null
> +++ games/zelda3-rom/Makefile
> @@ -0,0 +1,34 @@
> +COMMENT =    zelda3 ROM image
> +
> +DISTNAME =   zelda3-rom-0.0
> +
> +DISTFILES =  zelda3.sfc
> +
> +CATEGORIES = games
> +
> +HOMEPAGE =   https://www.nintendo.com
> +
> +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";
> +
> +PERMIT_PACKAGE =     proprietary ROM image
> +PERMIT_DISTFILES =   ${PERMIT_PACKAGE}
> +
> +EXTRACT_ONLY =
> +
> +WRKDIST = ${WRKDIR}
> +
> +NO_BUILD = Yes
> +NO_TEST = Yes
> +
> +post-extract:
> +     ln -sf ${DISTDIR}/zelda3.sfc ${WRKDIR}
> +
> +do-install:
> +     ${INSTALL_DATA_DIR} ${PREFIX}/share/zelda3
> +     ${INSTALL_DATA} ${WRKDIR}/zelda3.sfc ${PREFIX}/share/zelda3/zelda3.sfc
> +
> +.include <bsd.port.mk>
> blob - /dev/null
> blob + 71f5f624d21060ef88b7f39ddc49244860a9b71a (mode 644)
> --- /dev/null
> +++ games/zelda3-rom/distinfo
> @@ -0,0 +1,2 @@
> +SHA256 (zelda3.sfc) = ZocdZr4ZrSw0ySfWsUzY62/DGBlltuUXyzYfcxYAnPs=
> +SIZE (zelda3.sfc) = 1048576
> blob - /dev/null
> blob + d923b6760bfe6054a57653e906069a58fb521827 (mode 644)
> --- /dev/null
> +++ games/zelda3-rom/pkg/DESCR
> @@ -0,0 +1,3 @@
> +Zelda 3 - A Link to the Past (US) ROM image.
> +
> +Copyright 1991, 1992 Nintendo.
> blob - /dev/null
> blob + 5ba88283b0bf888128cdcc16f7b2a722a5dece0c (mode 644)
> --- /dev/null
> +++ games/zelda3-rom/pkg/PLIST
> @@ -0,0 +1,2 @@
> +share/zelda3/
> +share/zelda3/zelda3.sfc
> 
> 

Reply via email to