forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
harfbuzz: check in harfbuzz-ng, add gyp define to use it
This checks in harbuzz-ng b0d396aa88b3cdf8cea896bfeeba197656e1cdb1. Setting use_harfbuzz_ng to 1 in gyp will cause us to build harfbuzz-ng in place of harfbuzz. So far this currently fails to compile due to all our other code relying on the old API. BUG=68551 TEST=./build/gyp_chromium -Duse_harfbuzz_ng=1, verify build breaks Review URL: http://codereview.chromium.org/6052008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70539 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
evan@chromium.org
committed
Jan 5, 2011
1 parent
678a7d7
commit 29c2dae
Showing
65 changed files
with
14,955 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
HarfBuzz is licensed under the so-called "Old MIT" license. Details follow. | ||
|
||
Copyright (C) 2010 Google, Inc. | ||
Copyright (C) 2006 Behdad Esfahbod | ||
Copyright (C) 2009 Keith Stribley | ||
Copyright (C) 2009 Martin Hosken and SIL International | ||
Copyright (C) 2007 Chris Wilson | ||
Copyright (C) 2004,2007,2008,2009,2010 Red Hat, Inc. | ||
Copyright (C) 1998-2004 David Turner and Werner Lemberg | ||
For full copyright notices consult the individual files in the package. | ||
|
||
|
||
Permission is hereby granted, without written agreement and without | ||
license or royalty fees, to use, copy, modify, and distribute this | ||
software and its documentation for any purpose, provided that the | ||
above copyright notice and the following two paragraphs appear in | ||
all copies of this software. | ||
|
||
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR | ||
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES | ||
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN | ||
IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH | ||
DAMAGE. | ||
|
||
THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, | ||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS | ||
ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO | ||
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
This is HarfBuzz, a text shaping library. | ||
|
||
Bug reports on these files should be sent to the HarfBuzz mailing list as | ||
listed on http://harfbuzz.org/ | ||
|
||
For license information, see the file COPYING. | ||
|
||
Behdad Esfahbod | ||
18 November 2010 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Name: HarfBuzz | ||
URL: http://freedesktop.org/wiki/Software/HarfBuzz | ||
|
||
This is harfbuzz-ng, a new implementation of harfbuzz with a different | ||
API from the old one. | ||
|
||
This code was taken from b0d396aa88b3cdf8cea896bfeeba197656e1cdb1 | ||
(git://anongit.freedesktop.org/harfbuzz). I also deleted all | ||
unneeded files from the root directory (but left src/ alone). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Copyright (c) 2009 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
{ | ||
'targets': [ | ||
{ | ||
'target_name': 'harfbuzz', | ||
'type': '<(library)', | ||
'sources': [ | ||
'src/hb-blob-private.h', | ||
'src/hb-blob.c', | ||
'src/hb-blob.h', | ||
'src/hb-buffer-private.hh', | ||
'src/hb-buffer.cc', | ||
'src/hb-buffer.h', | ||
'src/hb-common.c', | ||
'src/hb-common.h', | ||
'src/hb-font-private.h', | ||
'src/hb-font.cc', | ||
'src/hb-font.h', | ||
'src/hb-ft.c', | ||
'src/hb-icu.c', | ||
'src/hb-language.c', | ||
'src/hb-language.h', | ||
'src/hb-object-private.h', | ||
'src/hb-open-file-private.hh', | ||
'src/hb-open-type-private.hh', | ||
'src/hb-ot-head-private.hh', | ||
'src/hb-ot-layout-common-private.hh', | ||
'src/hb-ot-layout-gdef-private.hh', | ||
'src/hb-ot-layout-gpos-private.hh', | ||
'src/hb-ot-layout-gsub-private.hh', | ||
'src/hb-ot-layout-gsubgpos-private.hh', | ||
'src/hb-ot-layout-private.hh', | ||
'src/hb-ot-layout.cc', | ||
'src/hb-ot-map-private.hh', | ||
'src/hb-ot-map.cc', | ||
'src/hb-ot-shape-complex-arabic-table.h', | ||
'src/hb-ot-shape-complex-arabic.cc', | ||
'src/hb-ot-shape-complex-private.hh', | ||
'src/hb-ot-shape-private.hh', | ||
'src/hb-ot-shape.cc', | ||
'src/hb-ot-tag.c', | ||
'src/hb-private.h', | ||
'src/hb-shape.cc', | ||
'src/hb-shape.h', | ||
'src/hb-unicode-private.h', | ||
'src/hb-unicode.c', | ||
'src/hb-unicode.h', | ||
'src/hb.h', | ||
], | ||
'include_dirs': [ | ||
'src', | ||
], | ||
'direct_dependent_settings': { | ||
'include_dirs': [ | ||
'src', | ||
], | ||
}, | ||
'dependencies': [ | ||
'../../build/linux/system.gyp:freetype2', | ||
'../../third_party/icu/icu.gyp:icuuc', | ||
], | ||
}, | ||
], | ||
} | ||
|
||
# Local Variables: | ||
# tab-width:2 | ||
# indent-tabs-mode:nil | ||
# End: | ||
# vim: set expandtab tabstop=2 shiftwidth=2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
# Process this file with automake to produce Makefile.in | ||
|
||
NULL = | ||
EXTRA_DIST = | ||
|
||
# The following warning options are useful for debugging: -Wpadded -Wcast-align | ||
#AM_CXXFLAGS = | ||
|
||
lib_LTLIBRARIES = libharfbuzz.la | ||
|
||
HBCFLAGS = | ||
HBLIBS = | ||
HBSOURCES = \ | ||
hb-blob.c \ | ||
hb-blob-private.h \ | ||
hb-buffer.cc \ | ||
hb-buffer-private.hh \ | ||
hb-common.c \ | ||
hb-font.cc \ | ||
hb-font-private.h \ | ||
hb-object-private.h \ | ||
hb-open-file-private.hh \ | ||
hb-open-type-private.hh \ | ||
hb-language.c \ | ||
hb-ot-head-private.hh \ | ||
hb-private.h \ | ||
hb-shape.cc \ | ||
hb-unicode.c \ | ||
hb-unicode-private.h \ | ||
$(NULL) | ||
HBHEADERS = \ | ||
hb.h \ | ||
hb-blob.h \ | ||
hb-buffer.h \ | ||
hb-common.h \ | ||
hb-font.h \ | ||
hb-language.h \ | ||
hb-shape.h \ | ||
hb-unicode.h \ | ||
$(NULL) | ||
|
||
HBSOURCES += \ | ||
hb-ot-layout.cc \ | ||
hb-ot-layout-common-private.hh \ | ||
hb-ot-layout-gdef-private.hh \ | ||
hb-ot-layout-gpos-private.hh \ | ||
hb-ot-layout-gsubgpos-private.hh \ | ||
hb-ot-layout-gsub-private.hh \ | ||
hb-ot-layout-private.hh \ | ||
hb-ot-map.cc \ | ||
hb-ot-map-private.hh \ | ||
hb-ot-shape.cc \ | ||
hb-ot-shape-complex-arabic.cc \ | ||
hb-ot-shape-complex-arabic-table.h \ | ||
hb-ot-shape-complex-private.hh \ | ||
hb-ot-shape-private.hh \ | ||
hb-ot-tag.c \ | ||
$(NULL) | ||
HBHEADERS += \ | ||
hb-ot.h \ | ||
hb-ot-layout.h \ | ||
hb-ot-shape.h \ | ||
hb-ot-tag.h \ | ||
$(NULL) | ||
|
||
if HAVE_GLIB | ||
HBCFLAGS += $(GLIB_CFLAGS) | ||
HBLIBS += $(GLIB_LIBS) | ||
HBSOURCES += \ | ||
hb-glib.c \ | ||
$(NULL) | ||
HBHEADERS += \ | ||
hb-glib.h \ | ||
$(NULL) | ||
endif | ||
|
||
if HAVE_ICU | ||
HBCFLAGS += $(ICU_CFLAGS) | ||
HBLIBS += $(ICU_LIBS) | ||
HBSOURCES += \ | ||
hb-icu.c \ | ||
$(NULL) | ||
HBHEADERS += \ | ||
hb-icu.h \ | ||
$(NULL) | ||
endif | ||
|
||
if HAVE_FREETYPE | ||
HBCFLAGS += $(FREETYPE_CFLAGS) | ||
HBLIBS += $(FREETYPE_LIBS) | ||
HBSOURCES += \ | ||
hb-ft.c \ | ||
$(NULL) | ||
HBHEADERS += \ | ||
hb-ft.h \ | ||
$(NULL) | ||
endif | ||
|
||
if HAVE_GRAPHITE | ||
HBCFLAGS += $(GRAPHITE_CFLAGS) | ||
HBLIBS += $(GRAPHITE_LIBS) | ||
HBSOURCES += \ | ||
hb-graphite.cc \ | ||
$(NULL) | ||
HBHEADERS += \ | ||
hb-graphite.h \ | ||
$(NULL) | ||
endif | ||
|
||
CXXLINK = $(LINK) | ||
libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS) | ||
libharfbuzz_la_CPPFLAGS = $(HBCFLAGS) | ||
libharfbuzz_la_LIBADD = $(HBLIBS) | ||
pkginclude_HEADERS = $(HBHEADERS) | ||
|
||
|
||
GENERATORS = \ | ||
gen-arabic-joining-table.py \ | ||
$(NULL) | ||
|
||
EXTRA_DIST += $(GENERATORS) | ||
|
||
noinst_PROGRAMS = main test | ||
|
||
main_SOURCES = main.cc | ||
main_CPPFLAGS = $(HBCFLAGS) | ||
main_LDADD = libharfbuzz.la $(HBLIBS) | ||
|
||
test_SOURCES = test.c | ||
test_CPPFLAGS = $(HBCFLAGS) | ||
test_LDADD = libharfbuzz.la $(HBLIBS) | ||
|
||
TESTS = \ | ||
check-c-linkage-decls.sh \ | ||
check-header-guards.sh \ | ||
check-internal-symbols.sh \ | ||
$(NULL) | ||
|
||
if HAVE_ICU | ||
else | ||
if HAVE_GRAPHITE | ||
else | ||
TESTS += check-libstdc++.sh | ||
endif | ||
endif | ||
|
||
-include $(top_srcdir)/git.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
LC_ALL=C | ||
export LC_ALL | ||
|
||
test -z "$srcdir" && srcdir=. | ||
stat=0 | ||
|
||
cd "$srcdir" | ||
|
||
for x in hb-*.c hb-*.cc hb-*.h hb-*.hh ; do | ||
if ! grep -q HB_BEGIN_DECLS "$x" || ! grep -q HB_END_DECLS "$x"; then | ||
echo "Ouch, file $x does not HB_BEGIN_DECLS / HB_END_DECLS" | ||
stat=1 | ||
fi | ||
done | ||
|
||
exit $stat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
LC_ALL=C | ||
export LC_ALL | ||
|
||
test -z "$srcdir" && srcdir=. | ||
stat=0 | ||
|
||
cd "$srcdir" | ||
|
||
for x in hb-*.h hb-*.hh ; do | ||
tag=`echo "$x" | tr 'a-z.-' 'A-Z_'` | ||
lines=`grep "\<$tag\>" "$x" | wc -l` | ||
if test "x$lines" != x3; then | ||
echo "Ouch, header file $x does not have correct preprocessor guards" | ||
stat=1 | ||
fi | ||
done | ||
|
||
exit $stat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
LC_ALL=C | ||
export LC_ALL | ||
|
||
if which nm 2>/dev/null >/dev/null; then | ||
: | ||
else | ||
echo "check-internal-symbols.sh: 'nm' not found; skipping test" | ||
exit 0 | ||
fi | ||
|
||
test -z "$srcdir" && srcdir=. | ||
test -z "$MAKE" && MAKE=make | ||
stat=0 | ||
|
||
so=.libs/libharfbuzz.so | ||
if test -f "$so"; then | ||
echo "Checking that we are exposing internal symbols" | ||
if nm $so | grep ' T ' | grep -v ' T _fini\>\| T _init\>\| T hb_'; then | ||
echo "Ouch, internal symbols exposed" | ||
stat=1 | ||
fi | ||
else | ||
echo "check-internal-symbols.sh: libharfbuzz.so not found; skipping test" | ||
fi | ||
|
||
exit $stat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
LC_ALL=C | ||
export LC_ALL | ||
|
||
if which ldd 2>/dev/null >/dev/null; then | ||
: | ||
else | ||
echo "check-libstdc++.sh: 'ldd' not found; skipping test" | ||
exit 0 | ||
fi | ||
|
||
test -z "$srcdir" && srcdir=. | ||
stat=0 | ||
|
||
so=.libs/libharfbuzz.so | ||
if test -f "$so"; then | ||
echo "Checking that we are not linking to libstdc++" | ||
if ldd $so | grep 'libstdc[+][+]'; then | ||
echo "Ouch, linked to libstdc++" | ||
stat=1 | ||
fi | ||
else | ||
echo "check-libstdc++.sh: libharfbuzz.so not found; skipping test" | ||
fi | ||
|
||
exit $stat |
Oops, something went wrong.