- remove apache13 support

- use DOS2UNIX macro
- rewrite for options NG
- use USE_XXX macros instead (BUILD|RUN)_DEPENDS

PR:		170752
Submitted by:	ohauer@
Approved by:	maintainer timeout
This commit is contained in:
Olli Hauer 2012-09-06 05:22:27 +00:00
parent 7efb9d3e37
commit 7ac87c1460
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=303739
4 changed files with 55 additions and 83 deletions

View file

@ -20,91 +20,70 @@ ONLY_FOR_ARCHS= i386 amd64
USE_AUTOTOOLS= libtool:env USE_AUTOTOOLS= libtool:env
USE_GMAKE= yes 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 \ OPTIONS_DEFINE= APACHE MYSQL SQLITE PCRE GTK2
APACHE22 "Build with mod_neko for Apache 2.2.x" off \ OPTIONS_DEFAULT= PCRE GTK2
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
.include <bsd.port.pre.mk> OPTIONS_SINGLE= MYSQL
OPTIONS_SINGLE_MYSQL= MYSQL4 MYSQL5
MYSQL4_DESC= Build against MySQL 4.1
MYSQL5_DESC= Build against MySQL 5.1
.include <bsd.port.options.mk>
CFLAGS+= -I${LOCALBASE}/include CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib 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 LIBKEYNAME+= mod_neko mod_tora
PLIST_SUB+= APACHE13="@comment "
.endif
.if defined(WITH_APACHE22) .if ${PORT_OPTIONS:MAPACHE}
BUILD_DEPENDS+= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache22 USE_APACHE= 22
RUN_DEPENDS+= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache22
CFLAGS+= -I${LOCALBASE}/include/apache22 CFLAGS+= -I${LOCALBASE}/include/apache22
PLIST_SUB+= APACHE22= PLIST_SUB+= APACHE22=""
.else .else
LIBKEYNAME+= mod_neko2 mod_tora2 LIBKEYNAME+= mod_neko2 mod_tora2
PLIST_SUB+= APACHE22="@comment " PLIST_SUB+= APACHE22="@comment "
.endif .endif
.if defined(WITH_MYSQL4) && defined(WITH_MYSQL5) .if ${PORT_OPTIONS:MMYSQL4}
IGNORE= option MYSQL4 and MYSQL5 conflict USE_MYSQL= 41
.endif
.if defined(WITH_MYSQL4)
BUILD_DEPENDS+= mysql:${PORTSDIR}/databases/mysql41-client
RUN_DEPENDS+= mysql:${PORTSDIR}/databases/mysql41-client
CFLAGS+= -I${LOCALBASE}/include/mysql CFLAGS+= -I${LOCALBASE}/include/mysql
PLIST_SUB+= MYSQL4= PLIST_SUB+= MYSQL4=""
.else .else
LIBKEYNAME+= mysql LIBKEYNAME+= mysql
PLIST_SUB+= MYSQL4="@comment " PLIST_SUB+= MYSQL4="@comment "
.endif .endif
.if defined(WITH_MYSQL5) .if ${PORT_OPTIONS:MMYSQL5}
BUILD_DEPENDS+= mysql:${PORTSDIR}/databases/mysql51-client USE_MYSQL= 51
RUN_DEPENDS+= mysql:${PORTSDIR}/databases/mysql51-client
CFLAGS+= -I${LOCALBASE}/include/mysql CFLAGS+= -I${LOCALBASE}/include/mysql
PLIST_SUB+= MYSQL5= PLIST_SUB+= MYSQL5=""
.else .else
LIBKEYNAME+= mysql5 LIBKEYNAME+= mysql5
PLIST_SUB+= MYSQL5="@comment " PLIST_SUB+= MYSQL5="@comment "
.endif .endif
.if defined(WITH_SQLITE3) .if ${PORT_OPTIONS:MSQLITE}
BUILD_DEPENDS+= sqlite3:${PORTSDIR}/databases/sqlite3 USE_SQLITE= yes
RUN_DEPENDS+= sqlite3:${PORTSDIR}/databases/sqlite3 PLIST_SUB+= SQLITE3=""
PLIST_SUB+= SQLITE3=
.else .else
LIBKEYNAME+= sqlite LIBKEYNAME+= sqlite
PLIST_SUB+= SQLITE3="@comment " PLIST_SUB+= SQLITE3="@comment "
.endif .endif
.if defined(WITH_PCRE) .if ${PORT_OPTIONS:MPCRE}
BUILD_DEPENDS+= ${LOCALBASE}/include/pcre.h:${PORTSDIR}/devel/pcre LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
RUN_DEPENDS+= ${LOCALBASE}/include/pcre.h:${PORTSDIR}/devel/pcre PLIST_SUB+= PCRE=""
PLIST_SUB+= PCRE=
.else .else
LIBKEYNAME+= regexp LIBKEYNAME+= regexp
PLIST_SUB+= PCRE="@comment " PLIST_SUB+= PCRE="@comment "
.endif .endif
.if defined(WITH_GTK2) .if ${PORT_OPTIONS:MGTK2}
BUILD_DEPENDS+= ${LOCALBASE}/include/gtk-2.0:${PORTSDIR}/x11-toolkits/gtk20 USE_GNOME= gtk20
RUN_DEPENDS+= ${LOCALBASE}/include/gtk-2.0:${PORTSDIR}/x11-toolkits/gtk20 PLIST_SUB+= GTK2=""
PLIST_SUB+= GTK2=
.else .else
LIBKEYNAME+= ui LIBKEYNAME+= ui
PLIST_SUB+= GTK2="@comment " PLIST_SUB+= GTK2="@comment "
@ -140,24 +119,19 @@ post-patch:
${WRKSRC}/src/tools/install.neko ${WRKSRC}/src/tools/install.neko
.endfor .endfor
.endif .endif
.if defined(WITH_APACHE13) .if ${PORT_OPTIONS:MAPACHE}
@${REINPLACE_CMD} \
-e 's,"/usr/include/apache-1.3","${PREFIX}/include/apache",' \
${WRKSRC}/src/tools/install.neko
.endif
.if defined(WITH_APACHE22)
@${REINPLACE_CMD} \ @${REINPLACE_CMD} \
-e 's,"/usr/include/apache2","${PREFIX}/include/apache22",' \ -e 's,"/usr/include/apache2","${PREFIX}/include/apache22",' \
${WRKSRC}/src/tools/install.neko ${WRKSRC}/src/tools/install.neko
.endif .endif
.if defined(WITH_GTK2) .if ${PORT_OPTIONS:MGTK2}
@${REINPLACE_CMD} \ @${REINPLACE_CMD} \
-e 's,"/usr/include/gtk-2.0","${PREFIX}/include/gtk-2.0",' \ -e 's,"/usr/include/gtk-2.0","${PREFIX}/include/gtk-2.0",' \
${WRKSRC}/src/tools/install.neko ${WRKSRC}/src/tools/install.neko
@${REINPLACE_CMD} \ @${REINPLACE_CMD} \
-e 's,NEKO_LINUX,NEKO_BSD,' ${WRKSRC}/libs/ui/ui.c -e 's,NEKO_LINUX,NEKO_BSD,' ${WRKSRC}/libs/ui/ui.c
.endif .endif
.if ${ARCH} == "amd64" && defined(WITH_MYSQL4) .if ${ARCH} == "amd64" && ${PORT_OPTIONS:MMYSQL4}
@${ECHO_CMD} @${ECHO_CMD}
@${ECHO_CMD} "=======================================================" @${ECHO_CMD} "======================================================="
@${ECHO_CMD} @${ECHO_CMD}
@ -169,7 +143,7 @@ post-patch:
.endif .endif
post-install: post-install:
.if defined(WITH_APACHE13) || defined(WITH_APACHE22) .if ${PORT_OPTIONS:MAPACHE}
@${ECHO_CMD} @${ECHO_CMD}
@${ECHO_CMD} "=======================================================" @${ECHO_CMD} "======================================================="
@${ECHO_CMD} @${ECHO_CMD}
@ -181,4 +155,4 @@ post-install:
@${ECHO_CMD} @${ECHO_CMD}
.endif .endif
.include <bsd.port.post.mk> .include <bsd.port.mk>

