[49978] trunk/dports/devel/dbus-glib
mcalhoun at macports.org
mcalhoun at macports.org
Tue Apr 21 12:27:20 PDT 2009
Revision: 49978
http://trac.macports.org/changeset/49978
Author: mcalhoun at macports.org
Date: 2009-04-21 12:27:19 -0700 (Tue, 21 Apr 2009)
Log Message:
-----------
dbus-glib: Use muniversal PortGroup.
Modified Paths:
--------------
trunk/dports/devel/dbus-glib/Portfile
Removed Paths:
-------------
trunk/dports/devel/dbus-glib/files/
Modified: trunk/dports/devel/dbus-glib/Portfile
===================================================================
--- trunk/dports/devel/dbus-glib/Portfile 2009-04-21 18:52:56 UTC (rev 49977)
+++ trunk/dports/devel/dbus-glib/Portfile 2009-04-21 19:27:19 UTC (rev 49978)
@@ -2,6 +2,7 @@
# $Id$
PortSystem 1.0
+PortGroup muniversal 1.0
name dbus-glib
version 0.80
@@ -28,14 +29,7 @@
port:dbus \
port:gettext
-patchfiles patch-configure.diff
-
configure.args --disable-doxygen-docs
-post-configure {
- if {[variant_isset universal] && [lsearch -glob ${universal_archs} *64] != -1} {
- system "cd ${worksrcpath} && patch -p0 < ${filespath}/config.h.diff && touch stamp-h1"
- }
-}
test.run yes
test.target check
@@ -48,9 +42,52 @@
}
variant test description {Enable building of test code} {
- configure.args-append --enable-tests
+ if { ! [variant_isset universal] } {
+ configure.args-append --enable-tests
+ } else {
+ # Do not enable test when cross-compiling.
+ foreach arch ${cross_archs} {
+ lappend merger_configure_args(${arch}) --enable-tests
+ }
+ }
}
+if { [variant_isset universal] } {
+ # Find architectures which will not run on build platform.
+ if { ${os.arch}=="i386" } {
+ if { ${os.major} >= 10 } {
+ set cross_archs "ppc ppc64"
+ } else {
+ set cross_archs "ppc64"
+ }
+ } else {
+ set cross_archs "i386 x86_64"
+ }
+
+ set run_arch [lindex ${universal_archs} 0]
+ if { [variant_isset universal] && [lsearch ${cross_archs} ${run_arch}] >= 0 } {
+ ui_msg "When building a universal binary of ${name}, make sure none of {${cross_archs}} is first in universal_archs in ${prefix}/etc/macports/macports.conf"
+ error "incompatible universal_archs value"
+ }
+
+ foreach arch ${cross_archs} {
+ lappend merger_configure_env(${arch}) \
+ ac_cv_func_posix_getpwnam_r=yes \
+ ac_cv_have_abstract_sockets=no
+ }
+
+ post-configure {
+ foreach arch ${cross_archs} {
+ reinplace "s|--mode=execute \$(top_builddir)/dbus/dbus-binding-tool|--mode=execute ${worksrcpath}-${run_arch}/dbus/dbus-binding-tool|" \
+ ${worksrcpath}-${arch}/dbus/examples/Makefile \
+ ${worksrcpath}-${arch}/dbus/examples/statemachine/Makefile
+
+ reinplace "s|\$(top_builddir)/dbus/dbus-binding-tool --mode=glib-client|${worksrcpath}-${run_arch}/dbus/dbus-binding-tool --mode=glib-client|" \
+ ${worksrcpath}-${arch}/tools/Makefile
+ }
+ }
+}
+
livecheck.check regex
livecheck.url http://www.freedesktop.org/wiki/Software/DBusBindings
livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090421/69fd2eca/attachment-0001.html>
More information about the macports-changes
mailing list