Browse Source

bug 1447907

Bill Gianopoulos 3 years ago
parent
commit
c8020bc8d4

+ 82 - 0
bug1240930-253/comm/1447907-1-61a1.patch

@@ -0,0 +1,82 @@
+# HG changeset patch
+# User Philipp Kewisch <philipp@bugzilla.kewis.ch>
+# Date 1521730439 -3600
+# Node ID f44cfb13e72d37bbe96ea2b5f82514e34150f543
+# Parent  5e1cd8191d43ee71693dc35cee3e1496f633f07e
+Bug 1447907 - Port bug 1429875 to TB: re-write linkage logic in moz.build. rs=bustage-fix DONTBUILD CLOSED TREE
+
+diff --git a/calendar/libical/src/libical/Makefile.in b/calendar/libical/src/libical/Makefile.in
+--- a/calendar/libical/src/libical/Makefile.in
++++ b/calendar/libical/src/libical/Makefile.in
+@@ -37,28 +37,16 @@
+ 
+ DEFINES += -DHAVE_CONFIG_H
+ DEFINES += -DHAVE_SNPRINTF
+ 
+ ifneq (,$(filter BeOS Darwin OpenVMS NetBSD FreeBSD,$(OS_ARCH)))
+ DEFINES	+= -D__USE_BSD=1
+ endif
+ 
+-INSTALL_TARGETS += ical
+-ical_FILES := ical.h
+-ical_DEST = $(DIST)/include
+-ical_TARGET := export
+-
+-CSRCS += \
+-	icalderivedparameter.c \
+-	icalderivedproperty.c \
+-	icalderivedvalue.c \
+-	icalrestriction.c \
+-	$(NULL)
+-
+ include $(moztopsrcdir)/config/rules.mk
+ 
+ ######################################################################
+ #
+ # Generate files that are automatically generated (*.h.in and *.c.in)
+ # and ical.h
+ #
+ 
+diff --git a/calendar/libical/src/libical/moz.build b/calendar/libical/src/libical/moz.build
+--- a/calendar/libical/src/libical/moz.build
++++ b/calendar/libical/src/libical/moz.build
+@@ -23,16 +23,38 @@ UNIFIED_SOURCES += [
+     'icaltimezone.c',
+     'icaltypes.c',
+     'icalvalue.c',
+     'pvl.c',
+     'sspm.c',
+     'vsnprintf.c',
+ ]
+ 
++SOURCES += [
++    '!icalderivedparameter.c',
++    '!icalderivedproperty.c',
++    '!icalderivedvalue.c',
++    '!icalrestriction.c',
++]
++
++GENERATED_FILES += [
++    'ical.h',
++    'icalderivedparameter.c',
++    'icalderivedparameter.h',
++    'icalderivedproperty.c',
++    'icalderivedproperty.h',
++    'icalderivedvalue.c',
++    'icalderivedvalue.h',
++    'icalrestriction.c',
++]
++
++EXPORTS += [
++    '!ical.h'
++]
++
+ # We allow warnings for third-party code that can be updated from upstream.
+ AllowCompilerWarnings()
+ 
+ FINAL_LIBRARY = 'xul'
+ 
+ LOCAL_INCLUDES += [
+     '../..'
+ ]
+

+ 141 - 0
bug1240930-253/comm/1447907-2-61a1.patch

