From b39c12f3517505bd85416e3e9a6ae0af9233a239 Mon Sep 17 00:00:00 2001
From: Koichiro Iwao
Date: Thu, 8 Feb 2024 14:30:10 +0900
Subject: [PATCH] Update astyle to 3.4.12
as astyle 3.1 is no longer available in the latest FreeBSD.
Also, astyle upstream repository has been moved to GitLab. Switched git
to obtain astyle source.
https://gitlab.com/saalen/astyle
---
.github/workflows/build.yml | 4 ++--
scripts/install_astyle.sh | 11 +++++++----
scripts/run_astyle.sh | 2 +-
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 381d7ac2..a7844013 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -194,8 +194,8 @@ jobs:
CC: gcc
# This is required to use a version of astyle other than that
# supplied with the operating system
- ASTYLE_VER: 3.1
- ASTYLE_REPO: https://svn.code.sf.net/p/astyle/code/tags
+ ASTYLE_VER: 3.4.12
+ ASTYLE_REPO: https://gitlab.com/saalen/astyle.git
steps:
# Set steps.os.outputs.image to the specific OS (e.g. 'ubuntu20')
- name: Get operating system name and version.
diff --git a/scripts/install_astyle.sh b/scripts/install_astyle.sh
index 8601e51f..41fb7aaf 100755
--- a/scripts/install_astyle.sh
+++ b/scripts/install_astyle.sh
@@ -15,8 +15,8 @@ INSTALL_ROOT=~/astyle.local
# ----------------------------------------------------------------------------
usage()
{
- echo "** Usage: $0 "
- echo " e.g. $0 https://svn.code.sf.net/p/astyle/code/tags 3.1"
+ echo "** Usage: $0 "
+ echo " e.g. $0 https://gitlab.com/saalen/astyle.git 3.4.12"
} >&2
# ----------------------------------------------------------------------------
@@ -80,9 +80,12 @@ fi
# Put everything in this directory
FILESDIR=$INSTALL_ROOT/$ASTYLE_VER
- svn checkout ${REPO_URL}/${ASTYLE_VER}/AStyle "$workdir"
-
+ git clone --sparse ${REPO_URL} "$workdir"
cd "$workdir"
+ git sparse-checkout set AStyle
+ git checkout tags/${ASTYLE_VER}
+
+ cd "AStyle"
make_args="DESTDIR=$FILESDIR"
diff --git a/scripts/run_astyle.sh b/scripts/run_astyle.sh
index 7df6117c..43b47e4c 100755
--- a/scripts/run_astyle.sh
+++ b/scripts/run_astyle.sh
@@ -7,7 +7,7 @@
# Note: the script must be run from the root directory of the xrdp repository
INSTALL_ROOT=~/astyle.local
-ASTYLE_FROM_XRDP=$INSTALL_ROOT/3.1/usr/bin/astyle
+ASTYLE_FROM_XRDP=$INSTALL_ROOT/3.4.12/usr/bin/astyle
MIN_ASTYLE_VER="3.1"
# ----------------------------------------------------------------------------