[100911] trunk/dports/multimedia/libvpx

jeremyhu at macports.org jeremyhu at macports.org
Mon Dec 31 12:50:51 PST 2012


Revision: 100911
          https://trac.macports.org/changeset/100911
Author:   jeremyhu at macports.org
Date:     2012-12-31 12:50:50 -0800 (Mon, 31 Dec 2012)
Log Message:
-----------
libvpx: Address possible build failure

Modified Paths:
--------------
    trunk/dports/multimedia/libvpx/Portfile

Added Paths:
-----------
    trunk/dports/multimedia/libvpx/files/configure.patch

Modified: trunk/dports/multimedia/libvpx/Portfile
===================================================================
--- trunk/dports/multimedia/libvpx/Portfile	2012-12-31 20:18:55 UTC (rev 100910)
+++ trunk/dports/multimedia/libvpx/Portfile	2012-12-31 20:50:50 UTC (rev 100911)
@@ -27,18 +27,12 @@
 # patches for: 10.6; correct "universal" arch default selection; 'sed' scripts.
 patchfiles          patch-build-make-configure.sh.diff
 
+# Use the correct SDK
+patchfiles-append   configure.patch
+
 # patch for mountain lion compatibility, see https://gerrit.chromium.org/gerrit/#change,26027 for upstream
 patchfiles-append   patch-build-make-gen_asm_deps.sh.diff
 
-post-patch {
-    if {[vercmp $xcodeversion 4.3] < 0} {
-        set sdks_dir "${developer_dir}/SDKs"
-    } else {
-        set sdks_dir "${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs"
-    }
-    reinplace "s|@SDK_DIR@|${sdks_dir}|g" ${worksrcpath}/build/make/configure.sh
-}
-
 # 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 \
@@ -84,15 +78,15 @@
     foreach my_arch ${configure.universal_archs} {
         set merger_host(${my_arch}) ""
         if {[info exists my_targets(${my_arch})]} {
-            set merger_configure_args(${my_arch}) --target=$my_targets(${my_arch})-${os.platform}${os.major}-gcc
+            set merger_configure_args(${my_arch}) --target=$my_targets(${my_arch})-${os.platform}-gcc
         }
     }
 } else {
     # specify only the single target, otherwise 'configure' will try
     # for a universal install.
     if {[info exists my_targets(${build_arch})]} {
-        configure.args-append --target=$my_targets(${build_arch})-${os.platform}${os.major}-gcc
+        configure.args-append --target=$my_targets(${build_arch})-${os.platform}-gcc
     } else {
-        configure.args-append --target=${os.arch}-${os.platform}${os.major}-gcc
+        configure.args-append --target=${os.arch}-${os.platform}-gcc
     }
 }

