1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-25 09:34:11 +00:00
freebsd-ports/graphics/lcms/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

48 lines
1.3 KiB
Makefile

# Created by: Mikhail Teterin <mi@aldan.algebra.com>
# $FreeBSD$
PORTNAME= lcms
PORTVERSION= 1.19
PORTREVISION= 6
PORTEPOCH= 1
CATEGORIES= graphics
MASTER_SITES= SF \
LOCAL/sunpoet
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Light Color Management System -- a color management library
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
OPTIONS_DEFINE= DOCS JPEGICC TIFFICC
OPTIONS_DEFAULT=JPEGICC TIFFICC
OPTIONS_SUB= yes
JPEGICC_DESC= Build color profile applier for JPEG
TIFFICC_DESC= Build color profile applier for TIFF
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
TEST_TARGET= check
USE_LDCONFIG= yes
USES= libtool localbase:ldflags pathfix
PORTDOCS= *
JPEGICC_CONFIGURE_WITH= jpeg
JPEGICC_USES= jpeg
TIFFICC_CONFIGURE_WITH= tiff
TIFFICC_LIB_DEPENDS= libtiff.so:graphics/tiff
post-patch:
@${REINPLACE_CMD} -e '/^SUBDIRS = / s| python samples||' ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e '/^#ifdef __sgi/ s|__sgi|__unix__|; /^#include "sgidefs.h"/d' ${WRKSRC}/include/icc34.h.in
@${REINPLACE_CMD} -e '/^testcms_LDFLAGS = / s|$$| -static|' ${WRKSRC}/testbed/Makefile.in
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}/
cd ${WRKSRC}/ && ${INSTALL_DATA} doc/LCMSAPI.TXT doc/TUTORIAL.TXT tifficc/tifficc.c \
jpegicc/jpegicc.c jpegicc/iccjpeg.c samples/wtpt.c samples/icctrans.c ${STAGEDIR}${DOCSDIR}/
.include <bsd.port.mk>