From e081d9b9ede78a2c05aaae34df25f8bb5ebd936f Mon Sep 17 00:00:00 2001 From: Adam Weinberger Date: Mon, 21 Jul 2014 17:47:52 +0000 Subject: [PATCH] Remove some instances of WITHOUT_X11 and use an X11 OPTION instead. --- devel/ocaml-react/Makefile | 7 ++++++- editors/emacs-devel/Makefile | 2 +- editors/emacs23/Makefile | 2 +- emulators/mtools/Makefile | 2 +- graphics/pecl-imagick/Makefile | 9 ++++----- graphics/stamp/Makefile | 6 +++--- lang/icon/Makefile | 8 +++++--- net/clusterit/Makefile | 15 +++++++-------- net/pfinger/Makefile | 7 ++++++- www/gallery3/Makefile | 4 ++-- www/webinject/Makefile | 4 ++-- 11 files changed, 38 insertions(+), 28 deletions(-) diff --git a/devel/ocaml-react/Makefile b/devel/ocaml-react/Makefile index d76e40a47a1b..a21e86ea1f82 100644 --- a/devel/ocaml-react/Makefile +++ b/devel/ocaml-react/Makefile @@ -14,8 +14,13 @@ COMMENT= OCaml module for functional reactive programming LICENSE= BSD3CLAUSE +OPTIONS_DEFINE= X11 + USE_OCAML= yes -.if defined (WITHOUT_X11) + +.include + +.if empty(PORT_OPTIONS:MX11) OCAMLC_DEPEND= ocaml-notk>=3.11:${OCAMLC_PORT} .else OCAMLC_DEPEND= ocaml>=3.11:${OCAMLC_PORT} diff --git a/editors/emacs-devel/Makefile b/editors/emacs-devel/Makefile index 2f1ae5efb13f..e315673ae388 100644 --- a/editors/emacs-devel/Makefile +++ b/editors/emacs-devel/Makefile @@ -225,7 +225,7 @@ GNUTLS3_RPATH= post-patch: @${RM} -f ${WRKSRC}/info/* @${REINPLACE_CMD} -e "s/%%EMACS_VER%%/${EMACS_VER}/g" -e "s/%%DATADIR%%/${DATADIR:C/\//\\\//g}/g" ${WRKSRC}/sources.el -.if defined(WITHOUT_X11) +.if empty(PORT_OPTIONS:MX11) @${REINPLACE_CMD} -e 's/^Terminal=.*$$/Terminal=true/' ${WRKSRC}/etc/emacs.desktop .endif .if ${PORT_OPTIONS:MGNUTLS3} diff --git a/editors/emacs23/Makefile b/editors/emacs23/Makefile index b3155667eaba..c0798b1d2410 100644 --- a/editors/emacs23/Makefile +++ b/editors/emacs23/Makefile @@ -177,7 +177,7 @@ BROKEN= Emacs 23.X does not currently build on ia64 post-patch: @${RM} -f ${WRKSRC}/info/* @${REINPLACE_CMD} -e "s/%%EMACS_VER%%/${EMACS_VER}/g" -e "s/%%DATADIR%%/${DATADIR:C/\//\\\//g}/g" ${WRKSRC}/sources.el -.if defined(WITHOUT_X11) +.if empty(PORT_OPTIONS:MX11) @${REINPLACE_CMD} -e 's/^Terminal=.*$$/Terminal=true/' ${WRKSRC}/etc/emacs.desktop .endif diff --git a/emulators/mtools/Makefile b/emulators/mtools/Makefile index 61a68ccf942a..dc284b9ddd2e 100644 --- a/emulators/mtools/Makefile +++ b/emulators/mtools/Makefile @@ -43,7 +43,7 @@ PLIST_SUB= X11="" .else CONFIGURE_ARGS+= --without-x PLIST_SUB= X11="@comment " -MAKE_ENV+= WITHOUT_X11=${WITHOUT_X11} +MAKE_ENV+= WITHOUT_X11=yes .endif post-patch: diff --git a/graphics/pecl-imagick/Makefile b/graphics/pecl-imagick/Makefile index 8c67ef8ba883..418b3e00cc6a 100644 --- a/graphics/pecl-imagick/Makefile +++ b/graphics/pecl-imagick/Makefile @@ -15,11 +15,10 @@ COMMENT= Provides a wrapper to the ImageMagick/GraphicsMagick library LICENSE= PHP301 -.if !defined(WITHOUT_X11) -LIB_DEPENDS= libMagickWand-6.Q*.so:${PORTSDIR}/graphics/ImageMagick -.else -LIB_DEPENDS= libMagickWand-6.Q*.so:${PORTSDIR}/graphics/ImageMagick-nox11 -.endif +OPTIONS_DEFINE= X11 + +X11_LIB_DEPENDS= libMagickWand-6.Q*.so:${PORTSDIR}/graphics/ImageMagick +X11_LIB_DEPENDS_OFF= libMagickWand-6.Q*.so:${PORTSDIR}/graphics/ImageMagick-nox11 USES= pkgconfig USE_PHP= yes diff --git a/graphics/stamp/Makefile b/graphics/stamp/Makefile index 8bf11976e380..bd6c6276ffda 100644 --- a/graphics/stamp/Makefile +++ b/graphics/stamp/Makefile @@ -15,9 +15,9 @@ LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg GNU_CONFIGURE= yes CPPFLAGS+= -I${LOCALBASE}/include LIBS+= -L${LOCALBASE}/lib -.if !defined(WITHOUT_X11) -USE_GNOME= gtk12 -.endif + +OPTIONS_DEFINE= X11 +X11_USE= GNOME=gtk12 post-patch: @${REINPLACE_CMD} -e 's#/usr/local/share/stamp#${DATADIR}#' \ diff --git a/lang/icon/Makefile b/lang/icon/Makefile index d245854723e1..539a06888db9 100644 --- a/lang/icon/Makefile +++ b/lang/icon/Makefile @@ -20,9 +20,11 @@ ICONDIR= ${PREFIX}/lib/${PORTNAME} BINS= icont iconx BINXS= colrbook colrpick fontpick palette vib wevents xgamma -OPTIONS_DEFINE= DOCS +OPTIONS_DEFINE= DOCS X11 -.if defined(WITHOUT_X11) +.include + +.if empty(PORT_OPTIONS:MX11) CONFIG_CMD= Configure PLIST_SUB= WITHOUT_X11="@comment " .else @@ -60,7 +62,7 @@ do-install: @${LN} -sf ${ICONDIR}/bin/icont ${STAGEDIR}${PREFIX}/bin/icon @${MKDIR} ${STAGEDIR}${ICONDIR}/lib cd ${WRKSRC}/lib; ${INSTALL_DATA} *.* ${STAGEDIR}${ICONDIR}/lib -.if !defined(WITHOUT_X11) +.if ${PORT_OPTIONS:MX11} .for file in ${BINXS} ${INSTALL_SCRIPT} ${WRKSRC}/bin/${file} ${STAGEDIR}${ICONDIR}/bin/${file} .endfor diff --git a/net/clusterit/Makefile b/net/clusterit/Makefile index dbe68c59f754..da6e7f60dbae 100644 --- a/net/clusterit/Makefile +++ b/net/clusterit/Makefile @@ -11,17 +11,16 @@ COMMENT= Collection of clustering tools GNU_CONFIGURE= yes -.include +OPTIONS_DEFINE= X11 +OPTIONS_DEFAULT=X11 +OPTIONS_SUB= yes -.if defined (WITHOUT_X11) -PLIST_SUB+= X11='@comment ' -.else -PLIST_SUB+= X11='' -USE_XORG= x11 -.endif +X11_USE= XORG=x11 + +.include post-patch: -.if defined(WITHOUT_X11) +.if empty(PORT_OPTIONS:MX11) ${REINPLACE_CMD} -E 's,^(SUBDIRS) = .*,\1 = barrier dsh jsd pcp dtop tools,' ${WRKSRC}/Makefile.in .endif diff --git a/net/pfinger/Makefile b/net/pfinger/Makefile index c6d492c85108..853d21f2273f 100644 --- a/net/pfinger/Makefile +++ b/net/pfinger/Makefile @@ -12,8 +12,13 @@ COMMENT= Highly configurable, secure, and portable finger daemon CONFLICTS= gnu-finger-1.* +OPTIONS_DEFINE= X11 + GNU_CONFIGURE= yes -.if !defined(WITHOUT_X11) + +.include + +.if ${PORT_OPTIONS:MX11} USE_GNOME= gtk12 PLIST_SUB+= WITHOUT_X11="" .else diff --git a/www/gallery3/Makefile b/www/gallery3/Makefile index 259221c17e55..6d3234b6bd7b 100644 --- a/www/gallery3/Makefile +++ b/www/gallery3/Makefile @@ -23,7 +23,7 @@ NO_BUILD= yes SUB_FILES= pkg-message OPTIONS_DEFINE= DCRAW FFMPEG GD GRAPHMAGICK IMAGEMAGICK JHEAD \ - NETPBM NLS UNZIP + NETPBM NLS UNZIP X11 OPTIONS_DEFAULT= IMAGEMAGICK JHEAD UNZIP .include @@ -51,7 +51,7 @@ RUN_DEPENDS+= gm:${PORTSDIR}/graphics/GraphicsMagick .endif .if ${PORT_OPTIONS:MIMAGEMAGICK} -.if !defined(WITHOUT_X11) +.if ${PORT_OPTIONS:MX11} RUN_DEPENDS+= convert:${PORTSDIR}/graphics/ImageMagick .else RUN_DEPENDS+= convert:${PORTSDIR}/graphics/ImageMagick-nox11 diff --git a/www/webinject/Makefile b/www/webinject/Makefile index ba4b2883b148..50367ee85e35 100644 --- a/www/webinject/Makefile +++ b/www/webinject/Makefile @@ -16,10 +16,10 @@ RUN_DEPENDS= p5-libwww>=0:${PORTSDIR}/www/p5-libwww \ p5-XML-Simple>=0:${PORTSDIR}/textproc/p5-XML-Simple \ p5-Crypt-SSLeay>=0:${PORTSDIR}/security/p5-Crypt-SSLeay -.if !defined(WITHOUT_X11) +#.if !defined(WITHOUT_X11) # some work to do here #RUN_DEPENDS+= p5-Tk>=0:${PORTSDIR}/x11-toolkits/p5-Tk -.endif +#.endif USES= perl5 shebangfix SHEBANG_FILES= webinject.pl