Skip to content

Commit 470f995

Browse files
committed
Fix build, remove duplicate files
Signed-off-by: Raul Metsma <raul@metsma.ee>
1 parent 256095a commit 470f995

55 files changed

Lines changed: 498 additions & 917 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/cross-arm64-windows.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[binaries]
2+
c = 'cl'
3+
cpp = 'cl'
4+
ar = 'lib'
5+
windres = 'rc'
6+
cmake = 'C:/Program Files/CMake/bin/cmake.exe'
7+
8+
[host_machine]
9+
system = 'windows'
10+
cpu_family = 'aarch64'
11+
cpu = 'aarch64'
12+
endian = 'little'

.github/workflows/linux-meson.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,35 @@ jobs:
1616
run: |
1717
sudo apt-get update
1818
sudo apt-get -y install build-essential meson git openssl docbook-xsl xsltproc gengetopt libpcsclite-dev libssl-dev libcmocka-dev libreadline-dev
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6
2020

2121
- name: Configure project
22-
run: meson setup -Dcomponents=pkcs11,tools,sm -Ddriver=pcsc -Dopenpace=enabled -Dopenssl=enabled -Dreadline=enabled -Dzlib=enabled -Dtests=true -Ddoc=true -Dman=true build/
22+
run: >
23+
meson setup build/
24+
-Dopenpace=enabled -Dopenssl=enabled -Dreadline=enabled -Dzlib=enabled
25+
-Dtests=true -Ddoc=true -Dman=true
2326
- name: Build project
2427
run: meson compile -C build/ -v
2528
- name: Run unit tests
2629
run: meson test -C build/ -v
2730
- name: Upload test log
28-
uses: actions/upload-artifact@v4
31+
uses: actions/upload-artifact@v7
2932
if: failure()
3033
with:
3134
name: Ubuntu_Meson_Testlog
3235
path: build/meson-logs/testlog.txt
3336

3437
- name: Configure project (light)
35-
run: meson setup -Dcomponents=pkcs11,tools,sm -Ddriver=pcsc -Dopenpace=disabled -Dopenssl=disabled -Dreadline=disabled -Dzlib=disabled -Dtests=true -Ddoc=true -Dman=true build-light/
38+
run: >
39+
meson setup build-light/
40+
-Dopenpace=disabled -Dopenssl=disabled -Dreadline=disabled -Dzlib=disabled
41+
-Dtests=true -Ddoc=true -Dman=true
3642
- name: Build project (light)
3743
run: meson compile -C build-light/ -v
3844
- name: Run unit tests (light)
3945
run: meson test -C build-light/ -v
4046
- name: Upload test log (light)
41-
uses: actions/upload-artifact@v4
47+
uses: actions/upload-artifact@v7
4248
if: failure()
4349
with:
4450
name: Ubuntu_Meson_Testlog_light
@@ -47,7 +53,7 @@ jobs:
4753
- name: Create distribution package
4854
run: meson dist -C build/ --formats xztar
4955
- name: Upload distribution package
50-
uses: actions/upload-artifact@v4
56+
uses: actions/upload-artifact@v7
5157
with:
5258
name: opensc-dist
5359
path: build/meson-dist/opensc-*
@@ -60,13 +66,21 @@ jobs:
6066
run: |
6167
sudo apt-get update
6268
sudo apt-get -y install build-essential meson libpcsclite-dev libp11-kit-dev
63-
- uses: actions/checkout@v4
69+
- uses: actions/checkout@v6
6470
- name: Configure project
65-
run: meson setup --prefix=/usr -Dbuildtype=release -Db_lto=true -Db_ndebug=true -Dc_link_args=-Wl,-Bsymbolic -Dcomponents=pkcs11 -Dstatic_components=pkcs11 -Ddriver=pcsc -Dp11kit=enabled --wrap-mode=forcefallback -Dglib:libmount=disabled -Dglib:tests=false -Dglib:glib_debug=disabled -Dglib:glib_assert=false -Dglib:glib_checks=false -Dglib:sysprof=disabled -Dproxy-libintl:default_library=static -Dlibffi:default_library=static -Dzlib:tests=disabled build/
71+
run: >
72+
meson setup --prefix=/usr build/
73+
-Dbuildtype=release
74+
-Db_lto=true -Db_ndebug=true -Dc_link_args=-Wl,-Bsymbolic -Dstatic_components=pkcs11
75+
-Dp11kit=enabled --wrap-mode=forcefallback
76+
-Dglib:libmount=disabled -Dglib:tests=false -Dglib:glib_debug=disabled
77+
-Dglib:glib_assert=false -Dglib:glib_checks=false -Dglib:sysprof=disabled
78+
-Dproxy-libintl:default_library=static -Dlibffi:default_library=static
79+
-Dzlib:tests=disabled
6680
- name: Build project
6781
run: meson compile -C build/ -v
6882
- name: Upload the PKCS#11 module
69-
uses: actions/upload-artifact@v4
83+
uses: actions/upload-artifact@v7
7084
with:
7185
name: opensc-pkcs11
7286
path: build/src/pkcs11/opensc-pkcs11.so

