freebsd-ports/graphics/libprojectm/Makefile
Tijl Coosemans 1ee4da6dd1 Let USES=localbase add -L${LOCALBASE}/lib to LIBS instead of LDFLAGS.
USES=localbase:ldflags can be used to set LDFLAGS.  Normally LDFLAGS
appears too early on the command line causing some ports to link with
their own libraries in LOCALBASE (if installed) instead of WRKSRC.

Also make use of _USES_POST so -L${LOCALBASE}/lib is added as late as
possible after anything a port Makefile might set.  Use _USES_POST
instead of .include in libedit.mk and libarchive.mk so things like
'USES=libedit localbase:ldflags' work correctly.

Fix some issues with LIBS in some ports.

Switch ports that don't support LIBS to localbase:ldflags.

PR:		212987
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2016-09-30 19:24:30 +00:00

36 lines
1.1 KiB
Makefile

# $FreeBSD$
PORTNAME= libprojectM
PORTVERSION= 2.0.1
PORTREVISION= 3
CATEGORIES= graphics audio
MASTER_SITES= SF/${PORTNAME:tl:S/lib//}/${PORTVERSION}/
DISTNAME= ${PORTNAME:S/lib//}-${DISTVERSION}-Source
MAINTAINER= ports@FreeBSD.org
COMMENT= Awesome music visualiser
LICENSE= LGPL21+
LIB_DEPENDS= libftgl.so:graphics/ftgl \
libfreetype.so:print/freetype2
USES= cmake localbase:ldflags
CMAKE_ARGS= -DUSE_OPENMP=OFF # openmp breaks build on 11.x
USE_GL= glew
USE_LDCONFIG= yes
post-patch:
# Install config.inp.sample instead of overwriting user's file.
# Needs to be specific enough not to rename config.inp.in too!
# Also correct pkgconfig destination dir -- fiddly
@${REINPLACE_CMD} -e 's/config.inp\([\" ]\)/config.inp.sample\1/' \
-e 's#\(/lib\)[^}]*}\(/pkgconfig\)#\1data\2#' \
${WRKSRC}/CMakeLists.txt
@${REINPLACE_CMD} -e 's#/usr/X11R6#${LOCALBASE}#' \
${WRKSRC}/cmake/FindFreetype2.cmake
# Fix empty libdir in pkgconfig file to stop vlc complaining
@${REINPLACE_CMD} -e 's#^\(libdir=\).*#\1${PREFIX}/lib#' \
${WRKSRC}/${PORTNAME}.pc.in
.include <bsd.port.mk>