View file

@ -1,11 +1,11 @@
--- libs/std/process.c.orig 2009-06-19 00:08:00.000000000 +0900 --- 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 +++ libs/std/process.c 2009-06-19 00:08:06.000000000 +0900
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
# include <unistd.h> # include <unistd.h>
# include <errno.h> # include <errno.h>
# ifndef NEKO_MAC # ifndef NEKO_MAC
-# include <wait.h> -# include <wait.h>
+# include <sys/wait.h> +# include <sys/wait.h>
# endif # endif
#endif #endif

View file

@ -1,22 +1,22 @@
--- libs/std/sys.c.orig 2009-06-19 00:08:19.000000000 +0900 --- 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 +++ libs/std/sys.c 2009-06-19 00:11:42.000000000 +0900
@@ -35,7 +35,9 @@ @@ -35,7 +35,9 @@
# include <termios.h> # include <termios.h>
# include <sys/time.h> # include <sys/time.h>
# include <sys/times.h> # include <sys/times.h>
+#ifndef __FreeBSD__ +#ifndef __FreeBSD__
# include <xlocale.h> # include <xlocale.h>
+#endif +#endif
#endif #endif
#ifdef NEKO_MAC #ifdef NEKO_MAC
@@ -123,6 +125,9 @@ @@ -123,6 +125,9 @@
<doc>Set the locale for LC_TIME, returns true on success</doc> <doc>Set the locale for LC_TIME, returns true on success</doc>
**/ **/
static value set_time_locale( value l ) { static value set_time_locale( value l ) {
+#ifdef __FreeBSD__ +#ifdef __FreeBSD__
+#undef NEKO_POSIX +#undef NEKO_POSIX
+#endif +#endif
#ifdef NEKO_POSIX #ifdef NEKO_POSIX
locale_t lc, old; locale_t lc, old;
val_check(l,string); val_check(l,string);

View file

@ -6,8 +6,6 @@ bin/nekotools
lib/libneko.so lib/libneko.so
lib/neko/std.ndll lib/neko/std.ndll
lib/neko/zlib.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_neko2.ndll
%%APACHE22%%lib/neko/mod_tora2.ndll %%APACHE22%%lib/neko/mod_tora2.ndll
%%MYSQL4%%lib/neko/mysql.ndll %%MYSQL4%%lib/neko/mysql.ndll