[121728] trunk/dports/python/py-shiboken
mmoll at macports.org
mmoll at macports.org
Sat Jul 5 17:00:53 PDT 2014
Revision: 121728
https://trac.macports.org/changeset/121728
Author: mmoll at macports.org
Date: 2014-07-05 17:00:53 -0700 (Sat, 05 Jul 2014)
Log Message:
-----------
py-shiboken: install pkgconfig and cmake files, take #2. closes #44250
Modified Paths:
--------------
trunk/dports/python/py-shiboken/Portfile
Added Paths:
-----------
trunk/dports/python/py-shiboken/files/patch-cmakepkgconfig.diff
Modified: trunk/dports/python/py-shiboken/Portfile
===================================================================
--- trunk/dports/python/py-shiboken/Portfile 2014-07-05 17:48:12 UTC (rev 121727)
+++ trunk/dports/python/py-shiboken/Portfile 2014-07-06 00:00:53 UTC (rev 121728)
@@ -7,7 +7,7 @@
set realname shiboken
name py-${realname}
version 1.2.2
-revision 2
+revision 3
python.versions 26 27 32 33 34
python.default_version 27
categories-append devel
@@ -34,14 +34,11 @@
system "mv -v '${worksrcpath}/generator/shiboken' '${worksrcpath}/generator/shiboken.d'"
reinplace "s|3.2 3.1 3.0|${python.branch}|g" ${worksrcpath}/cmake/Modules/FindPython3Libs.cmake
reinplace "s|NAMES python3.2mu python3.2m python3.2u python3.2 python3.1 python3.0 python3|NAMES python${python.branch}|g" ${worksrcpath}/cmake/Modules/FindPython3Interp.cmake
- reinplace "s|@LIB_INSTALL_DIR@|${python.prefix}/lib|g" ${worksrcpath}/data/ShibokenConfig.cmake.in ${worksrcpath}/data/ShibokenConfig-spec.cmake.in
- reinplace "s|set(shiboken_SUFFIX \"-\$\{shiboken_MAJOR_VERSION\}.\$\{shiboken_MINOR_VERSION\}\")|set(shiboken_SUFFIX \"-${python.branch}\")|g" ${worksrcpath}/libshiboken/CMakeLists.txt
- reinplace "s|\$\{shibokengenerator_BINARY_DIR\}/shiboken|\$\{shibokengenerator_BINARY_DIR\}/shiboken-${python.branch}|g" ${worksrcpath}/shibokenmodule/CMakeLists.txt
- reinplace "s|include/shiboken|include/shiboken-${python.branch}|g;s|/@shiboken_SUFFIX@||g" ${worksrcpath}/data/shiboken.pc.in
}
patchfiles default_visibility.patch \
- filename_collision.patch
+ filename_collision.patch \
+ patch-cmakepkgconfig.diff
depends_lib-append port:qt4-mac \
port:python${python.version} \
@@ -49,13 +46,13 @@
port:sparsehash
use_configure yes
configure.args-append -DBUILD_TESTS:BOOL=FALSE \
- -DENABLE_VERSION_SUFFIX=ON \
- -Dshiboken_SUFFIX="-${python.branch}" \
-DPYTHON_EXECUTABLE=${python.bin} \
-DPYTHON_LIBRARIES=${python.lib} \
-DPYTHON_INCLUDE_DIR=${python.include} \
-DPYTHON_SITE_PACKAGES=${python.pkgd} \
- -DSPARSEHASH_INCLUDE_PATH=${prefix}/include
+ -DSPARSEHASH_INCLUDE_PATH=${prefix}/include \
+ -DPYTHONBRANCH=${python.branch} \
+ -DPYTHONPREFIX=${python.prefix}
if {${python.version} >= 30} {
configure.args-append -DUSE_PYTHON3:BOOL=TRUE -DPYTHON3_LIBRARY=${python.lib} -DPYTHON3_INCLUDE_DIR=${python.include}
}
@@ -64,6 +61,8 @@
destroot.cmd make
destroot.destdir DESTDIR=${destroot}
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
move ${destroot}${prefix}/lib/cmake ${destroot}${python.prefix}/lib/cmake
move ${destroot}${prefix}/lib/pkgconfig ${destroot}${python.prefix}/lib/pkgconfig
Added: trunk/dports/python/py-shiboken/files/patch-cmakepkgconfig.diff
===================================================================
--- trunk/dports/python/py-shiboken/files/patch-cmakepkgconfig.diff (rev 0)
+++ trunk/dports/python/py-shiboken/files/patch-cmakepkgconfig.diff 2014-07-06 00:00:53 UTC (rev 121728)
@@ -0,0 +1,41 @@
+diff -rubw data/ShibokenConfig-spec.cmake.in data/ShibokenConfig-spec.cmake.in
+--- data/ShibokenConfig-spec.cmake.in 2014-04-22 10:42:48.000000000 -0500
++++ data/ShibokenConfig-spec.cmake.in 2014-07-05 18:42:33.000000000 -0500
+@@ -5,7 +5,7 @@
+ # SHIBOKEN_PYTHON_INTERPRETER - Python interpreter (regular or debug) to be used with the bindings.
+ # SHIBOKEN_PYTHON_LIBRARIES - Python libraries (regular or debug) Shiboken is linked against.
+
+-SET(SHIBOKEN_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/shiboken at shiboken_SUFFIX@")
++SET(SHIBOKEN_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/shiboken- at PYTHONBRANCH@")
+ if(MSVC)
+ SET(SHIBOKEN_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX at shiboken@shiboken_SUFFIX@@PYTHON_SUFFIX@@LIBRARY_OUTPUT_SUFFIX at .lib")
+ elseif(CYGWIN)
+@@ -23,4 +23,4 @@
+ message(STATUS "libshiboken built for @SHIBOKEN_BUILD_TYPE@")
+ @SBK_ADD_PY_DEBUG_DEFINITION@
+
+-set(SHIBOKEN_BINARY "@CMAKE_INSTALL_PREFIX@/bin/@SHIBOKEN_GENERATOR@")
++set(SHIBOKEN_BINARY "@CMAKE_INSTALL_PREFIX@/bin/@SHIBOKEN_GENERATOR at -@PYTHONBRANCH@")
+diff -rubw data/ShibokenConfig.cmake.in data/ShibokenConfig.cmake.in
+--- data/ShibokenConfig.cmake.in 2014-04-22 10:42:48.000000000 -0500
++++ data/ShibokenConfig.cmake.in 2014-07-05 18:42:37.000000000 -0500
+@@ -2,4 +2,4 @@
+ message(STATUS "Using default python: @PYTHON_SUFFIX@")
+ SET(PYTHON_SUFFIX @PYTHON_SUFFIX@)
+ endif()
+-include(@LIB_INSTALL_DIR@/cmake/Shiboken- at shiboken_VERSION@/ShibokenConfig${PYTHON_SUFFIX}.cmake)
++include(@PYTHONPREFIX@/lib/cmake/Shiboken- at shiboken_VERSION@/ShibokenConfig${PYTHON_SUFFIX}.cmake)
+diff -rubw data/shiboken.pc.in data/shiboken.pc.in
+--- data/shiboken.pc.in 2014-04-22 10:42:48.000000000 -0500
++++ data/shiboken.pc.in 2014-07-05 18:42:28.000000000 -0500
+@@ -1,8 +1,8 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@
+ libdir=@LIB_INSTALL_DIR@
+-includedir=@CMAKE_INSTALL_PREFIX@/include/shiboken
+-generator_location=@CMAKE_INSTALL_PREFIX@/bin/@SHIBOKEN_GENERATOR@
++includedir=@CMAKE_INSTALL_PREFIX@/include/shiboken- at PYTHONBRANCH@
++generator_location=@CMAKE_INSTALL_PREFIX@/bin/@SHIBOKEN_GENERATOR at -@PYTHONBRANCH@
+ python_interpreter=@PYTHON_EXECUTABLE@
+ python_include_dir=@SBK_PYTHON_INCLUDE_DIR@
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140705/55d6d473/attachment-0001.html>
More information about the macports-changes
mailing list