Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2014 18:47:12 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r368063 - in head/www/resin3: . files
Message-ID:  <201409121847.s8CIlCBQ095544@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Fri Sep 12 18:47:11 2014
New Revision: 368063
URL: http://svnweb.freebsd.org/changeset/ports/368063
QAT: https://qat.redports.org/buildarchive/r368063/

Log:
  - Convert to USES=libtool and USES=python
  - Move some variable definitions in front of bsd.port.options.mk
  - Fix references to STAGEDIR in installed files
  - Put pid file in /var/run and log file in /var/log
  - Use @sample
  - Use @owner/@group
  - White space fixes

Modified:
  head/www/resin3/Makefile
  head/www/resin3/files/patch-configure
  head/www/resin3/pkg-plist

Modified: head/www/resin3/Makefile
==============================================================================
--- head/www/resin3/Makefile	Fri Sep 12 18:46:54 2014	(r368062)
+++ head/www/resin3/Makefile	Fri Sep 12 18:47:11 2014	(r368063)
@@ -3,6 +3,7 @@
 
 PORTNAME=	resin
 PORTVERSION=	3.1.14
+PORTREVISION=	1
 CATEGORIES=	www java
 MASTER_SITES=	http://www.caucho.com/download/
 
@@ -14,104 +15,87 @@ LICENSE=	GPLv2
 OPTIONS_DEFINE=	APACHE22
 APACHE22_DESC=	Use Apache 2.2
 
-.include <bsd.port.options.mk>
+GNU_CONFIGURE=	yes
+USES=		libtool python
+USE_JAVA=	yes
+JAVA_VERSION=	1.6+
+USE_OPENSSL=	yes
+USE_LDCONFIG=	yes
+
+# Pass JAVA_HOME as determined by bsd.java.mk
+CONFIGURE_ARGS=	--with-java-home=${JAVA_HOME} \
+		--with-openssl-lib=${OPENSSLLIB} \
+		--with-openssl-include=${OPENSSLINC}
 
-USE_JAVA=		yes
-JAVA_VERSION=		1.6+
-HAS_CONFIGURE=		yes
-USE_PYTHON=		yes
-USE_OPENSSL=		yes
-USE_AUTOTOOLS=		libtool
-USE_LDCONFIG=		yes
-
-USERS=	www
-GROUPS=	www
-SHAREOWN=	www
-SHAREGRP=	www
+USERS=		www
+GROUPS=		www
+
+PLIST_SUB=	APP_NAME=${APP_NAME} \
+		APXS=${APXS} \
+		GROUPS=${GROUPS} \
+		USERS=${USERS}
+
+SUB_LIST=	APP_HOME=${APP_HOME} \
+		APP_NAME=${APP_NAME} \
+		GROUPS=${GROUPS} \
+		LOG_FILE=${LOG_FILE} \
+		PID_FILE=${PID_FILE} \
+		PORT=${PORT} \
+		PYTHON_CMD=${PYTHON_CMD} \
+		USERS=${USERS}
 
 # Customizable settings
 PORT?=			8080
 # Do not use PKGNAMESUFFIX here because version info is already in PORTVERSION
 # If we used PKGNAMESUFFIX, the package name would be resin2-2.1.11
