[Mesa-dev] [PATCH] mapi: Teach es{1, 2}api/ABI-check shared library names on Cygwin

Eric Engestrom eric.engestrom at imgtec.com
Mon Nov 20 16:09:14 UTC 2017


On Monday, 2017-11-20 14:50:49 +0000, Jon Turney wrote:
> Ideally we'd be able to get the library filename from libtool, but that
> doesn't seem to be a feature...
> 
> Use of ${uname} is presumably ok here as we won't be running 'make check' if
> we are cross-compiling
> 
> Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
> ---
>  src/mapi/es1api/ABI-check | 13 +++++++++----
>  src/mapi/es2api/ABI-check | 13 +++++++++----
>  2 files changed, 18 insertions(+), 8 deletions(-)
> 
> diff --git a/src/mapi/es1api/ABI-check b/src/mapi/es1api/ABI-check
> index 0a867343c79..396ca74bbcb 100755
> --- a/src/mapi/es1api/ABI-check
> +++ b/src/mapi/es1api/ABI-check
> @@ -9,12 +9,17 @@ set -eu
>  # or in extensions that are part of the ES 1.1 extension pack.
>  # (see http://www.khronos.org/registry/gles/specs/1.1/opengles_spec_1_1_extension_pack.pdf)
>  
> -if [ $(uname) == "Darwin" ]
> -then
> +case $(uname) in

Please quote this :)

> +"Darwin")
>    LIB=${1-es1api/.libs/libGLESv1_CM.dylib}
> -else
> +  ;;
> +"CYGWIN"*)

Quotes here and on `"Darwin"` don't do anything, I'd drop them, but
I don't care that much either.

With `case "$(uname)"` fixed:
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

> +  LIB=${1-es1api/.libs/cygGLESv1_CM-1.dll}
> +  ;;
> +*)
>    LIB=${1-es1api/.libs/libGLESv1_CM.so.1}
> -fi
> +  ;;
> +esac
>  
>  if ! [ -f "$LIB" ]
>  then
> diff --git a/src/mapi/es2api/ABI-check b/src/mapi/es2api/ABI-check
> index 716e6679a49..9d95e823814 100755
> --- a/src/mapi/es2api/ABI-check
> +++ b/src/mapi/es2api/ABI-check
> @@ -6,12 +6,17 @@ set -eu
>  # GL_EXT_multi_draw_arrays
>  # GL_OES_EGL_image
>  
> -if [ $(uname) == "Darwin" ]
> -then
> +case $(uname) in
> +"Darwin")
>    LIB=${1-es2api/.libs/libGLESv2.dylib}
> -else
> +  ;;
> +"CYGWIN"*)
> +  LIB=${1-es2api/.libs/cygGLESv2-2.dll}
> +  ;;
> +*)
>    LIB=${1-es2api/.libs/libGLESv2.so.2}
> -fi
> +  ;;
> +esac
>  
>  if ! [ -f "$LIB" ]
>  then
> -- 
> 2.15.0
> 


More information about the mesa-dev mailing list