Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Dec 2019 08:43:43 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r518760 - in head: Mk/Uses games/jaggedalliance2 x11/squeekboard
Message-ID:  <201912010843.xB18hhfu097377@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sun Dec  1 08:43:43 2019
New Revision: 518760
URL: https://svnweb.freebsd.org/changeset/ports/518760

Log:
  Mk/Uses/cargo.mk: Do not override do-configure
  
  Cargo vendoring can be useful even for ports that use other build
  systems like Meson to call Cargo for the actual build.  Often they
  use the framework's default do-configure which USES=cargo should
  not overwrite.
  
  Remove hacks from games/jaggedalliance2 and x11/squeekboard.
  
  Reviewed by:	jbeich
  Differential Revision:	https://reviews.freebsd.org/D22619

Modified:
  head/Mk/Uses/cargo.mk
  head/games/jaggedalliance2/Makefile
  head/x11/squeekboard/Makefile

Modified: head/Mk/Uses/cargo.mk
==============================================================================
--- head/Mk/Uses/cargo.mk	Sun Dec  1 08:36:19 2019	(r518759)
+++ head/Mk/Uses/cargo.mk	Sun Dec  1 08:43:43 2019	(r518760)
@@ -241,10 +241,12 @@ cargo-patch-git:
 		${SED} -i.dist -E ${_CARGO_GIT_PATCH_CARGOTOML} {} +
 .endif
 
-.if !target(do-configure) && ${CARGO_CONFIGURE:tl} == "yes"
+.if ${CARGO_CONFIGURE:tl} == "yes"
+_USES_configure+=	250:cargo-configure
+
 # configure hook.  Place a config file for overriding crates-io index
 # by local source directory.
-do-configure:
+cargo-configure:
 	@${MKDIR} ${WRKDIR}/.cargo
 	@${ECHO_CMD} "[source.cargo]" > ${WRKDIR}/.cargo/config
 	@${ECHO_CMD} "directory = '${CARGO_VENDOR_DIR}'" >> ${WRKDIR}/.cargo/config

Modified: head/games/jaggedalliance2/Makefile
==============================================================================
--- head/games/jaggedalliance2/Makefile	Sun Dec  1 08:36:19 2019	(r518759)
+++ head/games/jaggedalliance2/Makefile	Sun Dec  1 08:43:43 2019	(r518760)
@@ -80,11 +80,6 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|/some/place/where/the/data/is|${DATADIR}|' \
 		${WRKSRC}/rust/src/stracciatella.rs
 
-post-configure:
-	@${MKDIR} ${CONFIGURE_WRKSRC}
-	@cd ${CONFIGURE_WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} \
-		${CMAKE_ARGS} ${CMAKE_SOURCE_PATH}
-
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ja2 \
 		${STAGEDIR}${PREFIX}/bin/ja2-launcher \

Modified: head/x11/squeekboard/Makefile
==============================================================================
--- head/x11/squeekboard/Makefile	Sun Dec  1 08:36:19 2019	(r518759)
+++ head/x11/squeekboard/Makefile	Sun Dec  1 08:43:43 2019	(r518760)
@@ -74,6 +74,9 @@ CARGO_CRATES=	aho-corasick-0.7.6 \
 		winapi-x86_64-pc-windows-gnu-0.4.0 \
 		xkbcommon-0.4.0 \
 		yaml-rust-0.4.3
+CARGO_BUILD=	no
+CARGO_INSTALL=	no
+CARGO_TEST=	no
 
 post-patch:
 # Pass USES=cargo environment to USES=meson
@@ -84,18 +87,5 @@ post-patch:
 		  s,"$$@","$$cmd" --verbose &,; }' \
 		-e '/OUT_PATH=/s,=.*,=$$PWD/$$1,' \
 		${WRKSRC}/cargo*.sh
-
-post-configure:
-# Run USES=meson after USES=cargo configures vendoring
-	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} \
-		${MAKE_ENV} ${CONFIGURE_CMD} ${CONFIGURE_ARGS})
-
-# Let USES=meson handle the rest
-do-build:
-	@${DO_MAKE_BUILD} -C${BUILD_WRKSRC} ${ALL_TARGET}
-do-install:
-	@${DO_MAKE_BUILD} -C${INSTALL_WRKSRC} ${INSTALL_TARGET}
-do-test:
-	@${DO_MAKE_BUILD} -C${TEST_WRKSRC} ${TEST_TARGET}
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912010843.xB18hhfu097377>