From owner-svn-ports-head@FreeBSD.ORG Mon Oct 29 11:21:58 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 D0E3070D; Mon, 29 Oct 2012 11:21:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE95D8FC08; Mon, 29 Oct 2012 11:21:58 +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 q9TBLwMY049163; Mon, 29 Oct 2012 11:21:58 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9TBLwkd049161; Mon, 29 Oct 2012 11:21:58 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201210291121.q9TBLwkd049161@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 29 Oct 2012 11:21:58 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r306601 - in head/textproc/xerces-c2: . scripts X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 29 Oct 2012 11:21:58 -0000 Author: bapt Date: Mon Oct 29 11:21:58 2012 New Revision: 306601 URL: http://svn.freebsd.org/changeset/ports/306601 Log: Convert to new options framework PR: ports/172434 Submitted by: Michael Gmelin Feature safe: yes Deleted: head/textproc/xerces-c2/scripts/ Modified: head/textproc/xerces-c2/Makefile Modified: head/textproc/xerces-c2/Makefile ============================================================================== --- head/textproc/xerces-c2/Makefile Mon Oct 29 11:05:21 2012 (r306600) +++ head/textproc/xerces-c2/Makefile Mon Oct 29 11:21:58 2012 (r306601) @@ -1,9 +1,5 @@ -# New ports collection makefile for: xerces-c2 -# Date created: 06 September 2002 -# Whom: "Bjoern A. Zeeb" (bzeeb+freebsdports@zabbadoz.net) -# +# Created by: Bjoern A. Zeeb # $FreeBSD$ -# PORTNAME= xerces-c2 PORTVERSION= 2.7.0 @@ -16,46 +12,33 @@ DISTNAME= xerces-c-src_${PORTVERSION:S/. MAINTAINER= ports@FreeBSD.org COMMENT= Validating XML parser from the Apache XML Project -OPTIONS= THREADS "Build a thread enabled shared library." on \ - DEBUG "Include debugging information, do not strip." off \ - ICONVFBSD "Use IconvFBSD transcoder." on \ - ICU "Use ICU transcoder." off \ - NATIVE "Use native transcoder." off +OPTIONS_DEFINE= DOCS DEBUG EXAMPLES THREADS +OPTIONS_SINGLE= TCODER +OPTIONS_SINGLE_TCODER= ICONVFBSD ICU NATIVE +OPTIONS_DEFAULT= ICONVFBSD THREADS +ICONVFBSD_DESC= Use IconvFBSD transcoder +ICU_DESC= Use ICU transcoder +NATIVE_DESC= Use native transcoder -.include +.include -.if defined(WITH_NATIVE) -TRANSCODER= native -.endif -.if defined(WITH_ICU) -TRANSCODER= icu -.endif -.if defined(WITH_ICONVFBSD) -TRANSCODER= IconvFBSD -.endif - -.if !defined(TRANSCODER) -USE_ICONV= yes -TRANSCODER= IconvFBSD -ICONVROOT?= ${LOCALBASE} -CONFIGURE_ENV+= ICONVROOT=${ICONVROOT} -MAKE_ENV+= ICONVROOT=${ICONVROOT} -PLIST_SUB+= TRANSICONV="" -PLIST_SUB+= TRANSICU="@comment " -.else -.if (${TRANSCODER} == "icu") -PKGNAMESUFFIX+= -icu +.if ${PORT_OPTIONS:MICU} LIB_DEPENDS+= icuuc:${PORTSDIR}/devel/icu ICUROOT?= ${LOCALBASE} CONFIGURE_ENV+= ICUROOT=${ICUROOT} MAKE_ENV+= ICUROOT=${ICUROOT} +TRANSCODER= icu PLIST_SUB+= TRANSICONV="@comment " PLIST_SUB+= TRANSICU="" -.elif (${TRANSCODER} == "native") -PKGNAMESUFFIX+= -native +.endif + +.if ${PORT_OPTIONS:MNATIVE} +TRANSCODER= native PLIST_SUB+= TRANSICONV="" PLIST_SUB+= TRANSICU="@comment " -.else +.endif + +.if ${PORT_OPTIONS:MICONVFBSD} USE_ICONV= yes TRANSCODER= IconvFBSD ICONVROOT?= ${LOCALBASE} @@ -64,7 +47,6 @@ MAKE_ENV+= ICONVROOT=${ICONVROOT} PLIST_SUB+= TRANSICONV="" PLIST_SUB+= TRANSICU="@comment " .endif -.endif USE_LDCONFIG= yes @@ -84,7 +66,7 @@ CONFIGURE_ARGS+= -p freebsd -c ${CC} -x CONFIGURE_ARGS+= -t ${TRANSCODER} -.if defined(WITH_DEBUG) +.if ${PORT_OPTIONS:MDEBUG} CONFIGURE_ARGS+= -d .endif @@ -96,7 +78,7 @@ CONFIGURE_ARGS+= -b 64 SAMPLES_CONFIG_ARGS+= -b 64 .endif -.if defined(WITHOUT_THREADS) +.if ! ${PORT_OPTIONS:MTHREADS} CONFIGURE_ARGS+= -r none .else CONFIGURE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ @@ -110,13 +92,13 @@ PLIST_SUB+= XERCESC_LIB=${XERCESC_LIB} XERCESC_DEPDOM_LIB=${XERCESC_DEPDOM_LIB} \ XERCESC_LIB_VERSION=${XERCESC_LIB_VERSION} -.if !defined(NOPORTEXAMPLES) +.if ${PORT_OPTIONS:MEXAMPLES} ALL_TARGET?= all samples XERCES_BINS?= CreateDOMDocument DOMCount DOMPrint EnumVal MemParse PParse \ PSVIWriter Redirect SAX2Count SAX2Print SAXCount SAXPrint \ SCMPrint SEnumVal StdInParse SAMPLES_CONFIG_ARGS+= -p freebsd -c ${CC} -x ${CXX} -.if defined(WITHOUT_THREADS) +.if ! ${PORT_OPTIONS:MTHREADS} SAMPLES_CONFIG_ARGS+= -r none .else SAMPLES_CONFIG_ARGS+= -r pthread @@ -125,17 +107,10 @@ SAMPLES_CONFIG_ENV+= PTHREAD_CFLAGS="${P .endif .endif -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} PORTDOCS= * .endif -SCRIPTS_ENV= WITH_NATIVE="${WITH_NATIVE}" \ - WITH_ICU="${WITH_ICU}" \ - WITH_ICONVFBSD="${WITH_ICONVFBSD}" - -pre-extract: - @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/check-config-options - post-patch: @${REINPLACE_CMD} -e 's#CP = -cp -p#CP = -cp#' \ ${WRKSRC}/src/xercesc/Makefile.incl @@ -148,7 +123,7 @@ pre-configure: @${CHMOD} 700 ${CONFIGURE_WRKSRC}/configure post-configure: -.if !defined(NOPORTEXAMPLES) +.if ${PORT_OPTIONS:MEXAMPLES} .if defined(TRANSCODER) && (${TRANSCODER} == "icu") @(cd ${WRKSRC}/samples && \ ${SETENV} \ @@ -167,11 +142,11 @@ post-configure: .endif post-install: -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${DOCSDIR} @${CP} -r ${WRKSRC}/doc/ ${DOCSDIR} .endif -.if !defined(NOPORTEXAMPLES) +.if ${PORT_OPTIONS:MEXAMPLES} @${MKDIR} ${EXAMPLESDIR} .for i in ${XERCES_BINS} data @${CP} -r ${WRKSRC}/samples/$i ${EXAMPLESDIR} @@ -181,4 +156,4 @@ post-install: .endfor .endif -.include +.include