Skip to content

Commit

Permalink
Add freebsd support to build scripts (adoptium#1388)
Browse files Browse the repository at this point in the history
* intial freebsd port support

* change branch

* temp switch to gdams

* pass path to fontconfig

* add alsa include

* revert to battleblow repo

* skip marker on freebsd

* improve branch safety check on freebsd

* add x libs

* add cups lib

* switch repo to use official freebsd repo
  • Loading branch information
gdams authored and karianna committed Nov 25, 2019
1 parent 8957948 commit cd543d3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions build-farm/platform-specific-configurations/freebsd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

################################################################################
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=sbin/common/constants.sh
source "$SCRIPT_DIR/../../sbin/common/constants.sh"

export BUILD_ARGS="${BUILD_ARGS} -r https://github.com/FreeBSD/openjdk-${JAVA_TO_BUILD}"

export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-toolchain-type=clang --with-fontconfig=/usr/local --with-alsa=/usr/local --x-includes=/usr/local/include --x-libraries=/usr/local/lib --with-cups=/usr/local"
4 changes: 2 additions & 2 deletions sbin/prepareWorkspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ checkoutAndCloneOpenJDKGitRepo()
git reset --hard "origin/${BUILD_CONFIG[BRANCH]}"
fi

if [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_HOTSPOT}" ]] && [[ "${BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]}" -ge 11 ]] ; then
if [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_HOTSPOT}" ]] && [[ "${BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]}" -ge 11 ]]; then
# Verify Adopt patches tag is being built, otherwise we may be accidently just building "raw" OpenJDK
if [ ! -f "${ADOPTOPENJDK_MD_MARKER_FILE}" ] && [ "${BUILD_CONFIG[DISABLE_ADOPT_BRANCH_SAFETY]}" == "false" ]; then
echo "${ADOPTOPENJDK_MD_MARKER_FILE} marker file not found in fetched source to be built, this may mean the wrong SCMReference build parameter has been specified. Ensure the correct AdoptOpenJDK patch release tag is specified, eg.for build jdk-11.0.4+10, it would be jdk-11.0.4+10_adopt"
exit 1
fi
fi
fi

git clean -ffdx
Expand Down

0 comments on commit cd543d3

Please sign in to comment.