pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/x11/libxshmfence
Module Name: pkgsrc
Committed By: riastradh
Date: Wed Jun 28 01:34:36 UTC 2023
Modified Files:
pkgsrc/x11/libxshmfence: Makefile
pkgsrc/x11/libxshmfence/files: xshmfence_semaphore.h
Log Message:
x11/libxshmfence: Detect max page size correctly.
For cross-builds, whatever sysctl answers is wrong -- and even for
native builds, it may be wrong, because on some architectures with
common binary packages, the page size may vary from machine to
machine. So use MAX_PAGE_SIZE if available, or PAGE_SIZE if not,
from machine/vmparam.h instead.
XXX Should probably also use COHERENCY_UNIT for cache line alignment,
not hard-coded 128.
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/x11/libxshmfence/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/x11/libxshmfence/files/xshmfence_semaphore.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/x11/libxshmfence/Makefile
diff -u pkgsrc/x11/libxshmfence/Makefile:1.20 pkgsrc/x11/libxshmfence/Makefile:1.21
--- pkgsrc/x11/libxshmfence/Makefile:1.20 Tue Jun 27 10:36:21 2023
+++ pkgsrc/x11/libxshmfence/Makefile Wed Jun 28 01:34:36 2023
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.20 2023/06/27 10:36:21 riastradh Exp $
+# $NetBSD: Makefile,v 1.21 2023/06/28 01:34:36 riastradh Exp $
DISTNAME= libxshmfence-1.3.2
+PKGREVISION= 1
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_XORG:=lib/}
EXTRACT_SUFX= .tar.xz
@@ -22,8 +23,6 @@ PKGCONFIG_OVERRIDE+= xshmfence.pc.in
.if ${OPSYS} == "NetBSD"
CONFIGURE_ARGS+= --disable-futex
CONFIGURE_ARGS+= --enable-semaphore
-LIBXSHM_PAGESIZE!= /sbin/sysctl -n hw.pagesize
-CPPFLAGS+= -DLIBXSHM_PAGESIZE=${LIBXSHM_PAGESIZE}
.endif
post-extract:
Index: pkgsrc/x11/libxshmfence/files/xshmfence_semaphore.h
diff -u pkgsrc/x11/libxshmfence/files/xshmfence_semaphore.h:1.3 pkgsrc/x11/libxshmfence/files/xshmfence_semaphore.h:1.4
--- pkgsrc/x11/libxshmfence/files/xshmfence_semaphore.h:1.3 Sun Feb 23 22:47:47 2020
+++ pkgsrc/x11/libxshmfence/files/xshmfence_semaphore.h Wed Jun 28 01:34:36 2023
@@ -28,7 +28,12 @@
#define LOCK_ALIGN __attribute__((aligned(128)))
#ifndef LIBXSHM_PAGESIZE
-#error unknown machine page size
+#include <machine/vmparam.h>
+#ifdef MAX_PAGE_SIZE
+#define LIBXSHM_PAGESIZE MAX_PAGE_SIZE
+#else
+#define LIBXSHM_PAGESIZE PAGE_SIZE
+#endif
#endif
#define PAGE_ALIGN __attribute__((aligned(LIBXSHM_PAGESIZE)))
Home |
Main Index |
Thread Index |
Old Index