Page MenuHomeFreeBSD

D15773.id43644.diff
No OneTemporary

D15773.id43644.diff

Index: Mk/Uses/cargo.mk
===================================================================
--- Mk/Uses/cargo.mk
+++ Mk/Uses/cargo.mk
@@ -110,7 +110,7 @@
CARGO_TEST_ARGS+= --features='${CARGO_FEATURES}'
.endif
-.if !defined(WITH_DEBUG)
+.if !defined(_WITH_DEBUG)
CARGO_BUILD_ARGS+= --release
CARGO_TEST_ARGS+= --release
.else
Index: Mk/Uses/cmake.mk
===================================================================
--- Mk/Uses/cmake.mk
+++ Mk/Uses/cmake.mk
@@ -36,7 +36,7 @@
# Debug and Release profiles respect system
# CFLAGS, RelWithDebInfo and MinSizeRel will set
# CFLAGS to "-O2 -g" and "-Os -DNDEBUG".
-# Default: Release, if WITH_DEBUG is not set,
+# Default: Release, if DEBUG option is not set,
# Debug otherwise
# CMAKE_SOURCE_PATH - Path to the source directory
# Default: ${WRKSRC}
@@ -62,15 +62,15 @@
RUN_DEPENDS+= ${CMAKE_BIN}:devel/cmake
.endif
-.if defined(WITH_DEBUG)
+.if defined(_WITH_DEBUG)
CMAKE_BUILD_TYPE?= Debug
.else
CMAKE_BUILD_TYPE?= Release
-.endif #defined(WITH_DEBUG)
+.endif #defined(_WITH_DEBUG)
PLIST_SUB+= CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:tl}"
-.if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG)
+.if defined(STRIP) && ${STRIP} != "" && !defined(_WITH_DEBUG)
INSTALL_TARGET?= install/strip
.endif
Index: Mk/Uses/grantlee.mk
===================================================================
--- Mk/Uses/grantlee.mk
+++ Mk/Uses/grantlee.mk
@@ -20,7 +20,7 @@
# GRANTLEE_VERSION_FULL - full version of the chosen grantlee
# GRANTLEE_VERSION_SHORT - short version of the chosen grantlee
# GRANTLEE_DEBUG_SUFFIX - a suffix to the library name depending
-# the buildtype (WITH_DEBUG) that gets
+# the buildtype (DEBUG option) that gets
# appended to library names of plugins
# for grantlee5.
#
@@ -70,7 +70,7 @@
# GrantleeMacros.cmake provides grantlee_adjust_plugin_name() which appends a
# letter 'd' to the library name in Debug mode. Provide a PLIST_SUB which can be
# appended in the plist.
-. if defined(WITH_DEBUG)
+. if defined(_WITH_DEBUG)
PLIST_SUB+= GRANTLEE_DEBUG_SUFFIX=d
. else
PLIST_SUB+= GRANTLEE_DEBUG_SUFFIX=""
Index: Mk/Uses/meson.mk
===================================================================
--- Mk/Uses/meson.mk
+++ Mk/Uses/meson.mk
@@ -40,8 +40,8 @@
# meson has it own strip mechanic
INSTALL_TARGET= install
-# should we have strip separate from WITH_DEBUG?
-.if defined(WITH_DEBUG)
+# should we have strip separate from DEBUG option?
+.if defined(_WITH_DEBUG)
CONFIGURE_ARGS+= --buildtype debug
.else
CONFIGURE_ARGS+= --buildtype release \
Index: Mk/Uses/php.mk
===================================================================
--- Mk/Uses/php.mk
+++ Mk/Uses/php.mk
@@ -192,7 +192,7 @@
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
. endif
-. if defined(WITH_DEBUG)
+. if defined(_WITH_DEBUG)
PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug
. endif
PHP_SAPI?= ""
Index: Mk/Uses/qmake.mk
===================================================================
--- Mk/Uses/qmake.mk
+++ Mk/Uses/qmake.mk
@@ -70,13 +70,13 @@
QMAKE_CXXFLAGS_RELEASE="" \
PREFIX="${PREFIX}"
-.if defined(WITH_DEBUG)
+.if defined(_WITH_DEBUG)
QMAKE_ARGS+= CONFIG+="debug" \
CONFIG-="release"
.else
QMAKE_ARGS+= CONFIG+="release" \
CONFIG-="debug separate_debug_info"
-.endif # defined(WITH_DEBUG)
+.endif # defined(_WITH_DEBUG)
# We set -recursive by default to keep qmake from running in the build stage.
.if ! ${qmake_ARGS:Mnorecursive}
Index: Mk/bsd.options.mk
===================================================================
--- Mk/bsd.options.mk
+++ Mk/bsd.options.mk
@@ -197,6 +197,17 @@
package:300:pre package:500:do package:700:post \
stage:800:post
+# Options which can appear in PORT_OPTINS even if not in OPTIONS_DEFINE
+_UNIVERSAL_OPTIONS= DEBUG
+
+.for opt in ${_UNIVERSAL_OPTIONS}
+. if defined(${opt}_PORTS)
+. if ${${opt}_PORTS:M${PKGORIGIN}}
+PORT_OPTIONS+= ${opt}
+. endif
+. endif
+.endfor
+
PORT_OPTIONS+= DOCS NLS EXAMPLES IPV6
# Add per arch options
@@ -257,6 +268,12 @@
. endfor
.endfor
+.for opt in ${_UNIVERSAL_OPTIONS}
+. if empty(COMPLETE_OPTIONS_LIST:M${opt})
+COMPLETE_OPTIONS_LIST+= ${opt}
+. endif
+.endfor
+
## Now create the list of activated options
.if defined(OPTIONS_OVERRIDE)
# Special case $OPTIONS_OVERRIDE; if it is defined forget about anything done
@@ -271,7 +288,7 @@
## Set system-wide defined options (set by user in make.conf)
. for opt in ${OPTIONS_SET}
-. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
+. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) || ${_UNIVERSAL_OPTIONS:M${opt}}
PORT_OPTIONS+= ${opt}
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endif
@@ -285,7 +302,7 @@
## Set the options specified per-port (set by user in make.conf)
. for opt in ${${OPTIONS_NAME}_SET}
-. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
+. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) || ${_UNIVERSAL_OPTIONS:M${opt}}
PORT_OPTIONS+= ${opt}
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endif
@@ -343,7 +360,7 @@
## Set the options specified per-port (set by user in make.conf)
. for opt in ${${OPTIONS_NAME}_SET_FORCE}
-. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
+. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) || ${_UNIVERSAL_OPTIONS:M${opt}}
PORT_OPTIONS+= ${opt}
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endif
@@ -358,7 +375,7 @@
## Cmdline always win over the rest
.for opt in ${WITH}
-. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
+. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) || ${_UNIVERSAL_OPTIONS:M${opt}}
PORT_OPTIONS+= ${opt}
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endif
@@ -423,10 +440,6 @@
PLIST_SUB+= PORTEXAMPLES=""
.endif
-.if ${PORT_OPTIONS:MDEBUG}
-WITH_DEBUG= yes
-.endif
-
.if defined(NO_OPTIONS_SORT)
ALL_OPTIONS= ${OPTIONS_DEFINE}
.endif
@@ -598,5 +611,11 @@
.endfor
SELECTED_OPTIONS= ${_SELECTED_OPTIONS:O:u}
DESELECTED_OPTIONS= ${_DESELECTED_OPTIONS:O:u}
+
+.for opt in ${_UNIVERSAL_OPTIONS}
+. if ${PORT_OPTIONS:M${opt}}
+_WITH_${opt}= yes
+. endif
+.endfor
.endif
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk
+++ Mk/bsd.port.mk
@@ -329,19 +329,8 @@
# usage inside the ports framework, and the latter are reserved for user-
# settable options. (Setting USE_* in /etc/make.conf is always wrong).
#
-# WITH_DEBUG - If set, debugging flags are added to CFLAGS and the
-# binaries don't get stripped by INSTALL_PROGRAM or
-# INSTALL_LIB. Besides, individual ports might
-# add their specific to produce binaries for debugging
-# purposes. You can override the debug flags that are
-# passed to the compiler by setting DEBUG_FLAGS. It is
-# set to "-g" at default.
#
-# NOTE: to override a globally defined WITH_DEBUG at a
-# later time ".undef WITH_DEBUG" can be used
-#
-# WITH_DEBUG_PORTS - A list of origins for which WITH_DEBUG will be set
-#
+# DEBUG_PORTS - A list of origins for which the DEBUG option will be set
# WITHOUT_SSP - Disable SSP.
#
# SSP_CFLAGS - Defaults to -fstack-protector. This value
@@ -1294,12 +1283,6 @@
TMPDIR?= /tmp
.endif # defined(PACKAGE_BUILDING)
-.if defined(WITH_DEBUG_PORTS)
-.if ${WITH_DEBUG_PORTS:M${PKGORIGIN}}
-WITH_DEBUG= yes
-.endif
-.endif
-
.include "${PORTSDIR}/Mk/bsd.default-versions.mk"
.include "${PORTSDIR}/Mk/bsd.options.mk"
@@ -1755,7 +1738,7 @@
.endif
# Reset value from bsd.own.mk.
-.if defined(WITH_DEBUG)
+.if defined(_WITH_DEBUG)
.if !defined(INSTALL_STRIPPED)
STRIP= #none
MAKE_ENV+= DONTSTRIP=yes
Index: Mk/bsd.qt.mk
===================================================================
--- Mk/bsd.qt.mk
+++ Mk/bsd.qt.mk
@@ -158,8 +158,8 @@
CONFIGURE_ARGS+= -recheck-all
. endif
-. if defined(WANT_QT_DEBUG) || defined(WITH_DEBUG)
-WITH_DEBUG= yes
+. if defined(WANT_QT_DEBUG) || defined(_WITH_DEBUG)
+_WITH_DEBUG= yes
STRIP= # It's done prior to bsd.qt.mk inclusion.
CONFIGURE_ARGS+=-debug -separate-debug-info
# Override configuration in global qconfig.pri.
Index: archivers/paq/Makefile
===================================================================
--- archivers/paq/Makefile
+++ archivers/paq/Makefile
@@ -23,18 +23,15 @@
OPTIONS_DEFINE= OPENMP DOCS
SUB_FILES= pkg-message
+DEBUG_CXXFLAGS= -DDEBUG
+DEBUG_CXXFLAGS_OFF= -DNDEBUG
+
.include <bsd.port.options.mk>
.if ${ARCH} == "amd64" || ( ${ARCH} == "i386" && !empty(MACHINE_CPU:Msse2) )
ZPAQFLAGS= -Dunix -msse2
.else
ZPAQFLAGS= -Dunix -DNOJIT
-.endif
-
-.if defined(WITH_DEBUG)
-CXXFLAGS+= -DDEBUG
-.else
-CXXFLAGS+= -DNDEBUG
.endif
DISTFILES+= bmp_j4c.zip bwt.1.zip bwt_j3.zip bwt_slowmode1.zip \
Index: audio/cpige/Makefile
===================================================================
--- audio/cpige/Makefile
+++ audio/cpige/Makefile
@@ -16,10 +16,7 @@
PLIST_FILES= bin/cpige
-.ifdef(WITH_DEBUG)
-CFLAGS+= -g -DDEBUG
-STRIP=
-.endif
+DEBUG_CFLAGS= -DDEBUG
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
Index: audio/nuvolaplayer/Makefile
===================================================================
--- audio/nuvolaplayer/Makefile
+++ audio/nuvolaplayer/Makefile
@@ -31,11 +31,8 @@
INSTALLS_ICONS= yes
USE_LDCONFIG= yes
-.ifdef(WITH_DEBUG)
-CONFIGURE_ARGS+=--debug
-.else
-CONFIGURE_ARGS+=--no-debug
-.endif
+DEBUG_CONFIGURE_ON= --debug
+DEBUG_CONFIGURE_OFF= --no-debug
DATADIR= ${PREFIX}/share/${PORTNAME}3
Index: cad/qcad/Makefile
===================================================================
--- cad/qcad/Makefile
+++ cad/qcad/Makefile
@@ -35,11 +35,8 @@
"" \
true
-.if defined(WITH_DEBUG)
-RESDIR= ${WRKSRC}/debug
-.else
-RESDIR= ${WRKSRC}/release
-.endif
+DEBUG_VARS= RESDIR="${WRKSRC}/debug"
+DEBUG_VARS_OFF= RESDIR="${WRKSRC}/release"
SHRLIBS= qcadcore qcadecmaapi qcadentity qcadgrid qcadgui qcadoperations \
qcadsnap qcadspatialindex qcadstemmer spatialindexnavel qcadzip
Index: chinese/fcitx/Makefile
===================================================================
--- chinese/fcitx/Makefile
+++ chinese/fcitx/Makefile
@@ -60,6 +60,8 @@
OPENCC_DESC= Enable OpenCC for Chinese Transform
TPUNC_DESC= Use traditional quotation marks
+DEBUG_CMAKE_ON= -DENABLE_DEBUG=ON
+
.include <bsd.port.options.mk>
CMAKE_ARGS+= -DENABLE_XDGAUTOSTART=OFF -DFORCE_ENCHANT=ON \
@@ -103,10 +105,6 @@
.if ${PORT_OPTIONS:MTPUNC}
EXTRA_PATCHES+= ${FILESDIR}/tpunc-data_punc.mb.zh_CN
-.endif
-
-.if defined(WITH_DEBUG)
-CMAKE_ARGS+= -DENABLE_DEBUG=ON
.endif
DOCS_EXTRA_PATCHES_OFF= ${FILESDIR}/nodocs-doc_CMakeLists.txt
Index: converters/fribidi/Makefile
===================================================================
--- converters/fribidi/Makefile
+++ converters/fribidi/Makefile
@@ -18,9 +18,7 @@
CONFIGURE_ARGS= --enable-static --without-glib
INSTALL_TARGET= install-strip
-.if !defined(WITH_DEBUG)
-CONFIGURE_ARGS+=--disable-debug
-.endif
+DEBUG_CONFIGURE_OFF= --disable-debug
post-patch:
@${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' < \
Index: databases/qdbm-plus/Makefile
===================================================================
--- databases/qdbm-plus/Makefile
+++ databases/qdbm-plus/Makefile
@@ -26,10 +26,8 @@
CXXFLAGS+= -fsigned-char -fPIC
INSTALL_TARGET= install-strip
-post-patch:
-.if defined(WITH_DEBUG)
+post-patch-DEBUG-on:
@${REINPLACE_CMD} 's/-DNDEBUG//' ${WRKSRC}/Makefile.in
-.endif
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libxqdbm.so.3.0.0
Index: databases/qdbm/Makefile
===================================================================
--- databases/qdbm/Makefile
+++ databases/qdbm/Makefile
@@ -29,10 +29,8 @@
INSTALL_TARGET= install-strip
PORTDOCS= ChangeLog NEWS
-post-patch:
-.if defined(WITH_DEBUG)
+post-patch-DEBUG-on:
@${REINPLACE_CMD} 's/-DNDEBUG//' ${WRKSRC}/Makefile.in
-.endif
post-build:
cd ${WRKSRC}/lab && ${MAKE} CC="${CC}" CFLAGS="${CFLAGS}" \
Index: deskutils/fbreader/Makefile
===================================================================
--- deskutils/fbreader/Makefile
+++ deskutils/fbreader/Makefile
@@ -21,12 +21,6 @@
GH_ACCOUNT= geometer
GH_PROJECT= FBReader
-.if defined(WITH_DEBUG)
-STATUS= debug
-.else
-STATUS= release
-.endif
-
USES= compiler gmake iconv localbase pkgconfig sqlite
USE_LDCONFIG= yes
@@ -37,10 +31,14 @@
LD="${CXX}"
MAKE_ARGS+= MAKE=${MAKE_CMD} LIBDIR=${PREFIX}/lib
+OPTIONS_DEFINE= DEBUG
OPTIONS_SINGLE= GUI
OPTIONS_SINGLE_GUI= GTK2 QT4
OPTIONS_DEFAULT= QT4
OPTIONS_SUB= yes
+
+DEBUG_VARS= STATUS=debug
+DEBUG_VARS_OFF= STATUS=release
GTK2_USE= gnome=gtk20
GTK2_MAKE_ENV= UI_TYPE=gtk
Index: devel/cmake/Makefile
===================================================================
--- devel/cmake/Makefile
+++ devel/cmake/Makefile
@@ -42,7 +42,7 @@
.include <bsd.port.pre.mk>
-.if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG)
+.if defined(STRIP) && ${STRIP} != "" && !${PORT_OPTIONS:MDEBUG}
INSTALL_TARGET= install/strip
.endif
Index: devel/llvm-devel/Makefile
===================================================================
--- devel/llvm-devel/Makefile
+++ devel/llvm-devel/Makefile
@@ -73,6 +73,7 @@
COMPILER_RT_GH_TAGNAME= ${COMPILER_RT_COMMIT}:compiler_rt
COMPILER_RT_PLIST_FILES=${_COMPILER_RT_LIBS:S|^|${_CRTLIBDIR}/|} \
${_COMPILER_RT_BLACKLISTS:S|^|${_CRTBLDIR}/|}
+DEBUG_VARS= CMAKE_BUILD_TYPE=RelWithDebInfo
DOCS_PORTDOCS= llvm
DOCS_CMAKE_ON= -DLLVM_ENABLE_SPHINX=ON \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
@@ -277,11 +278,6 @@
opt.1 tblgen.1
.include <bsd.port.pre.mk>
-
-.if defined(WITH_DEBUG)
-CMAKE_BUILD_TYPE= RelWithDebInfo
-STRIP=
-.endif
_CRTLIBDIR= ${LLVM_PREFIX:S|${PREFIX}/||}/lib/clang/${LLVM_RELEASE}/lib/freebsd
_CRTBLDIR= ${LLVM_PREFIX:S|${PREFIX}/||}/share
Index: devel/llvm38/Makefile
===================================================================
--- devel/llvm38/Makefile
+++ devel/llvm38/Makefile
@@ -66,6 +66,7 @@
COMPILER_RT_DESC= Sanitizer libraries
COMPILER_RT_DISTFILES= compiler-rt-${DISTVERSION}.src${EXTRACT_SUFX}
COMPILER_RT_PLIST_FILES=${_COMPILER_RT_LIBS:S|^|${_CRTLIBDIR}/|}
+DEBUG_VARS= CMAKE_BUILD_TYPE=RelWithDebInfo
DOCS_PORTDOCS= llvm
DOCS_CMAKE_ON= -DLLVM_ENABLE_SPHINX=ON \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
@@ -88,11 +89,6 @@
GOLD_DESC= Build the LLVM Gold plugin for LTO
GOLD_CMAKE_ON= -DLLVM_BINUTILS_INCDIR=${LOCALBASE}/include
GOLD_BUILD_DEPENDS= ${LOCALBASE}/bin/ld.gold:devel/binutils
-
-.if defined(WITH_DEBUG)
-CMAKE_BUILD_TYPE= RelWithDebInfo
-STRIP=
-.endif
_CRTLIBDIR= ${LLVM_PREFIX:S|${PREFIX}/||}/lib/clang/${LLVM_RELEASE}/lib/freebsd
Index: devel/llvm40/Makefile
===================================================================
--- devel/llvm40/Makefile
+++ devel/llvm40/Makefile
@@ -73,6 +73,7 @@
COMPILER_RT_DESC= Sanitizer libraries
COMPILER_RT_DISTFILES= compiler-rt-${DISTVERSION}.src${EXTRACT_SUFX}
COMPILER_RT_PLIST_FILES=${_COMPILER_RT_LIBS:S|^|${_CRTLIBDIR}/|}
+DEBUG_VARS= CMAKE_BUILD_TYPE=RelWithDebInfo
DOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx
DOCS_PORTDOCS= llvm
DOCS_CMAKE_ON= -DLLVM_ENABLE_SPHINX=ON \
@@ -98,11 +99,6 @@
OPENMP_DESC= Install libomp, the LLVM OpenMP runtime library
OPENMP_DISTFILES= openmp-${DISTVERSION}.src${EXTRACT_SUFX}
OPENMP_EXTRA_PATCHES= ${PATCHDIR}/openmp-patch-bug32279
-
-.if defined(WITH_DEBUG)
-CMAKE_BUILD_TYPE= RelWithDebInfo
-STRIP=
-.endif
_CRTLIBDIR= ${LLVM_PREFIX:S|${PREFIX}/||}/lib/clang/${LLVM_RELEASE}/lib/freebsd
Index: devel/llvm50/Makefile
===================================================================
--- devel/llvm50/Makefile
+++ devel/llvm50/Makefile
@@ -74,6 +74,7 @@
COMPILER_RT_DESC= Sanitizer libraries
COMPILER_RT_DISTFILES= compiler-rt-${DISTVERSION}.src${EXTRACT_SUFX}
COMPILER_RT_PLIST_FILES=${_COMPILER_RT_LIBS:S|^|${_CRTLIBDIR}/|}
+DEBUG_VARS= CMAKE_BUILD_TYPE=RelWithDebInfo
DOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx
DOCS_PORTDOCS= llvm
DOCS_CMAKE_ON= -DLLVM_ENABLE_SPHINX=ON \
@@ -99,11 +100,6 @@
OPENMP_DESC= Install libomp, the LLVM OpenMP runtime library
OPENMP_DISTFILES= openmp-${DISTVERSION}.src${EXTRACT_SUFX}
OPENMP_EXTRA_PATCHES= ${PATCHDIR}/openmp-patch-bug32279
-
-.if defined(WITH_DEBUG)
-CMAKE_BUILD_TYPE= RelWithDebInfo
-STRIP=
-.endif
_CRTLIBDIR= ${LLVM_PREFIX:S|${PREFIX}/||}/lib/clang/${LLVM_RELEASE}/lib/freebsd
Index: devel/llvm60/Makefile
===================================================================
--- devel/llvm60/Makefile
+++ devel/llvm60/Makefile
@@ -67,6 +67,7 @@
COMPILER_RT_DESC= Sanitizer libraries
COMPILER_RT_DISTFILES= compiler-rt-${DISTVERSION}.src${EXTRACT_SUFX}
COMPILER_RT_PLIST_FILES=${_COMPILER_RT_LIBS:S|^|${_CRTLIBDIR}/|}
+DEBUG_VARS= CMAKE_BUILD_TYPE=RelWithDebInfo
DOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx
DOCS_PORTDOCS= llvm
DOCS_CMAKE_ON= -DLLVM_ENABLE_SPHINX=ON \
Index: devel/subversion/Makefile.common
===================================================================
--- devel/subversion/Makefile.common
+++ devel/subversion/Makefile.common
@@ -42,6 +42,7 @@
BDB_USES= bdb
MAINTAINER_DEBUG_CONFIGURE_ON= --enable-maintainer-mode --enable-debug
+MAINTAINER_DEBUG_IMPLIES= DEBUG
NLS_CONFIGURE_OFF= --disable-nls
NLS_USES= gettext
@@ -63,10 +64,6 @@
# ===============================================================
.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MMAINTAINER_DEBUG}
-WITH_DEBUG= yes
-.endif
APR_CONFIG= ${LOCALBASE}/bin/apr-1-config
APU_CONFIG= ${LOCALBASE}/bin/apu-1-config
Index: devel/tokamak/Makefile
===================================================================
--- devel/tokamak/Makefile
+++ devel/tokamak/Makefile
@@ -29,11 +29,7 @@
OPTIONS_DEFINE= DOCS
-.include <bsd.port.options.mk>
-
-.if !defined(WITH_DEBUG)
-CPPFLAGS+= -DNDEBUG
-.endif
+DEBUG_CPPFLAGS= -DNDEBUG
post-extract:
@cd ${WRKSRC} && ${UNZIP_CMD} -q tokamak-premake.zip
Index: devel/yasm-devel/Makefile
===================================================================
--- devel/yasm-devel/Makefile
+++ devel/yasm-devel/Makefile
@@ -28,12 +28,8 @@
NLS_CONFIGURE_OFF= --without-libiconv-prefix \
--without-libintl-prefix
-CONFLICTS_INSTALL= yasm-[0-9]*
+DEBUG_CONFIGURE_ENABLE= debug
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MDEBUG} || defined(WITH_DEBUG)
-CONFIGURE_ARGS+= --enable-debug
-.endif
+CONFLICTS_INSTALL= yasm-[0-9]*
.include <bsd.port.mk>
Index: emulators/x49gp/Makefile
===================================================================
--- emulators/x49gp/Makefile
+++ emulators/x49gp/Makefile
@@ -41,11 +41,9 @@
OPTIONS_DEFAULT=FIRMWARE_215 GRAYSCALE
-SUB_FILES= hp50g.sh
+DEBUG_MAKE_ENV= DEBUGB=1
-.if defined(WITH_DEBUG)
-MAKE_ENV+= DEBUGB=1
-.endif
+SUB_FILES= hp50g.sh
.include <bsd.port.options.mk>
Index: graphics/blender/Makefile
===================================================================
--- graphics/blender/Makefile
+++ graphics/blender/Makefile
@@ -73,6 +73,7 @@
CYCLESOSL_BUILD_DEPENDS= llvm-config40:devel/llvm40
CYCLESOSL_LIB_DEPENDS= liboslcomp.so:graphics/openshadinglanguage
CYCLESOSL_RUN_DEPENDS= llvm-config40:devel/llvm40
+DEBUG_CMAKE_BOOL= WITH_GHOST_DEBUG
DDS_CMAKE_BOOL= WITH_IMAGE_DDS
FFMPEG_CMAKE_BOOL= WITH_CODEC_FFMPEG
FFMPEG_LIB_DEPENDS= libavutil.so:multimedia/ffmpeg
@@ -138,10 +139,6 @@
XINPUT_USE= XORG=xi
XF86VMODE_CMAKE_BOOL= WITH_X11_XF86VMODE
XF86VMODE_USE= XORG=xi,xxf86vm
-
-.if defined(WITH_DEBUG)
-CMAKE_ARGS+= -DWITH_GHOST_DEBUG:BOOL=ON
-.endif
post-patch-OPENCOLORIO-on:
@${REINPLACE_CMD} -e 's|yaml-cpp|&03|' \
Index: graphics/blender/Makefile.options
===================================================================
--- graphics/blender/Makefile.options
+++ graphics/blender/Makefile.options
@@ -11,6 +11,7 @@
COMPOSITOR \
CYCLES \
CYCLESOSL \
+ DEBUG \
DDS \
FFMPEG \
FFTW3 \
Index: graphics/cimg/Makefile
===================================================================
--- graphics/cimg/Makefile
+++ graphics/cimg/Makefile
@@ -53,7 +53,7 @@
REINPLACE_ARGS= -i ""
LIB_DEPENDS+= libboard.so:graphics/libboard
-. if !defined(WITH_DEBUG)
+. if ! ${PORT_OPTIONS:MDEBUG}
LIB_DEPENDS+= libcurl.so:ftp/curl \
libpng.so:graphics/png \
libtiff.so:graphics/tiff \
Index: graphics/darktable/Makefile
===================================================================
--- graphics/darktable/Makefile
+++ graphics/darktable/Makefile
@@ -56,6 +56,8 @@
libcolord-gtk.so:graphics/colord-gtk
COLORD_CMAKE_OFF= -DUSE_COLORD:BOOL=OFF
+DEBUG_FLAGS= CMAKE_BUILD_TYPE=RelWithDebInfo
+
FLICKR_LIB_DEPENDS= libflickcurl.so:www/flickcurl
FLICKR_CMAKE_OFF= -DUSE_FLICKR:BOOL=OFF
@@ -115,11 +117,6 @@
# linker flags are passed.
# See: https://cmake.org/cmake/help/v3.4/policy/CMP0056.html
CMAKE_ARGS+= -DCMAKE_POLICY_DEFAULT_CMP0056:STRING=NEW
-.endif
-
-.if defined(WITH_DEBUG)
-CMAKE_BUILD_TYPE= RelWithDebInfo
-STRIP=
.endif
.include <bsd.port.post.mk>
Index: graphics/lepton/Makefile
===================================================================
--- graphics/lepton/Makefile
+++ graphics/lepton/Makefile
@@ -18,9 +18,7 @@
GNU_CONFIGURE= yes
TEST_TARGET= check
CFLAGS+= -DBSD -DGIT_REVISION='\"${GH_TAGNAME}\"'
-.ifndef WITH_DEBUG
-CFLAGS+= -DNDEBUG
-.endif
+DEBUG_CFLAGS_OFF=-DNDEBUG
EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude dependencies
PLIST_FILES= bin/lepton
Index: graphics/rawtherapee/Makefile
===================================================================
--- graphics/rawtherapee/Makefile
+++ graphics/rawtherapee/Makefile
@@ -99,10 +99,6 @@
LDFLAGS+= ${OPENMP_FLAGS}
.endif
-.if defined(WITH_DEBUG)
-STRIP=
-.endif
-
.if ${ARCH} == i386
USES+= compiler:c++11-lib
# If we were to use GCC on i386, we'd need to use -mstackrealign
Index: graphics/wayland/Makefile
===================================================================
--- graphics/wayland/Makefile
+++ graphics/wayland/Makefile
@@ -18,7 +18,7 @@
CFLAGS+= "-I${LOCALBASE}/include/libepoll-shim"
-WITH_DEBUG= 1
+OPTIONS_DEFAULT=DEBUG
USES= autoreconf gmake libtool localbase pathfix pkgconfig tar:xz
USE_GNOME= libxslt:build
Index: irc/ircd-ratbox/Makefile
===================================================================
--- irc/ircd-ratbox/Makefile
+++ irc/ircd-ratbox/Makefile
@@ -89,10 +89,8 @@
USE_GCC= yes
.endif
-post-patch:
-.if !defined(WITH_DEBUG)
+post-patch-DEBUG-on:
${REINPLACE_CMD} 's|@INSTALL@|@INSTALL@ -s|' ${WRKSRC}/install-mod.sh.in
-.endif
pre-configure:
@${ECHO_MSG} ""
@@ -169,10 +167,6 @@
${INSTALL_DATA} ${WRKSRC}/doc/example.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.conf.sample
${INSTALL_DATA} ${WRKSRC}/doc/example.efnet.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd-efnet.conf.sample
${INSTALL_DATA} ${WRKSRC}/doc/genssl.sh ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/genssl.sh
-.if !defined(WITH_DEBUG)
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ircd-ratbox/libcore.so
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ircd-ratbox/libratbox.so
-.endif
# ----- We need to install the shortcut.pl module ----
.if ${PORT_OPTIONS:MSHORTCUTS}
@@ -180,5 +174,9 @@
${SH} ${WRKSRC}/install-mod.sh ${WRKSRC}/contrib/m_rsshortcut.la \
${STAGEDIR}${PREFIX}/lib/${PORTNAME}/modules/contrib
.endif
+
+post-install-DEBUG-off:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ircd-ratbox/libcore.so
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ircd-ratbox/libratbox.so
.include <bsd.port.mk>
Index: java/openjdk8/Makefile
===================================================================
--- java/openjdk8/Makefile
+++ java/openjdk8/Makefile
@@ -270,21 +270,21 @@
.if !defined(BUILD_JRE)
OPTIONS_DEFINE+= TEST
-OPTIONS_DEFAULT+= RELEASE
-OPTIONS_SINGLE= BUILD
-OPTIONS_SINGLE_BUILD= DEBUG DEBUGFAST RELEASE
+OPTIONS_GROUP= DEBUGGING
+OPTIONS_GROUP_DEBUGGING= DEBUG DEBUGFAST
BUILD_DESC= Select OpenJDK build type
DEBUG_DESC= Build for debugging (without optimizations)
DEBUGFAST_DESC= Build for debugging (with optimizations)
RELEASE_DESC= Build for release (default)
TEST_DESC= Run regression tests
-DEBUG_VARS= JDK_BUILD_TYPE=slowdebug
+DEBUG_VARS= JDK_BUILD_TYPE=slowdebug \
+ OBJCOPY=${LOCALBASE}/bin/objcopy
+DEBUG_VARS_OFF= JDK_BUILD_TYPE=release
+DEBUG_BUILD_DEPENDS= ${LOCALBASE}/bin/objcopy:devel/binutils
+DEBUG_CONFIGURE_OFF= --disable-debug-symbols
DEBUGFAST_VARS= JDK_BUILD_TYPE=fastdebug
-RELEASE_BUILD_DEPENDS_OFF= ${LOCALBASE}/bin/objcopy:devel/binutils
-RELEASE_CONFIGURE_ON= --disable-debug-symbols
-RELEASE_VARS= JDK_BUILD_TYPE=release
-RELEASE_VARS_OFF= OBJCOPY=${LOCALBASE}/bin/objcopy
+DEBUGFAST_IMPLIES= DEBUG
TEST_ALL_TARGET= test
TEST_ALL_TARGET_OFF= images
TEST_CONFIGURE_ON= --with-jtreg=${WRKDIR}/jtreg
Index: lang/dmd2/Makefile
===================================================================
--- lang/dmd2/Makefile
+++ lang/dmd2/Makefile
@@ -37,6 +37,8 @@
OPTIONS_DEFINE= DOCS EXAMPLES
+DEBUG_MAKE_ARGS= DEBUG_FLAGS="-g -DDEBUG=1 -DUNITTEST" BUILD=debug
+
.include <bsd.port.options.mk>
post-extract:
@@ -51,10 +53,6 @@
.else
MAKE_ARGS+= MODEL=32
MODEL= 32
-.endif
-
-.if defined(WITH_DEBUG)
-MAKE_ARGS+= DEBUG_FLAGS=-g\ -DDEBUG=1\ -DUNITTEST BUILD=debug
.endif
MODULEDIR= ${PREFIX}/include/d/phobos2
Index: mail/batv-milter/Makefile
===================================================================
--- mail/batv-milter/Makefile
+++ mail/batv-milter/Makefile
@@ -33,13 +33,11 @@
OPTIONS_DEFINE= DOCS
+DEBUG_VARS= SITE_SUB+="-e '\|confOPTIMIZE.*-g|s/^dnl //g'"
+
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
-.if defined(WITH_DEBUG)
-SITE_SUB+= -e '\|confOPTIMIZE.*-g|s/^dnl //g'
-.endif
-
pre-configure:
.if !exists( /usr/include/libmilter/mfapi.h )
${REINPLACE_CMD} -e '/sendmail/ s|dnl ||; \
@@ -50,9 +48,7 @@
${SITE} > ${WCONF}/site.config.m4
post-install:
-.if !defined(WITH_DEBUG)
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/batv-filter
-.endif
@${RM} ${MANPREFIX}/man/cat8/batv-filter.8 ${MANPREFIX}/man/cat8/batv-filter.8.gz
${INSTALL_MAN} ${WRKSRC}/*/batv-filter.8 ${STAGEDIR}${MANPREFIX}/man/man8/
${MKDIR} ${STAGEDIR}${DOCSDIR}
Index: mail/dk-milter/Makefile
===================================================================
--- mail/dk-milter/Makefile
+++ mail/dk-milter/Makefile
@@ -41,6 +41,8 @@
OPTIONS_DEFINE= DOCS
+DEBUG_VARS= SITE_SUB+="-e '\|confOPTIMIZE.*-g|s/^dnl //g'"
+
.if defined(WITH_POPAUTH)
. if defined(WITH_BDB_BASE)
IGNORE= does not work with base bdb
@@ -74,9 +76,6 @@
SUB_LIST= "RC_SCRIPT=${PREFIX}/etc/rc.d/${USE_RC_SUBR}"
-.if defined(WITH_DEBUG)
-SITE_SUB+= -e '\|confOPTIMIZE.*-g|s/^dnl //g'
-.endif
.if !defined(WITHOUT_ARLIB)
SITE_SUB+= -e '\|bld_USE_ARLIB|s/^dnl //g'
.endif
Index: mail/nmh/Makefile
===================================================================
--- mail/nmh/Makefile
+++ mail/nmh/Makefile
@@ -24,6 +24,10 @@
OPTIONS_SINGLE_MTS= SMTP SENDMAIL_SMTP SENDMAIL_PIPE
OPTIONS_SINGLE_LOCKING= DOT FCNTL FLOCK LOCKF
+DEBUG_CONFIGURE_ENABLE= debug
+DEBUG_LDFLAGS= -g
+DEBUG_FLAGS= -O0 -Wall -Wextra -g
+
SASL2_DESC= SASL2 support
SASL2_CONFIGURE_WITH= cyrus-sasl
SASL2_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
@@ -64,12 +68,6 @@
USES+= ssl
.else
CONFIGURE_ARGS+= --without-tls
-.endif
-
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+= --enable-debug
-LDFLAGS+= -g
-DEBUG_FLAGS+= -O0 -Wall -Wextra -g
.endif
CONFLICTS= ja-mh-[0-9]*
Index: mail/rspamd-devel/Makefile
===================================================================
--- mail/rspamd-devel/Makefile
+++ mail/rspamd-devel/Makefile
@@ -26,7 +26,7 @@
GH_ACCOUNT= vstakhov
GH_TAGNAME= 0fed6e67d
-OPTIONS_DEFINE= GPERF GD CGP TORCH
+OPTIONS_DEFINE= DEBUG GPERF GD CGP TORCH
OPTIONS_DEFINE_amd64= HYPERSCAN
OPTIONS_SUB= yes
@@ -36,7 +36,7 @@
HYPERSCAN_DESC= Use hyperscan optimizations (amd64 only)
TORCH_DESC= Build with embedded Torch7
-OPTIONS_DEFAULT= TORCH
+OPTIONS_DEFAULT= DEBUG TORCH
USE_RC_SUBR= rspamd
@@ -63,7 +63,6 @@
USE_GNOME= glib20
DEBUG_FLAGS= -g -O0
-WITH_DEBUG= yes
.include <bsd.port.options.mk>
Index: math/fftw3/Makefile
===================================================================
--- math/fftw3/Makefile
+++ math/fftw3/Makefile
@@ -118,7 +118,7 @@
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
CFLAGS+= -O3 -ffast-math -fstrict-aliasing
-. if !defined(WITH_DEBUG)
+. if ! ${PORT_OPTIONS:MDEBUG}
CFLAGS+= -fomit-frame-pointer
. endif
. if ${ARCH} == "i386" && (${COMPILER_TYPE} == "gcc" || !empty(USE_GCC)) && !${PORT_OPTIONS:MOPENMPI}
Index: math/msieve/Makefile
===================================================================
--- math/msieve/Makefile
+++ math/msieve/Makefile
@@ -23,17 +23,14 @@
PLIST_FILES= bin/msieve lib/libmsieve.a ${HEADERS:S|^|include/msieve/|}
PORTDOCS= Changes Readme Readme.nfs Readme.qs
-OPTIONS_DEFINE= OPTIMIZED_CFLAGS DOCS
+OPTIONS_DEFINE= OPTIMIZED_CFLAGS DEBUG DOCS
OPTIONS_DEFAULT= OPTIMIZED_CFLAGS
-.include <bsd.port.options.mk>
+DEBUG_PREVENTS= OPTIMIZED_CFLAGS
+DEBUG_PREVENTS_MSG= Compiler optimizations are incompatible with proper debugging
+OPTIMIZED_CFLAGS_CFLAGS= -O3 -ffast-math -fomit-frame-pointer -DNDEBUG
-.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
-CFLAGS+= -O3 -ffast-math
-.if !defined(WITH_DEBUG)
-CFLAGS+= -fomit-frame-pointer -DNDEBUG
-.endif
-.endif
+.include <bsd.port.pre.mk>
.if ${MACHINE_CPU:Mathlon}
CFLAGS+= -DHAS_AMD_MMX
@@ -75,4 +72,4 @@
@cd ${WRKSRC}; \
./msieve -q -d 1 2385734365243128176756453434347656453122245767798
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: math/pari/Makefile
===================================================================
--- math/pari/Makefile
+++ math/pari/Makefile
@@ -26,7 +26,7 @@
--with-readline
ALL_TARGET= gp
-OPTIONS_DEFINE= DOCS OPTIMIZED_CFLAGS X11
+OPTIONS_DEFINE= DEBUG DOCS OPTIMIZED_CFLAGS X11
OPTIONS_RADIO= THREADS
OPTIONS_RADIO_THREADS= PTHREADS MPI
OPTIONS_DEFAULT= OPTIMIZED_CFLAGS X11 PTHREADS
@@ -34,9 +34,9 @@
PTHREADS_DESC= Enable pthread thread engine
MPI_DESC= Enable MPI thread engine
MPI_BUILD_ENV= CC=mpicc
-.ifndef WITH_DEBUG
+DEBUG_PREVENTS= OPTIMIZED_CFLAGS
+DEBUG_PREVENTS_MSG= Compiler optimizations are incompatible with proper debugging
OPTIMIZED_CFLAGS_CFLAGS= -O3 -fno-strict-aliasing -fomit-frame-pointer
-.endif
X11_CONFIGURE_ON= --graphic=X11
X11_CONFIGURE_OFF= --graphic=none
X11_USE= xorg=x11
Index: multimedia/dirac/Makefile
===================================================================
--- multimedia/dirac/Makefile
+++ multimedia/dirac/Makefile
@@ -21,8 +21,6 @@
CPPFLAGS+= -I${LOCALBASE}/include
CXXFLAGS+= -std=c++98
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+=--enable-debug
-.endif
+DEBUG_CONFIGURE_ENABLE= debug
.include <bsd.port.mk>
Index: multimedia/mlt/Makefile
===================================================================
--- multimedia/mlt/Makefile
+++ multimedia/mlt/Makefile
@@ -18,11 +18,7 @@
USE_GITHUB= yes
GH_ACCOUNT= mltframework
-.ifndef(WITH_DEBUG)
-CONFIGURE_ARGS+=--disable-debug
-.else
-CONFIGURE_ARGS+=--enable-debug
-.endif
+DEBUG_CONFIGURE_ENABLE= debug
.ifndef(SLAVEPORT) # Master port.
Index: multimedia/mplayer/Makefile.options
===================================================================
--- multimedia/mplayer/Makefile.options
+++ multimedia/mplayer/Makefile.options
@@ -55,7 +55,6 @@
# =================================
.if ${PORT_OPTIONS:MDEBUG}
-WITH_DEBUG= yes
CONFIGURE_ARGS+= --enable-debug=3
.endif
Index: multimedia/vlc/Makefile
===================================================================
--- multimedia/vlc/Makefile
+++ multimedia/vlc/Makefile
@@ -54,14 +54,11 @@
--disable-wasapi --disable-x26410b \
--with-kde-solid=${PREFIX}/share/apps/solid/actions \
ac_cv_search_pthread_rwlock_init=-pthread
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+=--enable-debug
-.endif
CPPFLAGS+= -I${LOCALBASE}/include
CFLAGS_i386= -fomit-frame-pointer
LIBS+= -L${LOCALBASE}/lib
-OPTIONS_DEFINE= A52 AALIB ASS AVAHI CACA DBUS DCA DOCS DVDREAD \
+OPTIONS_DEFINE= A52 AALIB ASS AVAHI CACA DBUS DCA DEBUG DOCS DVDREAD \
DVDNAV FAAD FLAC FLUID FREERDP FRIBIDI GME GNOMEVFS2 GNUTLS \
GOOM HTTPD JACK KATE LIBBLURAY LIBRSVG2 LIBSSH2 LIRC \
LIVEMEDIA LUA MAD MATROSKA MODPLUG MPEG2 MTP MUSEPACK \
@@ -114,6 +111,8 @@
DCA_LIB_DEPENDS= libdca.so:multimedia/libdca
DCA_CONFIGURE_ENABLE= dca
+
+DEBUG_CONFIGURE_ENABLE= debug
DVDREAD_LIB_DEPENDS= libdvdread.so:multimedia/libdvdread
DVDREAD_CONFIGURE_ENABLE= dvdread
Index: multimedia/xmms/Makefile
===================================================================
--- multimedia/xmms/Makefile
+++ multimedia/xmms/Makefile
@@ -22,6 +22,7 @@
USE_GNOME= gtk12
USE_LDCONFIG= yes
USE_XORG= sm x11 xxf86vm
+INSTALL_TARGET= install-strip
CONFIGURE_ARGS= xmms_cv_newpcm_driver=yes --disable-static
CONFIGURE_ENV= INPUT_PLUGINS="${INPUT_PLUGINS}" \
@@ -64,10 +65,6 @@
VORBIS_CONFIGURE_ENABLE=vorbis
VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis
VORBIS_VARS= INPUT_PLUGINS+=vorbis
-
-.if !defined(WITH_DEBUG)
-INSTALL_TARGET= install-strip
-.endif
post-patch:
@${REINPLACE_CMD} -e 's/alsa_found=yes/alsa_found=no/' \
Index: net-mgmt/aircrack-ng/Makefile
===================================================================
--- net-mgmt/aircrack-ng/Makefile
+++ net-mgmt/aircrack-ng/Makefile
@@ -23,7 +23,7 @@
DOS2UNIX_FILES= src/osdep/byteorder.h
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
-# Don't call 'strip' target with WITH_DEBUG set
+# Don't call 'strip' target with DEBUG option on
#INSTALL_TARGET= ${STRIP:S/-s/strip/} install
OPTIONS_DEFINE= PCRE SQLITE
Index: net-mgmt/rrdbot/Makefile
===================================================================
--- net-mgmt/rrdbot/Makefile
+++ net-mgmt/rrdbot/Makefile
@@ -19,9 +19,7 @@
SUB_FILES= pkg-message
USE_RC_SUBR= rrdbot
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+= --enable-debug
-.endif
+DEBUG_CONFIGURE_ENABLE= debug
.if defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --disable-ipv6
Index: net-p2p/linuxdcpp/Makefile
===================================================================
--- net-p2p/linuxdcpp/Makefile
+++ net-p2p/linuxdcpp/Makefile
@@ -22,9 +22,7 @@
OPTIONS_DEFINE= NOTIFY
OPTIONS_DEFAULT=NOTIFY
-.if defined(WITH_DEBUG)
-MAKE_ARGS+= debug=1
-.endif
+DEBUG_MAKE_ARGS= debug=1
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
Index: net/libsrtp/Makefile
===================================================================
--- net/libsrtp/Makefile
+++ net/libsrtp/Makefile
@@ -30,9 +30,7 @@
TEST_TARGET= runtest
TEST_ENV= LD_LIBRARY_PATH=${WRKSRC}
-.if ! defined(WITH_DEBUG)
-CONFIGURE_ARGS+=--disable-debug
-.endif
+DEBUG_CONFIGURE_ENABLE= debug
post-patch:
@${REINPLACE_CMD} '/pkg-config.*openssl/d' ${WRKSRC}/configure
Index: net/libzmq4/Makefile
===================================================================
--- net/libzmq4/Makefile
+++ net/libzmq4/Makefile
@@ -38,7 +38,6 @@
NORM_DESC= Enable NORM via NRL
DEBUG_CONFIGURE_ENABLE= debug
-DEBUG_VARS= WITH_DEBUG=yes
PGM_CONFIGURE_WITH= pgm
PGM_LIB_DEPENDS= libpgm.so:net/openpgm
Index: net/linphone/Makefile
===================================================================
--- net/linphone/Makefile
+++ net/linphone/Makefile
@@ -55,9 +55,7 @@
VIDEO_CONFIGURE_ENABLE= video
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+=--enable-debug
-.endif
+DEBUG_CONFIGURE_ENABLE= debug
post-install:
${RM} -r ${STAGEDIR}${PREFIX}/share/gnome
Index: net/mediastreamer/Makefile
===================================================================
--- net/mediastreamer/Makefile
+++ net/mediastreamer/Makefile
@@ -84,9 +84,7 @@
XVIDEO_CONFIGURE_ENABLE=x11 xv
XVIDEO_USE= XORG=videoproto,x11,xv
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+=--enable-debug
-.endif
+DEBUG_CONFIGURE_ENABLE= debug
post-patch:
@${REINPLACE_CMD} 's,gsm/gsm\.h,gsm.h,' \
Index: net/miniupnpc/Makefile
===================================================================
--- net/miniupnpc/Makefile
+++ net/miniupnpc/Makefile
@@ -19,11 +19,9 @@
CONFIGURE_SCRIPT= updateminiupnpcstrings.sh
MAKE_ENV+= INSTALLPREFIX=${PREFIX}
-.include <bsd.port.pre.mk>
+DEBUG_CFLAGS= -DDEBUG
-.if defined(WITH_DEBUG)
-CFLAGS+= -DDEBUG
-.endif
+.include <bsd.port.pre.mk>
.if ${SLAVE_PORT} == no
USE_RC_SUBR= miniupnpc
Index: net/samba45/Makefile
===================================================================
--- net/samba45/Makefile
+++ net/samba45/Makefile
@@ -170,7 +170,6 @@
DEBUG_CONFIGURE_ON= --verbose --enable-debug
DEBUG_MAKE_ARGS= --verbose
-DEBUG_VARS= WITH_DEBUG=yes
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194046
GDB_CMD?= ${LOCALBASE}/bin/gdb
Index: net/samba46/Makefile
===================================================================
--- net/samba46/Makefile
+++ net/samba46/Makefile
@@ -166,7 +166,6 @@
DEBUG_CONFIGURE_ON= --verbose --enable-debug
DEBUG_MAKE_ARGS= --verbose
-DEBUG_VARS= WITH_DEBUG=yes
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194046
GDB_CMD?= ${LOCALBASE}/bin/gdb
Index: net/udpxy/Makefile
===================================================================
--- net/udpxy/Makefile
+++ net/udpxy/Makefile
@@ -37,7 +37,6 @@
ALL_TARGET=lean
.elif ${PORT_OPTIONS:MDEBUG}
ALL_TARGET=debug
-WITH_DEBUG=yes
.endif
.include <bsd.port.mk>
Index: news/newsx/Makefile
===================================================================
--- news/newsx/Makefile
+++ news/newsx/Makefile
@@ -47,10 +47,8 @@
@${ECHO} "again."
@${ECHO} "*********************************************************"
-post-build:
-.if !defined(WITH_DEBUG)
+post-build-DEBUG-off:
${STRIP_CMD} ${WRKSRC}/src/newsx
-.endif
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
Index: ports-mgmt/pkg-devel/Makefile
===================================================================
--- ports-mgmt/pkg-devel/Makefile
+++ ports-mgmt/pkg-devel/Makefile
@@ -14,7 +14,7 @@
LICENSE= BSD2CLAUSE
-WITH_DEBUG= yes
+OPTIONS_DEFAULT= DEBUG
CFLAGS+= -O0 -g -Wno-error
USE_LDCONFIG= yes
USES= libtool tar:xz
Index: ports-mgmt/pkg/Makefile
===================================================================
--- ports-mgmt/pkg/Makefile
+++ ports-mgmt/pkg/Makefile
@@ -32,11 +32,9 @@
EXTRA_PATCHES= ${FILESDIR}/extra-patch-docs_pkg.8
.endif
-.include <bsd.port.pre.mk>
+DEBUG_MAKE_ARGS= DEBUG_FLAGS="${DEBUG_FLAGS}"
-.if defined(WITH_DEBUG)
-MAKE_ARGS+= DEBUG_FLAGS="${DEBUG_FLAGS}"
-.endif
+.include <bsd.port.pre.mk>
.if defined(WITH_PKG)
.if ${WITH_PKG} == devel
Index: science/ecs/Makefile
===================================================================
--- science/ecs/Makefile
+++ science/ecs/Makefile
@@ -42,11 +42,9 @@
DOCS_USE= TEX=tex:build
DOCS_BUILD_DEPENDS= fig2dev:print/transfig
-.include <bsd.port.options.mk>
+DEBUG_CONFIGURE_ENABLE= debug
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+= --enable-debug
-.endif
+.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= mi_ecs.pdf mt_ecs.pdf
Index: science/fvm/Makefile
===================================================================
--- science/fvm/Makefile
+++ science/fvm/Makefile
@@ -38,9 +38,7 @@
USES+= fortran
.endif
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+= --enable-debug
-.endif
+DEBUG_CONFIGURE_ENABLE= debug
TESTSBIN= fvm_file_test fvm_interface_test fvm_selector_postfix_test fvm_selector_test
Index: security/amavisd-milter/Makefile
===================================================================
--- security/amavisd-milter/Makefile
+++ security/amavisd-milter/Makefile
@@ -42,6 +42,8 @@
PORTDOCS= AUTHORS CHANGES INSTALL LICENSE README TODO
+DEBUG_CONFIGURE_ENABLE= debug
+
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
@@ -52,10 +54,6 @@
.if defined(WITH_SENDMAIL_PORT)
CONFIGURE_ARGS+=--with-sendmail=${MILTERBASE}
-.endif
-
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+=--enable-debug
.endif
post-install:
Index: security/libpwstor/Makefile
===================================================================
--- security/libpwstor/Makefile
+++ security/libpwstor/Makefile
@@ -14,14 +14,12 @@
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
+DEBUG_CONFIGURE_ENABLE= debug
+
.include <bsd.port.pre.mk>
.if ${ARCH} != "i386"
CFLAGS+= -fPIC -DPIC
-.endif
-
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+=--enable-debug
.endif
post-install:
Index: security/putty/Makefile
===================================================================
--- security/putty/Makefile
+++ security/putty/Makefile
@@ -30,6 +30,8 @@
OPTIONS_SINGLE_GSSAPI_SELECT= GSSAPI_NONE GSSAPI_BASE GSSAPI_HEIMDAL \
GSSAPI_MIT
+DEBUG_VARS= XFLAGS=-DDEBUG
+
CONFLICTS_INSTALL?= pssh-[0-9]* putty-gtk2-[0-9]* putty-nogtk-[0-9]*
.include <bsd.port.options.mk>
@@ -78,10 +80,6 @@
.endif
_COMPAT+= -DOMIT_UTMP
-
-.if defined(WITH_DEBUG)
-XFLAGS= -DDEBUG
-.endif
# upstream sets -Werror - there are no issues on 9.1-FreeBSD amd64
# currently, but override it nonetheless.
Index: sysutils/ipmitool/Makefile
===================================================================
--- sysutils/ipmitool/Makefile
+++ sysutils/ipmitool/Makefile
@@ -32,9 +32,7 @@
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
-.if defined(WITH_DEBUG)
-CFLAGS+= -ggdb -Wall
-.endif
+DEBUG_CFLAGS= -ggdb -Wall
.if exists(/usr/include/sys/ipmi.h)
CONFIGURE_ARGS+= --enable-intf-open
Index: sysutils/polkit/Makefile
===================================================================
--- sysutils/polkit/Makefile
+++ sysutils/polkit/Makefile
@@ -40,6 +40,7 @@
--localstatedir=/var
#MAKE_JOBS_UNSAFE=yes
INSTALL_TARGET= install-strip
+DEBUG_FLAGS+= -DDEBUG
OPTIONS_DEFINE= MANPAGES
MANPAGES_BUILD_DEPENDS= docbook-sgml>=4.5:textproc/docbook-sgml \
Index: sysutils/rsyslog8/Makefile
===================================================================
--- sysutils/rsyslog8/Makefile
+++ sysutils/rsyslog8/Makefile
@@ -105,9 +105,7 @@
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
-.ifdef WITH_DEBUG
-CONFIGURE_ARGS+=--enable-rtinst --enable-debug
-.endif
+DEBUG_CONFIGURE_ON= --enable-rtinst --enable-debug
.include <bsd.port.pre.mk>
Index: sysutils/xstow/Makefile
===================================================================
--- sysutils/xstow/Makefile
+++ sysutils/xstow/Makefile
@@ -14,9 +14,7 @@
USES= tar:bzip2
GNU_CONFIGURE= yes
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+= --enable-debug
-.endif
+DEBUG_CONFIGURE_ENABLE= debug
PLIST_FILES= bin/merge-info bin/xstow \
man/man1/merge-info.1.gz man/man1/xstow.1.gz \
Index: textproc/simplexml/Makefile
===================================================================
--- textproc/simplexml/Makefile
+++ textproc/simplexml/Makefile
@@ -21,9 +21,7 @@
WRKSRC= ${WRKDIR}/${PORTNAME}
-.if defined(WITH_DEBUG)
-CMAKE_ARGS+= -DDEBUG_MODE:BOOL=ON
-.endif
+DEBUG_CMAKE_ON= -DDEBUG_MODE:BOOL=ON
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|; \
Index: www/apache24/Makefile
===================================================================
--- www/apache24/Makefile
+++ www/apache24/Makefile
@@ -100,6 +100,11 @@
ETC_SUBDIRS= Includes envvars.d extra modules.d
+DEBUG_FLAGS?= -O0 -g -ggdb3
+DEBUG_CONFIGURE_ON= --enable-maintainer-mode
+DEBUG_VARS= WITH_EXCEPTION_HOOK=yes
+DEBUG_EXTRA_PATCHES_OFF= ${FILESDIR}/extra-patch-server_buildmark.c
+
APR_CONFIG?= ${LOCALBASE}/bin/apr-1-config
APU_CONFIG?= ${LOCALBASE}/bin/apu-1-config
APU_LDAP?= ${LOCALBASE}/lib/apr-util-1/apr_ldap.so
@@ -171,15 +176,6 @@
# Only to be used for special builds
.if defined(WITH_STATIC_SUPPORT)
CONFIGURE_ARGS+= --enable-static-support
-.endif
-.if defined(WITH_DEBUG)
-# debug overrides CFLAGS
-DEBUG_FLAGS?= -O0 -g -ggdb3
-CFLAGS= ${DEBUG_FLAGS}
-CONFIGURE_ARGS+= --enable-maintainer-mode
-WITH_EXCEPTION_HOOK= yes
-.else
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-server_buildmark.c
.endif
.if defined(WITH_EXCEPTION_HOOK)
CONFIGURE_ARGS+= --enable-exception-hook
Index: www/dillo2/Makefile
===================================================================
--- www/dillo2/Makefile
+++ www/dillo2/Makefile
@@ -38,14 +38,10 @@
IPV6_CONFIGURE_ENABLE= ipv6
SSL_CONFIGURE_ENABLE= ssl
THREADS_CONFIGURE_ENABLE= threaded-dns
+DEBUG_CONFIGURE_ON= --enable-gprof --enable-rtfl
+DEBUG_CONFIGURE_OFF= --disable-gprof --disable-rtfl
.include <bsd.port.pre.mk>
-
-.ifdef(WITH_DEBUG)
-CONFIGURE_ARGS+= --enable-gprof --enable-rtfl
-.else
-CONFIGURE_ARGS+= --disable-gprof --disable-rtfl
-.endif
.if ${PORT_OPTIONS:MHYPHENATION}
ALL_HYPHENATION_LANGS= af as bg bn ca cop cs cy da de-1901 de-1996 \
Index: www/gatling/Makefile
===================================================================
--- www/gatling/Makefile
+++ www/gatling/Makefile
@@ -41,6 +41,10 @@
TLS_DESC= Build and install tlsgatling
ZLIB_DESC= Compress outgoing data
+DEBUG_PREVENTS= OPTIMIZED_CFLAGS
+DEBUG_PREVENTS_MSG= Compiler optimizations are incompatible with proper debugging
+DEBUG_MAKE_ENV= DEBUG=1
+
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MBENCHMARKS}
@@ -54,7 +58,7 @@
MAKE_ENV+= BENCHMARKS=1
.endif
-.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} && !defined(WITH_DEBUG)
+.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
CFLAGS+= -O2 -fomit-frame-pointer
.endif
@@ -74,11 +78,6 @@
.if ${PORT_OPTIONS:MZLIB}
MAKE_ENV+= ZLIB=1
-.endif
-
-.if ${PORT_OPTIONS:MDEBUG}
-MAKE_ENV+= DEBUG=1
-STRIP=
.endif
PLIST_FILES+= ${bin:S,^,bin/,} ${sbin:S,^,sbin/,} sbin/gatling_wrapper
Index: www/mod_flickr/Makefile
===================================================================
--- www/mod_flickr/Makefile
+++ www/mod_flickr/Makefile
@@ -17,9 +17,7 @@
AP_INC= ${LOCALBASE}/include
AP_LIB= ${LOCALBASE}/lib
-.if defined(WITH_DEBUG)
-XTRA_FLAGS+= -DDEBUG
-.endif
+DEBUG_VARS= XTRA_FLAGS+=-DDEBUG
AP_EXTRAS= ${XTRA_FLAGS}
USE_LDCONFIG= yes
Index: www/squid-devel/Makefile
===================================================================
--- www/squid-devel/Makefile
+++ www/squid-devel/Makefile
@@ -279,9 +279,8 @@
# Other options set via 'make config':
-.if ${PORT_OPTIONS:MDEBUG} || defined(WITH_DEBUG)
+.if ${PORT_OPTIONS:MDEBUG}
CONFIGURE_ARGS+= --disable-optimizations --enable-debug-cbdata
-WITH_DEBUG?= yes
.endif
# Finally, add additional user specified configuration options:
Index: www/squid/Makefile
===================================================================
--- www/squid/Makefile
+++ www/squid/Makefile
@@ -270,9 +270,8 @@
# Other options set via 'make config':
-.if ${PORT_OPTIONS:MDEBUG} || defined(WITH_DEBUG)
+.if ${PORT_OPTIONS:MDEBUG}
CONFIGURE_ARGS+= --disable-optimizations --enable-debug-cbdata
-WITH_DEBUG?= yes
.endif
# Finally, add additional user specified configuration options:
Index: www/suphp/Makefile
===================================================================
--- www/suphp/Makefile
+++ www/suphp/Makefile
@@ -42,10 +42,10 @@
CONFIGURE_ARGS+= --with-apr=${LOCALBASE}
-post-install:
-.if !defined(WITH_DEBUG)
+post-install-DEBUG-off:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/suphp
-.endif
+
+post-install:
${INSTALL_DATA} ${WRKSRC}/doc/suphp.conf-example \
${STAGEDIR}${PREFIX}/etc/suphp.conf-example
Index: x11-toolkits/diorite/Makefile
===================================================================
--- x11-toolkits/diorite/Makefile
+++ x11-toolkits/diorite/Makefile
@@ -28,11 +28,8 @@
MAKE_ARGS= --no-ldconfig
USE_LDCONFIG= yes
-.ifdef(WITH_DEBUG)
-CONFIGURE_ARGS+=--debug
-.else
-CONFIGURE_ARGS+=--no-debug
-.endif
+DEBUG_CONFIGURE_ON= --debug
+DEBUG_CONFIGURE_OFF= --no-debug
pre-configure:
@${REINPLACE_CMD} -e '/pkgconfig/ s,$${LIBDIR},${PREFIX}/libdata,' \
Index: x11/gdm/Makefile
===================================================================
--- x11/gdm/Makefile
+++ x11/gdm/Makefile
@@ -96,11 +96,7 @@
IPV6_CONFIGURE_ENABLE= ipv6
-.include <bsd.port.options.mk>
-
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+= --enable-debug
-.endif
+DEBUG_CONFIGURE_ENABLE= debug
post-patch:
@${REINPLACE_CMD} -e 's|root:root|root:wheel|g' \

File Metadata

Mime Type
text/plain
Expires
Thu, Jun 18, 12:21 PM (13 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34050436
Default Alt Text
D15773.id43644.diff (47 KB)

Event Timeline