Bug 123327 - Port fix: graphics/libcaca - CONFIGURE_ENV incorrectly set
Summary: Port fix: graphics/libcaca - CONFIGURE_ENV incorrectly set
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: pav
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-02 11:00 UTC by ganael.laplanche
Modified: 2008-06-19 20:50 UTC (History)
0 users

See Also:


Attachments
file.diff (604 bytes, patch)
2008-05-02 11:00 UTC, ganael.laplanche
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ganael.laplanche 2008-05-02 11:00:11 UTC
Hi,

Revision 1.22 of the port's Makefile of libcaca introduces the use of USE_EFL
instead of LIB_DEPENDS. Unfortunately, bsd.efl.mk overrides CONFIGURE_ENV using
LDFLAGS, but the port's Makefile does not define this variable. This leads to
an incorrect CONFIGURE_ENV, as you can see :

% pwd
/usr/ports/graphics/libcaca
% make -V CONFIGURE_ENV
CPPFLAGS="-I/usr/local/include"  LDFLAGS="-L/usr/local/lib -lm -lncurses" SHELL=/bin/sh CONFIG_SHELL=/bin/sh CPPFLAGS="-I/usr/local/include"  CFLAGS="-I/usr/local/include -O -pipe
 -march=nocona"  LDFLAGS="-L/usr/local/lib "   LIBTOOL=/usr/local/bin/libtool LIBTOOLIZE=/usr/local/bin/libtoolize LIBTOOL_M4=/usr/local/share/aclocal/libtool.m4     lt_cv_sys_max
_cmd_len=262144

LDFLAGS appears twice with a wrong value on the second time, so the port is no
more linked against -lm and -lncurses.

The attached patch uses LDFLAGS and CPPFLAGS variables to be bsd.efl.mk-friendly.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2008-05-02 11:00:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-multimedia

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 pav freebsd_committer 2008-06-19 10:56:32 UTC
State Changed
From-To: open->feedback

Why is this patch needed? It builds without the patch, and manages to link to 
ncursesw. 


Comment 3 pav freebsd_committer 2008-06-19 10:56:32 UTC
Responsible Changed
From-To: freebsd-multimedia->pav

Track
Comment 4 ganael.laplanche 2008-06-19 12:47:32 UTC
On Thu, 19 Jun 2008 10:04:05 GMT, pav wrote

Hi Pav,

> Why is this patch needed? It builds without the patch, and manages to 
> link to ncursesw.

Without this patch, special LDFLAGS are simply overridden because appended a
second time to CONFIGURE_ENV by bsd.efl.mk :

# In bsd.efl.mk :
#[...]
#
# Initialize configure enviropment
#
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
                CFLAGS="-I${LOCALBASE}/include ${CFLAGS}" \
                LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS}"
#[...]

This leads to loosing '-lm -lncurses' in LDFLAGS. The solution is to set those
two flags in ${LDFLAGS} rather than directly in CONFIGURE_ENV.

make -V CONFIGURE_ENV shows this :

CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib -lm -lncurses" [...]
LDFLAGS="-L/usr/local/lib " [...]

(Note that there is the same problem with CPPFLAGS and CFLAGS.)

You can reproduce this bug by building vlock with CACASAVER option set to ON and
try to launch 'vlock -n -t 5 caca' after having added your account to group
vlock:*:129:. It fails to load the screen saver, unless this patch is used...

Best regards,

Ganaël LAPLANCHE
ganael.laplanche@martymac.com
http://www.martymac.com
Comment 5 pav freebsd_committer 2008-06-19 20:30:26 UTC
Ganael LAPLANCHE pí¹e v èt 19. 06. 2008 v 13:47 +0200:

> You can reproduce this bug by building vlock with CACASAVER option set to ON and
> try to launch 'vlock -n -t 5 caca' after having added your account to group
> vlock:*:129:. It fails to load the screen saver, unless this patch is used...


This is a bug with vlock port. Delete -lncurses and add -lm to
modules/Makefile line 18 (caca.so: ...) and it will work.
No modification to libcaca port necessary.

I will do it.

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>
Quantum physics was developed in the 1930's, as a result of a bet
between Albert Einstein and Niels Bohr, to see who could come up with
the most ridiculous theory and still have it published.
Comment 6 pav freebsd_committer 2008-06-19 20:46:02 UTC
State Changed
From-To: feedback->closed

Should be fixed now.
Comment 7 dfilter freebsd_committer 2008-06-19 20:46:19 UTC
pav         2008-06-19 19:46:13 UTC

  FreeBSD ports repository

  Modified files:
    graphics/libcaca     Makefile 
  Log:
  - Remove CONFIGURE_ENV definition, they are shadowed by EFL stuff, and in fact
    not needed at all
  
  PR:             ports/123327
  
  Revision  Changes    Path
  1.24      +0 -2      ports/graphics/libcaca/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"