newt: fix compile errors caused by using the wrong ar util
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 18 Jun 2012 15:06:07 +0000 (15:06 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 18 Jun 2012 15:06:07 +0000 (15:06 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@32424 3c298f89-4303-0410-b956-a3cf2f4a3e73

libs/newt/Makefile
libs/newt/patches/100-compile-fix-broken-makefile.patch
libs/newt/patches/110-disable-snackmodule-python.patch

index 858c6e2..79dad88 100644 (file)
@@ -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/
index 5fc45b8..cbada60 100644 (file)
@@ -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)
  
  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)
index d043555..79e7e11 100644 (file)
@@ -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