From c9be641f6f73a34a14769e2b2b632d71ecdc3faf Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Sat, 8 Nov 2025 23:38:47 -0700 Subject: [PATCH 1/9] git submodule add https://github.com/externpro/externpro .devcontainer --- .devcontainer | 1 + .gitmodules | 3 +++ 2 files changed, 4 insertions(+) create mode 160000 .devcontainer create mode 100644 .gitmodules diff --git a/.devcontainer b/.devcontainer new file mode 160000 index 0000000000..e72d85a627 --- /dev/null +++ b/.devcontainer @@ -0,0 +1 @@ +Subproject commit e72d85a62700eb26748d896466fa2dfa715affc6 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..18932abfb9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".devcontainer"] + path = .devcontainer + url = https://github.com/externpro/externpro From 15a31084f4a602392311a039f605fbd8eb7728df Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 10 Nov 2025 09:10:48 -0700 Subject: [PATCH 2/9] docker-compose links --- docker-compose.sh | 1 + docker-compose.yml | 1 + 2 files changed, 2 insertions(+) create mode 120000 docker-compose.sh create mode 120000 docker-compose.yml diff --git a/docker-compose.sh b/docker-compose.sh new file mode 120000 index 0000000000..85f182f0be --- /dev/null +++ b/docker-compose.sh @@ -0,0 +1 @@ +.devcontainer/compose.pro.sh \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 120000 index 0000000000..46c1f8918f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1 @@ +.devcontainer/compose.bld.yml \ No newline at end of file From f5151c2522a55089d53ad16f65529c261e84a2a3 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 10 Nov 2025 09:11:15 -0700 Subject: [PATCH 3/9] add CMakePresets --- CMakePresets.json | 8 ++++++++ CMakePresetsBase.json | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 CMakePresets.json create mode 100644 CMakePresetsBase.json diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000000..f82cfdd2cf --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,8 @@ +{ + "version": 8, + "include": [ + ".devcontainer/cmake/presets/xpLinuxNinja.json", + ".devcontainer/cmake/presets/xpDarwinNinja.json", + ".devcontainer/cmake/presets/xpWindowsVs2022.json" + ] +} diff --git a/CMakePresetsBase.json b/CMakePresetsBase.json new file mode 100644 index 0000000000..085cdc3e31 --- /dev/null +++ b/CMakePresetsBase.json @@ -0,0 +1,16 @@ +{ + "version": 8, + "configurePresets": [ + { + "name": "config-base", + "hidden": true, + "binaryDir": "${sourceDir}/_bld-${presetName}" + } + ], + "buildPresets": [ + { + "name": "build-base", + "hidden": true + } + ] +} From fae759a35ff77dc64cd7018c73cc3f2a53e5bae4 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 10 Nov 2025 09:12:20 -0700 Subject: [PATCH 4/9] gitignore: externpro ignores --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 3ff5a1f7cd..af7102227b 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,7 @@ expat/**/*.sdf expat/**/*.VC.db expat/tests/**/Debug/ expat/tests/**/Release/ +# externpro +.env +_bld*/ +docker-compose.override.yml From ca5bb6f4501914e1c085dd85170d1cfefa8a3818 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 10 Nov 2025 09:17:50 -0700 Subject: [PATCH 5/9] externpro github/workflows @25.06 --- .github/workflows/xpbuild.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/xprelease.yml | 20 ++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/xpbuild.yml create mode 100644 .github/workflows/xprelease.yml diff --git a/.github/workflows/xpbuild.yml b/.github/workflows/xpbuild.yml new file mode 100644 index 0000000000..169ff5269c --- /dev/null +++ b/.github/workflows/xpbuild.yml @@ -0,0 +1,30 @@ +name: Build +on: + push: + branches: [ "dev" ] + pull_request: + branches: [ "dev" ] + workflow_dispatch: +jobs: + linux: + uses: externpro/externpro/.github/workflows/build-linux.yml@25.06 + with: + cmake-workflow-preset: Linux + runon: ubuntu-latest + secrets: inherit + linux-arm64: + uses: externpro/externpro/.github/workflows/build-linux.yml@25.06 + with: + cmake-workflow-preset: Linux + runon: ubuntu-24.04-arm + secrets: inherit + macos: + uses: externpro/externpro/.github/workflows/build-macos.yml@25.06 + with: + cmake-workflow-preset: Darwin + secrets: inherit + windows: + uses: externpro/externpro/.github/workflows/build-windows.yml@25.06 + with: + cmake-workflow-preset: Windows + secrets: inherit diff --git a/.github/workflows/xprelease.yml b/.github/workflows/xprelease.yml new file mode 100644 index 0000000000..146191466e --- /dev/null +++ b/.github/workflows/xprelease.yml @@ -0,0 +1,20 @@ +name: Release +on: + workflow_dispatch: + inputs: + workflow_run_url: + description: 'URL of the workflow run containing artifacts to upload (e.g., https://github.com/owner/repo/actions/runs/123456789)' + required: true + type: string +jobs: + # Upload build artifacts as release assets + release-from-build: + uses: externpro/externpro/.github/workflows/release-from-build.yml@25.06 + with: + workflow_run_url: ${{ github.event.inputs.workflow_run_url }} + artifact_pattern: "*.tar.xz" + permissions: + contents: write + id-token: write + attestations: write + secrets: inherit From 3786148f3c31cdd5e7940d7006e610c952c25bfd Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 10 Nov 2025 09:26:54 -0700 Subject: [PATCH 6/9] CMakePresetsBase: add cacheVariables --- CMakePresetsBase.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakePresetsBase.json b/CMakePresetsBase.json index 085cdc3e31..acc5c660ac 100644 --- a/CMakePresetsBase.json +++ b/CMakePresetsBase.json @@ -4,7 +4,13 @@ { "name": "config-base", "hidden": true, - "binaryDir": "${sourceDir}/_bld-${presetName}" + "binaryDir": "${sourceDir}/_bld-${presetName}", + "cacheVariables": { + "BUILD_doc": "OFF", + "BUILD_shared": "OFF", + "XP_OPT_INSTALL": "OFF", + "XP_NAMESPACE": "xpro" + } } ], "buildPresets": [ From 3a7a37837f6eb82c5396321ad4397d46b9fe27c4 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 10 Nov 2025 09:32:20 -0700 Subject: [PATCH 7/9] add root CMakeLists.txt, externpro devel package --- CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000..9e3eb8fce6 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.31) +set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES .devcontainer/cmake/xproinc.cmake) +project(libexpat) +include(GNUInstallDirs) +include(xpflags) +set(lib expat) +if(DEFINED XP_NAMESPACE) + set(nameSpace NAMESPACE ${XP_NAMESPACE}::) + string(PREPEND lib "${XP_NAMESPACE}::") +endif() +if(NOT DEFINED XP_INSTALL_CMAKEDIR) + set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) +endif() +set(targetsFile ${PROJECT_NAME}-targets) +xpPackageDevel(TARGETS_FILE ${targetsFile} LIBRARIES ${lib}) +add_subdirectory(expat) From 462ebb45f18498fe2aaca28bb84b4c85de27d57a Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 10 Nov 2025 09:35:42 -0700 Subject: [PATCH 8/9] XP_OPT_INSTALL: optional install components --- expat/CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 0614f85d0d..4e98582414 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -157,7 +157,9 @@ set(includedir "\${prefix}/include") configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc) expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc ${XP_OPT_INSTALL} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +if(XP_OPT_INSTALL) +expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +endif() if(BUILD_tools) set(xmlwf_SRCS @@ -170,10 +172,14 @@ if(BUILD_tools) add_executable(xmlwf ${xmlwf_SRCS}) set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf) target_link_libraries(xmlwf expat) - expat_install(TARGETS xmlwf ${XP_OPT_INSTALL} DESTINATION ${CMAKE_INSTALL_BINDIR}) + if(XP_OPT_INSTALL) + expat_install(TARGETS xmlwf DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() if(BUILD_doc) add_custom_command(TARGET expat PRE_BUILD COMMAND "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_SOURCE_DIR}/doc/xmlwf.1") - expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" ${XP_OPT_INSTALL} DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man1) + if(XP_OPT_INSTALL) + expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man1) + endif() endif() endif() From 8094e4a4d0f391bec150844249feabd0d1e6443a Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 10 Nov 2025 09:36:39 -0700 Subject: [PATCH 9/9] match upstream expat/CMakeLists.txt as much as possible some things are now done in root CMakeList.txt --- expat/CMakeLists.txt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 4e98582414..61da275715 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -1,17 +1,10 @@ # This file is copyrighted under the BSD-license for buildsystem files of KDE # copyright 2010, Patrick Spendrin -cmake_minimum_required(VERSION 2.6...3.31) +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) project(expat) -include(GNUInstallDirs) -include(xpflags) -if(DEFINED XP_NAMESPACE) - set(XP_OPT_INSTALL EXCLUDE_FROM_ALL) - set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -endif() -if(NOT DEFINED XP_INSTALL_CMAKEDIR) - set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) +cmake_minimum_required(VERSION 2.6) endif() set(PACKAGE_BUGREPORT "expat-bugs@libexpat.org") set(PACKAGE_NAME "expat") @@ -144,7 +137,6 @@ macro(expat_install) endif() endmacro() -set(targetsFile ${PROJECT_NAME}-targets) expat_install(TARGETS expat EXPORT ${targetsFile} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})