From: Rafael Sadowski Subject: Re: Fixed gcc PROPERTIES detection To: Stuart Henderson Cc: ports@openbsd.org Date: Sat, 25 Oct 2025 11:43:02 +0200 On Sat Oct 25, 2025 at 09:56:12AM +0100, Stuart Henderson wrote: > These GCC49_ARCHS are "archs where ports-gcc >4.9 exists". GCC4_ARCHS is a > totally different thing, "archs where the compiler in base is gcc 4", the > two are not interchangeable. Thank you for the explanation. From my point of view, it is certainly confusing. > > freebasic: I don't see why this is conditional, the port only builds on > ports-gcc archs. "XXX only pulls this if it actually exists" doesn't make > much sense. The various gcc4.port.mk files should have a MODGCC4_CDEP or > similar (similar to MODGCC4_CPPDEP) that ports can use so they don't need to > hardcode versions (as in the RUN_DEPENDS) and then free basic can use that. > > numpy: I don't think that needs to be conditional either? > Good points, new diff below: diff --git a/lang/freebasic/Makefile b/lang/freebasic/Makefile index 8b0f979cfc9..eb97f198694 100644 --- a/lang/freebasic/Makefile +++ b/lang/freebasic/Makefile @@ -7,7 +7,7 @@ V = 1.05.0 COMMENT = open-source, multi-platform BASIC compiler DISTNAME = FreeBASIC-${V}-source-openbsd PKGNAME = freebasic-${V} -REVISION = 1 +REVISION = 2 CATEGORIES = lang HOMEPAGE = https://www.freebasic.net/ @@ -17,7 +17,7 @@ MAINTAINER = Brian Callahan # Runtime and Graphics libs: LGPLv2+ with static linking exception PERMIT_PACKAGE = Yes -WANTLIB += c m ncurses pthread +WANTLIB += c curses m pthread # Can't use upstream; no OpenBSD bootstrap. SITES = https://devio.us/~bcallah/source/ @@ -31,14 +31,8 @@ COMPILER_LANGS = c # And your BASIC programs will be linked against it. BUILD_DEPENDS = devel/libffi -# XXX only pulls this if it actually exists -.include -.if ${PROPERTIES:Mgcc49} -# Use ports-gcc as the backend runtime compiler, since we know FreeBASIC -# will generate C files with GNU C extensions that clang doesn't like. RUN_DEPENDS = devel/libffi \ - lang/gcc/${MODGCC4_VERSION},-main # Something else? -.endif + lang/gcc/${MODGCC4_VERSION},-main USE_GMAKE = Yes MAKE_FILE = makefile @@ -51,6 +45,8 @@ FAKE_FLAGS = prefix="${DESTDIR}${PREFIX}" # A work in progress... NO_TEST = Yes +.include + .if ${MACHINE_ARCH:Mamd64} A = x86_64 .else diff --git a/lang/freebasic/pkg/PLIST b/lang/freebasic/pkg/PLIST index b27637a9fe9..03d9f1eb8e6 100644 --- a/lang/freebasic/pkg/PLIST +++ b/lang/freebasic/pkg/PLIST @@ -1620,11 +1620,11 @@ lib/freebasic/openbsd-${A}/ lib/freebasic/openbsd-${A}/fbextra.x lib/freebasic/openbsd-${A}/fbrt0.o lib/freebasic/openbsd-${A}/fbrt0pic.o -lib/freebasic/openbsd-${A}/libfb.a -lib/freebasic/openbsd-${A}/libfbgfx.a -lib/freebasic/openbsd-${A}/libfbgfxmt.a -lib/freebasic/openbsd-${A}/libfbgfxmtpic.a -lib/freebasic/openbsd-${A}/libfbgfxpic.a -lib/freebasic/openbsd-${A}/libfbmt.a -lib/freebasic/openbsd-${A}/libfbmtpic.a -lib/freebasic/openbsd-${A}/libfbpic.a +@static-lib lib/freebasic/openbsd-${A}/libfb.a +@static-lib lib/freebasic/openbsd-${A}/libfbgfx.a +@static-lib lib/freebasic/openbsd-${A}/libfbgfxmt.a +@static-lib lib/freebasic/openbsd-${A}/libfbgfxmtpic.a +@static-lib lib/freebasic/openbsd-${A}/libfbgfxpic.a +@static-lib lib/freebasic/openbsd-${A}/libfbmt.a +@static-lib lib/freebasic/openbsd-${A}/libfbmtpic.a +@static-lib lib/freebasic/openbsd-${A}/libfbpic.a diff --git a/math/py-numpy/Makefile b/math/py-numpy/Makefile index 9d2df7f7c9f..6b6ae7284fc 100644 --- a/math/py-numpy/Makefile +++ b/math/py-numpy/Makefile @@ -4,7 +4,7 @@ COMMENT= fast array and numeric programming library for Python MODPY_DISTV= 2.2.6 DISTNAME= numpy-${MODPY_DISTV} PKGNAME= py-${DISTNAME} -REVISION= 1 +REVISION= 2 CATEGORIES= math devel @@ -15,14 +15,15 @@ PERMIT_PACKAGE= Yes COMPILER= base-clang ports-gcc -WANTLIB += ${COMPILER_LIBCXX} ${MODPY_WANTLIB} m +WANTLIB += ${COMPILER_LIBCXX} ${MODPY_WANTLIB} blas cblas lapack m # Disable dwz: it fails on DWARF 5 symbols due to 128-bit arithmetic in _pcg64. # Alternative is CFLAGS += -D PCG_FORCE_EMULATED_128BIT_MATH DWZ= : DEBUG_PACKAGES= ${BUILD_PACKAGES} -MODULES= lang/python +MODULES= lang/python \ + fortran MODPY_PYBUILD= mesonpy MODPY_PI= Yes @@ -47,14 +48,9 @@ TEST_DEPENDS= ${FULLPKGNAME}:${FULLPKGPATH} \ devel/py-tz \ devel/py-wheel -.include -.if ${PROPERTIES:Mgcc49} -MODULES+= fortran BUILD_DEPENDS+= ${MODFORTRAN_BUILD_DEPENDS} LIB_DEPENDS+= ${MODFORTRAN_LIB_DEPENDS} \ math/lapack -WANTLIB+= ${MODFORTRAN_WANTLIB} blas cblas lapack -.endif # Cython up to 0.28.4 used the discouraged __attribute__((optimize("Os"))) # which caused runtime breakage on at least macppc.