Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jul 2017 20:44:05 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r445964 - head/www/rubygem-passenger
Message-ID:  <201707152044.v6FKi5Ku051583@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sunpoet
Date: Sat Jul 15 20:44:05 2017
New Revision: 445964
URL: https://svnweb.freebsd.org/changeset/ports/445964

Log:
  Convert to options helper
  
  Approved by:	portmgr (blanket)

Modified:
  head/www/rubygem-passenger/Makefile

Modified: head/www/rubygem-passenger/Makefile
==============================================================================
--- head/www/rubygem-passenger/Makefile	Sat Jul 15 20:44:00 2017	(r445963)
+++ head/www/rubygem-passenger/Makefile	Sat Jul 15 20:44:05 2017	(r445964)
@@ -31,12 +31,8 @@ RAKE_BIN=	${LOCALBASE}/bin/rake
 USES=		cpe gem
 NOPORTDOCS=	yes
 
-.include <bsd.port.options.mk>
+APACHE22_USE=	APACHE=22+
 
-.if ${PORT_OPTIONS:MAPACHE22}
-USE_APACHE=	22+
-.endif
-
 LIB_DEPENDS+=	libuv.so:devel/libuv \
 		libcurl.so:ftp/curl
 BUILD_DEPENDS+=	rubygem-rack16>=0:www/rubygem-rack16
@@ -52,21 +48,11 @@ PLIST_FILES=	bin/passenger \
 		bin/passenger-status \
 		bin/passenger-install-nginx-module
 
-.if ${PORT_OPTIONS:MSYMLINK}
-PLIST_FILES+=	${GEMS_DIR}/${PORTNAME}
-SUB_LIST+=	PASSENGER_INSTALL_DIR="${PREFIX}/${GEMS_DIR}/${PORTNAME}"
-.else
-SUB_LIST+=	PASSENGER_INSTALL_DIR="${PREFIX}/${GEM_LIB_DIR}"
-.endif
+SYMLINK_PLIST_FILES=	${GEMS_DIR}/${PORTNAME}
+SYMLINK_SUB_LIST=	PASSENGER_INSTALL_DIR="${PREFIX}/${GEMS_DIR}/${PORTNAME}"
+SYMLINK_SUB_LIST_OFF=	PASSENGER_INSTALL_DIR="${PREFIX}/${GEM_LIB_DIR}"
 
 pre-patch:
-.if ${PORT_OPTIONS:MNGINX}
-	@${ECHO_CMD}
-	@${ECHO_CMD} "Do not forget compile www/nginx"
-	@${ECHO_CMD} "with PASSENGER_MODULE support"
-	@${ECHO_CMD}
-.endif
-
 	@${REINPLACE_CMD} \
 		's!-Wall!!g; \
 		s!gcc!${CC}!g; \
@@ -76,30 +62,34 @@ pre-patch:
 		s! -feliminate-unused-debug-symbols -feliminate-unused-debug-types!!g; \
 		166s!true!false!' \
 		${WRKSRC}/build/basics.rb
-.if ${PORT_OPTIONS:NDEBUG}
+
+pre-patch-DEBUG-off:
 	@${REINPLACE_CMD} \
 		's!-DPASSENGER_DEBUG!-DNDEBUG!g' \
 		${WRKSRC}/build/basics.rb
-.endif
 
+pre-patch-NGINX-on:
+	@${ECHO_CMD}
+	@${ECHO_CMD} "Do not forget compile www/nginx"
+	@${ECHO_CMD} "with PASSENGER_MODULE support"
+	@${ECHO_CMD}
+
 post-build:
-.if ${PORT_OPTIONS:MAPACHE22}
+	${FIND} ${WRKSRC} -name '*.o' -delete
+	${FIND} ${WRKSRC} -name '*.bak' -delete
+
+post-build-APACHE22-on:
 	(CC=${CC} CXX=${CXX} ${WRKSRC}/bin/passenger-install-apache2-module --auto)
-.endif
 
-.if ${PORT_OPTIONS:MNGINX}
+post-build-NGINX-on:
 	(cd ${WRKSRC} && CC=${CC} CXX=${CXX} ${RAKE_BIN} nginx)
-.endif
 
-	${FIND} ${WRKSRC} -name '*.o' -delete
-	${FIND} ${WRKSRC} -name '*.bak' -delete
-
 post-install:
 	( cd ${WRKSRC} && \
 	${COPYTREE_SHARE} buildout ${STAGEDIR}${PREFIX}/${GEMS_DIR}/${PORTNAME}-${PORTVERSION} )
 	${CHMOD} +x ${STAGEDIR}${PREFIX}/${GEMS_DIR}/${PORTNAME}-${PORTVERSION}/buildout/support-binaries/*
-.if ${PORT_OPTIONS:MSYMLINK}
+
+post-install-SYMLINK-on:
 	${LN} -s ${GEM_NAME} ${STAGEDIR}${PREFIX}/${GEMS_DIR}/${PORTNAME}
-.endif
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707152044.v6FKi5Ku051583>