Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[log4cxx] Add 1.3.0 #41927

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
6 changes: 3 additions & 3 deletions ports/log4cxx/fix-find-package.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61c0479..3bd3327 100644
index 7b1c0d52..62c4fb43 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,7 +60,7 @@ find_package(APR-Util REQUIRED)
find_package( Threads REQUIRED )
@@ -70,7 +70,7 @@ find_package( Threads REQUIRED )
include("${CMAKE_CURRENT_LIST_DIR}/src/cmake/FindLibFuzzer.cmake")

# Find expat for XML parsing
-find_package(EXPAT REQUIRED)
Expand Down
9 changes: 8 additions & 1 deletion ports/log4cxx/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
vcpkg_download_distfile(ARCHIVE
URLS "https://archive.apache.org/dist/logging/log4cxx/${VERSION}/apache-log4cxx-${VERSION}.tar.gz"
FILENAME "apache-log4cxx-${VERSION}.tar.gz"
SHA512 377234407c5f1128fbff6e5d2fcda3f53aae275962cd9207257674fa016095f4bc4ac0c318c1ba2a75f3252402cce0776c1211ffa917a60f8a89a12f01d45efb
SHA512 bd481d69e29b3c8908bbc91489bf4e752e6edb147404454c0e88fd8f107d68ae5a98e220ab912692e555ca071d1cff7fb99ffa51194cfa7d070593ce6285d2b0
)

vcpkg_download_distfile(MAKE_PKG_CONFIG_SUPPORT_OPT_IN
URLS https://github.com/apache/logging-log4cxx/commit/4642a50c70b6cbd9b68d7e8dace9c049c8198b07.patch?full_index=1
SHA512 4b3628d98d233a2e68d1183a8bb2156c2f1e6f80ab50cfe75a6df799d14bc3c7ba028fbb7ff524c56530a2260be37fd9f3d089422027987b5c8c36e9978c254c
FILENAME Make_pkg_config_support_opt_in-4642a50c70b6cbd9b68d7e8dace9c049c8198b07.patch
)

vcpkg_extract_source_archive(
SOURCE_PATH ARCHIVE "${ARCHIVE}"
PATCHES
fix-find-package.patch
${MAKE_PKG_CONFIG_SUPPORT_OPT_IN}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect the port switch it on unconditionally and to fix it as needed.

FTR vcpkg_fixup_pkgconfig is guarded by a positive-list condition. This is wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect the port switch it on unconditionally and to fix it as needed

This was the error when pkf_config support was on:

CMake Error at scripts/cmake/vcpkg_fixup_pkgconfig.cmake:134 (message):
  D:/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin/pkg-config.exe
  --exists liblog4cxx failed with error code: 1

      ENV{PKG_CONFIG_PATH}: "D:/p/log4cxx_x64-windows-static/lib/pkgconfig;D:/p/log4cxx_x64-windows-static/share/pkgconfig;D:/installed/x64-windows-static/lib/pkgconfig;D:/installed/x64-windows-static/share/pkgconfig"
      output: Package apr-1 was not found in the pkg-config search path.

  Perhaps you should add the directory containing `apr-1.pc'

  to the PKG_CONFIG_PATH environment variable

  Package 'apr-1', required by 'liblog4cxx', not found

How would you fix that from the log4cxx port?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can't be fix in this port indeed. Poor pkg-config support in apr, unfortunately.

)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down
3 changes: 1 addition & 2 deletions ports/log4cxx/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "log4cxx",
"version": "1.2.0",
"port-version": 1,
"version": "1.3.0",
"description": "Apache log4cxx is a logging framework for C++ patterned after Apache log4j, which uses Apache Portable Runtime for most platform-specific code and should be usable on any platform supported by APR",
"homepage": "https://logging.apache.org/log4cxx",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5581,8 +5581,8 @@
"port-version": 0
},
"log4cxx": {
"baseline": "1.2.0",
"port-version": 1
"baseline": "1.3.0",
"port-version": 0
},
"loguru": {
"baseline": "2.1.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/log4cxx.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "fb973202e7b0a9c6060e23b92fee4b33df52204a",
"version": "1.3.0",
"port-version": 0
},
{
"git-tree": "69b1cd84fe4dce29fda6b300bf18ebc8de1aa0de",
"version": "1.2.0",
Expand Down
Loading