From e96b3c3ba152ab0b576ceaa7e3cb0c10c427b38d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 21 Aug 2023 21:27:11 +0700 Subject: [PATCH] OpenRCT2: download all needed archives before do_build --- srcpkgs/OpenRCT2/template | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/srcpkgs/OpenRCT2/template b/srcpkgs/OpenRCT2/template index 5866e44d12d..39873d3edc4 100644 --- a/srcpkgs/OpenRCT2/template +++ b/srcpkgs/OpenRCT2/template @@ -34,11 +34,21 @@ changelog="https://openrct2.org/changelog" # download objects and title sequences ourselves, instead of letting cmake do it distfiles="https://github.com/OpenRCT2/OpenRCT2/archive/v${version}.tar.gz https://github.com/OpenRCT2/objects/releases/download/v${_objects_version}/objects.zip + https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.3/opensound.zip + https://github.com/OpenRCT2/OpenMusic/releases/download/v1.3.0/openmusic.zip + https://github.com/OpenRCT2/replays/releases/download/v${_replays_version}/replays.zip https://github.com/OpenRCT2/title-sequences/releases/download/v${_titles_version}/title-sequences.zip" checksum="eb9e20dc0dcbf10b02b5f334a029983a0a2b43d931f95a2088a64e8b2657bab1 bf85d88e4fb11ca2e5915567390898747dc2459b3c7a057bdc32b829c91780b4 + 70be1b6ff8cc24ad8031a2e0cdd445b5dd3c52c886a8e5f70401f75152e4ae6c + b3423f574a969479d51dfa54f04edbe2557f37812409a9b5e5e52e59f71f4fb8 + a6bdfdcc7d916ce060961c5fe7beaf43679fbfad9838cfdbd067617ae0ac0ddf 6e7c7b554717072bfc7acb96fd0101dc8e7f0ea0ea316367a05c2e92950c9029" -skip_extraction="objects.zip title-sequences.zip" +skip_extraction="objects.zip + opensound.zip + openmusic.zip + replays.zip + title-sequences.zip" replaces="OpenRCT2-data>=0" @@ -70,10 +80,6 @@ fi if [ "$XBPS_CHECK_PKGS" ]; then configure_args+=" -DWITH_TESTS=1 -DSYSTEM_GTEST=1" - # download replays, used in tests - distfiles+=" https://github.com/OpenRCT2/replays/releases/download/v${_replays_version}/replays.zip" - checksum+=" a6bdfdcc7d916ce060961c5fe7beaf43679fbfad9838cfdbd067617ae0ac0ddf" - skip_extraction+=" replays.zip" fi if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then @@ -81,17 +87,16 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then fi post_extract() { - _srcdir="${XBPS_SRCDISTDIR}/${pkgname}-${version}" _builddir="${build_wrksrc:+$build_wrksrc/}${cmake_builddir:=build}" - unzip -qd data/object "${_srcdir}/objects.zip" - unzip -qd data/sequence "${_srcdir}/title-sequences.zip" - if [ "$XBPS_CHECK_PKGS" ]; then - unzip -qd test/tests/testdata/replays "${_srcdir}/replays.zip" - # CMakeLists seems to assume `install` is run before `check`, and so - # doesn't actually make the `data`/`testdata` symlinks in time - mkdir -p "${_builddir}" - ln -rs data testdata "${_builddir}/" - fi + vsrcextract --no-strip-components -C data/object objects.zip + vsrcextract --no-strip-components -C data/sequence title-sequences.zip + vsrcextract --no-strip-components -C data opensound.zip + vsrcextract --no-strip-components -C data openmusic.zip + vsrcextract --no-strip-components -C test/tests/testdata/replays replays.zip + # CMakeLists seems to assume `install` is run before `check`, and so + # doesn't actually make the `data`/`testdata` symlinks in time + mkdir -p "${_builddir}" + ln -rs data testdata "${_builddir}/" vsed -i CMakeLists.txt -e "s; -Werror;;" }