pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/inputmethod/kinput2 Convert to options framework.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2aa5c1304b50
branches:  trunk
changeset: 503891:2aa5c1304b50
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Thu Dec 01 18:58:39 2005 +0000

description:
Convert to options framework.

diffstat:

 inputmethod/kinput2/Makefile   |  37 +++----------------------------------
 inputmethod/kinput2/options.mk |  37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 34 deletions(-)

diffs (93 lines):

diff -r f99ac4059c2e -r 2aa5c1304b50 inputmethod/kinput2/Makefile
--- a/inputmethod/kinput2/Makefile      Thu Dec 01 18:57:37 2005 +0000
+++ b/inputmethod/kinput2/Makefile      Thu Dec 01 18:58:39 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2005/04/11 21:46:11 tv Exp $
+# $NetBSD: Makefile,v 1.12 2005/12/01 18:58:39 wiz Exp $
 
 DISTNAME=      kinput2-v3
 PKGNAME=       kinput2-3.0
@@ -13,40 +13,9 @@
 
 PLIST_SRC=     ${PKGDIR}/PLIST-common
 
-.include "../../mk/bsd.prefs.mk"
-.if defined(USE_CANNA) && ${USE_CANNA} != YES &&       \
-    defined(USE_WNN4) && ${USE_WNN4} != YES &&         \
-    defined(USE_WNN6) && ${USE_WNN6} != YES &&         \
-    defined(USE_SJ3) && ${USE_SJ3} != YES
-PKG_FAIL_REASON= ${PKGNAME} is ignored. because USE_CANNA,USE_WNN4,USE_WNN6,USE_SJ3 are "NO"
-.endif
-
-.if !defined(USE_CANNA) || ${USE_CANNA} == YES
-.include "../../inputmethod/canna-lib/buildlink3.mk"
-KINPUT2_DEF+=  -DUseCanna -Dport_CANNASRC=${BUILDLINK_PREFIX.Canna-lib}/include \
-               -Dport_CANNALIB="${LDFLAGS} -lcanna16"
-.endif
+.include "options.mk"
 
-#.if defined(USE_WNN6) && ${USE_WNN6} == YES
-#DEPENDS+=
-#KINPUT2_DEF+= -DUseWnn -DUseWnn6 -Dport_WNNINCDIR=${LOCALBASE}/include/wnn \
-#              -Dport_WNNLIB="${LDFLAGS} -lwnn6 -lcrypt"
-#.elif (!defined(USE_WNN4) || ${USE_WNN4} == YES)
-.if !defined(USE_WNN4) || ${USE_WNN4} == YES
-.include "../../inputmethod/ja-freewnn-lib/buildlink3.mk"
-KINPUT2_DEF+=  -DUseWnn -Dport_WNNINCDIR=${BUILDLINK_PREFIX.ja-FreeWnn-lib}/include/wnn \
-               -Dport_WNNLIB="${LDFLAGS} -lwnn -lcrypt"
-PLIST_SRC+=    ${PKGDIR}/PLIST-freewnn
-.endif
-
-.if !defined(USE_SJ3) || ${USE_SJ3} == YES
-.include "../../inputmethod/sj3-lib/buildlink3.mk"
-KINPUT2_DEF+=  -DUseSj3 -Dport_SJ3SRC=${BUILDLINK_PREFIX.sj3-lib}/include \
-               -Dport_SJ3LIB="${LDFLAGS} -lsj3lib"
-PLIST_SRC+=    ${PKGDIR}/PLIST-sj3
-.endif
-
-MAKE_ENV+=     PORT_IMAKE_DEFINES='${KINPUT2_DEF}'
+MAKE_ENV+=     PORT_IMAKE_DEFINES=${KINPUT2_DEFS:Q}
 
 pre-configure:
        ${MV} -f ${WRKSRC}/Kinput2.conf ${WRKSRC}/Kinput2.conf.org
diff -r f99ac4059c2e -r 2aa5c1304b50 inputmethod/kinput2/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/inputmethod/kinput2/options.mk    Thu Dec 01 18:58:39 2005 +0000
@@ -0,0 +1,37 @@
+# $NetBSD: options.mk,v 1.1 2005/12/01 18:58:39 wiz Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.kinput2
+PKG_OPTIONS_NONEMPTY_SETS=     inputmethod
+PKG_OPTIONS_SET.inputmethod=   canna wnn4 sj3
+PKG_SUGGESTED_OPTIONS= canna wnn4 sj3
+#PKG_OPTIONS_SET.inputmethod+= wnn6
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mcanna)
+.include "../../inputmethod/canna-lib/buildlink3.mk"
+KINPUT2_DEFS+= -DUseCanna
+KINPUT2_DEFS+= -Dport_CANNASRC=${BUILDLINK_PREFIX.Canna-lib}/include
+KINPUT2_DEFS+= -Dport_CANNALIB="${LDFLAGS} -lcanna16"
+.endif
+
+#.if !empty(PKG_OPTIONS:Mwnn6)
+#DEPENDS+=
+#KINPUT2_DEFS+=        -DUseWnn -DUseWnn6 -Dport_WNNINCDIR=${LOCALBASE}/include/wnn \
+#              -Dport_WNNLIB="${LDFLAGS} -lwnn6 -lcrypt"
+#.elif !empty(PKG_OPTIONS:Mwnn4)
+.if !empty(PKG_OPTIONS:Mwnn4)
+.include "../../inputmethod/ja-freewnn-lib/buildlink3.mk"
+KINPUT2_DEFS+= -DUseWnn
+KINPUT2_DEFS+= -Dport_WNNINCDIR=${BUILDLINK_PREFIX.ja-FreeWnn-lib}/include/wnn
+KINPUT2_DEFS+= -Dport_WNNLIB="${LDFLAGS} -lwnn -lcrypt"
+PLIST_SRC+=    ${PKGDIR}/PLIST-freewnn
+.endif
+
+.if !empty(PKG_OPTIONS:Msj3)
+.include "../../inputmethod/sj3-lib/buildlink3.mk"
+KINPUT2_DEFS+= -DUseSj3
+KINPUT2_DEFS+= -Dport_SJ3SRC=${BUILDLINK_PREFIX.sj3-lib}/include
+KINPUT2_DEFS+= -Dport_SJ3LIB="${LDFLAGS} -lsj3lib"
+PLIST_SRC+=    ${PKGDIR}/PLIST-sj3
+.endif



Home | Main Index | Thread Index | Old Index