From c3ebc1a8fe2ebd25a5e860dbd287e00118a089d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Wed, 17 Jun 2015 11:57:38 -0300 Subject: [PATCH 1/7] (qb) Mark OpenGL as optional --- qb/config.params.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qb/config.params.sh b/qb/config.params.sh index 6b08c92f72..3fe146a87d 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -17,7 +17,7 @@ HAVE_DYLIB=auto # Enable dynamic loading support HAVE_NETWORKING=auto # Enable networking features (recommended) HAVE_NETPLAY=auto # Enable netplay support (requires networking) HAVE_D3D9=yes # Disable Direct3D 9 support -HAVE_OPENGL=yes # Disable OpenGL support +HAVE_OPENGL=auto # Disable OpenGL support HAVE_GLES=no # Use GLESv2 instead of desktop GL HAVE_MALI_FBDEV=no # Enable Mali fbdev context support HAVE_VIVANTE_FBDEV=no # Enable Vivante fbdev context support From e2ea001cb47dbf3e904c09a1fc656f2e35025aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Wed, 17 Jun 2015 11:58:30 -0300 Subject: [PATCH 2/7] (qb) Improve OpenGL and Cg checks --- qb/config.libs.sh | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 3343bde8af..5aef8fb884 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -238,24 +238,35 @@ fi if [ "$HAVE_OPENGL" != 'no' ] && [ "$HAVE_GLES" != 'yes' ]; then if [ "$OS" = 'Darwin' ]; then - check_lib CG "-framework Cg" cgCreateContext - [ "$HAVE_CG" = 'yes' ] && CG_LIBS='-framework Cg' + check_header OPENGL "OpenGL/gl.h" + check_lib OPENGL "-framework OpenGL" elif [ "$OS" = 'Win32' ]; then - check_lib_cxx CG -lcg cgCreateContext - [ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lcg -lcgGL' - else - # On some distros, -lCg doesn't link against -lstdc++ it seems ... - check_lib_cxx CG -lCg cgCreateContext - check_lib OPENGL -lGL check_header OPENGL "GL/gl.h" - [ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lCg -lCgGL' + check_lib OPENGL -lopengl32 + else + check_header OPENGL "GL/gl.h" + check_lib OPENGL -lGL fi - # fix undefined variables - PKG_CONF_USED="$PKG_CONF_USED CG" -else - echo "Notice: Ignoring Cg. Desktop OpenGL is not enabled." - HAVE_CG='no' + if [ "$HAVE_OPENGL" = 'yes' ]; then + if [ "$OS" = 'Darwin' ]; then + check_lib CG "-framework Cg" cgCreateContext + [ "$HAVE_CG" = 'yes' ] && CG_LIBS='-framework Cg' + elif [ "$OS" = 'Win32' ]; then + check_lib_cxx CG -lcg cgCreateContext + [ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lcg -lcgGL' + else + # On some distros, -lCg doesn't link against -lstdc++ it seems ... + check_lib_cxx CG -lCg cgCreateContext + [ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lCg -lCgGL' + fi + + # fix undefined variables + PKG_CONF_USED="$PKG_CONF_USED CG" + else + echo "Notice: Ignoring Cg. Desktop OpenGL is not enabled." + HAVE_CG='no' + fi fi if [ "$OS" = 'Darwin' ]; then From 47b37c67e600a6e3f85476067e07cd60b7dc2e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Wed, 17 Jun 2015 12:43:58 -0300 Subject: [PATCH 3/7] (qb) Update --enable-opengl description --- qb/config.params.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qb/config.params.sh b/qb/config.params.sh index 3fe146a87d..d5610b1380 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -17,7 +17,7 @@ HAVE_DYLIB=auto # Enable dynamic loading support HAVE_NETWORKING=auto # Enable networking features (recommended) HAVE_NETPLAY=auto # Enable netplay support (requires networking) HAVE_D3D9=yes # Disable Direct3D 9 support -HAVE_OPENGL=auto # Disable OpenGL support +HAVE_OPENGL=auto # Enable OpenGL support HAVE_GLES=no # Use GLESv2 instead of desktop GL HAVE_MALI_FBDEV=no # Enable Mali fbdev context support HAVE_VIVANTE_FBDEV=no # Enable Vivante fbdev context support From f7e6b199ceeb457b207795639e0b3d93a133f3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Wed, 17 Jun 2015 13:04:51 -0300 Subject: [PATCH 4/7] (qb) Fix some option descriptions --- qb/config.params.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qb/config.params.sh b/qb/config.params.sh index d5610b1380..3870c3dd83 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -22,9 +22,9 @@ HAVE_GLES=no # Use GLESv2 instead of desktop GL HAVE_MALI_FBDEV=no # Enable Mali fbdev context support HAVE_VIVANTE_FBDEV=no # Enable Vivante fbdev context support HAVE_GLES3=no # Enable OpenGLES3 support -HAVE_X11=auto # Disable everything X11. +HAVE_X11=auto # Enable everything X11. HAVE_OMAP=no # Enable OMAP video support -HAVE_XINERAMA=auto # Disable Xinerama support. +HAVE_XINERAMA=auto # Enable Xinerama support. HAVE_KMS=auto # Enable KMS context support HAVE_EXYNOS=no # Enable Exynos video support HAVE_DISPMANX=no # Enable Dispmanx video support @@ -52,5 +52,5 @@ HAVE_SSE=no # Forcefully enable x86 SSE optimizations (SSE, SSE2) HAVE_FLOATHARD=no # Force hard float ABI (for ARM) HAVE_FLOATSOFTFP=no # Force soft float ABI (for ARM) HAVE_7ZIP=yes # Compile in 7z support -HAVE_PRESERVE_DYLIB=no # Disable dlclose() for Valgrind support +HAVE_PRESERVE_DYLIB=no # Enable dlclose() for Valgrind support HAVE_PARPORT=auto # Parallel port joypad support From c0da331aa25612318ee7c4bbfb34746631f00da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Wed, 17 Jun 2015 13:05:26 -0300 Subject: [PATCH 5/7] (qb) Align help text --- qb/qb.params.sh | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/qb/qb.params.sh b/qb/qb.params.sh index b23d91d7a9..012cab287e 100644 --- a/qb/qb.params.sh +++ b/qb/qb.params.sh @@ -1,3 +1,10 @@ +print_help_option() # $1 = option $@ = description +{ + _opt="$1" + shift 1 + printf " %-24s %s\n" "$_opt" "$@" +} + print_help() { cat << EOF ==================== @@ -6,32 +13,34 @@ print_help() Package: $PACKAGE_NAME General environment variables: -CC: C compiler -CFLAGS: C compiler flags -CXX: C++ compiler -CXXFLAGS: C++ compiler flags -LDFLAGS: Linker flags + CC: C compiler + CFLAGS: C compiler flags + CXX: C++ compiler + CXXFLAGS: C++ compiler flags + LDFLAGS: Linker flags General options: ---prefix=\$path: Install path prefix ---global-config-dir=\$path: System wide config file prefix ---host=HOST: cross-compile to build programs to run on HOST ---help: Show this help - -Custom options: EOF + print_help_option "--prefix=PATH" "Install path prefix" + print_help_option "--global-config-dir=PATH" "System wide config file prefix" + print_help_option "--host=HOST" "cross-compile to build programs to run on HOST" + print_help_option "--help" "Show this help" + + echo "" + echo "Custom options:" + while IFS='=#' read VAR VAL COMMENT; do VAR=$(echo "${VAR##HAVE_}" | tr '[A-Z]' '[a-z]') case "$VAL" in 'yes'*) - echo "--disable-$VAR: $COMMENT";; + print_help_option "--disable-$VAR" "$COMMENT";; 'no'*) - echo "--enable-$VAR: $COMMENT";; + print_help_option "--enable-$VAR" "$COMMENT";; 'auto'*) - echo "--enable-$VAR: $COMMENT" - echo "--disable-$VAR";; + print_help_option "--enable-$VAR" "$COMMENT" + print_help_option "--disable-$VAR";; *) - echo "--with-$VAR: $COMMENT";; + print_help_option "--with-$VAR" "$COMMENT";; esac done < 'qb/config.params.sh' } From 421dfc4b7cfb1796193586e2358bc2aed9a6fdce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Wed, 17 Jun 2015 13:19:39 -0300 Subject: [PATCH 6/7] (qb) Fix --enable-preserve_dylib description --- qb/config.params.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qb/config.params.sh b/qb/config.params.sh index 3870c3dd83..f01b734e2a 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -52,5 +52,5 @@ HAVE_SSE=no # Forcefully enable x86 SSE optimizations (SSE, SSE2) HAVE_FLOATHARD=no # Force hard float ABI (for ARM) HAVE_FLOATSOFTFP=no # Force soft float ABI (for ARM) HAVE_7ZIP=yes # Compile in 7z support -HAVE_PRESERVE_DYLIB=no # Enable dlclose() for Valgrind support +HAVE_PRESERVE_DYLIB=no # Disable dlclose() for Valgrind support HAVE_PARPORT=auto # Parallel port joypad support From d49c35395774631d6eb758ecdea8dbfd05ab2935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Wed, 17 Jun 2015 14:31:20 -0300 Subject: [PATCH 7/7] (qb) Fix comparison operator --- qb/qb.comp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qb/qb.comp.sh b/qb/qb.comp.sh index ce97fdf09c..fe97bdbedd 100644 --- a/qb/qb.comp.sh +++ b/qb/qb.comp.sh @@ -22,7 +22,7 @@ fi rm -f "$TEMP_C" "$TEMP_EXE" cc_status='does not work' -if [ "$cc_works" == '1' ]; then +if [ "$cc_works" = '1' ]; then cc_status='works' elif [ -z "$CC" ]; then cc_status='not found' @@ -30,7 +30,7 @@ fi echo "Checking for suitable working C compiler ... $CC $cc_status" -if [ "$cc_works" == '0' ] && [ "$USE_LANG_C" = 'yes' ]; then +if [ "$cc_works" = '0' ] && [ "$USE_LANG_C" = 'yes' ]; then echo "Error: Cannot proceed without a working C compiler." exit 1 fi