[70235] trunk/dports/multimedia/libvpx
michaelld at macports.org
michaelld at macports.org
Mon Aug 2 21:49:05 PDT 2010
Revision: 70235
http://trac.macports.org/changeset/70235
Author: michaelld at macports.org
Date: 2010-08-02 21:49:01 -0700 (Mon, 02 Aug 2010)
Log Message:
-----------
Corrects compilation on 10.6, and selection of "universal" arch'es
internally to 'configure'. Adds explicit arch selection to avoid
default internal "universal" building. Addresses ticket #25907.
Modified Paths:
--------------
trunk/dports/multimedia/libvpx/Portfile
Added Paths:
-----------
trunk/dports/multimedia/libvpx/files/patch-build-make-configure.sh.diff
trunk/dports/multimedia/libvpx/files/patch-configure.diff
Removed Paths:
-------------
trunk/dports/multimedia/libvpx/files/patch-configure.sh.diff
Modified: trunk/dports/multimedia/libvpx/Portfile
===================================================================
--- trunk/dports/multimedia/libvpx/Portfile 2010-08-03 01:36:36 UTC (rev 70234)
+++ trunk/dports/multimedia/libvpx/Portfile 2010-08-03 04:49:01 UTC (rev 70235)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
@@ -4,6 +5,7 @@
name libvpx
version 0.9.1
+revision 1
categories multimedia
maintainers nomaintainer
platforms darwin
@@ -20,22 +22,55 @@
checksums sha1 a18acb7a1a2fd62268e63aab860b43ff04669b9e \
rmd160 365b16848979727689da5e4416978c0a275e1af3
-depends_lib port:yasm
+depends_build port:yasm
# gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
universal_variant no
-patchfiles patch-configure.sh.diff
+# patches for: 10.6; correct "universal" arch default selection; 'sed' scripts.
+patchfiles patch-build-make-configure.sh.diff \
+ patch-configure.diff
+# As of 0.9.1: doesn't handle shared libraries or debug properly on darwin;
+# doesn't install docs or examples correctly, so disable them.
configure.args --enable-vp8 \
--enable-psnr \
--enable-postproc \
--enable-multithread \
- --enable-runtime-cpu-detect
+ --enable-runtime-cpu-detect \
+ --disable-install-docs \
+ --disable-debug-libs \
+ --disable-examples
+
configure.env LD="${configure.cc}"
-# FIXME: Building docs would require php5 and doxygen as dependency
-configure.args-append --disable-install-docs
+# add in when docs are installed correctly
+#variant docs description {Build documentation} {
+# depends_build-append port:php5 port:doxygen
+# configure.args-delete --disable-install-docs
+# configure.args-append --enable-install-docs
+#}
build.target
build.args verbose=1
+
+# set configure parameters depending on if universal or not
+if {![variant_isset universal]} {
+ # specify only the single target, otherwise 'configure' will try
+ # for a 'universal' install.
+ set tgt_isa "${build_arch}"
+ if {${build_arch} == "i386"} {
+ set tgt_isa "x86"
+ } elseif {${build_arch} == "ppc"} {
+ set tgt_isa "ppc32"
+ }
+ configure.args-append --target=${tgt_isa}-${os.platform}${os.major}-gcc
+} else {
+ # clear universal flags; configure will determine them.
+ configure.universal_cppflags
+ configure.universal_cflags
+ configure.universal_cxxflags
+ configure.universal_ldflags
+ # tell configure the target; probably not necessary
+ configure.args-append --target=universal-${os.platform}${os.major}-gcc
+}
Added: trunk/dports/multimedia/libvpx/files/patch-build-make-configure.sh.diff
===================================================================
--- trunk/dports/multimedia/libvpx/files/patch-build-make-configure.sh.diff (rev 0)
+++ trunk/dports/multimedia/libvpx/files/patch-build-make-configure.sh.diff 2010-08-03 04:49:01 UTC (rev 70235)
@@ -0,0 +1,39 @@
+--- build/make/configure.sh.orig 2010-08-02 23:34:10.000000000 -0400
++++ build/make/configure.sh 2010-08-02 23:34:50.000000000 -0400
+@@ -375,10 +375,10 @@
+ EOF
+
+ if enabled rvct; then cat >> $1 << EOF
+-fmt_deps = sed -e 's;^__image.axf;\$(dir \$@)\$(notdir \$<).o \$@;' #hide
++fmt_deps = sed -e 's;^__image.axf\$\$;\$(dir \$@)\$(notdir \$<).o \$@;' #hide
+ EOF
+ else cat >> $1 << EOF
+-fmt_deps = sed -e 's;^\(.*\)\.o;\$(dir \$@)\1\$(suffix \$<).o \$@;' #hide
++fmt_deps = sed -e 's;^\(.*\)\.o\$\$;\$(dir \$@)\1\$(suffix \$<).o \$@;' #hide
+ EOF
+ fi
+
+@@ -519,6 +519,10 @@
+ tgt_isa=universal
+ tgt_os=darwin9
+ ;;
++ *darwin10*)
++ tgt_isa=universal
++ tgt_os=darwin10
++ ;;
+ *mingw32*|*cygwin*)
+ tgt_os=win32
+ ;;
+@@ -571,6 +575,12 @@
+ add_ldflags "-isysroot /Developer/SDKs/MacOSX10.5.sdk"
+ add_ldflags "-mmacosx-version-min=10.5"
+ ;;
++ *-darwin10-gcc)
++ add_cflags "-isysroot /Developer/SDKs/MacOSX10.6.sdk"
++ add_cflags "-mmacosx-version-min=10.6"
++ add_ldflags "-isysroot /Developer/SDKs/MacOSX10.6.sdk"
++ add_ldflags "-mmacosx-version-min=10.6"
++ ;;
+ esac
+
+ # Process ARM architecture variants
Added: trunk/dports/multimedia/libvpx/files/patch-configure.diff
===================================================================
--- trunk/dports/multimedia/libvpx/files/patch-configure.diff (rev 0)
+++ trunk/dports/multimedia/libvpx/files/patch-configure.diff 2010-08-03 04:49:01 UTC (rev 70235)
@@ -0,0 +1,54 @@
+--- configure.orig 2010-08-02 23:37:31.000000000 -0400
++++ configure 2010-08-02 23:41:49.000000000 -0400
+@@ -101,6 +101,8 @@
+ all_platforms="${all_platforms} x86-darwin8-icc"
+ all_platforms="${all_platforms} x86-darwin9-gcc"
+ all_platforms="${all_platforms} x86-darwin9-icc"
++all_platforms="${all_platforms} x86-darwin10-gcc"
++all_platforms="${all_platforms} x86-darwin10-icc"
+ all_platforms="${all_platforms} x86-linux-gcc"
+ all_platforms="${all_platforms} x86-linux-icc"
+ all_platforms="${all_platforms} x86-solaris-gcc"
+@@ -108,11 +110,13 @@
+ all_platforms="${all_platforms} x86-win32-vs7"
+ all_platforms="${all_platforms} x86-win32-vs8"
+ all_platforms="${all_platforms} x86_64-darwin9-gcc"
++all_platforms="${all_platforms} x86_64-darwin10-gcc"
+ all_platforms="${all_platforms} x86_64-linux-gcc"
+ all_platforms="${all_platforms} x86_64-solaris-gcc"
+ all_platforms="${all_platforms} x86_64-win64-vs8"
+ all_platforms="${all_platforms} universal-darwin8-gcc"
+ all_platforms="${all_platforms} universal-darwin9-gcc"
++all_platforms="${all_platforms} universal-darwin10-gcc"
+ all_platforms="${all_platforms} generic-gnu"
+
+ # all_targets is a list of all targets that can be configured
+@@ -455,13 +459,21 @@
+ case $toolchain in
+ universal-darwin*)
+ local darwin_ver=${tgt_os##darwin}
+- fat_bin_archs="$fat_bin_archs ppc32-${tgt_os}-gcc"
+-
+- # Intel
+- fat_bin_archs="$fat_bin_archs x86-${tgt_os}-${tgt_cc}"
+- if [ $darwin_ver -gt 8 ]; then
+- fat_bin_archs="$fat_bin_archs x86_64-${tgt_os}-${tgt_cc}"
+- fi
++ if [ $darwin_ver -eq 8 ]; then
++ # ppc32 and x86 are defaults for universal on 10.4
++ fat_bin_archs="$fat_bin_archs ppc32-${tgt_os}-${tgt_cc}"
++ fat_bin_archs="$fat_bin_archs x86-${tgt_os}-${tgt_cc}"
++ fi
++ if [ $darwin_ver -eq 9 ]; then
++ # ppc32 and x86 are defaults for universal on 10.5
++ fat_bin_archs="$fat_bin_archs ppc32-${tgt_os}-${tgt_cc}"
++ fat_bin_archs="$fat_bin_archs x86-${tgt_os}-${tgt_cc}"
++ fi
++ if [ $darwin_ver -eq 10 ]; then
++ # x86 and x86_64 are defaults for universal on 10.6
++ fat_bin_archs="$fat_bin_archs x86-${tgt_os}-${tgt_cc}"
++ fat_bin_archs="$fat_bin_archs x86_64-${tgt_os}-${tgt_cc}"
++ fi
+ ;;
+ esac
+
Deleted: trunk/dports/multimedia/libvpx/files/patch-configure.sh.diff
===================================================================
--- trunk/dports/multimedia/libvpx/files/patch-configure.sh.diff 2010-08-03 01:36:36 UTC (rev 70234)
+++ trunk/dports/multimedia/libvpx/files/patch-configure.sh.diff 2010-08-03 04:49:01 UTC (rev 70235)
@@ -1,15 +0,0 @@
---- build/make/configure.sh.orig 2010-08-01 17:29:21.000000000 -0700
-+++ build/make/configure.sh 2010-08-01 17:29:23.000000000 -0700
-@@ -375,10 +375,10 @@
- EOF
-
- if enabled rvct; then cat >> $1 << EOF
--fmt_deps = sed -e 's;^__image.axf;\$(dir \$@)\$(notdir \$<).o \$@;' #hide
-+fmt_deps = sed -e 's;^__image.axf\$\$;\$(dir \$@)\$(notdir \$<).o \$@;' #hide
- EOF
- else cat >> $1 << EOF
--fmt_deps = sed -e 's;^\(.*\)\.o;\$(dir \$@)\1\$(suffix \$<).o \$@;' #hide
-+fmt_deps = sed -e 's;^\(.*\)\.o\$\$;\$(dir \$@)\1\$(suffix \$<).o \$@;' #hide
- EOF
- fi
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100802/3c768946/attachment.html>
More information about the macports-changes
mailing list