Opened 8 years ago
Closed 7 years ago
#52927 closed submission (wontfix)
cpplocate submission
Reported by: | ken-cunningham-webuse | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.5 |
Keywords: | Cc: | michaelld (Michael Dickens) | |
Port: | cpplocate |
Description
Cross-platform C++ library providing tools for applications to locate themselves, their data assets as well as dependend modules.
required to support examples in glbinding
Attachments (7)
Change History (21)
Changed 8 years ago by ken-cunningham-webuse
Changed 8 years ago by ken-cunningham-webuse
Attachment: | patch-cpplocate-cmake-installdirs.diff added |
---|
comment:1 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Changed 8 years ago by ken-cunningham-webuse
Attachment: | Portfile.2 added |
---|
comment:3 Changed 8 years ago by ken-cunningham-webuse
Ryan - if you're happy with this, I can generate the pull requests on github for this and for glbinding for you if you like.
comment:4 Changed 8 years ago by kencu (Ken)
I have updated the cpplocate portfile with some minor edits to description and whitespace
comment:5 Changed 8 years ago by michaelld (Michael Dickens)
Cc: | michaelld added |
---|
comment:6 Changed 8 years ago by michaelld (Michael Dickens)
There's a little more work to be done. I think all of this should be pushed back upstream, if nothing else than for their information. I'm going to attach a tarball of the current whole proposed directory structure, with my updates listed below in place. So ... IMHO, you need to address (3) for full port functionality.
1) I'm not sure what SYSTEM_DIR_INSTALL is supposed to do internally, but checking for just /usr and /usr/local is pretty limiting. There has got to be a better way to do whatever they think they are doing with this variable that is more generic. Your patch is good enough for MacPorts' needs.
2) When building documentation with doxygen, also include path:bin/dot:graphviz for dot (graph) files; I added this in already.
3) cmake files are usually placed into ${prefix}/share/cmake . No so for this port by default:
$ port contents cpplocate | grep cmake /opt/local/share/cpplocate/cmake/ModuleInformation.cmake /opt/local/share/cpplocate/cmake/cpplocate/cpplocate-export-release.cmake /opt/local/share/cpplocate/cmake/cpplocate/cpplocate-export.cmake /opt/local/share/cpplocate/cpplocate-config.cmake
I haven't looked into how to change this install directory, but these devs seem to make such changes pretty simple. I'd much prefer to see the cmake files in their correct directory rather than a project-specific one; just easier to find. Ideally this would be set via configure.args as a way to override the default provided. See, e.g., gr-ais and the variable CMAKE_MODULES_DIR in the patch and top-level CMakeLists.txt for one way to do this.
Changed 8 years ago by michaelld (Michael Dickens)
Attachment: | cpplocate_mld_0.tar.bz2 added |
---|
comment:7 Changed 7 years ago by kencu (Ken)
It was straightforward moving the cmake file locations for cpplocate, but in doing so, the other port that wanted to use it could not find the files properly.
I've updated the portfile to the current ersion. I can make a PR for it, if you like. Current version is here:
<https://github.com/kencu/macports-staging/tree/master/devel/cpplocate>
comment:8 Changed 7 years ago by michaelld (Michael Dickens)
Hmm ... your changes don't actually install the cmake files into the correct location, Ken. Good effort though!
I'm attaching a tarball with the cpplocate directory (Portfile + patch) that work for me. Please give them & try.
Changed 7 years ago by michaelld (Michael Dickens)
Attachment: | cpplocate_mld_1.tar.bz2 added |
---|
comment:9 Changed 7 years ago by michaelld (Michael Dickens)
"give them a try" -> Trying installed, do "port contents cpplocate" to verify locations, then try installing a port that depends on cpplocate. For example, glbindings, which I'll look at next.
comment:10 Changed 7 years ago by michaelld (Michael Dickens)
Ok. Not quite yet. Getting closer though.
comment:11 Changed 7 years ago by kencu (Ken)
Hi Michael - I wouldn't want you to think I'm thick - what I meant up there in comment 7 was that when I moved the cmake files as you had suggested (a five minute patch), they didn't work any more! glbinding wouldn't build against cpplocate with those new cmake file locations.
So - and right here is my MacPorts problem I guess, if I have one - my options were to accept those locations and move on -- or -- to rewrite their cmake logic (fix it), knowing full well that they are already deployed on Windows and Unix and these changes would probably mess up all their existing setups.
I always appreciate your help greatly -- the new version of Widelands is awaiting glbinding for the next generation of c++11 binding into OpenGL! Seriously, they are closing out GLEW and moving completely to glbinding soonish, they say.
comment:12 Changed 7 years ago by kencu (Ken)
FYI, here's the patch I made then deleted as non-functional to fix the cpplocate cmake files location -- I'm sure you already did something similar.
+--- CMakeLists.txt.orig 2017-06-10 07:42:16.000000000 -0700 ++++ CMakeLists.txt 2017-06-10 07:42:57.000000000 -0700 +@@ -125,7 +125,7 @@ + if(UNIX AND SYSTEM_DIR_INSTALL) + # Install into the system (/usr/bin or /usr/local/bin) + set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project> +- set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share/<project>/cmake ++ set(INSTALL_CMAKE "share/cmake") # /usr/[local]/share/<project>/cmake + set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/<project> + set(INSTALL_DATA "share/${project}") # /usr/[local]/share/<project> + set(INSTALL_BIN "bin") # /usr/[local]/bin
comment:13 Changed 7 years ago by michaelld (Michael Dickens)
I don't think your thick, Ken! You do some amazing work.
Here's an updated Portfile and patch that work for me: for cpplocate itself, for test-cpplocate (in-tree usage), and for glbindings (out-of-tree usage). It's a total rewrite of the cpplocate-config.cmake file, but it works nicely & makes a lot more sense that then original (in my humble opinion)...
Changed 7 years ago by michaelld (Michael Dickens)
Attachment: | cpplocate_mld_2.tar.bz2 added |
---|
comment:14 Changed 7 years ago by kencu (Ken)
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I'll handle this another way, if indeed it should be in MacPorts.
Thanks. Some remarks: