The patch below converts the port to use the new options framework[1] and converts the Makefile header to the new format[2]. The patch is to be applied using: patch -p0 -E </path/to/patchfile No attempts have been made to fix any potential issues the port might have beyond this scope. I also didn't fix any indentation issues to keep the patch small and easy to audit, a future port maintainer might want to take care of this. See also: 1. http://lists.freebsd.org/pipermail/freebsd-ports/2012-October/078676.html 2. http://lists.freebsd.org/pipermail/freebsd-ports/2012-August/077801.html Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: suffix)
Author: eadler Date: Sun Oct 7 04:44:48 2012 New Revision: 305429 URL: http://svn.freebsd.org/changeset/ports/305429 Log: Convert to OptionsNG PR: ports/172426 Submitted by: Michael Gmelin <freebsd@grem.de> Modified: head/security/libpreludedb/Makefile Modified: head/security/libpreludedb/Makefile ============================================================================== --- head/security/libpreludedb/Makefile Sun Oct 7 04:39:12 2012 (r305428) +++ head/security/libpreludedb/Makefile Sun Oct 7 04:44:48 2012 (r305429) @@ -1,6 +1,4 @@ -# New ports collection makefile for: libpreludedb -# Date created: 2005-10-14 -# Whom: Sergei Kolobov <sergei@FreeBSD.org> +# Created by: Sergei Kolobov <sergei@FreeBSD.org> # $FreeBSD$ PORTNAME= libpreludedb @@ -23,15 +21,12 @@ USE_LDCONFIG= yes MAN1= preludedb-admin.1 PORTDOCS= * -OPTIONS= PERL "Include Perl bindings" off \ - PYTHON "Include Python bindings" off \ - MYSQL "Use MySQL backend" on \ - PGSQL "Use PostgreSQL backend" off \ - SQLITE "Use SQLite backend" off +OPTIONS_DEFINE= DOCS MYSQL PERL PGSQL PYTHON SQLITE +OPTIONS_DEFAULT=MYSQL -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> -.if defined(WITH_PERL) +.if ${PORT_OPTIONS:MPERL} USE_PERL5= yes CONFIGURE_ARGS+= --with-perl PLIST_SUB+= WITH_PERL="" @@ -40,7 +35,7 @@ CONFIGURE_ARGS+= --without-perl PLIST_SUB+= WITH_PERL="@comment " .endif -.if defined(WITH_PYTHON) +.if ${PORT_OPTIONS:MPYTHON} USE_PYTHON= yes .include "${PORTSDIR}/Mk/bsd.python.mk" CONFIGURE_ARGS+= --with-python @@ -50,7 +45,7 @@ CONFIGURE_ARGS+= --without-python PLIST_SUB+= WITH_PYTHON="@comment " .endif -.if defined(WITH_MYSQL) || exists(${LOCALBASE}/bin/mysql_config) +.if ${PORT_OPTIONS:MMYSQL} || exists(${LOCALBASE}/bin/mysql_config) USE_MYSQL= yes CONFIGURE_ARGS+= --with-mysql PLIST_SUB+= WITH_MYSQL="" @@ -59,7 +54,7 @@ CONFIGURE_ARGS+= --without-mysql PLIST_SUB+= WITH_MYSQL="@comment " .endif -.if defined(WITH_PGSQL) || exists(${LOCALBASE}/bin/pg_config) +.if ${PORT_OPTIONS:MPGSQL} || exists(${LOCALBASE}/bin/pg_config) USE_PGSQL= yes CONFIGURE_ARGS+= --with-postgresql PLIST_SUB+= WITH_PGSQL="" @@ -68,7 +63,7 @@ CONFIGURE_ARGS+= --without-postgresql PLIST_SUB+= WITH_PGSQL="@comment " .endif -.if defined(WITH_SQLITE) || exists(${LOCALBASE}/lib/libsqlite3.so) +.if ${PORT_OPTIONS:MSQLITE} || exists(${LOCALBASE}/lib/libsqlite3.so) USE_SQLITE= yes CONFIGURE_ARGS+= --with-sqlite3 PLIST_SUB+= WITH_SQLITE="" @@ -78,16 +73,16 @@ CONFIGURE_ARGS+= --without-sqlite3 PLIST_SUB+= WITH_SQLITE="@comment " .endif -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} CONFIGURE_ARGS+= --with-html-dir=${PREFIX}/share/doc .endif post-install: -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} @${INSTALL} -d ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/docs/api/html/* ${DOCSDIR} .endif @${INSTALL_MAN} ${WRKSRC}/docs/manpages/*.1 ${MAN1PREFIX}/man/man1/ -.include <bsd.port.post.mk> +.include <bsd.port.mk> _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
On 7 October 2012 00:15, Michael Gmelin <freebsd@grem.de> wrote: > patch -p0 -E </path/to/patchfile For some reason this shows up as a 'reversed patch' for me. I use svn apply patch > +OPTIONS_DEFINE= DOCS MYSQL PERL PGSQL PYTHON SQLITE > +OPTIONS_DEFAULT=MYSQL > +PERL_DESC= Include Perl bindings > +PYTHON_DESC= Include Python bindings > +MYSQL_DESC= Use MySQL backend > +PGSQL_DESC= Use PostgreSQL backend > +SQLITE_DESC= Use SQLite backend None of these were needed as they were in Mk/bsd.options.desc.mk easy way to test: try 'make showconfig' before setting them > post-install: > -.if !defined(NOPORTDOCS) missed one of these. committed though, thanks! -- Eitan Adler
On Sun, 7 Oct 2012 00:46:28 -0400 Eitan Adler <lists@eitanadler.com> wrote: > On 7 October 2012 00:15, Michael Gmelin <freebsd@grem.de> wrote: > > patch -p0 -E </path/to/patchfile > > For some reason this shows up as a 'reversed patch' for me. I use svn > apply patch > > > +OPTIONS_DEFINE= DOCS MYSQL PERL PGSQL PYTHON SQLITE > > +OPTIONS_DEFAULT=MYSQL > > +PERL_DESC= Include Perl bindings > > +PYTHON_DESC= Include Python bindings > > +MYSQL_DESC= Use MySQL backend > > +PGSQL_DESC= Use PostgreSQL backend > > +SQLITE_DESC= Use SQLite backend > I set them intentionally, since by using the defaults the user has no chance to really understand what's meant, in this case it would say: PERL Perl scripting language (like how, will it install perl, is it a plugin, a language binding?) PYTHON would be ok (says Python bindings) MYSQL says MySQL database - again, how does it connect to the port, is it a backend? Probably, but not user friendly, same for PGSQL and SQLite. Just stating "SQLite database" as a configuration option doesn't really cut it (IMHO) Why not a MySQL binding and a Perl backend, or using Python as a data store (not as bizarr as it might sound at first) > None of these were needed as they were in Mk/bsd.options.desc.mk > easy way to test: try 'make showconfig' before setting them That's what I did and decided that the user would loose useful information that way. Cheers, Michael > > > post-install: > > -.if !defined(NOPORTDOCS) oops > > missed one of these. > > committed though, thanks! > -- Michael Gmelin
State Changed From-To: open->closed Committed. Thanks!
Author: dougb Date: Sun Oct 7 19:31:17 2012 New Revision: 305503 URL: http://svn.freebsd.org/changeset/ports/305503 Log: Restore option descriptions to what the maintainer actually put in the PR Pointy hat to: eadler PR: ports/172426 Submitted by: Michael Gmelin <freebsd@grem.de> (maintainer) Modified: head/security/libpreludedb/Makefile Modified: head/security/libpreludedb/Makefile ============================================================================== --- head/security/libpreludedb/Makefile Sun Oct 7 18:53:25 2012 (r305502) +++ head/security/libpreludedb/Makefile Sun Oct 7 19:31:17 2012 (r305503) @@ -23,6 +23,11 @@ PORTDOCS= * OPTIONS_DEFINE= DOCS MYSQL PERL PGSQL PYTHON SQLITE OPTIONS_DEFAULT=MYSQL +PERL_DESC= Include Perl bindings +PYTHON_DESC= Include Python bindings +MYSQL_DESC= Use MySQL backend +PGSQL_DESC= Use PostgreSQL backend +SQLITE_DESC= Use SQLite backend .include <bsd.port.options.mk> _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"