.github/workflows/windows-meson.yml

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,71 @@ permissions:
1010
jobs:
1111
build:
1212
runs-on: ${{ matrix.image }}
13+
env:
14+
VCPKG_INSTALLED: ${{ github.workspace }}\vcpkg_installed
15+
VCPKG_DEFAULT_TRIPLET: ${{ matrix.platform }}-windows-static
1316
strategy:
1417
matrix:
15-
platform: [x86, x64]
18+
platform: [x86, x64, arm64]
1619
configuration: [Light, Release]
1720
image: [windows-2022]
21+
include:
22+
- platform: arm64
23+
setenv: amd64_arm64
24+
crossfile: --cross-file .github/cross-arm64-windows.txt
1825
steps:
1926
- name: Install Meson
2027
run: python -m pip install meson ninja
21-
- name: Install gengetopt
22-
shell: C:\shells\msys2bash.cmd {0}
23-
run: pacman -S --noconfirm --needed --noprogressbar gengetopt
2428
- name: Install CPDK
2529
run: choco install windows-cryptographic-provider-development-kit -y
26-
- name: Install Wix 5
27-
run: |
28-
dotnet tool install --global wix
29-
wix extension add -g WixToolset.UI.wixext
30-
wix extension add -g WixToolset.Util.wixext
31-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v6
31+
- name: Install WIX
32+
run: powershell -ExecutionPolicy Bypass -File .github/setup-wix.ps1
3233
- name: Setup dev env
3334
uses: ilammy/msvc-dev-cmd@v1
3435
with:
35-
arch: ${{ matrix.platform }}
36+
arch: ${{ matrix.setenv || matrix.platform }}
37+
- name: Cache vcpkg
38+
uses: actions/cache@v5
39+
with:
40+
path: ${{ github.workspace }}/vcpkg_cache
41+
key: vcpkg-${{ matrix.configuration }}-${{ matrix.platform }}-${{ hashFiles('.github/vcpkg.json') }}
42+
- name: Prepare vcpkg
43+
if: matrix.configuration == 'Release'
44+
env:
45+
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/vcpkg_cache,readwrite
46+
run: >
47+
C:\vcpkg\vcpkg install
48+
--x-manifest-root ${{ github.workspace }}/.github
49+
--x-install-root ${env:VCPKG_INSTALLED}
3650
- name: Configure project (release)
3751
if: matrix.configuration == 'Release'
38-
run: |
39-
$env:Path += ";C:\msys64\usr\bin"
40-
meson setup -Dbackend=ninja -Dbuildtype=release '-Dcomponents=pkcs11,tools,sm,minidriver' '-Dstatic_components=pkcs11,sm,minidriver' -Ddriver=pcsc -Dopenpace=enabled -Dopenssl=enabled -Dzlib=enabled --force-fallback-for=openssl '-Dopenpace:cv_certificates_path=%PROGRAMFILES%\\OpenSC Project\\OpenSC\\cvc' '-Dopenpace:x509_certificates_path=%PROGRAMFILES%\\OpenSC Project\\OpenSC\\x509' build/
52+
run: >
53+
meson setup build/ ${{ matrix.crossfile }}
54+
-Dbackend=ninja -Dbuildtype=debugoptimized -Dwarning_level=2
55+
-Dopenpace=enabled -Dopenssl=enabled -Dzlib=enabled
56+
'-Dcomponents=pkcs11,tools,sm,minidriver' '-Dstatic_components=pkcs11,sm,minidriver'
57+
--cmake-prefix-path "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET"
4158
- name: Configure project (light)
4259
if: matrix.configuration == 'Light'
43-
run: |
44-
$env:Path += ";C:\msys64\usr\bin"
45-
meson setup -Dbackend=ninja -Dbuildtype=release '-Dcomponents=pkcs11,tools,sm,minidriver' '-Dstatic_components=pkcs11,sm,minidriver' -Ddriver=pcsc -Dopenpace=disabled -Dopenssl=disabled build/
60+
run: >
61+
meson setup build/ ${{ matrix.crossfile }}
62+
-Dbackend=ninja -Dbuildtype=debugoptimized -Dwarning_level=2
63+
-Dopenpace=disabled -Dopenssl=disabled
64+
'-Dcomponents=pkcs11,tools,sm,minidriver' '-Dstatic_components=pkcs11,sm,minidriver'
4665
- name: Build project
4766
run: |
4867
meson compile -C build/ -v
4968
meson compile -C build/ -v msi
5069
- name: Archive artifacts
51-
uses: actions/upload-artifact@v4
70+
uses: actions/upload-artifact@v7
5271
with:
5372
name: msi_${{ matrix.image }}_${{ matrix.platform }}_${{ matrix.configuration }}
5473
path: build/*.msi
74+
- name: Archive debug artifacts
75+
uses: actions/upload-artifact@v7
76+
with:
77+
name: msi_${{ matrix.image }}_${{ matrix.platform }}_${{ matrix.configuration }}-dbg
78+
path: |
79+
build/**/*.pdb
80+
!build/**/vc*.pdb

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,9 @@ else
10861086
enable_minidriver_ca="no"
10871087
fi
10881088

1089+
AC_DEFINE([QUOTE_HELPER(x)], [#x], [Stringify macro helper])
1090+
AC_DEFINE([QUOTE(x)], [QUOTE_HELPER(x)], [Stringify macro])
1091+
10891092
AC_DEFINE_UNQUOTED([OPENSC_VERSION_MAJOR], [${OPENSC_VERSION_MAJOR}], [OpenSC version major component])
10901093
AC_DEFINE_UNQUOTED([OPENSC_VERSION_MINOR], [${OPENSC_VERSION_MINOR}], [OpenSC version minor component])
10911094
AC_DEFINE_UNQUOTED([OPENSC_VERSION_FIX], [${OPENSC_VERSION_FIX}], [OpenSC version fix component])

doc/tools/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ if conf.get('ENABLE_OPENSSL')
2121
'cryptoflex-tool.1.xml',
2222
'gids-tool.1.xml',
2323
'netkey-tool.1.xml',
24+
'lteid-tool.1.xml',
2425
'piv-tool.1.xml',
2526
'pkcs15-init.1.xml',
2627
'sc-hsm-tool.1.xml',

0 commit comments

Comments
 (0)