Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/bockbuild.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonojenkins <jo.shields+jenkins@xamarin.com>2019-08-30 13:40:48 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2019-08-30 13:40:48 +0300
commita095701c60a1c539c5b4b4719f32575120cbc4aa (patch)
tree2cb22974f02aa2f57f1c6099be3f277246920fef
parenta419d0b293bfa76392043c69641b8cc018ffe1ce (diff)
Build pkg-config as 64bit only, libtiff as universal and remove gtk-quartz-engine.py (#119)2019-02
We hit troubles (https://github.com/mono/mono/issues/13804) which are apparently related to lipo'ing so move the three packages that use it away from it. - pkg-config doesn't build as universal since the internal glib doesn't build because of 32/64bit configure mismatches (we'd need to do similar patches to what we do in glib.py) so just make it 64bit only. - libtiff also runs into the 32/64bit configure mismatch but we can fix it with a simple patch. I tested it works by running the repro from https://xamarin.github.io/bugzilla-archives/39/39865/bug.html . - gtk-quartz-engine.py is no longer used by MD/VSMac according to the team so remove it completely.
-rw-r--r--bockbuild/package.py5
-rw-r--r--packages/gtk-quartz-engine.py13
-rw-r--r--packages/libtiff.py13
-rw-r--r--packages/patches/tiff/patch-tif_config.diff81
-rw-r--r--packages/patches/tiff/patch-tiffconf.diff26
-rw-r--r--packages/pkg-config.py3
6 files changed, 125 insertions, 16 deletions
diff --git a/bockbuild/package.py b/bockbuild/package.py
index 08a388d..183580d 100644
--- a/bockbuild/package.py
+++ b/bockbuild/package.py
@@ -44,10 +44,11 @@ class Package:
# fat binary parameters. On a 64-bit Darwin profile (m64 = True)
# each package must decide if it will a) perform a multi-arch (64/32) build
# b) request two builds that are lipoed at the end or c) request a 32-bit
- # build only.
+ # build only or d) request a 64-bit build only.
self.needs_lipo = False
self.m32_only = False
+ self.m64_only = False
self.build_dependency = False
self.dont_clean = False
self.needs_build = None
@@ -514,6 +515,8 @@ class Package:
stagedir_x32, package_stage, 'bin', '32', '64')
elif arch == 'toolchain':
package_stage = self.do_build('darwin-64')
+ elif self.m64_only:
+ package_stage = self.do_build('darwin-64')
elif self.m32_only:
package_stage = self.do_build('darwin-32')
else:
diff --git a/packages/gtk-quartz-engine.py b/packages/gtk-quartz-engine.py
deleted file mode 100644
index a55a5af..0000000
--- a/packages/gtk-quartz-engine.py
+++ /dev/null
@@ -1,13 +0,0 @@
-class GtkQuartzEnginePackage (Package):
-
- def __init__(self):
- Package.__init__(self, 'gtk-quartz-engine',
- sources=[
- 'git://github.com/mono/gtk-quartz-engine.git'],
- override_properties={
- 'configure': './autogen.sh --prefix=%{package_prefix}',
- 'needs_lipo': True
- },
- revision='9555a08f0c9c98d02153c9d77b54a2dd83ce5d6f')
-
-GtkQuartzEnginePackage()
diff --git a/packages/libtiff.py b/packages/libtiff.py
index 2cadcc6..588a472 100644
--- a/packages/libtiff.py
+++ b/packages/libtiff.py
@@ -7,7 +7,18 @@ class LibTiffPackage (Package):
sources=[
'http://download.osgeo.org/libtiff/tiff-%{version}.tar.gz',
])
+ self.sources.extend([
+ 'patches/tiff/patch-tiffconf.diff',
+ 'patches/tiff/patch-tif_config.diff'
+ ])
- self.needs_lipo = True
+ def build(self):
+ if Package.profile.name == 'darwin':
+ Package.configure(self)
+ for p in range(1, len(self.local_sources)):
+ self.sh('patch -p0 < "%{local_sources[' + str(p) + ']}"')
+ Package.make(self)
+ else:
+ Package.build(self)
LibTiffPackage()
diff --git a/packages/patches/tiff/patch-tif_config.diff b/packages/patches/tiff/patch-tif_config.diff
new file mode 100644
index 0000000..81f21c9
--- /dev/null
+++ b/packages/patches/tiff/patch-tif_config.diff
@@ -0,0 +1,81 @@
+--- libtiff/tif_config.h.orig 2019-08-29 15:36:35.000000000 +0200
++++ libtiff/tif_config.h 2019-08-29 15:08:43.000000000 +0200
+@@ -255,7 +255,11 @@
+ #define SIZEOF_SIGNED_INT 4
+
+ /* The size of `signed long', as computed by sizeof. */
++#ifdef __LP64__
+ #define SIZEOF_SIGNED_LONG 8
++#else
++#define SIZEOF_SIGNED_LONG 4
++#endif
+
+ /* The size of `signed long long', as computed by sizeof. */
+ #define SIZEOF_SIGNED_LONG_LONG 8
+@@ -264,16 +268,28 @@
+ #define SIZEOF_SIGNED_SHORT 2
+
+ /* The size of `size_t', as computed by sizeof. */
++#ifdef __LP64__
+ #define SIZEOF_SIZE_T 8
++#else
++#define SIZEOF_SIZE_T 4
++#endif
+
+ /* The size of `unsigned char *', as computed by sizeof. */
++#ifdef __LP64__
+ #define SIZEOF_UNSIGNED_CHAR_P 8
++#else
++#define SIZEOF_UNSIGNED_CHAR_P 4
++#endif
+
+ /* The size of `unsigned int', as computed by sizeof. */
+ #define SIZEOF_UNSIGNED_INT 4
+
+ /* The size of `unsigned long', as computed by sizeof. */
++#ifdef __LP64__
+ #define SIZEOF_UNSIGNED_LONG 8
++#else
++#define SIZEOF_UNSIGNED_LONG 4
++#endif
+
+ /* The size of `unsigned long long', as computed by sizeof. */
+ #define SIZEOF_UNSIGNED_LONG_LONG 8
+@@ -307,10 +323,18 @@
+ #define TIFF_INT32_T signed int
+
+ /* Signed 64-bit type formatter */
++#ifdef __LP64__
+ #define TIFF_INT64_FORMAT "%ld"
++#else
++#define TIFF_INT64_FORMAT "%lld"
++#endif
+
+ /* Signed 64-bit type */
++#ifdef __LP64__
+ #define TIFF_INT64_T signed long
++#else
++#define TIFF_INT64_T signed long long
++#endif
+
+ /* Signed 8-bit type */
+ #define TIFF_INT8_T signed char
+@@ -343,10 +367,18 @@
+ #define TIFF_UINT32_T unsigned int
+
+ /* Unsigned 64-bit type formatter */
++#ifdef __LP64__
+ #define TIFF_UINT64_FORMAT "%lu"
++#else
++#define TIFF_UINT64_FORMAT "%llu"
++#endif
+
+ /* Unsigned 64-bit type */
++#ifdef __LP64__
+ #define TIFF_UINT64_T unsigned long
++#else
++#define TIFF_UINT64_T unsigned long long
++#endif
+
+ /* Unsigned 8-bit type */
+ #define TIFF_UINT8_T unsigned char
diff --git a/packages/patches/tiff/patch-tiffconf.diff b/packages/patches/tiff/patch-tiffconf.diff
new file mode 100644
index 0000000..dda84d7
--- /dev/null
+++ b/packages/patches/tiff/patch-tiffconf.diff
@@ -0,0 +1,26 @@
+--- libtiff/tiffconf.h.orig 2019-08-29 15:37:19.000000000 +0200
++++ libtiff/tiffconf.h 2019-08-29 15:38:25.000000000 +0200
+@@ -15,7 +15,11 @@
+ #define TIFF_INT32_T signed int
+
+ /* Signed 64-bit type */
++#ifdef __LP64__
+ #define TIFF_INT64_T signed long
++#else
++#define TIFF_INT64_T signed long long
++#endif
+
+ /* Signed 8-bit type */
+ #define TIFF_INT8_T signed char
+@@ -27,7 +31,11 @@
+ #define TIFF_UINT32_T unsigned int
+
+ /* Unsigned 64-bit type */
++#ifdef __LP64__
+ #define TIFF_UINT64_T unsigned long
++#else
++#define TIFF_UINT64_T unsigned long long
++#endif
+
+ /* Unsigned 8-bit type */
+ #define TIFF_UINT8_T unsigned char
diff --git a/packages/pkg-config.py b/packages/pkg-config.py
index 6c62cbe..3e38774 100644
--- a/packages/pkg-config.py
+++ b/packages/pkg-config.py
@@ -1,4 +1,5 @@
package = FreeDesktopPackage('%{name}', 'pkg-config', '0.27',
configure_flags=["--with-internal-glib"])
-package.needs_lipo = True
+if package.profile.name == 'darwin':
+ package.m64_only = True