diff options
author | Jeroen Roovers <jer@gentoo.org> | 2018-12-18 16:02:58 +0100 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2018-12-18 16:03:15 +0100 |
commit | 4b8a9dc1aee5aee1e94a70c3ca35d45d3fd9a039 (patch) | |
tree | 35f7c9972c033013b7514e8758f22ff17e9678f4 /net-libs/daq | |
parent | net-libs/daq: Fix parallel make again (diff) | |
download | gentoo-4b8a9dc1aee5aee1e94a70c3ca35d45d3fd9a039.tar.gz gentoo-4b8a9dc1aee5aee1e94a70c3ca35d45d3fd9a039.tar.bz2 gentoo-4b8a9dc1aee5aee1e94a70c3ca35d45d3fd9a039.zip |
net-libs/daq: Fix USE=static-libs
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-libs/daq')
-rw-r--r-- | net-libs/daq/daq-2.0.6-r1.ebuild (renamed from net-libs/daq/daq-2.0.6.ebuild) | 10 | ||||
-rw-r--r-- | net-libs/daq/files/daq-2.0.6-static-libs.patch | 151 |
2 files changed, 157 insertions, 4 deletions
diff --git a/net-libs/daq/daq-2.0.6.ebuild b/net-libs/daq/daq-2.0.6-r1.ebuild index 5b5742cc309b..ff91d75a4a1d 100644 --- a/net-libs/daq/daq-2.0.6.ebuild +++ b/net-libs/daq/daq-2.0.6-r1.ebuild @@ -29,6 +29,7 @@ DEPEND=" RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}"/${PN}-2.0.6-parallel-grammar.patch #673390 + "${FILESDIR}"/${PN}-2.0.6-static-libs.patch ) src_prepare() { @@ -42,15 +43,16 @@ src_configure() { # cross-compiling doesn't break on us. daq_cv_libpcap_version_1x=yes \ econf \ - $(use_enable ipv6) \ - $(use_enable pcap pcap-module) \ $(use_enable afpacket afpacket-module) \ $(use_enable dump dump-module) \ - $(use_enable nfq nfq-module) \ $(use_enable ipq ipq-module) \ + $(use_enable ipv6) \ + $(use_enable nfq nfq-module) \ + $(use_enable pcap pcap-module) \ $(use_enable static-libs static) \ + --disable-bundled-modules \ --disable-ipfw-module \ - --disable-bundled-modules + --enable-shared } DOCS=( ChangeLog README ) diff --git a/net-libs/daq/files/daq-2.0.6-static-libs.patch b/net-libs/daq/files/daq-2.0.6-static-libs.patch new file mode 100644 index 000000000000..fb91c2c39e44 --- /dev/null +++ b/net-libs/daq/files/daq-2.0.6-static-libs.patch @@ -0,0 +1,151 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -268,7 +268,8 @@ + + AC_CHECK_LIB([dl], [dlopen], [LIBDL="-ldl"]) + +-AM_CONDITIONAL([BUILD_SHARED_MODULES], [ test "$enable_shared" = yes ]) ++AM_CONDITIONAL([BUILD_STATIC_LIBRARIES], [ test "$enable_shared" = no ]) ++AM_CONDITIONAL([BUILD_STATIC_MODULES], [ test "$enable_shared" = no ]) + + # Checks for header files. + AC_CHECK_HEADERS([inttypes.h memory.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h]) +--- a/api/Makefile.am ++++ b/api/Makefile.am +@@ -4,12 +4,15 @@ + + include_HEADERS = daq.h daq_api.h daq_common.h + +-lib_LTLIBRARIES = libdaq.la libdaq_static.la ++lib_LTLIBRARIES = libdaq.la ++ ++if BUILD_STATIC_LIBRARIES ++ lib_LTLIBRARIES += libdaq_static.la ++ libdaq_static_la_SOURCES = daq_base.c daq_mod_ops.c daq.h daq_api.h daq_common.h ++ libdaq_static_la_CFLAGS = -DSTATIC_MODULE_LIST ++ libdaq_static_la_LDFLAGS = -static ++endif + + libdaq_la_SOURCES = daq_base.c daq_mod_ops.c daq.h daq_api.h daq_common.h + libdaq_la_LDFLAGS = -version-info 2:4:0 @XCCFLAGS@ + libdaq_la_LIBADD = @LIBDL@ +- +-libdaq_static_la_SOURCES = daq_base.c daq_mod_ops.c daq.h daq_api.h daq_common.h +-libdaq_static_la_CFLAGS = -DSTATIC_MODULE_LIST +-libdaq_static_la_LDFLAGS = -static +--- a/os-daq-modules/Makefile.am ++++ b/os-daq-modules/Makefile.am +@@ -6,7 +6,9 @@ + + pkglib_LTLIBRARIES = + +-lib_LTLIBRARIES = libdaq_static_modules.la ++if BUILD_STATIC_MODULES ++ pkglib_LTLIBRARIES += libdaq_static_modules.la ++endif + libdaq_static_modules_la_SOURCES = \ + daq_static_modules.c \ + daq_static_modules.h +@@ -15,88 +17,88 @@ + libdaq_static_modules_la_LIBADD = + + if BUILD_AFPACKET_MODULE +-if BUILD_SHARED_MODULES + pkglib_LTLIBRARIES += daq_afpacket.la + daq_afpacket_la_SOURCES = daq_afpacket.c + daq_afpacket_la_CFLAGS = -DBUILDING_SO + daq_afpacket_la_LDFLAGS = -module -export-dynamic -avoid-version -shared @XCCFLAGS@ + daq_afpacket_la_LIBADD = $(top_builddir)/sfbpf/libsfbpf.la +-endif ++if BUILD_STATIC_MODULES + libdaq_static_modules_la_SOURCES += daq_afpacket.c + libdaq_static_modules_la_CFLAGS += -DBUILD_AFPACKET_MODULE + endif ++endif + + if BUILD_PCAP_MODULE +-if BUILD_SHARED_MODULES + pkglib_LTLIBRARIES += daq_pcap.la + daq_pcap_la_SOURCES = daq_pcap.c + daq_pcap_la_CFLAGS = -DBUILDING_SO + daq_pcap_la_LDFLAGS = -module -export-dynamic -avoid-version -shared @XCCFLAGS@ + daq_pcap_la_LIBADD = -lpcap +-endif ++if BUILD_STATIC_MODULES + libdaq_static_modules_la_SOURCES += daq_pcap.c + libdaq_static_modules_la_CFLAGS += -DBUILD_PCAP_MODULE + endif ++endif + + if BUILD_DUMP_MODULE +-if BUILD_SHARED_MODULES + pkglib_LTLIBRARIES += daq_dump.la + daq_dump_la_SOURCES = daq_dump.c + daq_dump_la_CFLAGS = -DBUILDING_SO + daq_dump_la_LDFLAGS = -module -export-dynamic -avoid-version -shared @XCCFLAGS@ + daq_dump_la_LIBADD = -lpcap +-endif ++if BUILD_STATIC_MODULES + libdaq_static_modules_la_SOURCES += daq_dump.c + libdaq_static_modules_la_CFLAGS += -DBUILD_DUMP_MODULE + endif ++endif + + if BUILD_IPFW_MODULE +-if BUILD_SHARED_MODULES + pkglib_LTLIBRARIES += daq_ipfw.la + daq_ipfw_la_SOURCES = daq_ipfw.c + daq_ipfw_la_CFLAGS = -DBUILDING_SO + daq_ipfw_la_LDFLAGS = -module -export-dynamic -avoid-version -shared @XCCFLAGS@ + daq_ipfw_la_LIBADD = $(top_builddir)/sfbpf/libsfbpf.la +-endif ++if BUILD_STATIC_MODULES + libdaq_static_modules_la_SOURCES += daq_ipfw.c + libdaq_static_modules_la_CFLAGS += -DBUILD_IPFW_MODULE + endif ++endif + + if BUILD_IPQ_MODULE +-if BUILD_SHARED_MODULES + pkglib_LTLIBRARIES += daq_ipq.la + daq_ipq_la_SOURCES = daq_ipq.c + daq_ipq_la_CFLAGS = -DBUILDING_SO + daq_ipq_la_LDFLAGS = -module -export-dynamic -avoid-version -shared @DNET_LDFLAGS@ @XCCFLAGS@ + daq_ipq_la_LIBADD = -lipq @DNET_LDFLAGS@ $(top_builddir)/sfbpf/libsfbpf.la +-endif ++if BUILD_STATIC_MODULES + libdaq_static_modules_la_SOURCES += daq_ipq.c + libdaq_static_modules_la_CFLAGS += -DBUILD_IPQ_MODULE + endif ++endif + + if BUILD_NFQ_MODULE +-if BUILD_SHARED_MODULES + pkglib_LTLIBRARIES += daq_nfq.la + daq_nfq_la_SOURCES = daq_nfq.c + daq_nfq_la_CFLAGS = -DBUILDING_SO + daq_nfq_la_LDFLAGS = -module -export-dynamic -avoid-version -shared @DNET_LDFLAGS@ @XCCFLAGS@ + daq_nfq_la_LIBADD = -lnfnetlink -lnetfilter_queue @DNET_LDFLAGS@ $(top_builddir)/sfbpf/libsfbpf.la +-endif ++if BUILD_STATIC_MODULES + libdaq_static_modules_la_SOURCES += daq_nfq.c + libdaq_static_modules_la_CFLAGS += -DBUILD_NFQ_MODULE + endif ++endif + + if BUILD_NETMAP_MODULE +-if BUILD_SHARED_MODULES + pkglib_LTLIBRARIES += daq_netmap.la + daq_netmap_la_SOURCES = daq_netmap.c + daq_netmap_la_CFLAGS = -DBUILDING_SO + daq_netmap_la_LDFLAGS = -module -export-dynamic -avoid-version -shared @XCCFLAGS@ + daq_netmap_la_LIBADD = $(top_builddir)/sfbpf/libsfbpf.la +-endif ++if BUILD_STATIC_MODULES + libdaq_static_modules_la_SOURCES += daq_netmap.c + libdaq_static_modules_la_CFLAGS += -DBUILD_NETMAP_MODULE + endif ++endif + + AM_CPPFLAGS = -I$(top_srcdir)/api -I$(top_srcdir)/sfbpf -I$(top_builddir)/sfbpf + |