diff --git a/.checkpackageignore b/.checkpackageignore index 589a635a38..92e18eb515 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -1090,7 +1090,6 @@ package/sentry-native/0001-sentry.h-include-ucontext.h.patch lib_patch.Upstream package/ser2net/S50ser2net Shellcheck lib_sysv.Indent lib_sysv.Variables package/setools/0001-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch lib_patch.Upstream package/setserial/0001-build-system-fix.patch lib_patch.Upstream -package/setserial/0002-tiocghayesesp-build-fix.patch lib_patch.Upstream package/shadowsocks-libev/0001-configure.ac-use-pkg-config-to-find-netfilter_conntr.patch lib_patch.Upstream package/shadowsocks-libev/0002-fix-maybe-uninitialized-errors.patch lib_patch.Upstream package/shadowsocks-libev/0003-lib-Makefile.am-remove-static-from-LDFLAGS.patch lib_patch.Upstream diff --git a/package/setserial/0002-tiocghayesesp-build-fix.patch b/package/setserial/0002-tiocghayesesp-build-fix.patch index 176a0c9e15..670be34c28 100644 --- a/package/setserial/0002-tiocghayesesp-build-fix.patch +++ b/package/setserial/0002-tiocghayesesp-build-fix.patch @@ -6,6 +6,9 @@ define the TIOCGHAYESESP ioctl, breaking the build. It's very unlikely to be of interest anymore, so just undef it. Signed-off-by: Peter Korsgaard +[rebased on top of Debian's setserial_2.17-45.3.diff] +Upstream: N/A only for compatibility with Linux kernels [2.6.33;2.6.36[ +Signed-off-by: Quentin Schulz --- setserial.c | 5 +++++ 1 file changed, 5 insertions(+) @@ -14,9 +17,9 @@ Index: setserial-2.17/setserial.c =================================================================== --- setserial-2.17.orig/setserial.c +++ setserial-2.17/setserial.c -@@ -24,6 +24,11 @@ +@@ -39,6 +39,11 @@ + #include "safety.h" #endif - #include +/* linux/hayesesp.h got removed in 2.6.33 but some archs (like x86) + still define TIOCGHAYESESP. It's very unlikely to be of interest diff --git a/package/setserial/setserial.mk b/package/setserial/setserial.mk index 66ca59d79d..002bf21161 100644 --- a/package/setserial/setserial.mk +++ b/package/setserial/setserial.mk @@ -5,23 +5,41 @@ ################################################################################ SETSERIAL_VERSION = 2.17 -SETSERIAL_PATCH = setserial_2.17-45.3.diff.gz SETSERIAL_SOURCE = setserial_$(SETSERIAL_VERSION).orig.tar.gz SETSERIAL_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/s/setserial +SETSERIAL_EXTRA_DOWNLOADS = setserial_2.17-45.3.diff.gz SETSERIAL_LICENSE = GPL-2.0 SETSERIAL_LICENSE_FILES = debian/copyright # make all also builds setserial.cat which needs nroff SETSERIAL_MAKE_OPTS = setserial +# Extract the Debian tarball inside the sources +define SETSERIAL_DEBIAN_EXTRACT + $(call suitable-extractor,$(notdir $(SETSERIAL_EXTRA_DOWNLOADS))) \ + $(SETSERIAL_DL_DIR)/$(notdir $(SETSERIAL_EXTRA_DOWNLOADS)) > $(@D)/setserial_2.17-45.3.diff +endef + +SETSERIAL_POST_EXTRACT_HOOKS += SETSERIAL_DEBIAN_EXTRACT + define SETSERIAL_APPLY_DEBIAN_PATCHES - # Touching gorhack.h is needed for the Debian patch 18 to work + # - Applying diff gotten from SETSERIAL_EXTRA_DOWNLOADS + # - Touching gorhack.h is needed for the Debian patch 18 to work + # - Rename 00list which contains the list of patches to "series" so + # Buildroot knows in which order the patches need to be applied. This + # is necessary because their file extension is dpatch, which isn't + # supported by the APPLY_PATCHES script outside of the series + # mechanism. + $(APPLY_PATCHES) $(@D) $(@D) setserial_2.17-45.3.diff + if [ -d $(@D)/debian/patches ]; then \ touch $(@D)/gorhack.h; \ rm $(@D)/debian/patches/01_makefile.dpatch; \ - $(APPLY_PATCHES) $(@D) $(@D)/debian/patches *.dpatch; \ + mv $(@D)/debian/patches/00list $(@D)/debian/patches/series; \ + sed -i '/01_makefile.dpatch/d' $(@D)/debian/patches/series; \ + $(APPLY_PATCHES) $(@D) $(@D)/debian/patches series; \ fi endef -SETSERIAL_POST_PATCH_HOOKS += SETSERIAL_APPLY_DEBIAN_PATCHES +SETSERIAL_PRE_PATCH_HOOKS += SETSERIAL_APPLY_DEBIAN_PATCHES $(eval $(autotools-package))