aboutsummaryrefslogtreecommitdiff
path: root/net/boinc-client/Makefile
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2013-08-27 21:37:47 +0000
committerRene Ladan <rene@FreeBSD.org>2013-08-27 21:37:47 +0000
commitbad740c6d46c46860f9b7aae6206920ba5b6b03b (patch)
treedbd82b8540b7dce6decc4d91dc464a56665c1445 /net/boinc-client/Makefile
parent001ea1587e1490d30d0b265c1395142e8177fa59 (diff)
downloadports-bad740c6d46c46860f9b7aae6206920ba5b6b03b.tar.gz
ports-bad740c6d46c46860f9b7aae6206920ba5b6b03b.zip
Overhaul option handling:
- Only use the rc framework for boinc-client when the CLIENT option is selected - Always set CLIENT and X11 options when MANAGER option is selected - Unset USER option when CLIENT option is not selected - Create the share/boinc directory when the MANAGER or X11 option is set instead of when the USER option is set - Prefer negation over empty() when checking options - Update description for the USER option In pkg-install.in : - Only install the CA bundle and only adjust file ownership of ~boinc when the USER option is selected - Only install skins when both the USER and MANAGER options are selected While here: - create share/pixmaps in PREFIX instead of LOCALBASE - wrap a long line PR: ports/176724 (part) Submitted by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
Notes
Notes: svn path=/head/; revision=325489
Diffstat (limited to 'net/boinc-client/Makefile')
-rw-r--r--net/boinc-client/Makefile33
1 files changed, 16 insertions, 17 deletions
diff --git a/net/boinc-client/Makefile b/net/boinc-client/Makefile
index 0a809393bc75..d68109fbea3d 100644
--- a/net/boinc-client/Makefile
+++ b/net/boinc-client/Makefile
@@ -33,8 +33,6 @@ SUB_LIST= BOINC_CLIENT_HOME="${BOINC_CLIENT_HOME}" \
BOINC_CLIENT_GROUP="${BOINC_CLIENT_GROUP}" \
PREFIX="${PREFIX}" LOCALBASE="${LOCALBASE}"
-USE_RC_SUBR= boinc-client
-
CONFIGURE_ARGS= --disable-server
CPPFLAGS+= -I${LOCALBASE}/include
@@ -47,7 +45,7 @@ CLIENT_DESC= Build BOINC client
MANAGER_DESC= Build BOINC manager GUI
X11_DESC= Build graphics API
LINUX_DESC= Accept Linux science applications
-USER_DESC= Create/check BOINC client user
+USER_DESC= Create/check BOINC client user and directory
SKINS_DESC= Install more skins for BOINC manager
OPTIMIZE_DESC= Enable compiler optimization flags
SCRIPT_DESC= Command line options in script
@@ -61,12 +59,7 @@ BROKEN= Does not install on ia64, powerpc, or sparc64
.endif
.if ${PORT_OPTIONS:MMANAGER}
-. if empty(PORT_OPTIONS:MCLIENT)
-PORT_OPTIONS+= CLIENT
-. endif
-. if empty(PORT_OPTIONS:MX11)
-PORT_OPTIONS+= X11
-. endif
+PORT_OPTIONS+= CLIENT X11
.endif
.if ${PORT_OPTIONS:MX11}
@@ -90,18 +83,22 @@ CONFIGURE_ARGS+=--with-sqlite3-prefix=${LOCALBASE}
CPPFLAGS+= -DNO_PER_THREAD_LOCALE
. endif
PLIST_SUB+= BOINC_MANAGER=""
+SUB_LIST+= OPTION_MANAGER="true"
.else
CONFIGURE_ARGS+=--disable-manager --with-wx-config=false --without-x
PLIST_SUB+= BOINC_MANAGER="@comment "
+SUB_LIST+= OPTION_MANAGER=""
.endif
.if ${PORT_OPTIONS:MCLIENT}
+USE_RC_SUBR= boinc-client
LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl
RUN_DEPENDS+= ${LOCALBASE}/share/certs/ca-root-nss.crt:${PORTSDIR}/security/ca_root_nss
PLIST_SUB+= BOINC_CLIENT=""
SUB_LIST+= OPTION_NO_GUI_RPC=${PORT_OPTIONS:MNO_GUI_RPC:S/^NO_GUI_RPC$/--no_gui_rpc/} \
OPTION_NO_NET_INFO=${PORT_OPTIONS:MNO_NET_INFO:S/^NO_NET_INFO$/--suppress_net_info/}
.else
+PORT_OPTIONS:= ${PORT_OPTIONS:NUSER}
CONFIGURE_ARGS+=--disable-client
PLIST_SUB+= BOINC_CLIENT="@comment "
.endif
@@ -125,14 +122,18 @@ PLIST_SUB+= SKINS="@comment "
.if ${PORT_OPTIONS:MUSER}
PLIST_SUB+= USER=""
+SUB_LIST+= OPTION_USER="true"
.else
PLIST_SUB+= USER="@comment "
+SUB_LIST+= OPTION_USER=""
.endif
.if ${PORT_OPTIONS:MOPTIMIZE}
CONFIGURE_ARGS+=--enable-optimize
.endif
+PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
+
post-patch:
@${REINPLACE_CMD} -e 's|client/scripts||' ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|-lcrypto -ldl|-lcrypto|' ${WRKSRC}/configure
@@ -141,19 +142,20 @@ post-patch:
.else
@${REINPLACE_CMD} -e 's| locale||' ${WRKSRC}/Makefile.in
.endif
-.if empty(PORT_OPTIONS:MX11)
+.if ! ${PORT_OPTIONS:MX11}
@${REINPLACE_CMD} -e 's|@BUILD_GRAPHICS_API_TRUE@|#&|' ${WRKSRC}/api/Makefile.in
.endif
post-install:
-.if ${PORT_OPTIONS:MUSER}
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.if ${PORT_OPTIONS:MMANAGER} || ${PORT_OPTIONS:MX11}
+ ${MKDIR} ${PREFIX}/share/boinc
.endif
.if ${PORT_OPTIONS:MMANAGER}
- ${MKDIR} ${PREFIX}/share/boinc
- ${MKDIR} ${LOCALBASE}/share/pixmaps
+ ${MKDIR} ${PREFIX}/share/pixmaps
. for name in 16 32 48
- ${INSTALL_DATA} ${WRKSRC}/clientgui/res/boincmgr.${name}x${name}.png ${LOCALBASE}/share/pixmaps
+ ${INSTALL_DATA} ${WRKSRC}/clientgui/res/boincmgr.${name}x${name}.png \
+ ${LOCALBASE}/share/pixmaps
. endfor
. if ${PORT_OPTIONS:MSKINS}
${CP} -R ${WRKSRC}/clientgui/skins ${PREFIX}/share/boinc
@@ -170,9 +172,6 @@ post-install:
api/txf_util.h
${INSTALL_DATA} ${WRKSRC}/${name} ${PREFIX}/include/boinc
. endfor
-. if empty(PORT_OPTIONS:MMANAGER)
- ${MKDIR} ${PREFIX}/share/boinc
-. endif
${CP} -R ${WRKSRC}/api/txf ${PREFIX}/share/boinc
.endif