Looks like the following hack ought to fix the linking issue
(allowing bogofilter to link with our shared libraries and disabling
the dependency lookup in such a case, assuming the libraries have
correct needed).

Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/bogofilter/Makefile,v
retrieving revision 1.31
diff -u -p -r1.31 Makefile
--- Makefile    12 Jul 2019 20:47:25 -0000      1.31
+++ Makefile    10 Jul 2021 17:04:40 -0000
@@ -4,7 +4,7 @@ COMMENT =       bayesian spam filter
 
 DISTNAME =     bogofilter-1.2.4
 CATEGORIES =   mail
-REVISION =     2
+REVISION =     3
 
 MAINTAINER =   Marc Espie <[email protected]>
 
@@ -18,12 +18,14 @@ WANTLIB =           c iconv m
 LIB_DEPENDS =          converters/libiconv
 
 FLAVORS =              db4 sqlite3 qdbm
 FLAVOR ?=
 
 DB_ENGINE =            db
-CONFIGURE_STYLE =      gnu
+CONFIGURE_STYLE =      autoconf
+AUTOCONF_VERSION =     2.69
 CONFIGURE_ARGS =       --with-included-gsl \
-                       --with-database=${DB_ENGINE}
+                       --with-database=${DB_ENGINE} \
+                       --enable-rpath
 CONFIGURE_ENV =                CPPFLAGS="-I${LOCALBASE}/include/${DB_DIR}" \
                        LDFLAGS="-L${LOCALBASE}/lib/${DB_DIR}"
 
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure     1 Aug 2020 17:17:43 -0000       1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-configure,v 1.4 2020/08/01 17:17:43 naddy Exp $
-
-LLVM 9+ no longer pretends to be gcc 4.2.1
-
-Index: configure
---- configure.orig
-+++ configure
-@@ -5880,7 +5880,7 @@ gcc4=no
- if test "$GCC" = yes && test "$ICC" = no ; then
-     case `$CC -dumpversion 2>/dev/null` in
-       ""|2.*|3.*) ;;
--      4.*) gcc4=yes ;;
-+      *) gcc4=yes ;;
-     esac
-     case "$CC" in
-       *clang) gcc4=yes ;;
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac  10 Jul 2021 17:04:40 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: configure.ac
+--- configure.ac.orig
++++ configure.ac
+@@ -188,7 +188,7 @@ gcc4=no
+ if test "$GCC" = yes && test "$ICC" = no ; then
+     case `$CC -dumpversion 2>/dev/null` in
+       ""|2.*|3.*) ;;
+-      4.*) gcc4=yes ;;
++      *) gcc4=yes ;;
+     esac
+     case "$CC" in
+       *clang) gcc4=yes ;;
Index: patches/patch-m4_lib-link_m4
===================================================================
RCS file: patches/patch-m4_lib-link_m4
diff -N patches/patch-m4_lib-link_m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-m4_lib-link_m4        10 Jul 2021 17:04:40 -0000
@@ -0,0 +1,38 @@
+$OpenBSD$
+
+Index: m4/lib-link.m4
+--- m4/lib-link.m4.orig
++++ m4/lib-link.m4
+@@ -195,9 +195,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+           found_so=
+           found_a=
+           if test $use_additional = yes; then
+-            if test -n "$shlibext" && test -f 
"$additional_libdir/lib$name.$shlibext"; then
++            if test -n "$shlibext" && test -f 
"$additional_libdir/lib$name.$shlibext".*; then
+               found_dir="$additional_libdir"
+-              found_so="$additional_libdir/lib$name.$shlibext"
++              found_so="-L$additional_libdir -l$name"
+               if test -f "$additional_libdir/lib$name.la"; then
+                 found_la="$additional_libdir/lib$name.la"
+               fi
+@@ -217,9 +217,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+               case "$x" in
+                 -L*)
+                   dir=`echo "X$x" | sed -e 's/^X-L//'`
+-                  if test -n "$shlibext" && test -f 
"$dir/lib$name.$shlibext"; then
++                  if test -n "$shlibext" && test -f 
"$dir/lib$name.$shlibext".*; then
+                     found_dir="$dir"
+-                    found_so="$dir/lib$name.$shlibext"
++                    found_so="-L $dir -l$name"
+                     if test -f "$dir/lib$name.la"; then
+                       found_la="$dir/lib$name.la"
+                     fi
+@@ -372,7 +372,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+               fi
+             fi
+             dnl Look for dependencies.
+-            if test -n "$found_la"; then
++            if test -z "$found_so" && test -n "$found_la"; then
+               dnl Read the .la file. It defines the variables
+               dnl dlname, library_names, old_library, dependency_libs, 
current,
+               dnl age, revision, installed, dlopen, dlpreopen, libdir.

Reply via email to