pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/50202: graphics/MesaLib can be upgraded to 10.6.5 and use libdevq on FreeBSD / DragonFly



The following reply was made to PR pkg/50202; it has been noted by GNATS.

From: David Shao <davshao%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/50202: graphics/MesaLib can be upgraded to 10.6.5 and use
 libdevq on FreeBSD / DragonFly
Date: Sat, 5 Sep 2015 19:19:32 -0700

 It is possible to not change the pkg-config name for libdevq and keep
 the pkg-config .pc file as libdevq-1.0.pc.  Hence the
 patches/patch-configure for MesaLib to have libdevq support becomes:
 
 $NetBSD$
 
 --- configure.orig    2015-08-22 09:21:59.000000000 +0000
 +++ configure
 @@ -858,6 +858,8 @@ GLPROTO_LIBS
  GLPROTO_CFLAGS
  XLIBGL_LIBS
  XLIBGL_CFLAGS
 +LIBDEVQ_LIBS
 +LIBDEVQ_CFLAGS
  LIBUDEV_LIBS
  LIBUDEV_CFLAGS
  MESA_LLVM
 @@ -1154,6 +1156,8 @@ LIBDRM_CFLAGS
  LIBDRM_LIBS
  LIBUDEV_CFLAGS
  LIBUDEV_LIBS
 +LIBDEVQ_CFLAGS
 +LIBDEVQ_LIBS
  XLIBGL_CFLAGS
  XLIBGL_LIBS
  GLPROTO_CFLAGS
 @@ -1957,6 +1961,10 @@ Some influential environment variables:
                C compiler flags for LIBUDEV, overriding pkg-config
    LIBUDEV_LIBS
                linker flags for LIBUDEV, overriding pkg-config
 +  LIBDEVQ_CFLAGS
 +              C compiler flags for LIBDEVQ, overriding pkg-config
 +  LIBDEVQ_LIBS
 +              linker flags for LIBDEVQ, overriding pkg-config
    XLIBGL_CFLAGS
                C compiler flags for XLIBGL, overriding pkg-config
    XLIBGL_LIBS linker flags for XLIBGL, overriding pkg-config
 @@ -5231,6 +5239,7 @@ DRI2PROTO_REQUIRED=2.6
  DRI3PROTO_REQUIRED=1.0
  PRESENTPROTO_REQUIRED=1.0
  LIBUDEV_REQUIRED=151
 +LIBDEVQ_REQUIRED=0.0.2
  GLPROTO_REQUIRED=1.4.14
  LIBOMXIL_BELLAGIO_REQUIRED=0.0
  LIBVA_REQUIRED=0.35.0
 @@ -19694,7 +19703,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
  #include <smmintrin.h>
  int main () {
      __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
 -    c = _mm_max_epu32(a, b);
 +    c = _mm_max_epu32(a, b); asm volatile ("movntdqa (%esi),%xmm3\n");
      return 0;
  }
  _ACEOF
 @@ -20466,7 +20475,7 @@ _ACEOF
  $as_echo_n "checking if more special flags are required for
 pthreads... " >&6; }
          flag=no
          case ${host_os} in
 -            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
 +            aix* | freebsd* | dragonfly* | darwin*) flag="-D_THREAD_SAFE";;
              osf* | hpux*) flag="-D_REENTRANT";;
              solaris*)
              if test "$GCC" = "yes"; then
 @@ -21269,6 +21278,7 @@ linux*)
  esac
 
 
 +
  pkg_failed=no
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUDEV" >&5
  $as_echo_n "checking for LIBUDEV... " >&6; }
 @@ -21340,6 +21350,82 @@ $as_echo "yes" >&6; }
      have_libudev=yes
  fi
 
 +
 +
 +# Check for libdevq
 +
 +pkg_failed=no
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDEVQ" >&5
 +$as_echo_n "checking for LIBDEVQ... " >&6; }
 +if test -n "$LIBDEVQ_CFLAGS"; then
 +    pkg_cv_LIBDEVQ_CFLAGS="$LIBDEVQ_CFLAGS"
 + elif test -n "$PKG_CONFIG"; then
 +    if test -n "$PKG_CONFIG" && \
 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
 --print-errors \"libdevq-1.0 >= \$LIBDEVQ_REQUIRED\""; } >&5
 +  ($PKG_CONFIG --exists --print-errors "libdevq-1.0 >= $LIBDEVQ_REQUIRED") 2>&5
 +  ac_status=$?
 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
 +  test $ac_status = 0; }; then
 +  pkg_cv_LIBDEVQ_CFLAGS=`$PKG_CONFIG --cflags "libdevq-1.0 >=
 $LIBDEVQ_REQUIRED" 2>/dev/null`
 +              test "x$?" != "x0" && pkg_failed=yes
 +else
 +  pkg_failed=yes
 +fi
 + else
 +    pkg_failed=untried
 +fi
 +if test -n "$LIBDEVQ_LIBS"; then
 +    pkg_cv_LIBDEVQ_LIBS="$LIBDEVQ_LIBS"
 + elif test -n "$PKG_CONFIG"; then
 +    if test -n "$PKG_CONFIG" && \
 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
 --print-errors \"libdevq-1.0 >= \$LIBDEVQ_REQUIRED\""; } >&5
 +  ($PKG_CONFIG --exists --print-errors "libdevq-1.0 >= $LIBDEVQ_REQUIRED") 2>&5
 +  ac_status=$?
 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
 +  test $ac_status = 0; }; then
 +  pkg_cv_LIBDEVQ_LIBS=`$PKG_CONFIG --libs "libdevq-1.0 >=
 $LIBDEVQ_REQUIRED" 2>/dev/null`
 +              test "x$?" != "x0" && pkg_failed=yes
 +else
 +  pkg_failed=yes
 +fi
 + else
 +    pkg_failed=untried
 +fi
 +
 +
 +
 +if test $pkg_failed = yes; then
 +       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
 +
 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 +        _pkg_short_errors_supported=yes
 +else
 +        _pkg_short_errors_supported=no
 +fi
 +        if test $_pkg_short_errors_supported = yes; then
 +            LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --short-errors
 --print-errors --cflags --libs "libdevq-1.0 >= $LIBDEVQ_REQUIRED"
 2>&1`
 +        else
 +            LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags
 --libs "libdevq-1.0 >= $LIBDEVQ_REQUIRED" 2>&1`
 +        fi
 +    # Put the nasty error message in config.log where it belongs
 +    echo "$LIBDEVQ_PKG_ERRORS" >&5
 +
 +    have_libdevq=no
 +elif test $pkg_failed = untried; then
 +         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
 +    have_libdevq=no
 +else
 +    LIBDEVQ_CFLAGS=$pkg_cv_LIBDEVQ_CFLAGS
 +    LIBDEVQ_LIBS=$pkg_cv_LIBDEVQ_LIBS
 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
 +    have_libdevq=yes
 +fi
 +
 +
 +
  # Check whether --enable-sysfs was given.
  if test "${enable_sysfs+set}" = set; then :
    enableval=$enable_sysfs; have_sysfs="$enableval"
 @@ -22055,6 +22141,10 @@ if test "$have_libudev" = yes; then
      DEFINES="$DEFINES -DHAVE_LIBUDEV"
      have_pci_id=yes
  fi
 +if test "$have_libdevq" = yes; then
 +    DEFINES="$DEFINES -DHAVE_LIBDEVQ"
 +    have_pci_id=yes
 +fi
 
  if test "$have_sysfs" = yes; then
      DEFINES="$DEFINES -DHAVE_SYSFS"
 @@ -23002,6 +23092,8 @@ fi
 
  if test "x$need_pci_id$have_libudev" = xyesyes; then
      GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
 +elif test "x$need_libdevq" = xyes; then
 +    GBM_PC_REQ_PRIV="libdevq-1.0 >= $LIBDEVQ_REQUIRED"
  else
      GBM_PC_REQ_PRIV=""
  fi
 @@ -24554,9 +24646,6 @@ fi
                  CLANG_LIBDIR=${LLVM_LIBDIR}
              fi
              CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
 -            if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then :
 -  as_fn_error $? "Could not find clang internal header stddef.h in
 $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct
 path to the clang libraries." "$LINENO" 5
 -fi
          fi
      else
          MESA_LLVM=0
 


Home | Main Index | Thread Index | Old Index