Navigation Menu

Skip to content

Commit

Permalink
8279958: Provide configure hints for Alpine/apk package managers
Browse files Browse the repository at this point in the history
Reviewed-by: goetz
Backport-of: a30aa52b77931bcea38213cf3d243d18a37dc858
  • Loading branch information
Aleksei Voitylov authored and Alexander Scherbatiy committed Mar 31, 2022
1 parent 57faad5 commit 9bedb0f
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions make/autoconf/help.m4
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand All @@ -25,7 +25,7 @@

AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
[
AC_CHECK_PROGS(PKGHANDLER, apt-get yum brew port pkgutil pkgadd)
AC_CHECK_PROGS(PKGHANDLER, apt-get yum brew port pkgutil pkgadd apk)
])

AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
Expand Down Expand Up @@ -54,6 +54,8 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
pkgutil_help $MISSING_DEPENDENCY ;;
pkgadd)
pkgadd_help $MISSING_DEPENDENCY ;;
apk)
apk_help $MISSING_DEPENDENCY ;;
esac
if test "x$PKGHANDLER_COMMAND" != x; then
Expand Down Expand Up @@ -158,6 +160,27 @@ pkgadd_help() {
PKGHANDLER_COMMAND=""
}

apk_help() {
case $1 in
devkit)
PKGHANDLER_COMMAND="sudo apk add alpine-sdk linux-headers" ;;
alsa)
PKGHANDLER_COMMAND="sudo apk add alsa-lib-dev" ;;
cups)
PKGHANDLER_COMMAND="sudo apk add cups-dev" ;;
fontconfig)
PKGHANDLER_COMMAND="sudo apk add fontconfig-dev" ;;
freetype)
PKGHANDLER_COMMAND="sudo apk add freetype-dev" ;;
harfbuzz)
PKGHANDLER_COMMAND="sudo apk add harfbuzz-dev" ;;
x11)
PKGHANDLER_COMMAND="sudo apk add libxtst-dev libxt-dev libxrender-dev libxrandr-dev" ;;
ccache)
PKGHANDLER_COMMAND="sudo apk add ccache" ;;
esac
}

# This function will check if we're called from the "configure" wrapper while
# printing --help. If so, we will print out additional information that can
# only be extracted within the autoconf script, and then exit. This must be
Expand Down

1 comment on commit 9bedb0f

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.