Bug 170752 - lang/neko: use new option framework, remove apache13 support
Summary: lang/neko: use new option framework, remove apache13 support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Olli Hauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-18 19:50 UTC by Olli Hauer
Modified: 2012-09-06 06:30 UTC (History)
1 user (show)

See Also:


Attachments
neko.diff (4.62 KB, patch)
2012-08-18 19:50 UTC, Olli Hauer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olli Hauer freebsd_committer freebsd_triage 2012-08-18 19:50:07 UTC
Use the new option framework, additional www/apache13 is gone 
since a while, so remove apache13 support from the port.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-18 21:24:34 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ohauer

Submitter has GNATS access (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-18 21:24:36 UTC
Maintainer of lang/neko,

Please note that PR ports/170752 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/170752

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-18 21:24:37 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 dfilter service freebsd_committer freebsd_triage 2012-09-06 06:22:42 UTC
Author: ohauer
Date: Thu Sep  6 05:22:27 2012
New Revision: 303739
URL: http://svn.freebsd.org/changeset/ports/303739

Log:
  - 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

Modified:
  head/lang/neko/Makefile   (contents, props changed)
  head/lang/neko/files/patch-libs_std_process.c   (contents, props changed)
  head/lang/neko/files/patch-libs_std_sys.c   (contents, props changed)
  head/lang/neko/pkg-plist   (contents, props changed)

Modified: head/lang/neko/Makefile
==============================================================================
--- head/lang/neko/Makefile	Thu Sep  6 05:16:51 2012	(r303738)
+++ head/lang/neko/Makefile	Thu Sep  6 05:22:27 2012	(r303739)
@@ -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>

Modified: head/lang/neko/files/patch-libs_std_process.c
==============================================================================
--- head/lang/neko/files/patch-libs_std_process.c	Thu Sep  6 05:16:51 2012	(r303738)
+++ head/lang/neko/files/patch-libs_std_process.c	Thu Sep  6 05:22:27 2012	(r303739)
@@ -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
+ 

Modified: head/lang/neko/files/patch-libs_std_sys.c
==============================================================================
--- head/lang/neko/files/patch-libs_std_sys.c	Thu Sep  6 05:16:51 2012	(r303738)
+++ head/lang/neko/files/patch-libs_std_sys.c	Thu Sep  6 05:22:27 2012	(r303739)
@@ -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);

Modified: head/lang/neko/pkg-plist
==============================================================================
--- head/lang/neko/pkg-plist	Thu Sep  6 05:16:51 2012	(r303738)
+++ head/lang/neko/pkg-plist	Thu Sep  6 05:22:27 2012	(r303739)
@@ -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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Olli Hauer freebsd_committer freebsd_triage 2012-09-06 06:26:41 UTC
State Changed
From-To: feedback->closed

Committed!