aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libpcap/patches/102-skip-manpages.patch
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2019-10-18 12:10:06 +0000
committerYousong Zhou <yszhou4tech@gmail.com>2019-10-21 01:37:43 +0000
commite8f79474c97949454b8d0ea966be006013471336 (patch)
tree455ecd9ef7ca2df6c719e20bfcaa5633a8419a70 /package/libs/libpcap/patches/102-skip-manpages.patch
parent758a4d1766b3668422881480db8c3c6f94ebc2ea (diff)
downloadupstream-e8f79474c97949454b8d0ea966be006013471336.tar.gz
upstream-e8f79474c97949454b8d0ea966be006013471336.tar.bz2
upstream-e8f79474c97949454b8d0ea966be006013471336.zip
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>
Diffstat (limited to 'package/libs/libpcap/patches/102-skip-manpages.patch')
-rw-r--r--package/libs/libpcap/patches/102-skip-manpages.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/package/libs/libpcap/patches/102-skip-manpages.patch b/package/libs/libpcap/patches/102-skip-manpages.patch
new file mode 100644
index 0000000000..28f572c913
--- /dev/null
+++ b/package/libs/libpcap/patches/102-skip-manpages.patch
@@ -0,0 +1,75 @@
+From f172e36e436d714f4def1439b13efd147a6a8411 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Fri, 18 Oct 2019 12:43:22 +0000
+Subject: [PATCH] skip manpages
+
+---
+ CMakeLists.txt | 55 --------------------------------------------------
+ 1 file changed, 55 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 55b93f14..acf1a904 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2397,61 +2397,6 @@ if(NOT MSVC)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc @ONLY)
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib/pkgconfig)
+-
+- #
+- # Man pages.
+- #
+- # For each section of the manual for which we have man pages
+- # that require macro expansion, do the expansion.
+- #
+- set(MAN1 "")
+- foreach(MANPAGE ${MAN1_NOEXPAND})
+- set(MAN1 ${MAN1} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE})
+- endforeach(MANPAGE)
+- install(FILES ${MAN1} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+-
+- set(MAN3PCAP "")
+- foreach(MANPAGE ${MAN3PCAP_NOEXPAND})
+- set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE})
+- endforeach(MANPAGE)
+- foreach(TEMPLATE_MANPAGE ${MAN3PCAP_EXPAND})
+- string(REPLACE ".in" "" MANPAGE ${TEMPLATE_MANPAGE})
+- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)
+- set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})
+- endforeach(TEMPLATE_MANPAGE)
+- install(FILES ${MAN3PCAP} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_datalink_val_to_name.3pcap pcap_datalink_val_to_description.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_dump_open.3pcap pcap_dump_fopen.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_findalldevs.3pcap pcap_freealldevs.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_geterr.3pcap pcap_perror.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_inject.3pcap pcap_sendpacket.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_loop.3pcap pcap_dispatch.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_major_version.3pcap pcap_minor_version.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_next_ex.3pcap pcap_next.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_open_dead.3pcap pcap_open_dead_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_open_offline.3pcap pcap_fopen_offline.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+- install_manpage_symlink(pcap_setnonblock.3pcap pcap_getnonblock.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
+-
+- set(MANFILE "")
+- foreach(TEMPLATE_MANPAGE ${MANFILE_EXPAND})
+- string(REPLACE ".manfile.in" ".${MAN_FILE_FORMATS}" MANPAGE ${TEMPLATE_MANPAGE})
+- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)
+- set(MANFILE ${MANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})
+- endforeach(TEMPLATE_MANPAGE)
+- install(FILES ${MANFILE} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MAN_FILE_FORMATS})
+-
+- set(MANMISC "")
+- foreach(TEMPLATE_MANPAGE ${MANMISC_EXPAND})
+- string(REPLACE ".manmisc.in" ".${MAN_MISC_INFO}" MANPAGE ${TEMPLATE_MANPAGE})
+- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)
+- set(MANMISC ${MANMISC} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})
+- endforeach(TEMPLATE_MANPAGE)
+- install(FILES ${MANMISC} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MAN_MISC_INFO})
+ endif(NOT MSVC)
+
+ # uninstall target