-APP_NAME_SUFFIX=	${PORTVERSION:C/\..*$//}
-APP_NAME?=		${PORTNAME}${APP_NAME_SUFFIX}
-LATEST_LINK=		${APP_NAME}
-APP_HOME?=		${STAGEDIR}${PREFIX}/${APP_NAME}
-PID_FILE?=		${APP_HOME}/${APP_NAME}.pid
-LOG_FILE?=		${APP_HOME}/${APP_NAME}.log
+APP_NAME_SUFFIX=${PORTVERSION:C/\..*$//}
+APP_NAME?=	${PORTNAME}${APP_NAME_SUFFIX}
+APP_HOME?=	${PREFIX}/${APP_NAME}
+PID_FILE?=	/var/run/${APP_NAME}.pid
+LOG_FILE?=	/var/log/${APP_NAME}.log
 
 # Other settings
-APXS?=			${LOCALBASE}/sbin/apxs
-SUB_FILES=		pkg-message resin3ctl
+APXS?=		${LOCALBASE}/sbin/apxs
+SUB_FILES=	pkg-message resin3ctl
 USE_RC_SUBR=	resin3
 
-.include <bsd.port.pre.mk>
-
-# Pass JAVA_HOME as determined by bsd.java.mk
-CONFIGURE_ARGS+=	--with-java-home=${JAVA_HOME} \
-			--with-openssl-lib=${OPENSSLLIB} \
-			--with-openssl-include=${OPENSSLINC}
-LDFLAGS+=		-L${OPENSSLLIB} -lcrypto -lssl
-# We need to link with cc instead of ld for the FreeBSD specific options used
-# by threading libraries
-CONFIGURE_ENV=		LD=${CC} LIBTOOL=${LIBTOOL}
+.include <bsd.port.options.mk>
 
 # Install the Apache plugin if needed
 .if ${PORT_OPTIONS:MAPACHE22}
-BUILD_DEPENDS+=		${APXS}:${PORTSDIR}/www/apache22
-CONFIGURE_ARGS+=	--with-apxs=${APXS}
-PLIST_SUB+=		MOD_DIR=libexec/apache22
+BUILD_DEPENDS+=	${APXS}:${PORTSDIR}/www/apache22
+CONFIGURE_ARGS+=--with-apxs=${APXS}
+PLIST_SUB+=	MOD_DIR=libexec/apache22
 # Allow apxs invocations
-PLIST_SUB+=		APACHE=""
+PLIST_SUB+=	APACHE=""
 .else
-PLIST_SUB+=		MOD_DIR="@comment "
+PLIST_SUB+=	MOD_DIR="@comment "
 # Prevent apxs invocations
-PLIST_SUB+=		APACHE="@comment "
+PLIST_SUB+=	APACHE="@comment "
 .endif
 
-PLIST_SUB+=	APP_NAME=${APP_NAME} \
-		APXS=${APXS} \
-		GROUPS=${GROUPS} \
-		USERS=${USERS}
-
-SUB_LIST=	APP_HOME=${APP_HOME} \
-		APP_NAME=${APP_NAME} \
-		GROUPS=${GROUPS} \
-		LOCALBASE=${LOCALBASE} \
-		LOG_FILE=${LOG_FILE} \
-		PID_FILE=${PID_FILE} \
-		PORT=${PORT} \
-		PREFIX=${STAGEDIR}${PREFIX} \
-		PYTHON_CMD=${PYTHON_CMD} \
-		USERS=${USERS}
-
 post-extract:
 	@${MKDIR} ${WRKSRC}/webapps/resin-doc
 	@${TAR} xf ${WRKSRC}/webapps/resin-doc.war -C ${WRKSRC}/webapps/resin-doc && ${RM} ${WRKSRC}/webapps/resin-doc.war
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|$${resin.home}/conf/app-default.xml|${STAGEDIR}${PREFIX}/etc/${APP_NAME}/app-default.xml|' \
+	@${REINPLACE_CMD} -e 's|$${resin.home}/conf/app-default.xml|${PREFIX}/etc/${APP_NAME}/app-default.xml|' \
 		${WRKSRC}/conf/resin.conf
 
 post-build:
-	cd ${WRKSRC}/modules/c/src/resin_os && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} install
+	(cd ${WRKSRC}/modules/c/src/resin_os && ${SETENV} ${MAKE_ENV} \
+		${MAKE_CMD} ${MAKE_ARGS} install)
 
 # Resin does not handle installation, so proceed now
 do-install:
-#.for i in ${APP_HOME} ${APP_HOME}/lib ${STAGEDIR}${PREFIX}/etc/${APP_NAME}
-#	@install -d -g ${WWWOWN} -o ${WWWGRP} ${i}
-#.endfor
-	install -d -g ${WWWOWN} -o ${WWWGRP} ${i} ${APP_HOME} ${APP_HOME}/lib ${STAGEDIR}${PREFIX}/etc/${APP_NAME}
-	${ECHO_MSG} "   Installing local configuration file: ${STAGEDIR}${PREFIX}/etc/${APP_NAME}/resin.xml"
-	${INSTALL_DATA} ${WRKSRC}/conf/resin.conf ${STAGEDIR}${PREFIX}/etc/${APP_NAME}/resin.xml 
-	${INSTALL_DATA} ${WRKSRC}/conf/resin.conf ${STAGEDIR}${PREFIX}/etc/${APP_NAME}/resin.xml-dist
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc/${APP_NAME}
+	${INSTALL_DATA} ${WRKSRC}/conf/resin.conf ${STAGEDIR}${PREFIX}/etc/${APP_NAME}/resin.xml.sample
 	${INSTALL_DATA} ${WRKSRC}/conf/app-default.xml ${STAGEDIR}${PREFIX}/etc/${APP_NAME}
 	${INSTALL_SCRIPT} ${WRKDIR}/resin3ctl ${STAGEDIR}${PREFIX}/sbin
-	cd ${WRKSRC}/webapps && ${COPYTREE_SHARE} . ${APP_HOME}/webapps
-	cd ${WRKSRC}/lib  && ${COPYTREE_SHARE} . ${APP_HOME}/lib
-
+	(cd ${WRKSRC}/webapps && ${COPYTREE_SHARE} . ${STAGEDIR}${APP_HOME}/webapps)
+	(cd ${WRKSRC}/lib  && ${COPYTREE_SHARE} . ${STAGEDIR}${APP_HOME}/lib)
 .if ${PORT_OPTIONS:MAPACHE22}
 	${APXS} -i -n caucho -a ${WRKSRC}/modules/c/src/apache2/.libs/mod_caucho.so
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/www/resin3/files/patch-configure
==============================================================================
--- head/www/resin3/files/patch-configure	Fri Sep 12 18:46:54 2014	(r368062)
+++ head/www/resin3/files/patch-configure	Fri Sep 12 18:47:11 2014	(r368063)
@@ -1,51 +1,6 @@
 --- configure.orig	2012-11-08 21:22:27.000000000 +0100
 +++ configure	2013-02-07 12:28:12.000000000 +0100
-@@ -7585,11 +7585,6 @@
- 
- 
- 
--# This can be used to rebuild libtool when needed
--LIBTOOL_DEPS="$ltmain"
--
--# Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
- 
- 
- 
-@@ -11464,29 +11459,9 @@
- # Only expand once:
- 
- 
--#
--# libtool stuff
--#
--if test -z "${LTFLAGS}"; then
--  LTFLAGS="--silent"
--fi
--
--LIBTOOL_SCRIPT="`pwd`/libtool"
--LIBTOOL="${LIBTOOL_SCRIPT} ${LTFLAGS}"
--libtoolversion=`${SHELL} ${LIBTOOL_SCRIPT} --version`
--case $libtoolversion in
--     *1.4*)
--       SH_LIBTOOL="${LIBTOOL_SCRIPT}"
--       SHLTCFLAGS="-prefer-pic"
--       LTCFLAGS="-prefer-non-pic -static"
--       ;;
--     *)
--       SH_LIBTOOL="${SHELL} ${LIBTOOL_SCRIPT} ${LTFLAGS}"
--       SHLTCFLAGS=""
--       LTCFLAGS=""
--       ;;
--esac
--
-+SH_LIBTOOL="${SHELL} ${LIBTOOL}"
-+SHLTCFLAGS=""
-+LTCFLAGS=""
- 
- 
- 
-@@ -12271,26 +12246,6 @@
+@@ -12271,26 +12271,6 @@
    *freebsd*)
  	PROXY_LIBS='-lpthread'
          jni_os=freebsd

