diff --git a/lang/neko/Makefile b/lang/neko/Makefile index b1110225af49..25cbf5f6677f 100644 --- a/lang/neko/Makefile +++ b/lang/neko/Makefile @@ -20,91 +20,70 @@ ONLY_FOR_ARCHS= i386 amd64 USE_AUTOTOOLS= libtool:env USE_GMAKE= yes +USE_DOS2UNIX= yes +DOS2UNIX_REGEX= .*(Makefile|\.(c|h|neko|nml))$$ -OPTIONS= APACHE13 "Build with mod_neko for Apache 1.3.x" off \ - APACHE22 "Build with mod_neko for Apache 2.2.x" off \ - MYSQL4 "Build with MySQL 4.x library" off \ - MYSQL5 "Build with MySQL 5.x library" off \ - SQLITE3 "Build with Sqlite 3.x SQL library" off \ - PCRE "Build with PCRE library" on \ - GTK2 "Build with Gtk 2.x UI library" on +OPTIONS_DEFINE= APACHE MYSQL SQLITE PCRE GTK2 +OPTIONS_DEFAULT= PCRE GTK2 -.include +OPTIONS_SINGLE= MYSQL +OPTIONS_SINGLE_MYSQL= MYSQL4 MYSQL5 + +MYSQL4_DESC= Build against MySQL 4.1 +MYSQL5_DESC= Build against MySQL 5.1 + +.include CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -LIBKEYNAME= - -.if defined(WITH_APACHE13) && defined(WITH_APACHE22) -IGNORE= option APACHE13 and APACHE22 conflict -.endif - -.if defined(WITH_APACHE13) -BUILD_DEPENDS+= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13 -RUN_DEPENDS+= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13 -CFLAGS+= -I${LOCALBASE}/include/apache -PLIST_SUB+= APACHE13= -.else LIBKEYNAME+= mod_neko mod_tora -PLIST_SUB+= APACHE13="@comment " -.endif -.if defined(WITH_APACHE22) -BUILD_DEPENDS+= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache22 -RUN_DEPENDS+= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache22 +.if ${PORT_OPTIONS:MAPACHE} +USE_APACHE= 22 CFLAGS+= -I${LOCALBASE}/include/apache22 -PLIST_SUB+= APACHE22= +PLIST_SUB+= APACHE22="" .else LIBKEYNAME+= mod_neko2 mod_tora2 PLIST_SUB+= APACHE22="@comment " .endif -.if defined(WITH_MYSQL4) && defined(WITH_MYSQL5) -IGNORE= option MYSQL4 and MYSQL5 conflict -.endif - -.if defined(WITH_MYSQL4) -BUILD_DEPENDS+= mysql:${PORTSDIR}/databases/mysql41-client -RUN_DEPENDS+= mysql:${PORTSDIR}/databases/mysql41-client +.if ${PORT_OPTIONS:MMYSQL4} +USE_MYSQL= 41 CFLAGS+= -I${LOCALBASE}/include/mysql -PLIST_SUB+= MYSQL4= +PLIST_SUB+= MYSQL4="" .else LIBKEYNAME+= mysql PLIST_SUB+= MYSQL4="@comment " .endif -.if defined(WITH_MYSQL5) -BUILD_DEPENDS+= mysql:${PORTSDIR}/databases/mysql51-client -RUN_DEPENDS+= mysql:${PORTSDIR}/databases/mysql51-client +.if ${PORT_OPTIONS:MMYSQL5} +USE_MYSQL= 51 CFLAGS+= -I${LOCALBASE}/include/mysql -PLIST_SUB+= MYSQL5= +PLIST_SUB+= MYSQL5="" .else LIBKEYNAME+= mysql5 PLIST_SUB+= MYSQL5="@comment " .endif -.if defined(WITH_SQLITE3) -BUILD_DEPENDS+= sqlite3:${PORTSDIR}/databases/sqlite3 -RUN_DEPENDS+= sqlite3:${PORTSDIR}/databases/sqlite3 -PLIST_SUB+= SQLITE3= +.if ${PORT_OPTIONS:MSQLITE} +USE_SQLITE= yes +PLIST_SUB+= SQLITE3="" .else LIBKEYNAME+= sqlite PLIST_SUB+= SQLITE3="@comment " .endif -.if defined(WITH_PCRE) -BUILD_DEPENDS+= ${LOCALBASE}/include/pcre.h:${PORTSDIR}/devel/pcre -RUN_DEPENDS+= ${LOCALBASE}/include/pcre.h:${PORTSDIR}/devel/pcre -PLIST_SUB+= PCRE= +.if ${PORT_OPTIONS:MPCRE} +LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre +PLIST_SUB+= PCRE="" .else LIBKEYNAME+= regexp PLIST_SUB+= PCRE="@comment " .endif -.if defined(WITH_GTK2) -BUILD_DEPENDS+= ${LOCALBASE}/include/gtk-2.0:${PORTSDIR}/x11-toolkits/gtk20 -RUN_DEPENDS+= ${LOCALBASE}/include/gtk-2.0:${PORTSDIR}/x11-toolkits/gtk20 -PLIST_SUB+= GTK2= +.if ${PORT_OPTIONS:MGTK2} +USE_GNOME= gtk20 +PLIST_SUB+= GTK2="" .else LIBKEYNAME+= ui PLIST_SUB+= GTK2="@comment " @@ -140,24 +119,19 @@ post-patch: ${WRKSRC}/src/tools/install.neko .endfor .endif -.if defined(WITH_APACHE13) - @${REINPLACE_CMD} \ - -e 's,"/usr/include/apache-1.3","${PREFIX}/include/apache",' \ - ${WRKSRC}/src/tools/install.neko -.endif -.if defined(WITH_APACHE22) +.if ${PORT_OPTIONS:MAPACHE} @${REINPLACE_CMD} \ -e 's,"/usr/include/apache2","${PREFIX}/include/apache22",' \ ${WRKSRC}/src/tools/install.neko .endif -.if defined(WITH_GTK2) +.if ${PORT_OPTIONS:MGTK2} @${REINPLACE_CMD} \ -e 's,"/usr/include/gtk-2.0","${PREFIX}/include/gtk-2.0",' \ ${WRKSRC}/src/tools/install.neko @${REINPLACE_CMD} \ -e 's,NEKO_LINUX,NEKO_BSD,' ${WRKSRC}/libs/ui/ui.c .endif -.if ${ARCH} == "amd64" && defined(WITH_MYSQL4) +.if ${ARCH} == "amd64" && ${PORT_OPTIONS:MMYSQL4} @${ECHO_CMD} @${ECHO_CMD} "=======================================================" @${ECHO_CMD} @@ -169,7 +143,7 @@ post-patch: .endif post-install: -.if defined(WITH_APACHE13) || defined(WITH_APACHE22) +.if ${PORT_OPTIONS:MAPACHE} @${ECHO_CMD} @${ECHO_CMD} "=======================================================" @${ECHO_CMD} @@ -181,4 +155,4 @@ post-install: @${ECHO_CMD} .endif -.include +.include diff --git a/lang/neko/files/patch-libs_std_process.c b/lang/neko/files/patch-libs_std_process.c index 630efc7aed6f..3c5fad76475b 100644 --- a/lang/neko/files/patch-libs_std_process.c +++ b/lang/neko/files/patch-libs_std_process.c @@ -1,11 +1,11 @@ --- libs/std/process.c.orig 2009-06-19 00:08:00.000000000 +0900 +++ libs/std/process.c 2009-06-19 00:08:06.000000000 +0900 @@ -23,7 +23,7 @@ - # include - # include - # ifndef NEKO_MAC --# include -+# include - # endif - #endif - + # include + # include + # ifndef NEKO_MAC +-# include ++# include + # endif + #endif + diff --git a/lang/neko/files/patch-libs_std_sys.c b/lang/neko/files/patch-libs_std_sys.c index 118ae4f4c569..01d541309c4c 100644 --- a/lang/neko/files/patch-libs_std_sys.c +++ b/lang/neko/files/patch-libs_std_sys.c @@ -1,22 +1,22 @@ --- libs/std/sys.c.orig 2009-06-19 00:08:19.000000000 +0900 +++ libs/std/sys.c 2009-06-19 00:11:42.000000000 +0900 @@ -35,7 +35,9 @@ - # include - # include - # include + # include + # include + # include +#ifndef __FreeBSD__ - # include + # include +#endif - #endif - - #ifdef NEKO_MAC + #endif + + #ifdef NEKO_MAC @@ -123,6 +125,9 @@ - Set the locale for LC_TIME, returns true on success - **/ - static value set_time_locale( value l ) { + Set the locale for LC_TIME, returns true on success + **/ + static value set_time_locale( value l ) { +#ifdef __FreeBSD__ +#undef NEKO_POSIX +#endif - #ifdef NEKO_POSIX - locale_t lc, old; - val_check(l,string); + #ifdef NEKO_POSIX + locale_t lc, old; + val_check(l,string); diff --git a/lang/neko/pkg-plist b/lang/neko/pkg-plist index 13a379595e82..8d3af373c17d 100644 --- a/lang/neko/pkg-plist +++ b/lang/neko/pkg-plist @@ -6,8 +6,6 @@ bin/nekotools lib/libneko.so lib/neko/std.ndll lib/neko/zlib.ndll -%%APACHE13%%lib/neko/mod_neko.ndll -%%APACHE13%%lib/neko/mod_tora.ndll %%APACHE22%%lib/neko/mod_neko2.ndll %%APACHE22%%lib/neko/mod_tora2.ndll %%MYSQL4%%lib/neko/mysql.ndll