diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2012-10-07 23:08:52 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2012-10-07 23:08:52 +0800 |
commit | 8e086ca0ee609683d944fef100e3cb4772a218ea (patch) | |
tree | bed7a719f750f3956d6a2d5053f69b206a55430a /graphics | |
parent | a198fb16cd52844483838ac2ce35f1986015b2ca (diff) | |
download | freebsd-ports-graphics-8e086ca0ee609683d944fef100e3cb4772a218ea.tar.gz freebsd-ports-graphics-8e086ca0ee609683d944fef100e3cb4772a218ea.tar.zst freebsd-ports-graphics-8e086ca0ee609683d944fef100e3cb4772a218ea.zip |
- Convert to new options framework
- Fix CONFIGURE_ARGS
- Cleanup Makefile
- Cosmetic change
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/lcms/Makefile | 94 |
1 files changed, 40 insertions, 54 deletions
diff --git a/graphics/lcms/Makefile b/graphics/lcms/Makefile index 83ddcb7f06e..64d20e623c8 100644 --- a/graphics/lcms/Makefile +++ b/graphics/lcms/Makefile @@ -1,85 +1,71 @@ -# New ports collection makefile for: lcms -# Date created: October 30, 2000 -# Whom: Mikhail Teterin <mi@aldan.algebra.com> -# +# Created by: Mikhail Teterin <mi@aldan.algebra.com> # $FreeBSD$ -# PORTNAME= lcms PORTVERSION= 1.19 PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= graphics -MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/1.19 \ +MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION} \ http://www.littlecms.com/ MAINTAINER= sunpoet@FreeBSD.org COMMENT= Light Color Management System -- a color management library -USE_GNOME= gnomehack lthack -GNU_CONFIGURE= yes +OPTIONS_DEFINE= DOCS JPEGICC TIFFICC +JPEGICC_DESC= Build color profile applier for JPEG +TIFFICC_DESC= Build color profile applier for TIFF + CPPFLAGS+= -I${LOCALBASE}/include +GNU_CONFIGURE= yes LDFLAGS+= -L${LOCALBASE}/lib -CFLAGS+= -I${LOCALBASE}/include +USE_GNOME= gnomehack lthack USE_LDCONFIG= yes -WRKSRC= ${WRKDIR}/lcms-1.19 - -OPTIONS= TIFFICC "Build color profile applier for tiff" off \ - JPEGICC "Build color profile applier for JPEG" off -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> -.if defined(WITH_TIFFICC) -LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff -PLIST_SUB+= TIFFICC="" -MAN1+= tifficc.1 +.if ${PORT_OPTIONS:MJPEGICC} +LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg +CONFIGURE_ARGS+=--with-jpeg=${LOCALBASE} +MAN1+= jpegicc.1 +PLIST_SUB+= JPEGICC="" .else -CONFIGURE_ARGS= --without-tiff -PLIST_SUB+= TIFFICC="@comment " +CONFIGURE_ARGS+=--without-jpeg +PLIST_SUB+= JPEGICC="@comment " .endif -.if defined(WITH_JPEGICC) -LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg -PLIST_SUB+= JPEGICC="" -MAN1+= jpegicc.1 +.if ${PORT_OPTIONS:MTIFFICC} +LIB_DEPENDS+= tiff:${PORTSDIR}/graphics/tiff +CONFIGURE_ARGS= --with-tiff=${LOCALBASE} +MAN1+= tifficc.1 +PLIST_SUB+= TIFFICC="" .else -CONFIGURE_ARGS= --without-jpeg -PLIST_SUB+= JPEGICC="@comment " +CONFIGURE_ARGS+=--without-tiff +PLIST_SUB+= TIFFICC="@comment " .endif post-patch: - @${REINPLACE_CMD} -e \ - 's|^SUBDIRS =.*$$|SUBDIRS = src include|g' ${WRKSRC}/Makefile.in - @${REINPLACE_CMD} -e \ - 's|-O3||g' ${WRKSRC}/src/Makefile.in + @${REINPLACE_CMD} -e '/^SUBDIRS = / s| python samples||' ${WRKSRC}/Makefile.in + @${REINPLACE_CMD} -e 's|^testcms_LDFLAGS = .*$$|& -static|' ${WRKSRC}/testbed/Makefile.in +.if empty(PORT_OPTIONS:MJPEGICC) + @${REINPLACE_CMD} -e '/^SUBDIRS = / s| jpegicc||' ${WRKSRC}/Makefile.in +.endif +.if empty(PORT_OPTIONS:MTIFFICC) + @${REINPLACE_CMD} -e '/^SUBDIRS = / s| tifficc||' ${WRKSRC}/Makefile.in +.endif -# -# Get rid of .la and static library files -# post-configure: - @${REINPLACE_CMD} -E -e \ - '/Install the pseudo-library/,/staticlibs=/s,^,#,' ${WRKSRC}/libtool +# Get rid of .la and static library files + @${REINPLACE_CMD} -E -e '/Install the pseudo-library/,/staticlibs=/s,^,#,' ${WRKSRC}/libtool post-install: -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} -.for file in doc/LCMSAPI.TXT doc/TUTORIAL.TXT tifficc/tifficc.c \ - jpegicc/jpegicc.c jpegicc/iccjpeg.c samples/wtpt.c samples/icctrans.c - ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} -.endfor -.endif - -.if defined(WITH_TIFFICC) - @(cd ${WRKSRC}/tifficc && ${SETENV} ${MAKE_ENV} ${MAKE} \ - ${MAKE_FLAGS} Makefile all install) -.endif - -.if defined(WITH_JPEGICC) - @(cd ${WRKSRC}/jpegicc && ${SETENV} ${MAKE_ENV} ${MAKE} \ - ${MAKE_FLAGS} Makefile all install) +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${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 ${DOCSDIR}/ .endif -post-build test: - cd ${WRKSRC}/testbed && ${SETENV} ${MAKE_ENV} ${MAKE} check +regression-test test: build + cd ${WRKSRC}/testbed/ && ${SETENV} ${MAKE_ENV} ${MAKE} check -.include <bsd.port.post.mk> +.include <bsd.port.mk> |