Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2013 16:26:16 +0200
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        John Hein <jhein@symmetricom.com>
Cc:        FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: HELP! nvidia-driver patch: Weird REPLACE_CMD and command-line-sed behaviour. HELP!
Message-ID:  <20130910162616.6ce1d52f@thor.walstatt.dyndns.org>
In-Reply-To: <21039.10674.968260.7845@gromit.timing.com>
References:  <20130910015144.41c88d52@thor.walstatt.dyndns.org> <21039.10674.968260.7845@gromit.timing.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/.E0deP8LXMVxjrRH74WP=/j
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Tue, 10 Sep 2013 08:16:18 -0600
John Hein <jhein@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
>=20
> In a makefile shell command, you have to escape $ signs
> if you want them to be used as $ signs in the shell context.
>=20
>    .
>    .
>  >                                 But putting the very same
>  > sed-expression into the port's Makefile=20
>  >=20
>  > # Changes in vm_map_find() due to r255426=20
>  > ..if ${OSVERSION} > 1000053=20
>  > 	${REINPLACE_CMD} -e 's/\(\&virtual_address, size,\) \
>  > 	\(VMFS_ANY_SPACE,\)$/\1 0, \2/' \
>  > 	\ ${WRKSRC}/src/nvidia_subr.c
>  > ..endif
>  >=20
>  > (patch attached) gives this weird error:
>  >=20
>  > =3D=3D=3D>  Cleaning for nvidia-driver-325.15
>  > =3D=3D=3D>  License NVIDIA accepted by the user
>  > =3D=3D=3D>  Found saved configuration for nvidia-driver-325.08_1
>  > =3D=3D=3D>   nvidia-driver-325.15 depends on file: /usr/local/sbin/pkg=
 -
>  > found =3D=3D=3D> Fetching all distfiles required by nvidia-driver-325.=
15
>  > for building =3D=3D=3D>  Extracting for nvidia-driver-325.15
>  > =3D> SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-325.15.tar.gz.
>  > =3D=3D=3D>  Patching for nvidia-driver-325.15
>  > sed: 1: "s/\(\&virtual_address,  ...": unescaped newline inside
>  > substitute pattern *** Error code 1
>=20
>=20
> 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).
>=20
> You want to use $$/ instead of $/ :
>=20
> .if ${OSVERSION} > 1000053=20
> 	${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

--Sig_/.E0deP8LXMVxjrRH74WP=/j
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (FreeBSD)

iQEcBAEBAgAGBQJSLywIAAoJEOgBcD7A/5N8yn4IANWUWw/OnyKzLO7JM+1dwzxw
Zis2+Wluf5hbtPgFudp/7eD0mhco1B3ajzlzmbqMfd+dyrril0g0EqI2nnay5Qrt
tbAno5pGP+Oy7lAxV4e0D4W22MWgMvEYC8JUyfamEkdC1Oby8w1vcU4evUY8ZEwG
1OikAxYf2NWX28zPP5w+CdgI5/tFRkaXO4R5zfds5wmASMy9A6oDhY8jqHNkAj8d
yn1A+yhG3VndtRmIXNEUT5lNGKgKzX4VrnRmfQsaxPogZokIA1IL4rGh86n9QSfq
WReV58oCthD0tYjTXy9kLXH7VeVYrgYZFH/pSmayeVmJSWAJf0bJM0p6P8aAgXg=
=FAQN
-----END PGP SIGNATURE-----

--Sig_/.E0deP8LXMVxjrRH74WP=/j--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130910162616.6ce1d52f>