Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Dec 2013 04:03:29 +0000 (UTC)
From:      Dirk Meyer <dinoex@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r335449 - head/misc/estic
Message-ID:  <201312020403.rB243TJj002911@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dinoex
Date: Mon Dec  2 04:03:29 2013
New Revision: 335449
URL: http://svnweb.freebsd.org/changeset/ports/335449

Log:
  - use OPTIONS_DEFINE

Modified:
  head/misc/estic/Makefile

Modified: head/misc/estic/Makefile
==============================================================================
--- head/misc/estic/Makefile	Mon Dec  2 03:39:33 2013	(r335448)
+++ head/misc/estic/Makefile	Mon Dec  2 04:03:29 2013	(r335449)
@@ -16,19 +16,6 @@ COMMENT=		Controller for ISDN TK-Anlage 
 USE_ZIP=	yes
 NO_WRKSUBDIR=	yes
 
-.if defined(WITHOUT_X11)
-NOX11_SUFFIX?=	-nox11
-X_OR_NOT=
-PLIST_SUB+=	WITHOUT_X=""
-PLIST_SUB+=	WITH_X="@comment "
-.else
-USE_XORG=	x11
-X_OR_NOT=-x
-PLIST_SUB+=	WITHOUT_X="@comment "
-PLIST_SUB+=	WITH_X=""
-.endif
-AUTHOR=		"Ullrich von Bassewitz" <uz@ibb.schwaben.com>
-
 # Personal Preferences, Where to install.
 PBX_VAR=${STAGEDIR}${PREFIX}/var/log/pbx
 PBX_ETC=${STAGEDIR}${PREFIX}/etc/pbx
@@ -37,10 +24,29 @@ PBX_BIN=${STAGEDIR}${PREFIX}/bin
 PBX_DOC=${STAGEDIR}${DOCSDIR}
 ESTIC=${WRKSRC}/estic
 AREACODE_DATAFILE=${PREFIX}/etc/pbx/areacodes
-
 MAKEFILE=make/freebsd${X_OR_NOT}.mak
+AUTHOR=		"Ullrich von Bassewitz" <uz@ibb.schwaben.com>
+
+OPTIONS_DEFINE=	X11 DTR_OFF
+OPTIONS_DEFAULT=X11
+NO_OPTIONS_SORT=yes
+DTR_OFF_DESC=	use dtr-off patch
+X11_USE=	xorg=x11
+
+.include <bsd.port.options.mk>
 
-.if defined(WITH_ESTIC_DTR_OFF)
+.if ${PORT_OPTIONS:MX11}
+X_OR_NOT=-x
+PLIST_SUB+=	WITHOUT_X="@comment "
+PLIST_SUB+=	WITH_X=""
+.else
+NOX11_SUFFIX?=	-nox11
+X_OR_NOT=
+PLIST_SUB+=	WITHOUT_X=""
+PLIST_SUB+=	WITH_X="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MDTR_OFF}
 EXTRA_PATCHES+=		${FILESDIR}/dtr-off.patch
 .endif
 
@@ -59,27 +65,27 @@ do-build:
 	cd ${ESTIC} ; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE}
 
 do-install:
-.if defined(WITHOUT_X11)
-	${INSTALL_PROGRAM} ${ESTIC}/estic ${PBX_BIN}/
-.else
+.if ${PORT_OPTIONS:MX11}
 	${INSTALL_PROGRAM} ${ESTIC}/xestic ${PBX_BIN}/
+.else
+	${INSTALL_PROGRAM} ${ESTIC}/estic ${PBX_BIN}/
 .endif
 	${INSTALL_DATA} ${ESTIC}/estic.res ${PBX_BIN}/
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@# estic doc says estic.res must be in bin path or current directory
-	@${MKDIR} ${PBX_DOC}
+	${MKDIR} ${PBX_DOC}
 	${INSTALL_MAN} ${ESTIC}/estic.doc ${PBX_DOC}/
 	@# estic.doc is not nroff format, & is in German, volunteers to create
 	@# _and maintain_ nroff formatted English should contact ${AUTHOR}
 	${INSTALL_MAN} ${FILESDIR}/README ${PBX_DOC}/
 .endif
 	@# ${FILESDIR}/README is not in nroff, but is a temporary document.
-	@${MKDIR} ${PBX_ETC} ${PBX_VAR}
+	${MKDIR} ${PBX_ETC} ${PBX_VAR}
 	${INSTALL_DATA} ${ESTIC}/samples/estic.ini ${PBX_ETC}/estic.ini.generic_example
 	${INSTALL_DATA} ${FILESDIR}/estic.ini ${PBX_ETC}/estic.ini.freebsd_example
 	${INSTALL_DATA} ${ESTIC}/samples/alias.dat ${PBX_ETC}/aliases.example
 	@# create config & debug so we can change mode to private
-	@${TOUCH} ${PBX_ETC}/config ${PBX_VAR}/debug
+	${TOUCH} ${PBX_ETC}/config ${PBX_VAR}/debug
 	${CHMOD} 600 ${PBX_VAR}/debug ${PBX_ETC}/config
 	${CHMOD} 700 ${PBX_VAR} # estic will create ./1996.11 etc
 



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