source: trunk/dports/x11/kinput2/Portfile @ 112495

Last change on this file since 112495 was 112495, checked in by takanori@…, 6 years ago

kinput2: allow to build on Mavericks (Ticket #40902)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1# $Id: Portfile 112495 2013-10-24 15:05:21Z takanori@macports.org $
2
3PortSystem      1.0
4
5name            kinput2
6version         3.1
7revision        5
8categories      x11 japanese
9maintainers     takanori openmaintainer
10description     Input server of Japanese text
11long_description \
12                ${description}
13platforms       darwin
14license         Restrictive/Distributable
15homepage
16master_sites    macports \
17                ftp://ftp.sra.co.jp/pub/x11/kinput2/
18distname        ${name}-v${version}
19patchfiles      patch-cmd_Kinput2.ad.diff \
20                patch-lib_Canna.c.diff \
21                patch-lib_IMProto.c.diff
22checksums       md5 2de20576f150248d1fdfe66d7cc4e510 \
23                sha1 48050f70e7c0cc67193ea260f8d7f6e822a02ca3 \
24                rmd160 c56684769859bbee5f8238cd1af061796ff931e8
25
26depends_lib     port:xorg-libXaw \
27                port:xorg-libXp
28
29if {[variant_isset wnn]} {
30} elseif {[variant_isset canna]} {
31} elseif {[variant_isset sj3]} {
32} else {
33    default_variants +canna
34}
35
36post-patch {
37    move ${worksrcpath}/Kinput2.conf ${worksrcpath}/Kinput2.conf.orig
38    set fd [open [file join ${worksrcpath} Kinput2.conf] w 0644]
39    puts ${fd} "CCDEF_DIR = \$(LIBDIR)/ccdef"
40    if {[variant_isset canna]} {
41        puts ${fd} "#define UseCanna"
42        puts ${fd} "CANNAINSTDIR = ${prefix}"
43        puts ${fd} "CANNASRC = \$(CANNAINSTDIR)/include"
44        puts ${fd} "CANNALIB = -lcanna16 -L\$(CANNAINSTDIR)/lib"
45    }
46    puts ${fd} "TRANSPORTDEFS = -DNO_TCP_TRANSPORT"
47    close ${fd}
48}
49
50#use_xmkmf      yes
51depends_build   port:imake
52
53compiler.blacklist      *clang*
54
55configure {
56    # IMAKECPP should be set explicitly before calling xmkmf.
57    system "cd ${worksrcpath} && IMAKECPP=${configure.cpp} xmkmf"
58}
59
60pre-build {
61    # IMAKECPP should be declared here too.
62    system "cd ${worksrcpath} && IMAKECPP=${configure.cpp} make Makefiles PREFIX=${prefix}"
63    system "cd ${worksrcpath} && make depend PREFIX=${prefix}"
64
65    build.target {}
66    if {[variant_isset universal]} {
67        build.post_args PREFIX=${prefix} CDEBUGFLAGS=\"${configure.cflags} ${configure.universal_cflags}\"
68    } else {
69        build.post_args PREFIX=${prefix} CDEBUGFLAGS=\"${configure.cflags}\"
70    }
71}
72use_parallel_build  yes
73
74pre-destroot {
75    destroot.target install install.man
76    destroot.post_args-append "PREFIX=${prefix} BINDIR=${prefix}/bin LIBDIR=${prefix}/lib CONFDIR=${prefix}/etc MANSOURCEPATH=${prefix}/share/man/man DOCDIR=${prefix}/share/doc/${name} XAPPLOADDIR=${prefix}/lib/X11/app-defaults"
77}
78
79post-destroot {
80    delete ${destroot}${prefix}/lib/app-defaults
81
82    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/doc
83    xinstall -m 644 -W ${worksrcpath} NEWS README ${destroot}${prefix}/share/doc/${name}
84    eval xinstall -m 644 [glob ${worksrcpath}/doc/*] ${destroot}${prefix}/share/doc/${name}/doc
85}
86
87variant universal {}
88
89variant canna description {Use canna as Japanese conversion engine} {
90    depends_lib-append   port:canna
91}
92
93livecheck.type  none
Note: See TracBrowser for help on using the repository browser.