From owner-freebsd-questions@freebsd.org Thu Dec 6 21:49:54 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31D6F1314E1A for ; Thu, 6 Dec 2018 21:49:54 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D55C0839F6 for ; Thu, 6 Dec 2018 21:49:52 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from breakaway.dreamchaser.org (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.15.2/8.15.2) with ESMTP id wB6LV5wN077634 for ; Thu, 6 Dec 2018 14:31:05 -0700 (MST) (envelope-from freebsd@dreamchaser.org) To: FreeBSD Mailing List Reply-To: freebsd@dreamchaser.org From: Gary Aitken Subject: CMakeLists.txt format and generation Message-ID: <1f3cd5c3-6861-7b03-8073-f2c402c89342@dreamchaser.org> Date: Thu, 6 Dec 2018 14:30:49 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (nightmare.dreamchaser.org [192.168.151.101]); Thu, 06 Dec 2018 14:31:05 -0700 (MST) X-Rspamd-Queue-Id: D55C0839F6 X-Spamd-Result: default: False [-1.74 / 15.00]; HAS_REPLYTO(0.00)[freebsd@dreamchaser.org]; R_SPF_ALLOW(-0.20)[+mx]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[nightmare.dreamchaser.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.69)[-0.686,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.94)[-0.943,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[dreamchaser.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-0.02)[country: US(-0.09)]; NEURAL_SPAM_SHORT(0.21)[0.214,0]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2018 21:49:54 -0000 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, Gary