[BACK]Return to modules.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / inputmethod / uim

File: [cvs.NetBSD.org] / pkgsrc / inputmethod / uim / modules.mk (download)

Revision 1.2, Wed Nov 25 12:50:58 2015 UTC (8 years ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4
Changes since 1.1: +6 -9 lines

Remove mk/find-prefix.mk usage from the inputmethod category.

The find-prefix infrastructure was required in a pkgviews world where
packages installed from pkgsrc could have different installation
prefixes, and this was a way for a dependency prefix to be determined.

Now that pkgviews has been removed there is no longer any need for the
overhead of this infrastructure.  Instead we use BUILDLINK_PREFIX.pkg
for dependencies pulled in via buildlink, or LOCALBASE/PREFIX where the
dependency is coming from pkgsrc.

Provides a reasonable performance win due to the reduction of `pkg_info
-qp` calls, some of which were redundant anyway as they were duplicating
the same information provided by BUILDLINK_PREFIX.pkg.

# $NetBSD: modules.mk,v 1.2 2015/11/25 12:50:58 jperkin Exp $
#
# This Makefile fragment is intended to be included by packages that install
# UIM modules.  It takes care of update the corresponding databases
# at (de)installation time.
#
# The following variables can be defined:
#    UIM_MODULES - Set to list of UIM module names installed by the package.

.if !defined(UIM_MODULES_MK)
UIM_MODULES_MK=	# defined

.if (defined(UIM_MODULES) && !empty(UIM_MODULES)) || defined(_BUILDING_UIM)

.  if !defined(_BUILDING_UIM)
DEPENDS+=		uim-[0-9]*:../../inputmethod/uim
.  endif

UIM_MODULE_MANAGER=	${LOCALBASE}/bin/uim-module-manager
UIM_MODULE_LIST_DIR=	${LOCALBASE}/share/uim/pkgsrc

FILES_SUBST+=		UIM_MODULE_MANAGER=${UIM_MODULE_MANAGER:Q}
FILES_SUBST+=		UIM_MODULE_LIST_DIR=${UIM_MODULE_LIST_DIR:Q}
FILES_SUBST+=		UIM_MODULES=${UIM_MODULES:Q}
INSTALL_TEMPLATES+=	../../inputmethod/uim/files/modules.tmpl
DEINSTALL_TEMPLATES+=	../../inputmethod/uim/files/modules.tmpl

GENERATE_PLIST+=	for m in ${UIM_MODULES}; do \
			echo ${UIM_MODULE_LIST_DIR:S,^${LOCALBASE}/,,}/$${m}; \
			done

post-install: uim-add-module-names
uim-add-module-names: .PHONY 
	${INSTALL_DATA_DIR} ${DESTDIR}${UIM_MODULE_LIST_DIR}
	${RUN}cd ${DESTDIR}${UIM_MODULE_LIST_DIR};		\
		for m in ${UIM_MODULES}; do			\
			${INSTALL_DATA} /dev/null $${m};	\
		done

.endif

TOOLS_NOOP+=		uim-module-manager

.endif			# UIM_MODULES_MK