aboutsummaryrefslogtreecommitdiff
path: root/graphics/mesa-dri
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@FreeBSD.org>2020-06-16 15:38:29 +0000
committerNiclas Zeising <zeising@FreeBSD.org>2020-06-16 15:38:29 +0000
commit86562318c7fda954a31221c528980463b3ce1e9f (patch)
tree5e628ab927c0c30acbb665a7e29f71937e0f1cbf /graphics/mesa-dri
parent10e0c2aaca41607ee4b603cda590f60c75c43ea3 (diff)
downloadports-86562318c7fda954a31221c528980463b3ce1e9f.tar.gz
ports-86562318c7fda954a31221c528980463b3ce1e9f.zip
graphics/mesa: Fix minor issues from meson switch
Fix a couple of minor issues with mesa related ports after the switch to meson. Define _GNU_SOURCE when building on FreeBSD. This fixes blur effects in Plasma 5 and issues with the SDDM greeter. This fix was originally applied in r516100 but got lost in the switch to meson. [1] Properly detect sys/sysctl.h on FreeBSD. On FreeBSD sys/sysctl.h needs sys/types.h as well, patch the meson build script to take this into account. Fix a broken sed command to properly set ${LOCALBASE}/etc and ${LOCALBASE}/share/ as appropriate. Bump portrevision of all mesa related ports. PR: 247138 [1] Reported by: Roman [1] Reviewed by: manu Tested by: Roman, Serge Volkov Differential Revision: https://reviews.freebsd.org/D25265
Notes
Notes: svn path=/head/; revision=539358
Diffstat (limited to 'graphics/mesa-dri')
-rw-r--r--graphics/mesa-dri/Makefile2
-rw-r--r--graphics/mesa-dri/Makefile.targets3
-rw-r--r--graphics/mesa-dri/files/patch-meson.build31
3 files changed, 33 insertions, 3 deletions
diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile
index 9d1824219f89..40ca76a0829c 100644
--- a/graphics/mesa-dri/Makefile
+++ b/graphics/mesa-dri/Makefile
@@ -3,7 +3,7 @@
PORTNAME= mesa-dri
PORTVERSION= ${MESAVERSION}
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= graphics
COMMENT= OpenGL hardware acceleration drivers for DRI2+
diff --git a/graphics/mesa-dri/Makefile.targets b/graphics/mesa-dri/Makefile.targets
index 58a93ec7554c..e16f75053f8e 100644
--- a/graphics/mesa-dri/Makefile.targets
+++ b/graphics/mesa-dri/Makefile.targets
@@ -8,5 +8,6 @@ pre-configure:
post-patch:
- @${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
+ ${REINPLACE_CMD} -e '/SYSCONFDIR/ s|/etc|${PREFIX}/etc|g' \
+ -e '/DATADIR/ s|/usr/share|${PREFIX}/share|g' \
${WRKSRC}/src/util/xmlconfig.c
diff --git a/graphics/mesa-dri/files/patch-meson.build b/graphics/mesa-dri/files/patch-meson.build
index d16da1e108b3..12050657d683 100644
--- a/graphics/mesa-dri/files/patch-meson.build
+++ b/graphics/mesa-dri/files/patch-meson.build
@@ -3,7 +3,11 @@
on some platform, but for now simply comment it here.
See https://github.com/dumbbell/test-tls-initial-exec for more info
- Add dependency on libxv for xvmc, this is fixed in later mesa version.
---- meson.build.orig 2020-06-05 18:23:59 UTC
+- Define _GNU_SOURCE on FreeBSD, adapted from
+ https://gitlab.freedesktop.org/mesa/mesa/commit/b4f508ab5990
+- sys/sysctl.h needs sys/types.h to be properly detected, adapted from
+ https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5462/diffs
+--- meson.build.orig 2020-06-14 07:52:34 UTC
+++ meson.build
@@ -25,7 +25,7 @@ project(
[find_program('python', 'python2', 'python3'), 'bin/meson_get_version.py']
@@ -33,3 +37,28 @@
endif
xvmc_drivers_path = get_option('xvmc-libs-path')
+@@ -792,7 +793,7 @@ if cc.compiles('int foo(void) __attribute__((__noretur
+ endif
+
+ # TODO: this is very incomplete
+-if ['linux', 'cygwin', 'gnu'].contains(host_machine.system())
++if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd'].contains(host_machine.system())
+ pre_args += '-D_GNU_SOURCE'
+ endif
+
+@@ -977,7 +978,14 @@ elif cc.has_header_symbol('sys/mkdev.h', 'major')
+ pre_args += '-DMAJOR_IN_MKDEV'
+ endif
+
+-foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h']
++if not ['linux'].contains(host_machine.system())
++ # Deprecated on Linux and requires <sys/types.h> on FreeBSD and OpenBSD
++ if cc.check_header('sys/sysctl.h', prefix : '#include <sys/types.h>')
++ pre_args += '-DHAVE_SYS_SYSCTL_H'
++ endif
++endif
++
++foreach h : ['xlocale.h', 'linux/futex.h', 'endian.h', 'dlfcn.h']
+ if cc.compiles('#include <@0@>'.format(h), name : '@0@'.format(h))
+ pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
+ endif