With CURRENT r255426 several changes has been introduced (see http://docs.freebsd.org/cgi/getmsg.cgi?fetch=291456+0+current/svn-src-head).
This results in a non-functionality of the x11/nvidia-driver port after
updating world and kernel to CURRENT r255426.
I try to patch this. The target file is src/nvidia_subr.c, line 833
(nVidia driver 325.15, 319.XX might differ).
The solution is to insert a zero (0) after the size parameter, which
can be targetted by the sed-expression
sed -i -e 's/\(\&virtual_address, size,\) \(VMFS_ANY_SPACE,\)$/ \
\1 0, \2/' work/NVIDIA-FreeBSD-x86_64-325.15/src/nvidia_subr.c
(do "make clean patch" first in x11/nvidia-driver).
Checking work/NVIDIA-FreeBSD-x86_64-325.15/src/nvidia_subr.c at line
833 reveals:
&virtual_address, size, 0, VMFS_ANY_SPACE,
which is exactly what I wanted. But putting the very same
sed-expression into the port's Makefile
# Changes in vm_map_find() due to r255426
.if ${OSVERSION} > 1000053
${REINPLACE_CMD} -e 's/\(\&virtual_address, size,\) \
\(VMFS_ANY_SPACE,\)$/\1 0, \2/' \
\ ${WRKSRC}/src/nvidia_subr.c
.endif
(patch attached) gives this weird error:
===> Cleaning for nvidia-driver-325.15
===> License NVIDIA accepted by the user
===> Found saved configuration for nvidia-driver-325.08_1
===> nvidia-driver-325.15 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by nvidia-driver-325.15 for
building ===> Extracting for nvidia-driver-325.15
=> SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-325.15.tar.gz.
===> Patching for nvidia-driver-325.15
sed: 1: "s/\(\&virtual_address, ...": unescaped newline inside
substitute pattern *** Error code 1
Stop.
make[1]: stopped in /usr/ports/x11/nvidia-driver
*** Error code 1
Stop.
make: stopped in /usr/ports/x11/nvidia-driver
What the f*** is going on here? The expression in single-quotes is
supposed not to substituted by the shell/make, isn't it?
What I am doing wrong here?
I filed a PR (ports/181972) for the nvidia problem, but I'm incapale
of providing the patch due to this sticky obscure fault.
Oliver
--- Makefile.orig 2013-09-10 00:30:53.000000000 +0200
+++ Makefile 2013-09-10 01:30:21.000000000 +0200
@@ -160,6 +160,11 @@
s/CAP_IOCTL/cap_rights_init(\&rights, &)/' \
${WRKSRC}/src/nvidia_linux.c
.endif
+# Changes in vm_map_find() due to r255426
+.if ${OSVERSION} > 1000053
+ ${REINPLACE_CMD} -e 's/\(\&virtual_address, size,\) \(VMFS_ANY_SPACE,\)$/\1 0, \2/' \
+ ${WRKSRC}/src/nvidia_subr.c
+.endif
# Fix stack buffer overflow in nvidia_sysctl_bus_type()
.if ${NVVERSION} < 3192300
${REINPLACE_CMD} -E '/bus_type\[4\]/d ; \
signature.asc
Description: PGP signature
