From owner-svn-ports-head@FreeBSD.ORG Sun Oct 7 15:08:53 2012 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1CA4A106566B; Sun, 7 Oct 2012 15:08:53 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07ED38FC12; Sun, 7 Oct 2012 15:08:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97F8q5R020574; Sun, 7 Oct 2012 15:08:52 GMT (envelope-from sunpoet@svn.freebsd.org) Received: (from sunpoet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97F8qR9020572; Sun, 7 Oct 2012 15:08:52 GMT (envelope-from sunpoet@svn.freebsd.org) Message-Id: <201210071508.q97F8qR9020572@svn.freebsd.org> From: Sunpoet Po-Chuan Hsieh Date: Sun, 7 Oct 2012 15:08:52 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r305488 - head/graphics/lcms X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 15:08:53 -0000 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 -# +# Created by: Mikhail Teterin # $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 +.include -.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 +.include