diff --git a/blueprints/dev-utils/_unix/m4/m4-1.4.18-20190506.diff b/blueprints/dev-utils/_unix/m4/m4-1.4.18-20190506.diff new file mode 100644 index 000000000..dbdf8e19f --- /dev/null +++ b/blueprints/dev-utils/_unix/m4/m4-1.4.18-20190506.diff @@ -0,0 +1,12 @@ +diff -Nrub -x '*~' -x '*\.rej' -x '*\.orig' -x '*\.o' -x '*\.pyc' m4-1.4.18.orig/lib/vasnprintf.c m4-1.4.18/lib/vasnprintf.c +--- m4-1.4.18.orig/lib/vasnprintf.c 2016-12-31 14:54:42.000000000 +0100 ++++ m4-1.4.18/lib/vasnprintf.c 2019-05-06 11:06:24.000000000 +0200 +@@ -4858,7 +4858,7 @@ + #endif + *fbp = dp->conversion; + #if USE_SNPRINTF +-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) ++# if !defined(__APPLE__) && !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) + fbp[1] = '%'; + fbp[2] = 'n'; + fbp[3] = '\0'; diff --git a/blueprints/dev-utils/_unix/m4/m4.py b/blueprints/dev-utils/_unix/m4/m4.py index f7bd05322..2706227f1 100644 --- a/blueprints/dev-utils/_unix/m4/m4.py +++ b/blueprints/dev-utils/_unix/m4/m4.py @@ -1,24 +1,27 @@ import info class subinfo( info.infoclass ): def setTargets( self ): for ver in ["1.4.18"]: self.targets[ ver ] = f"https://ftp.gnu.org/gnu/m4/m4-{ver}.tar.xz" self.targetInstSrc[ ver ] = f"m4-{ver}" self.targetInstallPath[ver] = "dev-utils" self.targetDigests["1.4.18"] = (['f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07'], CraftHash.HashAlgorithm.SHA256) self.description = "GNU M4 is an implementation of the traditional Unix macro processor." self.defaultTarget = "1.4.18" + self.patchToApply["1.4.18"] = [("m4-1.4.18-20190506.diff", 1)] + self.patchLevel["1.4.18"] = 1 + from Package.AutoToolsPackageBase import * class Package( AutoToolsPackageBase ): def __init__( self ): AutoToolsPackageBase.__init__( self ) self.subinfo.options.configure.autoreconf = False self.subinfo.options.configure.args += " --disable-static --enable-shared " if CraftCore.compiler.isLinux and CraftCore.compiler.isClang(): self.subinfo.options.configure.cflags += " --rtlib=compiler-rt" self.subinfo.options.configure.cxxflags += " --rtlib=compiler-rt"