neko: Add proper pkg options, add a TODO

This commit is contained in:
Charlotte Koch 2020-02-13 19:43:10 -08:00
parent 5559228272
commit 67c9c3ac0c
4 changed files with 87 additions and 8 deletions

View File

@ -13,14 +13,7 @@ EXTRACT_USING= gtar
USE_LANGUAGES= c
USE_CMAKE= yes
# XXX Minimal configuration for now. Should use options.mk instead.
CMAKE_ARGS+= -DWITH_REGEXP:BOOL=OFF
CMAKE_ARGS+= -DWITH_UI:BOOL=OFF
CMAKE_ARGS+= -DWITH_SSL:BOOL=OFF
CMAKE_ARGS+= -DWITH_MYSQL:BOOL=OFF
CMAKE_ARGS+= -DWITH_SQLITE:BOOL=OFF
CMAKE_ARGS+= -DWITH_APACHE:BOOL=OFF
CMAKE_ARGS+= -DWITH_NEKOML:BOOL=OFF
.include "options.mk"
.include "../../devel/boehm-gc/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"

View File

@ -13,5 +13,13 @@ lib/cmake/Neko/NekoTargets.cmake
lib/libneko.so
lib/libneko.so.2
lib/libneko.so.2.3.0
${PLIST.apache}lib/neko/mod_neko2.ndll
${PLIST.apache}lib/neko/mod_tora2.ndll
${PLIST.mysql}lib/neko/mysql.ndll
${PLIST.mysql}lib/neko/mysql5.ndll
${PLIST.regexp}lib/neko/regexp.ndll
${PLIST.sqlite}lib/neko/sqlite.ndll
${PLIST.ssl}lib/neko/ssl.ndll
lib/neko/std.ndll
${PLIST.ui}lib/neko/ui.ndll
lib/neko/zlib.ndll

1
neko/TODO Normal file
View File

@ -0,0 +1 @@
'nekoml' option does not work at build-time

77
neko/options.mk Normal file
View File

@ -0,0 +1,77 @@
# $NetBSD$
PKG_OPTIONS_VAR= PKG_OPTIONS.neko
PKG_SUPPORTED_OPTIONS= # defined
PKG_SUPPORTED_OPTIONS+= apache
PKG_SUPPORTED_OPTIONS+= mysql
PKG_SUPPORTED_OPTIONS+= nekoml
PKG_SUPPORTED_OPTIONS+= regexp
PKG_SUPPORTED_OPTIONS+= sqlite
PKG_SUPPORTED_OPTIONS+= ssl
PKG_SUPPORTED_OPTIONS+= ui
.include "../../mk/bsd.options.mk"
PLIST_VARS+= apache
PLIST_VARS+= mysql
PLIST_VARS+= nekoml
PLIST_VARS+= regexp
PLIST_VARS+= sqlite
PLIST_VARS+= ssl
PLIST_VARS+= ui
.if !empty(PKG_OPTIONS:Mapache)
CMAKE_ARGS+= -DWITH_APACHE:BOOL=ON
.include "../../www/apache24/buildlink3.mk"
PLIST.apache= yes
.else
CMAKE_ARGS+= -DWITH_APACHE:BOOL=OFF
.endif
.if !empty(PKG_OPTIONS:Mmysql)
CMAKE_ARGS+= -DWITH_MYSQL:BOOL=ON
.include "../../databases/mysql57-client/buildlink3.mk"
PLIST.mysql= yes
.else
CMAKE_ARGS+= -DWITH_MYSQL:BOOL=OFF
.endif
.if !empty(PKG_OPTIONS:Mnekoml)
CMAKE_ARGS+= -DWITH_NEKOML:BOOL=ON
PLIST.nekoml= yes
.else
CMAKE_ARGS+= -DWITH_NEKOML:BOOL=OFF
.endif
.if !empty(PKG_OPTIONS:Mregexp)
CMAKE_ARGS+= -DWITH_REGEXP:BOOL=ON
.include "../../devel/pcre/buildlink3.mk"
PLIST.regexp= yes
.else
CMAKE_ARGS+= -DWITH_REGEXP:BOOL=OFF
.endif
.if !empty(PKG_OPTIONS:Msqlite)
CMAKE_ARGS+= -DWITH_SQLITE:BOOL=ON
.include "../../databases/sqlite3/buildlink3.mk"
PLIST.sqlite= yes
.else
CMAKE_ARGS+= -DWITH_SQLITE:BOOL=OFF
.endif
.if !empty(PKG_OPTIONS:Mssl)
CMAKE_ARGS+= -DWITH_SSL:BOOL=ON
.include "../../security/mbedtls/buildlink3.mk"
PLIST.ssl= yes
.else
CMAKE_ARGS+= -DWITH_SSL:BOOL=OFF
.endif
.if !empty(PKG_OPTIONS:Mui)
CMAKE_ARGS+= -DWITH_UI:BOOL=ON
.include "../../x11/gtk2/buildlink3.mk"
PLIST.ui= yes
.else
CMAKE_ARGS+= -DWITH_UI:BOOL=OFF
.endif