--- a/components/libnet/Makefile Wed Mar 30 10:16:56 2016 -0700
+++ b/components/libnet/Makefile Wed Mar 30 13:33:31 2016 -0700
@@ -20,18 +20,16 @@
#
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
#
-
-COMPILER = gcc
-
+# Prefer 32-bit as only "binary" delivered is a script with embedded paths.
+BUILD_BITS= 32_and_64
+COMPILER= gcc
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= libnet
COMPONENT_VERSION= 1.1.5
-COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_PROJECT_URL= http://sourceforge.net/projects/libnet-dev/
-COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= \
sha256:75588f8d1232e1df34eccf2dba5e66be197b345a07fae80d8275db994496a20d
COMPONENT_ARCHIVE_URL= http://cdnetworks-us-2.dl.sourceforge.net/project/libnet-dev/$(COMPONENT_ARCHIVE)
@@ -39,35 +37,20 @@
TPNO= 17724
-include $(WS_MAKE_RULES)/prep.mk
-include $(WS_MAKE_RULES)/configure.mk
-include $(WS_MAKE_RULES)/ips.mk
+TEST_TARGET= $(NO_TESTS)
+include $(WS_MAKE_RULES)/common.mk
+
+# Overwrite ancient autoconf scripts to fix 64-bit host detection.
+COMPONENT_PREP_ACTION = (cd $(@D) ; autoreconf -fi)
COMPONENT_PRE_CONFIGURE_ACTION = \
($(CLONEY) $(SOURCE_DIR) $(@D))
PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man/man3
CFLAGS += -g -fPIC
-CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
-CONFIGURE_OPTIONS.32 += --srcdir=$(BUILD_DIR_32)
-CONFIGURE_OPTIONS.64 += --srcdir=$(BUILD_DIR_64)
-
-ASLR_MODE = $(ASLR_NOT_APPLICABLE)
-
-# common targets
-configure: $(CONFIGURE_32_and_64)
-
-build: $(BUILD_32_and_64)
-
-install: $(INSTALL_32_and_64)
-
-test: $(NO_TESTS)
-
-system-test: $(NO_TESTS)
-
+CONFIGURE_OPTIONS += --srcdir=$(BUILD_DIR_$(BITS))
REQUIRED_PACKAGES += shell/ksh93
-REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/gcc-3-runtime
REQUIRED_PACKAGES += system/library/gcc-45-runtime
REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime