[52381] trunk/dports/devel/boost

nox at macports.org nox at macports.org
Mon Jun 15 06:47:59 PDT 2009


Revision: 52381
          http://trac.macports.org/changeset/52381
Author:   nox at macports.org
Date:     2009-06-15 06:47:58 -0700 (Mon, 15 Jun 2009)
Log Message:
-----------
boost (closes #18963, #19834):
 * Update to 1.39.0.
 * Use versioned names for the libraries to enable +st and +debug.
 * Rename +docs variant to +doc for consistency.
 * Fix documentation variant which was also installing libraries and tools.
 * Remove darwin platform block as it's the only architecture supported by this port.
 * Patch the darwin toolset to properly name libraries when creating them.
 * Use python executable to get its site-packages directory.
 * Enable universal support.
 * Ignore any user-config.jam and site-config.jam which could change the build process.
 * Properly configure the python Jam module when selecting a python* variant.
 * Use buildmakejobs to speed up the building.
 * Enable Boost.Random.

Modified Paths:
--------------
    trunk/dports/devel/boost/Portfile

Added Paths:
-----------
    trunk/dports/devel/boost/files/libs-random-build-Jamfile.v2
    trunk/dports/devel/boost/files/patch-libs-mpi-build-Jamfile.v2.diff
    trunk/dports/devel/boost/files/patch-libs-random-random_device.cpp.diff

Removed Paths:
-------------
    trunk/dports/devel/boost/files/patch-configure.diff

Modified: trunk/dports/devel/boost/Portfile
===================================================================
--- trunk/dports/devel/boost/Portfile	2009-06-15 13:35:28 UTC (rev 52380)
+++ trunk/dports/devel/boost/Portfile	2009-06-15 13:47:58 UTC (rev 52381)
@@ -3,184 +3,182 @@
 PortSystem 1.0
 
 name			boost
-version			1.38.0
+version			1.39.0
 categories		devel
 maintainers		gmail.com:sanchom
 description		Collection of portable C++ source libraries
-long_description 	Boost provides free portable peer-reviewed C++ \
+long_description	Boost provides free portable peer-reviewed C++ \
 			libraries. The emphasis is on portable libraries \
 			which work well with the C++ Standard Library.
 homepage		http://www.boost.org
 master_sites		sourceforge
-distname		${name}_[strsed ${version} {g/[.]/_/}]
+distname		${name}_[join [split ${version} .] _]
 use_bzip2		yes
-checksums		md5 5eca2116d39d61382b8f8235915cb267 \
-			sha1 b32ff8133b0a38a74553c0d33cb1d70b3ce2d8f1 \
-			rmd160 1d7eb126151e4363ecd5617082cd45674f1352be
+checksums		md5	a17281fd88c48e0d866e1a12deecbcc0 \
+			sha1	6af42f74ab24ccc51589a025593bad298c8adde8 \
+			rmd160	4962256b48fa8563bf373b8bed97cc8655206a51
 platforms		darwin
 use_parallel_build	yes
 
-# not autoconf
-universal_variant	no
+patchfiles		patch-libs-random-random_device.cpp.diff
 
-patchfiles		patch-configure.diff
+post-extract {
+	file mkdir ${worksrcpath}/libs/random/build
+	copy ${filesdir}/libs-random-build-Jamfile.v2 ${worksrcpath}/libs/random/build/Jamfile.v2
+}
 
 depends_build		path:bin/bjam:boost-jam
 depends_lib		port:zlib port:bzip2
 
-build.env-append	BZIP2_INCLUDE=${prefix}/include BZIP2_LIBPATH=${prefix}/lib \
-			ZLIB_INCLUDE=${prefix}/include ZLIB_LIBPATH=${prefix}/lib
-destroot.env-append	BZIP2_INCLUDE=${prefix}/include BZIP2_LIBPATH=${prefix}/lib \
-			ZLIB_INCLUDE=${prefix}/include ZLIB_LIBPATH=${prefix}/lib
-
-platform darwin 9 {
-	depends_build-append	port:gmake
-	build.cmd		gmake
+configure {
+	reinplace -E "s|-install_name \"|&${prefix}/lib/|" \
+		${worksrcpath}/tools/build/v2/tools/darwin.jam
+	touch ${worksrcpath}/user-config.jam
 }
 
-post-patch {
-	# --layout=system
-	#     (don't put compiler name or version number in the libraries;
-	#      don't put version number in the include directory)
-	#     [default: off]
-	#
-	# link=shared,static (build static and dynamic libraries)
-	#     [default: link=shared,static]
-	#
-	# runtime-link=shared,static
-	#     (link to static and shared C and C++ runtime (e.g. use -lstdc++-static))
-	#     static runtime-link libraries are of the form *-s.a or -sd.a
-	#     [default: runtime-link=shared]
-	#
-	# threading=single,multi
-	#     (build single- and multi-threaded libraries)
-	#     multi-threaded libraries are of the form of *-mt.dylib, -mt-d.dylib, *-mt.a, *-mt-s.a, *-mt-d.a, or *-mt-ds.a
-	#     [default: threading=multi]
-	#
-	# debug release
-	#     (buil debug and release versions of libraries)
-	#     debug libraries are of the form *-d.dylib, *-d.a, or *-ds.a
-	#     [default: release]
-	#
-	set bjam_config "--layout=system link=shared,static runtime-link=shared,static"
-	if { [variant_isset st] } {
-		append bjam_config " threading=single,multi"
-	}
-	if { [variant_isset debug] } {
-		append bjam_config " debug release"
-	}
-	reinplace "s|__MACPORTS_BJAM_CONFIG__|${bjam_config}|" ${worksrcpath}/configure
-}
+build.cmd		bjam [portbuild::build_getmakejobs]
+build.target
+build.args		--toolset=darwin \
+			--debug-configuration \
+			--ignore-site-config \
+			--user-config=user-config.jam \
+			--without-python \
+			--without-mpi \
+			-sBZIP2_INCLUDE=${prefix}/include \
+			-sBZIP2_LIBPATH=${prefix}/lib \
+			-sZLIB_INCLUDE=${prefix}/include \
+			-sZLIB_LIBPATH=${prefix}/lib
 
-post-configure {
-	# Ensure that the correct compiler is used
-	reinplace "s|using darwin ;|using darwin : : ${configure.cxx} ;|" ${worksrcpath}/user-config.jam
+destroot.cmd		bjam
+destroot.destdir	--prefix=${destroot}${prefix}
+
+pre-destroot {
+	eval destroot.args	${build.args}
 }
 
-platform darwin {
-	post-destroot {
-		# ensure the identification name of the dynamic libraries agree
-		# with their final destination path (not the destroot path that
-		# they've just been installed to)
-		foreach lib [glob -directory ${destroot}${prefix}/lib/ *.dylib] {
-			set libtail [file tail ${lib}]
-			system "install_name_tool -id ${prefix}/lib/${libtail} ${lib}"
-		}
+set pythons_suffixes {24 25 26}
 
-		# set the install_name for every library referenced by another library
-		# to include the final destination path as well
-		foreach lib [glob -tails -directory ${destroot}${prefix}/lib/ *.dylib] {
-			set installed_name ${prefix}/lib/${lib}
-			foreach lib2 [glob -directory ${destroot}${prefix}/lib/ *.dylib *.so] {
-				system "install_name_tool -change ${lib} ${installed_name} ${lib2}"
-			}
-		}
+set pythons_ports {}
+foreach s ${pythons_suffixes} {
+	lappend pythons_ports python${s}
+}
 
-		# mpi.so needs to be in a specific directory for Python to find it
-		if { [file exists ${destroot}${prefix}/lib/mpi.so] } {
-			if { [variant_isset python24] } {
-				set spkg ${prefix}/lib/python2.4/site-packages
-			} elseif { [variant_isset python25] } {
-				set spkg ${prefix}/lib/python2.5/site-packages
-			} elseif { [variant_isset python26] } {
-				set spkg ${frameworks_dir}/Python.framework/Versions/2.6/lib/python2.6/site-packages
-			}
-
-			set sodir ${spkg}/boost
-			xinstall -m 755 -d ${destroot}${sodir}
-			touch ${destroot}${sodir}/__init__.py
-			system "install_name_tool -id ${sodir}/mpi.so ${destroot}${prefix}/lib/mpi.so"
-			move ${destroot}${prefix}/lib/mpi.so ${destroot}${sodir}/mpi.so
+proc python_dir {} {
+	global pythons_suffixes
+	foreach s ${pythons_suffixes} {
+		if {[variant_isset python${s}]} {
+			set p python[string index ${s} 0].[string index ${s} 1]
+			return [exec ${p} -c "import sys; print sys.prefix"]/lib/${p}/site-packages
 		}
 	}
+	error "Python support not enabled."
 }
 
-destroot.destdir	prefix=${destroot}${prefix}
+proc write_jam s {
+	global worksrcpath
+	set config [open ${worksrcpath}/user-config.jam a]
+	puts ${config} ${s}
+	close ${config}
+}
 
-configure.args		--without-libraries=python --without-icu --with-bjam=${prefix}/bin/bjam
+foreach s ${pythons_suffixes} {
+	set p python${s}
+	set v [string index ${s} 0].[string index ${s} 1]
+	set i [lsearch -exact ${pythons_ports} ${p}]
+	set c [lreplace ${pythons_ports} ${i} ${i}]
+	eval [subst {
+		variant ${p} description "Build Boost.Python for Python ${v}" conflicts ${c} {
+			depends_lib-append	port:${p}
+			build.args-delete	--without-python
 
-variant python24 description {build python 2.4 support} conflicts python25 python26 {
-	set pyversion		2.4
-	depends_lib-append      port:python[strsed ${pyversion} {g/[.]//}]
+			post-configure {
+				write_jam "using python : : ${prefix}/bin/python${v} ;"
+			}
+		}
+	}]
+}
 
-	configure.args-delete	--without-libraries=python
-	configure.args-append	--with-python=${prefix}/bin/python${pyversion}
+variant icu description {Enable Unicode support in Boost.Regex through ICU} {
+	depends_lib-append	port:icu
+	build.args-append	-sICU_PATH=${prefix}
 }
 
-variant python25 description {build python 2.5 support} conflicts python24 python26 {
-	set pyversion		2.5
-	depends_lib-append      port:python[strsed ${pyversion} {g/[.]//}]
-
-	configure.args-delete	--without-libraries=python
-	configure.args-append	--with-python=${prefix}/bin/python${pyversion}
+variant graphml description {Enable GraphML support in Boost.Graph} {
+	depends_lib-append	port:expat
+	build.args-append	-sEXPAT_INCLUDE=${prefix}/include \
+				-sEXPAT_LIBPATH=${prefix}/lib
 }
 
-variant python26 description {build python 2.6 support} conflicts python24 python25 {
-	set pyversion		2.6
-	depends_lib-append      port:python[strsed ${pyversion} {g/[.]//}]
+variant openmpi description {Build Boost.MPI} {
+	depends_lib-append	port:openmpi
+	build.args-delete	--without-mpi
 
-	configure.args-delete	--without-libraries=python
-	configure.args-append	--with-python=${prefix}/bin/python${pyversion}
-}
+	post-configure {
+		write_jam "using mpi : ${prefix}/bin/openmpic++ : : ${prefix}/bin/openmpirun ;"
+	}
 
-variant icu description {enable Unicode/ICU support in Regex} {
-	depends_lib-append	port:icu
+	if {![catch python_dir]} {
+		if {[variant_isset st]} {
+			patchfiles-append	patch-libs-mpi-build-Jamfile.v2.diff
+		}
 
-	configure.args-delete	--without-icu
-	configure.args-append	--with-icu=${prefix}
+		post-destroot {
+			set site_packages [python_dir]
+			xinstall -d ${destroot}${site_packages}/boost
+			xinstall -m 644 ${worksrcpath}/libs/mpi/build/__init__.py \
+				${destroot}${site_packages}/boost
+
+			set l ${site_packages}/boost/mpi.so
+			move ${destroot}${prefix}/lib/mpi.so ${destroot}${l}
+			system "install_name_tool -id ${l} ${destroot}${l}"
+		}
+	}
 }
 
-variant graphml description {enable GraphML support} {
-	depends_lib-append	port:expat
-
-	build.env-append	    EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib
-	destroot.env-append	    EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib
+variant debug description {Build debug libraries} {
+	build.args-append	variant=debug,release
 }
 
-variant openmpi description {build mpi support} {
-	depends_lib-append	port:openmpi
-
-    post-configure {
-        set config [open ${worksrcpath}/user-config.jam a]
-        puts ${config} "\nusing mpi : ${prefix}/bin/openmpicxx ;"
-        close ${config}
-    }
+variant doc description {Install documentation} {
+	post-destroot {
+		set docdir ${prefix}/share/doc/${name}-${version}
+		xinstall -d ${destroot}${docdir}
+		set l [expr [string length ${worksrcpath}] + 1]
+		fs-traverse f [glob -directory ${worksrcpath} *] {
+			set dest ${destroot}${docdir}/[string range ${f} ${l} end]
+			if {[file isdirectory ${f}]} {
+				xinstall -d ${dest}
+			} elseif {[lsearch -exact {css htm html png svg} [string range [file extension ${f}] 1 end]] != -1} {
+				xinstall -m 644 ${f} ${dest}
+			}
+		}
+	}
 }
 
-variant docs description {install documentation} {
-    post-destroot {
-        # Install HTML documentation
-        xinstall -d ${destroot}${prefix}/share/doc/${name}
-        xinstall -W ${worksrcpath} index.htm index.html boost.css rst.css boost.png \
-            ${destroot}${prefix}/share/doc/${name}
-        file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
-        file copy ${worksrcpath}/more ${destroot}${prefix}/share/doc/${name}
-        file copy ${worksrcpath}/tools ${destroot}${prefix}/share/doc/${name}
-        file copy ${worksrcpath}/libs ${destroot}${prefix}/share/doc/${name}
-        file copy ${worksrcpath}/wiki ${destroot}${prefix}/share/doc/${name}
-    }
+variant st description {Build single-threaded libraries} {
+	build.args-append	threading=single,multi
 }
 
-variant debug description {build debug libraries} {}
+variant universal {
+	if {[lsearch ${universal_archs} ppc*] != -1} {
+		if {[lsearch ${universal_archs} *86*] != -1} {
+			build.args-append	architecture=combined
+		} else {
+			build.args-append	architecture=power
+		}
+	} else {
+		build.args-append	architecture=x86
+	}
 
-variant st description {build single-threaded libraries} {}
+	if {[lsearch ${universal_archs} *64] != 1} {
+		if {[lsearch ${universal_archs} i386] != -1 || [lsearch ${universal_archs} ppc] != -1} {
+			build.args-append	address-model=32_64
+		} else {
+			build.args-append	address-model=64
+		}
+	} else {
+		build.args-append	address-model=32
+	}
+}
+
+livecheck.regex	<title>${name} (\\d+\\.\\d+\\.\\d+) released

Added: trunk/dports/devel/boost/files/libs-random-build-Jamfile.v2
===================================================================
--- trunk/dports/devel/boost/files/libs-random-build-Jamfile.v2	                        (rev 0)
+++ trunk/dports/devel/boost/files/libs-random-build-Jamfile.v2	2009-06-15 13:47:58 UTC (rev 52381)
@@ -0,0 +1,15 @@
+# Copyright (c) 2006 Tiziano Mueller
+#
+# Use, modification and distribution of the file is subject to the
+# Boost Software License, Version 1.0.
+# (See at http://www.boost.org/LICENSE_1_0.txt)
+
+
+project boost/random
+	: source-location ../ ;
+
+SOURCES = random_device ;
+
+lib boost_random
+	: $(SOURCES).cpp 
+	: <link>shared:<define>BOOST_RANDOM_DYN_LINK=1 ;

Deleted: trunk/dports/devel/boost/files/patch-configure.diff
===================================================================
--- trunk/dports/devel/boost/files/patch-configure.diff	2009-06-15 13:35:28 UTC (rev 52380)
+++ trunk/dports/devel/boost/files/patch-configure.diff	2009-06-15 13:47:58 UTC (rev 52381)
@@ -1,15 +0,0 @@
---- configure.orig	2008-04-29 14:46:53.000000000 -0400
-+++ configure	2008-12-07 13:24:30.000000000 -0500
-@@ -9,7 +9,11 @@
- 
- BJAM=""
- TOOLSET=""
--BJAM_CONFIG=""
-+BJAM_CONFIG="__MACPORTS_BJAM_CONFIG__"
-+# Handle MACOSX_DEPLOYMENT_TARGET
-+if test "x$MACOSX_DEPLOYMENT_TARGET" != x; then
-+    BJAM_CONFIG="$BJAM_CONFIG macosx-version=$MACOSX_DEPLOYMENT_TARGET"
-+fi
- BUILD=""
- PREFIX=/usr/local
- EPREFIX=

Added: trunk/dports/devel/boost/files/patch-libs-mpi-build-Jamfile.v2.diff
===================================================================
--- trunk/dports/devel/boost/files/patch-libs-mpi-build-Jamfile.v2.diff	                        (rev 0)
+++ trunk/dports/devel/boost/files/patch-libs-mpi-build-Jamfile.v2.diff	2009-06-15 13:47:58 UTC (rev 52381)
@@ -0,0 +1,10 @@
+--- libs/mpi/build/Jamfile.v2.orig	2009-06-11 01:57:28.000000000 +0200
++++ libs/mpi/build/Jamfile.v2	2009-06-11 01:57:28.000000000 +0200
+@@ -99,6 +99,7 @@
+         <link>shared:<define>BOOST_PYTHON_DYN_LINK=1    
+         <link>shared 
+         <variant>release   
++	<threading>multi
+       ;
+   }
+ }

Added: trunk/dports/devel/boost/files/patch-libs-random-random_device.cpp.diff
===================================================================
--- trunk/dports/devel/boost/files/patch-libs-random-random_device.cpp.diff	                        (rev 0)
+++ trunk/dports/devel/boost/files/patch-libs-random-random_device.cpp.diff	2009-06-15 13:47:58 UTC (rev 52381)
@@ -0,0 +1,11 @@
+--- libs/random/random_device.cpp.orig	2009-06-11 15:27:21.000000000 +0200
++++ libs/random/random_device.cpp	2009-06-11 15:28:01.000000000 +0200
+@@ -22,7 +22,7 @@
+ #endif
+ 
+ 
+-#if defined(__linux__) || defined (__FreeBSD__)
++#if defined(__linux__) || defined (__FreeBSD__) || defined(__APPLE__)
+ 
+ // the default is the unlimited capacity device, using some secure hash
+ // try "/dev/random" for blocking when the entropy pool has drained
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090615/616a818b/attachment-0001.html>


More information about the macports-changes mailing list