Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 763162 - sci-libs/opencascade-7.4.0 ships bugged OpenCASCADEConfig.cmake
Summary: sci-libs/opencascade-7.4.0 ships bugged OpenCASCADEConfig.cmake
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernd
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2021-01-02 18:10 UTC by Fabio Rossi
Modified: 2021-02-18 09:36 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
opencascade-7.4.0-fix-cmake.patch (opencascade-7.4.0-fix-cmake.patch,1.32 KB, patch)
2021-01-02 18:12 UTC, Fabio Rossi
Details | Diff
CMakeLists.txt (CMakeLists.txt,544 bytes, text/plain)
2021-01-02 18:14 UTC, Fabio Rossi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2021-01-02 18:10:37 UTC
The problem shows because we are customizing the install path of cmake files by redefining the variable INSTALL_DIR_CMAKE (this is needed to install cmake config files in the right location where they can be easily found).

This is an upstream bug but, due to downstream customization of cmake installation path, we have problems with gentoo packages (which should be patched) depending on opencascade and using cmake find_package(OpenCASCADE Config) for configuration.

I have already opened a bug report upstream:

https://tracker.dev.opencascade.org/view.php?id=32035

I have written a simple CMakeLists.txt to show the problem. Here is also attached a simple patch to solve the problem on Gentoo until upstream fixes it. IMHO it's better to have a fix in a single place instead of patching all the packages using find_package(OpenCASCADE Config)
Comment 1 Fabio Rossi 2021-01-02 18:11:42 UTC
current situation:

found config file in: /usr/lib64/cmake/opencascade-7.4.0/OpenCASCADEConfig.cmake
opencascade root defined via env var CASROOT: /usr/lib64/opencascade-7.4.0/ros
opencascade vars defined in cmake config:
- root: /usr
- binary in /usr/bin
- includes in /usr/include/opencascade
- libs in /usr/lib64
- resources in /usr/share/opencascade/resources
- scripts in /usr/bin

with the proposed patch:

found config file in: /usr/lib64/cmake/opencascade-7.4.0/OpenCASCADEConfig.cmake
opencascade root defined via env var CASROOT: /usr/lib64/opencascade-7.4.0/ros
opencascade vars defined in cmake config:
- root: /usr/lib64/opencascade-7.4.0/ros
- binary in /usr/lib64/opencascade-7.4.0/ros/bin
- includes in /usr/lib64/opencascade-7.4.0/ros/include/opencascade
- libs in /usr/lib64/opencascade-7.4.0/ros/lib64
- resources in /usr/lib64/opencascade-7.4.0/ros/share/opencascade/resources
- scripts in /usr/lib64/opencascade-7.4.0/ros/bin
Comment 2 Fabio Rossi 2021-01-02 18:12:44 UTC
Created attachment 680725 [details, diff]
opencascade-7.4.0-fix-cmake.patch
Comment 3 Fabio Rossi 2021-01-02 18:14:13 UTC
Created attachment 680728 [details]
CMakeLists.txt
Comment 4 Bernd 2021-02-09 19:19:18 UTC
Thanks for the hint. I never noticed it, as the package I'm using which require opencascade found the files from occ. But it's an important point. I'm preparing a PR for this.
Comment 5 Larry the Git Cow gentoo-dev 2021-02-18 09:36:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a529685c95f6c74ed4b46d4c7501373b0a55769

commit 3a529685c95f6c74ed4b46d4c7501373b0a55769
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2021-02-09 21:20:39 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2021-02-18 09:36:11 +0000

    sci-libs/opencascade: fix paths in cmake config
    
    Thanks to Fabio Rossi for reporting the issue.
    See also upstream bug at
    https://tracker.dev.opencascade.org/view.php?id=32035
    
    Closes: https://bugs.gentoo.org/763162
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 ...7.4.0-fix-issue-with-cmake-path-variables.patch |  41 ++++++
 sci-libs/opencascade/opencascade-7.4.0-r4.ebuild   | 148 +++++++++++++++++++++
 2 files changed, 189 insertions(+)