Skip to content

Commit

Permalink
Merge pull request #59 from PerryWerneck/develop
Browse files Browse the repository at this point in the history
Changing to meson build system
  • Loading branch information
PerryWerneck authored Jan 21, 2025
2 parents b19c4cc + b81963f commit 1d904bc
Show file tree
Hide file tree
Showing 133 changed files with 3,092 additions and 2,327 deletions.
69 changes: 40 additions & 29 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,79 +9,90 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: "CodeQL Advanced"

on:
push:
branches: [ "develop", "master" ]
branches: [ "master", "develop", "meson" ]
pull_request:
branches: [ "master" ]

jobs:
analyze:
name: Analyze
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ubuntu-22.04
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: 'ubuntu-24.04'
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
language: [ 'c-cpp' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

include:
- language: c-cpp
build-mode: autobuild
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Packages
run: |
echo 'deb https://download.opensuse.org/repositories/home:/PerryWerneck:/udjat/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/home:PerryWerneck:udjat.list
curl -fsSL https://download.opensuse.org/repositories/home:/PerryWerneck:/udjat/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_PerryWerneck_udjat.gpg > /dev/null
echo 'deb https://download.opensuse.org/repositories/home:/PerryWerneck:/udjat/xUbuntu_24.04/ /' | sudo tee /etc/apt/sources.list.d/home:PerryWerneck:udjat.list
curl -fsSL https://download.opensuse.org/repositories/home:/PerryWerneck:/udjat/xUbuntu_24.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_PerryWerneck_udjat.gpg > /dev/null
sudo apt-get update
sudo apt-get install --yes make autotools-dev autoconf automake pkg-config gettext libssl-dev libcurl4-openssl-dev
sudo apt-get install --yes meson pkg-config python3-dev pkg-config gettext libssl-dev libcurl4-openssl-dev
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

12 changes: 4 additions & 8 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ jobs:
- name: Install Pre reqs
run: |
brew update
brew install xz automake binutils coreutils curl gettext libtool openssl pkgconfig
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
find /usr/local/lib/node_modules/npm -delete
rm -f /usr/local/bin/go || true
rm -f /usr/local/bin/gofmt || true
brew install xz meson ninja curl gettext openssl pkgconfig
brew upgrade
- name: build
run: ./mac/ci-build.sh

run: |
meson setup --reconfigure --wipe .build
meson compile -C .build
4 changes: 2 additions & 2 deletions .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: check-msys2
on:
push:
branches: [ "win" ]
branches: [ "develop" ]
pull_request:
branches: [ "master" ]

Expand All @@ -22,7 +22,7 @@ jobs:
with:
msystem: mingw64
update: true
install: dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool
install: dos2unix mingw-w64-x86_64-gcc mingw-w64-x86_64-meson mingw-w64-x86_64-iconv pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl
- name: CI-Build
run: |
dos2unix PKGBUILD.mingw
Expand Down
66 changes: 2 additions & 64 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish
on:
push:
branches: [ "macos" ]
branches: [ "publish" ]
tags: [ "*" ]

jobs:
Expand All @@ -21,7 +21,7 @@ jobs:
with:
msystem: mingw64
update: true
install: dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool
install: dos2unix mingw-w64-x86_64-gcc mingw-w64-x86_64-meson mingw-w64-x86_64-iconv pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl
- name: CI-Build
run: |
dos2unix PKGBUILD.mingw
Expand All @@ -36,66 +36,4 @@ jobs:
omitBody: true
omitPrereleaseDuringUpdate: true
replacesArtifacts: true
publish-msvc:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: oprypin/find-latest-tag@v1
id: gettag
with:
repository: PerryWerneck/lib3270
releases-only: true
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: zip dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool
- name: CI-Build
run: ./win/msvc-build.sh
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.gettag.outputs.tag }}
artifacts: "*-lib3270-*.devel.zip"
allowUpdates: true
draft: false
makeLatest: true
omitBody: true
omitPrereleaseDuringUpdate: true
replacesArtifacts: true
publish-macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: oprypin/find-latest-tag@v1
id: gettag
with:
repository: PerryWerneck/lib3270
releases-only: true
- name: Install Pre reqs
run: |
brew update
brew install xz automake binutils coreutils curl gettext libtool openssl pkgconfig
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
find /usr/local/lib/node_modules/npm -delete
rm -f /usr/local/bin/go || true
rm -f /usr/local/bin/gofmt || true
brew upgrade
- name: build
run: ./mac/ci-build.sh
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.gettag.outputs.tag }}
artifacts: "*.tar.xz"
allowUpdates: true
draft: false
makeLatest: true
omitBody: true
omitPrereleaseDuringUpdate: true
replacesArtifacts: true


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ ABOUT-NLS
intl
po
*.tar.xz
.vscode
32 changes: 32 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
-------------------------------------------------------------------
Sat Aug 17 16:00:46 UTC 2024 - [email protected]

