# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DESCRIPTION="Dfmt is a formatter for D source code" HOMEPAGE="https://github.com/dlang-community/dfmt" LIBDPARSE="fe6d1e38fb4fc04323170389cfec67ed7fd4e24a" SRC_URI=" https://github.com/dlang-community/dfmt/archive/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz https://github.com/dlang-community/libdparse/archive/${LIBDPARSE}.tar.gz -> libdparse-${LIBDPARSE}.tar.gz " LICENSE="Boost-1.0" SLOT="0" KEYWORDS="~amd64 ~arm64 ~x86" DLANG_COMPAT=( dmd-2_{106..108} gdc-13 ldc2-1_{35..37} ) inherit dlang-single bash-completion-r1 REQUIRED_USE=${DLANG_REQUIRED_USE} DEPEND=${DLANG_DEPS} BDEPEND=${DLANG_DEPS} RDEPEND=${DLANG_DEPS} src_prepare() { mv -T "../libdparse-${LIBDPARSE}" libdparse || die "Couldn't move submodule libdparse" # Make a dummy folder to silence a find warning in the makefile mkdir -p stdx-allocator/source || die "Couldn't create dummy stdx-allocator directory" default mkdir bin || die "Failed to create 'bin' directory." echo "v${PV}" > bin/githash.txt touch githash # Use our user's flags + $(INCLUDE_PATHS) defined in the makefile export D_FLAGS="$(dlang_get_dmdw_dcflags) $(dlang_get_dmdw_ldflags) \$(INCLUDE_PATHS)" # Tests fail with -march=native and -O2 with