message: Build libjpeg-turbo ALTIVEC SIMD
  The libjpeg-turbo package has ALTIVEC SIMD and this updates the
  third_party build to build the ALTIVEC SIMD on the appropriate
  platform.
diff: @@ -34,6 +34,10 @@ libjpegturbo_copts = select({
  "-mfloat-abi=softfp",
  "-fprefetch-loop-arrays",
  ],
  + ":linux_ppc64le": [
  + "-mcpu=power8",
  + "-mtune=power8",
  + ],
  "//conditions:default": [],
  })
  @@ -123,10 +127,50 @@ cc_library(
  ":k8": [":simd_x86_64"],
  ":armeabi-v7a": [":simd_armv7a"],
  ":arm64-v8a": [":simd_armv8a"],
  + ":linux_ppc64le": [":simd_altivec"],
  "//conditions:default": [":simd_none"],
  }),
  )
  +cc_library(
  + name = "simd_altivec",
  + srcs = [
  + "jchuff.h",
  + "jconfig.h",
  + "jdct.h",
  + "jerror.h",
  + "jinclude.h",
  + "jmorecfg.h",
  + "jpegint.h",
  + "jpeglib.h",
  + "jsimd.h",
  + "jsimddct.h",
  + "simd/jsimd.h",
  + "simd/jccolor-altivec.c",
  + "simd/jcgray-altivec.c",
  + "simd/jcsample-altivec.c",
  + "simd/jdcolor-altivec.c",
  + "simd/jdmerge-altivec.c",
  + "simd/jdsample-altivec.c",
  + "simd/jfdctfst-altivec.c",
  + "simd/jfdctint-altivec.c",
  + "simd/jidctfst-altivec.c",
  + "simd/jidctint-altivec.c",
  + "simd/jquanti-altivec.c",
  + "simd/jsimd_powerpc.c",
  + "simd/jsimd_altivec.h",
  + "simd/jcsample.h",
  + ],
  + hdrs = [
  + "simd/jdmrgext-altivec.c", # should have been named .inc
  + "simd/jccolext-altivec.c", # should have been named .inc
  + "simd/jcgryext-altivec.c", # should have been named .inc
  + "simd/jdcolext-altivec.c", # should have been named .inc
  + ],
  + copts = libjpegturbo_copts,
  + nocopts = libjpegturbo_nocopts,
  +)
  +
  cc_library(
  name = "simd_x86_64",
  srcs = [
  @@ -381,6 +425,7 @@ genrule(
  ":k8": "cp $(location jconfig_nowin_simd.h) $@",
  ":armeabi-v7a": "cp $(location jconfig_nowin_simd.h) $@",
  ":arm64-v8a": "cp $(location jconfig_nowin_simd.h) $@",
  + ":linux_ppc64le": "cp $(location jconfig_nowin_simd.h) $@",
  "//conditions:default": "cp $(location jconfig_nowin_nosimd.h) $@",
  }),
  )
  @@ -498,3 +543,9 @@ config_setting(
  name = "windows_msvc",
  values = {"cpu": "x64_windows_msvc"},
  )
  +
  +config_setting(
  + name = "linux_ppc64le",
  + values = {"cpu": "ppc"},
  +
  +)
  