py-shiboken cmake

Mark Brethen mark.brethen at gmail.com
Sat Jul 5 07:44:28 PDT 2014


On Jul 5, 2014, at 9:16 AM, Mark Moll <mmoll at rice.edu> wrote:

> 
> On Jul 5, 2014, at 8:58 AM, Mark Brethen <mark.brethen at gmail.com> wrote:
> 
>> 
>> On Jul 5, 2014, at 8:30 AM, Mark Brethen <mark.brethen at gmail.com> wrote:
>> 
>>> The port py-shiboken purposefully deletes the all of the *config.cmake files:
>>> 
>>>  post-destroot {
>>>      move ${destroot}${prefix}/bin/shiboken ${destroot}${prefix}/bin/shiboken-${python.branch}
>>>      move ${destroot}${prefix}/include/shiboken ${destroot}${prefix}/include/shiboken-${python.branch}
>>>      move ${destroot}${prefix}/share/man/man1/shiboken.1 ${destroot}${prefix}/share/man/man1/shiboken-${python.branch}.1
>>>      if {${python.version} < 30} {
>>>          move ${destroot}${prefix}/lib/cmake/Shiboken-${version}/ShibokenConfig-python${python.branch}.cmake
>>>      } else {
>>>          file delete ${destroot}${prefix}/lib/cmake/Shiboken-${version}/ShibokenConfig.cpython-${python.version}m.cmake
>>>      }
>>>      file delete ${destroot}${prefix}/lib/cmake/Shiboken-${version}/ShibokenConfig.cmake
>>>      file delete ${destroot}${prefix}/lib/cmake/Shiboken-${version}/ShibokenConfigVersion.cmake
>>>      file delete ${destroot}${prefix}/lib/pkgconfig/shiboken.pc
>>>  }
>>> 
>>> freecad requires them to build. I did not find ${prefix}/lib/cmake/ in my macports tree. Should the files go there or is there another location they should reside?
>>> 
>>> 
>>> Mark
>>> 
>>> 
>>> 
>>> 
>> 
>> Would it make more sense to put:
>> 
>> ${destroot}${prefix}/lib/pkgconfig/shiboken.pc --> ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig/shiboken.pc
>> ${destroot}${prefix}/lib/cmake/Shiboken-${version}/ShibokenConfig*.cmake --> ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/cmake/Shiboken-${version}/ShibokenConfig*.cmake
> 
> That makes some sense, but you’d have to tell cmake and pkg-config explicitly where to find these files. 
> 
> My reason for deleting these files was that the different py*-shiboken ports write to the same files. I figure that dependent ports would just do something like:
> 
> 	cmake -DSHIBOKEN_INCLUDE_DIRS=…  -DSHIBOKEN_LIBRARIES=…
> 
> With your solution you still need to do something like this:
> 
> 	cmake -DCMAKE_PREFIX_PATH=${prefix}//Library/Frameworks/Python.framework/Versions/2.7
> 
> This might be more robust, though. Unless someone objects, I’ll make the suggested changed to py-shiboken.
> 
> -- 
> Mark Moll

I looked at the error message again:

:info:configure   By not providing "FindShiboken.cmake" in CMAKE_MODULE_PATH this project has
:info:configure   asked CMake to find a package configuration file provided by "Shiboken",
:info:configure   but CMake did not find one.
:info:configure 
:info:configure   Could not find a package configuration file provided by "Shiboken" with any
:info:configure   of the following names:
:info:configure 
:info:configure     ShibokenConfig.cmake
:info:configure     shiboken-config.cmake
:info:configure 
:info:configure   Add the installation prefix of "Shiboken" to CMAKE_PREFIX_PATH or set
:info:configure   "Shiboken_DIR" to a directory containing one of the above files.  If
:info:configure   "Shiboken" provides a separate development package or SDK, be sure it has
:info:configure   been installed.
:info:configure 
:info:configure 
:info:configure -- Configuring incomplete, errors occurred!

I didn't read it that way at first, but passing the installation directory should work. I wonder why it didn't find them, since the cmake portgroup should be passing this to cmake?

Mark






More information about the macports-dev mailing list