why not just drop the headerextract thing and just depend on :patch without the flavor. wine is for amd64 only anyway so the machines should be fast.
On 19/10/26 15:33 +0100, Stuart Henderson wrote: > trimmed cc a bit, but added devel/llvm maintainers: quick summary - > wine needs the headers from llvm that are removed by "search and remove > headers that might conflict with base". proposal for wine adds a file > that needs updating every llvm version bump which I don't like. I've > proposed to either add a ports-internal (unlinked) flavour that just > extracts the headers and reduces deps (quoted diff below), or to > move those headers to a different dir rather than remove them and > include in llvm packages. > > On 2026/10/19 14:44, Stuart Henderson wrote: > > here are two patches, for wine, and for devel/llvm, that make this > > significantly less annoying to deal with. my build is still running but > > I think it should work. > > wine builds with those patches for me. > > also I'm able to successfully run mikrotik winbox (connecting via MAC > doesn't work but by IP is fine, which is already pretty useful). > > > another way to do it: rather than completely removing the stripped-out > > headers, devel/llvm could install them under a different dir and > > include in packages. > > > > > > --- Makefile.orig Mon Oct 19 14:18:12 2026 > > +++ Makefile Mon Oct 19 14:43:16 2026 > > @@ -27,19 +27,14 @@ WANTLIB += lib/inotify/inotify lib/libpcap/pcap > > # loaded with dlopen() > > WANTLIB += SDL2 cups dbus-1 gnutls netapi vulkan xkbregistry > > > > -# keep this in sync with MODCLANG_VERSION > > -# source for updates/new releases: > > https://thfr.gothub.org/wine-clang-pe-headers > > -CLANG_PE_HEADERS = 22.1.8 > > -DISTFILES.clang-pe-headers = > > wine-clang-pe-headers-${CLANG_PE_HEADERS}.tar.gz > > -SITES.clang-pe-headers = https://thfr.info/distfiles/ > > - > > SITES = https://dl.winehq.org/wine/source/11.x/ > > EXTRACT_SUFX = .tar.xz > > > > MODULES = lang/clang > > > > BUILD_DEPENDS = devel/bison \ > > - devel/nasm > > + devel/nasm \ > > + ${_MODCLANG_BUILD_DEPENDS},headerextract:patch > > RUN_DEPENDS = multimedia/gstreamer1/libav \ > > multimedia/gstreamer1/plugins-bad \ > > multimedia/gstreamer1/plugins-good \ > > @@ -156,9 +151,9 @@ SUBST_VARS+= CLANG_PE_RESOURCE > > MODCLANG_VERSION > > > > pre-configure: > > ${INSTALL_DATA_DIR} ${CLANG_PE_RESOURCE}/include > > - cp -R ${CLANG_RESOURCE}/include/. ${CLANG_PE_RESOURCE}/include/ > > - cp ${WRKDIR}/wine-clang-pe-headers-${CLANG_PE_HEADERS}/*.h \ > > + cp ${WRKDIR}/devel/llvm/*/*/clang/lib/Headers/*.h \ > > ${CLANG_PE_RESOURCE}/include/ > > + cp -R ${CLANG_RESOURCE}/include/. ${CLANG_PE_RESOURCE}/include/ > > ln -sfh ${CLANG_RESOURCE}/lib ${CLANG_PE_RESOURCE}/lib > > ${SUBST_PROGRAM} ${FILESDIR}/clang-pe ${WRKDIR}/bin/clang-pe > > > > > > > > Index: Makefile.inc > > =================================================================== > > RCS file: /cvs/ports/devel/llvm/Makefile.inc,v > > diff -u -p -r1.35 Makefile.inc > > --- Makefile.inc 20 Sep 2026 14:25:09 -0000 1.35 > > +++ Makefile.inc 19 Oct 2026 13:35:06 -0000 > > @@ -97,9 +97,19 @@ COMPILER = base-clang ports-gcc > > > > MODULES += devel/cmake > > > > +# internal use for emulators/wine; reduce extraction size > > +FLAVORS= headerextract > > +FLAVOR?= > > + > > +.if ${FLAVOR} == headerextract > > +PATCH_LIST= > > +EXTRACT_CASES += llvm*.tar.xz) \ > > + xz -T${MAKE_JOBS} -d <${FULLDISTDIR}/$$archive | ${TAR} -xf - -- > > */clang/lib/Headers;; > > +.else > > BUILD_DEPENDS += devel/swig \ > > textproc/py-sphinx \ > > textproc/py-recommonmark > > +.endif > > > > CONFIGURE_STYLE += cmake > > CONFIGURE_ARGS += \ > > @@ -151,7 +161,8 @@ CXXFLAGS-powerpc = -fno-ret-protector > > CXXFLAGS-mips64 += -mxgot > > CXXFLAGS-mips64el += -mxgot > > > > -CXXFLAGS += ${CXXFLAGS-${MACHINE_ARCH}} > > +CXXFLAGS += ${CXXFLAGS-${MACHINE_ARCH}} \ > > + -D_LIBCPP_USE_LOWER_DEQUE_BLOCK_SIZE > > > > ALL_TARGET = all docs-llvm-man docs-clang-man > > > > -- Regards, Robert Nagy
