diff --git a/cad/horizon-eda/Makefile b/cad/horizon-eda/Makefile index 1f350fbff464..1d1e50ba1895 100644 --- a/cad/horizon-eda/Makefile +++ b/cad/horizon-eda/Makefile @@ -1,49 +1,47 @@ PORTNAME= horizon-eda DISTVERSIONPREFIX= v DISTVERSION= 2.3.1 PORTREVISION= 2 CATEGORIES= cad MAINTAINER= yuri@FreeBSD.org COMMENT= EDA package for printed circuit board design WWW= https://horizon-eda.org/ LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE -BROKEN_FreeBSD_14= fails to compile (error: no matching function for call to '__search') due to this clang regression: https://github.com/llvm/llvm-project/issues/55683 - BUILD_DEPENDS= ${LOCALBASE}/include/boost/optional.hpp:devel/boost-libs \ cppzmq>0:net/cppzmq \ glm>0:math/glm LIB_DEPENDS= libcurl.so:ftp/curl \ libepoxy.so:graphics/libepoxy \ libgit2.so:devel/libgit2 \ libharfbuzz.so:print/harfbuzz \ libpng16.so:graphics/png \ libpodofo.so:graphics/podofo \ libTKSTEP.so:cad/opencascade \ libuuid.so:misc/e2fsprogs-libuuid \ libzip.so:archivers/libzip \ libzmq.so:net/libzmq4 USES= gmake gnome libarchive localbase pkgconfig python:build sqlite # compiler:c++17-lang USE_GNOME= atkmm gdkpixbuf2 gtkmm30 librsvg2 USE_GITHUB= yes GH_PROJECT= horizon MAKE_ARGS= DEBUGFLAGS= OPTIMIZE= BINARY_ALIAS= python3=${PYTHON_CMD} LLVM_VER= 12 # workaround for bug#263870 BUILD_DEPENDS+= clang${LLVM_VER}:devel/llvm${LLVM_VER} CPP= clang-cpp${LLVM_VER} CC= clang${LLVM_VER} CXX= clang++${LLVM_VER} post-install: # https://github.com/horizon-eda/horizon/issues/558 @cd ${STAGEDIR}${PREFIX}/bin && ${STRIP_CMD} horizon-eda horizon-imp .include diff --git a/cad/horizon-eda/files/patch-src_util_fs__util.cpp b/cad/horizon-eda/files/patch-src_util_fs__util.cpp new file mode 100644 index 000000000000..6fa4f04f2d20 --- /dev/null +++ b/cad/horizon-eda/files/patch-src_util_fs__util.cpp @@ -0,0 +1,20 @@ +- workaround for https://github.com/llvm/llvm-project/issues/55683 + +--- src/util/fs_util.cpp.orig 2022-05-29 18:00:44 UTC ++++ src/util/fs_util.cpp +@@ -8,10 +8,10 @@ std::optional get_relative_filename(const + { + const auto p = fs::u8path(path); + const auto b = fs::u8path(base); +- const auto x = std::search(p.begin(), p.end(), b.begin(), b.end()); +- if (x == p.begin()) // path is in base path +- return fs::relative(p, b).u8string(); +- else +- return {}; ++ for (auto ip = p.begin(), ib = b.begin(); ib != b.end(); ip++, ib++) { ++ if (ip == p.end() || *ip != *ib) ++ return {}; ++ } ++ return fs::relative(p, b).u8string(); + } + } // namespace horizon