Skip to content

Commit

Permalink
Worked on format version 31 support
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Nov 18, 2024
1 parent 2f02166 commit 87763b4
Show file tree
Hide file tree
Showing 16 changed files with 178 additions and 76 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
- architecture: 'x64'
compiler: 'gcc'
configure_options: ''
- architecture: 'x64'
compiler: 'gcc'
configure_options: '--with-pthread=no'
- architecture: 'x64'
compiler: 'gcc'
configure_options: '--enable-wide-character-type'
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Build from source.
name: build_macos
on: [push, pull_request]
permissions: read-all
jobs:
build_ubuntu:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-12
configure_options: ''
- os: macos-13
configure_options: ''
- os: macos-14
configure_options: ''
- os: macos-15
configure_options: ''
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
brew update -q
brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true
brew link --force gettext
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
- name: Building from source
env:
CC: ${{ matrix.compiler }}
run: |
tests/build.sh ${{ matrix.configure_options }}
- name: Run tests
run: |
tests/runtests.sh
3 changes: 3 additions & 0 deletions .github/workflows/build_shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
strategy:
matrix:
include:
- architecture: 'x64'
compiler: 'gcc'
configure_options: ''
- architecture: 'x64'
compiler: 'gcc'
configure_options: '--enable-wide-character-type'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ jobs:
strategy:
matrix:
include:
- python-version: '3.7'
toxenv: 'py37'
- python-version: '3.8'
toxenv: 'py38'
- python-version: '3.9'
Expand All @@ -20,6 +18,8 @@ jobs:
toxenv: 'py311'
- python-version: '3.12'
toxenv: 'py312'
- python-version: '3.13'
toxenv: 'py313'
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
Expand Down
38 changes: 25 additions & 13 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,23 @@ environment:
PYTHON_PATH: "C:\\Python311-x64"
- TARGET: macos-x64-clang
BUILD_ENVIRONMENT: xcode
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
HOMEBREW_NO_INSTALL_CLEANUP: 1
CC: clang
CFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CONFIGURE_OPTIONS: ""
- TARGET: macos-x64-gcc
BUILD_ENVIRONMENT: xcode
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
HOMEBREW_NO_INSTALL_CLEANUP: 1
CC: gcc
CFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CONFIGURE_OPTIONS: ""
- TARGET: macos-x64-gcc-python
BUILD_ENVIRONMENT: xcode
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
PYTHON: "/usr/local/opt/python@3.11/bin/python3"
PYTHON_CONFIG: "/usr/local/opt/python@3.11/bin/python3-config"
HOMEBREW_NO_INSTALL_CLEANUP: 1
Expand All @@ -107,7 +107,7 @@ environment:
CONFIGURE_OPTIONS: "--enable-python"
- TARGET: macos-pkgbuild
BUILD_ENVIRONMENT: xcode
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
PYTHON: "/usr/local/opt/python@3.11/bin/python3"
PYTHON_CONFIG: "/usr/local/opt/python@3.11/bin/python3-config"
HOMEBREW_NO_INSTALL_CLEANUP: 1
Expand Down Expand Up @@ -175,36 +175,48 @@ environment:
PYTHON: "C:\\Python312-x64\\python.exe"
PYTHON_VERSION: 3.12
TOXENV: py312
- TARGET: macos-tox-py38
- TARGET: windows-tox-py313-32bit
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHON_VERSION: 3.8
TOXENV: py38
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
PYTHON: "C:\\Python313\\python.exe"
PYTHON_VERSION: 3.13
TOXENV: py313
- TARGET: windows-tox-py313-64bit
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
PYTHON: "C:\\Python313-x64\\python.exe"
PYTHON_VERSION: 3.13
TOXENV: py313
- TARGET: macos-tox-py39
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHON_VERSION: 3.9
TOXENV: py39
- TARGET: macos-tox-py310
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHON_VERSION: 3.10
TOXENV: py310
- TARGET: macos-tox-py311
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHON_VERSION: 3.11
TOXENV: py311
- TARGET: macos-tox-py312
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHON_VERSION: 3.12
TOXENV: py312
- TARGET: macos-tox-py313
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHON_VERSION: 3.13
TOXENV: py313
- TARGET: linux-tox-py310
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2204
Expand Down
6 changes: 3 additions & 3 deletions autogen.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Script to generate the necessary files for a msvscpp build
#
# Version: 20240306
# Version: 20241014

$WinFlex = "..\win_flex_bison\win_flex.exe"
$WinBison = "..\win_flex_bison\win_bison.exe"

$Library = Get-Content -Path configure.ac | select -skip 3 -first 1 | % { $_ -Replace " \[","" } | % { $_ -Replace "\],","" }
$Version = Get-Content -Path configure.ac | select -skip 4 -first 1 | % { $_ -Replace " \[","" } | % { $_ -Replace "\],","" }
$Library = Get-Content -Path configure.ac | select -skip 3 -first 1 | % { $_ -Replace " \[","" } | % { $_ -Replace "\],","" }
$Version = Get-Content -Path configure.ac | select -skip 4 -first 1 | % { $_ -Replace " \[","" } | % { $_ -Replace "\],","" }
$Prefix = ${Library}.Substring(3)

