Date: Thu, 6 Dec 2018 23:17:54 -0700 From: Gary Aitken <freebsd@dreamchaser.org> To: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: CMakeLists.txt format and generation [SOLVED] Message-ID: <a56682dd-bf40-4ec0-c926-1cee8745126e@dreamchaser.org> In-Reply-To: <1f3cd5c3-6861-7b03-8073-f2c402c89342@dreamchaser.org> References: <1f3cd5c3-6861-7b03-8073-f2c402c89342@dreamchaser.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/6/18 2:30 PM, Gary Aitken wrote:
> Trying to build a dev version of a port, and need to tweak patch-CMakeLists.txt
> to match the dev version's CMakeList.txt which is different.
>
> It's not clear to me how these are generated.
>
> In particular, if I look at the old one for this port, cad/freecad/files/patch-CMakeLists.txt, I see this:
>
> --- CMakeLists.txt.orig 2017-07-28 17:35:48 UTC
> +++ CMakeLists.txt
> @@ -661,33 +661,7 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darw
> if (WIN32)
> find_package(HDF5 COMPONENTS NO_MODULE REQUIRED static)
> else()
> - find_package(PkgConfig)
>
> If I look at .../work/xxx/CMakeLists.txt.orig nothing seems to line up.
> Starting at line 661, I see:
>
> if(UNIX OR WIN32)
> find_package(VTK COMPONENTS vtkCommonCore REQUIRED NO_MODULE)
> ...
> It is not until line 699 that the above diff lines appear.
>
> The
> @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darw
> referred to on the @@ line is at line 561.
> What is its significance, and must this reference be unique?
> It looks like it is the closest preceeding conditional beginning at the
> first char in a line. If the new code has an intervening if() and endif(),
> referencing the endif won't be unique, but the corresponding if() would be.
>
> I've tried various tweaks and guesses but can't get make patch to accept
> what I've supplied for patch-CMakeLists.txt
>
> Any helpful hints would be much appreciated.
> Thanks,
I finally found this link for understanding the format of the patches:
http://kirste.userpage.fu-berlin.de/chemnet/use/info/diff/diff_3.html
The problem was a missing space at the start of the context lines which
were unchanged.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a56682dd-bf40-4ec0-c926-1cee8745126e>
