gui-libs/cubegui: fix QT build

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-06-23 04:22:36 +02:00
parent cf593433d9
commit 8a5b37df3b
3 changed files with 309 additions and 42 deletions

View File

@@ -3,7 +3,7 @@
EAPI=8
inherit autotools bash-completion-r1 qmake-utils toolchain-funcs
inherit bash-completion-r1 qmake-utils toolchain-funcs
DESCRIPTION="CUBE Uniform Behavioral Encoding GUI"
HOMEPAGE="https://www.scalasca.org/scalasca/software/cube-4.x"
@@ -31,15 +31,9 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="app-doc/doxygen[dot]"
PATCHES=( "${FILESDIR}/${P}-autotroll.patch" )
src_prepare() {
default
pushd build-frontend || die
eautoreconf
popd || die
eautoreconf
}
PATCHES=(
"${FILESDIR}/${P}-custom-compiler.patch"
)
src_configure() {
tc-export CC CXX FC F77 CPP AR
@@ -106,6 +100,7 @@ src_configure() {
--with-plugin-treeitem-marker
--with-plugin-vampir
--with-qt="$(qt5_get_bindir)"
--with-qt-specs="$(qmake5 -query QMAKE_SPEC || die)"
$(use_enable debug)
$(use_with concurrent)

View File

@@ -1,32 +0,0 @@
--- a/build-config/m4/autotroll.m4
+++ b/build-config/m4/autotroll.m4
@@ -742,29 +742,6 @@
# | sed -e "s,-lQt,-L${QT_PATH}/../lib -lQt,g"`
])
- echo "Adjust Qt libraries list to the cannonical one"
- # replace list of .so files by the -l libraries
- AS_IF([ test "x$QT_PATH" != "x" ],
- [
- LIBPATH=`echo $QT_PATH | sed "s,/bin,,g"`"/lib"
- ],
- [ # in case of standard installation -> path to the libraries is encoded in the path to .so libraries
- for i in $at_cv_env_QT_LIBS; do
- _LIBPATH=`echo $i | grep '.so'`
- AS_IF([ test "x$_LIBPATH" != "x" ], # test if the path has been line .so , other wise try the next one... (for the case of list -l... libraries)
- [
- LIBPATH=$(dirname $_LIBPATH)
- break
- ])
-
- done
- ])
-AS_IF([ test "x$LIBPATH" != "x" ], # perform correction only if one has found .so libraries instead of -lXXXX
-[
- at_cv_env_QT_LIBS="-L$LIBPATH "`echo $at_cv_env_QT_LIBS | sed "s,.so , ,g;s,.a , ,g;s,$LIBPATH/lib,-l,g;s,$(readlink -m $LIBPATH)/lib,-l,g"`
- echo "Fixed libraries are: $at_cv_env_QT_LIBS"
-])
- AC_SUBST([QT_LIBS], [$at_cv_env_QT_LIBS])
# Find the Compiler of Qt (Should have been named )

View File

