Skip to content

Commit 58ff4ee

Browse files
committed
8193017: Import freetype sources into OpenJDK source tree
Reviewed-by: erikj, ihse, serb
1 parent 10ced3a commit 58ff4ee

File tree

322 files changed

+162446
-497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

322 files changed

+162446
-497
lines changed

doc/building.html

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ <h3 id="windows">Windows</h3>
191191
<p>Windows XP is not a supported platform, but all newer Windows should be able to build OpenJDK.</p>
192192
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
193193
<p>Windows is the only non-POSIX OS supported by OpenJDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. For OpenJDK 9, the only supported such layer is Cygwin. (Msys is no longer supported due to a too old bash; msys2 and the new Windows Subsystem for Linux (WSL) would likely be possible to support in a future version but that would require a community effort to implement.)</p>
194-
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/hg/jdk9/Makefile</code> rather than <code>C:\hg\jdk9\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-freetype=/cygdrive/c/freetype</code> rather than <code>--with-freetype=c:\freetype</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
194+
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/hg/jdk9/Makefile</code> rather than <code>C:\hg\jdk9\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
195195
<h4 id="cygwin">Cygwin</h4>
196196
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment is thus required for building OpenJDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.</p>
197197
<p><strong>Note:</strong> Cygwin has a model of continuously updating all packages without any easy way to install or revert to a specific version of a package. This means that whenever you add or update a package in Cygwin, you might (inadvertently) update tools that are used by the OpenJDK build process, and that can cause unexpected build problems.</p>
@@ -372,22 +372,13 @@ <h2 id="external-library-requirements">External Library Requirements</h2>
372372
<p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-&lt;LIB&gt;=&lt;path&gt;</code> or <code>--with-&lt;LIB&gt;-include=&lt;path to include&gt; --with-&lt;LIB&gt;-lib=&lt;path to lib&gt;</code>. The first variant is more concise, but require the include files an library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
373373
<p>As a fallback, the second version allows you to point to the include directory and the lib directory separately.</p>
374374
<h3 id="freetype">FreeType</h3>
375-
<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is required on all platforms. At least version 2.3 is required.</p>
375+
<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is not required on any platform. The exception is on Unix-based platforms when configuring such that the build artifacts will reference a system installed library, rather than bundling OpenJDK's own copy.</p>
376376
<ul>
377-
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libcups2-dev</code>.</li>
378-
<li>To install on an rpm-based Linux, try running <code>sudo yum install cups-devel</code>.</li>
377+
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libfreetype6-dev</code>.</li>
378+
<li>To install on an rpm-based Linux, try running <code>sudo yum install freetype-devel</code>.</li>
379379
<li>To install on Solaris, try running <code>pkg install system/library/freetype-2</code>.</li>
380-
<li>To install on macOS, try running <code>brew install freetype</code>.</li>
381-
<li>To install on Windows, see <a href="#building-freetype-on-windows">below</a>.</li>
382380
</ul>
383-
<p>Use <code>--with-freetype=&lt;path&gt;</code> if <code>configure</code> does not properly locate your FreeType files.</p>
384-
<h4 id="building-freetype-on-windows">Building FreeType on Windows</h4>
385-
<p>On Windows, there is no readily available compiled version of FreeType. OpenJDK can help you compile FreeType from source. Download the FreeType sources and unpack them into an arbitrary directory:</p>
386-
<pre><code>wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
387-
tar -xzf freetype-2.5.3.tar.gz</code></pre>
388-
<p>Then run <code>configure</code> with <code>--with-freetype-src=&lt;freetype_src&gt;</code>. This will automatically build the freetype library into <code>&lt;freetype_src&gt;/lib64</code> for 64-bit builds or into <code>&lt;freetype_src&gt;/lib32</code> for 32-bit builds. Afterwards you can always use <code>--with-freetype-include=&lt;freetype_src&gt;/include</code> and <code>--with-freetype-lib=&lt;freetype_src&gt;/lib[32|64]</code> for other builds.</p>
389-
<p>Alternatively you can unpack the sources like this to use the default directory:</p>
390-
<pre><code>tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz</code></pre>
381+
<p>Use <code>--with-freetype-include=&lt;path&gt;</code> and <code>--with-freetype-lib=&lt;path&gt;</code> if <code>configure</code> does not automatically locate the platform FreeType files.</p>
391382
<h3 id="cups">CUPS</h3>
392383
<p>CUPS, <a href="http://www.cups.org">Common UNIX Printing System</a> header files are required on all platforms, except Windows. Often these files are provided by your operating system.</p>
393384
<ul>

