From b4c353e1d0ae8d1acab89d322759098a1fb6f176 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 18 Jun 2012 15:06:07 +0000 Subject: [PATCH] newt: fix compile errors caused by using the wrong ar util SVN-Revision: 32424 --- libs/newt/Makefile | 2 ++ .../100-compile-fix-broken-makefile.patch | 16 ++++++++++++---- .../patches/110-disable-snackmodule-python.patch | 6 +++--- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/libs/newt/Makefile b/libs/newt/Makefile index 858c6e2294..79dad887c1 100644 --- a/libs/newt/Makefile +++ b/libs/newt/Makefile @@ -51,6 +51,8 @@ CONFIGURE_ARGS += \ --without-tcl \ --without-gpm-support +MAKE_FLAGS += AR="$(TARGET_CROSS)ar" + define Package/libnewt/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_BUILD_DIR)/libnewt.so* $(1)/usr/lib/ diff --git a/libs/newt/patches/100-compile-fix-broken-makefile.patch b/libs/newt/patches/100-compile-fix-broken-makefile.patch index 5fc45b8fb8..cbada6067c 100644 --- a/libs/newt/patches/100-compile-fix-broken-makefile.patch +++ b/libs/newt/patches/100-compile-fix-broken-makefile.patch @@ -1,15 +1,16 @@ --- a/Makefile.in +++ b/Makefile.in -@@ -4,7 +4,7 @@ LIBTCL = -ltcl8.4 +@@ -4,7 +4,8 @@ LIBTCL = -ltcl8.4 CC = @CC@ CPP = @CPP@ CFLAGS = @CFLAGS@ -CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@ ++AR ?= ar +CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ SHLIBFLAGS= -Wl,--version-script,newt.0.52.ver VERSION = @VERSION@ -@@ -53,19 +53,19 @@ endif +@@ -53,19 +54,19 @@ endif all: $(TARGET) _snackmodule.so test: test.o $(LIBNEWT) @@ -34,7 +35,7 @@ _snackmodule.so: snackmodule.c $(LIBNEWTSH) for ver in $(PYTHONVERS) ; do \ -@@ -76,7 +76,7 @@ _snackmodule.so: snackmodule.c $(LIBNE +@@ -76,13 +77,13 @@ _snackmodule.so: snackmodule.c $(LIBNE touch $@ whiptail: $(NDIALOGOBJS) $(LIBNEWTSH) @@ -43,7 +44,14 @@ whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH) $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBTCL) -lpopt -@@ -102,12 +102,12 @@ $(SHAREDDIR): + + $(LIBNEWT): $(LIBOBJS) +- ar rv $@ $^ ++ $(AR) rv $@ $^ + + newt.o $(SHAREDDIR)/newt.o: newt.c Makefile + +@@ -102,12 +103,12 @@ $(SHAREDDIR): sharedlib: $(LIBNEWTSH) $(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS) diff --git a/libs/newt/patches/110-disable-snackmodule-python.patch b/libs/newt/patches/110-disable-snackmodule-python.patch index d0435550a8..79e7e11ca8 100644 --- a/libs/newt/patches/110-disable-snackmodule-python.patch +++ b/libs/newt/patches/110-disable-snackmodule-python.patch @@ -1,6 +1,6 @@ --- a/Makefile.in +++ b/Makefile.in -@@ -50,7 +50,7 @@ else +@@ -51,7 +51,7 @@ else TARGET=depend $(PROGS) endif @@ -9,7 +9,7 @@ test: test.o $(LIBNEWT) $(CC) $(CFLAGS) -g -o test test.o $(LIBNEWT) $(LIBS) -@@ -67,14 +67,6 @@ showchars: showchars.o $(LIBNEWT) +@@ -68,14 +68,6 @@ showchars: showchars.o $(LIBNEWT) showkey: showkey.o $(LIBNEWT) $(CC) $(CFLAGS) -g -o showkey showkey.o $(LIBNEWT) $(LIBS) @@ -24,7 +24,7 @@ whiptail: $(NDIALOGOBJS) $(LIBNEWTSH) $(CC) $(CFLAGS) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt -@@ -121,17 +113,12 @@ install: $(LIBNEWT) install-sh whiptail +@@ -122,17 +114,12 @@ install: $(LIBNEWT) install-sh whiptail make -C po datadir=$(instroot)/$(datadir) install install -m 644 -D libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc -- 2.30.2