Modified: head/www/resin3/pkg-plist
==============================================================================
--- head/www/resin3/pkg-plist	Fri Sep 12 18:46:54 2014	(r368062)
+++ head/www/resin3/pkg-plist	Fri Sep 12 18:47:11 2014	(r368063)
@@ -1,4 +1,7 @@
-etc/resin3/app-default.xml
+etc/%%APP_NAME%%/app-default.xml
+@sample etc/%%APP_NAME%%/resin.xml.sample
+@owner %%USERS%%
+@group %%GROUPS%%
 %%APP_NAME%%/lib/activation.jar
 %%APP_NAME%%/lib/ejb-15.jar
 %%APP_NAME%%/lib/hessian.jar
@@ -749,14 +752,6 @@ etc/resin3/app-default.xml
 %%APP_NAME%%/webapps/resin-doc/pdf/resin-reference.xml
 %%APP_NAME%%/webapps/resin-doc/pdf/xml2pdf.xsl
 %%APP_NAME%%/webapps/resin-doc/toc.xml
-sbin/resin3ctl
-%%MOD_DIR%%/mod_caucho.so
-%%APACHE%%@exec %%APXS%% -e -a -n caucho %f
-%%APACHE%%@unexec %%APXS%% -e -A -n caucho %f
-@unexec if cmp -s %D/etc/%%APP_NAME%%/resin.xml %D/etc/%%APP_NAME%%/resin.xml-dist; then rm -f %D/etc/%%APP_NAME%%/resin.xml ; %else echo If permanently deleting this package, %D/etc/%%APP_NAME%%/resin.xml must be removed manually; fi
-etc/%%APP_NAME%%/resin.xml-dist
-@exec if test -f %B/resin.xml ; then echo Keeping %B/resin.xml intact from previous installation; else cp %F %B/resin.xml; fi
-@exec chown -R %%USERS%%:%%GROUPS%% %D/%%APP_NAME%%
 @dirrm %%APP_NAME%%/webapps/resin-doc/pdf
 @dirrm %%APP_NAME%%/webapps/resin-doc/images
 @dirrm %%APP_NAME%%/webapps/resin-doc/examples/soa-services/WEB-INF/classes/example
@@ -1076,4 +1071,10 @@ etc/%%APP_NAME%%/resin.xml-dist
 @dirrm %%APP_NAME%%/webapps
 @dirrm %%APP_NAME%%/lib
 @dirrm %%APP_NAME%%
-@dirrm etc/resin3
+@owner root
+@group wheel
+sbin/resin3ctl
+%%MOD_DIR%%/mod_caucho.so
+%%APACHE%%@exec %%APXS%% -e -a -n caucho %f
+%%APACHE%%@unexec %%APXS%% -e -A -n caucho %f
+@dirrm etc/%%APP_NAME%%



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