diff options
Diffstat (limited to 'devel/gdb/Makefile')
-rw-r--r-- | devel/gdb/Makefile | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/devel/gdb/Makefile b/devel/gdb/Makefile index f36d61ce602a..a9a6410e770e 100644 --- a/devel/gdb/Makefile +++ b/devel/gdb/Makefile @@ -32,7 +32,7 @@ PLIST_SUB= VER=${VER} ONLY_FOR_ARCHS= i386 amd64 powerpc powerpc64 # untested elsewhere, might work -OPTIONS_DEFINE= DEBUG EXPAT GDB_LINK GUILE PYTHON THREADS TUI +OPTIONS_DEFINE= DEBUG EXPAT GDB_LINK GUILE KGDB PYTHON THREADS TUI OPTIONS_DEFAULT= GDB_LINK THREADS TUI PORT_READLINE @@ -40,6 +40,7 @@ OPTIONS_SINGLE= READLINE OPTIONS_SINGLE_READLINE= BASE_READLINE BUNDLED_READLINE PORT_READLINE GDB_LINK_DESC= Create ${PREFIX}/bin/gdb symlink +KGDB_DESC= Kernel Debugging Support BASE_READLINE_DESC= from base system (experimental) BUNDLED_READLINE_DESC= from gdb distfile PORT_READLINE_DESC= from devel/readline port @@ -76,10 +77,21 @@ CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL} post-patch: @${REINPLACE_CMD} -e 's|$$| [GDB v${PORTVERSION} for FreeBSD]|' \ ${WRKSRC}/gdb/version.in - -post-patch-THREADS-on: +.if ${PORT_OPTIONS:MTHREADS} @${CP} ${FILESDIR}/fbsd-threads.c ${WRKSRC}/gdb/ @${PATCH} ${PATCH_ARGS} < ${FILESDIR}/extrapatch-threads +.endif +.if ${PORT_OPTIONS:MKGDB} + @${CP} -r ${FILESDIR}/kgdb/*.[ch] ${WRKSRC}/gdb/ + @${PATCH} ${PATCH_ARGS} < ${FILESDIR}/extrapatch-kgdb +.if ${PORT_OPTIONS:MTHREADS} + @${PATCH} ${PATCH_ARGS} < \ + ${FILESDIR}/extrapatch-kgdb-configure.tgt-threads +.else + @${PATCH} ${PATCH_ARGS} < \ + ${FILESDIR}/extrapatch-kgdb-configure.tgt-plain +.endif +.endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/gdb/gdb \ @@ -87,11 +99,18 @@ do-install: ${INSTALL_MAN} ${WRKSRC}/gdb/doc/gdb.1 \ ${STAGEDIR}${MAN1PREFIX}/man/man1/gdb${VER}.1 +do-install-KGDB-on: + ${INSTALL_PROGRAM} ${WRKSRC}/gdb/kgdb \ + ${STAGEDIR}${PREFIX}/bin/kgdb${VER} + do-install-TUI-on: ${LN} -sf gdb${VER} ${STAGEDIR}${PREFIX}/bin/gdbtui${VER} do-install-GDB_LINK-on: ${LN} -sf gdb${VER} ${STAGEDIR}${PREFIX}/bin/gdb +.if ${PORT_OPTIONS:MKGDB} + ${LN} -sf kgdb${VER} ${STAGEDIR}${PREFIX}/bin/kgdb +.endif do-install-PYTHON-on: (cd ${WRKSRC}/gdb; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install-python ) |