Added: trunk/dports/multimedia/libvpx/files/configure.patch
===================================================================
--- trunk/dports/multimedia/libvpx/files/configure.patch	                        (rev 0)
+++ trunk/dports/multimedia/libvpx/files/configure.patch	2012-12-31 20:50:50 UTC (rev 100911)
@@ -0,0 +1,117 @@
+--- build/make/configure.sh.orig	2012-12-31 12:39:09.000000000 -0800
++++ build/make/configure.sh	2012-12-31 12:41:25.000000000 -0800
+@@ -572,25 +572,13 @@ process_common_toolchain() {
+ 
+         # detect tgt_os
+         case "$gcctarget" in
+-            *darwin8*)
++            *darwin[89]*)
+                 tgt_isa=universal
+-                tgt_os=darwin8
++                tgt_os=darwin
+                 ;;
+-            *darwin9*)
+-                tgt_isa=universal
+-                tgt_os=darwin9
+-                ;;
+-            *darwin10*)
+-                tgt_isa=x86_64
+-                tgt_os=darwin10
+-                ;;
+-            *darwin11*)
+-                tgt_isa=x86_64
+-                tgt_os=darwin11
+-                ;;
+-            *darwin12*)
++            *darwin*)
+                 tgt_isa=x86_64
+-                tgt_os=darwin12
++                tgt_os=darwin
+                 ;;
+             *mingw32*|*cygwin*)
+                 [ -z "$tgt_isa" ] && tgt_isa=x86
+@@ -640,55 +628,6 @@ process_common_toolchain() {
+     # PIC is probably what we want when building shared libs
+     enabled shared && soft_enable pic
+ 
+-    # Handle darwin variants. Newer SDKs allow targeting older
+-    # platforms, so find the newest SDK available.
+-    case ${toolchain} in
+-        *-darwin*)
+-            if [ -z "${DEVELOPER_DIR}" ]; then
+-                DEVELOPER_DIR=`xcode-select -print-path 2> /dev/null`
+-                [ $? -ne 0 ] && OSX_SKIP_DIR_CHECK=1
+-            fi
+-            if [ -z "${OSX_SKIP_DIR_CHECK}" ]; then
+-                OSX_SDK_ROOTS="${DEVELOPER_DIR}/SDKs"
+-                OSX_SDK_VERSIONS="MacOSX10.4u.sdk MacOSX10.5.sdk MacOSX10.6.sdk"
+-                OSX_SDK_VERSIONS="${OSX_SDK_VERSIONS} MacOSX10.7.sdk"
+-                for v in ${OSX_SDK_VERSIONS}; do
+-                    if [ -d "${OSX_SDK_ROOTS}/${v}" ]; then
+-                        osx_sdk_dir="${OSX_SDK_ROOTS}/${v}"
+-                    fi
+-                done
+-            fi
+-            ;;
+-    esac
+-
+-    if [ -d "${osx_sdk_dir}" ]; then
+-        add_cflags  "-isysroot ${osx_sdk_dir}"
+-        add_ldflags "-isysroot ${osx_sdk_dir}"
+-    fi
+-
+-    case ${toolchain} in
+-        *-darwin8-*)
+-            add_cflags  "-mmacosx-version-min=10.4"
+-            add_ldflags "-mmacosx-version-min=10.4"
+-            ;;
+-        *-darwin9-*)
+-            add_cflags  "-mmacosx-version-min=10.5"
+-            add_ldflags "-mmacosx-version-min=10.5"
+-            ;;
+-        *-darwin10-*)
+-            add_cflags  "-mmacosx-version-min=10.6"
+-            add_ldflags "-mmacosx-version-min=10.6"
+-            ;;
+-        *-darwin11-*)
+-            add_cflags  "-mmacosx-version-min=10.7"
+-            add_ldflags "-mmacosx-version-min=10.7"
+-            ;;
+-        *-darwin12-*)
+-            add_cflags  "-mmacosx-version-min=10.8"
+-            add_ldflags "-mmacosx-version-min=10.8"
+-            ;;
+-    esac
+-
+     # Handle Solaris variants. Solaris 10 needs -lposix4
+     case ${toolchain} in
+         sparc-solaris-*)
+--- configure.orig	2012-12-31 12:41:43.000000000 -0800
++++ configure	2012-12-31 12:43:33.000000000 -0800
+@@ -111,6 +111,8 @@ all_platforms="${all_platforms} x86-darw
+ all_platforms="${all_platforms} x86-darwin10-gcc"
+ all_platforms="${all_platforms} x86-darwin11-gcc"
+ all_platforms="${all_platforms} x86-darwin12-gcc"
++all_platforms="${all_platforms} x86-darwin-gcc"
++all_platforms="${all_platforms} x86-darwin-clang"
+ all_platforms="${all_platforms} x86-linux-gcc"
+ all_platforms="${all_platforms} x86-linux-icc"
+ all_platforms="${all_platforms} x86-os2-gcc"
+@@ -125,6 +125,8 @@ all_platforms="${all_platforms} x86_64-d
+ all_platforms="${all_platforms} x86_64-darwin10-gcc"
+ all_platforms="${all_platforms} x86_64-darwin11-gcc"
+ all_platforms="${all_platforms} x86_64-darwin12-gcc"
++all_platforms="${all_platforms} x86_64-darwin-gcc"
++all_platforms="${all_platforms} x86_64-darwin-clang"
+ all_platforms="${all_platforms} x86_64-linux-gcc"
+ all_platforms="${all_platforms} x86_64-linux-icc"
+ all_platforms="${all_platforms} x86_64-solaris-gcc"
+@@ -134,6 +136,8 @@ all_platforms="${all_platforms} universa
+ all_platforms="${all_platforms} universal-darwin10-gcc"
+ all_platforms="${all_platforms} universal-darwin11-gcc"
+ all_platforms="${all_platforms} universal-darwin12-gcc"
++all_platforms="${all_platforms} universal-darwin-gcc"
++all_platforms="${all_platforms} universal-darwin-clang"
+ all_platforms="${all_platforms} generic-gnu"
+ 
+ # all_targets is a list of all targets that can be configured
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121231/18d34513/attachment.html>


More information about the macports-changes mailing list