Skip to content

Commit 06d34c4

Browse files
build: add required ICU patch changes
Added new folder to include when dealing with ICU patches folder. Copied .h files to patches folder to fix include issues.
1 parent ec0852d commit 06d34c4

File tree

5 files changed

+396
-0
lines changed

5 files changed

+396
-0
lines changed

configure.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2048,6 +2048,7 @@ def icu_download(path):
20482048
'genccode': 'tools/genccode',
20492049
'genrb': 'tools/genrb',
20502050
'icupkg': 'tools/icupkg',
2051+
'pkgdata': 'tools/pkgdata',
20512052
}
20522053
# this creates a variable icu_src_XXX for each of the subdirs
20532054
# with a list of the src files to use

tools/icu/icu-generic.gyp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@
371371
'<@(icu_src_common)',
372372
'<@(icu_src_i18n)',
373373
'<@(icu_src_stubdata)',
374+
'<@(icu_src_pkgdata)',
374375
],
375376
'sources!': [
376377
'<(icu_path)/source/tools/toolutil/udbgutil.cpp',
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
// © 2016 and later: Unicode, Inc. and others.
2+
// License & terms of use: http://www.unicode.org/copyright.html
3+
/******************************************************************************
4+
* Copyright (C) 2008-2011, International Business Machines
5+
* Corporation and others. All Rights Reserved.
6+
*******************************************************************************
7+
*/
8+
9+
#ifndef __PKG_GENC_H__
10+
#define __PKG_GENC_H__
11+
12+
#include "unicode/utypes.h"
13+
#include "toolutil.h"
14+
15+
#include "unicode/putil.h"
16+
#include "putilimp.h"
17+
18+
/*** Platform #defines move here ***/
19+
#if U_PLATFORM_HAS_WIN32_API
20+
#ifdef __GNUC__
21+
#define WINDOWS_WITH_GNUC
22+
#else
23+
#define WINDOWS_WITH_MSVC
24+
#endif
25+
#endif
26+
27+
28+
#if !defined(WINDOWS_WITH_MSVC)
29+
#define BUILD_DATA_WITHOUT_ASSEMBLY
30+
#endif
31+
32+
#ifndef U_DISABLE_OBJ_CODE /* testing */
33+
#if defined(WINDOWS_WITH_MSVC) || U_PLATFORM_IS_LINUX_BASED
34+
#define CAN_WRITE_OBJ_CODE
35+
#endif
36+
#if U_PLATFORM_HAS_WIN32_API || defined(U_ELF)
37+
#define CAN_GENERATE_OBJECTS
38+
#endif
39+
#endif
40+
41+
#if U_PLATFORM == U_PF_CYGWIN || defined(CYGWINMSVC)
42+
#define USING_CYGWIN
43+
#endif
44+
45+
/*
46+
* When building the data library without assembly,
47+
* some platforms use a single c code file for all of
48+
* the data to generate the final data library. This can
49+
* increase the performance of the pkdata tool.
50+
*/
51+
#if U_PLATFORM == U_PF_OS400
52+
#define USE_SINGLE_CCODE_FILE
53+
#endif
54+
55+
/* Need to fix the file seperator character when using MinGW. */
56+
#if defined(WINDOWS_WITH_GNUC) || defined(USING_CYGWIN)
57+
#define PKGDATA_FILE_SEP_STRING "/"
58+
#else
59+
#define PKGDATA_FILE_SEP_STRING U_FILE_SEP_STRING
60+
#endif
61+
62+
#define LARGE_BUFFER_MAX_SIZE 2048
63+
#define SMALL_BUFFER_MAX_SIZE 512
64+
#define SMALL_BUFFER_FLAG_NAMES 32
65+
#define BUFFER_PADDING_SIZE 20
66+
67+
/** End platform defines **/
68+
69+
70+
71+
U_CAPI void U_EXPORT2
72+
printAssemblyHeadersToStdErr(void);
73+
74+
U_CAPI UBool U_EXPORT2
75+
checkAssemblyHeaderName(const char* optAssembly);
76+
77+
U_CAPI UBool U_EXPORT2
78+
checkCpuArchitecture(const char* optCpuArch);
79+
80+
U_CAPI void U_EXPORT2
81+
writeCCode(
82+
const char *filename,
83+
const char *destdir,
84+
const char *optEntryPoint,
85+
const char *optName,
86+
const char *optFilename,
87+
char *outFilePath,
88+
size_t outFilePathCapacity);
89+
90+
U_CAPI void U_EXPORT2
91+
writeAssemblyCode(
92+
const char *filename,
93+
const char *destdir,
94+
const char *optEntryPoint,
95+
const char *optFilename,
96+
char *outFilePath,
97+
size_t outFilePathCapacity);
98+
99+
U_CAPI void U_EXPORT2
100+
writeObjectCode(
101+
const char *filename,
102+
const char *destdir,
103+
const char *optEntryPoint,
104+
const char *optMatchArch,
105+
const char *optCpuArch,
106+
const char *optFilename,
107+
char *outFilePath,
108+
size_t outFilePathCapacity,
109+
UBool optWinDllExport);
110+
111+
#endif
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
// © 2016 and later: Unicode, Inc. and others.
2+
// License & terms of use: http://www.unicode.org/copyright.html
3+
/******************************************************************************
4+
* Copyright (C) 2008-2011, International Business Machines
5+
* Corporation and others. All Rights Reserved.
6+
*******************************************************************************
7+
*/
8+
9+
#ifndef __PKG_GENC_H__
10+
#define __PKG_GENC_H__
11+
12+
#include "unicode/utypes.h"
13+
#include "toolutil.h"
14+
15+
#include "unicode/putil.h"
16+
#include "putilimp.h"
17+
18+
/*** Platform #defines move here ***/
19+
#if U_PLATFORM_HAS_WIN32_API
20+
#ifdef __GNUC__
21+
#define WINDOWS_WITH_GNUC
22+
#else
23+
#define WINDOWS_WITH_MSVC
24+
#endif
25+
#endif
26+
27+
28+
#if !defined(WINDOWS_WITH_MSVC)
29+
#define BUILD_DATA_WITHOUT_ASSEMBLY
30+
#endif
31+
32+
#ifndef U_DISABLE_OBJ_CODE /* testing */
33+
#if defined(WINDOWS_WITH_MSVC) || U_PLATFORM_IS_LINUX_BASED
34+
#define CAN_WRITE_OBJ_CODE
35+
#endif
36+
#if U_PLATFORM_HAS_WIN32_API || defined(U_ELF)
37+
#define CAN_GENERATE_OBJECTS
38+
#endif
39+
#endif
40+
41+
#if U_PLATFORM == U_PF_CYGWIN || defined(CYGWINMSVC)
42+
#define USING_CYGWIN
43+
#endif
44+
45+
/*
46+
* When building the data library without assembly,
47+
* some platforms use a single c code file for all of
48+
* the data to generate the final data library. This can
49+
* increase the performance of the pkdata tool.
50+
*/
51+
#if U_PLATFORM == U_PF_OS400
52+
#define USE_SINGLE_CCODE_FILE
53+
#endif
54+
55+
/* Need to fix the file seperator character when using MinGW. */
56+
#if defined(WINDOWS_WITH_GNUC) || defined(USING_CYGWIN)
57+
#define PKGDATA_FILE_SEP_STRING "/"
58+
#else
59+
#define PKGDATA_FILE_SEP_STRING U_FILE_SEP_STRING
60+
#endif
61+
62+
#define LARGE_BUFFER_MAX_SIZE 2048
63+
#define SMALL_BUFFER_MAX_SIZE 512
64+
#define SMALL_BUFFER_FLAG_NAMES 32
65+
#define BUFFER_PADDING_SIZE 20
66+
67+
/** End platform defines **/
68+
69+
70+
71+
U_CAPI void U_EXPORT2
72+
printAssemblyHeadersToStdErr(void);
73+
74+
U_CAPI UBool U_EXPORT2
75+
checkAssemblyHeaderName(const char* optAssembly);
76+
77+
U_CAPI UBool U_EXPORT2
78+
checkCpuArchitecture(const char* optCpuArch);
79+
80+
U_CAPI void U_EXPORT2
81+
writeCCode(
82+
const char *filename,
83+
const char *destdir,
84+
const char *optEntryPoint,
85+
const char *optName,
86+
const char *optFilename,
87+
char *outFilePath,
88+
size_t outFilePathCapacity);
89+
90+
U_CAPI void U_EXPORT2
91+
writeAssemblyCode(
92+
const char *filename,
93+
const char *destdir,
94+
const char *optEntryPoint,
95+
const char *optFilename,
96+
char *outFilePath,
97+
size_t outFilePathCapacity);
98+
99+
U_CAPI void U_EXPORT2
100+
writeObjectCode(
101+
const char *filename,
102+
const char *destdir,
103+
const char *optEntryPoint,
104+
const char *optMatchArch,
105+
const char *optCpuArch,
106+
const char *optFilename,
107+
char *outFilePath,
108+
size_t outFilePathCapacity,
109+
UBool optWinDllExport);
110+
111+
#endif

0 commit comments

Comments
 (0)