freebsd-ports/security/authenticator/Makefile
Yuri Victorovich f99a708957 Mk/Uses/cargo.mk: Remove cross-compilation options for Rust-based ports
Reasons:
* Port build shouldn't use cross-compilation mode
  because it buids for the same architecture.
* RUSTFLAGS isn't passed to the build of all or some Rust ports
  in the cross-compilation mode.

Essential changes:
* Remove the CARGO_BUILD_TARGET make variable.
* Remove CARGO_BUILD_TARGET and CARGO_TARGET_* from CARGO_ENV.
* Update many ports that used CARGO_BUILD_TARGET.
* Build paths now don't include the architecture triplet part.

Immadiate benefits:
* Unbreak build on architectures like i386 that sometimes require
  special RUSTFLAGS that were not effective in the cross-compilation
  mode.

Ports that really need cross-compilation for some reason should
enable it on case-by-case basis. Example: net-p2p/cncli
(Not sure why does net-p2p/cncli actually need it, but it only
builds with these options.)

PR:		280305
Approved by:	rust@FreeBSD.org (maintainer's timeout; 98 days)
2024-10-22 20:11:24 -07:00

41 lines
1.2 KiB
Makefile

PORTNAME= authenticator
DISTVERSION= 4.4.0
PORTREVISION= 1
CATEGORIES= security
MAINTAINER= ports@FreeBSD.org
COMMENT= Generate Two-Factor Codes
WWW= https://gitlab.gnome.org/World/Authenticator
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/LICENSE
BROKEN_i386= fails to build in aes crate
LIB_DEPENDS= libgraphene-1.0.so:graphics/graphene \
libzbar.so:graphics/zbar
RUN_DEPENDS= ${LOCALBASE}/lib/gstreamer-1.0/libgstgtk4.so:multimedia/gstreamer1-plugins-rust
USES= cargo desktop-file-utils gettext gnome gstreamer meson pkgconfig sqlite ssl
USE_GITLAB= yes
USE_GNOME= gdkpixbuf2 gtk40 libadwaita
USE_GSTREAMER= gl zbar
GL_SITE= https://gitlab.gnome.org
GL_ACCOUNT= World
GL_PROJECT= Authenticator
CARGO_ENV= ZBAR_INCLUDE_DIRS="${LOCALBASE}/include" ZBAR_LIB_DIRS="${LOCALBASE}/lib"
MAKE_ENV= ${CARGO_ENV}
CARGO_BUILD= no
CARGO_INSTALL= no
CARGO_TEST= no
GLIB_SCHEMAS= com.belmoussaoui.Authenticator.gschema.xml
post-patch:
@${REINPLACE_CMD} -e '/gstreamer.*bad/d' \
${WRKSRC}/meson.build
# Make each cargo subcommand very verbose
# Add explicit <triple> subdir for --target from USES=cargo
@${REINPLACE_CMD} -e "/cargo_options =/s/ '--/&verbose', &verbose', &/" \
${WRKSRC}/src/meson.build
.include <bsd.port.mk>