On Tue, Apr 23, 2013 at 05:32:55PM +0100, Stuart Henderson wrote:
> On 2013/04/23 18:23, Juan Francisco Cantero Hurtado wrote:
> > The file plist.c requires the header "plist/plist.h" from
> > WRKSRC/include. The port has "LOCALBASE/include" in CFLAGS, so gcc picks
> > "plist/plist.h" from /usr/local.
> > 
> > The patch bellow fixes the order of the include dirs.
> 
> Don't hardcode /usr/local, use ${LOCALBASE} or ${PREFIX} as appropriate
> (in this case, localbase, because it refers to "already installed packages"
> rather than "where this package will be installed")

I know. It didn't work. I only see the new flag "-I/include" in the
output of the compilation.

> 
> >  DISTNAME =         libplist-${VERSION}
> > +REVISION =         0
> 
> probably not strictly necessary, but doesn't hurt.
> 
> > -CONFIGURE_ARGS =   -DCMAKE_C_FLAGS="${CFLAGS} -I${LOCALBASE}/include 
> > -pthread"
> > +CONFIGURE_ARGS =   -DCMAKE_C_FLAGS="${CFLAGS} -pthread"
> 
> mid update so can't check now, but can you just use this instead?
> 
> CONFIGURE_ARGS =      -DCMAKE_C_FLAGS="${CFLAGS} -I. -I${LOCALBASE}/include 
> -pthread"
> 

Yep. New patch.

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/libplist/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- Makefile    12 Apr 2013 17:12:55 -0000      1.6
+++ Makefile    23 Apr 2013 17:22:58 -0000
@@ -39,6 +39,6 @@ WANTLIB +=            glib-2.0 m stdc++ xml2
 WANTLIB-main +=        ${WANTLIB} c pthread
 WANTLIB-python +=      ${WANTLIB} plist plist++ python${MODPY_VERSION}
 
-CONFIGURE_ARGS =       -DCMAKE_C_FLAGS="${CFLAGS} -I${LOCALBASE}/include 
-pthread"
+CONFIGURE_ARGS =       -DCMAKE_C_FLAGS="${CFLAGS} -I. -I${LOCALBASE}/include 
-pthread"
 
 .include <bsd.port.mk>

-- 
Juan Francisco Cantero Hurtado http://juanfra.info

Reply via email to