svn commit: r305488 - head/graphics/lcms
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Sun Oct 7 15:08:53 UTC 2012
Author: sunpoet
Date: Sun Oct 7 15:08:52 2012
New Revision: 305488
URL: http://svn.freebsd.org/changeset/ports/305488
Log:
- Convert to new options framework
- Fix CONFIGURE_ARGS
- Cleanup Makefile
- Cosmetic change
Modified:
head/graphics/lcms/Makefile (contents, props changed)
Modified: head/graphics/lcms/Makefile
==============================================================================
--- head/graphics/lcms/Makefile Sun Oct 7 15:07:25 2012 (r305487)
+++ head/graphics/lcms/Makefile Sun Oct 7 15:08:52 2012 (r305488)
@@ -1,85 +1,71 @@
-# New ports collection makefile for: lcms
-# Date created: October 30, 2000
-# Whom: Mikhail Teterin <mi at aldan.algebra.com>
-#
+# Created by: Mikhail Teterin <mi at 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 at 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>
More information about the svn-ports-head
mailing list