On Tue, 10 Sep 2013 08:16:18 -0600 John Hein <jh...@symmetricom.com> wrote:
> O. Hartmann wrote at 01:51 +0200 on Sep 10, 2013: > > sed -i -e 's/\(\&virtual_address, size,\) \(VMFS_ANY_SPACE,\)$/ \ > > \1 0, \2/' work/NVIDIA-FreeBSD-x86_64-325.15/src/nvidia_subr.c > > In a makefile shell command, you have to escape $ signs > if you want them to be used as $ signs in the shell context. > > . > . > > 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 > > > make(1) evaluates $/ - which is likely empty which is why sed doesn't > see the end of the expression before the newline. Hence the > weird error (not so weird once it's understood). > > You want to use $$/ instead of $/ : > > .if ${OSVERSION} > 1000053 > ${REINPLACE_CMD} -e 's/\(\&virtual_address, size,\) \ > \(VMFS_ANY_SPACE,\)$$/\1 0, \2/' \ > \ ${WRKSRC}/src/nvidia_subr.c > .endif if things are understood, there s nothing scaring. Thanks, I didn't realize that even the expression inside '' is eavluated by make. Thanks to you I could provide the patch to my PR. Hopefuilly, there is a committer soon. Oliver
signature.asc
Description: PGP signature