Get-Content -Path "include\${Library}.h.in" | Out-File -Encoding ascii "include\${Library}.h"
Expand Down
29 changes: 15 additions & 14 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
#!/bin/sh
# Script to generate ./configure using the autotools
# Script to generate configure and Makefile using the autotools.
#
# Version: 20230405
# Version: 20241013

EXIT_SUCCESS=0;
EXIT_FAILURE=1;

BINDIR="/usr/bin";
BINDIR=`which aclocal`;
BINDIR=`dirname ${BINDIR}`;

if ! test -x "${BINDIR}/aclocal";
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/usr/bin";
then
BINDIR="/usr/local/bin";
BINDIR="/usr/bin";
fi
if ! test -x "${BINDIR}/aclocal";
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/usr/local/bin";
then
BINDIR="/usr/local/bin";
fi
if ! test -x "${BINDIR}/aclocal";
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/opt/local/bin";
then
# Default location of MacPorts installed binaries.
BINDIR="/opt/local/bin";
fi
if ! test -x "${BINDIR}/aclocal";
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/opt/homebrew/bin";
then
# Default location of Homebrew installed binaries.
BINDIR="/opt/homebrew/bin";
fi
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/mingw32/bin";
then
# Default location of 32-bit MSYS2-MinGW installed binaries.
BINDIR="/mingw32/bin";
fi
if ! test -x "${BINDIR}/aclocal";
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/mingw64/bin";
then
# Default location of 64-bit MSYS2-MinGW installed binaries.
BINDIR="/mingw64/bin";
Expand Down Expand Up @@ -91,35 +97,30 @@ else

exit ${EXIT_FAILURE};
fi

if ! test -x "${AUTOCONF}";
then
echo "Unable to find: autoconf";

exit ${EXIT_FAILURE};
fi

if ! test -x "${AUTOHEADER}";
then
echo "Unable to find: autoheader";

exit ${EXIT_FAILURE};
fi

if ! test -x "${AUTOMAKE}";
then
echo "Unable to find: automake";

exit ${EXIT_FAILURE};
fi

if ! test -x "${AUTOPOINT}";
then
echo "Unable to find: autopoint";

exit ${EXIT_FAILURE};
fi

if ! test -x "${LIBTOOLIZE}";
then
echo "Unable to find: libtoolize";
Expand Down
26 changes: 13 additions & 13 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
AC_PREREQ([2.71])

AC_INIT(
[libscca],
[20240821],
[joachim.metz@gmail.com])
[libscca],
[20241118],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
[include/libscca.h.in])
[include/libscca.h.in])

AM_INIT_AUTOMAKE([gnu 1.6 tar-ustar])
AM_EXTRA_RECURSIVE_TARGETS([sources splint])
Expand Down Expand Up @@ -146,21 +146,21 @@ CFLAGS="$CFLAGS -Wall";

dnl Check if requires and build requires should be set in spec file
AS_IF(
[test "x$ac_cv_libcerror" = xyes || test "x$ac_cv_libcthreads" = xyes || test "x$ac_cv_libcdata" = xyes || test "x$ac_cv_libclocale" = xyes || test "x$ac_cv_libcnotify" = xyes || test "x$ac_cv_libcsplit" = xyes || test "x$ac_cv_libuna" = xyes || test "x$ac_cv_libcfile" = xyes || test "x$ac_cv_libcpath" = xyes || test "x$ac_cv_libbfio" = xyes || test "x$ac_cv_libfcache" = xyes || test "x$ac_cv_libfdata" = xyes || test "x$ac_cv_libfdatetime" = xyes || test "x$ac_cv_libfvalue" = xyes || test "x$ac_cv_libfwnt" = xyes],
[AC_SUBST(
[libscca_spec_requires],
[Requires:])
])
[test "x$ac_cv_libcerror" = xyes || test "x$ac_cv_libcthreads" = xyes || test "x$ac_cv_libcdata" = xyes || test "x$ac_cv_libclocale" = xyes || test "x$ac_cv_libcnotify" = xyes || test "x$ac_cv_libcsplit" = xyes || test "x$ac_cv_libuna" = xyes || test "x$ac_cv_libcfile" = xyes || test "x$ac_cv_libcpath" = xyes || test "x$ac_cv_libbfio" = xyes || test "x$ac_cv_libfcache" = xyes || test "x$ac_cv_libfdata" = xyes || test "x$ac_cv_libfdatetime" = xyes || test "x$ac_cv_libfvalue" = xyes || test "x$ac_cv_libfwnt" = xyes],
[AC_SUBST(
[libscca_spec_requires],
[Requires:])
])

dnl Set the date for the dpkg files
AC_SUBST(
[DPKG_DATE],
[`date -R 2> /dev/null`])
[DPKG_DATE],
[`date -R 2> /dev/null`])

dnl Set the date for the spec file
AC_SUBST(
[SPEC_DATE],
[`date +"%a %b %e %Y" 2> /dev/null`])
[SPEC_DATE],
[`date +"%a %b %e %Y" 2> /dev/null`])

dnl Generate Makefiles
AC_CONFIG_FILES([Makefile])
Expand Down
Loading

0 comments on commit 87763b4

Please sign in to comment.