Date: Sun, 7 Oct 2012 11:53:49 GMT From: Chris Petrik <c.petrik.sosa@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/172450: [PATCH] Convert ports to OptionsNG Message-ID: <201210071153.q97BrnJQ028056@red.freebsd.org> Resent-Message-ID: <201210071200.q97C0Nqr039133@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 172450 >Category: ports >Synopsis: [PATCH] Convert ports to OptionsNG >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Oct 07 12:00:22 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Chris Petrik >Release: >Organization: none >Environment: >Description: Options NG for: archivers/ark archivers/file-roller archivers/fpc-unzip archivers/liborange archivers/libpar2 archivers/p7zip archivers/pear-Horde_Compress archivers/rpm5 archivers/unrar archivers/xarchive >How-To-Repeat: >Fix: Patch attached with submission follows: Index: ark/Makefile =================================================================== --- ark/Makefile (revision 305454) +++ ark/Makefile (working copy) @@ -1,7 +1,4 @@ -# New ports collection Makefile for: kdeutils -# Date created: 2008-01-31 -# Whom: Martin Wilke <miwi@FreeBSD.org> -# +# Created by: Martin Wilke <miwi@FreeBSD.org> # $FreeBSD$ PORTNAME= ark @@ -26,17 +23,19 @@ MAN1= ark.1 -OPTIONS= 7ZIP "Support for 7-Zip archives in Ark" off \ - RAR "Support for RAR archives in Ark" off \ - ZIP "Support for ZIP archives in Ark" off +OPTIONS_DEFINE= 7ZIP RAR ZIP +7ZIP_DESCR=Support for 7-Zip archives in Ark +RAR_DESCR=Support for RAR archives in Ark +ZIP_DESCR=Support for ZIP archives in Ark + .include <bsd.port.options.mk> -.ifdef(WITH_7ZIP) +.if ${PORT_OPTIONS:M7ZIP} RUN_DEPENDS+= 7z:${PORTSDIR}/archivers/p7zip .endif -.ifdef(WITH_ZIP) +.if ${PORT_OPTIONS:MZIP} RUN_DEPENDS+= unzip>0:${PORTSDIR}/archivers/unzip \ zip:${PORTSDIR}/archivers/zip .endif @@ -47,7 +46,7 @@ LIB_DEPENDS+= archive.12:${PORTSDIR}/archivers/libarchive .endif -.ifdef(WITH_RAR) +.if ${PORT_OPTIONS:MRAR} RUN_DEPENDS+= unrar:${PORTSDIR}/archivers/unrar .if ${ARCH} != "amd64" && ${ARCH} != "ia64" && ${ARCH} != "powerpc" && ${ARCH} != "sparc64" INSTALL_RAR= YES Index: file-roller/Makefile =================================================================== --- file-roller/Makefile (revision 305454) +++ file-roller/Makefile (working copy) @@ -1,7 +1,4 @@ -# New ports collection makefile for: fileroller -# Date created: 18 May 2002 -# Whom: Anders Nordby <anders@FreeBSD.org> -# +# Created by: Anders Nordby <anders@FreeBSD.org> # $FreeBSD$ # $MCom: ports/archivers/file-roller/Makefile,v 1.184 2010/11/15 22:58:48 kwm Exp $ # @@ -17,8 +14,12 @@ MAINTAINER= gnome@FreeBSD.org COMMENT= An archive manager for zip files, tar, etc -OPTIONS= NAUTILUS "Enable Nautilus extension" on +OPTIONS_DEFINE= NAUTILUS +NAUTILUS_DESCR= Enable Nautilus extension + +OPTIONS_DEFAULT= NAUTILUS + RUN_DEPENDS= ${LOCALBASE}/bin/gtar:${PORTSDIR}/archivers/gtar \ ${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip @@ -42,7 +43,7 @@ .include <bsd.port.pre.mk> -.if !defined(WITHOUT_NAUTILUS) +.if ${PORT_OPTIONS:MNAUTILUS} USE_GNOME+= nautilus2 PLIST_SUB+= NAUTILUS="" .else Index: fpc-unzip/Makefile =================================================================== --- fpc-unzip/Makefile (revision 305454) +++ fpc-unzip/Makefile (working copy) @@ -1,9 +1,5 @@ -# New ports collection makefile for: fpc-unzip -# Date created: 2006-06-05 -# Whom: Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe> -# +# Created by: Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe> # $FreeBSD$ -# PORTREVISION= 0 CATEGORIES= archivers lang @@ -18,6 +14,7 @@ WRKUNITDIR= ${FPCSRCDIR}/packages/${PKGNAMESUFFIX:S/-//} EXTRACTUNITDIR+= ${WRKUNITDIR} -OPTIONS= UNZIP "Install unzip tools" on +OPTIONS_DEFINE= UNZIP +OPTIONS_DEFAULT= UNZIP .include "${MASTERDIR}/Makefile" Index: liborange/Makefile =================================================================== --- liborange/Makefile (revision 305454) +++ liborange/Makefile (working copy) @@ -1,9 +1,5 @@ -# New ports collection makefile for: orange -# Date Created: January 2005 -# Whom: Sam Lawrance <boris@brooknet.com.au> -# +# Created by: Sam Lawrance <boris@brooknet.com.au> # $FreeBSD$ -# PORTNAME= liborange PORTVERSION= 0.4 @@ -16,13 +12,17 @@ RUN_DEPENDS= cabextract:${PORTSDIR}/archivers/cabextract \ unzip:${PORTSDIR}/archivers/unzip -OPTIONS= LIBSYNCE "Build with libsynce support" on \ - LIBDYNAMITE "Build with libdynamite support" on \ - LIBUNSHIELD "Build with libunshield support" on \ - INNO "Build with expermential Inno Setup support" off \ - VISE "Build with expermential VISE support" off \ - MSI "Build with expermential MSI support" off +OPTIONS_DEFINE= LIBSYNCE LIBDYNAMITE LIBUNSHIELD INNO VISE MSI +LIBSYNCE_DESCR=Build with libsynce support +ELIBDYNAMITE_DESCR=Build with libdynamite support +LIBUNSHIELD_DESCR=Build with libunshield support +INNO_DESCR=Build with expermential Inno Setup support +VISE_DESCR=Build with expermential VISE support +MSI_DESCR=Build with expermential MSI support + +OPTIONS_DEFAULT= LIBSYNCE LIBDYNAMITE LIBUNSHIELD + MAKE_JOBS_SAFE= yes USE_AUTOTOOLS= libtool @@ -37,39 +37,39 @@ .include <bsd.port.pre.mk> -.if !defined(WITH_LIBSYNCE) +.if ${PORT_OPTIONS:MLIBSYNCE} CONFIGURE_ARGS+= --without-libsynce REQUIRES+= libsynce .else -LIB_DEPENDS+= synce.0:${PORTSDIR}/palm/synce-libsynce +LIB_DEPENDS+= synce:${PORTSDIR}/palm/synce-libsynce CONFIGURE_ARGS+= --with-libsynce .endif -.if !defined(WITH_LIBDYNAMITE) +.if ${PORT_OPTIONS:MLIBDYNAMITE} CONFIGURE_ARGS+= --without-libdynamite REQUIRES+= libdynamite .else -LIB_DEPENDS+= dynamite.0:${PORTSDIR}/archivers/libdynamite +LIB_DEPENDS+= dynamite:${PORTSDIR}/archivers/libdynamite CONFIGURE_ARGS+= --with-libdynamite .endif -.if !defined(WITH_LIBUNSHIELD) +.if ${PORT_OPTIONS:MLIBUNSHIELD} CONFIGURE_ARGS+= --without-libunshield REQUIRES+= libunshield .else -LIB_DEPENDS+= unshield.0:${PORTSDIR}/archivers/unshield +LIB_DEPENDS+= unshield:${PORTSDIR}/archivers/unshield CONFIGURE_ARGS+= --with-libunshield .endif -.if defined(WITH_INNO) +.if ${PORT_OPTIONS:MINNO} CONFIGURE_ARGS+= --enable-inno .endif -.if defined(WITH_VISE) +.if ${PORT_OPTIONS:MVISE} CONFIGURE_ARGS+= --enable-vise .endif -.if defined(WITH_MSI) +.if ${PORT_OPTIONS:MMSI} CONFIGURE_ARGS+= --enable-msi --with-libgsf LIB_DEPENDS+= gsf-1.114:${PORTSDIR}/devel/libgsf .endif Index: libpar2/Makefile =================================================================== --- libpar2/Makefile (revision 305454) +++ libpar2/Makefile (working copy) @@ -1,9 +1,5 @@ -# New ports collection makefile for: libpar2 -# Date created: 16 Aug 2008 -# Whom: Jeff Burchell <toxic@doobie.com> -# +# Created by: Jeff Burchell <toxic@doobie.com> # $FreeBSD$ -# PORTNAME= libpar2 PORTVERSION= 0.2 @@ -23,11 +19,15 @@ USE_LDCONFIG= yes -OPTIONS= ENABLECANCEL "Enable graceful cancellation of repairs" On +OPTIONS_DEFINE= ENABLECANCEL +ENABLECANCEL_DESCR=Enable graceful cancellation of repairs + +OPTIONS_DEFAULT= ENABLECANCEL + .include <bsd.port.pre.mk> -.if defined(WITH_ENABLECANCEL) +.if ${PORT_OPTIONS:MENABLECANCEL} EXTRA_PATCHES+= ${FILESDIR}/xpatch-addcancel-par2repairer.cpp .endif Index: p7zip/Makefile =================================================================== --- p7zip/Makefile (revision 305454) +++ p7zip/Makefile (working copy) @@ -1,9 +1,5 @@ -# New ports collection makefile for: p7zip -# Date created: Sun Jul 18 15:07:26 CEST 2004 -# Whom: Juergen Lock <nox@jelal.kn-bremen.de> -# +# Created by: Juergen Lock <nox@jelal.kn-bremen.de> # $FreeBSD$ -# PORTNAME= p7zip PORTVERSION= 9.20.1 @@ -14,16 +10,20 @@ MAINTAINER= rakuco@FreeBSD.org COMMENT= File archiver with high compression ratio -OPTIONS= MINIMAL "Support only .7z file format" off \ - MODULES "Build modules" on +OPTIONS_DEFINE= MINIMAL MODULES +MINIMAL_DESCR= Support only .7z file format +MODULES_DESCR= Build modules + +OPTIONS_DEFAULT= MODULES + USE_BZIP2= yes MAKEFILE= makefile WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION} .include <bsd.port.options.mk> -.if defined(WITH_MINIMAL) +.if ${PORT_OPTIONS:MMINIMAL} MAN1= 7zr.1 MLINKS= 7zr.1 7z.1 PLIST_SUB= MODULES="@comment " @@ -43,7 +43,8 @@ libexec/p7zip/7za \ libexec/p7zip/7zr \ libexec/p7zip/7zCon.sfx -.if !defined(WITHOUT_MODULES) + +.if ${PORT_OPTIONS:MMODULES} ALL_TARGET= 7z 7za 7zr Client7z sfx 7ZBIN= 7z 7za 7zr Client7z 7zCon.sfx PLIST_DIRS+= libexec/p7zip/Codecs @@ -75,7 +76,8 @@ ${MV} ${WRKSRC}/contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1 ${WRKSRC}/man1/ do-install: -.if defined(WITH_MINIMAL) + +.if ${PORT_OPTIONS:MMINIMAL} cd ${WRKSRC}/bin/&&${INSTALL_PROGRAM} ${7ZBIN} ${PREFIX}/bin/ ${LN} -sf ${PREFIX}/bin/7zr ${PREFIX}/bin/7z .else @@ -85,7 +87,7 @@ ${LN} -sf 7z ${PREFIX}/bin/7za ${LN} -sf 7z ${PREFIX}/bin/7zr ${INSTALL_SCRIPT} ${WRKSRC}/contrib/gzip-like_CLI_wrapper_for_7z/p7zip ${PREFIX}/bin/ -.if !defined(WITHOUT_MODULES) +.if ${PORT_OPTIONS:MMODULES} ${INSTALL} -d ${DLLDIR}/Codecs/ ${INSTALL_PROGRAM} ${WRKSRC}/bin/Codecs/Rar29.so ${DLLDIR}/Codecs/ ${INSTALL_PROGRAM} ${WRKSRC}/bin/7z.so ${DLLDIR}/ Index: pear-Horde_Compress/Makefile =================================================================== --- pear-Horde_Compress/Makefile (revision 305454) +++ pear-Horde_Compress/Makefile (working copy) @@ -1,7 +1,4 @@ -# Ports collection makefile for: pear-Horde_Compress -# Date created: 6 July 2011 -# Whom: Martin Matuska <mm@FreeBSD.org> -# +# Created by: Martin Matuska <mm@FreeBSD.org> # $FreeBSD$ PORTNAME= Horde_Compress @@ -12,13 +9,15 @@ MAINTAINER= horde@FreeBSD.org COMMENT= Horde Compression API -OPTIONS= ZLIB "Depend on PHP zlib extension" On +OPTIONS_DEFINE= ZLIB +OPTIONS_DEFAULT= ZLIB + USE_HORDE_RUN= Horde_Exception Horde_Translation Horde_Util Horde_Stream_Filter .include <bsd.port.pre.mk> -.if !defined(WITHOUT_ZLIB) +.if ${PORT_OPTIONS:MZLIB} USE_PHP+= zlib .endif Index: rpm5/Makefile =================================================================== --- rpm5/Makefile (revision 305454) +++ rpm5/Makefile (working copy) @@ -1,7 +1,4 @@ -# New ports collection makefile for: rpm -# Date created: 6 May 2003 -# Whom: Greg Lewis <glewis@FreeBSD.org> -# +# Created by: Greg Lewis <glewis@FreeBSD.org> # $FreeBSD$ PORTNAME= rpm @@ -13,13 +10,13 @@ MAINTAINER= afb@rpm5.org COMMENT= The RPM Package Manager -LIB_DEPENDS= sqlite3.8:${PORTSDIR}/databases/sqlite3 \ - popt.0:${PORTSDIR}/devel/popt \ - beecrypt.7:${PORTSDIR}/security/beecrypt \ - neon.27:${PORTSDIR}/www/neon29 \ +LIB_DEPENDS= sqlite3:${PORTSDIR}/databases/sqlite3 \ + popt:${PORTSDIR}/devel/popt \ + beecrypt:${PORTSDIR}/security/beecrypt \ + neon:${PORTSDIR}/www/neon29 \ magic:${PORTSDIR}/sysutils/file \ xar:${PORTSDIR}/archivers/xar \ - pcre.1:${PORTSDIR}/devel/pcre + pcre:${PORTSDIR}/devel/pcre BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed \ ${LOCALBASE}/lib/libuuid.a:${PORTSDIR}/misc/ossp-uuid \ bash:${PORTSDIR}/shells/bash @@ -31,9 +28,10 @@ SH= ${LOCALBASE}/bin/bash -OPTIONS= PERL "Build Perl RPM module" Off \ - PYTHON "Build Python RPM module" On +OPTIONS_DEFINE= PERL PYTHON +OPTIONS_DEFAULT= PYTHON + DB_VERSION?= 47 USE_BDB= ${DB_VERSION} USE_AUTOTOOLS= libtool @@ -60,7 +58,7 @@ --without-syck .endif -.if defined(WITH_PERL) +.if ${PORT_OPTIONS:MPERL} CONFIGURE_ARGS+=--with-perl CONFIGURE_ENV+= __PERL=${PERL} USE_PERL5= yes @@ -70,7 +68,7 @@ PLIST_SUB+= PERL="@comment " .endif -.if defined(WITH_PYTHON) +.if ${PORT_OPTIONS:MPYTHON} CONFIGURE_ARGS+=--with-python=${PYTHON_VER} CONFIGURE_ENV+= __PYTHON=${PYTHON_CMD} USE_PYTHON= yes Index: unrar/Makefile =================================================================== --- unrar/Makefile (revision 305454) +++ unrar/Makefile (working copy) @@ -1,9 +1,5 @@ -# New ports collection makefile for: unrar -# Date created: 28 Dec 1994 -# Whom: ache -# +# Created by: ache # $FreeBSD$ -# PORTNAME= unrar PORTVERSION= 4.20 @@ -16,8 +12,10 @@ MAINTAINER?= sunpoet@FreeBSD.org COMMENT= Extract, view & test RAR archives -OPTIONS= OPENSSL_AES "Use OpenSSL implementation of AES" on +OPTIONS_DEFINE= OPENSSL_AES +OPTIONS_DEFAULT= OPENSSL_AES + CONFLICTS?= zh-unrar-[0-9].* unrar-iconv-[0-9].* MAKE_ARGS= STRIP=${STRIP_CMD} @@ -30,7 +28,7 @@ .include <bsd.port.options.mk> -.if !defined(WITHOUT_OPENSSL_AES) +.if ${PORT_OPTIONS:MOPENSSL_AES} CPPFLAGS+= -DOPENSSL_AES -I${OPENSSLINC} LDFLAGS+= -L${OPENSSLLIB} -lcrypto USE_OPENSSL= yes Index: xarchive/Makefile =================================================================== --- xarchive/Makefile (revision 305454) +++ xarchive/Makefile (working copy) @@ -1,9 +1,5 @@ -# New ports collection makefile for: xarchive -# Date created: 09 November 2005 -# Whom: Mark Kane <mark@mkproductions.org> -# +# Created by: Mark Kane <mark@mkproductions.org> # $FreeBSD$ -# PORTNAME= xarchive PORTVERSION= 0.2.8.6 @@ -22,43 +18,45 @@ GNU_CONFIGURE= yes USE_GNOME= gtk20 -OPTIONS= 7ZIP "Support for 7zip archives" off \ - ARJ "Support for ARJ archives" off \ - ACE "Support for ACE archives" off \ - DEB "Support for DEB archives" off \ - RAR "Support for RAR archives" off \ - RPM "Support for RPM archives" off \ - ZIP "Support for ZIP archives" off +OPTIONS_DEFINE= 7ZIP ARJ ACE DEB RAR RPM ZIP +7ZIP_DESCR=Support for 7zip archives +ARJ_DESCR=Support for ARJ archives +ACE_DESCR=Support for ACE archives +DEB_DESCR=Support for DEB archives +RAR_DESCR=Support for RAR archives +RPM_DESCR=Support for RPM archives +ZIP_DESCR=Support for ZIP archives + .include <bsd.port.pre.mk> -.if defined (WITH_7ZIP) +.if ${PORT_OPTIONS:M7ZIP} RUN_DEPENDS+= 7z:${PORTSDIR}/archivers/p7zip .endif -.if defined (WITH_ARJ) +.if ${PORT_OPTIONS:MARJ} RUN_DEPENDS+= arj:${PORTSDIR}/archivers/arj .endif -.if defined (WITH_ACE) +.if ${PORT_OPTIONS:MACE} RUN_DEPENDS+= unace:${PORTSDIR}/archivers/unace .endif -.if defined (WITH_DEB) +.if ${PORT_OPTIONS:MDEB} RUN_DEPENDS+= dpkg-deb:${PORTSDIR}/archivers/dpkg .endif -.if defined (WITH_RAR) +.if ${PORT_OPTIONS:MRAR} RUN_DEPENDS+= rar:${PORTSDIR}/archivers/rar \ unrar:${PORTSDIR}/archivers/unrar .endif -.if defined (WITH_RPM) +.if ${PORT_OPTIONS:MRPM} RUN_DEPENDS+= rpm2cpio:${PORTSDIR}/archivers/rpm2cpio \ rpm:${PORTSDIR}/archivers/rpm .endif -.if defined (WITH_ZIP) +.if ${PORT_OPTIONS:MZIP} RUN_DEPENDS+= zip:${PORTSDIR}/archivers/zip \ unzip:${PORTSDIR}/archivers/unzip .endif >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210071153.q97BrnJQ028056>