[BACK]Return to Makefile.common CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / inputmethod / mozc-server

File: [cvs.NetBSD.org] / pkgsrc / inputmethod / mozc-server / Makefile.common (download)

Revision 1.22, Wed Nov 25 12:50:58 2015 UTC (8 years ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2015Q4-base, pkgsrc-2015Q4
Changes since 1.21: +2 -6 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: Makefile.common,v 1.22 2015/11/25 12:50:58 jperkin Exp $
# used by inputmethod/ibus-mozc/Makefile
# used by inputmethod/mozc-elisp/Makefile
# used by inputmethod/mozc-server/Makefile
# used by inputmethod/mozc-tool/Makefile
# used by inputmethod/mozc-renderer/Makefile
# used by inputmethod/uim-mozc/Makefile
#

DISTNAME=	mozc-2.17.2116.102
CATEGORIES=	inputmethod
MASTER_SITES=	${MASTER_SITE_GITHUB:=google/}
GITHUB_PROJECT=	mozc
GITHUB_TAG=	fd0f5b347d35fe287f4cc9be49f650c87f82ba03

MAINTAINER=	ryoon@NetBSD.org
HOMEPAGE=	https://github.com/google/mozc/
COMMENT=	Japanese inputmethod Mozc engine for IBus
LICENSE=	modified-bsd

USAGE_DICT=	usage_dict-rev10.txt
UIM_MOZC=	uim-mozc-318.0562676
DISTFILES+=	${DISTNAME}-${GITHUB_TAG}${EXTRACT_SUFX} \
		${USAGE_DICT} \
		${UIM_MOZC}.tar.xz
SITES.${USAGE_DICT}=		${MASTER_SITE_LOCAL}
SITES.${UIM_MOZC}.tar.xz=	${MASTER_SITE_SOURCEFORGE:=pnsft-aur/}

EXTRACT_USING=	bsdtar
WRKSRC=		${WRKDIR}/mozc-${GITHUB_TAG}/src

DISTINFO_FILE=	${.CURDIR}/../../inputmethod/mozc-server/distinfo
PATCHDIR=	${.CURDIR}/../../inputmethod/mozc-server/patches

BUILD_DEPENDS+=	${PYPKGPREFIX}-gyp-[0-9]*:../../devel/gyp
BUILD_DEPENDS+=	ninja-build-[0-9]*:../../devel/ninja-build

PYTHON_VERSIONS_INCOMPATIBLE=  33 # py-gyp

USE_LANGUAGES=	c c++

USE_TOOLS+=	gmake pkg-config

OPENSSL_CFLAGS=		-I${BUILDLINK_PREFIX.openssl}/include
OPENSSL_INC=		-I${BUILDLINK_PREFIX.openssl}/include
OPENSSL_LDFLAGS=	-L${BUILDLINK_PREFIX.openssl}/lib -lssl -lcrypto
OPENSSL_LIBS=		-lssl -lcrypto

SUBST_CLASSES+=		gyp
SUBST_STAGE.gyp=	pre-configure
SUBST_MESSAGE.gyp=	Fix gyp defaults
SUBST_FILES.gyp+=	base/base.gyp
SUBST_FILES.gyp+=	base/process.cc
SUBST_FILES.gyp+=	base/system_util.cc
SUBST_FILES.gyp+=	handwriting/zinnia_handwriting.cc
SUBST_FILES.gyp+=	unix/ibus/gen_mozc_xml.py
SUBST_FILES.gyp+=	unix/ibus/ibus.gyp
SUBST_FILES.gyp+=	gyp/common.gypi
SUBST_VARS.gyp+=	OPENSSL_CFLAGS OPENSSL_INC OPENSSL_LDFLAGS OPENSSL_LIBS
SUBST_VARS.gyp+=	PREFIX QTDIR

# To disable flock(1) in link stage.
ALL_ENV+=	LINK=${CXX}

.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "NetBSD"
OSDEST=		bsd
.elif ${OPSYS} == "Linux"
OSDEST=		linux
.endif

MOZC_BUILD_MODE=	Release # or Debug

pre-configure:
	mkdir -p ${WRKSRC}/third_party/japanese_usage_dictionary
	cp ${WRKDIR}/${USAGE_DICT} \
		${WRKSRC}/third_party/japanese_usage_dictionary/usage_dict.txt

do-configure:
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
		GYP_DEFINES="use_libprotobuf=1" \
		${PYTHONBIN} build_mozc.py \
		gyp \
		--gypdir=${LOCALBASE}/bin

.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/protobuf/buildlink3.mk"
# gmock is not used yet...
#.include "../../devel/gmock/buildlink3.mk"
.include "../../inputmethod/zinnia/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../x11/gtk2/buildlink3.mk"
.include "../../x11/qt4-libs/buildlink3.mk"

.include "../../lang/python/tool.mk"
.include "../../mk/bsd.pkg.mk"