libpcap: build with cmake
authorYousong Zhou <yszhou4tech@gmail.com>
Fri, 18 Oct 2019 12:10:06 +0000 (12:10 +0000)
committerYousong Zhou <yszhou4tech@gmail.com>
Mon, 21 Oct 2019 01:37:43 +0000 (01:37 +0000)
commite8f79474c97949454b8d0ea966be006013471336
tree455ecd9ef7ca2df6c719e20bfcaa5633a8419a70
parent758a4d1766b3668422881480db8c3c6f94ebc2ea
libpcap: build with cmake

The main motivation is to drop and stop maintaining
"100-debian_shared_lib.patch".  It lacks the logic to include custom
implementation of several functions like pcap_strlcpy() which can cause
build failures when glibc is used [2]

CAN and CAN-USB support related symbols are now handled by general linux
support, see [1]

"-ffunction-sections -fdata-sections" were removed as they should help
much for shared libraries

Size comparison before and after the change

  -rw-r--r-- 1 yunion yunion 238042 Oct 18 11:42 ipkg-x86_64/libpcap/usr/lib/libpcap.so.1

  lrwxrwxrwx 1 yunion yunion     16 Oct 18 13:03 ipkg-x86_64/libpcap/usr/lib/libpcap.so.1 -> libpcap.so.1.9.1
  -rwxr-xr-x 1 yunion yunion 229867 Oct 18 13:03 ipkg-x86_64/libpcap/usr/lib/libpcap.so.1.9.1

[1] On Linux, handle all CAN captures with pcap-linux.c, in cooked mode,
    https://github.com/the-tcpdump-group/libpcap/commit/93ca5ff7030aaf1219e1de05ec89a68384bfc50b
[2] https://github.com/openwrt/packages/issues/10270

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
package/libs/libpcap/Makefile
package/libs/libpcap/patches/100-debian_shared_lib.patch [deleted file]
package/libs/libpcap/patches/102-makefile_disable_manpages.patch [deleted file]
package/libs/libpcap/patches/102-skip-manpages.patch [new file with mode: 0644]