devel/cpp2py: Correct cmake file paths

Also remove unnecessary files under share/
This commit is contained in:
Yuri Victorovich 2018-06-16 23:20:55 +00:00
parent 22d6bb1a6a
commit 122d315ade
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=472575
6 changed files with 32 additions and 15 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= cpp2py
DISTVERSION= 1.5-19
DISTVERSIONSUFFIX= -g5fd079c
PORTREVISION= 1
CATEGORIES= devel
MAINTAINER= yuri@FreeBSD.org
@ -30,7 +31,7 @@ USE_LDCONFIG= yes
LLVM_VER= 60
post-install: # there's some kind of confusion between cmake's MODULE and CONFIG modes
@cd ${STAGEDIR}${PREFIX}/share/cmake/Modules && ${CP} Cpp2PyConfig.cmake FindCpp2Py.cmake # can't be found without this
post-install: # remove unnecessary files
@cd ${STAGEDIR}${PREFIX} && ${RM} share/cpp2py.modulefile share/cpp2pyvars.sh
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
--- cmake/CMakeLists.txt.orig 2018-06-16 19:06:45 UTC
--- cmake/CMakeLists.txt.orig 2018-06-04 12:58:14 UTC
+++ cmake/CMakeLists.txt
@@ -1,6 +1,6 @@
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Cpp2PyConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/Cpp2PyConfig.cmake @ONLY)
@ -6,6 +6,6 @@
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Cpp2PyConfig.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cmake)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Cpp2PyConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cmake)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Cpp2PyConfig.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cmake/Modules)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Cpp2PyConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cmake/Modules)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Cpp2PyConfig.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/cpp2py)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Cpp2PyConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/cpp2py)

View File

@ -0,0 +1,11 @@
--- cmake/Cpp2PyConfig.cmake.in.orig 2018-06-16 22:36:50 UTC
+++ cmake/Cpp2PyConfig.cmake.in
@@ -47,7 +47,7 @@ add_executable(c++2rst IMPORTED)
set_property(TARGET c++2rst PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_PREFIX@/bin/c++2rst")
# include the exported targets of this project
-include(@CMAKE_INSTALL_PREFIX@/share/cmake/cpp2py-targets.cmake)
+include(@CMAKE_INSTALL_PREFIX@/lib/cmake/cpp2py/cpp2py-targets.cmake)
# FIXME : should we just put the rpath in the cpp2y
# FIXME : who needs the rpath ?

View File

@ -1,10 +1,10 @@
--- cmake/FindLibClang.cmake.orig 2018-06-16 18:48:36 UTC
--- cmake/FindLibClang.cmake.orig 2018-06-04 12:58:14 UTC
+++ cmake/FindLibClang.cmake
@@ -30,6 +30,7 @@ else()
@@ -32,6 +32,7 @@ else()
SET(TRIAL_LIBRARY_PATHS
ENV LIBRARY_PATH
ENV LD_INCLUDE_PATH
+ ${CMAKE_INSTALL_PREFIX}/llvm${FREEBSD_LLVM_VER}/lib
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/llvm-5.0/lib
/usr/lib/llvm-6.0/lib

View File

@ -0,0 +1,8 @@
--- lib/CMakeLists.txt.orig 2018-06-16 22:38:48 UTC
+++ lib/CMakeLists.txt
@@ -26,4 +26,4 @@ target_include_directories(cpp2py SYSTEM
# Install the library in lib and prepare an exported cmake file to reimport it
install(TARGETS cpp2py DESTINATION lib EXPORT cpp2py-targets)
-install(EXPORT cpp2py-targets DESTINATION share/cmake)
+install(EXPORT cpp2py-targets DESTINATION lib/cmake/cpp2py)

View File

@ -21,6 +21,10 @@ include/cpp2py/py_converter.hpp
include/cpp2py/py_stream.hpp
include/cpp2py/pyref.hpp
include/cpp2py/signal_handler.hpp
lib/cmake/cpp2py/Cpp2PyConfig.cmake
lib/cmake/cpp2py/Cpp2PyConfigVersion.cmake
lib/cmake/cpp2py/cpp2py-targets-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/cpp2py/cpp2py-targets.cmake
lib/libcpp2py.so
%%PYTHON_SITELIBDIR%%/cpp2cxx/__init__.py
%%PYTHON_SITELIBDIR%%/cpp2cxx/cpp2cxx.py
@ -45,10 +49,3 @@ lib/libcpp2py.so
%%PYTHON_SITELIBDIR%%/cpp2rst/example.py
%%PYTHON_SITELIBDIR%%/cpp2rst/render_fnt.py
%%PYTHON_SITELIBDIR%%/cpp2rst/synopsis.py
share/cmake/Modules/Cpp2PyConfig.cmake
share/cmake/Modules/Cpp2PyConfigVersion.cmake
share/cmake/Modules/FindCpp2Py.cmake
share/cmake/cpp2py-targets-%%CMAKE_BUILD_TYPE%%.cmake
share/cmake/cpp2py-targets.cmake
%%DATADIR%%.modulefile
%%DATADIR%%vars.sh