diff --git a/.devcontainer b/.devcontainer index 1eda63a7910..c5000654f62 160000 --- a/.devcontainer +++ b/.devcontainer @@ -1 +1 @@ -Subproject commit 1eda63a791063c7ab99c5946c47c4d98906b019b +Subproject commit c5000654f6208fa35f33d4e767a9a7f91f44dd75 diff --git a/.github/workflows/xpbuild.yml b/.github/workflows/xpbuild.yml index 169ff5269c8..625b2f93262 100644 --- a/.github/workflows/xpbuild.yml +++ b/.github/workflows/xpbuild.yml @@ -1,4 +1,7 @@ name: Build +permissions: + contents: read + pull-requests: write on: push: branches: [ "dev" ] @@ -7,24 +10,15 @@ on: 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 + permissions: + contents: read + pull-requests: write + packages: write + uses: externpro/externpro/.github/workflows/build-linux.yml@25.07.2 secrets: inherit macos: - uses: externpro/externpro/.github/workflows/build-macos.yml@25.06 - with: - cmake-workflow-preset: Darwin + uses: externpro/externpro/.github/workflows/build-macos.yml@25.07.2 secrets: inherit windows: - uses: externpro/externpro/.github/workflows/build-windows.yml@25.06 - with: - cmake-workflow-preset: Windows + uses: externpro/externpro/.github/workflows/build-windows.yml@25.07.2 secrets: inherit diff --git a/.github/workflows/xprelease.yml b/.github/workflows/xprelease.yml index 146191466e2..fe4c52cd748 100644 --- a/.github/workflows/xprelease.yml +++ b/.github/workflows/xprelease.yml @@ -9,10 +9,9 @@ on: jobs: # Upload build artifacts as release assets release-from-build: - uses: externpro/externpro/.github/workflows/release-from-build.yml@25.06 + uses: externpro/externpro/.github/workflows/release-from-build.yml@25.07.2 with: workflow_run_url: ${{ github.event.inputs.workflow_run_url }} - artifact_pattern: "*.tar.xz" permissions: contents: write id-token: write diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fc94543d47..a5167d7fdac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,25 +34,30 @@ INCLUDE(GNUInstallDirs) INCLUDE(IdeSplitSources) INCLUDE(FeatureSummary) INCLUDE(EnableWarnings) -include(xpflags) + set(targetsFile ${PROJECT_NAME}-targets) -if(NOT DEFINED XP_INSTALL_CMAKEDIR) - set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -endif() if(DEFINED XP_NAMESPACE) - set(XP_OPT_INSTALL FALSE) - set(nameSpace NAMESPACE ${XP_NAMESPACE}::) - set(USE_CMAKE_ICONV ON) string(JOIN "\n" EXT1 "if(APPLE)" " find_package(Iconv REQUIRED)" "endif()" "" ) - xpPackageDevel(TARGETS_FILE ${targetsFile} DEPS libssh2 LIBRARIES ${XP_NAMESPACE}::git2) + xpExternPackage(NAMESPACE ${XP_NAMESPACE} + TARGETS_FILE ${targetsFile} LIBRARIES git2 + BASE v${CMAKE_PROJECT_VERSION} XPDIFF "patch" DEPS libssh2 + WEB "https://libgit2.github.com/" UPSTREAM "github.com/libgit2/libgit2" + DESC "portable, pure C implementation of the Git core methods" + LICENSE "[GPL-2.0 WITH le](https://github.com/libgit2/libgit2/blob/master/README.md#license 'GPL2 with linking exception')" + ) + set(CMAKE_OPT_INSTALL FALSE) + set(USE_CMAKE_ICONV ON) + set(CMAKE_INSTALL_CMAKEDIR ${XP_INSTALL_CMAKEDIR}) + set(nameSpace NAMESPACE ${XP_NAMESPACE}::) else() - set(XP_OPT_INSTALL TRUE) + set(CMAKE_OPT_INSTALL TRUE) set(USE_CMAKE_ICONV OFF) + set(CMAKE_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) endif() # Build options diff --git a/cmake/PkgBuildConfig.cmake b/cmake/PkgBuildConfig.cmake index 1d7501e4ce3..a70332a04e2 100644 --- a/cmake/PkgBuildConfig.cmake +++ b/cmake/PkgBuildConfig.cmake @@ -72,7 +72,7 @@ function(pkg_build_config) endif() file(APPEND "${PKGCONFIG_FILE}" "Cflags: -I\${includedir} ${PKGCONFIG_CFLAGS}\n") - if(XP_OPT_INSTALL) + if(CMAKE_OPT_INSTALL) # Install .pc file install(FILES "${PKGCONFIG_FILE}" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1f0b839c0d8..64b5440dadf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -454,4 +454,4 @@ INSTALL(TARGETS git2 EXPORT ${targetsFile} ) INSTALL(DIRECTORY ${libgit2_SOURCE_DIR}/include/git2 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) INSTALL(FILES ${libgit2_SOURCE_DIR}/include/git2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace}) +install(EXPORT ${targetsFile} DESTINATION ${CMAKE_INSTALL_CMAKEDIR} ${nameSpace})