freebsd-ports/ports-mgmt/portupgrade/Makefile
Muhammad Moinur Rahman 18c6e18276 Mk/**ruby.mk: Switch from USE_RUBY=yes to USES=ruby
Switch from Mk/bsd.ruby.mk to Mk/Uses/ruby.mk

Notable changes are.

- Mk/bsd.ruby.mk is moved to Mk/Uses/ruby.mk.
- USE_RUBY=yes is replaced with USES=ruby.
- USE_RUBY_EXTCONF is replaced with USES=ruby:extconf.
- USE_RUBY_RDOC is replaced with USES=ruby:rdoc.
- USE_RUBY_SETUP is replaces with USES=ruby:setup.
- RUBY_NO_BUILD_DEPENDS and RUBY_NO_RUN_DEPENDS are replaced with
  USES=ruby:{build,none,run}.
- RUBY_REQUIRE isn't used anywhere, so removed.
- USES=gem now implies USES=ruby.

This is mainly the work of yasu@ at https://reviews.freebsd.org/D27863

I have just made some cosmetic changes and ran exp-run to test that the
tree is not in a BROKEN state.

Approved by:	portmgr
Differential Revision:	https://reviews.freebsd.org/D37925
2023-01-14 17:08:33 -06:00

53 lines
1.1 KiB
Makefile

PORTNAME= portupgrade
PORTVERSION= 2.4.16
PORTREVISION= 0
PORTEPOCH= 2
CATEGORIES= ports-mgmt
MASTER_SITES= LOCAL/bdrewery/${PORTNAME}/ \
http://mirror.shatow.net/freebsd/${PORTNAME}/ \
GH
MAINTAINER= bdrewery@FreeBSD.org
COMMENT= FreeBSD ports/packages administration and management tool suite
WWW= https://wiki.freebsd.org/portupgrade
LICENSE= BSD3CLAUSE
OPTIONS_DEFINE= DOCS
CONFLICTS_INSTALL= portupgrade-devel
USE_GITHUB= yes
GH_ACCOUNT= freebsd
DIST_SUBDIR= ${PORTNAME}
USES= ruby uidfix
USE_LDCONFIG= ${PREFIX}/lib/compat/pkg
MAKE_ARGS= PREFIX="${PREFIX}" RUBY="${RUBY}" \
RUBY_SITELIBDIR="${RUBY_SITELIBDIR}" MKDIR="${MKDIR}"
EXAMPLESDIR= ${PREFIX}/share/examples/pkgtools
DOCSDIR= ${PREFIX}/share/doc/pkgtools
.include <bsd.port.pre.mk>
INSTALL_TARGET= install
.if ${PORT_OPTIONS:MDOCS}
INSTALL_TARGET+= install-doc
.endif
.if ${RUBY_VER} >= 3.2
# databases/ruby-bdb is BROKEN with Ruby 3.2
RUN_DEPENDS+= rubygem-dbm>0:databases/rubygem-dbm
.else
# For PKG_DBDRIVER={bdb_btree,bdb_hash}
RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/bdb.so:databases/ruby-bdb
.endif
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/lib/compat/pkg
.include <bsd.port.post.mk>