Modified: trunk/dports/lang/mozjs17/Portfile (115480 => 115481)
--- trunk/dports/lang/mozjs17/Portfile 2014-01-03 04:46:17 UTC (rev 115480)
+++ trunk/dports/lang/mozjs17/Portfile 2014-01-03 05:15:11 UTC (rev 115481)
@@ -2,10 +2,11 @@
# $Id$
PortSystem 1.0
+PortGroup muniversal 1.0
name mozjs17
version 17.0.0
-revision 1
+revision 2
categories lang
platforms darwin
license MPL-2.0
@@ -58,12 +59,27 @@
configure.args-append --enable-profiling
}
-# universal build not available due to the following error:
-# checking for the size of void*... configure: error: No size found for void*
-universal_variant no
-
# Use absolute path for install_name
post-patch {
reinplace "s|@executable_path|${prefix}/lib|g" ${worksrcpath}/config/rules.mk
}
+if {[variant_isset universal]} {
+ set merger_host(x86_64) x86_64-apple-${os.platform}${os.major}
+ set merger_host(i386) i686-apple-${os.platform}${os.major}
+ set merger_configure_args(x86_64) "--build=x86_64-apple-${os.platform}${os.major} --target=x86_64-apple-${os.platform}${os.major}"
+ set merger_configure_args(i386) "--build=i686-apple-${os.platform}${os.major} --target=i686-apple-${os.platform}${os.major}"
+} else {
+ if {${build_arch} eq "i386"} {
+ configure.args-append \
+ --host=i686-apple-${os.platform}${os.major} \
+ --build=i686-apple-${os.platform}${os.major} \
+ --target=i686-apple-${os.platform}${os.major}
+ } elseif {${build_arch} eq "x86_64"} {
+ configure.args-append \
+ --host=${build_arch}-apple-${os.platform}${os.major} \
+ --build=${build_arch}-apple-${os.platform}${os.major} \
+ --target=${build_arch}-apple-${os.platform}${os.major}
+ }
+}
+