You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adaptation of JDK-8 to build with in-tree freetype (adoptium#4287)
* Initial minimalistic adaptation of 8 to build with in-tree freetype
* Determining free type absed on jdk's 8 tag
the if is to long, will refactor
* Simplified the condition
* The in-tree freetype will appear in 482-b02
* Update sbin/build.sh
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
* No longer building freetype if it exists in sources
* Get rid of relative path
* Aligned modified block to two spaces
* Enforced the freetype switches checks
* Update sbin/prepareWorkspace.sh
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
* Update sbin/prepareWorkspace.sh
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
* Update sbin/prepareWorkspace.sh
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
* Small rephrasing ow errors
* Renamed main freetype methods to match theirs real meaning
setDefaultFreeType->setBundledFreeType
setFreeTypeFromSrcs->setFreeTypeFromExternalSrcs
---------
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
# this is workarounding --strip-components 1 missing on gnu tar
99
+
# it requires absolute tar-filepath as it changes dir and is hardcoded to one
100
+
# similar approach can be used also for zip in future
101
+
# warning! this method do not merge if (parts of!) destination exists.
102
+
unpackGnuAbsPathWithStrip1Component() {
103
+
local tmp=$(mktemp -d)
104
+
pushd"$tmp"> /dev/null
105
+
"$@"
106
+
popd> /dev/null
107
+
mv "$tmp"/*/*.
108
+
mv "$tmp"/*/.*.||echo"no hidden files in tarball"
109
+
rmdir "$tmp"/*
110
+
rmdir "$tmp"
111
+
}
112
+
113
+
untarGnuAbsPathWithStrip1Component() {
114
+
unpackGnuAbsPathWithStrip1Component tar -xf "$@"
115
+
}
116
+
117
+
unzipGnuAbsPathWithStrip1Component() {
118
+
unpackGnuAbsPathWithStrip1Component unzip "$@"
119
+
}
120
+
121
+
unpackFromArchive() {
122
+
echo"Extracting OpenJDK source tarball ${BUILD_CONFIG[OPENJDK_LOCAL_SOURCE_ARCHIVE_ABSPATH]} to $(pwd)/${BUILD_CONFIG[OPENJDK_SOURCE_DIR]} to build the binary"
123
+
# If the tarball contains .git files, they should be ignored later
124
+
pushd"./${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}"
125
+
if [ "${BUILD_CONFIG[OPENJDK_LOCAL_SOURCE_ARCHIVE_ABSPATH]: -4}"==".zip" ] ;then
126
+
echo"Source zip unpacked as if it contains exactly one directory"
if [ -z"${BUILD_CONFIG[FREETYPE_DIRECTORY]}" ];then
598
-
echo"Checking and download FreeType Font dependency"
599
-
checkingAndDownloadingFreeType
600
-
else
601
-
echo""
602
-
echo"---> Skipping the process of checking and downloading the FreeType Font dependency, a pre-built version provided at ${BUILD_CONFIG[FREETYPE_DIRECTORY]} <---"
603
-
echo""
604
-
fi
605
-
;;
606
-
*) echo"Using bundled Freetype" ;;
607
-
esac
712
+
if [ "0${freeTypeInSources}"-ne 0 ] ;then
713
+
if [ -z"${BUILD_CONFIG[FREETYPE_DIRECTORY]}" ];then
714
+
echo"Checking and downloading FreeType Font dependency"
715
+
checkingAndDownloadingFreeType
716
+
else
717
+
echo""
718
+
echo"---> Skipping the process of checking and downloading the FreeType Font dependency, a pre-built version is provided at ${BUILD_CONFIG[FREETYPE_DIRECTORY]} <---"
719
+
echo""
720
+
fi
721
+
else
722
+
echo"Using bundled Freetype"
723
+
fi
608
724
else
609
725
echo"Skipping Freetype"
610
726
fi
@@ -689,9 +805,9 @@ createSourceTagFile(){
689
805
functionconfigureWorkspace() {
690
806
if [[ "${BUILD_CONFIG[ASSEMBLE_EXPLODED_IMAGE]}"!="true" ]];then
691
807
createWorkspace
808
+
checkoutAndCloneOpenJDKGitRepo
692
809
downloadingRequiredDependencies
693
810
relocateToTmpIfNeeded
694
-
checkoutAndCloneOpenJDKGitRepo
695
811
applyPatches
696
812
if [ "${BUILD_CONFIG[CUSTOM_CACERTS]}"="true" ] ;then
0 commit comments