Bug 78318

Summary: qsf can have different database backends, but build can't use them
Product: Ports & Packages Reporter: clemens fischer <ino-qc>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description clemens fischer 2005-03-02 16:30:14 UTC
mail/qsf (a bayesian-type message classifier) can be built with several
database backens.  the port correctly specifies "./configure" options for
them, which don't get proliferated into the gmake build.

Fix: 

in the working directory, i did

  "CFLAGS='-I/usr/local/include -L/usr/local/lib' ./configure --with-gdbm"

which fixed the problem for me.  maybe

MAKE_ENV+= "CFLAGS='-I/usr/local/include -L/usr/local/lib' ./configure --with-gdbm"
CONFIGURE_ENV+= "CFLAGS='-I/usr/local/include -L/usr/local/lib' ./configure --with-gdbm"

(adjust accordingly for other backends)

in the ports Makefile will be the fix?

  clemens
How-To-Repeat: 
just specify any other than the builtin database and watch how the resulting
binary links to, but doesn't actually use the libraries.
Comment 1 Volker Stolz freebsd_committer freebsd_triage 2005-03-03 09:19:54 UTC
Dear maintainer, please look into this issue!

Volker
Comment 2 Volker Stolz freebsd_committer freebsd_triage 2005-03-03 09:20:26 UTC
State Changed
From-To: open->feedback

Forwarded PR to maintainer
Comment 3 Volker Stolz freebsd_committer freebsd_triage 2005-03-03 16:55:13 UTC
Unluckily the maintainer requested to resign because of lack of time and  
we rely on interested 3rd parties for fixing ports. Could you please try  
to come up with a patch to this problem? Testing if your suggestion indeed  
works might be a good start.

Cheers,
   Volker
Comment 4 clemens fischer 2005-03-07 15:18:34 UTC
* 2005-03-03 Volker Stolz:

> Could you please try to come up with a patch to this problem? Testing if
> your suggestion indeed works might be a good start.

i tried, tried again, and again, now i don't know what to do:

this is what i did to the ports Makefile:

+# -ino: 20050306-1531
 .if defined(WITH_GDBM)
 LIB_DEPENDS+=	gdbm.3:${PORTSDIR}/databases/gdbm
-CONFIGURE_ARGS+=	--with-gdbm=${LOCALBASE}
+CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ARGS+= --with-gdbm=${LOCALBASE} \
+	--exec-prefix=${LOCALBASE} \
+	--with-internal-db=NO --without-internal-db
+#CONFIGURE_ENV+=  CFLAGS="-I/usr/local/include -L/usr/local/lib"
+CONFIGURE_ENV+=  CPPFLAGS="-I${LOCALBASE}/include" \
+	LDFLAGS="-L${LOCALBASE}/lib -lgdbm" \
+	LIBS="-L${LOCALBASE}/lib -lgdbm"
+#MAKE_ENV+=  CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
+#CONFIGURE_ENV+=  CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
 .endif
 
NONE of these work.  workaround:  remember that it is possible to build by
going to the working directory and:

CFLAGS='-I/usr/local/include -L/usr/local/lib' ./configure --with-gdbm

how come adding this to "$CONFIGURE_ENV" doesn't work?

  clemens
Comment 5 Sergey Matveychuk freebsd_committer freebsd_triage 2005-04-13 19:39:57 UTC
State Changed
From-To: feedback->closed

Fixed, thanks!