summaryrefslogtreecommitdiff
path: root/inputmethod/mozc-server/Makefile.common
blob: bde36ce56100d5892500cd634b1b9898344e4abd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# $NetBSD: Makefile.common,v 1.18 2015/02/17 23:55:58 ryoon 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.16.2037.102
CATEGORIES=	inputmethod
MASTER_SITES=	${MASTER_SITE_LOCAL}
EXTRACT_SUFX=	.tar.xz

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

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++
# nullptr requires -std=c++11, and -std=c++11 requires gcc 4.6 or later
GCC_REQD+=	4.6
CXXFLAGS+=	-std=c++03

USE_TOOLS+=	gmake pkg-config

FIND_PREFIX:=	GYPDIR=${PYPKGPREFIX}-gyp
#FIND_PREFIX:=	NINJADIR=ninja
.include "../../mk/find-prefix.mk"

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

do-configure:
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
		GYP_DEFINES="use_libprotobuf=1" \
		${PYTHONBIN} build_mozc.py \
		gyp \
		--gypdir=${GYPDIR}/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"