tcp_wrappers: don't set LIBS=-lnsl when building with musl
authorDaniel Golle <redacted>
Sat, 25 Apr 2015 21:19:30 +0000 (23:19 +0200)
committerDaniel Golle <redacted>
Sun, 3 May 2015 13:12:33 +0000 (15:12 +0200)
Signed-off-by: Daniel Golle <redacted>
libs/tcp_wrappers/Makefile
libs/tcp_wrappers/patches/005-no--lnsl-on-musl.patch [new file with mode: 0644]

index 1ea637f29591f2582e33bbd739f6c2d2ce6e3d37..d453031ec126fd111ecd7d01bbecee03fec0c402 100644 (file)
@@ -32,11 +32,15 @@ endef
 
 TARGET_CFLAGS += $(FPIC)
 
+ifeq ($(CONFIG_USE_MUSL),)
+TARGET_EXTRA_LIBS:=LIBS=-lnsl
+endif
+
 define Build/Compile   
        $(MAKE) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                OPT_CFLAGS="$(TARGET_CFLAGS)" \
-               LIBS=-lnsl \
+               $(TARGET_EXTRA_LIBS) \
                NETGROUP= \
                VSYSLOG= \
                BUGS= \
diff --git a/libs/tcp_wrappers/patches/005-no--lnsl-on-musl.patch b/libs/tcp_wrappers/patches/005-no--lnsl-on-musl.patch
new file mode 100644 (file)
index 0000000..5e7b968
--- /dev/null
@@ -0,0 +1,22 @@
+Index: tcp_wrappers_7.6/Makefile
+===================================================================
+--- tcp_wrappers_7.6.orig/Makefile
++++ tcp_wrappers_7.6/Makefile
+@@ -1,4 +1,4 @@
+-GLIBC=$(shell grep -s -c __GLIBC__ /usr/include/features.h)
++GLIBC=$(shell grep -s -c __GLIBC__ ${STAGING_DIR}/usr/include/features.h)
+ # @(#) Makefile 1.23 97/03/21 19:27:20
+@@ -146,9 +146,11 @@ freebsd:
+       LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
+       EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
++ifneq ($(GLIBC),)
+ ifneq ($(GLIBC),0)
+ MYLIB=-lnsl
+ endif
++endif
+ linux:
+       @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
git clone https://git.99rst.org/PROJECT