aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/scim-pinyin/Makefile
blob: 1ceed01bbf9a1a01c9b94b10ada9ad5953facb64 (plain) (blame)
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
# New ports collection makefile for:    zh-scim-chinese
# Date created:     20 May 2004
# Whom:         Jie Gao <gaoj@cpsc.ucalgary.ca>
#
# $FreeBSD$
#

PORTNAME=   scim-pinyin
PORTVERSION=    0.5.91
PORTREVISION=   2
CATEGORIES= chinese
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=scim

MAINTAINER= ports@FreeBSD.org
COMMENT=    SCIM Chinese Smart Pinyin input method

BUILD_DEPENDS=  scim:${PORTSDIR}/textproc/scim
RUN_DEPENDS=    ${BUILD_DEPENDS}

USE_GNOME=  gnomehack lthack
USE_ICONV=  yes
USE_GMAKE=  yes
USE_AUTOTOOLS=  libtool:15

CONFIGURE_ENV=  PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
        PTHREAD_LIBS="${PTHREAD_LIBS}"

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500035
BUILD_DEPENDS+= ${LOCALBASE}/lib/libstlport_gcc.so:${PORTSDIR}/devel/stlport
RUN_DEPENDS+=   ${LOCALBASE}/lib/libstlport_gcc.so:${PORTSDIR}/devel/stlport
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/stlport" \
        LDFLAGS="-L${LOCALBASE}/lib -lstlport_gcc -lintl ${PTHREAD_LIBS}"
.else
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include -D__STDC_ISO_10646__" \
        LDFLAGS="-L${LOCALBASE}/lib -lintl"
.endif

PLIST_SUB=  SKIM="@comment "

pre-fetch:
.if exists(${LOCALBASE}/bin/skim)
    @${ECHO_MSG} "===>  Skim is detected, support enabled."
.else
    @${ECHO_MSG} "Define WITH_SKIM to enable skim support."
.endif

.if exists(${LOCALBASE}/bin/skim)
WITH_SKIM=  yes
.endif

.if !defined(WITH_SKIM)
CONFIGURE_ARGS+=--disable-skim-support
.else
BUILD_DEPENDS+= skim:${PORTSDIR}/textproc/skim
CONFIGURE_ENV+= PTHREAD_LIBS="${PTHREAD_LIBS}"
PLIST_SUB=  SKIM="" PREFIX="${PREFIX}"
.endif

post-install:
    @${CAT} ${PKGMESSAGE}
    @${ECHO}
    @${ECHO} To display this message again, type \`pkg_info -D ${PKGNAME}\'
    @${ECHO}

.include <bsd.port.post.mk>