mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-23 23:57:31 +09:00
Issue #80 - de-unify and fix up gfx/graphite2
With de-unified building we have to re-apply the fix-up for <cstdio>, and additionally the same for <cstring> to prevent the compiler picking the wrong versions of standard functions.
This commit is contained in:
parent
21dcaa3b59
commit
3bd4d91630
21 changed files with 28 additions and 32 deletions
|
|
@ -33,9 +33,10 @@ echo "$TARBALL" >> gfx/graphite2/README.mozilla
|
||||||
echo ""
|
echo ""
|
||||||
echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
|
echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
|
||||||
|
|
||||||
# fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h)
|
# fix up includes because of BZ bug 721839 (cstdio) and BZ bug 803066 (Windows.h)
|
||||||
#find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
|
# Additional issue with inclusion of <cstring> in non-unified mode (Issue #80)
|
||||||
#find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
|
find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/<cstring>/<string.h>/;s/Windows.h/windows.h/;" {} \;
|
||||||
|
find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/<cstring>/<string.h>/;s/Windows.h/windows.h/;" {} \;
|
||||||
|
|
||||||
# summarize what's been touched
|
# summarize what's been touched
|
||||||
echo Updated to $RELEASE.
|
echo Updated to $RELEASE.
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ of the License or (at your option) any later version.
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include "graphite2/Segment.h"
|
#include "graphite2/Segment.h"
|
||||||
#include "inc/Code.h"
|
#include "inc/Code.h"
|
||||||
#include "inc/Face.h"
|
#include "inc/Face.h"
|
||||||
|
|
@ -42,7 +42,7 @@ of the License or (at your option) any later version.
|
||||||
#include "inc/Rule.h"
|
#include "inc/Rule.h"
|
||||||
#include "inc/Silf.h"
|
#include "inc/Silf.h"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public
|
||||||
License, as published by the Free Software Foundation, either version 2
|
License, as published by the Free Software Foundation, either version 2
|
||||||
of the License or (at your option) any later version.
|
of the License or (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include "graphite2/Segment.h"
|
#include "graphite2/Segment.h"
|
||||||
#include "inc/CmapCache.h"
|
#include "inc/CmapCache.h"
|
||||||
#include "inc/debug.h"
|
#include "inc/debug.h"
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public
|
||||||
License, as published by the Free Software Foundation, either version 2
|
License, as published by the Free Software Foundation, either version 2
|
||||||
of the License or (at your option) any later version.
|
of the License or (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
|
|
||||||
#include "inc/Main.h"
|
#include "inc/Main.h"
|
||||||
#include "inc/bits.h"
|
#include "inc/bits.h"
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public
|
||||||
License, as published by the Free Software Foundation, either version 2
|
License, as published by the Free Software Foundation, either version 2
|
||||||
of the License or (at your option) any later version.
|
of the License or (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include "inc/FileFace.h"
|
#include "inc/FileFace.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ of the License or (at your option) any later version.
|
||||||
#include "inc/debug.h"
|
#include "inc/debug.h"
|
||||||
#include "inc/Endian.h"
|
#include "inc/Endian.h"
|
||||||
#include "inc/Pass.h"
|
#include "inc/Pass.h"
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ License, as published by the Free Software Foundation, either version 2
|
||||||
of the License or (at your option) any later version.
|
of the License or (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
#include "inc/UtfCodec.h"
|
#include "inc/UtfCodec.h"
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include "inc/bits.h"
|
#include "inc/bits.h"
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ Description
|
||||||
//#include <algorithm>
|
//#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
#include <cwchar>
|
#include <cwchar>
|
||||||
//#include <stdexcept>
|
//#include <stdexcept>
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ of the License or (at your option) any later version.
|
||||||
// opcodes) but is slower that the direct threaded interpreter by a factor of 2
|
// opcodes) but is slower that the direct threaded interpreter by a factor of 2
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include <graphite2/Segment.h>
|
#include <graphite2/Segment.h>
|
||||||
#include "inc/Machine.h"
|
#include "inc/Machine.h"
|
||||||
#include "inc/Segment.h"
|
#include "inc/Segment.h"
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ of the License or (at your option) any later version.
|
||||||
|
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include "inc/Machine.h"
|
#include "inc/Machine.h"
|
||||||
#include "inc/Segment.h"
|
#include "inc/Segment.h"
|
||||||
#include "inc/Slot.h"
|
#include "inc/Slot.h"
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public
|
||||||
License, as published by the Free Software Foundation, either version 2
|
License, as published by the Free Software Foundation, either version 2
|
||||||
of the License or (at your option) any later version.
|
of the License or (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
#include <cstdio>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "graphite2/Log.h"
|
#include "graphite2/Log.h"
|
||||||
#include "inc/debug.h"
|
#include "inc/debug.h"
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ of the License or (at your option) any later version.
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ of the License or (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstdio>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "graphite2/Font.h"
|
#include "graphite2/Font.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ License, as published by the Free Software Foundation, either version 2
|
||||||
of the License or (at your option) any later version.
|
of the License or (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include "inc/Main.h"
|
#include "inc/Main.h"
|
||||||
#include "inc/List.h"
|
#include "inc/List.h"
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ of the License or (at your option) any later version.
|
||||||
|
|
||||||
#ifndef GRAPHITE2_NFILEFACE
|
#ifndef GRAPHITE2_NFILEFACE
|
||||||
|
|
||||||
#include <cstdio>
|
#include <stdio.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "graphite2/Font.h"
|
#include "graphite2/Font.h"
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ of the License or (at your option) any later version.
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ of the License or (at your option) any later version.
|
||||||
// interface.
|
// interface.
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include <graphite2/Types.h>
|
#include <graphite2/Types.h>
|
||||||
#include "inc/Main.h"
|
#include "inc/Main.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ of the License or (at your option) any later version.
|
||||||
|
|
||||||
#include "inc/Main.h"
|
#include "inc/Main.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdio>
|
#include <stdio.h>
|
||||||
#include "inc/List.h"
|
#include "inc/List.h"
|
||||||
|
|
||||||
namespace graphite2 {
|
namespace graphite2 {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ License, as published by the Free Software Foundation, either version 2
|
||||||
of the License or (at your option) any later version.
|
of the License or (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <cstring>
|
#include <string.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "inc/Main.h"
|
#include "inc/Main.h"
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ of the License or (at your option) any later version.
|
||||||
|
|
||||||
#if !defined GRAPHITE2_NTRACING
|
#if !defined GRAPHITE2_NTRACING
|
||||||
|
|
||||||
#include <cstdio>
|
#include <stdio.h>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include "inc/json.h"
|
#include "inc/json.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,16 +13,16 @@ EXPORTS.graphite2 += [
|
||||||
]
|
]
|
||||||
|
|
||||||
if CONFIG['GNU_CC']:
|
if CONFIG['GNU_CC']:
|
||||||
UNIFIED_SOURCES += [
|
SOURCES += [
|
||||||
'direct_machine.cpp'
|
'direct_machine.cpp'
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
UNIFIED_SOURCES += [
|
SOURCES += [
|
||||||
'call_machine.cpp'
|
'call_machine.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
# This should contain all of the _SOURCES from files.mk, except *_machine.cpp
|
# This should contain all of the _SOURCES from files.mk, except *_machine.cpp
|
||||||
UNIFIED_SOURCES += [
|
SOURCES += [
|
||||||
'CachedFace.cpp',
|
'CachedFace.cpp',
|
||||||
'CmapCache.cpp',
|
'CmapCache.cpp',
|
||||||
'Code.cpp',
|
'Code.cpp',
|
||||||
|
|
@ -44,6 +44,7 @@ UNIFIED_SOURCES += [
|
||||||
'Intervals.cpp',
|
'Intervals.cpp',
|
||||||
'json.cpp',
|
'json.cpp',
|
||||||
'Justifier.cpp',
|
'Justifier.cpp',
|
||||||
|
'NameTable.cpp',
|
||||||
'Pass.cpp',
|
'Pass.cpp',
|
||||||
'Position.cpp',
|
'Position.cpp',
|
||||||
'SegCache.cpp',
|
'SegCache.cpp',
|
||||||
|
|
@ -57,12 +58,6 @@ UNIFIED_SOURCES += [
|
||||||
'UtfCodec.cpp',
|
'UtfCodec.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Excluded from UNIFIED_SOURCES because <cmath> from other files breaks it,
|
|
||||||
# see bug 1272647.
|
|
||||||
SOURCES += [
|
|
||||||
'NameTable.cpp',
|
|
||||||
]
|
|
||||||
|
|
||||||
# tell graphite2 not to export symbols, we'll be linking it directly with
|
# tell graphite2 not to export symbols, we'll be linking it directly with
|
||||||
# thebes
|
# thebes
|
||||||
DEFINES['GRAPHITE2_STATIC'] = True
|
DEFINES['GRAPHITE2_STATIC'] = True
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue