Commit 6ed00df1 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜
Browse files

recipes: Try to eliminate autoreconf as much as possible on Windows

autom4te seems to hang on the Windows CI runners because it needs to
use the ancient MSYS perl, so try to eliminate it and see if it helps.

Part-of: <!616>
parent f111503d
......@@ -10,10 +10,10 @@ class Recipe(recipe.Recipe):
tarball_checksum = 'a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33'
licenses = [License.GPLv2Plus]
configure_options = '--with-pic --enable-shared'
# Needed on Windows because the configure script that ships with the
# tarball is ancient and outputs incorrect linker flags
autoreconf = True
patches = ['a52dec/0002-Fix-link-cross-compiling-to-x86-in-darwin-platforms.patch',
'a52dec/0003-Disable-AC_C_ALWAYS_INLINE.patch',
'a52dec/0004-configure-let-us-decide-if-we-really-want-PIC-or-not.patch']
files_libs = ['liba52']
files_bins = ['a52dec']
......@@ -23,3 +23,5 @@ class Recipe(recipe.Recipe):
if self.config.target_platform == Platform.ANDROID:
self.configure_options += ' --disable-oss'
self.append_env('CFLAGS', '-fPIC')
# Don't enable always-inline, breaks the build on windows and macos (space is significant)
self.set_env('ac_cv_c_inline', 'inline ')
From 1b9beeece64828c3083ae33f633c00cce4b69b65 Mon Sep 17 00:00:00 2001
From: Andoni Morales Alastruey <ylatuya@gmail.com>
Date: Thu, 5 Apr 2012 13:25:06 +0200
Subject: [PATCH 2/4] Fix link cross-compiling to x86 in darwin platforms
The -m32 flag is not passed properly to gcc, creating a x86_64 library
---
configure.in | 9 +++++++++
liba52/Makefile.am | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/configure.in b/configure.in
index 71fd92b..17fc818 100644
--- a/configure.in
+++ b/configure.in
@@ -30,6 +30,15 @@ if test x"$GCC" = x"yes"; then
OPT_CFLAGS="$CFLAGS -fomit-frame-pointer"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
+ case "$host" in
+ *-apple-darwin*)
+ case "$host" in
+ i?86-* ) LIBA52_LDFLAGS="-Wl, -m32";;
+ x86_64-*) LIBA52_LDFLAGS="-Wl, -m64";;
+ esac
+ esac
+ AC_SUBST(LIBA52_LDFLAGS)
+
dnl arch-specific flags
case "$host" in
i?86-* | k?-*)
diff --git a/liba52/Makefile.am b/liba52/Makefile.am
index 32768b4..7fb0bb7 100644
--- a/liba52/Makefile.am
+++ b/liba52/Makefile.am
@@ -4,6 +4,6 @@ lib_LTLIBRARIES = liba52.la
liba52_la_SOURCES = bitstream.c imdct.c bit_allocate.c parse.c downmix.c
liba52_la_LIBADD = @LIBA52_LIBS@ -lm
-liba52_la_LDFLAGS = -no-undefined
+liba52_la_LDFLAGS = @LIBA52_LDFLAGS@ -no-undefined
EXTRA_DIST = configure.incl a52_internal.h bitstream.h tables.h
--
2.1.4
From 0bcb55806e3964086e0eeabcef79dbc005ad8953 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <slomo@circular-chaos.org>
Date: Mon, 23 Sep 2013 12:34:10 +0200
Subject: [PATCH 3/4] Disable AC_C_ALWAYS_INLINE
It causes errors with the new Xcode 5.0 toolchain and is not necessarily
useful anyway
---
configure.in | 1 -
1 file changed, 1 deletion(-)
diff --git a/configure.in b/configure.in
index 17fc818..354c524 100644
--- a/configure.in
+++ b/configure.in
@@ -94,7 +94,6 @@ AC_CHECK_GENERATE_INTTYPES([include])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
-AC_C_ALWAYS_INLINE
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_C_BIGENDIAN
--
2.1.4
From 3f2ece3e30b1f59b169c787ff9e078e10a19750a Mon Sep 17 00:00:00 2001
From: Andoni Morales Alastruey <ylatuya@gmail.com>
Date: Thu, 24 Oct 2013 12:31:47 +0200
Subject: [PATCH 4/4] configure: let us decide if we really want PIC or not
Fixes:
"/usr/bin/ld: .libs/imdct.o: relocation R_X86_64_32 against `.bss' can
not be used when making a shared object; recompile with -fPIC
.libs/imdct.o: could not read symbols: Bad value`"
---
liba52/configure.incl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/liba52/configure.incl b/liba52/configure.incl
index 4dbbcea..96b39aa 100644
--- a/liba52/configure.incl
+++ b/liba52/configure.incl
@@ -2,7 +2,7 @@ AC_SUBST([LIBA52_CFLAGS])
AC_SUBST([LIBA52_LIBS])
dnl avoid -fPIC when possible
-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
+dnl LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
AC_ARG_ENABLE([double],
[ --enable-double use double-precision samples])
--
2.1.4
......@@ -10,7 +10,6 @@ class Recipe(recipe.Recipe):
tarball_checksum = '53f02fbbec9e798b0faaf7c73272f83608e835c6288dd58be6c9bb54624a3800'
# only libraries are LGPLv2+, tools are GPLv3+ and defined below
licenses = [License.LGPLv2Plus]
autoreconf = True
btype = BuildType.CUSTOM
files_devel = [
......
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
class Recipe(recipe.Recipe):
name = 'mingw-regex'
version = '2.5'
licenses = [License.LGPLv2_1Plus]
files_libs = ['libregex']
files_devel = ['include/regex.h']
autoreconf = True
remotes = {'origin': 'https://git.code.sf.net/p/mingw/regex'}
commit = '7aa7b79d53a4b275d70397b424acffc57dbcf7a2'
patches = ['mingw-regex/0001-Fix-compilation.patch']
......@@ -9,14 +9,11 @@ class Recipe(recipe.Recipe):
tarball_checksum = '8c90f00c500b2299c0a323dd9beead2a00353752b2092ead558139bd67f7bf16'
# Either LGPL-2.1+ or MPL-1.1
licenses = [License.LGPLv2_1Plus, {License.MPLv1_1: ['COPYING-MPL-1.1']}]
autoreconf = True
autoreconf_sh = 'NOCONFIGURE=1 ./autogen.sh'
deps = ['glib', 'libpng', 'zlib', 'pixman', 'fontconfig', 'freetype']
patches = ['cairo/0001-Fix-compilation-with-Android-s-bionic-libc.patch',
'cairo/0001-Disable-building-of-the-tests.patch',
'cairo/0001-build-disable-failing-compile-link-checks-on-any-std.patch',
'cairo/0001-win32-Make-font-dc-thread-local.patch',
]
patches = [
'cairo/0001-Fix-compilation-with-Android-s-bionic-libc.patch',
'cairo/0001-win32-Make-font-dc-thread-local.patch',
]
files_libs = ['libcairo', 'libcairo-gobject', 'libcairo-script-interpreter']
files_devel = [
......@@ -48,6 +45,16 @@ class Recipe(recipe.Recipe):
self.append_env('CXXFLAGS', '-fno-lto')
self.append_env('CPPFLAGS', '-fno-lto')
if self.config.platform != Platform.WINDOWS:
self.autoreconf = True
self.autoreconf_sh = 'NOCONFIGURE=1 ./autogen.sh'
self.patches += [
'cairo/0001-Disable-building-of-the-tests.patch',
'cairo/0001-build-disable-failing-compile-link-checks-on-any-std.patch',
]
else:
self.patches += ['cairo/0001-Disable-building-of-the-tests-noautoreconf.patch']
if self.config.variants.x11:
self.files_devel += ['lib/pkgconfig/cairo-xlib-xrender.pc',
'lib/pkgconfig/cairo-xlib.pc']
......
From b98e122b4d96ccfbefdc1b15807be2dcf3481cf7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
Date: Tue, 21 Oct 2014 13:46:18 +0200
Subject: [PATCH] Disable building of the tests
We don't run them anyway and there are build system quirks in there.
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index fb2a4b2..7d700fe 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -107,7 +107,7 @@ EXTRA_PROGRAMS =
TESTS =
check_PROGRAMS =
# libpng is required for our test programs
-@CAIRO_HAS_PNG_FUNCTIONS_TRUE@am__append_1 = boilerplate test perf
+@CAIRO_HAS_PNG_FUNCTIONS_TRUE@am__append_1 =
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/build/aclocal.cairo.m4 \
--
2.27.0.windows.1
......@@ -13,7 +13,6 @@ class Recipe(recipe.Recipe):
deps = ['libogg']
configure_options = ' --disable-cpplibs --enable-static'
autoreconf = True
files_libs = ['libFLAC']
files_bins = ['flac', 'metaflac']
......
......@@ -11,13 +11,12 @@ class Recipe(recipe.Recipe):
licenses = [{License.MIT: ['COPYING']}]
configure_options = '--disable-docs'
deps = ['expat', 'freetype', 'zlib', 'bzip2']
autoreconf = True
patches = ['fontconfig/0003-configure-Allow-static-build.patch',
'fontconfig/0001-Do-not-build-tests-on-windows.patch',
'fontconfig/0001-Don-t-use-_mktemp_s-which-is-not-available-in-XP.patch',
'fontconfig/0004-Fix-cross-compilation-by-passing-CPPFLAGS-to-CPP.patch',
'fontconfig/0001-fcatomic-Fix-EXC_BAD_ACCESS-on-iOS-ARM64.patch',
]
patches = [
'fontconfig/0001-Fix-cross-compilation-by-passing-CPPFLAGS-to-CPP.patch',
# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/88
'fontconfig/0002-fcatomic-Fix-EXC_BAD_ACCESS-on-iOS-ARM64.patch',
'fontconfig/0003-Completely-disable-building-of-tests.patch',
]
files_libs = ['libfontconfig']
files_etc = [
......@@ -27,18 +26,21 @@ class Recipe(recipe.Recipe):
]
files_devel = ['lib/pkgconfig/fontconfig.pc', 'include/fontconfig']
autoreconf = True
def prepare(self):
if self.config.target_platform in (Platform.WINDOWS, Platform.ANDROID):
self.deps.append('libiconv')
if needs_xcode8_sdk_workaround(self.config):
self.set_env('ac_cv_func_mkostemp', 'no')
if self.config.target_platform == Platform.WINDOWS:
if self.config.target_arch == Architecture.X86_64:
self.configure_options += ' --with-arch=x86_64 '
else:
self.configure_options += ' --with-arch=i686 '
else:
self.autoreconf = True
self.patches += ['fontconfig/0003-configure-Allow-static-build.patch']
def post_install(self):
# Create relative symlinks to prevent breakage during packaging
......
From 8092554e6e14be784267a3eb829a804092248a7d Mon Sep 17 00:00:00 2001
From: Thibault Saunier <tsaunier@gnome.org>
Date: Wed, 2 Apr 2014 10:09:29 +0200
Subject: [PATCH] Do not build tests on windows
---
Makefile.am | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 2b4a5b8..4262789 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,12 @@
SUBDIRS=fontconfig fc-blanks fc-case fc-lang fc-glyphname src \
fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \
- fc-validate conf.d test
+ fc-validate conf.d
+
+if !OS_WIN32
+SUBDIRS += test
+endif
+
if ENABLE_DOCS
SUBDIRS += doc
endif
--
2.11.0
From 176a2e59de2df7f94be610bf7511922c728bb5ec Mon Sep 17 00:00:00 2001
From: Andoni Morales Alastruey <ylatuya@gmail.com>
Date: Wed, 15 Oct 2014 16:14:19 +0200
Subject: [PATCH] Don't use _mktemp_s which is not available in XP
---
configure.ac | 2 +-
src/fccompat.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1b48d50..785afb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -160,7 +160,7 @@ AC_TYPE_PID_T
# Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MMAP
-AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink fstatvfs fstatfs lstat])
+AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink fstatvfs fstatfs lstat])
dnl AC_CHECK_FUNCS doesn't check for header files.
dnl posix_fadvise() may be not available in older libc.
diff --git a/src/fccompat.c b/src/fccompat.c
index 31d80be..b34c46e 100644
--- a/src/fccompat.c
+++ b/src/fccompat.c
@@ -152,8 +152,8 @@ FcMakeTempfile (char *template)
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
}
# endif
-#elif HAVE__MKTEMP_S
- if (_mktemp_s(template, strlen(template) + 1) != 0)
+#elif HAVE__MKTEMP
+ if (_mktemp(template) != 0)
return -1;
fd = FcOpen(template, O_RDWR | O_EXCL | O_CREAT, 0600);
#endif
--
2.11.0
From b60635e45e38fba89776b791f9e3cd4a0fcf5181 Mon Sep 17 00:00:00 2001
From 3b3f1d502d5abdac5d96a9c5e70408891357572b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete@collabora.com>
Date: Thu, 1 Feb 2018 10:52:40 +0000
Subject: [PATCH] Fix cross-compilation by passing CPPFLAGS to CPP
Subject: [PATCH 1/3] Fix cross-compilation by passing CPPFLAGS to CPP
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
src/Makefile.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 726c435..f8c8bd8 100644
......@@ -16,10 +17,23 @@ index 726c435..f8c8bd8 100644
@touch -r stamp-fcobjshash.gperf $@
stamp-fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
- $(AM_V_GEN) $(CPP) -I$(top_srcdir) $< | \
+ $(AM_V_GEN) $(CPP) -I$(top_srcdir) $(CPPFLAGS) $< | \
$(SED) 's/^ *//;s/ *, */,/' | \
$(GREP) '^[^#]' | \
awk ' \
diff --git a/src/Makefile.in b/src/Makefile.in
index 0dd5c74..90d3a7a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -902,7 +902,7 @@ fcobjshash.gperf: Makefile stamp-fcobjshash.gperf
@$(MAKE) stamp-fcobjshash.gperf
@touch -r stamp-fcobjshash.gperf $@
stamp-fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
- $(AM_V_GEN) $(CPP) -I$(top_srcdir) $< | \
+ $(AM_V_GEN) $(CPP) -I$(top_srcdir) $(CPPFLAGS) $< | \
$(SED) 's/^ *//;s/ *, */,/' | \
$(GREP) '^[^#]' | \
awk ' \
--
2.14.3
2.27.0.windows.1
From 1041fdf62bbcbd65ab85cf08836195b975c9dd85 Mon Sep 17 00:00:00 2001
From 5786bcc6be8441d579d26f830ebb35bda40deef6 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Sat, 22 Feb 2020 03:57:50 +0530
Subject: [PATCH] fcatomic: Fix EXC_BAD_ACCESS on iOS ARM64
Subject: [PATCH 2/3] fcatomic: Fix EXC_BAD_ACCESS on iOS ARM64
iPhone 2.1 was released a long time ago, and the macro for checking
the target iOS SDK version has changed. We can simplify everything and
......@@ -42,5 +42,5 @@ index cc28a88..657a5f5 100644
#elif !defined(FC_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES)
--
2.21.1 (Apple Git-122.3)
2.27.0.windows.1
From 8946f58450e04fa8ebc32b62e7479ed8f122408b Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Wed, 30 Sep 2020 13:07:43 +0530
Subject: [PATCH 3/3] Completely disable building of tests
This was originally for disabling on Windows, but to avoid autoreconf,
we disable it everywhere.
---
Makefile.am | 3 ++-
Makefile.in | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 2b4a5b8..3cdd66e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,8 @@
SUBDIRS=fontconfig fc-blanks fc-case fc-lang fc-glyphname src \
fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \
- fc-validate conf.d test
+ fc-validate conf.d
+
if ENABLE_DOCS
SUBDIRS += doc
endif
diff --git a/Makefile.in b/Makefile.in
index 3e3001b..67e46ef 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -436,7 +436,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = fontconfig fc-blanks fc-case fc-lang fc-glyphname src \
fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \
- fc-validate conf.d test $(am__append_1)
+ fc-validate conf.d $(am__append_1)
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = fontconfig.pc.in fonts.conf.in fonts.dtd \
fontconfig.spec.in fontconfig.spec fontconfig-zip.in \
--
2.27.0.windows.1
......@@ -8,7 +8,6 @@ class Recipe(recipe.Recipe):
configure_options = ' --enable-static --disable-frontend --disable-decoder'
url = 'sf://.tar.gz'
tarball_checksum = 'ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e'
autoreconf = True
patches = ['lame/0001-Remove-decoder-symbols.patch']
files_libs = ['libmp3lame']
......
......@@ -8,7 +8,6 @@ class Recipe(recipe.Recipe):
url = 'gnome://'
tarball_checksum = '767ec234ae7aa684695b3a735548224888132e063f92db585759b422570621d4'
deps = ['libxml2', 'glib', 'gdk-pixbuf']
autoreconf = True
files_libs = ['libcroco-0.6']
files_bins = ['csslint-0.6']
......@@ -18,3 +17,7 @@ class Recipe(recipe.Recipe):
def prepare(self):
if self.config.target_platform in [Platform.DARWIN, Platform.IOS]:
self.configure_options += ' --disable-Bsymbolic'
if self.config.platform == Platform.WINDOWS:
self.override_libtool = False
else:
self.autoreconf = True
......@@ -7,7 +7,6 @@ class Recipe(recipe.Recipe):
url = 'https://download.videolan.org/pub/videolan/libdca/%(version)s/libdca-%(version)s.tar.bz2'
tarball_checksum = 'dba022e022109a5bacbe122d50917769ff27b64a7bba104bd38ced8de8510642'
licenses = [License.GPLv2Plus]
patches = ['libdca/0001-Disable-AC_C_ALWAYS_INLINE.patch']
autoreconf = True
files_libs = ['libdca']
......@@ -18,6 +17,11 @@ class Recipe(recipe.Recipe):
def prepare(self):
if self.config.target_platform == Platform.ANDROID:
self.configure_options += ' --disable-oss'
if self.config.platform == Platform.WINDOWS:
self.override_libtool = False
self.autoreconf = False
# Don't enable always-inline, breaks the build on macos (space is significant)
self.set_env('ac_cv_c_inline', 'inline ')
def post_install(self):
# Create relative symlinks to prevent breakage during packaging
......
From e5c66f0aea6ad8ed7fb7915fe83050b0f937065e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <slomo@circular-chaos.org>
Date: Mon, 23 Sep 2013 10:31:01 +0200
Subject: [PATCH] Disable AC_C_ALWAYS_INLINE
It causes errors with the new Xcode 5.0 toolchain and is not necessarily
useful anyway
---
configure.ac | 1 -
1 file changed, 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 11e32f0..97fa5a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,7 +105,6 @@ AC_CHECK_GENERATE_INTTYPES([include])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
-AC_C_ALWAYS_INLINE
AC_C_RESTRICT
AC_C_BUILTIN_EXPECT
AC_TYPE_SIZE_T
--
2.1.4
......@@ -9,8 +9,7 @@ class Recipe(recipe.Recipe):
tarball_checksum = 'c40e81d5866c3d4bf744e76ce0068d8f388f0e25f7e258ce0c8e76d7adc87b68'
licenses = [{License.BSD_like: ['COPYING']}]
deps = ['libogg', 'libpng']
patches = ['libkate/0001-be-more-permissive-with-automake-errors-now-that-we-.patch',
'libkate/0002-build-skip-tools-tests-and-doc-subdirs.patch']
patches = ['libkate/0002-build-skip-tools-tests-and-doc-subdirs.patch']
files_libs = ['libkate', 'liboggkate']
files_devel = ['include/kate', 'lib/pkgconfig/kate.pc', 'lib/pkgconfig/oggkate.pc']
......@@ -23,3 +22,9 @@ class Recipe(recipe.Recipe):
self.append_env('PYTHON', 'python3')
if self.config.target_distro == Distro.ARCH:
self.append_env('LDFLAGS', '-Wl,-O1,--sort-common,--as-needed,-z,relro')
if self.config.platform == Platform.WINDOWS:
self.autoreconf = False
self.override_libtool = False
else:
self.patches += ['libkate/0001-be-more-permissive-with-automake-errors-now-that-we-.patch']
self.append_env('CFLAGS', '-Wno-error')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment