[96814] trunk/dports/python
blair at macports.org
blair at macports.org
Sun Aug 19 09:51:25 PDT 2012
Revision: 96814
https://trac.macports.org/changeset/96814
Author: blair at macports.org
Date: 2012-08-19 09:51:24 -0700 (Sun, 19 Aug 2012)
Log Message:
-----------
py-zeroc-ice33: new unified port based off ice33-python26.
I named this zeroc-ice to match Debian/Ubuntu package naming since
'ice' is a pretty common name.
I am not supporting 2.4 since the Python Ice bindings require a
framework build and Python 2.4 is not a framework build on all Mac OS
X versions.
To override python-1.0's settings, build.cmd and destroot.cmd were set
back to the original, default value and destroot.destdir was cleared.
Modified Paths:
--------------
trunk/dports/python/py-zeroc-ice33/Portfile
Added Paths:
-----------
trunk/dports/python/py-zeroc-ice33/
Modified: trunk/dports/python/py-zeroc-ice33/Portfile
===================================================================
--- trunk/dports/devel/ice33-python26/Portfile 2012-08-19 16:40:40 UTC (rev 96813)
+++ trunk/dports/python/py-zeroc-ice33/Portfile 2012-08-19 16:51:24 UTC (rev 96814)
@@ -1,13 +1,12 @@
# $Id$
PortSystem 1.0
+PortGroup python 1.0
-name ice33-python26
+name py-zeroc-ice33
version 3.3.1
-revision 1
-categories devel python
+categories-append devel
maintainers blair
-conflicts py26-zeroc-ice34
license GPL-2
description Fast, object-oriented RPC for C++, Java, Python, Ruby, PHP
@@ -43,93 +42,106 @@
rmd160 d64d52c35640cebe1145e62f57618473d17cbeb5
platforms darwin
-depends_lib port:python26 \
- port:zeroc-ice33
+python.versions 25 26 27
-# Work around invalid C++ code by compiling with llvm-gcc-4.2
-# instead of clang. See
-# http://www.zeroc.com/forums/bug-reports/4965-slice2cpp-output-does-not-compile-standards-conformant-compiler.html
-if {${configure.compiler} == "clang"} {
- configure.compiler llvm-gcc-4.2
-}
+if {$subport != $name} {
+ # Special case Python 25 so only one Portfile is needed, as the
+ # Python Ice bindings need a the paths to the framework portion of
+ # the Python build. These copied from python26-1.0.tcl.
+ if {${python.version} == 25} {
+ set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch}
+ set python.bin ${python.prefix}/bin/python${python.branch}
+ set python.lib ${python.prefix}/Python
+ set python.libdir ${python.prefix}/lib/python${python.branch}
+ set python.pkgd ${python.prefix}/lib/python${python.branch}/site-packages
+ set python.include ${python.prefix}/include/python${python.branch}
+ }
-post-patch {
- reinplace "s/-O2/-g -O2/" \
- ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
+ depends_lib-append port:zeroc-ice33
- # Prevent name conflicts between libICE.* from xorg-libice and
- # libIce.* from this port by renaming libIce.* to libZeroCIce.*.
- reinplace "s/-lIce /-lZeroCIce /" \
- ${workpath}/Ice-${version}/py/config/Make.rules \
- ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
-}
+ # Work around invalid C++ code by compiling with llvm-gcc-4.2
+ # instead of clang. See
+ # http://www.zeroc.com/forums/bug-reports/4965-slice2cpp-output-does-not-compile-standards-conformant-compiler.html
+ if {${configure.compiler} == "clang"} {
+ configure.compiler llvm-gcc-4.2
+ }
-use_configure no
+ post-patch {
+ reinplace "s/-O2/-g -O2/" \
+ ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
-build.dir ${worksrcpath}/py
-build.target prefix="${prefix}" \
- CC="${configure.cc}" \
- CXX="${configure.cxx}" \
- ICE_HOME="${prefix}" \
- PYTHON_HOME="${prefix}/Library/Frameworks/Python.framework/Versions/2.6" \
- PYTHON_VERSION=python2.6 \
- OPTIMIZE="yes" \
- all
+ # Prevent name conflicts between libICE.* from xorg-libice and
+ # libIce.* from this port by renaming libIce.* to libZeroCIce.*.
+ reinplace "s/-lIce /-lZeroCIce /" \
+ ${workpath}/Ice-${version}/py/config/Make.rules \
+ ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
+ }
-test.run yes
-test.dir ${worksrcpath}/py
-test.env ICE_HOME=${prefix}
-test.cmd ${prefix}/bin/python2.6
-test.target allTests.py
+ use_configure no
-destroot.dir ${worksrcpath}/py
-destroot.target prefix="${destroot}${prefix}" \
- CC="${configure.cc}" \
- CXX="${configure.cxx}" \
- ICE_HOME="${prefix}" \
- PYTHON_HOME="${prefix}/Library/Frameworks/Python.framework/Versions/2.6" \
- PYTHON_VERSION=python2.6 \
- OPTIMIZE="yes" \
- install
+ build.dir ${worksrcpath}/py
+ build.cmd make
+ build.target prefix="${prefix}" \
+ CC="${configure.cc}" \
+ CXX="${configure.cxx}" \
+ ICE_HOME="${prefix}" \
+ PYTHON_HOME="${python.prefix}" \
+ PYTHON_VERSION="python${python.branch}" \
+ OPTIMIZE="yes" \
+ all
-post-destroot {
- set sharedir ${destroot}${prefix}/share
- set docdir ${sharedir}/doc/${name}
+ test.run yes
+ test.dir ${worksrcpath}/py
+ test.env ICE_HOME=${prefix}
+ test.cmd ${python.bin}
+ test.target allTests.py
- set python_root ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.6
- set python26_dir ${python_root}/lib/python2.6
- set site_packages_dir ${python26_dir}/site-packages
+ destroot.destdir
+ destroot.cmd ${build.cmd}
+ destroot.target prefix="${destroot}${prefix}" \
+ CC="${configure.cc}" \
+ CXX="${configure.cxx}" \
+ ICE_HOME="${prefix}" \
+ PYTHON_HOME="${python.prefix}" \
+ PYTHON_VERSION="python${python.branch}" \
+ OPTIMIZE="yes" \
+ install
- delete ${destroot}${prefix}/slice
+ post-destroot {
+ set sharedir ${destroot}${prefix}/share
+ set docdir ${sharedir}/doc/${subport}
- xinstall -m 755 -d ${docdir}
+ delete ${destroot}${prefix}/slice
- file mkdir ${python26_dir}
- file rename ${destroot}${prefix}/python ${site_packages_dir}
+ xinstall -m 755 -d ${docdir}
- set cmd "${prefix}/bin/python2.6 \
- ${prefix}/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/compileall.py \
- ${site_packages_dir}"
- ui_debug ${cmd}
- system ${cmd}
+ xinstall -m 755 -d [file dirname ${destroot}${python.pkgd}]
+ file rename ${destroot}${prefix}/python ${destroot}${python.pkgd}
- set cmd "${prefix}/bin/python2.6 -O \
- ${prefix}/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/compileall.py \
- ${site_packages_dir}"
- ui_debug ${cmd}
- system ${cmd}
+ set cmd "${python.bin} \
+ ${python.libdir}/compileall.py \
+ ${destroot}${python.pkgd}"
+ ui_debug ${cmd}
+ system ${cmd}
- file rename ${destroot}${prefix}/ICE_LICENSE ${docdir}
- file rename ${destroot}${prefix}/LICENSE ${docdir}
- foreach f {CHANGES RELEASE_NOTES} {
- file copy ${worksrcpath}/${f} ${docdir}
+ set cmd "${python.bin} -O \
+ ${python.libdir}/compileall.py \
+ ${destroot}${python.pkgd}"
+ ui_debug ${cmd}
+ system ${cmd}
+
+ file rename ${destroot}${prefix}/ICE_LICENSE ${docdir}
+ file rename ${destroot}${prefix}/LICENSE ${docdir}
+ foreach f {CHANGES RELEASE_NOTES} {
+ file copy ${worksrcpath}/${f} ${docdir}
+ }
+ file copy ${worksrcpath}/py/INSTALL ${docdir}
+
+ if {[variant_isset demo_source_code]} {
+ file copy ${worksrcpath}/py/demo ${docdir}
+ }
}
- file copy ${worksrcpath}/py/INSTALL ${docdir}
- if {[variant_isset demo_source_code]} {
- file copy ${worksrcpath}/py/demo ${docdir}
+ variant demo_source_code description {Install demonstration Python code} {
}
}
-
-variant demo_source_code description {Install demonstration Python code} {
-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120819/65231702/attachment-0001.html>
More information about the macports-changes
mailing list