@@ -0,0 +1,141 @@
+# HG changeset patch
+# User Philipp Kewisch <mozilla@kewis.ch>
+# Date 1521755029 -3600
+# Node ID e58b200fabf350b10482e6b6d22b91056279118a
+# Parent  d424678da2d1a82e71864b36ac9ffa41da64b5b5
+Bug 1447907 - Adapt link logic for mapi component. rs=jorgk,bustage-fix
+
+In bug 1429875 there were some changes to the link logic that made CSRCS not work well. This patch
+moves CSRCS to moz.build and adds GENERATED_FILES to ensure that the build system picks up the right
+files.
+
+MozReview-Commit-ID: 9l9WL8SlRfp
+
+diff --git a/mailnews/mapi/mapihook/build/Makefile.in b/mailnews/mapi/mapihook/build/Makefile.in
+--- a/mailnews/mapi/mapihook/build/Makefile.in
++++ b/mailnews/mapi/mapihook/build/Makefile.in
+@@ -1,36 +1,30 @@
+-#
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ 
+-MIDL_GENERATED_FILES = msgMapi.h msgMapi_p.c msgMapi_i.c dlldata.c
+-
+-INSTALL_TARGETS += msgmapi
+-msgmapi_FILES := msgMapi.h
+-msgmapi_DEST = $(DIST)/include
+-msgmapi_TARGET := export
+-
+-SRCDIR_CSRCS	= $(addprefix $(srcdir)/,$(CSRCS))
+-
+-GARBAGE	+= $(MIDL_GENERATED_FILES) done_gen $(CSRCS) $(SRCDIR_CSRCS)
++GARBAGE	+= $(MIDL_GENERATED_FILES) done_gen ;
+ 
+-EMBED_MANIFEST_AT = 2
++MIDL_GENERATED_FILES = \
++	dlldata.c \
++	msgMapi.h \
++	msgMapi_p.c \
++	msgMapi_i.c \
++	$(NULL)
+ 
+-CSRCS += \
+-  dlldata.c \
+-  msgMapi_i.c \
+-  msgMapi_p.c \
+-  $(NULL)
+-
+-include $(topsrcdir)/config/rules.mk
+-
+-$(MIDL_GENERATED_FILES): done_gen
++$(MIDL_GENERATED_FILES): done_gen ;
+ 
+ done_gen: msgMapi.idl
+-	$(RM) $(SRCDIR_CSRCS)
+-	$(MIDL) $(MIDL_FLAGS) $(UNICODE_FLAGS) $(srcdir)/msgMapi.idl
++	$(MIDL) $(MIDL_FLAGS) -I $(srcdir) -Oicf $(srcdir)/msgMapi.idl
+ 	touch $@
+ 
+ export:: done_gen
+ 
++midl_exports := \
++	msgMapi.h \
++	msgMapi_i.c \
++	$(NULL)
+ 
++INSTALL_TARGETS += midl_exports
++midl_exports_FILES := msgMapi.h
++midl_exports_DEST = $(DIST)/include
++midl_exports_TARGET := export
+diff --git a/mailnews/mapi/mapihook/build/moz.build b/mailnews/mapi/mapihook/build/moz.build
+--- a/mailnews/mapi/mapihook/build/moz.build
++++ b/mailnews/mapi/mapihook/build/moz.build
+@@ -4,16 +4,33 @@
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ 
+ SharedLibrary('MapiProxy')
+ 
+ OS_LIBS += [
+     'rpcrt4',
+ ]
+ 
++SOURCES += [
++    '!dlldata.c',
++    '!msgMapi_i.c',
++    '!msgMapi_p.c'
++]
++
++GENERATED_FILES += [
++    'dlldata.c',
++    'msgMapi.h',
++    'msgMapi_i.c',
++    'msgMapi_p.c'
++]
++
+ for var in ('REGISTER_PROXY_DLL', 'UNICODE', '_UNICODE'):
+     DEFINES[var] = True
+ 
+-# This produces a compile warning mozilla-config.h(145): warning C4005: '_WIN32_WINNT': macro redefinition
+-#DEFINES['_WIN32_WINNT'] = '0x400'
+-
+ DEFFILE = SRCDIR + '/MapiProxy.def'
+ 
++# The Windows MIDL code generator creates things like:
++#
++#   #endif !_MIDL_USE_GUIDDEF_
++#
++# which clang-cl complains about.  MSVC doesn't, so turn this warning off.
++if CONFIG['CC_TYPE'] == 'clang-cl':
++    CFLAGS += ['-Wno-extra-tokens']
+diff --git a/mailnews/mapi/mapihook/src/Makefile.in b/mailnews/mapi/mapihook/src/Makefile.in
+deleted file mode 100644
+--- a/mailnews/mapi/mapihook/src/Makefile.in
++++ /dev/null
+@@ -1,6 +0,0 @@
+-#
+-# This Source Code Form is subject to the terms of the Mozilla Public
+-# License, v. 2.0. If a copy of the MPL was not distributed with this
+-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+-
+-CSRCS += ../build/msgMapi_i.c
+diff --git a/mailnews/mapi/mapihook/src/moz.build b/mailnews/mapi/mapihook/src/moz.build
+--- a/mailnews/mapi/mapihook/src/moz.build
++++ b/mailnews/mapi/mapihook/src/moz.build
+@@ -1,14 +1,15 @@
+ # vim: set filetype=python:
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ 
+ SOURCES += [
++    '!../build/msgMapi_i.c',
+     'msgMapiFactory.cpp',
+     'msgMapiHook.cpp',
+     'msgMapiImp.cpp',
+     'msgMapiMain.cpp',
+     'msgMapiSupport.cpp',
+     'Registry.cpp',
+ ]
+ 
+

+ 2 - 0
bug1240930-253/comm/series-append

@@ -1,3 +1,5 @@
+1447907-1-61a1.patch
+1447907-2-61a1.patch
 1468240-port-1437942-mail-62a1.patch
 1639866-1-port-1437942-suite-277.patch
 1639866-2-port-1437942-suite-257.patch