@@ -0,0 +1,304 @@
--- a/configure
+++ b/configure
@@ -5042,6 +5042,7 @@
fi
+
if test ! -n "$ac_scorep_platform_data_provided" || \
test "x${ac_scorep_platform_data_provided}" = "xno"; then :
@@ -6528,17 +6529,137 @@
QT_CXX=`basename $at_cv_env_QT_CXX`
- case $QT_CXX in #(
- "g++") :
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler vendor" >&5
+$as_echo_n "checking for C++ compiler vendor... " >&6; }
+if ${ax_cv_cxx_compiler_vendor+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ vendors="
+ intel: __ICC,__ECC,__INTEL_COMPILER
+ ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__,__ibmxl__clang__,__ibmxl__
+ pathscale: __PATHCC__,__PATHSCALE__
+ clang: __clang__
+ cray: _CRAYC,_CRAYFTN
+ fujitsu: __FUJITSU
+ sdcc: SDCC,__SDCC
+ sx: _SX
+ portland: __PGI
+ flang: __flang__,__PGLLVM__
+ gnu: __GNUC__
+ sun: __SUNPRO_C,__SUNPRO_CC,__SUNPRO_F90,__SUNPRO_F95
+ hp: __HP_cc,__HP_aCC
+ dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+ borland: __BORLANDC__,__CODEGEARC__,__TURBOC__
+ comeau: __COMO__
+ kai: __KCC
+ lcc: __LCC__
+ sgi: __sgi,sgi
+ microsoft: _MSC_VER
+ metrowerks: __MWERKS__
+ watcom: __WATCOMC__
+ tcc: __TINYC__
+ unknown: UNKNOWN
+ "
+ for ventest in $vendors; do
+ case $ventest in #(
+ *:)
+ vendor=${ventest%:*}
+ continue
+ ;; #(
+ *)
+ vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")"
+ ;;
+ esac
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !($vencpp)
+ thisisanerror;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+
+ ax_cv_cxx_compiler_vendor=$vendor
+
+ flang_variants="classic: __PGLLVM__"
+ portland_variants="llvm: __PGLLVM__"
+ eval variants=\"\$${ax_cv_cxx_compiler_vendor}_variants : NONE\"
+ for vartest in $variants; do
+ case $vartest in #(
+ *:)
+ variant=${vartest%:*};
+ continue
+ ;; #(
+ *)
+ varcpp="defined("`echo $vartest | sed 's/,/) && defined(/g'`")"
+ ;;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !($varcpp)
+ thisisanerror;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ as_fn_append ax_cv_cxx_compiler_vendor ${variant:+/$variant}
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compiler_vendor" >&5
+case "$ax_cv_cxx_compiler_vendor" in #(
+ yes|ok|yes[\ ,]*) :
+ $as_echo "${as__grn}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;; #(
+ no|failed|unsupported|no[\ ,]*) :
+ $as_echo "${as__red}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;; #(
+ *) :
+ $as_echo "${as__blu}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;;
+esac; }
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ case ${ax_cv_cxx_compiler_vendor%/*} in #(
+ gnu) :
qt_compiler="gcc" ;; #(
- "xlC") :
- qt_compiler="ibm" ;; #(
- "clang++") :
+ clang) :
qt_compiler="clang" ;; #(
- "icpc") :
+ intel) :
qt_compiler="intel" ;; #(
- "openCC") :
- qt_compiler="open64" ;; #(
*) :
as_fn_error $? "Qt compiler \"${QT_CXX}\" is not supported by --with-frontend-compiler-suite." "$LINENO" 5 ;;
esac
--- a/build-frontend/configure
+++ b/build-frontend/configure
@@ -22090,17 +22090,137 @@
QT_CXX=`basename $at_cv_env_QT_CXX`
- case $QT_CXX in #(
- "g++") :
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler vendor" >&5
+$as_echo_n "checking for C++ compiler vendor... " >&6; }
+if ${ax_cv_cxx_compiler_vendor+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ vendors="
+ intel: __ICC,__ECC,__INTEL_COMPILER
+ ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__,__ibmxl__clang__,__ibmxl__
+ pathscale: __PATHCC__,__PATHSCALE__
+ clang: __clang__
+ cray: _CRAYC,_CRAYFTN
+ fujitsu: __FUJITSU
+ sdcc: SDCC,__SDCC
+ sx: _SX
+ portland: __PGI
+ flang: __flang__,__PGLLVM__
+ gnu: __GNUC__
+ sun: __SUNPRO_C,__SUNPRO_CC,__SUNPRO_F90,__SUNPRO_F95
+ hp: __HP_cc,__HP_aCC
+ dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+ borland: __BORLANDC__,__CODEGEARC__,__TURBOC__
+ comeau: __COMO__
+ kai: __KCC
+ lcc: __LCC__
+ sgi: __sgi,sgi
+ microsoft: _MSC_VER
+ metrowerks: __MWERKS__
+ watcom: __WATCOMC__
+ tcc: __TINYC__
+ unknown: UNKNOWN
+ "
+ for ventest in $vendors; do
+ case $ventest in #(
+ *:)
+ vendor=${ventest%:*}
+ continue
+ ;; #(
+ *)
+ vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")"
+ ;;
+ esac
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !($vencpp)
+ thisisanerror;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+
+ ax_cv_cxx_compiler_vendor=$vendor
+
+ flang_variants="classic: __PGLLVM__"
+ portland_variants="llvm: __PGLLVM__"
+ eval variants=\"\$${ax_cv_cxx_compiler_vendor}_variants : NONE\"
+ for vartest in $variants; do
+ case $vartest in #(
+ *:)
+ variant=${vartest%:*};
+ continue
+ ;; #(
+ *)
+ varcpp="defined("`echo $vartest | sed 's/,/) && defined(/g'`")"
+ ;;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !($varcpp)
+ thisisanerror;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ as_fn_append ax_cv_cxx_compiler_vendor ${variant:+/$variant}
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compiler_vendor" >&5
+case "$ax_cv_cxx_compiler_vendor" in #(
+ yes|ok|yes[\ ,]*) :
+ $as_echo "${as__grn}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;; #(
+ no|failed|unsupported|no[\ ,]*) :
+ $as_echo "${as__red}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;; #(
+ *) :
+ $as_echo "${as__blu}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;;
+esac; }
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ case ${ax_cv_cxx_compiler_vendor%/*} in #(
+ gnu) :
qt_compiler="gcc" ;; #(
- "xlC") :
- qt_compiler="ibm" ;; #(
- "clang++") :
+ clang) :
qt_compiler="clang" ;; #(
- "icpc") :
+ intel) :
qt_compiler="intel" ;; #(
- "openCC") :
- qt_compiler="open64" ;; #(
*) :
as_fn_error $? "Qt compiler \"${QT_CXX}\" is not supported by --with-frontend-compiler-suite." "$LINENO" 5 ;;
esac