--- configure.orig	2024-09-14 10:54:42.236644000 -0400
+++ configure	2024-09-14 10:55:10.790162390 -0400
@@ -22046,6 +22046,10 @@

 BAT_DIR=
 if test x$support_bat = xyes; then
+   # by MacPorts patch
+   export QMAKE="$prefix/libexec/qt4/bin/qmake"
+   export PKG_CONFIG_PATH="$prefix/libexec/qt4/lib/pkgconfig"
+   # by MacPorts patch end
    abc=`$PKG_CONFIG QtGui`
    pkg=$?
    if test $pkg = 0; then
