aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorohauer <ohauer@FreeBSD.org>2012-09-06 13:22:27 +0800
committerohauer <ohauer@FreeBSD.org>2012-09-06 13:22:27 +0800
commit0bd4504c1ad242dbdb7b203b782e835cc110ccab (patch)
treea9e2ff51350c8fbed50badc3f892fe83739823df
parenta67edb41552acaa9fe6f544c554da909606e274a (diff)
downloadfreebsd-ports-gnome-0bd4504c1ad242dbdb7b203b782e835cc110ccab.tar.gz
freebsd-ports-gnome-0bd4504c1ad242dbdb7b203b782e835cc110ccab.tar.zst
freebsd-ports-gnome-0bd4504c1ad242dbdb7b203b782e835cc110ccab.zip
- 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
-rw-r--r--lang/neko/Makefile94
-rw-r--r--lang/neko/files/patch-libs_std_process.c16
-rw-r--r--lang/neko/files/patch-libs_std_sys.c26
-rw-r--r--lang/neko/pkg-plist2
4 files changed, 55 insertions, 83 deletions
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 <bsd.port.pre.mk>
+OPTIONS_SINGLE= MYSQL
+OPTIONS_SINGLE_MYSQL= MYSQL4 MYSQL5
-CFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-LIBKEYNAME=
+MYSQL4_DESC= Build against MySQL 4.1
+MYSQL5_DESC= Build against MySQL 5.1
-.if defined(WITH_APACHE13) && defined(WITH_APACHE22)
-IGNORE= option APACHE13 and APACHE22 conflict
-.endif
+.include <bsd.port.options.mk>
-.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
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
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 <bsd.port.post.mk>
+.include <bsd.port.mk>
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 <unistd.h>
- # include <errno.h>
- # ifndef NEKO_MAC
--# include <wait.h>
-+# include <sys/wait.h>
- # endif
- #endif
-
+ # include <unistd.h>
+ # include <errno.h>
+ # ifndef NEKO_MAC
+-# include <wait.h>
++# include <sys/wait.h>
+ # 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 <termios.h>
- # include <sys/time.h>
- # include <sys/times.h>
+ # include <termios.h>
+ # include <sys/time.h>
+ # include <sys/times.h>
+#ifndef __FreeBSD__
- # include <xlocale.h>
+ # include <xlocale.h>
+#endif
- #endif
-
- #ifdef NEKO_MAC
+ #endif
+
+ #ifdef NEKO_MAC
@@ -123,6 +125,9 @@
- <doc>Set the locale for LC_TIME, returns true on success</doc>
- **/
- static value set_time_locale( value l ) {
+ <doc>Set the locale for LC_TIME, returns true on success</doc>
+ **/
+ 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