Skip to contentSkip to conversation

newt: convert to autotools-package infra

PATCH New Samuel Martin 2 participants 2 messages Oct 11, 2012 – Oct 21, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 newt: convert to autotools-package infra

 create mode 100644 package/newt/newt-fix-makefile.patch
package/newt/newt-fix-makefile.patch new file +42 -0
new file mode 100644
index 0000000..227b0f3
@@ -0,0 +1,42 @@
+Fix Makefile.in
+
+* Remove -Os from the CFLAGS (already handled by Buildroot)
+* Use $(CC) instead of $(CPP) to generate .depend file because
+  '$(CPP) -M' call does not support multiple input files.
+  This avoid the following error:
+
+make[1]: Entering directory `/opt/br/output/build/newt-0.51.0'
+/opt/br/output/host/usr/bin/arm-none-linux-gnueabi-cpp -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -M newt.c button.c form.c checkbox.c entry.c label.c listbox.c scrollbar.c textbox.c scale.c grid.c windows.c buttonbar.c checkboxtree.c > .depend
+arm-none-linux-gnueabi-cpp: too many input files
+make[1]: *** [depend] Error 1
+make[1]: Leaving directory 
+`/opt/br/output/build/newt-0.51.0'
+make: *** 
+[/opt/br/output/build/newt-0.51.0/.stamp_built] Error 2
+
+
+Signed-off-by: Samuel Martin <[email protected]>
+
+---
+Index: newt-0.51.0/Makefile.in
+===================================================================
+--- newt-0.51.0.orig/Makefile.in	2012-10-10 22:43:42.042318041 +0200
++++ newt-0.51.0/Makefile.in	2012-10-11 21:25:44.063873277 +0200
+@@ -3,7 +3,7 @@ SHLIBS = -lslang -lm -lc
+ 
+ GPM_SUPPORT=@gpm_support@
+ 
+-CFLAGS = -Wall -Os -D_GNU_SOURCE
++CFLAGS += -D_GNU_SOURCE
+ 
+ VERSION = @VERSION@
+ CVSTAG = r$(subst .,-,$(VERSION))
+@@ -86,7 +86,7 @@ clean:
+ 		$(SHAREDOBJS) *.so*
+ 
+ depend:
+-	$(CPP) $(CFLAGS) -M $(SOURCES) > .depend
++	$(CC) $(CFLAGS) -M $(SOURCES) > .depend
+ 
+ $(SHAREDDIR):
+ 	mkdir -p $(SHAREDDIR)
package/newt/newt.mk +38 -75

118 lines not on this page · raw message

Signature · 1 line
1.7.12.2
#1 lore raw

PATCH 1/1 newt: convert to autotools-package infra

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

Samuel> Signed-off-by: Samuel Martin <[email protected]>

Committed with minor tweaks, see below:

 Samuel> +NEWT_VERSION         = 0.51.0
 Samuel> +NEWT_SITE            = http://www.uclibc.org/
 Samuel> +NEWT_SOURCE          = newt-$(NEWT_VERSION).tar.bz2
 Samuel> +NEWT_LICENSE         = GPLv2
 Samuel> +NEWT_LICENSE_FILES   = COPYING

Samuel> +NEWT_INSTALL_STAGING = YES
Samuel> +
Samuel> +NEWT_DEPENDENCIES = slang
Samuel> +
Samuel> +NEWT_CONF_OPT += \
Samuel> + --prefix=/usr \
Samuel> + --exec-prefix=/usr \
Samuel> + --bindir=/usr/bin \
Samuel> + --sbindir=/usr/sbin \
Samuel> + --libdir=/lib \
Samuel> + --libexecdir=/usr/lib \
Samuel> + --sysconfdir=/etc \
Samuel> + --datadir=/usr/share \
Samuel> + --localstatedir=/var \
Samuel> + --mandir=/usr/man \
Samuel> + --infodir=/usr/info \
Samuel> + $(DISABLE_NLS)

All of these are handled by pkg-autotools, so can be dropped.

Samuel> +
Samuel> +NEWT_MAKE_ENV += $(TARGET_CONFIGURE_OPTS) Samuel> +NEWT_MAKE = $(MAKE1)
Samuel> +
Samuel> +define NEWT_INSTALL_STAGING_CMDS
Samuel> + $(INSTALL) -D -m644 $(@D)/newt.h $(STAGING_DIR)/usr/include/newt.h
Samuel> + $(INSTALL) -D -m644 $(@D)/libnewt.a $(STAGING_DIR)/usr/lib/libnewt.a

 Samuel> +	$(INSTALL) -m755 $(@D)/libnewt.so*  $(STAGING_DIR)/usr/lib/
 Samuel> +	ln -fs libnewt.so.$(NEWT_VERSION)   $(STAGING_DIR)/usr/lib/libnewt.so
 Samuel> +	ln -fs libnewt.so.$(NEWT_VERSION)   $(STAGING_DIR)/usr/lib/libnewt.so.0.51

Samuel> +endef
Samuel> +
Samuel> +define NEWT_INSTALL_TARGET_CMDS
Samuel> + $(INSTALL) -d $(TARGET_DIR)/usr/lib/
Samuel> cp -a $(STAGING_DIR)/usr/lib/libnewt.so* $(TARGET_DIR)/usr/lib/
Samuel> - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libnewt.so*

We normally install everything into target as well (which then gets cleaned up by target-finalize if needed), so I changed _INSTALL_TARGET_CMDS to do the same as for STAGING.

Signature · 1 line
Bye, Peter Korsgaard