diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1994,6 +1994,8 @@ . endif . endif +.include "${PORTSDIR}/Mk/bsd.sponsor.mk" + . if defined(USE_LOCALE) WRK_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} . endif diff --git a/Mk/bsd.sponsor.db.mk b/Mk/bsd.sponsor.db.mk new file mode 100644 --- /dev/null +++ b/Mk/bsd.sponsor.db.mk @@ -0,0 +1,9 @@ +Sponsor_db_Include_MAINTAINER= portmgr@FreeBSD.org + +# +# bsd.sponsor.db.mk - Sponsorship info database for FreeBSD Ports commiters +# +# Please keep descriptions sorted alphabetically by variable name. + +arrowd_at_freebsd_org_SPONSORSHIP_PLATFORMS= CARDANO +arrowd_at_freebsd_org_CARDANO_SPONSOR_HANDLE= addr1qy95v6rlgjchrqc7cae9g7vtrmsevdaty8hnl9p5kv0xtajpts7278jw0y9nh9n26y0dfa97j0zkjxxnut8ahg3hs02sth533h diff --git a/Mk/bsd.sponsor.mk b/Mk/bsd.sponsor.mk new file mode 100644 --- /dev/null +++ b/Mk/bsd.sponsor.mk @@ -0,0 +1,113 @@ +# These variables are used in Ports framework to define the ways to support +# port maintainers. +# +# SPONSORSHIP_PLATFORMS - List of ways to endorse the port's maintainer +# Currently supported values are: +# BOOSTY +# CARDANO +# GITHUB +# OPENCOLLECTIVE +# PATREON +# +# Each platform may have ":upstream" suffix to allow +# sponsoring project's upstream instead of a +# downstream maintainer. +# +# To define an additional platform the following +# vars should be defined: +# ${plat}_SPONSOR_HANDLE - Account name or some other handle for the +# given platform +# ${plat}_UPSTREAM_SPONSOR_HANDLE - The same as ${plat}_SPONSOR_HANDLE for +# the ":upstream" case. +# ${plat}_SPONSOR_URL - URL leading to the site that allows to make +# to make a donation +# +# Variables listed above may be either put into a port's Makefile directly or +# set automatically based on the MAINTAINER knob value and the data from +# bsd.sponsor.db.mk +# +# An auxiliary "make sponsor" target points the user to appropriate web page. +# An auxiliary "make sponsor-describe" target prints a machine-readable description +# of the sponsorship data. + +.if !defined(SPONSORMKINCLUDED) +SPONSORMKINCLUDED= bsd.sponsor.mk + +BOOSTY_SPONSOR_URL= https://boosty.to/%%HANDLE%% +CARDANO_SPONSOR_URL= https://cexplorer.io/address/%%HANDLE%% +GITHUB_SPONSOR_URL= https://github.com/sponsors/%%HANDLE%% +OPENCOLLECTIVE_SPONSOR_URL= https://opencollective.com/%%HANDLE%% +PATREON_SPONSOR_URL= https://www.patreon.com/%%HANDLE%% + +GITHUB_SPONSOR_HANDLE?= ${GH_PROJECT} +GITHUB_UPSTREAM_SPONSOR_HANDLE?= ${GH_PROJECT} + +.include "${PORTSDIR}/Mk/bsd.sponsor.db.mk" +_MAINTAINER_KEY= ${MAINTAINER:S/@FreeBSD.org/_at_freebsd_org/:S/@freebsd.org/_at_freebsd_org/} +. if defined(${_MAINTAINER_KEY}_SPONSORSHIP_PLATFORMS) +SPONSORSHIP_PLATFORMS+= ${${_MAINTAINER_KEY}_SPONSORSHIP_PLATFORMS} +. for plat in ${SPONSORSHIP_PLATFORMS} +. if defined(${_MAINTAINER_KEY}_${plat}_SPONSOR_HANDLE) +${plat}_SPONSOR_HANDLE= ${${_MAINTAINER_KEY}_${plat}_SPONSOR_HANDLE} +. endif +. endfor +. endif + +. for plat in ${SPONSORSHIP_PLATFORMS} +. for plat_w_u plat_wo_u in ${plat:S/:upstream/_UPSTREAM/} ${plat:S/:upstream//} +. if !defined(${plat_w_u}_SPONSOR_HANDLE) || empty(${plat_w_u}_SPONSOR_HANDLE) +.error Missing ${plat_w_u}_SPONSOR_HANDLE value +. endif +. if !defined(${plat_wo_u}_SPONSOR_URL) || empty(${plat_wo_u}_SPONSOR_URL) +.error Missing ${plat_wo_u}_SPONSOR_URL value +. endif +. endfor +. endfor + +SPONSOR_DIALOG= ${DIALOG} --backtitle "Sponsorship options" \ + --menu "Support options for ${PORTNAME}" 0 0 0 + +. for plat in ${SPONSORSHIP_PLATFORMS} +. for plat_w_u plat_wo_u in ${plat:S/:upstream/_UPSTREAM/} ${plat:S/:upstream//} +SPONSOR_DIALOG_ARGS+= ${plat_w_u} ${${plat_wo_u}_SPONSOR_URL:S/%%HANDLE%%/${${plat_w_u}_SPONSOR_HANDLE}/} +PKG_NOTE_sponsor+= ${plat_w_u:tl}=${${plat_wo_u}_SPONSOR_URL:S/%%HANDLE%%/${${plat_w_u}_SPONSOR_HANDLE}/} +. endfor +. endfor +SPONSOR_DIALOG_OUTPUT= /tmp/.SPONSOR_DIALOG_OUTPUT +_SELECTED_PLATFORM= ${CAT} ${SPONSOR_DIALOG_OUTPUT} + +. if exists(${LOCALBASE}/bin/xdg-open) +SPONSOR_CMD= ${LOCALBASE}/bin/xdg-open %%URL%% +. else +SPONSOR_CMD= ${ECHO_CMD} To sponsor the maintainer of ${PORTNAME} visit %%URL%% +. endif + +. if !empty(SPONSORSHIP_PLATFORMS) +PKG_NOTES+= sponsor + +sponsor: + @${RM} ${SPONSOR_DIALOG_OUTPUT} + @${SPONSOR_DIALOG} ${SPONSOR_DIALOG_ARGS} 2> ${SPONSOR_DIALOG_OUTPUT} + + @${TEST} -f ${SPONSOR_DIALOG_OUTPUT} && \ + ${SPONSOR_CMD:S/%%URL%%/${${_SELECTED_PLATFORM:sh:S/_UPSTREAM//}_SPONSOR_URL:S/%%HANDLE%%/${${_SELECTED_PLATFORM:sh}_SPONSOR_HANDLE}/}/} + @${RM} ${SPONSOR_DIALOG_OUTPUT} +. else +sponsor: + @${ECHO_CMD} No sponsorship platforms defined for ${PORTNAME} maintainer + @${FALSE} +. endif + +# The format is +# distribution-name|maintainer|sponsorship_platform|sponsorship_type|sponsorship_url +sponsor-describe: ${SPONSORSHIP_PLATFORMS:tl:S/:upstream/-upstream/:S/^/sponsor-describe-/} + @${DO_NADA} + +. for plat in ${SPONSORSHIP_PLATFORMS} +. for plat_w_u plat_wo_u in ${plat:S/:upstream/_UPSTREAM/} ${plat:S/:upstream//} +sponsor-describe-${plat:tl:S/:upstream/-upstream/}: + @${ECHO_CMD} "${PKGNAME}|${MAINTAINER}|${plat_wo_u}|${"${plat_w_u:M*_UPSTREAM}":?Upstream:Maintainer}|${${plat_wo_u}_SPONSOR_URL:S/%%HANDLE%%/${${plat_w_u}_SPONSOR_HANDLE}/}" +. endfor +. endfor + +.endif diff --git a/databases/sqlitebrowser/Makefile b/databases/sqlitebrowser/Makefile --- a/databases/sqlitebrowser/Makefile +++ b/databases/sqlitebrowser/Makefile @@ -23,6 +23,9 @@ PORTSCOUT= ignore:1 +SPONSORSHIP_PLATFORMS= PATREON:upstream +PATREON_UPSTREAM_SPONSOR_HANDLE= db4s + post-patch: @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' \ ${WRKSRC}/src/PreferencesDialog.cpp ${WRKSRC}/src/Application.cpp diff --git a/ftp/curl/Makefile b/ftp/curl/Makefile --- a/ftp/curl/Makefile +++ b/ftp/curl/Makefile @@ -150,6 +150,8 @@ ZSTD_CONFIGURE_WITH= zstd ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd +SPONSORSHIP_PLATFORMS= GITHUB:upstream + .include .if ((!${PORT_OPTIONS:MGNUTLS} && !${PORT_OPTIONS:MOPENSSL}) || (${PORT_OPTIONS:MOPENSSL} && ${SSL_DEFAULT:Mlibressl*})) && ${PORT_OPTIONS:MTLS_SRP} diff --git a/textproc/logseq/Makefile b/textproc/logseq/Makefile --- a/textproc/logseq/Makefile +++ b/textproc/logseq/Makefile @@ -28,6 +28,9 @@ RSAPI_HASH= d731cc44acb903a41c5e0b8dc7e576cc2d35ceb4 BETTER_SQLITE_VERSION= 9.1.1 +SPONSORSHIP_PLATFORMS= OPENCOLLECTIVE:upstream +OPENCOLLECTIVE_UPSTREAM_SPONSOR_HANDLE= logseq + post-patch: ${RM} ${WRKSRC}/resources/app/node_modules/@logseq/rsapi-linux-x64-gnu/package.json.orig