head 1.20; access; symbols pkgsrc-2023Q4:1.20.0.8 pkgsrc-2023Q4-base:1.20 pkgsrc-2023Q3:1.20.0.6 pkgsrc-2023Q3-base:1.20 pkgsrc-2023Q2:1.20.0.4 pkgsrc-2023Q2-base:1.20 pkgsrc-2023Q1:1.20.0.2 pkgsrc-2023Q1-base:1.20 pkgsrc-2022Q4:1.19.0.26 pkgsrc-2022Q4-base:1.19 pkgsrc-2022Q3:1.19.0.24 pkgsrc-2022Q3-base:1.19 pkgsrc-2022Q2:1.19.0.22 pkgsrc-2022Q2-base:1.19 pkgsrc-2022Q1:1.19.0.20 pkgsrc-2022Q1-base:1.19 pkgsrc-2021Q4:1.19.0.18 pkgsrc-2021Q4-base:1.19 pkgsrc-2021Q3:1.19.0.16 pkgsrc-2021Q3-base:1.19 pkgsrc-2021Q2:1.19.0.14 pkgsrc-2021Q2-base:1.19 pkgsrc-2021Q1:1.19.0.12 pkgsrc-2021Q1-base:1.19 pkgsrc-2020Q4:1.19.0.10 pkgsrc-2020Q4-base:1.19 pkgsrc-2020Q3:1.19.0.8 pkgsrc-2020Q3-base:1.19 pkgsrc-2020Q2:1.19.0.6 pkgsrc-2020Q2-base:1.19 pkgsrc-2020Q1:1.19.0.2 pkgsrc-2020Q1-base:1.19 pkgsrc-2019Q4:1.19.0.4 pkgsrc-2019Q4-base:1.19 pkgsrc-2019Q3:1.18.0.20 pkgsrc-2019Q3-base:1.18 pkgsrc-2019Q2:1.18.0.18 pkgsrc-2019Q2-base:1.18 pkgsrc-2019Q1:1.18.0.16 pkgsrc-2019Q1-base:1.18 pkgsrc-2018Q4:1.18.0.14 pkgsrc-2018Q4-base:1.18 pkgsrc-2018Q3:1.18.0.12 pkgsrc-2018Q3-base:1.18 pkgsrc-2018Q2:1.18.0.10 pkgsrc-2018Q2-base:1.18 pkgsrc-2018Q1:1.18.0.8 pkgsrc-2018Q1-base:1.18 pkgsrc-2017Q4:1.18.0.6 pkgsrc-2017Q4-base:1.18 pkgsrc-2017Q3:1.18.0.4 pkgsrc-2017Q3-base:1.18 pkgsrc-2017Q2:1.17.0.52 pkgsrc-2017Q2-base:1.17 pkgsrc-2017Q1:1.17.0.50 pkgsrc-2017Q1-base:1.17 pkgsrc-2016Q4:1.17.0.48 pkgsrc-2016Q4-base:1.17 pkgsrc-2016Q3:1.17.0.46 pkgsrc-2016Q3-base:1.17 pkgsrc-2016Q2:1.17.0.44 pkgsrc-2016Q2-base:1.17 pkgsrc-2016Q1:1.17.0.42 pkgsrc-2016Q1-base:1.17 pkgsrc-2015Q4:1.17.0.40 pkgsrc-2015Q4-base:1.17 pkgsrc-2015Q3:1.17.0.38 pkgsrc-2015Q3-base:1.17 pkgsrc-2015Q2:1.17.0.36 pkgsrc-2015Q2-base:1.17 pkgsrc-2015Q1:1.17.0.34 pkgsrc-2015Q1-base:1.17 pkgsrc-2014Q4:1.17.0.32 pkgsrc-2014Q4-base:1.17 pkgsrc-2014Q3:1.17.0.30 pkgsrc-2014Q3-base:1.17 pkgsrc-2014Q2:1.17.0.28 pkgsrc-2014Q2-base:1.17 pkgsrc-2014Q1:1.17.0.26 pkgsrc-2014Q1-base:1.17 pkgsrc-2013Q4:1.17.0.24 pkgsrc-2013Q4-base:1.17 pkgsrc-2013Q3:1.17.0.22 pkgsrc-2013Q3-base:1.17 pkgsrc-2013Q2:1.17.0.20 pkgsrc-2013Q2-base:1.17 pkgsrc-2013Q1:1.17.0.18 pkgsrc-2013Q1-base:1.17 pkgsrc-2012Q4:1.17.0.16 pkgsrc-2012Q4-base:1.17 pkgsrc-2012Q3:1.17.0.14 pkgsrc-2012Q3-base:1.17 pkgsrc-2012Q2:1.17.0.12 pkgsrc-2012Q2-base:1.17 pkgsrc-2012Q1:1.17.0.10 pkgsrc-2012Q1-base:1.17 pkgsrc-2011Q4:1.17.0.8 pkgsrc-2011Q4-base:1.17 pkgsrc-2011Q3:1.17.0.6 pkgsrc-2011Q3-base:1.17 pkgsrc-2011Q2:1.17.0.4 pkgsrc-2011Q2-base:1.17 pkgsrc-2011Q1:1.17.0.2 pkgsrc-2011Q1-base:1.17 pkgsrc-2010Q4:1.16.0.2 pkgsrc-2010Q4-base:1.16 pkgsrc-2010Q3:1.15.0.10 pkgsrc-2010Q3-base:1.15 pkgsrc-2010Q2:1.15.0.8 pkgsrc-2010Q2-base:1.15 pkgsrc-2010Q1:1.15.0.6 pkgsrc-2010Q1-base:1.15 pkgsrc-2009Q4:1.15.0.4 pkgsrc-2009Q4-base:1.15 pkgsrc-2009Q3:1.15.0.2 pkgsrc-2009Q3-base:1.15 pkgsrc-2009Q2:1.14.0.30 pkgsrc-2009Q2-base:1.14 pkgsrc-2009Q1:1.14.0.28 pkgsrc-2009Q1-base:1.14 pkgsrc-2008Q4:1.14.0.26 pkgsrc-2008Q4-base:1.14 pkgsrc-2008Q3:1.14.0.24 pkgsrc-2008Q3-base:1.14 cube-native-xorg:1.14.0.22 cube-native-xorg-base:1.14 pkgsrc-2008Q2:1.14.0.20 pkgsrc-2008Q2-base:1.14 cwrapper:1.14.0.18 pkgsrc-2008Q1:1.14.0.16 pkgsrc-2008Q1-base:1.14 pkgsrc-2007Q4:1.14.0.14 pkgsrc-2007Q4-base:1.14 pkgsrc-2007Q3:1.14.0.12 pkgsrc-2007Q3-base:1.14 pkgsrc-2007Q2:1.14.0.10 pkgsrc-2007Q2-base:1.14 pkgsrc-2007Q1:1.14.0.8 pkgsrc-2007Q1-base:1.14 pkgsrc-2006Q4:1.14.0.6 pkgsrc-2006Q4-base:1.14 pkgsrc-2006Q3:1.14.0.4 pkgsrc-2006Q3-base:1.14 pkgsrc-2006Q2:1.14.0.2 pkgsrc-2006Q2-base:1.14 pkgsrc-2006Q1:1.12.0.2 pkgsrc-2006Q1-base:1.12 pkgsrc-2005Q4:1.10.0.6 pkgsrc-2005Q4-base:1.10 pkgsrc-2005Q3:1.10.0.4 pkgsrc-2005Q3-base:1.10 pkgsrc-2005Q2:1.10.0.2 pkgsrc-2005Q2-base:1.10 pkgsrc-2005Q1:1.9.0.2 pkgsrc-2005Q1-base:1.9 pkgsrc-2004Q4:1.2.0.6 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.4 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.2 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.1.0.2 pkgsrc-2004Q1-base:1.1; locks; strict; comment @# @; 1.20 date 2023.01.16.08.17.30; author adam; state Exp; branches; next 1.19; commitid rizeVN7gbqhK1K9E; 1.19 date 2019.11.03.11.45.40; author rillig; state Exp; branches; next 1.18; commitid llzTCvoTAgLcNoJB; 1.18 date 2017.07.24.07.23.28; author dbj; state Exp; branches; next 1.17; commitid C3NxZq4adSXb5s0A; 1.17 date 2011.01.29.21.17.48; author markd; state Exp; branches; next 1.16; 1.16 date 2011.01.07.05.11.36; author obache; state Exp; branches; next 1.15; 1.15 date 2009.09.13.13.07.11; author tron; state Exp; branches; next 1.14; 1.14 date 2006.04.06.06.22.33; author reed; state Exp; branches; next 1.13; 1.13 date 2006.03.30.18.06.18; author jlam; state Exp; branches; next 1.12; 1.12 date 2006.02.27.14.20.47; author drochner; state Exp; branches; next 1.11; 1.11 date 2006.02.27.11.54.26; author drochner; state Exp; branches; next 1.10; 1.10 date 2005.06.01.18.03.07; author jlam; state Exp; branches; next 1.9; 1.9 date 2005.01.11.21.19.24; author xtraeme; state Exp; branches; next 1.8; 1.8 date 2005.01.11.20.35.48; author xtraeme; state Exp; branches; next 1.7; 1.7 date 2005.01.11.20.11.14; author xtraeme; state Exp; branches; next 1.6; 1.6 date 2005.01.11.20.06.12; author xtraeme; state Exp; branches; next 1.5; 1.5 date 2005.01.11.19.55.29; author xtraeme; state Exp; branches; next 1.4; 1.4 date 2005.01.11.19.34.34; author xtraeme; state Exp; branches; next 1.3; 1.3 date 2005.01.11.19.32.17; author xtraeme; state Exp; branches; next 1.2; 1.2 date 2004.03.29.05.43.32; author jlam; state Exp; branches; next 1.1; 1.1 date 2004.03.10.17.57.14; author jlam; state Exp; branches; next ; desc @@ 1.20 log @libpcap: updated to 1.10.3 Thursday, January 12, 2023 / The Tcpdump Group Summary for 1.10.3 libpcap release Source code: Sort the PUBHDR variable in Makefile.in in "ls" order. Fix typo in comment in pflog.h. Remove two no-longer-present files from .gitignore. Update code and comments for handling failure to set promiscuous mode based on new information. Building and testing: install: Fixed not to install the non-public pcap-util.h header. pcap-config: add a --version flag. Makefile.in: Add some missing files in the distclean target. Saturday, December 31, 2022 / The Tcpdump Group Summary for 1.10.2 libpcap release Source code: Use __builtin_unreachable() in PCAP_UNREACHABLE. Use AS_HELP_STRING macro instead of AC_HELP_STRING in the configure scripts, to avoid deprecation warnings. Change availability tags in pcap.h to make it easier to arrange for it to be used in Darwin releases. Use AS_HELP_STRING for --enable-remote. Fix some formatting string issues found by cppcheck. Various small code and comment cleanups. Use PCAP_ERROR (defined as -1) rather than explicit -1 for functions the documentation says return PCAP_ERROR. Remove unused code from the filter compiler. Use _declspec(deprecated(msg)) rather than __pragma(deprecated) for Windows deprecation warnings, so the message that was specified shows up. diag-control.h: define PCAP_DO_PRAGMA() iff we're going to use it. Use "%d" to print some signed ints. Use the Wayback Machine for a removed document in a comment. Add some const qualifiers. RDMA: Use PRIu64 to print a uint64_t. "Dead" pcap_ts from pcap_open_dead() and ..._with_tstamp_precision(): Don't crash if pcap_breakloop() is called. Savefiles: Fix pcap_dispatch() to return number of packets processed, rather than 0, even at EOF. If we get an error writing the packet header, don't write the packet data. Put PFLOG UID and PID values in the header into host byte order when reading a LINKTYPE_PFLOG file. Put CAN ID field in CAN pseudo-headers for LINUX_SLL2, as we do for LINUX_SLL. Fix inorrectly-computed "real" length for isochronous USB transfers when reading savefiles. Don't crash if pcap_can_set_rfmon() is called. Fix pcap_offline_read() loop. Capture: Never process more than INT_MAX packets in a pcap_dispatch() call, to avoid integer overflow. Improve error messages for "no such device" and "permission denied" errors. SITA: Fix a typo in a variable name. Packet filtering: Get PFLOG header length from the length value in the header. Support all the direction, reason, and action types supported by all systems that support PFLOG. Don't require PFLOG support on the target machine in order to support PFLOG filtering. Expand abbreviations into "proto X" properly. gencode.c: Update a comment about the VLAN TPID test. Add the minimum and maximum matching DLTs to an error message. Linux: Fix memory leak in capture device open. Fix detection of CAN/CAN FD packets in direction check. Fix double-free crashes on errors such as running on a kernel with CONFIG_PACKET_MMAP not configured. Use DLT_CAN_SOCKETCAN for CANbus interfaces. Make sure the CANFD_FDF can be relied on to indicate whether a CANbus packet is a CAN frame or a CAN FD frame Improve error message for "out of memory" errors for kernel filters. Fix pcap_findalldevs() to find usbmon devices. Fix handling of VLAN tagged packets if the link-layer type is changed from DLT_LINUX_SLL to DLT_LINUX_SLL2. Always turn on PACKET_AUXDATA. We require 2.6.27 or later, so PACKET_RESERVE is available. Make sure there's reserved space for a DLT_LINUX_SLL2 header when capturing. Correctly compute the "real" length for isochronous USB transfers. Don't have an eventfd descriptor open in non-blocking mode, so as not to waste descriptors. netfilter: Squelch a narrowing warning (To be look at before 2038). BPF capture (*BSD, macOS, AIX, Solaris 11): Fix case where a device open might fail, rather than falling back to a smaller buffer size, when the initial buffer size is too big. Use an unsigned device number to iterate over BPF devices, to squelch a compiler warning. NetBSD: Fix handling of LINKTYPE_HDLC/DLT_HDLC. rpcap: Fix unaligned accesses in rpcapd. Fix code to process port number. Clean up findalldevs code in rpcapd. Clean up bufferizing code. Fix a file descriptor/handle leak in pcap_findalldevs_ex() (Coverity CID 1507240). Improve error messages for host and port resolution errors. Fix connect code not to fail if both IPv4 and IPv6 addresses are tried. Improve connect failure error message. Provide an error message for a bad authentication reply size. For link-layer types with host-endian fields in the header, fix those fields if capturing from a server with a different byte order. Suppress temporarily the warnings with "enable remote packet capture". Windows: Add support for NdisMediumIP. Don't require applications using pcap to be built with VS 2015 or later. Use the correct string for the DLL VersionInfo. Remove unnecessary DllMain() function. Correctly handle ERROR_INVALID_FUNCTION from PacketGetTimestampModes() (indicate that WinPcap or an older version of Npcap is probably installed). Fix use-after-free in some cases when a pcap_t is closed. Make sure an error is returned by pcap_create_interface() if PacketOpenAdapter() fails. Return an error if the driver reports 0 timestamp modes supported. Close the ADAPTER handle for some errors in pcap_create_interface(). Get rid of old umaintained VS project files. Fix deprecation warning for pcap_handle(). Npcap is now at npcap.com, not npcap.org. Make sure "no such device" and "no permission to open device" errors show up in pcap_activate(), not pcap_create() (fixes, among other things, tcpdump -i ). npcap: squelch deprecation warnings for kernel dump mode. Haiku: Implement pcap_lib_version(), as now required. Handle negative or too-large snaplen values. Fix various build issues and warnings. Building and testing: Update configure-time universal build checks for macOS. Update config.guess and config.sub. If we look for an SSL library with pkg-config in configure script, try pkg-config first. If we have pkg-config and Homebrew, try to set pkg-config up to find Homebrew packages. Handle some Autoconf/make errors better. Use "git archive" for the "make releasetar" process. Remove the release candidate rcX targets. Fix compiling on Solaris 9/SPARC and 11/AMD64. Address assorted compiler warnings. Fix cross-building on Linux for Windows with mingw32 for Win64 Properly set installation directory on Windows when not compiling with MSVC. Fix configure script checks for compiler flags. Give more details if check for usable (F)Lex fails. Fix compiling with GCC 4.6.4. Don't use add_compile_options() with CMake, as we currently don't require 2.8.12, where it first appeared. Don't provide -L/usr/lib for pkg-config --libs in pkg-config. Fix error message for inadequate Bison/Berkeley YACC. configure: correctly do some DPDK checks. Only use pkg-config when checking for DPDK. Allow the path in which DPDK is installed to be specified. Use pkg-config first when checking for libibverbs. CMake: fix check for libibverbs with Sun's C compiler. Have CMake warn if no capture mechanism can be found. Don't do stuff requiring 3.19 or later on earlier CMakes. Squelch some CMake warnings. Fix diag-control.h to handle compiling with clang-cl. Cleanup various leftover cruft in the configure script. Fix building without protochain support. Check for a usable YACC (or Bison) and {F}lex in CMake, as we do in autotools. Only check for a C++ compiler on Haiku, as that's the only platform with C++ code, and make sure they generate code for the same instruction set bit-width (both 32-bit or both 64-bit) On Solaris, check the target bit-width and set PKG_CONFIG_PATH appropriately, to handle the mess that is the D-Bus library package. Fix generation of pcap-config and libpcap.pc files. pcap-config: don't assume the system library directory is /usr/lib. pcap-config: add a --static-pcap-only flag. Cirrus CI: Use the same configuration as for the main branch. Add four libpcap test files. Update Npcap SDK to 1.13. Makefile.in: Use TEST_DIST, like for tcpdump. Remove awk code from mkdep. Cirrus CI: Add the libssl-dev package in the Linux task. Cirrus CI: Add the openssl@@3 brew package in the macOS task. Get "make shellcheck" to pass again. CMake: Build valgrindtest only if Autoconf would. CMake: use ${CMAKE_INSTALL_SBINDIR} rather than just sbin. CMake: use NUL: as the null device on Windows. autoconf: fix typo in test of macOS version. Makefile.in: Add two missing files in EXTRA_DIST. autotools, cmake: provide an rpath option if necessary. configure: get rid of the attempt to auto-run PKG_PROG_PKG_CONFIG. configure: use PKG_CHECK_MODULES to run pkg-config. Documentation: Add README.solaris.md. Add SCTP to pcap-filter(7). Note that = and == are the same operator in filters. Update INSTALL.md, README.md, and README.solaris.md. Update and clean up CONTRIBUTING.md. Trim documentation of support for now-dead UN*Xe and older versions of other UN*Xes. Move the "how to allocate a LINKTYPE_/DLT_ value" documentation to the web site. Clean up man pages. Move README.capture-module to the web site. Improve some protocol details in pcap-filter(7). Refine "relop" notes in pcap-filter(7). In pcap-filter(7) "domain" is an id. Discuss backward compatibility in pcap-filter(7). Other improvements to pcap-filter(7). Document pcap_breakloop(3PCAP) interaction with threads better. Document PCAP_ERROR_NOT_ACTIVATED for more routines. @ text @# $NetBSD: builtin.mk,v 1.19 2019/11/03 11:45:40 rillig Exp $ BUILTIN_PKG:= libpcap .include "../../mk/bsd.fast.prefs.mk" BUILTIN_FIND_HEADERS_VAR:= H_LIBPCAP BUILTIN_FIND_HEADERS.H_LIBPCAP= pcap/pcap.h BUILTIN_FIND_HEADERS.H_LIBPCAP+= pcap.h .include "../../mk/buildlink3/bsd.builtin.mk" ### ### Determine if there is a built-in implementation of the package and ### set IS_BUILTIN. appropriately ("yes" or "no"). ### .if !defined(IS_BUILTIN.libpcap) IS_BUILTIN.libpcap= no . if empty(H_LIBPCAP:M__nonexistent__) && empty(H_LIBPCAP:M${LOCALBASE}/*) IS_BUILTIN.libpcap= yes . endif .endif MAKEVARS+= IS_BUILTIN.libpcap ### ### If there is a built-in implementation, then set BUILTIN_PKG. to ### a package name to represent the built-in package. ### .if !defined(BUILTIN_PKG.libpcap) && \ ${IS_BUILTIN.libpcap:tl} == yes && \ empty(H_LIBPCAP:M__nonexistent__) _BLTN_PCAP_111!= \ ${GREP} -c PCAP_NETMASK_UNKNOWN ${H_LIBPCAP} || ${TRUE} _BLTN_PCAP_100!= \ ${GREP} -c pcap_offline_filter ${H_LIBPCAP} || ${TRUE} # libpcap>=0.9.3: pcap_setdirection added (don't use pcap_inject, this # was hacked into the NetBSD version of 0.8.3) _BLTN_PCAP_093!= \ ${GREP} -c pcap_setdirection ${H_LIBPCAP} || ${TRUE} # libpcap>=0.8.3: MODE_MON added _BLTN_PCAP_083!= \ ${GREP} -c MODE_MON ${H_LIBPCAP} || ${TRUE} # libpcap>=0.8.1: pcap_get_selectable_fd added _BLTN_PCAP_081!= \ ${GREP} -c pcap_get_selectable_fd ${H_LIBPCAP} || ${TRUE} # libpcap>=0.8.0: pcap_datalink_val_to_description added _BLTN_PCAP_080!= \ ${GREP} -c pcap_datalink_val_to_description ${H_LIBPCAP} || ${TRUE} # libpcap>=0.7.0: pcap_setnonblock added _BLTN_PCAP_070!= \ ${GREP} -c pcap_setnonblock ${H_LIBPCAP} || ${TRUE} # libpcap>=0.6.0: prototype change for pcap_freecode _BLTN_PCAP_060!= \ ${GREP} -c pcap_freecode.struct.bpf_program ${H_LIBPCAP} || ${TRUE} # libpcap>=0.5.0: pcap_compile_nopcap added _BLTN_PCAP_050!= \ ${GREP} -c pcap_compile_nopcap ${H_LIBPCAP} || ${TRUE} . if ${_BLTN_PCAP_111} == "1" BUILTIN_VERSION.libpcap= 1.1.1 . elif ${_BLTN_PCAP_100} == "1" BUILTIN_VERSION.libpcap= 1.0.0 . elif ${_BLTN_PCAP_093} == "1" BUILTIN_VERSION.libpcap= 0.9.3nb1 . elif ${_BLTN_PCAP_083} == "1" BUILTIN_VERSION.libpcap= 0.8.3 . elif ${_BLTN_PCAP_081} == "1" BUILTIN_VERSION.libpcap= 0.8.1 . elif ${_BLTN_PCAP_080} == "1" BUILTIN_VERSION.libpcap= 0.8.0 . elif ${_BLTN_PCAP_070} == "1" BUILTIN_VERSION.libpcap= 0.7.0 . elif ${_BLTN_PCAP_060} == "1" BUILTIN_VERSION.libpcap= 0.6.0 . elif ${_BLTN_PCAP_050} == "1" BUILTIN_VERSION.libpcap= 0.5.0 . else BUILTIN_VERSION.libpcap= 0.4.0 . endif BUILTIN_PKG.libpcap= libpcap-${BUILTIN_VERSION.libpcap} .endif MAKEVARS+= BUILTIN_PKG.libpcap ### ### Determine whether we should use the built-in implementation if it ### exists, and set USE_BUILTIN. appropriate ("yes" or "no"). ### .if !defined(USE_BUILTIN.libpcap) . if ${PREFER.libpcap} == "pkgsrc" USE_BUILTIN.libpcap= no . else USE_BUILTIN.libpcap= ${IS_BUILTIN.libpcap} . if defined(BUILTIN_PKG.libpcap) && \ ${IS_BUILTIN.libpcap:tl} == yes USE_BUILTIN.libpcap= yes . for _dep_ in ${BUILDLINK_API_DEPENDS.libpcap} . if ${USE_BUILTIN.libpcap:tl} == yes USE_BUILTIN.libpcap!= \ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libpcap}; then \ ${ECHO} yes; \ else \ ${ECHO} no; \ fi . endif . endfor . endif . endif # PREFER.libpcap .endif MAKEVARS+= USE_BUILTIN.libpcap @ 1.19 log @net: align variable assignments pkglint -Wall -F --only aligned --only indent -r No manual corrections. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.18 2017/07/24 07:23:28 dbj Exp $ d30 1 a30 1 !empty(IS_BUILTIN.libpcap:M[yY][eE][sS]) && \ d94 1 a94 1 !empty(IS_BUILTIN.libpcap:M[yY][eE][sS]) d97 1 a97 1 . if !empty(USE_BUILTIN.libpcap:M[yY][eE][sS]) d99 1 a99 1 if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libpcap:Q}; then \ @ 1.18 log @use BUILTIN_FIND_HEADERS instead of BUILTIN_FIND_FILES fixes the case where header files aren't in /usr/include (Darwin SDKs) @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.17 2011/01/29 21:17:48 markd Exp $ d23 1 a23 1 MAKEVARS+= IS_BUILTIN.libpcap d80 1 a80 1 BUILTIN_PKG.libpcap= libpcap-${BUILTIN_VERSION.libpcap} d82 1 a82 1 MAKEVARS+= BUILTIN_PKG.libpcap d109 1 a109 1 MAKEVARS+= USE_BUILTIN.libpcap @ 1.17 log @teach builtin about versions 1.0.0 and 1.1.1 @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.16 2011/01/07 05:11:36 obache Exp $ d7 3 a9 3 BUILTIN_FIND_FILES_VAR:= H_LIBPCAP BUILTIN_FIND_FILES.H_LIBPCAP= /usr/include/pcap/pcap.h BUILTIN_FIND_FILES.H_LIBPCAP+= /usr/include/pcap.h @ 1.16 log @Fixes builtin libpcap detection for DragonFly, another fix for PR#44333. Public headers had been moved to subdir since 0.9.6, not only recent Darwin. Let to look at pcap/pcap.h first, then pcap.h in all cases. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.15 2009/09/13 13:07:11 tron Exp $ d32 4 d59 5 a63 1 . if ${_BLTN_PCAP_093} == "1" @ 1.15 log @Under Mac OS X Snow Leopard "pcap.h" is a wrapper that only includes "pcap/pcap.h". We must therfore use "pcap/pcap.h" to detect the version of the "pcap" library on this platform. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.14 2006/04/06 06:22:33 reed Exp $ a7 3 .if empty(MACHINE_PLATFORM:MDarwin-??.*-*) BUILTIN_FIND_FILES.H_LIBPCAP= /usr/include/pcap.h .else d9 1 a9 1 .endif @ 1.14 log @Over 1200 files touched but no revisions bumped :) RECOMMENDED is removed. It becomes ABI_DEPENDS. BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo. BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo. BUILDLINK_DEPENDS does not change. IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS which defaults to "yes". Added to obsolete.mk checking for IGNORE_RECOMMENDED. I did not manually go through and fix any aesthetic tab/spacing issues. I have tested the above patch on DragonFly building and packaging subversion and pkglint and their many dependencies. I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I have used IGNORE_RECOMMENDED for a long time). I have been an active user of IGNORE_RECOMMENDED since it was available. As suggested, I removed the documentation sentences suggesting bumping for "security" issues. As discussed on tech-pkg. I will commit to revbump, pkglint, pkg_install, createbuildlink separately. Note that if you use wip, it will fail! I will commit to pkgsrc-wip later (within day). @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.13 2006/03/30 18:06:18 jlam Exp $ d5 2 d8 1 d10 3 @ 1.13 log @Avoid extra stat() calls by not repeatedly checking whether a file exists on the disk -- we can just check whether a variable defined by find-files.mk is "__nonexistent__" or not. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.12 2006/02/27 14:20:47 drochner Exp $ d85 1 a85 1 . for _dep_ in ${BUILDLINK_DEPENDS.libpcap} @ 1.12 log @assume that the OS provided libpcap 0.9.x supplies shared libraries, so make it equivalent to pkgsrc version 0.9.3nb1 (it does so on Debian, and will do on NetBSD; if it doesn't hold on _your_OS_, we'll need conditionals) @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.11 2006/02/27 11:54:26 drochner Exp $ d16 1 a16 1 . if empty(H_LIBPCAP:M${LOCALBASE}/*) && exists(${H_LIBPCAP}) d28 1 a28 1 exists(${H_LIBPCAP}) @ 1.11 log @recognize libpcap>=0.9.3 @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.10 2005/06/01 18:03:07 jlam Exp $ d53 1 a53 1 BUILTIN_VERSION.libpcap= 0.9.3 @ 1.10 log @Massive cleanup of buildlink3.mk and builtin.mk files in pkgsrc. Several changes are involved since they are all interrelated. These changes affect about 1000 files. The first major change is rewriting bsd.builtin.mk as well as all of the builtin.mk files to follow the new example in bsd.builtin.mk. The loop to include all of the builtin.mk files needed by the package is moved from bsd.builtin.mk and into bsd.buildlink3.mk. bsd.builtin.mk is now included by each of the individual builtin.mk files and provides some common logic for all of the builtin.mk files. Currently, this includes the computation for whether the native or pkgsrc version of the package is preferred. This causes USE_BUILTIN.* to be correctly set when one builtin.mk file includes another. The second major change is teach the builtin.mk files to consider files under ${LOCALBASE} to be from pkgsrc-controlled packages. Most of the builtin.mk files test for the presence of built-in software by checking for the existence of certain files, e.g. , and we now assume that if that file is under ${LOCALBASE}, then it must be from pkgsrc. This modification is a nod toward LOCALBASE=/usr. The exceptions to this new check are the X11 distribution packages, which are handled specially as noted below. The third major change is providing builtin.mk and version.mk files for each of the X11 distribution packages in pkgsrc. The builtin.mk file can detect whether the native X11 distribution is the same as the one provided by pkgsrc, and the version.mk file computes the version of the X11 distribution package, whether it's built-in or not. The fourth major change is that the buildlink3.mk files for X11 packages that install parts which are part of X11 distribution packages, e.g. Xpm, Xcursor, etc., now use imake to query the X11 distribution for whether the software is already provided by the X11 distribution. This is more accurate than grepping for a symbol name in the imake config files. Using imake required sprinkling various builtin-imake.mk helper files into pkgsrc directories. These files are used as input to imake since imake can't use stdin for that purpose. The fifth major change is in how packages note that they use X11. Instead of setting USE_X11, package Makefiles should now include x11.buildlink3.mk instead. This causes the X11 package buildlink3 and builtin logic to be executed at the correct place for buildlink3.mk and builtin.mk files that previously set USE_X11, and fixes packages that relied on buildlink3.mk files to implicitly note that X11 is needed. Package buildlink3.mk should also include x11.buildlink3.mk when linking against the package libraries requires also linking against the X11 libraries. Where it was obvious, redundant inclusions of x11.buildlink3.mk have been removed. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.9 2005/01/11 21:19:24 xtraeme Exp $ d29 4 d52 3 a54 1 . if ${_BLTN_PCAP_083} == "1" @ 1.9 log @Use this builtin.mk from pkgsrc-wip, which works for all platforms and detects a lot of more versions, thanks to Peter Postma. @ text @d1 1 a1 1 # $NetBSD$ d3 1 a3 2 _LIBPCAP_PKGSRC_PKGNAME= libpcap-0.8.3 _LIBPCAP_PCAP_H= /usr/include/pcap.h d5 9 d16 1 a16 1 . if exists(${_LIBPCAP_PCAP_H}) d18 3 d22 7 d30 2 a31 2 _PCAP_083!= \ ${GREP} -c MODE_MON ${_LIBPCAP_PCAP_H} || ${TRUE} d33 2 a34 2 _PCAP_081!= \ ${GREP} -c pcap_get_selectable_fd ${_LIBPCAP_PCAP_H} || ${TRUE} d36 2 a37 3 _PCAP_080!= \ ${GREP} -c pcap_datalink_val_to_description \ ${_LIBPCAP_PCAP_H} || ${TRUE} d39 2 a40 2 _PCAP_070!= \ ${GREP} -c pcap_setnonblock ${_LIBPCAP_PCAP_H} || ${TRUE} d42 2 a43 3 _PCAP_060!= \ ${GREP} -c pcap_freecode.struct.bpf_program \ ${_LIBPCAP_PCAP_H} || ${TRUE} d45 2 a46 2 _PCAP_050!= \ ${GREP} -c pcap_compile_nopcap ${_LIBPCAP_PCAP_H} || ${TRUE} d48 16 a63 14 .if ${_PCAP_083} == "1" BUILTIN_PKG.libpcap= libpcap-0.8.3 .elif ${_PCAP_081} == "1" BUILTIN_PKG.libpcap= libpcap-0.8.1 .elif ${_PCAP_080} == "1" BUILTIN_PKG.libpcap= libpcap-0.8.0 .elif ${_PCAP_070} == "1" BUILTIN_PKG.libpcap= libpcap-0.7.0 .elif ${_PCAP_060} == "1" BUILTIN_PKG.libpcap= libpcap-0.6.0 .elif ${_PCAP_050} == "1" BUILTIN_PKG.libpcap= libpcap-0.5.0 .else BUILTIN_PKG.libpcap= libpcap-0.4.0 d65 1 d67 4 a70 2 .endif # exists({_LIBPCAP_PCAP_H}) d72 6 a77 3 USE_BUILTIN.libpcap?= ${IS_BUILTIN.libpcap} . if defined(BUILTIN_PKG.libpcap) d79 5 a83 5 . for _depend_ in ${BUILDLINK_DEPENDS.libpcap} . if !empty(USE_BUILTIN.libpcap:M[yY][eE][sS]) USE_BUILTIN.libpcap!= \ if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.libpcap}; then \ ${ECHO} "yes"; \ d85 1 a85 1 ${ECHO} "no"; \ d87 6 a92 5 . endif . endfor . endif .endif # USE_BUILTIN.libpcap .endif # IS_BUILTIN.libpcap @ 1.8 log @typo, thanks peter. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.7 2005/01/11 20:11:14 xtraeme Exp $ d3 2 a4 1 _LIBPCAP_H= /usr/include/pcap.h d8 38 a45 34 . if exists(${_LIBPCAP_H}) IS_BUILTIN.libpcap!= \ if ${GREP} -q PCAP_VERSION_MAJOR ${_LIBPCAP_H}; then \ ${ECHO} "yes"; \ else \ ${ECHO} "no"; \ fi . if !empty(IS_BUILTIN.libpcap:M[yY][eE][sS]) # # Create an appropriate name for the built-in package distributed # with the system. This package name can be used to check against # BUILDLINK_DEPENDS. to see if we need to install the pkgsrc # version or if the built-in one is sufficient. # . if !defined(_LIBPCAP_VERSION) _LIBPCAP_VERSIONS= 0.8.3 0.7.2 _LIBPCAP_0.8.3= NetBSD-2.99.9* NetBSD-2.99.1[0-9]* NetBSD-[3-9]* \ FreeBSD-5.[3-9]* FreeBSD-6* _LIBPCAP_0.7.2= NetBSD-1.[56]* NetBSD-2.0* NetBSD-2.99.[1-8] \ FreeBSD-4* FreeBSD-5.[12]* . for _libpcap_version_ in ${_LIBPCAP_VERSIONS} . for _pattern_ in ${_LIBPCAP_${_libpcap_version_}} . if !empty(MACHINE_PLATFORM:M${_pattern_}) _LIBPCAP_VERSION?= ${_libpcap_version_} . endif . endfor . endfor _LIBPCAP_VERSION?= 0.7.2 . endif BUILTIN_PKG.libpcap= libpcap-${_LIBPCAP_VERSION} MAKEFLAGS+= BUILTIN_PKG.libpcap=${BUILTIN_PKG.libpcap} . endif . endif MAKEFLAGS+= IS_BUILTIN.libpcap=${IS_BUILTIN.libpcap} d48 2 d67 1 a67 9 CHECK_BUILTIN.libpcap?= no .if !empty(CHECK_BUILTIN.libpcap:M[nN][oO]) .if !empty(USE_BUILTIN.libpcap:M[nN][oO]) BUILDLINK_DEPENDS.libpcap+= libpcap>=0.8.3 .endif .endif # CHECK_BUILTIN.libpcap @ 1.7 log @Always matching 0.8.3 if FreeBSD >= 5.3 @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.6 2005/01/11 20:06:12 xtraeme Exp $ d21 1 a21 1 . if !defined(_LIPCAP_VERSION) @ 1.6 log @FreeBSD >= 5.3 uses libpcap-0.8.3, older versions are using 0.7.x. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.5 2005/01/11 19:55:29 xtraeme Exp $ d24 1 a24 1 FreeBSD-5.3* FreeBSD-6* @ 1.5 log @libpcap was updated to 0.8.3 in NetBSD-2.99.9 (more or less), so match NetBSD<=2.99.8 as 0.7.2, also match future NetBSD versions as 0.8.3. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.4 2005/01/11 19:34:34 xtraeme Exp $ d23 4 a26 2 _LIBPCAP_0.8.3= NetBSD-2.99.9* NetBSD-2.99.1[0-9]* NetBSD-[3-9]* _LIBPCAP_0.7.2= NetBSD-1.[56]* NetBSD-2.0* NetBSD-2.99.[1-8] @ 1.4 log @this should be 0.7.2 not 0.7 @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.3 2005/01/11 19:32:17 xtraeme Exp $ d23 2 a24 2 _LIBPCAP_0.8.3= NetBSD-2.99.9* NetBSD-2.99.1[0-9]* _LIBPCAP_0.7.2= NetBSD-1.[56]* NetBSD-2.0* @ 1.3 log @Better checking of libpcap versions, based in heimdal/builtin.mk. for now we are assumming that: _LIBPCAP_VERSIONS= 0.8.3 0.7.2 _LIBPCAP_0.8.3= NetBSD-2.99.9* NetBSD-2.99.1[0-9]* _LIBPCAP_0.7= NetBSD-1.[56]* NetBSD-2.0* Users of other platforms should update this list eventually. @ text @d1 1 a1 1 # $NetBSD$ d24 1 a24 1 _LIBPCAP_0.7= NetBSD-1.[56]* NetBSD-2.0* @ 1.2 log @Match the template builtin.mk file in bsd.builtin.mk, and make the two packages that use builtin.mk files (graphics/xpm and pkgtools/x11-links) use the new format correctly. @ text @d1 3 a3 1 # $NetBSD: builtin.mk,v 1.1 2004/03/10 17:57:14 jlam Exp $ d7 30 a36 2 . if exists(/usr/include/pcap.h) IS_BUILTIN.libpcap= yes d38 2 a39 1 .endif # IS_BUILTIN.libpcap d41 1 d43 24 @ 1.1 log @Split out the code that deals with checking whether the software is built-in or not into a separate builtin.mk file. The code to deal checking for built-in software is much simpler to deal with in pkgsrc. The buildlink3.mk file for a package will be of the usual format regardless of the package, which makes it simpler for packagers to update a package. The builtin.mk file for a package must define a single yes/no variable USE_BUILTIN. that is used by bsd.buildlink3.mk to decide whether to use the built-in software or to use the pkgsrc software. @ text @d1 1 a1 1 # $NetBSD$ d8 1 a8 6 .endif CHECK_BUILTIN.libpcap?= no .if !empty(CHECK_BUILTIN.libpcap:M[yY][eE][sS]) USE_BUILTIN.libpcap= yes .endif @