[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: canna-lib
ogata@isp.qix.org wrote:
> DEPENDS+= Canna-lib-3*:../../japanese/canna-lib
> をまぜるのが妥当なのでしょうか?
妥当です。
> pkgsrc/Packages.txt の 8 buildlink.mk methodology を読んでみたのですが、
> BUILDLINK_FILES.foo, BUILDLINK_TRANSFORM.foo, BUILDLINK_TARGETS の値には
> 具体的に何をいれるべきなのでしょう?
bsd.buildlink.mk を見るのが一番わかりやすいかと。
BUILDLINK_TARGETSは、
どのパッケージが提供しているbuildlink.mkなのか、を指定します。
DEPENDSと同じ書式です。
BUILDLINK_FILESは、buildlink.mkをincludeする側が、
compile時に使うファイルを列挙します。
BUILDLINK_TRANSFORMは、ln -sするときにrenameする場合に使います。
devel/ncursesでは、
NetBSD標準の libcurses.a を libncurses.a に見せかけたいので、
BUILDLINK_TRANSFORM.ncurses= -e "s|libcurses\.|libncurses.|g"
とかやってます。
> .include "../../japanese/canna-lib/buildlink.mk を追加してみたんですが
> すでに入ってるのにまた入れようとしてうまくうごいてません(弱
> 参考までに添付しますのでいけてない点があったら指摘していただけると
> 嬉しいです。
> BUILDLINK_DEPENDS.canna?= canna>=3.5b2
> DEPENDS+= ${BUILDLINK_DEPENDS.canna}:../../japanese/canna-lib
BUILDLINK_DEPENDS.cannaにはPKGNAMEが入りますから、
BUILDLINK_DEPENDS.canna?= Canna-lib>=3.5b2
が正解。
> # BUILDLINK_FILES.canna には全部じゃなくて一部でも可?
使うものだけ入れます。
逆にあっても問題なければ include/canna/* とかでも可。
ペナルティはsymbolic link貼る時間。
freewnn-lib,canna-lib,sj3-libのbuildlink.mkとkinput2/Makefileを付けときます。
テストできるかたお願いします。
sakamoto
---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# canna-lib/buildlink.mk
# freewnn-lib/buildlink.mk
# sj3-lib/buildlink.mk
# kinput2/Makefile
#
echo x - canna-lib/buildlink.mk
sed 's/^X//' >canna-lib/buildlink.mk << 'END-of-canna-lib/buildlink.mk'
X# $NetBSD$
X#
X# This Makefile fragment is included by packages that use Canna.
X#
X# To use this Makefile fragment, simply:
X#
X# (1) Optionally define BUILDLINK_DEPENDS.canna to the dependency pattern
X# for the version of Canna desired.
X# (2) Include this Makefile fragment in the package Makefile,
X# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
X# search path, and
X# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
X# path.
X
X.if !defined(CANNA_BUILDLINK_MK)
XCANNA_BUILDLINK_MK= # defined
X
X.include "../../mk/bsd.buildlink.mk"
X
XBUILDLINK_DEPENDS.canna?= Canna-lib>=3.5b2
XDEPENDS+= ${BUILDLINK_DEPENDS.canna}:../../japanese/canna-lib
X
XEVAL_PREFIX+= BUILDLINK_PREFIX.canna=canna-lib
XBUILDLINK_PREFIX.canna_DEFAULT= ${LOCALBASE}
XBUILDLINK_FILES.canna= include/canna/RK.h
XBUILDLINK_FILES.canna+= include/canna/jrkanji.h
XBUILDLINK_FILES.canna+= include/canna/keydef.h
XBUILDLINK_FILES.canna+= include/canna/mfdef.h
XBUILDLINK_FILES.canna+= lib/libRKC.*
XBUILDLINK_FILES.canna+= lib/libRKC16.*
XBUILDLINK_FILES.canna+= lib/libcanna.*
XBUILDLINK_FILES.canna+= lib/libcanna16.*
X
XBUILDLINK_TARGETS.canna= canna-buildlink
XBUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.canna}
X
Xpre-configure: ${BUILDLINK_TARGETS.canna}
Xcanna-buildlink: _BUILDLINK_USE
X
X.endif # CANNA_BUILDLINK_MK
END-of-canna-lib/buildlink.mk
echo x - freewnn-lib/buildlink.mk
sed 's/^X//' >freewnn-lib/buildlink.mk << 'END-of-freewnn-lib/buildlink.mk'
X# $NetBSD$
X#
X# This Makefile fragment is included by packages that use FreeWnn.
X#
X# To use this Makefile fragment, simply:
X#
X# (1) Optionally define BUILDLINK_DEPENDS.freewnn to the dependency pattern
X# for the version of FreeWnn desired.
X# (2) Include this Makefile fragment in the package Makefile,
X# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
X# search path, and
X# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
X# path.
X
X.if !defined(FREEWNN_BUILDLINK_MK)
XFREEWNN_BUILDLINK_MK= # defined
X
X.include "../../mk/bsd.buildlink.mk"
X
XBUILDLINK_DEPENDS.freewnn?= ja-FreeWnn-lib>=1.10
XDEPENDS+= ${BUILDLINK_DEPENDS.freewnn}:../../japanese/freewnn-lib
X
XEVAL_PREFIX+= BUILDLINK_PREFIX.freewnn=freewnn-lib
XBUILDLINK_PREFIX.freewnn_DEFAULT= ${LOCALBASE}
XBUILDLINK_FILES.freewnn= include/wnn/commonhd.h
XBUILDLINK_FILES.freewnn+= include/wnn/config.h
XBUILDLINK_FILES.freewnn+= include/wnn/cplib.h
XBUILDLINK_FILES.freewnn+= include/wnn/jlib.h
XBUILDLINK_FILES.freewnn+= include/wnn/jllib.h
XBUILDLINK_FILES.freewnn+= include/wnn/jslib.h
XBUILDLINK_FILES.freewnn+= include/wnn/msg.h
XBUILDLINK_FILES.freewnn+= include/wnn/rk_spclval.h
XBUILDLINK_FILES.freewnn+= include/wnn/wnnerror.h
XBUILDLINK_FILES.freewnn+= lib/libjd.a
XBUILDLINK_FILES.freewnn+= lib/libwnn.a
X
XBUILDLINK_TARGETS.freewnn= freewnn-buildlink
XBUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.freewnn}
X
Xpre-configure: ${BUILDLINK_TARGETS.freewnn}
Xfreewnn-buildlink: _BUILDLINK_USE
X
X.endif # FREEWNN_BUILDLINK_MK
END-of-freewnn-lib/buildlink.mk
echo x - sj3-lib/buildlink.mk
sed 's/^X//' >sj3-lib/buildlink.mk << 'END-of-sj3-lib/buildlink.mk'
X# $NetBSD$
X#
X# This Makefile fragment is included by packages that use sj3.
X#
X# To use this Makefile fragment, simply:
X#
X# (1) Optionally define BUILDLINK_DEPENDS.sj3 to the dependency pattern
X# for the version of sj3 desired.
X# (2) Include this Makefile fragment in the package Makefile,
X# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
X# search path, and
X# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
X# path.
X
X.if !defined(SJ3_BUILDLINK_MK)
XSJ3_BUILDLINK_MK= # defined
X
X.include "../../mk/bsd.buildlink.mk"
X
XBUILDLINK_DEPENDS.sj3?= sj3-lib>=2.0.1.20
XDEPENDS+= ${BUILDLINK_DEPENDS.sj3}:../../japanese/sj3-lib
X
XEVAL_PREFIX+= BUILDLINK_PREFIX.sj3=sj3-lib
XBUILDLINK_PREFIX.sj3_DEFAULT= ${LOCALBASE}
XBUILDLINK_FILES.sj3= include/sj3lib.h
XBUILDLINK_FILES.sj3+= lib/libsj3lib.a
X
XBUILDLINK_TARGETS.sj3= sj3-buildlink
XBUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.sj3}
X
Xpre-configure: ${BUILDLINK_TARGETS.sj3}
Xsj3-buildlink: _BUILDLINK_USE
X
X.endif # SJ3_BUILDLINK_MK
END-of-sj3-lib/buildlink.mk
echo x - kinput2/Makefile
sed 's/^X//' >kinput2/Makefile << 'END-of-kinput2/Makefile'
X# $NetBSD: Makefile,v 1.8 2001/02/16 15:25:20 wiz Exp $
X# FreeBSD Id: Makefile,v 1.4 1999/06/06 13:19:49 taoka Exp $
X
XDISTNAME= kinput2-v3
XPKGNAME= kinput2-3.0
XCATEGORIES= japanese
XMASTER_SITES= ftp://ftp.sra.co.jp/pub/x11/kinput2/
X
XMAINTAINER= tech-pkg-ja@jp.netbsd.org
XCOMMENT= Input server of Japanese text
X
XUSE_IMAKE= YES
X
XPLIST_SRC= ${PKGDIR}/PLIST-common
X
X.include "../../mk/bsd.prefs.mk"
X.if defined(USE_CANNA) && ${USE_CANNA} != YES && \
X defined(USE_WNN4) && ${USE_WNN4} != YES && \
X defined(USE_WNN6) && ${USE_WNN6} != YES && \
X defined(USE_SJ3) && ${USE_SJ3} != YES
XIGNORE= ${PKGNAME} is ignored. because USE_CANNA,USE_WNN4,USE_WNN6,USE_SJ3 are "NO"
X.endif
X
X.if !defined(USE_CANNA) || ${USE_CANNA} == YES
X.include "../../japanese/canna-lib/buildlink.mk"
XKINPUT2_DEF+= -DUseCanna -Dport_CANNASRC=${BUILDLINK_DIR}/include \
X -Dport_CANNALIB="${LDFLAGS} -lcanna16"
X.endif
X
X#.if defined(USE_WNN6) && ${USE_WNN6} == YES
X#DEPENDS+=
X#KINPUT2_DEF+= -DUseWnn -DUseWnn6 -Dport_WNNINCDIR=${LOCALBASE}/include/wnn \
X# -Dport_WNNLIB="${LDFLAGS} -lwnn6 -lcrypt"
X#.elif (!defined(USE_WNN4) || ${USE_WNN4} == YES)
X.if !defined(USE_WNN4) || ${USE_WNN4} == YES
X.include "../../japanese/freewnn-lib/buildlink.mk"
XKINPUT2_DEF+= -DUseWnn -Dport_WNNINCDIR=${BUILDLINK_DIR}/include/wnn \
X -Dport_WNNLIB="${LDFLAGS} -lwnn -lcrypt"
XPLIST_SRC+= ${PKGDIR}/PLIST-freewnn
X.endif
X
X.if !defined(USE_SJ3) || ${USE_SJ3} == YES
X.include "../../japanese/sj3-lib/buildlink.mk"
XKINPUT2_DEF+= -DUseSj3 -Dport_SJ3SRC=${BUILDLINK_DIR}/include \
X -Dport_SJ3LIB="${LDFLAGS} -lsj3lib"
XPLIST_SRC+= ${PKGDIR}/PLIST-sj3
X.endif
X
XMAKE_ENV+= PORT_IMAKE_DEFINES='${KINPUT2_DEF}'
X
Xpre-configure:
X ${MV} -f ${WRKSRC}/Kinput2.conf ${WRKSRC}/Kinput2.conf.org
X ${CP} ${FILESDIR}/Kinput2.conf ${WRKSRC}/Kinput2.conf
X
Xdo-configure:
X cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF}
X
X.include "../../mk/bsd.pkg.mk"
END-of-kinput2/Makefile
exit