From: Antoine Jacoutot Subject: Re: AppStream: replace HW_PHYSMEM (obsolete) with HW_PHYSMEM64 To: Rafael Sadowski Cc: ports@openbsd.org Date: Sun, 28 Dec 2025 17:46:47 +0100 On Sun, Dec 28, 2025 at 05:26:49PM +0100, Rafael Sadowski wrote: > Replace HW_PHYSMEM (deprecated) with HW_PHYSMEM64. This code also > works on Free and NetBSD. > > OK? Sure. > diff --git a/devel/appstream/Makefile b/devel/appstream/Makefile > index bc8aadbd293..8e6e334d95a 100644 > --- a/devel/appstream/Makefile > +++ b/devel/appstream/Makefile > @@ -14,8 +14,8 @@ DISTNAME= AppStream-${V} > EXTRACT_SUFX= .tar.xz > PKGNAME-main= ${DISTNAME:L} > PKGNAME-qt6= appstream-qt6-${V} > -REVISION-main= 0 > -REVISION-qt6= 0 > +REVISION-main= 1 > +REVISION-qt6= 1 > > SHARED_LIBS += appstream 1.2 # 1.1.1 > SHARED_LIBS += appstream-compose 1.1 # 1.1.1 > diff --git a/devel/appstream/patches/patch-src_as-system-info_c b/devel/appstream/patches/patch-src_as-system-info_c > index 87ab6781782..bbaec37dee1 100644 > --- a/devel/appstream/patches/patch-src_as-system-info_c > +++ b/devel/appstream/patches/patch-src_as-system-info_c > @@ -12,7 +12,7 @@ Index: src/as-system-info.c > #include > #include > #elif defined(__GNU__) > -@@ -476,7 +476,7 @@ as_get_physical_memory_total (void) > +@@ -476,10 +476,10 @@ as_get_physical_memory_total (void) > if (si.mem_unit > 0) > return (si.totalram * si.mem_unit) / MB_IN_BYTES; > return 0; > @@ -20,4 +20,8 @@ Index: src/as-system-info.c > +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) > unsigned long physmem; > size_t len = sizeof (physmem); > - int mib[2] = { CTL_HW, HW_PHYSMEM }; > +- int mib[2] = { CTL_HW, HW_PHYSMEM }; > ++ int mib[2] = { CTL_HW, HW_PHYSMEM64 }; > + > + if (sysctl (mib, 2, &physmem, &len, NULL, 0) == -1) { > + g_warning ("Unable to determine physical memory size: %s", g_strerror (errno)); -- Antoine