From 317c2469d923b2a4d28f04e063d111760d83ea7a Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Tue, 18 Apr 2017 23:18:00 +0200 Subject: [PATCH 1/2] libcanfestival: fix several small build process issues This patch tries to address the following package issues: - the upstream hg repository seems to contain some invalid timestamps, at least the following warning are generated during package compilation (only one example): emcy.c: Timestamp out of range; substituting 2514-05-30 01:53:03.999999999 This can be fixed by touching all files after unpacking, thus tar is now given the -m switch. - one or more LEDE buildbot(s) do not have hg tool installed and thus are not able to checkout the sources from upstream This patch populates PKG_MIRROR_HASH in the hope that the buildbot's first try is to download an already packed source tarball prior to checkout it out from upstream. - While at packaging from upstream, use the common infrastructure, i.e. use a source date etc. This also results in tar.xz files and thus reduces the disk footprint a little bit. - during compilation the follwing warning could be observed: cc1: note: someone does not honour copts correctly, passed 0 times To silent down these warning, patch the Makefiles and pass the expected option. Important note: changes are only compile tested due to missing hardware at hand. Signed-off-by: Michael Heimpold --- libs/libcanfestival/Makefile | 10 ++--- .../patches/004-honour-copts.patch | 44 +++++++++++++++++++ 2 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 libs/libcanfestival/patches/004-honour-copts.patch diff --git a/libs/libcanfestival/Makefile b/libs/libcanfestival/Makefile index 9758ef32c..a49f97a2d 100644 --- a/libs/libcanfestival/Makefile +++ b/libs/libcanfestival/Makefile @@ -8,20 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libcanfestival -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_PROTO:=hg PKG_SOURCE_URL:=http://dev.automforge.net/CanFestival-3 -PKG_SOURCE_SUBDIR:=$(PKG_NAME) +PKG_SOURCE_DATE:=2015-08-03 PKG_SOURCE_VERSION:=8bfe0ac00cdb -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 +PKG_MIRROR_HASH:=6d83e128302956bf654268ed8ee75aa1461f14dc6e566e52966a874564dc4ec5 PKG_MAINTAINER:=Anton Glukhov + PKG_LICENSE:=LGPL-2.1+ PKG_LICENSE_FILES:=LICENCE -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - +TAR_OPTIONS+= -m PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/libs/libcanfestival/patches/004-honour-copts.patch b/libs/libcanfestival/patches/004-honour-copts.patch new file mode 100644 index 000000000..117bd2f21 --- /dev/null +++ b/libs/libcanfestival/patches/004-honour-copts.patch @@ -0,0 +1,44 @@ +--- a/drivers/can_socket/Makefile.in ++++ b/drivers/can_socket/Makefile.in +@@ -23,7 +23,7 @@ + + CC = SUB_CC + OPT_CFLAGS = -O2 +-CFLAGS = SUB_OPT_CFLAGS ++CFLAGS = SUB_OPT_CFLAGS -fhonour-copts + PROG_CFLAGS = SUB_PROG_CFLAGS + PREFIX = SUB_PREFIX + TARGET = SUB_TARGET +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -101,7 +101,7 @@ uninstall: + rm -rf $(DESTDIR)$(PREFIX)/include/canfestival + + else +-CFLAGS = SUB_OPT_CFLAGS ++CFLAGS = SUB_OPT_CFLAGS -fhonour-copts + + ifeq ($(TARGET),none) + canfestival: libcanfestival.o +--- a/drivers/unix/Makefile.in ++++ b/drivers/unix/Makefile.in +@@ -85,7 +85,7 @@ install: + + + else +-CFLAGS = SUB_OPT_CFLAGS ++CFLAGS = SUB_OPT_CFLAGS -fhonour-copts + + driver: libcanfestival_$(TARGET).a + +--- a/drivers/timers_unix/Makefile.in ++++ b/drivers/timers_unix/Makefile.in +@@ -23,7 +23,7 @@ + + CC = SUB_CC + OPT_CFLAGS = -O2 +-CFLAGS = SUB_OPT_CFLAGS ++CFLAGS = SUB_OPT_CFLAGS -fhonour-copts + PROG_CFLAGS = SUB_PROG_CFLAGS + OS_NAME = SUB_OS_NAME + ARCH_NAME = SUB_ARCH_NAME From 74a9d5b4f7cc40ffa5cb47047278b42ce1b4ee91 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Wed, 19 Apr 2017 00:44:55 +0200 Subject: [PATCH 2/2] libcanfestival: use http download instead of hg checkout This was suggested by @hnyman because hg is not a prerequisite in LEDE or Openwrt, so using that should be avoided, if possible. The tricky part is that the filename is appended to the URL, thus we construct/use an URL where the appended filename does not hurt. Signed-off-by: Michael Heimpold --- libs/libcanfestival/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/libcanfestival/Makefile b/libs/libcanfestival/Makefile index a49f97a2d..9b2821db7 100644 --- a/libs/libcanfestival/Makefile +++ b/libs/libcanfestival/Makefile @@ -8,19 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libcanfestival -PKG_RELEASE:=4 +PKG_RELEASE:=5 -PKG_SOURCE_PROTO:=hg -PKG_SOURCE_URL:=http://dev.automforge.net/CanFestival-3 -PKG_SOURCE_DATE:=2015-08-03 PKG_SOURCE_VERSION:=8bfe0ac00cdb -PKG_MIRROR_HASH:=6d83e128302956bf654268ed8ee75aa1461f14dc6e566e52966a874564dc4ec5 +PKG_SOURCE_URL:=http://dev.automforge.net/CanFestival-3/archive/$(PKG_SOURCE_VERSION).tar.bz2?_dummyfilename= +PKG_SOURCE:=CanFestival-3-$(PKG_SOURCE_VERSION).tar.bz2 +PKG_SOURCE_SUBDIR:=CanFestival-3-$(PKG_SOURCE_VERSION) +PKG_MIRROR_HASH:=0bee7aaef266fc579922ca159b7acbe9cdc9a936ac1f30402814844b007f7185 PKG_MAINTAINER:=Anton Glukhov PKG_LICENSE:=LGPL-2.1+ PKG_LICENSE_FILES:=LICENCE +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) + TAR_OPTIONS+= -m PKG_FIXUP:=autoreconf PKG_INSTALL:=1