doc/building.md

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ require a community effort to implement.)
173173
Internally in the build system, all paths are represented as Unix-style paths,
174174
e.g. `/cygdrive/c/hg/jdk9/Makefile` rather than `C:\hg\jdk9\Makefile`. This
175175
rule also applies to input to the build system, e.g. in arguments to
176-
`configure`. So, use `--with-freetype=/cygdrive/c/freetype` rather than
177-
`--with-freetype=c:\freetype`. For details on this conversion, see the section
176+
`configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than
177+
`--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
178178
on [Fixpath](#fixpath).
179179

180180
#### Cygwin
@@ -444,43 +444,19 @@ and the lib directory separately.
444444

445445
### FreeType
446446

447-
FreeType2 from [The FreeType Project](http://www.freetype.org/) is required on
448-
all platforms. At least version 2.3 is required.
447+
FreeType2 from [The FreeType Project](http://www.freetype.org/) is not required
448+
on any platform. The exception is on Unix-based platforms when configuring such
449+
that the build artifacts will reference a system installed library,
450+
rather than bundling OpenJDK's own copy.
449451

450452
* To install on an apt-based Linux, try running `sudo apt-get install
451-
libcups2-dev`.
453+
libfreetype6-dev`.
452454
* To install on an rpm-based Linux, try running `sudo yum install
453-
cups-devel`.
455+
freetype-devel`.
454456
* To install on Solaris, try running `pkg install system/library/freetype-2`.
455-
* To install on macOS, try running `brew install freetype`.
456-
* To install on Windows, see [below](#building-freetype-on-windows).
457-
458-
Use `--with-freetype=<path>` if `configure` does not properly locate your
459-
FreeType files.
460-
461-
#### Building FreeType on Windows
462-
463-
On Windows, there is no readily available compiled version of FreeType. OpenJDK
464-
can help you compile FreeType from source. Download the FreeType sources and
465-
unpack them into an arbitrary directory:
466-
467-
```
468-
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
469-
tar -xzf freetype-2.5.3.tar.gz
470-
```
471-
472-
Then run `configure` with `--with-freetype-src=<freetype_src>`. This will
473-
automatically build the freetype library into `<freetype_src>/lib64` for 64-bit
474-
builds or into `<freetype_src>/lib32` for 32-bit builds. Afterwards you can
475-
always use `--with-freetype-include=<freetype_src>/include` and
476-
`--with-freetype-lib=<freetype_src>/lib[32|64]` for other builds.
477457

478-
Alternatively you can unpack the sources like this to use the default
479-
directory:
480-
481-
```
482-
tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz
483-
```
458+
Use `--with-freetype-include=<path>` and `--with-freetype-lib=<path>`
459+
if `configure` does not automatically locate the platform FreeType files.
484460

485461
### CUPS
486462

make/autoconf/help.m4

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
3131
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
3232
[
3333
# Print a helpful message on how to acquire the necessary build dependency.
34-
# $1 is the help tag: freetype, cups, alsa etc
34+
# $1 is the help tag: cups, alsa etc
3535
MISSING_DEPENDENCY=$1
3636
3737
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -76,24 +76,6 @@ cygwin_help() {
7676
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
7777
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
7878
;;
79-
freetype)
80-
HELP_MSG="
81-
The freetype library can now be build during the configure process.
82-
Download the freetype sources and unpack them into an arbitrary directory:
83-
84-
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
85-
tar -xzf freetype-2.5.3.tar.gz
86-
87-
Then run configure with '--with-freetype-src=<freetype_src>'. This will
88-
automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
89-
builds or into '<freetype_src>/lib32' for 32-bit builds.
90-
Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
91-
and '--with-freetype-lib=<freetype_src>/lib[32|64]' for other builds.
92-
93-
Alternatively you can unpack the sources like this to use the default directory:
94-
95-
tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
96-
;;
9779
esac
9880
}
9981

0 commit comments

Comments
 (0)