- Update to version 5.4+git20240817:
* Update codeql.yml
* Debugging publisher.
* Update README.md
* Fixing brew upgrade
* Reverting use of inner functions; doesnt work on macos compiler.
* Setting state on unexpected exit during the build of ssl_context.
* Fixing win32 bundler.
* Fix PA key mapping
* Updating property methods.
* Using nested functions.
* Since windows does not have version control in the system a new method was implemented to check if the lib3270 current revision can work with applications to avoid loading of an incomplete or incompatible version of lib3270.
* Forcing gettext path on MAC os.
* Setting iconv path from brew in macos.
* Adding field methods splitted from ctlr.c
* Splitting field methods out of ctlr.c, cleaning code.
* Implementing search for data files based on bundle *or* program path.
* Better libname in macos.
* Update README.md
* Updating translation.
* Disabling FIPS tests Fixing win32 builds
* Publishing zip file for msvc builds.
* Publish only on 'master' PRs
* Publishing mingw package instead of tar.xz
* Implementing mingw package.
* Searching for datafiles on all win32 possible paths.
* Publishing win32 & macos artifacts in the same action.
* Updating package control files.

-------------------------------------------------------------------
Wed Mar 22 18:14:29 UTC 2023 - [email protected]

Expand Down
31 changes: 14 additions & 17 deletions PKGBUILD.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -23,40 +23,37 @@ _realname=$(grep AC_INIT "${startdir}/configure.ac" | cut -d[ -f2 | cut -d] -f1)
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}
source=()

pkgver=$(grep AC_INIT "${startdir}/configure.ac" | cut -d[ -f3 | cut -d] -f1)
pkgver=5.5.0
pkgrel=0
pkgdesc="TN3270 Access library"
url="https://github.com/PerryWerneck/${_realname}"
arch=(i686 x86_64)
license=(LGPL-3.0-or-later)
depends=(${MINGW_PACKAGE_PREFIX}-openssl)
makedepends=(autoconf automake make libtool pkgconf gzip dos2unix ${MINGW_PACKAGE_PREFIX}-gcc ${MINGW_PACKAGE_PREFIX}-gettext ${MINGW_PACKAGE_PREFIX}-openssl)
makedepends=(${MINGW_PACKAGE_PREFIX}-meson pkgconf gzip dos2unix ${MINGW_PACKAGE_PREFIX}-gcc ${MINGW_PACKAGE_PREFIX}-gettext ${MINGW_PACKAGE_PREFIX}-iconv ${MINGW_PACKAGE_PREFIX}-openssl)
checkdepends=()

provides=($pkgname)
conflicts=($pkgname)

prepare() {
rm -fr "$srcdir/$pkgname"
ln -snf "$startdir" "$srcdir/$pkgname"
mkdir -p "$srcdir/$pkgname"
cd ${startdir}
meson \
setup \
--prefix=/c/${MINGW_PREFIX} \
--reconfigure \
--wipe \
"$srcdir/$pkgname"
}

build() {
cd $pkgname
./autogen.sh \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST}

make all
cd ${startdir}
meson compile -C "$srcdir/$pkgname"
}

package() {
cd $pkgname
make DESTDIR="${pkgdir}" install
install \
-Dm644 \
"LICENSE" \
"${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
cd ${startdir}
DESTDIR="${pkgdir}" meson install -C "$srcdir/$pkgname"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Install

```shell
brew update
brew install xz automake binutils coreutils curl gettext libtool openssl pkgconfig
brew install xz binutils coreutils curl gettext libtool openssl pkgconfig meson ninja
brew upgrade
```

Expand Down
17 changes: 9 additions & 8 deletions arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

pkgname=lib3270

pkgver=5.4+git20230322
pkgver=5.5.0
pkgrel=0
pkgdesc="TN3270 Access library"
url="https://github.com/PerryWerneck/lib3270"
arch=(i686 x86_64)
license=(GPL)
depends=(openssl)
makedepends=(autoconf automake make openssl libtool gzip)
makedepends=(meson openssl libtool gzip)
checkdepends=()

#groups=(gnome)
Expand All @@ -22,20 +22,21 @@ conflicts=($pkgname)

prepare() {
cd $pkgname-$pkgver
mkdir -p scripts
touch scripts/config.rpath
NOCONFIGURE=1 ./autogen.sh
./configure --prefix=/usr --disable-static
meson \
setup \
--reconfigure \
--wipe \
".build"
}

build() {
cd $pkgname-$pkgver
make all
meson compile -C ".build"
}

package() {
cd $pkgname-$pkgver
DESTDIR="$pkgdir" make install
DESTDIR="${pkgdir}" meson install -C ".build"
}


Loading

0 comments on commit 1d904bc

Please sign in to comment.