Ticket #40154: patch-libvpx-1.4.0.diff

File patch-libvpx-1.4.0.diff, 13.7 KB (added by dbevans (David B. Evans), 9 years ago)

Proposed upgrade to libvpx-1.4.0 with yasm dependency fix

  • Portfile

     
    55PortGroup           compiler_blacklist_versions 1.0
    66PortGroup           muniversal 1.0
    77
     8# Since libvpx installs a static library only, increase the revision of
     9# dependents when updating libvpx to a new version so they'll be rebuilt.
    810name                libvpx
    9 version             1.3.0
    10 revision            1
     11version             1.4.0
    1112categories          multimedia
    1213maintainers         devans openmaintainer
    1314platforms           darwin
     
    2425                    The VP9 encoder in this release is not, as yet, feature complete.
    2526
    2627homepage            http://webmproject.org
    27 master_sites        googlecode:webm
     28master_sites        http://storage.googleapis.com/downloads.webmproject.org/releases/webm/
    2829use_bzip2           yes
    29 distname            ${name}-v${version}
    3030
    31 checksums           rmd160  bf74821ac8f20ed30f44b6e01473ee1f332f721c \
    32                     sha256  d3dcc8d84af51c6c382b214397c62402e37a799e8ebcda6f4217aef0010451a9
     31checksums           rmd160  272b1a9f1687a80337d79ccbada2a344c96d1bf1 \
     32                    sha256  f582d9b2d60a592a4a3d8c32965ca2d2167e9ade38c6c30bac8801ff66a118e4
    3333
    34 depends_build       port:yasm
     34if {[string match "*86*" [get_canonical_archs]]} {
     35    depends_build-append port:yasm
     36}
    3537
    3638patchfiles          patch-build-make-configure.sh.diff \
    3739                    patch-configure.diff \
     
    5052                    --enable-runtime-cpu-detect \
    5153                    --disable-install-docs \
    5254                    --disable-debug-libs \
    53                     --disable-examples
     55                    --disable-examples \
     56                    --disable-unit-tests
    5457
    5558configure.env       LD="${configure.cc}"
    5659
     
    8386        build.args-append CFLAGS_S=-fno-integrated-as
    8487}
    8588
    86 platform darwin {
    87     if {${os.major} >= 10} {
    88         supported_archs i386 x86_64
    89     }
    90 }
     89configure.universal_args-delete --disable-dependency-tracking
    9190
    92 # set configure parameters depending on if universal or not
    9391set my_targets(ppc)     ppc32
    9492set my_targets(ppc64)   ppc64
    9593set my_targets(i386)    x86
    9694set my_targets(x86_64)  x86_64
    97 if {[variant_isset universal]} {
    98     # clear universal flags; configure will determine them.
    99     configure.universal_cppflags
    100     configure.universal_cflags
    101     configure.universal_cxxflags
    102     configure.universal_ldflags
    103     configure.universal_args-delete --disable-dependency-tracking
    104     foreach my_arch ${configure.universal_archs} {
    105         set merger_host(${my_arch}) ""
    106         if {[info exists my_targets(${my_arch})]} {
    107             set merger_configure_args(${my_arch}) --target=$my_targets(${my_arch})-${os.platform}-gcc
    108         }
     95
     96# We must specify the target, otherwise the configure script will guess,
     97# and that may not match what the user requested in macports.conf.
     98foreach my_arch ${configure.universal_archs} {
     99    set merger_host(${my_arch}) ""
     100    if {[info exists my_targets(${my_arch})]} {
     101        set merger_configure_args(${my_arch}) --target=$my_targets(${my_arch})-${os.platform}-gcc
    109102    }
    110 } else {
    111     # specify only the single target, otherwise 'configure' will try
    112     # for a universal install.
    113     if {[info exists my_targets(${build_arch})]} {
    114         configure.args-append --target=$my_targets(${build_arch})-${os.platform}-gcc
     103}
     104if {![variant_isset universal]} {
     105    if {[info exists merger_configure_args(${build_arch})]} {
     106        configure.args-append $merger_configure_args(${build_arch})
    115107    } else {
    116108        configure.args-append --target=${os.arch}-${os.platform}-gcc
    117109    }
  • files/patch-build-make-configure.sh.diff

     
    1 --- build/make/configure.sh.orig        2015-04-17 10:56:45.000000000 -0700
    2 +++ build/make/configure.sh     2015-04-17 10:58:27.000000000 -0700
    3 @@ -442,10 +442,10 @@
    4  EOF
     1--- build/make/configure.sh.orig        2015-04-03 13:49:19.000000000 -0500
     2+++ build/make/configure.sh     2015-06-02 13:22:43.000000000 -0500
     3@@ -653,33 +653,13 @@
    54 
    6      if enabled rvct; then cat >> $1 << EOF
    7 -fmt_deps = sed -e 's;^__image.axf;\${@:.d=.o} \$@;' #hide
    8 +fmt_deps = sed -e 's;^__image.axf;\$\${@:.d=.o} \$@;' #hide
    9  EOF
    10      else cat >> $1 << EOF
    11 -fmt_deps = sed -e 's;^\([a-zA-Z0-9_]*\)\.o;\${@:.d=.o} \$@;'
    12 +fmt_deps = sed -e 's;^\([a-zA-Z0-9_]*\)\.o;\$\${@:.d=.o} \$@;'
    13  EOF
    14      fi
     5     # detect tgt_os
     6     case "$gcctarget" in
     7-      *darwin8*)
     8+      *darwin[89]*)
     9         tgt_isa=universal
     10-        tgt_os=darwin8
     11+        tgt_os=darwin
     12         ;;
     13-      *darwin9*)
     14-        tgt_isa=universal
     15-        tgt_os=darwin9
     16-        ;;
     17-      *darwin10*)
     18-        tgt_isa=x86_64
     19-        tgt_os=darwin10
     20-        ;;
     21-      *darwin11*)
     22-        tgt_isa=x86_64
     23-        tgt_os=darwin11
     24-        ;;
     25-      *darwin12*)
     26-        tgt_isa=x86_64
     27-        tgt_os=darwin12
     28-        ;;
     29-      *darwin13*)
     30-        tgt_isa=x86_64
     31-        tgt_os=darwin13
     32-        ;;
     33-      *darwin14*)
     34+      *darwin*)
     35         tgt_isa=x86_64
     36-        tgt_os=darwin14
     37+        tgt_os=darwin
     38         ;;
     39       x86_64*mingw32*)
     40         tgt_os=win64
     41@@ -739,58 +719,6 @@
     42   # Minimum iOS version for all target platforms (darwin and iphonesimulator).
     43   IOS_VERSION_MIN="6.0"
    1544 
    16 @@ -634,29 +634,13 @@
    17  
    18          # detect tgt_os
    19          case "$gcctarget" in
    20 -            *darwin8*)
    21 +            *darwin[89]*)
    22                  tgt_isa=universal
    23 -                tgt_os=darwin8
    24 +                tgt_os=darwin
    25                  ;;
    26 -            *darwin9*)
    27 -                tgt_isa=universal
    28 -                tgt_os=darwin9
    29 -                ;;
    30 -            *darwin10*)
    31 -                tgt_isa=x86_64
    32 -                tgt_os=darwin10
    33 -                ;;
    34 -            *darwin11*)
    35 -                tgt_isa=x86_64
    36 -                tgt_os=darwin11
    37 -                ;;
    38 -            *darwin12*)
    39 +            *darwin*)
    40                  tgt_isa=x86_64
    41 -                tgt_os=darwin12
    42 -                ;;
    43 -            *darwin13*)
    44 -                tgt_isa=x86_64
    45 -                tgt_os=darwin13
    46 +                tgt_os=darwin
    47                  ;;
    48              x86_64*mingw32*)
    49                  tgt_os=win64
    50 @@ -709,59 +693,6 @@
    51      # PIC is probably what we want when building shared libs
    52      enabled shared && soft_enable pic
    53  
    54 -    # Handle darwin variants. Newer SDKs allow targeting older
    55 -    # platforms, so find the newest SDK available.
    56 -    case ${toolchain} in
    57 -        *-darwin*)
    58 -            if [ -z "${DEVELOPER_DIR}" ]; then
    59 -                DEVELOPER_DIR=`xcode-select -print-path 2> /dev/null`
    60 -                [ $? -ne 0 ] && OSX_SKIP_DIR_CHECK=1
    61 -            fi
    62 -            if [ -z "${OSX_SKIP_DIR_CHECK}" ]; then
    63 -                OSX_SDK_ROOTS="${DEVELOPER_DIR}/SDKs"
    64 -                OSX_SDK_VERSIONS="MacOSX10.4u.sdk MacOSX10.5.sdk MacOSX10.6.sdk"
    65 -                OSX_SDK_VERSIONS="${OSX_SDK_VERSIONS} MacOSX10.7.sdk"
    66 -                for v in ${OSX_SDK_VERSIONS}; do
    67 -                    if [ -d "${OSX_SDK_ROOTS}/${v}" ]; then
    68 -                        osx_sdk_dir="${OSX_SDK_ROOTS}/${v}"
    69 -                    fi
    70 -                done
    71 -            fi
    72 -            ;;
    73 -    esac
    74 -
    75 -    if [ -d "${osx_sdk_dir}" ]; then
     45-  # Handle darwin variants. Newer SDKs allow targeting older
     46-  # platforms, so use the newest one available.
     47-  case ${toolchain} in
     48-    *-darwin*)
     49-      osx_sdk_dir="$(show_darwin_sdk_path macosx)"
     50-      if [ -d "${osx_sdk_dir}" ]; then
    7651-        add_cflags  "-isysroot ${osx_sdk_dir}"
    7752-        add_ldflags "-isysroot ${osx_sdk_dir}"
    78 -    fi
     53-      fi
     54-      ;;
     55-  esac
    7956-
    80 -    case ${toolchain} in
    81 -        *-darwin8-*)
    82 -            add_cflags  "-mmacosx-version-min=10.4"
    83 -            add_ldflags "-mmacosx-version-min=10.4"
    84 -            ;;
    85 -        *-darwin9-*)
    86 -            add_cflags  "-mmacosx-version-min=10.5"
    87 -            add_ldflags "-mmacosx-version-min=10.5"
    88 -            ;;
    89 -        *-darwin10-*)
    90 -            add_cflags  "-mmacosx-version-min=10.6"
    91 -            add_ldflags "-mmacosx-version-min=10.6"
    92 -            ;;
    93 -        *-darwin11-*)
    94 -            add_cflags  "-mmacosx-version-min=10.7"
    95 -            add_ldflags "-mmacosx-version-min=10.7"
    96 -            ;;
    97 -        *-darwin12-*)
    98 -            add_cflags  "-mmacosx-version-min=10.8"
    99 -            add_ldflags "-mmacosx-version-min=10.8"
    100 -            ;;
    101 -        *-darwin13-*)
    102 -            add_cflags  "-mmacosx-version-min=10.9"
    103 -            add_ldflags "-mmacosx-version-min=10.9"
    104 -            ;;
    105 -    esac
     57-  case ${toolchain} in
     58-    *-darwin8-*)
     59-      add_cflags  "-mmacosx-version-min=10.4"
     60-      add_ldflags "-mmacosx-version-min=10.4"
     61-      ;;
     62-    *-darwin9-*)
     63-      add_cflags  "-mmacosx-version-min=10.5"
     64-      add_ldflags "-mmacosx-version-min=10.5"
     65-      ;;
     66-    *-darwin10-*)
     67-      add_cflags  "-mmacosx-version-min=10.6"
     68-      add_ldflags "-mmacosx-version-min=10.6"
     69-      ;;
     70-    *-darwin11-*)
     71-      add_cflags  "-mmacosx-version-min=10.7"
     72-      add_ldflags "-mmacosx-version-min=10.7"
     73-      ;;
     74-    *-darwin12-*)
     75-      add_cflags  "-mmacosx-version-min=10.8"
     76-      add_ldflags "-mmacosx-version-min=10.8"
     77-      ;;
     78-    *-darwin13-*)
     79-      add_cflags  "-mmacosx-version-min=10.9"
     80-      add_ldflags "-mmacosx-version-min=10.9"
     81-      ;;
     82-    *-darwin14-*)
     83-      add_cflags  "-mmacosx-version-min=10.10"
     84-      add_ldflags "-mmacosx-version-min=10.10"
     85-      ;;
     86-    *-iphonesimulator-*)
     87-      add_cflags  "-miphoneos-version-min=${IOS_VERSION_MIN}"
     88-      add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
     89-      iossim_sdk_dir="$(show_darwin_sdk_path iphonesimulator)"
     90-      if [ -d "${iossim_sdk_dir}" ]; then
     91-        add_cflags  "-isysroot ${iossim_sdk_dir}"
     92-        add_ldflags "-isysroot ${iossim_sdk_dir}"
     93-      fi
     94-      ;;
     95-  esac
    10696-
    107      # Handle Solaris variants. Solaris 10 needs -lposix4
    108      case ${toolchain} in
    109          sparc-solaris-*)
    110 @@ -1018,11 +949,6 @@
    111      x86*)
    112          bits=32
    113          enabled x86_64 && bits=64
    114 -        check_cpp <<EOF && bits=x32
    115 -#ifndef __ILP32__
    116 -#error "not x32"
    117 -#endif
    118 -EOF
    119  
    120          case  ${tgt_os} in
    121              win*)
     97   # Handle Solaris variants. Solaris 10 needs -lposix4
     98   case ${toolchain} in
     99     sparc-solaris-*)
  • files/patch-configure.diff

     
    1 --- configure.orig      2014-01-10 12:12:42.000000000 -0800
    2 +++ configure   2014-03-01 21:48:09.000000000 -0800
    3 @@ -104,9 +104,11 @@
     1--- configure.orig      2015-04-03 13:49:19.000000000 -0500
     2+++ configure   2015-06-02 13:24:29.000000000 -0500
     3@@ -112,14 +112,17 @@
     4 all_platforms="${all_platforms} armv7s-darwin-gcc"
    45 all_platforms="${all_platforms} mips32-linux-gcc"
     6 all_platforms="${all_platforms} mips64-linux-gcc"
     7+all_platforms="${all_platforms} ppc32-darwin-gcc"
    58 all_platforms="${all_platforms} ppc32-darwin8-gcc"
    69 all_platforms="${all_platforms} ppc32-darwin9-gcc"
    7 +all_platforms="${all_platforms} ppc32-darwin-gcc"
    810 all_platforms="${all_platforms} ppc32-linux-gcc"
     11+all_platforms="${all_platforms} ppc64-darwin-gcc"
    912 all_platforms="${all_platforms} ppc64-darwin8-gcc"
    1013 all_platforms="${all_platforms} ppc64-darwin9-gcc"
    11 +all_platforms="${all_platforms} ppc64-darwin-gcc"
    1214 all_platforms="${all_platforms} ppc64-linux-gcc"
    1315 all_platforms="${all_platforms} sparc-solaris-gcc"
    1416 all_platforms="${all_platforms} x86-android-gcc"
    15 @@ -118,6 +120,8 @@
    16  all_platforms="${all_platforms} x86-darwin11-gcc"
    17  all_platforms="${all_platforms} x86-darwin12-gcc"
    18  all_platforms="${all_platforms} x86-darwin13-gcc"
    1917+all_platforms="${all_platforms} x86-darwin-gcc"
    20 +all_platforms="${all_platforms} x86-darwin-clang"
    21  all_platforms="${all_platforms} x86-linux-gcc"
    22  all_platforms="${all_platforms} x86-linux-icc"
    23  all_platforms="${all_platforms} x86-os2-gcc"
    24 @@ -134,6 +138,8 @@
     18 all_platforms="${all_platforms} x86-darwin8-gcc"
     19 all_platforms="${all_platforms} x86-darwin8-icc"
     20 all_platforms="${all_platforms} x86-darwin9-gcc"
     21@@ -141,6 +144,7 @@
     22 all_platforms="${all_platforms} x86-win32-vs10"
     23 all_platforms="${all_platforms} x86-win32-vs11"
     24 all_platforms="${all_platforms} x86-win32-vs12"
     25+all_platforms="${all_platforms} x86_64-darwin-gcc"
     26 all_platforms="${all_platforms} x86_64-darwin9-gcc"
     27 all_platforms="${all_platforms} x86_64-darwin10-gcc"
    2528 all_platforms="${all_platforms} x86_64-darwin11-gcc"
    26  all_platforms="${all_platforms} x86_64-darwin12-gcc"
    27  all_platforms="${all_platforms} x86_64-darwin13-gcc"
    28 +all_platforms="${all_platforms} x86_64-darwin-gcc"
    29 +all_platforms="${all_platforms} x86_64-darwin-clang"
    30  all_platforms="${all_platforms} x86_64-linux-gcc"
    31  all_platforms="${all_platforms} x86_64-linux-icc"
    32  all_platforms="${all_platforms} x86_64-solaris-gcc"
    33 @@ -149,6 +155,8 @@
    34  all_platforms="${all_platforms} universal-darwin11-gcc"
    35  all_platforms="${all_platforms} universal-darwin12-gcc"
    36  all_platforms="${all_platforms} universal-darwin13-gcc"
     29@@ -157,6 +161,7 @@
     30 all_platforms="${all_platforms} x86_64-win64-vs10"
     31 all_platforms="${all_platforms} x86_64-win64-vs11"
     32 all_platforms="${all_platforms} x86_64-win64-vs12"
    3733+all_platforms="${all_platforms} universal-darwin-gcc"
    38 +all_platforms="${all_platforms} universal-darwin-clang"
    39  all_platforms="${all_platforms} generic-gnu"
    40  
    41  # all_targets is a list of all targets that can be configured
     34 all_platforms="${all_platforms} universal-darwin8-gcc"
     35 all_platforms="${all_platforms} universal-darwin9-gcc"
     36 all_platforms="${all_platforms} universal-darwin10-gcc"