From 3e03c99921782d72536a6759a05ca280c177edb0 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 23 Apr 2024 11:25:21 -0700 Subject: [PATCH 01/31] Adding MySOFA port --- ports/mysofa/fix-exports.patch | 234 +++++++++++++++++++++++++++++++++ ports/mysofa/portfile.cmake | 29 ++++ ports/mysofa/usage | 4 + ports/mysofa/vcpkg.json | 18 +++ versions/baseline.json | 4 + versions/m-/mysofa.json | 9 ++ 6 files changed, 298 insertions(+) create mode 100644 ports/mysofa/fix-exports.patch create mode 100644 ports/mysofa/portfile.cmake create mode 100644 ports/mysofa/usage create mode 100644 ports/mysofa/vcpkg.json create mode 100644 versions/m-/mysofa.json diff --git a/ports/mysofa/fix-exports.patch b/ports/mysofa/fix-exports.patch new file mode 100644 index 00000000000000..d902aa90644c99 --- /dev/null +++ b/ports/mysofa/fix-exports.patch @@ -0,0 +1,234 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c092cb0..1a2a603 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,9 +39,9 @@ if(${ADDRESS_SANITIZE} STREQUAL "ON") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") + endif() + +-install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) +-install(FILES share/MIT_KEMAR_normal_pinna.sofa +- DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) ++#install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) ++#install(FILES share/MIT_KEMAR_normal_pinna.sofa ++# DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) + + if(BUILD_TESTS) + +@@ -131,7 +131,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc" + install(EXPORT mysofa_exports + NAMESPACE mysofa:: + FILE mysofaTargets.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mysofa ++ DESTINATION share/mysofa + ) + + # Create a target export file for use from the build tree. +@@ -145,7 +145,7 @@ include(CMakePackageConfigHelpers) + # Configure package config file + configure_package_config_file(mysofaConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/mysofaConfig.cmake +- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mysofa ++ INSTALL_DESTINATION share/mysofa + ) + + # Create package version file +@@ -159,5 +159,5 @@ write_basic_package_version_file( + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/mysofaConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/mysofaConfigVersion.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mysofa ++ DESTINATION share/mysofa + ) +diff --git a/build/.empty b/build/.empty +deleted file mode 100644 +index e69de29..0000000 +diff --git a/build/project.json b/build/project.json +deleted file mode 100644 +index ce0c1c8..0000000 +--- a/build/project.json ++++ /dev/null +@@ -1,9 +0,0 @@ +-{ +- "dependencies": { +- "zlib": "1.2.8.8", +- }, +- "frameworks": { +- ".NETFramework,Version=v4.0": { } +- }, +- "runtimes": { "win-x64": { } } +-} +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 0de9632..2b6ff27 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -13,6 +13,8 @@ use_c99() + configure_file(config.h.in config.h) + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + ++find_package(ZLIB REQUIRED) ++ + if(NOT MSVC) + if(NOT WIN32) + find_library(MATH m) +@@ -81,6 +83,8 @@ set(public-headers + hrtf/mysofa.h + ) + ++install(FILES "${public-headers}" DESTINATION include) ++ + if(BUILD_STATIC_LIBS) + add_library(mysofa-static STATIC ${libsrc}) + target_include_directories(mysofa-static +@@ -88,7 +92,7 @@ target_include_directories(mysofa-static + "$" + $ + ) +-target_link_libraries(mysofa-static LINK_PRIVATE ${MATH} ${ZLIB_LIBRARIES}) ++target_link_libraries(mysofa-static LINK_PRIVATE ${MATH} ZLIB::ZLIB) + set_target_properties( + mysofa-static + PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1 POSITION_INDEPENDENT_CODE +@@ -120,7 +124,7 @@ if(BUILD_SHARED_LIBS) + "$" + $ + ) +- target_link_libraries(mysofa-shared PRIVATE ${MATH} ${ZLIB_LIBRARIES}) ++ target_link_libraries(mysofa-shared PRIVATE ${MATH} ZLIB::ZLIB) + set_target_properties(mysofa-shared + PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1) + # Rename the Windows import library (stub) of the DLL to prevent a name clash +diff --git a/src/hrtf/mysofa.h b/src/hrtf/mysofa.h +index 206e77b..538f0b6 100644 +--- a/src/hrtf/mysofa.h ++++ b/src/hrtf/mysofa.h +@@ -14,6 +14,8 @@ extern "C" { + #include + #include + ++#include "mysofa_export.h" ++ + #define MYSOFA_DEFAULT_NEIGH_STEP_ANGLE 0.5f + #define MYSOFA_DEFAULT_NEIGH_STEP_RADIUS 0.01f + +@@ -127,44 +129,44 @@ enum { + MYSOFA_ONLY_SOURCES_WITH_MC_SUPPORTED + }; + +-struct MYSOFA_HRTF *mysofa_load(const char *filename, int *err); +-struct MYSOFA_HRTF *mysofa_load_data(const char *data, size_t size, int *err); ++MYSOFA_EXPORT struct MYSOFA_HRTF *mysofa_load(const char *filename, int *err); ++MYSOFA_EXPORT struct MYSOFA_HRTF *mysofa_load_data(const char *data, size_t size, int *err); + +-int mysofa_check(struct MYSOFA_HRTF *hrtf); +-char *mysofa_getAttribute(struct MYSOFA_ATTRIBUTE *attr, char *name); +-void mysofa_tospherical(struct MYSOFA_HRTF *hrtf); +-void mysofa_tocartesian(struct MYSOFA_HRTF *hrtf); +-void mysofa_free(struct MYSOFA_HRTF *hrtf); ++MYSOFA_EXPORT int mysofa_check(struct MYSOFA_HRTF *hrtf); ++MYSOFA_EXPORT char *mysofa_getAttribute(struct MYSOFA_ATTRIBUTE *attr, char *name); ++MYSOFA_EXPORT void mysofa_tospherical(struct MYSOFA_HRTF *hrtf); ++MYSOFA_EXPORT void mysofa_tocartesian(struct MYSOFA_HRTF *hrtf); ++MYSOFA_EXPORT void mysofa_free(struct MYSOFA_HRTF *hrtf); + +-struct MYSOFA_LOOKUP *mysofa_lookup_init(struct MYSOFA_HRTF *hrtf); +-int mysofa_lookup(struct MYSOFA_LOOKUP *lookup, float *coordinate); +-void mysofa_lookup_free(struct MYSOFA_LOOKUP *lookup); ++MYSOFA_EXPORT struct MYSOFA_LOOKUP *mysofa_lookup_init(struct MYSOFA_HRTF *hrtf); ++MYSOFA_EXPORT int mysofa_lookup(struct MYSOFA_LOOKUP *lookup, float *coordinate); ++MYSOFA_EXPORT void mysofa_lookup_free(struct MYSOFA_LOOKUP *lookup); + +-struct MYSOFA_NEIGHBORHOOD * ++MYSOFA_EXPORT struct MYSOFA_NEIGHBORHOOD * + mysofa_neighborhood_init(struct MYSOFA_HRTF *hrtf, + struct MYSOFA_LOOKUP *lookup); +-struct MYSOFA_NEIGHBORHOOD *mysofa_neighborhood_init_withstepdefine( ++MYSOFA_EXPORT struct MYSOFA_NEIGHBORHOOD *mysofa_neighborhood_init_withstepdefine( + struct MYSOFA_HRTF *hrtf, struct MYSOFA_LOOKUP *lookup, + float neighbor_angle_step, float neighbor_radius_step); +-int *mysofa_neighborhood(struct MYSOFA_NEIGHBORHOOD *neighborhood, int pos); +-void mysofa_neighborhood_free(struct MYSOFA_NEIGHBORHOOD *neighborhood); ++MYSOFA_EXPORT int *mysofa_neighborhood(struct MYSOFA_NEIGHBORHOOD *neighborhood, int pos); ++MYSOFA_EXPORT void mysofa_neighborhood_free(struct MYSOFA_NEIGHBORHOOD *neighborhood); + +-float *mysofa_interpolate(struct MYSOFA_HRTF *hrtf, float *cordinate, ++MYSOFA_EXPORT float *mysofa_interpolate(struct MYSOFA_HRTF *hrtf, float *cordinate, + int nearest, int *neighborhood, float *fir, + float *delays); + +-int mysofa_resample(struct MYSOFA_HRTF *hrtf, float samplerate); +-float mysofa_loudness(struct MYSOFA_HRTF *hrtf); +-int mysofa_minphase(struct MYSOFA_HRTF *hrtf, float threshold); ++MYSOFA_EXPORT int mysofa_resample(struct MYSOFA_HRTF *hrtf, float samplerate); ++MYSOFA_EXPORT float mysofa_loudness(struct MYSOFA_HRTF *hrtf); ++MYSOFA_EXPORT int mysofa_minphase(struct MYSOFA_HRTF *hrtf, float threshold); + +-struct MYSOFA_EASY *mysofa_cache_lookup(const char *filename, float samplerate); +-struct MYSOFA_EASY *mysofa_cache_store(struct MYSOFA_EASY *, ++MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_cache_lookup(const char *filename, float samplerate); ++MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_cache_store(struct MYSOFA_EASY *, + const char *filename, float samplerate); +-void mysofa_cache_release(struct MYSOFA_EASY *); +-void mysofa_cache_release_all(void); ++MYSOFA_EXPORT void mysofa_cache_release(struct MYSOFA_EASY *); ++MYSOFA_EXPORT void mysofa_cache_release_all(void); + +-void mysofa_c2s(float values[3]); +-void mysofa_s2c(float values[3]); ++MYSOFA_EXPORT void mysofa_c2s(float values[3]); ++MYSOFA_EXPORT void mysofa_s2c(float values[3]); + + struct MYSOFA_EASY { + struct MYSOFA_HRTF *hrtf; +@@ -173,38 +175,38 @@ struct MYSOFA_EASY { + float *fir; + }; + +-struct MYSOFA_EASY *mysofa_open(const char *filename, float samplerate, ++MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open(const char *filename, float samplerate, + int *filterlength, int *err); +-struct MYSOFA_EASY *mysofa_open_no_norm(const char *filename, float samplerate, ++MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_no_norm(const char *filename, float samplerate, + int *filterlength, int *err); +-struct MYSOFA_EASY *mysofa_open_advanced(const char *filename, float samplerate, ++MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_advanced(const char *filename, float samplerate, + int *filterlength, int *err, bool norm, + float neighbor_angle_step, + float neighbor_radius_step); +-struct MYSOFA_EASY *mysofa_open_data(const char *data, long size, ++MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_data(const char *data, long size, + float samplerate, int *filterlength, + int *err); +-struct MYSOFA_EASY *mysofa_open_data_no_norm(const char *data, long size, ++MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_data_no_norm(const char *data, long size, + float samplerate, + int *filterlength, int *err); +-struct MYSOFA_EASY *mysofa_open_data_advanced( ++MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_data_advanced( + const char *data, long size, float samplerate, int *filterlength, int *err, + bool norm, float neighbor_angle_step, float neighbor_radius_step); +-struct MYSOFA_EASY *mysofa_open_cached(const char *filename, float samplerate, ++MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_cached(const char *filename, float samplerate, + int *filterlength, int *err); +-void mysofa_getfilter_short(struct MYSOFA_EASY *easy, float x, float y, float z, ++MYSOFA_EXPORT void mysofa_getfilter_short(struct MYSOFA_EASY *easy, float x, float y, float z, + short *IRleft, short *IRright, int *delayLeft, + int *delayRight); +-void mysofa_getfilter_float(struct MYSOFA_EASY *easy, float x, float y, float z, ++MYSOFA_EXPORT void mysofa_getfilter_float(struct MYSOFA_EASY *easy, float x, float y, float z, + float *IRleft, float *IRright, float *delayLeft, + float *delayRight); +-void mysofa_getfilter_float_nointerp(struct MYSOFA_EASY *easy, float x, float y, ++MYSOFA_EXPORT void mysofa_getfilter_float_nointerp(struct MYSOFA_EASY *easy, float x, float y, + float z, float *IRleft, float *IRright, + float *delayLeft, float *delayRight); +-void mysofa_close(struct MYSOFA_EASY *easy); +-void mysofa_close_cached(struct MYSOFA_EASY *easy); ++MYSOFA_EXPORT void mysofa_close(struct MYSOFA_EASY *easy); ++MYSOFA_EXPORT void mysofa_close_cached(struct MYSOFA_EASY *easy); + +-void mysofa_getversion(int *major, int *minor, int *patch); ++MYSOFA_EXPORT void mysofa_getversion(int *major, int *minor, int *patch); + + #ifdef __cplusplus + } diff --git a/ports/mysofa/portfile.cmake b/ports/mysofa/portfile.cmake new file mode 100644 index 00000000000000..e9c73911a54761 --- /dev/null +++ b/ports/mysofa/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hoene/libmysofa + REF "v${VERSION}" + SHA512 de7f5d36079b8be06860f3380c7a359e22f59e3e57d86f5f5df1512a20b321e392e2452a34f3ea979779fb84c7493fd4febd386c89b6da4182d6c0cfb0ce1d75 + HEAD_REF master + PATCHES + fix-exports.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_SHARED_LIBS=${BUILD_SHARED} + -DBUILD_STATIC_LIBS=${BUILD_STATIC} +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/mysofa/usage b/ports/mysofa/usage new file mode 100644 index 00000000000000..a20f511bb6e211 --- /dev/null +++ b/ports/mysofa/usage @@ -0,0 +1,4 @@ + mysofa provides CMake targets: + + find_package(mysofa CONFIG REQUIRED) + target_link_libraries(main PRIVATE mysofa::mysofa) diff --git a/ports/mysofa/vcpkg.json b/ports/mysofa/vcpkg.json new file mode 100644 index 00000000000000..d30e18208a0397 --- /dev/null +++ b/ports/mysofa/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "mysofa", + "version": "1.3.2", + "description": "Reader for AES SOFA files to get better HRTFs", + "homepage": "https://github.com/hoene/libmysofa", + "license": "BSD-3-Clause", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 7a8f11f54c7b42..90ace899a3a885 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5980,6 +5980,10 @@ "baseline": "3.4.3", "port-version": 0 }, + "mysofa": { + "baseline": "1.3.2", + "port-version": 0 + }, "mysql-connector-cpp": { "baseline": "8.0.32", "port-version": 1 diff --git a/versions/m-/mysofa.json b/versions/m-/mysofa.json new file mode 100644 index 00000000000000..57df5895d5e44c --- /dev/null +++ b/versions/m-/mysofa.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "59b5e7dfadb4cc9a037064f69ce741b5f7892530", + "version": "1.3.2", + "port-version": 0 + } + ] +} From 972e2ec86b01af2273838daa62d58016acd871c3 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 23 Apr 2024 11:35:44 -0700 Subject: [PATCH 02/31] Updating port name --- ports/{mysofa => libmysofa}/fix-exports.patch | 18 ------------------ ports/{mysofa => libmysofa}/portfile.cmake | 2 +- ports/{mysofa => libmysofa}/usage | 2 +- ports/{mysofa => libmysofa}/vcpkg.json | 2 +- versions/baseline.json | 8 ++++---- versions/{m-/mysofa.json => l-/libmysofa.json} | 2 +- 6 files changed, 8 insertions(+), 26 deletions(-) rename ports/{mysofa => libmysofa}/fix-exports.patch (96%) rename ports/{mysofa => libmysofa}/portfile.cmake (90%) rename ports/{mysofa => libmysofa}/usage (71%) rename ports/{mysofa => libmysofa}/vcpkg.json (93%) rename versions/{m-/mysofa.json => l-/libmysofa.json} (58%) diff --git a/ports/mysofa/fix-exports.patch b/ports/libmysofa/fix-exports.patch similarity index 96% rename from ports/mysofa/fix-exports.patch rename to ports/libmysofa/fix-exports.patch index d902aa90644c99..e4e01f405e7938 100644 --- a/ports/mysofa/fix-exports.patch +++ b/ports/libmysofa/fix-exports.patch @@ -40,24 +40,6 @@ index c092cb0..1a2a603 100644 - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mysofa + DESTINATION share/mysofa ) -diff --git a/build/.empty b/build/.empty -deleted file mode 100644 -index e69de29..0000000 -diff --git a/build/project.json b/build/project.json -deleted file mode 100644 -index ce0c1c8..0000000 ---- a/build/project.json -+++ /dev/null -@@ -1,9 +0,0 @@ --{ -- "dependencies": { -- "zlib": "1.2.8.8", -- }, -- "frameworks": { -- ".NETFramework,Version=v4.0": { } -- }, -- "runtimes": { "win-x64": { } } --} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0de9632..2b6ff27 100644 --- a/src/CMakeLists.txt diff --git a/ports/mysofa/portfile.cmake b/ports/libmysofa/portfile.cmake similarity index 90% rename from ports/mysofa/portfile.cmake rename to ports/libmysofa/portfile.cmake index e9c73911a54761..8f72f27683bcc0 100644 --- a/ports/mysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -21,7 +21,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup() +vcpkg_cmake_config_fixup(PACKAGE_NAME mysofa CONFIG_PATH share/mysofa) vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/mysofa/usage b/ports/libmysofa/usage similarity index 71% rename from ports/mysofa/usage rename to ports/libmysofa/usage index a20f511bb6e211..44244432951626 100644 --- a/ports/mysofa/usage +++ b/ports/libmysofa/usage @@ -1,4 +1,4 @@ - mysofa provides CMake targets: + libmysofa provides CMake targets: find_package(mysofa CONFIG REQUIRED) target_link_libraries(main PRIVATE mysofa::mysofa) diff --git a/ports/mysofa/vcpkg.json b/ports/libmysofa/vcpkg.json similarity index 93% rename from ports/mysofa/vcpkg.json rename to ports/libmysofa/vcpkg.json index d30e18208a0397..7d469db8ca107f 100644 --- a/ports/mysofa/vcpkg.json +++ b/ports/libmysofa/vcpkg.json @@ -1,5 +1,5 @@ { - "name": "mysofa", + "name": "libmysofa", "version": "1.3.2", "description": "Reader for AES SOFA files to get better HRTFs", "homepage": "https://github.com/hoene/libmysofa", diff --git a/versions/baseline.json b/versions/baseline.json index 90ace899a3a885..7236df88df167b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4684,6 +4684,10 @@ "baseline": "1.23.11", "port-version": 0 }, + "libmysofa": { + "baseline": "1.3.2", + "port-version": 0 + }, "libmysql": { "baseline": "8.0.34", "port-version": 1 @@ -5980,10 +5984,6 @@ "baseline": "3.4.3", "port-version": 0 }, - "mysofa": { - "baseline": "1.3.2", - "port-version": 0 - }, "mysql-connector-cpp": { "baseline": "8.0.32", "port-version": 1 diff --git a/versions/m-/mysofa.json b/versions/l-/libmysofa.json similarity index 58% rename from versions/m-/mysofa.json rename to versions/l-/libmysofa.json index 57df5895d5e44c..9a547e3edaee47 100644 --- a/versions/m-/mysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "59b5e7dfadb4cc9a037064f69ce741b5f7892530", + "git-tree": "66f84cc88f98399ac7b5e9d0b8fce3101dd6abf1", "version": "1.3.2", "port-version": 0 } From 570ed61804edb338231236790142c68894656942 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 23 Apr 2024 11:52:34 -0700 Subject: [PATCH 03/31] Fixing patch so that usage file is correct about how to depend on the mysofa target --- ports/libmysofa/fix-exports.patch | 149 +++++++++++++++++++++++++++--- versions/l-/libmysofa.json | 2 +- 2 files changed, 139 insertions(+), 12 deletions(-) diff --git a/ports/libmysofa/fix-exports.patch b/ports/libmysofa/fix-exports.patch index e4e01f405e7938..70e62fdbafb2d8 100644 --- a/ports/libmysofa/fix-exports.patch +++ b/ports/libmysofa/fix-exports.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index c092cb0..1a2a603 100644 +index 6e64623..439eb8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,9 +39,9 @@ if(${ADDRESS_SANITIZE} STREQUAL "ON") @@ -41,7 +41,7 @@ index c092cb0..1a2a603 100644 + DESTINATION share/mysofa ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 0de9632..2b6ff27 100644 +index dcaa92a..f5223bb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,6 +13,8 @@ use_c99() @@ -53,33 +53,160 @@ index 0de9632..2b6ff27 100644 if(NOT MSVC) if(NOT WIN32) find_library(MATH m) -@@ -81,6 +83,8 @@ set(public-headers +@@ -81,20 +83,22 @@ set(public-headers hrtf/mysofa.h ) +install(FILES "${public-headers}" DESTINATION include) + if(BUILD_STATIC_LIBS) - add_library(mysofa-static STATIC ${libsrc}) - target_include_directories(mysofa-static -@@ -88,7 +92,7 @@ target_include_directories(mysofa-static +-add_library(mysofa-static STATIC ${libsrc}) +-target_include_directories(mysofa-static ++add_library(mysofa STATIC ${libsrc}) ++target_include_directories(mysofa + PUBLIC "$" $ ) -target_link_libraries(mysofa-static LINK_PRIVATE ${MATH} ${ZLIB_LIBRARIES}) -+target_link_libraries(mysofa-static LINK_PRIVATE ${MATH} ZLIB::ZLIB) ++target_link_libraries(mysofa LINK_PRIVATE ${MATH} ZLIB::ZLIB) set_target_properties( - mysofa-static +- mysofa-static ++ mysofa PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1 POSITION_INDEPENDENT_CODE -@@ -120,7 +124,7 @@ if(BUILD_SHARED_LIBS) + ${BUILD_SHARED_LIBS}) +-set_target_properties( mysofa-static PROPERTIES PUBLIC_HEADER "${public-headers}" ) +-install(TARGETS mysofa-static ++set_target_properties( mysofa PROPERTIES PUBLIC_HEADER "${public-headers}" ) ++install(TARGETS mysofa + EXPORT mysofa_exports + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +@@ -103,61 +107,61 @@ install(TARGETS mysofa-static + if(UNIX + AND CODE_COVERAGE + AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") +- target_compile_options(mysofa-static PUBLIC -g -O0 -Wall -fprofile-arcs ++ target_compile_options(mysofa PUBLIC -g -O0 -Wall -fprofile-arcs + -ftest-coverage) + if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13) +- target_link_options(mysofa-static PUBLIC --coverage) ++ target_link_options(mysofa PUBLIC --coverage) + else() +- target_link_libraries(mysofa-static LINK_PUBLIC gcov --coverage) ++ target_link_libraries(mysofa LINK_PUBLIC gcov --coverage) + endif() + endif() + endif() + + if(BUILD_SHARED_LIBS) +- add_library(mysofa-shared SHARED ${libsrc}) +- target_include_directories(mysofa-shared ++ add_library(mysofa SHARED ${libsrc}) ++ target_include_directories(mysofa + PUBLIC "$" $ ) - target_link_libraries(mysofa-shared PRIVATE ${MATH} ${ZLIB_LIBRARIES}) -+ target_link_libraries(mysofa-shared PRIVATE ${MATH} ZLIB::ZLIB) - set_target_properties(mysofa-shared +- set_target_properties(mysofa-shared ++ target_link_libraries(mysofa PRIVATE ${MATH} ZLIB::ZLIB) ++ set_target_properties(mysofa PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1) # Rename the Windows import library (stub) of the DLL to prevent a name clash +- # with the mysofa-static library. +- set_target_properties(mysofa-shared +- PROPERTIES ARCHIVE_OUTPUT_NAME mysofa_shared) ++ # with the mysofa library. ++ set_target_properties(mysofa ++ PROPERTIES ARCHIVE_OUTPUT_NAME mysofa) + + set_property( +- TARGET mysofa-shared ++ TARGET mysofa + PROPERTY + VERSION + "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}" + ) +- set_property(TARGET mysofa-shared PROPERTY SOVERSION ++ set_property(TARGET mysofa PROPERTY SOVERSION + ${CPACK_PACKAGE_VERSION_MAJOR}) +- set_property(TARGET mysofa-shared PROPERTY C_VISIBILITY_PRESET hidden) +- generate_export_header(mysofa-shared ++ set_property(TARGET mysofa PROPERTY C_VISIBILITY_PRESET hidden) ++ generate_export_header(mysofa + BASE_NAME MYSOFA + EXPORT_FILE_NAME mysofa_export.h + EXPORT_MACRO_NAME MYSOFA_EXPORT +- STATIC_DEFINE MYSOFA_STATIC ++ STATIC_DEFINE mysofa + ) + + if(UNIX + AND CODE_COVERAGE + AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") +- target_compile_options(mysofa-shared PUBLIC -g -O0 -Wall -fprofile-arcs ++ target_compile_options(mysofa PUBLIC -g -O0 -Wall -fprofile-arcs + -ftest-coverage) + if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13) +- target_link_options(mysofa-shared PUBLIC --coverage) ++ target_link_options(mysofa PUBLIC --coverage) + else() +- target_link_libraries(mysofa-shared LINK_PUBLIC gcov --coverage) ++ target_link_libraries(mysofa LINK_PUBLIC gcov --coverage) + endif() + endif() + + install( +- TARGETS mysofa-shared ++ TARGETS mysofa + EXPORT mysofa_exports + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -165,16 +169,16 @@ if(BUILD_SHARED_LIBS) + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + else() +- generate_export_header(mysofa-static BASE_NAME mysofa EXPORT_FILE_NAME ++ generate_export_header(mysofa BASE_NAME mysofa EXPORT_FILE_NAME + mysofa_export.h) + endif() + + if(BUILD_TESTS) + add_executable(mysofa2json tests/sofa2json.c tests/json.c) + if(BUILD_STATIC_LIBS) +- target_link_libraries(mysofa2json mysofa-static) ++ target_link_libraries(mysofa2json mysofa) + else() +- target_link_libraries(mysofa2json mysofa-shared) ++ target_link_libraries(mysofa2json mysofa) + endif() + + add_executable( +@@ -193,9 +197,9 @@ if(BUILD_TESTS) + tests/json.c + tests/user_defined_variable.c) + if(BUILD_STATIC_LIBS) +- target_link_libraries(external mysofa-static ${CUNIT_LIBRARIES}) ++ target_link_libraries(external mysofa ${CUNIT_LIBRARIES}) + else() +- target_link_libraries(external mysofa-shared ${CUNIT_LIBRARIES} m) ++ target_link_libraries(external mysofa ${CUNIT_LIBRARIES} m) + endif() + add_test( + NAME external +@@ -211,9 +215,9 @@ if(BUILD_TESTS) + + add_executable(multithread tests/multithread.c) + if(BUILD_STATIC_LIBS) +- target_link_libraries(multithread mysofa-static pthread) ++ target_link_libraries(multithread mysofa pthread) + else() +- target_link_libraries(multithread mysofa-shared pthread m) ++ target_link_libraries(multithread mysofa pthread m) + endif() + add_test( + NAME multithread diff --git a/src/hrtf/mysofa.h b/src/hrtf/mysofa.h index 206e77b..538f0b6 100644 --- a/src/hrtf/mysofa.h diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 9a547e3edaee47..a742e5903c56ab 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "66f84cc88f98399ac7b5e9d0b8fce3101dd6abf1", + "git-tree": "5e0744108f55fa730b232da774ecc83426469dde", "version": "1.3.2", "port-version": 0 } From fc85f58c93c790da6ea222296f8090dc15cff327 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 23 Apr 2024 12:14:16 -0700 Subject: [PATCH 04/31] Fixing export patch to not require an include that doesn't get installed --- ports/libmysofa/fix-exports.patch | 14 +++++++++----- versions/l-/libmysofa.json | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ports/libmysofa/fix-exports.patch b/ports/libmysofa/fix-exports.patch index 70e62fdbafb2d8..4c933ff96eb465 100644 --- a/ports/libmysofa/fix-exports.patch +++ b/ports/libmysofa/fix-exports.patch @@ -208,19 +208,23 @@ index dcaa92a..f5223bb 100644 add_test( NAME multithread diff --git a/src/hrtf/mysofa.h b/src/hrtf/mysofa.h -index 206e77b..538f0b6 100644 +index 206e77b..494aa70 100644 --- a/src/hrtf/mysofa.h +++ b/src/hrtf/mysofa.h -@@ -14,6 +14,8 @@ extern "C" { +@@ -14,6 +14,12 @@ extern "C" { #include #include -+#include "mysofa_export.h" ++#ifndef MYSOFA_EXPORT ++ #define MYSOFA_EXPORT __declspec(dllexport) ++#else ++ #define MYSOFA_EXPORT __declspec(dllimport) ++#endif + #define MYSOFA_DEFAULT_NEIGH_STEP_ANGLE 0.5f #define MYSOFA_DEFAULT_NEIGH_STEP_RADIUS 0.01f -@@ -127,44 +129,44 @@ enum { +@@ -127,44 +133,44 @@ enum { MYSOFA_ONLY_SOURCES_WITH_MC_SUPPORTED }; @@ -289,7 +293,7 @@ index 206e77b..538f0b6 100644 struct MYSOFA_EASY { struct MYSOFA_HRTF *hrtf; -@@ -173,38 +175,38 @@ struct MYSOFA_EASY { +@@ -173,38 +179,38 @@ struct MYSOFA_EASY { float *fir; }; diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index a742e5903c56ab..f6061cf7f37671 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "5e0744108f55fa730b232da774ecc83426469dde", + "git-tree": "1b11a8884973909b4a60cd718712607c66114087", "version": "1.3.2", "port-version": 0 } From 213c2d11ba85466487c46aa06b596b69a94bf9ee Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 23 Apr 2024 12:31:30 -0700 Subject: [PATCH 05/31] Fixing build on non-windows platforms --- ports/libmysofa/fix-exports.patch | 10 ++++++---- versions/l-/libmysofa.json | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ports/libmysofa/fix-exports.patch b/ports/libmysofa/fix-exports.patch index 4c933ff96eb465..6be72ecc17997f 100644 --- a/ports/libmysofa/fix-exports.patch +++ b/ports/libmysofa/fix-exports.patch @@ -208,23 +208,25 @@ index dcaa92a..f5223bb 100644 add_test( NAME multithread diff --git a/src/hrtf/mysofa.h b/src/hrtf/mysofa.h -index 206e77b..494aa70 100644 +index 206e77b..cfa7b33 100644 --- a/src/hrtf/mysofa.h +++ b/src/hrtf/mysofa.h -@@ -14,6 +14,12 @@ extern "C" { +@@ -14,6 +14,14 @@ extern "C" { #include #include ++#ifdef _WIN32 +#ifndef MYSOFA_EXPORT + #define MYSOFA_EXPORT __declspec(dllexport) +#else + #define MYSOFA_EXPORT __declspec(dllimport) +#endif ++#endif + #define MYSOFA_DEFAULT_NEIGH_STEP_ANGLE 0.5f #define MYSOFA_DEFAULT_NEIGH_STEP_RADIUS 0.01f -@@ -127,44 +133,44 @@ enum { +@@ -127,44 +135,44 @@ enum { MYSOFA_ONLY_SOURCES_WITH_MC_SUPPORTED }; @@ -293,7 +295,7 @@ index 206e77b..494aa70 100644 struct MYSOFA_EASY { struct MYSOFA_HRTF *hrtf; -@@ -173,38 +179,38 @@ struct MYSOFA_EASY { +@@ -173,38 +181,38 @@ struct MYSOFA_EASY { float *fir; }; diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index f6061cf7f37671..be02358129b6d2 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1b11a8884973909b4a60cd718712607c66114087", + "git-tree": "d1a36c2018d0956ba720a880f001feba3b82a91d", "version": "1.3.2", "port-version": 0 } From 7c846b041ba06a147568481497f443a26f6699ce Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 23 Apr 2024 13:27:20 -0700 Subject: [PATCH 06/31] Fixing export on non windows platforms again --- ports/libmysofa/fix-exports.patch | 10 ++++++---- versions/l-/libmysofa.json | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ports/libmysofa/fix-exports.patch b/ports/libmysofa/fix-exports.patch index 6be72ecc17997f..76c9e95b6c0138 100644 --- a/ports/libmysofa/fix-exports.patch +++ b/ports/libmysofa/fix-exports.patch @@ -208,10 +208,10 @@ index dcaa92a..f5223bb 100644 add_test( NAME multithread diff --git a/src/hrtf/mysofa.h b/src/hrtf/mysofa.h -index 206e77b..cfa7b33 100644 +index 206e77b..1623234 100644 --- a/src/hrtf/mysofa.h +++ b/src/hrtf/mysofa.h -@@ -14,6 +14,14 @@ extern "C" { +@@ -14,6 +14,16 @@ extern "C" { #include #include @@ -221,12 +221,14 @@ index 206e77b..cfa7b33 100644 +#else + #define MYSOFA_EXPORT __declspec(dllimport) +#endif ++#else ++ #define MYSOFA_EXPORT +#endif + #define MYSOFA_DEFAULT_NEIGH_STEP_ANGLE 0.5f #define MYSOFA_DEFAULT_NEIGH_STEP_RADIUS 0.01f -@@ -127,44 +135,44 @@ enum { +@@ -127,44 +137,44 @@ enum { MYSOFA_ONLY_SOURCES_WITH_MC_SUPPORTED }; @@ -295,7 +297,7 @@ index 206e77b..cfa7b33 100644 struct MYSOFA_EASY { struct MYSOFA_HRTF *hrtf; -@@ -173,38 +181,38 @@ struct MYSOFA_EASY { +@@ -173,38 +183,38 @@ struct MYSOFA_EASY { float *fir; }; diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index be02358129b6d2..14b8adab86d4b5 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d1a36c2018d0956ba720a880f001feba3b82a91d", + "git-tree": "4469292a7def1fdddec22635a17e5f8b343e9b95", "version": "1.3.2", "port-version": 0 } From b6ac2e04366815f70085edf2c94c023ecbc6d8bd Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Wed, 24 Apr 2024 19:11:55 -0700 Subject: [PATCH 07/31] Reducing change --- ports/libmysofa/fix-exports.patch | 147 ++---------------------------- ports/libmysofa/portfile.cmake | 2 +- ports/libmysofa/usage | 4 +- versions/l-/libmysofa.json | 2 +- 4 files changed, 14 insertions(+), 141 deletions(-) diff --git a/ports/libmysofa/fix-exports.patch b/ports/libmysofa/fix-exports.patch index 76c9e95b6c0138..9a35aa5ec8734d 100644 --- a/ports/libmysofa/fix-exports.patch +++ b/ports/libmysofa/fix-exports.patch @@ -41,7 +41,7 @@ index 6e64623..439eb8d 100644 + DESTINATION share/mysofa ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index dcaa92a..f5223bb 100644 +index dcaa92a..4cfce5d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,6 +13,8 @@ use_c99() @@ -53,160 +53,33 @@ index dcaa92a..f5223bb 100644 if(NOT MSVC) if(NOT WIN32) find_library(MATH m) -@@ -81,20 +83,22 @@ set(public-headers +@@ -81,6 +83,8 @@ set(public-headers hrtf/mysofa.h ) +install(FILES "${public-headers}" DESTINATION include) + if(BUILD_STATIC_LIBS) --add_library(mysofa-static STATIC ${libsrc}) --target_include_directories(mysofa-static -+add_library(mysofa STATIC ${libsrc}) -+target_include_directories(mysofa - PUBLIC + add_library(mysofa-static STATIC ${libsrc}) + target_include_directories(mysofa-static +@@ -88,7 +92,7 @@ target_include_directories(mysofa-static "$" $ ) -target_link_libraries(mysofa-static LINK_PRIVATE ${MATH} ${ZLIB_LIBRARIES}) -+target_link_libraries(mysofa LINK_PRIVATE ${MATH} ZLIB::ZLIB) ++target_link_libraries(mysofa-static LINK_PRIVATE ${MATH} ZLIB::ZLIB) set_target_properties( -- mysofa-static -+ mysofa + mysofa-static PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1 POSITION_INDEPENDENT_CODE - ${BUILD_SHARED_LIBS}) --set_target_properties( mysofa-static PROPERTIES PUBLIC_HEADER "${public-headers}" ) --install(TARGETS mysofa-static -+set_target_properties( mysofa PROPERTIES PUBLIC_HEADER "${public-headers}" ) -+install(TARGETS mysofa - EXPORT mysofa_exports - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -@@ -103,61 +107,61 @@ install(TARGETS mysofa-static - if(UNIX - AND CODE_COVERAGE - AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") -- target_compile_options(mysofa-static PUBLIC -g -O0 -Wall -fprofile-arcs -+ target_compile_options(mysofa PUBLIC -g -O0 -Wall -fprofile-arcs - -ftest-coverage) - if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13) -- target_link_options(mysofa-static PUBLIC --coverage) -+ target_link_options(mysofa PUBLIC --coverage) - else() -- target_link_libraries(mysofa-static LINK_PUBLIC gcov --coverage) -+ target_link_libraries(mysofa LINK_PUBLIC gcov --coverage) - endif() - endif() - endif() - - if(BUILD_SHARED_LIBS) -- add_library(mysofa-shared SHARED ${libsrc}) -- target_include_directories(mysofa-shared -+ add_library(mysofa SHARED ${libsrc}) -+ target_include_directories(mysofa - PUBLIC +@@ -120,7 +124,7 @@ if(BUILD_SHARED_LIBS) "$" $ ) - target_link_libraries(mysofa-shared PRIVATE ${MATH} ${ZLIB_LIBRARIES}) -- set_target_properties(mysofa-shared -+ target_link_libraries(mysofa PRIVATE ${MATH} ZLIB::ZLIB) -+ set_target_properties(mysofa ++ target_link_libraries(mysofa-shared PRIVATE ${MATH} ZLIB::ZLIB) + set_target_properties(mysofa-shared PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1) # Rename the Windows import library (stub) of the DLL to prevent a name clash -- # with the mysofa-static library. -- set_target_properties(mysofa-shared -- PROPERTIES ARCHIVE_OUTPUT_NAME mysofa_shared) -+ # with the mysofa library. -+ set_target_properties(mysofa -+ PROPERTIES ARCHIVE_OUTPUT_NAME mysofa) - - set_property( -- TARGET mysofa-shared -+ TARGET mysofa - PROPERTY - VERSION - "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}" - ) -- set_property(TARGET mysofa-shared PROPERTY SOVERSION -+ set_property(TARGET mysofa PROPERTY SOVERSION - ${CPACK_PACKAGE_VERSION_MAJOR}) -- set_property(TARGET mysofa-shared PROPERTY C_VISIBILITY_PRESET hidden) -- generate_export_header(mysofa-shared -+ set_property(TARGET mysofa PROPERTY C_VISIBILITY_PRESET hidden) -+ generate_export_header(mysofa - BASE_NAME MYSOFA - EXPORT_FILE_NAME mysofa_export.h - EXPORT_MACRO_NAME MYSOFA_EXPORT -- STATIC_DEFINE MYSOFA_STATIC -+ STATIC_DEFINE mysofa - ) - - if(UNIX - AND CODE_COVERAGE - AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") -- target_compile_options(mysofa-shared PUBLIC -g -O0 -Wall -fprofile-arcs -+ target_compile_options(mysofa PUBLIC -g -O0 -Wall -fprofile-arcs - -ftest-coverage) - if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13) -- target_link_options(mysofa-shared PUBLIC --coverage) -+ target_link_options(mysofa PUBLIC --coverage) - else() -- target_link_libraries(mysofa-shared LINK_PUBLIC gcov --coverage) -+ target_link_libraries(mysofa LINK_PUBLIC gcov --coverage) - endif() - endif() - - install( -- TARGETS mysofa-shared -+ TARGETS mysofa - EXPORT mysofa_exports - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -@@ -165,16 +169,16 @@ if(BUILD_SHARED_LIBS) - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - ) - else() -- generate_export_header(mysofa-static BASE_NAME mysofa EXPORT_FILE_NAME -+ generate_export_header(mysofa BASE_NAME mysofa EXPORT_FILE_NAME - mysofa_export.h) - endif() - - if(BUILD_TESTS) - add_executable(mysofa2json tests/sofa2json.c tests/json.c) - if(BUILD_STATIC_LIBS) -- target_link_libraries(mysofa2json mysofa-static) -+ target_link_libraries(mysofa2json mysofa) - else() -- target_link_libraries(mysofa2json mysofa-shared) -+ target_link_libraries(mysofa2json mysofa) - endif() - - add_executable( -@@ -193,9 +197,9 @@ if(BUILD_TESTS) - tests/json.c - tests/user_defined_variable.c) - if(BUILD_STATIC_LIBS) -- target_link_libraries(external mysofa-static ${CUNIT_LIBRARIES}) -+ target_link_libraries(external mysofa ${CUNIT_LIBRARIES}) - else() -- target_link_libraries(external mysofa-shared ${CUNIT_LIBRARIES} m) -+ target_link_libraries(external mysofa ${CUNIT_LIBRARIES} m) - endif() - add_test( - NAME external -@@ -211,9 +215,9 @@ if(BUILD_TESTS) - - add_executable(multithread tests/multithread.c) - if(BUILD_STATIC_LIBS) -- target_link_libraries(multithread mysofa-static pthread) -+ target_link_libraries(multithread mysofa pthread) - else() -- target_link_libraries(multithread mysofa-shared pthread m) -+ target_link_libraries(multithread mysofa pthread m) - endif() - add_test( - NAME multithread diff --git a/src/hrtf/mysofa.h b/src/hrtf/mysofa.h index 206e77b..1623234 100644 --- a/src/hrtf/mysofa.h diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index 8f72f27683bcc0..82a05eb3b4793a 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -21,7 +21,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(PACKAGE_NAME mysofa CONFIG_PATH share/mysofa) +vcpkg_cmake_config_fixup(PACKAGE_NAME libmysofa CONFIG_PATH share/mysofa) vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/libmysofa/usage b/ports/libmysofa/usage index 44244432951626..241ad55aacae09 100644 --- a/ports/libmysofa/usage +++ b/ports/libmysofa/usage @@ -1,4 +1,4 @@ - libmysofa provides CMake targets: +libmysofa provides CMake targets: find_package(mysofa CONFIG REQUIRED) - target_link_libraries(main PRIVATE mysofa::mysofa) + target_link_libraries(main PRIVATE $,mysofa::mysofa-shared,mysofa::mysofa-static>) diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 14b8adab86d4b5..0461c9ee45c291 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "4469292a7def1fdddec22635a17e5f8b343e9b95", + "git-tree": "d0aba249addc02a07c10ec18359bc8da0757cae2", "version": "1.3.2", "port-version": 0 } From 467e78f890ee340cc09937b3631c907a9be4453a Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Mon, 29 Apr 2024 16:38:26 -0700 Subject: [PATCH 08/31] Implementing feedback --- ports/libmysofa/fix-exports.patch | 27 +-------------------------- ports/libmysofa/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/ports/libmysofa/fix-exports.patch b/ports/libmysofa/fix-exports.patch index 9a35aa5ec8734d..f7a7f725f597d3 100644 --- a/ports/libmysofa/fix-exports.patch +++ b/ports/libmysofa/fix-exports.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6e64623..439eb8d 100644 +index 6e64623..9fc1fd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,9 +39,9 @@ if(${ADDRESS_SANITIZE} STREQUAL "ON") @@ -15,31 +15,6 @@ index 6e64623..439eb8d 100644 if(BUILD_TESTS) -@@ -131,7 +131,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc" - install(EXPORT mysofa_exports - NAMESPACE mysofa:: - FILE mysofaTargets.cmake -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mysofa -+ DESTINATION share/mysofa - ) - - # Create a target export file for use from the build tree. -@@ -145,7 +145,7 @@ include(CMakePackageConfigHelpers) - # Configure package config file - configure_package_config_file(mysofaConfig.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/mysofaConfig.cmake -- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mysofa -+ INSTALL_DESTINATION share/mysofa - ) - - # Create package version file -@@ -159,5 +159,5 @@ write_basic_package_version_file( - install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/mysofaConfig.cmake - ${CMAKE_CURRENT_BINARY_DIR}/mysofaConfigVersion.cmake -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mysofa -+ DESTINATION share/mysofa - ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dcaa92a..4cfce5d 100644 --- a/src/CMakeLists.txt diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index 82a05eb3b4793a..ced8aef3d85c6e 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -21,7 +21,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(PACKAGE_NAME libmysofa CONFIG_PATH share/mysofa) +vcpkg_cmake_config_fixup(PACKAGE_NAME mysofa CONFIG_PATH lib/cmake/mysofa) vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") From f7a242661713579c6754a545898e1d8c0067c3ed Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Mon, 29 Apr 2024 16:39:33 -0700 Subject: [PATCH 09/31] Updating version --- versions/l-/libmysofa.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 0461c9ee45c291..0d2af454c7bc23 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d0aba249addc02a07c10ec18359bc8da0757cae2", + "git-tree": "0d9599445e5aa4cdda0e52071a02313bc82b3dfc", "version": "1.3.2", "port-version": 0 } From c9d449c891ff041a73074c02692fbe14cc0454f5 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Thu, 2 May 2024 16:51:48 -0700 Subject: [PATCH 10/31] In progress port update --- ports/libmysofa/fix-exports.patch | 142 ------------------------------ ports/libmysofa/portfile.cmake | 8 +- 2 files changed, 4 insertions(+), 146 deletions(-) diff --git a/ports/libmysofa/fix-exports.patch b/ports/libmysofa/fix-exports.patch index f7a7f725f597d3..e269e9d5900054 100644 --- a/ports/libmysofa/fix-exports.patch +++ b/ports/libmysofa/fix-exports.patch @@ -55,145 +55,3 @@ index dcaa92a..4cfce5d 100644 set_target_properties(mysofa-shared PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1) # Rename the Windows import library (stub) of the DLL to prevent a name clash -diff --git a/src/hrtf/mysofa.h b/src/hrtf/mysofa.h -index 206e77b..1623234 100644 ---- a/src/hrtf/mysofa.h -+++ b/src/hrtf/mysofa.h -@@ -14,6 +14,16 @@ extern "C" { - #include - #include - -+#ifdef _WIN32 -+#ifndef MYSOFA_EXPORT -+ #define MYSOFA_EXPORT __declspec(dllexport) -+#else -+ #define MYSOFA_EXPORT __declspec(dllimport) -+#endif -+#else -+ #define MYSOFA_EXPORT -+#endif -+ - #define MYSOFA_DEFAULT_NEIGH_STEP_ANGLE 0.5f - #define MYSOFA_DEFAULT_NEIGH_STEP_RADIUS 0.01f - -@@ -127,44 +137,44 @@ enum { - MYSOFA_ONLY_SOURCES_WITH_MC_SUPPORTED - }; - --struct MYSOFA_HRTF *mysofa_load(const char *filename, int *err); --struct MYSOFA_HRTF *mysofa_load_data(const char *data, size_t size, int *err); -+MYSOFA_EXPORT struct MYSOFA_HRTF *mysofa_load(const char *filename, int *err); -+MYSOFA_EXPORT struct MYSOFA_HRTF *mysofa_load_data(const char *data, size_t size, int *err); - --int mysofa_check(struct MYSOFA_HRTF *hrtf); --char *mysofa_getAttribute(struct MYSOFA_ATTRIBUTE *attr, char *name); --void mysofa_tospherical(struct MYSOFA_HRTF *hrtf); --void mysofa_tocartesian(struct MYSOFA_HRTF *hrtf); --void mysofa_free(struct MYSOFA_HRTF *hrtf); -+MYSOFA_EXPORT int mysofa_check(struct MYSOFA_HRTF *hrtf); -+MYSOFA_EXPORT char *mysofa_getAttribute(struct MYSOFA_ATTRIBUTE *attr, char *name); -+MYSOFA_EXPORT void mysofa_tospherical(struct MYSOFA_HRTF *hrtf); -+MYSOFA_EXPORT void mysofa_tocartesian(struct MYSOFA_HRTF *hrtf); -+MYSOFA_EXPORT void mysofa_free(struct MYSOFA_HRTF *hrtf); - --struct MYSOFA_LOOKUP *mysofa_lookup_init(struct MYSOFA_HRTF *hrtf); --int mysofa_lookup(struct MYSOFA_LOOKUP *lookup, float *coordinate); --void mysofa_lookup_free(struct MYSOFA_LOOKUP *lookup); -+MYSOFA_EXPORT struct MYSOFA_LOOKUP *mysofa_lookup_init(struct MYSOFA_HRTF *hrtf); -+MYSOFA_EXPORT int mysofa_lookup(struct MYSOFA_LOOKUP *lookup, float *coordinate); -+MYSOFA_EXPORT void mysofa_lookup_free(struct MYSOFA_LOOKUP *lookup); - --struct MYSOFA_NEIGHBORHOOD * -+MYSOFA_EXPORT struct MYSOFA_NEIGHBORHOOD * - mysofa_neighborhood_init(struct MYSOFA_HRTF *hrtf, - struct MYSOFA_LOOKUP *lookup); --struct MYSOFA_NEIGHBORHOOD *mysofa_neighborhood_init_withstepdefine( -+MYSOFA_EXPORT struct MYSOFA_NEIGHBORHOOD *mysofa_neighborhood_init_withstepdefine( - struct MYSOFA_HRTF *hrtf, struct MYSOFA_LOOKUP *lookup, - float neighbor_angle_step, float neighbor_radius_step); --int *mysofa_neighborhood(struct MYSOFA_NEIGHBORHOOD *neighborhood, int pos); --void mysofa_neighborhood_free(struct MYSOFA_NEIGHBORHOOD *neighborhood); -+MYSOFA_EXPORT int *mysofa_neighborhood(struct MYSOFA_NEIGHBORHOOD *neighborhood, int pos); -+MYSOFA_EXPORT void mysofa_neighborhood_free(struct MYSOFA_NEIGHBORHOOD *neighborhood); - --float *mysofa_interpolate(struct MYSOFA_HRTF *hrtf, float *cordinate, -+MYSOFA_EXPORT float *mysofa_interpolate(struct MYSOFA_HRTF *hrtf, float *cordinate, - int nearest, int *neighborhood, float *fir, - float *delays); - --int mysofa_resample(struct MYSOFA_HRTF *hrtf, float samplerate); --float mysofa_loudness(struct MYSOFA_HRTF *hrtf); --int mysofa_minphase(struct MYSOFA_HRTF *hrtf, float threshold); -+MYSOFA_EXPORT int mysofa_resample(struct MYSOFA_HRTF *hrtf, float samplerate); -+MYSOFA_EXPORT float mysofa_loudness(struct MYSOFA_HRTF *hrtf); -+MYSOFA_EXPORT int mysofa_minphase(struct MYSOFA_HRTF *hrtf, float threshold); - --struct MYSOFA_EASY *mysofa_cache_lookup(const char *filename, float samplerate); --struct MYSOFA_EASY *mysofa_cache_store(struct MYSOFA_EASY *, -+MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_cache_lookup(const char *filename, float samplerate); -+MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_cache_store(struct MYSOFA_EASY *, - const char *filename, float samplerate); --void mysofa_cache_release(struct MYSOFA_EASY *); --void mysofa_cache_release_all(void); -+MYSOFA_EXPORT void mysofa_cache_release(struct MYSOFA_EASY *); -+MYSOFA_EXPORT void mysofa_cache_release_all(void); - --void mysofa_c2s(float values[3]); --void mysofa_s2c(float values[3]); -+MYSOFA_EXPORT void mysofa_c2s(float values[3]); -+MYSOFA_EXPORT void mysofa_s2c(float values[3]); - - struct MYSOFA_EASY { - struct MYSOFA_HRTF *hrtf; -@@ -173,38 +183,38 @@ struct MYSOFA_EASY { - float *fir; - }; - --struct MYSOFA_EASY *mysofa_open(const char *filename, float samplerate, -+MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open(const char *filename, float samplerate, - int *filterlength, int *err); --struct MYSOFA_EASY *mysofa_open_no_norm(const char *filename, float samplerate, -+MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_no_norm(const char *filename, float samplerate, - int *filterlength, int *err); --struct MYSOFA_EASY *mysofa_open_advanced(const char *filename, float samplerate, -+MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_advanced(const char *filename, float samplerate, - int *filterlength, int *err, bool norm, - float neighbor_angle_step, - float neighbor_radius_step); --struct MYSOFA_EASY *mysofa_open_data(const char *data, long size, -+MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_data(const char *data, long size, - float samplerate, int *filterlength, - int *err); --struct MYSOFA_EASY *mysofa_open_data_no_norm(const char *data, long size, -+MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_data_no_norm(const char *data, long size, - float samplerate, - int *filterlength, int *err); --struct MYSOFA_EASY *mysofa_open_data_advanced( -+MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_data_advanced( - const char *data, long size, float samplerate, int *filterlength, int *err, - bool norm, float neighbor_angle_step, float neighbor_radius_step); --struct MYSOFA_EASY *mysofa_open_cached(const char *filename, float samplerate, -+MYSOFA_EXPORT struct MYSOFA_EASY *mysofa_open_cached(const char *filename, float samplerate, - int *filterlength, int *err); --void mysofa_getfilter_short(struct MYSOFA_EASY *easy, float x, float y, float z, -+MYSOFA_EXPORT void mysofa_getfilter_short(struct MYSOFA_EASY *easy, float x, float y, float z, - short *IRleft, short *IRright, int *delayLeft, - int *delayRight); --void mysofa_getfilter_float(struct MYSOFA_EASY *easy, float x, float y, float z, -+MYSOFA_EXPORT void mysofa_getfilter_float(struct MYSOFA_EASY *easy, float x, float y, float z, - float *IRleft, float *IRright, float *delayLeft, - float *delayRight); --void mysofa_getfilter_float_nointerp(struct MYSOFA_EASY *easy, float x, float y, -+MYSOFA_EXPORT void mysofa_getfilter_float_nointerp(struct MYSOFA_EASY *easy, float x, float y, - float z, float *IRleft, float *IRright, - float *delayLeft, float *delayRight); --void mysofa_close(struct MYSOFA_EASY *easy); --void mysofa_close_cached(struct MYSOFA_EASY *easy); -+MYSOFA_EXPORT void mysofa_close(struct MYSOFA_EASY *easy); -+MYSOFA_EXPORT void mysofa_close_cached(struct MYSOFA_EASY *easy); - --void mysofa_getversion(int *major, int *minor, int *patch); -+MYSOFA_EXPORT void mysofa_getversion(int *major, int *minor, int *patch); - - #ifdef __cplusplus - } diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index ced8aef3d85c6e..5c3e0b924b1580 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -1,9 +1,9 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO hoene/libmysofa - REF "v${VERSION}" - SHA512 de7f5d36079b8be06860f3380c7a359e22f59e3e57d86f5f5df1512a20b321e392e2452a34f3ea979779fb84c7493fd4febd386c89b6da4182d6c0cfb0ce1d75 - HEAD_REF master + REPO honeybunch/libmysofa + REF "6d475b650a79c1b6bb926f07751d2ddc7ba19504" + SHA512 a26d3f01c7a36975022ded0010a8f4b947ef45a19221ed91fcd4e89595acc2b5a40091cd7b404c8a55fb5c4bd7703886bd7750191e5f6b19d209c794dc2ec60b + HEAD_REF "v${VERSION}" PATCHES fix-exports.patch ) From 4127d556c1f8bde09232acae3d8e1ea4d13f6e42 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Thu, 2 May 2024 16:58:32 -0700 Subject: [PATCH 11/31] Tweaking port cmake config fixup --- ports/libmysofa/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index 5c3e0b924b1580..1093a050a2b4b2 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -21,7 +21,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(PACKAGE_NAME mysofa CONFIG_PATH lib/cmake/mysofa) +vcpkg_cmake_config_fixup(PACKAGE_NAME libmysofa CONFIG_PATH lib/cmake/libmysofa) vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") From b543d5df0d44010a02599bc722ae4c89c7253a53 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Thu, 2 May 2024 17:14:34 -0700 Subject: [PATCH 12/31] Trying to fix config fixup --- ports/libmysofa/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index 1093a050a2b4b2..2bfdba0f4c3ba6 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -20,8 +20,8 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME mysofa CONFIG_PATH lib/cmake/mysofa) vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(PACKAGE_NAME libmysofa CONFIG_PATH lib/cmake/libmysofa) vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") From 3572fc12cd55543dcaff9d8e895a874af3b7882d Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Thu, 2 May 2024 17:43:54 -0700 Subject: [PATCH 13/31] Updating version --- versions/l-/libmysofa.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 0d2af454c7bc23..fb793e6bc212df 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0d9599445e5aa4cdda0e52071a02313bc82b3dfc", + "git-tree": "65b8b9a807b3c0e02a3d554315b8f91d41a39591", "version": "1.3.2", "port-version": 0 } From ac5ece6d979fdc0cec05ffc5a42b216bc74b5f0f Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 10 Sep 2024 15:01:25 -0700 Subject: [PATCH 14/31] Updating port to point to patched upstream --- ports/libmysofa/portfile.cmake | 9 +++++---- ports/libmysofa/skip-install-sample.patch | 17 +++++++++++++++++ .../{fix-exports.patch => use-vcpkg-zlib.patch} | 17 ----------------- versions/l-/libmysofa.json | 2 +- 4 files changed, 23 insertions(+), 22 deletions(-) create mode 100644 ports/libmysofa/skip-install-sample.patch rename ports/libmysofa/{fix-exports.patch => use-vcpkg-zlib.patch} (68%) diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index 2bfdba0f4c3ba6..7d27cd4ecd9121 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -1,11 +1,12 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO honeybunch/libmysofa - REF "6d475b650a79c1b6bb926f07751d2ddc7ba19504" - SHA512 a26d3f01c7a36975022ded0010a8f4b947ef45a19221ed91fcd4e89595acc2b5a40091cd7b404c8a55fb5c4bd7703886bd7750191e5f6b19d209c794dc2ec60b + REPO hoene/libmysofa + REF "1f9c8df42dfd6765e390ed8840341f15e1ab997b" + SHA512 67ce39d78981dc95cf190b1be4addceec4ecc7c2b14660da53a856be8fcff97a2f238343fccac2d042212e5a101eaf26fd12b78c86d0f6ce022bb79aa9815c67 HEAD_REF "v${VERSION}" PATCHES - fix-exports.patch + use-vcpkg-zlib.patch + skip-install-sample.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) diff --git a/ports/libmysofa/skip-install-sample.patch b/ports/libmysofa/skip-install-sample.patch new file mode 100644 index 00000000000000..71bf577f78bec9 --- /dev/null +++ b/ports/libmysofa/skip-install-sample.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6e64623..9fc1fd4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,9 +39,9 @@ if(${ADDRESS_SANITIZE} STREQUAL "ON") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") + endif() + +-install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) +-install(FILES share/MIT_KEMAR_normal_pinna.sofa +- DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) ++#install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) ++#install(FILES share/MIT_KEMAR_normal_pinna.sofa ++# DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) + + if(BUILD_TESTS) + diff --git a/ports/libmysofa/fix-exports.patch b/ports/libmysofa/use-vcpkg-zlib.patch similarity index 68% rename from ports/libmysofa/fix-exports.patch rename to ports/libmysofa/use-vcpkg-zlib.patch index e269e9d5900054..6beee72117bc90 100644 --- a/ports/libmysofa/fix-exports.patch +++ b/ports/libmysofa/use-vcpkg-zlib.patch @@ -1,20 +1,3 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6e64623..9fc1fd4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -39,9 +39,9 @@ if(${ADDRESS_SANITIZE} STREQUAL "ON") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") - endif() - --install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) --install(FILES share/MIT_KEMAR_normal_pinna.sofa -- DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) -+#install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) -+#install(FILES share/MIT_KEMAR_normal_pinna.sofa -+# DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) - - if(BUILD_TESTS) - diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dcaa92a..4cfce5d 100644 --- a/src/CMakeLists.txt diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index fb793e6bc212df..529f15f885dcf4 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "65b8b9a807b3c0e02a3d554315b8f91d41a39591", + "git-tree": "0878f0b64c901c6f410e2d8e47d5f9f1f9532b10", "version": "1.3.2", "port-version": 0 } From 94b343acfe7577ea44dd08fa6e2f1f0496b25ddf Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Thu, 12 Sep 2024 09:44:20 -0700 Subject: [PATCH 15/31] Removing unnecessary patch --- ports/libmysofa/portfile.cmake | 2 +- ports/libmysofa/skip-install-sample.patch | 17 ----------------- versions/l-/libmysofa.json | 2 +- 3 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 ports/libmysofa/skip-install-sample.patch diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index 7d27cd4ecd9121..c04cdf0d24cbea 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -6,7 +6,6 @@ vcpkg_from_github( HEAD_REF "v${VERSION}" PATCHES use-vcpkg-zlib.patch - skip-install-sample.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) @@ -26,5 +25,6 @@ vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/libmysofa/skip-install-sample.patch b/ports/libmysofa/skip-install-sample.patch deleted file mode 100644 index 71bf577f78bec9..00000000000000 --- a/ports/libmysofa/skip-install-sample.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6e64623..9fc1fd4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -39,9 +39,9 @@ if(${ADDRESS_SANITIZE} STREQUAL "ON") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") - endif() - --install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) --install(FILES share/MIT_KEMAR_normal_pinna.sofa -- DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) -+#install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) -+#install(FILES share/MIT_KEMAR_normal_pinna.sofa -+# DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) - - if(BUILD_TESTS) - diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 529f15f885dcf4..18789e40f6de25 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0878f0b64c901c6f410e2d8e47d5f9f1f9532b10", + "git-tree": "9b36a9a6c78cff5fe259af52e1733c002018119b", "version": "1.3.2", "port-version": 0 } From 14a0b87aebc369e76d23d6430f5bfd6f98e99d34 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Thu, 12 Sep 2024 10:31:54 -0700 Subject: [PATCH 16/31] Bringing back patch that skips default file install --- ports/libmysofa/portfile.cmake | 3 ++- ports/libmysofa/skip-install-sample.patch | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 ports/libmysofa/skip-install-sample.patch diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index c04cdf0d24cbea..4bd5f164bbc045 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -5,6 +5,8 @@ vcpkg_from_github( SHA512 67ce39d78981dc95cf190b1be4addceec4ecc7c2b14660da53a856be8fcff97a2f238343fccac2d042212e5a101eaf26fd12b78c86d0f6ce022bb79aa9815c67 HEAD_REF "v${VERSION}" PATCHES + # Need this so downstream doesn't try to install files that we would otherwise have to remove from the debug/share tree + skip-install-sample.patch use-vcpkg-zlib.patch ) @@ -25,6 +27,5 @@ vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/libmysofa/skip-install-sample.patch b/ports/libmysofa/skip-install-sample.patch new file mode 100644 index 00000000000000..6e880059d9a0a7 --- /dev/null +++ b/ports/libmysofa/skip-install-sample.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6e64623..9fc1fd4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,9 +39,9 @@ if(${ADDRESS_SANITIZE} STREQUAL "ON") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") + endif() + +-install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) +-install(FILES share/MIT_KEMAR_normal_pinna.sofa +- DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) ++#install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) ++#install(FILES share/MIT_KEMAR_normal_pinna.sofa ++# DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) + + if(BUILD_TESTS) \ No newline at end of file From a09c5a718ff2a73a54c998ab92d7e829032d992a Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Thu, 12 Sep 2024 10:32:12 -0700 Subject: [PATCH 17/31] Updating version --- versions/l-/libmysofa.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 18789e40f6de25..8c8fa2b4b36a09 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "9b36a9a6c78cff5fe259af52e1733c002018119b", + "git-tree": "5e5d80b2fde2a996b0fcaee9fef5bf5c6ba2de67", "version": "1.3.2", "port-version": 0 } From a612c173031a340242c21baac346cc7894f8fa23 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Thu, 12 Sep 2024 10:37:23 -0700 Subject: [PATCH 18/31] Fixing patch --- ports/libmysofa/skip-install-sample.patch | 3 ++- versions/l-/libmysofa.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/libmysofa/skip-install-sample.patch b/ports/libmysofa/skip-install-sample.patch index 6e880059d9a0a7..71bf577f78bec9 100644 --- a/ports/libmysofa/skip-install-sample.patch +++ b/ports/libmysofa/skip-install-sample.patch @@ -13,4 +13,5 @@ index 6e64623..9fc1fd4 100644 +#install(FILES share/MIT_KEMAR_normal_pinna.sofa +# DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) - if(BUILD_TESTS) \ No newline at end of file + if(BUILD_TESTS) + diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 8c8fa2b4b36a09..7bb5136143abab 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "5e5d80b2fde2a996b0fcaee9fef5bf5c6ba2de67", + "git-tree": "c4a5f80aaab8d5d10f2b23cf10a80f7b1dd71281", "version": "1.3.2", "port-version": 0 } From 1c363f1b451afa2994abbeb6df2dde71d6fec6ea Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 17 Sep 2024 11:31:06 -0700 Subject: [PATCH 19/31] Addressing some review feedback --- ports/libmysofa/portfile.cmake | 2 -- ports/libmysofa/vcpkg.json | 2 +- versions/l-/libmysofa.json | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index 4bd5f164bbc045..8e7a86e5faca0b 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -10,14 +10,12 @@ vcpkg_from_github( use-vcpkg-zlib.patch ) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DBUILD_TESTS=OFF - -DBUILD_SHARED_LIBS=${BUILD_SHARED} -DBUILD_STATIC_LIBS=${BUILD_STATIC} ) diff --git a/ports/libmysofa/vcpkg.json b/ports/libmysofa/vcpkg.json index 7d469db8ca107f..3d6b7f28740099 100644 --- a/ports/libmysofa/vcpkg.json +++ b/ports/libmysofa/vcpkg.json @@ -1,7 +1,7 @@ { "name": "libmysofa", "version": "1.3.2", - "description": "Reader for AES SOFA files to get better HRTFs", + "description": "Reader for AES SOFA files to get better HRTFs (Head-Relative Transfer Functions)", "homepage": "https://github.com/hoene/libmysofa", "license": "BSD-3-Clause", "dependencies": [ diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 7bb5136143abab..603b7700006de1 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c4a5f80aaab8d5d10f2b23cf10a80f7b1dd71281", + "git-tree": "8121dd648438424b5860369c43c50d4c05b35439", "version": "1.3.2", "port-version": 0 } From 4bbf66b381200d6213b23ec81680bf92ec30b818 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 17 Sep 2024 11:38:10 -0700 Subject: [PATCH 20/31] Updating zlib dependency in cmake config --- ports/libmysofa/use-vcpkg-zlib.patch | 15 ++++++++++++++- versions/l-/libmysofa.json | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ports/libmysofa/use-vcpkg-zlib.patch b/ports/libmysofa/use-vcpkg-zlib.patch index 6beee72117bc90..13bf530b9cc60a 100644 --- a/ports/libmysofa/use-vcpkg-zlib.patch +++ b/ports/libmysofa/use-vcpkg-zlib.patch @@ -1,5 +1,18 @@ +diff --git a/mysofaConfig.cmake.in b/mysofaConfig.cmake.in +index 03a2c42..372396d 100644 +--- a/mysofaConfig.cmake.in ++++ b/mysofaConfig.cmake.in +@@ -3,7 +3,7 @@ + include(CMakeFindDependencyMacro) + + # ZLIB is a private link dependency of mysofa-static. +-find_dependency(ZLIB) ++find_dependency(ZLIB::ZLIB) + + include(${CMAKE_CURRENT_LIST_DIR}/mysofaTargets.cmake) + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index dcaa92a..4cfce5d 100644 +index 018f4ce..3ef752e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,6 +13,8 @@ use_c99() diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 603b7700006de1..23ea9469f61566 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "8121dd648438424b5860369c43c50d4c05b35439", + "git-tree": "26d464f37b78b1fd0aa333a38676f915d359a202", "version": "1.3.2", "port-version": 0 } From e6fb75f4f6805adfc5a8acb79e699670d8607241 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 17 Sep 2024 13:01:38 -0700 Subject: [PATCH 21/31] Updating patch --- ports/libmysofa/use-vcpkg-zlib.patch | 13 ------------- versions/l-/libmysofa.json | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/ports/libmysofa/use-vcpkg-zlib.patch b/ports/libmysofa/use-vcpkg-zlib.patch index 13bf530b9cc60a..88c385bd354af8 100644 --- a/ports/libmysofa/use-vcpkg-zlib.patch +++ b/ports/libmysofa/use-vcpkg-zlib.patch @@ -1,16 +1,3 @@ -diff --git a/mysofaConfig.cmake.in b/mysofaConfig.cmake.in -index 03a2c42..372396d 100644 ---- a/mysofaConfig.cmake.in -+++ b/mysofaConfig.cmake.in -@@ -3,7 +3,7 @@ - include(CMakeFindDependencyMacro) - - # ZLIB is a private link dependency of mysofa-static. --find_dependency(ZLIB) -+find_dependency(ZLIB::ZLIB) - - include(${CMAKE_CURRENT_LIST_DIR}/mysofaTargets.cmake) - diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 018f4ce..3ef752e 100644 --- a/src/CMakeLists.txt diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 23ea9469f61566..0ee3addcc4a1aa 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "26d464f37b78b1fd0aa333a38676f915d359a202", + "git-tree": "0a4575587433d22eac38527b2e98724c36fe230a", "version": "1.3.2", "port-version": 0 } From ecf5e4ecbbdb9aedfcbdbcb77eb4d2aa647a3a93 Mon Sep 17 00:00:00 2001 From: Ada Tufankjian Date: Tue, 17 Sep 2024 17:39:04 -0700 Subject: [PATCH 22/31] Update ports/libmysofa/usage Co-authored-by: Kai Pastor --- ports/libmysofa/usage | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/libmysofa/usage b/ports/libmysofa/usage index 241ad55aacae09..16d33c2a279268 100644 --- a/ports/libmysofa/usage +++ b/ports/libmysofa/usage @@ -1,4 +1,6 @@ libmysofa provides CMake targets: - find_package(mysofa CONFIG REQUIRED) - target_link_libraries(main PRIVATE $,mysofa::mysofa-shared,mysofa::mysofa-static>) + find_package(mysofa CONFIG REQUIRED) + target_link_libraries(main PRIVATE $,mysofa::mysofa-shared,mysofa::mysofa-static>) +~~~ +as formatted by tool heuristics. From e54cc54b83b04c6174f8d916e1f405965e4e98bc Mon Sep 17 00:00:00 2001 From: Ada Tufankjian Date: Tue, 17 Sep 2024 17:39:32 -0700 Subject: [PATCH 23/31] Update usage --- ports/libmysofa/usage | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/libmysofa/usage b/ports/libmysofa/usage index 16d33c2a279268..e7cce3ad0e24a9 100644 --- a/ports/libmysofa/usage +++ b/ports/libmysofa/usage @@ -2,5 +2,3 @@ libmysofa provides CMake targets: find_package(mysofa CONFIG REQUIRED) target_link_libraries(main PRIVATE $,mysofa::mysofa-shared,mysofa::mysofa-static>) -~~~ -as formatted by tool heuristics. From 42d100d23ae4ef4c76044f441698ae4bee280b47 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 17 Sep 2024 17:48:19 -0700 Subject: [PATCH 24/31] Updating version --- versions/l-/libmysofa.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 0ee3addcc4a1aa..b2c961e1291c43 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0a4575587433d22eac38527b2e98724c36fe230a", + "git-tree": "5890fa56a6686c822dd5143b9c2e822d845bfd61", "version": "1.3.2", "port-version": 0 } From bd9338750d734a4f416ed5babaad6e531107735a Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Wed, 18 Sep 2024 09:19:39 -0700 Subject: [PATCH 25/31] Stripping port specific zlib nonsense --- ports/libmysofa/use-vcpkg-zlib.patch | 52 +++++++++++++++++++++++++--- versions/l-/libmysofa.json | 2 +- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/ports/libmysofa/use-vcpkg-zlib.patch b/ports/libmysofa/use-vcpkg-zlib.patch index 88c385bd354af8..06c2fbc1f705d5 100644 --- a/ports/libmysofa/use-vcpkg-zlib.patch +++ b/ports/libmysofa/use-vcpkg-zlib.patch @@ -1,8 +1,8 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 018f4ce..3ef752e 100644 +index 018f4ce..90ec50d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -13,6 +13,8 @@ use_c99() +@@ -13,21 +13,25 @@ use_c99() configure_file(config.h.in config.h) include_directories(${CMAKE_CURRENT_BINARY_DIR}) @@ -11,7 +11,49 @@ index 018f4ce..3ef752e 100644 if(NOT MSVC) if(NOT WIN32) find_library(MATH m) -@@ -81,6 +83,8 @@ set(public-headers + else() + set(MATH "") + endif() +- include(FindZLIB) ++ #include(FindZLIB) + else() + set(MATH "") ++ #[[ + find_program(NUGET nuget) + if(NUGET) + execute_process(COMMAND ${NUGET} install zlib) + endif() + include_directories( + ${PROJECT_SOURCE_DIR}/windows/third-party/zlib-1.2.11/include/) ++ ]]# + endif() + + if(NOT MSVC) +@@ -36,12 +40,13 @@ if(NOT MSVC) + else() + set(MATH "") + endif() +- include(FindZLIB) +- include_directories(${ZLIB_INCLUDE_DIRS}) ++ #include(FindZLIB) ++ #include_directories(${ZLIB_INCLUDE_DIRS}) + set(PKG_CONFIG_PRIVATELIBS "-lm ${PKG_CONFIG_PRIVATELIBS}") + set(PKG_CONFIG_PRIVATELIBS "-lz ${PKG_CONFIG_PRIVATELIBS}") + else() + set(MATH "") ++ #[[ + find_program(NUGET nuget) + if(NOT NUGET) + message( +@@ -53,6 +58,7 @@ else() + endif() + include_directories( + ${PROJECT_SOURCE_DIR}/windows/third-party/zlib-1.2.11/include/) ++ ]]# + endif() + + set(libsrc +@@ -81,6 +87,8 @@ set(public-headers hrtf/mysofa.h ) @@ -20,7 +62,7 @@ index 018f4ce..3ef752e 100644 if(BUILD_STATIC_LIBS) add_library(mysofa-static STATIC ${libsrc}) target_include_directories(mysofa-static -@@ -88,7 +92,7 @@ target_include_directories(mysofa-static +@@ -88,7 +96,7 @@ target_include_directories(mysofa-static "$" $ ) @@ -29,7 +71,7 @@ index 018f4ce..3ef752e 100644 set_target_properties( mysofa-static PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1 POSITION_INDEPENDENT_CODE -@@ -120,7 +124,7 @@ if(BUILD_SHARED_LIBS) +@@ -120,7 +128,7 @@ if(BUILD_SHARED_LIBS) "$" $ ) diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index b2c961e1291c43..1a8374f6fb68e7 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "5890fa56a6686c822dd5143b9c2e822d845bfd61", + "git-tree": "8baeb806ef3c7728c05b3a3f7c9b5d47d6891054", "version": "1.3.2", "port-version": 0 } From bd402af3f688a60d3138191ca97073d5881b35b2 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Wed, 25 Sep 2024 17:06:17 -0700 Subject: [PATCH 26/31] Removing patch to skip installing sofa files and instead just deleting them from debug/share --- ports/libmysofa/portfile.cmake | 3 +-- ports/libmysofa/skip-install-sample.patch | 17 ----------------- versions/l-/libmysofa.json | 2 +- 3 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 ports/libmysofa/skip-install-sample.patch diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index 8e7a86e5faca0b..3ac73287bb299a 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -5,8 +5,6 @@ vcpkg_from_github( SHA512 67ce39d78981dc95cf190b1be4addceec4ecc7c2b14660da53a856be8fcff97a2f238343fccac2d042212e5a101eaf26fd12b78c86d0f6ce022bb79aa9815c67 HEAD_REF "v${VERSION}" PATCHES - # Need this so downstream doesn't try to install files that we would otherwise have to remove from the debug/share tree - skip-install-sample.patch use-vcpkg-zlib.patch ) @@ -25,5 +23,6 @@ vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/libmysofa/skip-install-sample.patch b/ports/libmysofa/skip-install-sample.patch deleted file mode 100644 index 71bf577f78bec9..00000000000000 --- a/ports/libmysofa/skip-install-sample.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6e64623..9fc1fd4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -39,9 +39,9 @@ if(${ADDRESS_SANITIZE} STREQUAL "ON") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") - endif() - --install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) --install(FILES share/MIT_KEMAR_normal_pinna.sofa -- DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) -+#install(FILES share/default.sofa DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) -+#install(FILES share/MIT_KEMAR_normal_pinna.sofa -+# DESTINATION ${CMAKE_INSTALL_DATADIR}/libmysofa) - - if(BUILD_TESTS) - diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 1a8374f6fb68e7..b27511e0c697ae 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "8baeb806ef3c7728c05b3a3f7c9b5d47d6891054", + "git-tree": "64a33a6b2be828aaaa86c53ff9d8d80048ab69e3", "version": "1.3.2", "port-version": 0 } From cc8105a3f9be1aa7672ab34b57c72a7b69b87242 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Wed, 25 Sep 2024 20:21:27 -0700 Subject: [PATCH 27/31] Manually resolving symlink --- ports/libmysofa/portfile.cmake | 6 ++++++ versions/l-/libmysofa.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index 3ac73287bb299a..1a4204c252197d 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -24,5 +24,11 @@ vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# default.sofa is a symlink to MIT_KEMAR_normal_pinna.sofa, which can cause problems when downstream tries to copy these files around. +# Delete that symlink and just make a copy of the file instead +file(REMOVE "${CURRENT_PACKAGES_DIR}/share/default.sofa") +file(COPY_FILE "${CURRENT_PACKAGES_DIR}/share/MIT_KEMAR_normal_pinna.sofa" "${CURRENT_PACKAGES_DIR}/share/default.sofa") + file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index b27511e0c697ae..1243b9ee8df8f4 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "64a33a6b2be828aaaa86c53ff9d8d80048ab69e3", + "git-tree": "ca0139c0436b52a293f22d55c7f36512a3ec7c69", "version": "1.3.2", "port-version": 0 } From 4cd9b15d5bd084e62b8fc762d4e07aeb7c00f11e Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Wed, 25 Sep 2024 20:29:53 -0700 Subject: [PATCH 28/31] Fixing obvious path mistake --- ports/libmysofa/portfile.cmake | 2 +- versions/l-/libmysofa.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index 1a4204c252197d..f525c2a4bc0525 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -28,7 +28,7 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") # default.sofa is a symlink to MIT_KEMAR_normal_pinna.sofa, which can cause problems when downstream tries to copy these files around. # Delete that symlink and just make a copy of the file instead file(REMOVE "${CURRENT_PACKAGES_DIR}/share/default.sofa") -file(COPY_FILE "${CURRENT_PACKAGES_DIR}/share/MIT_KEMAR_normal_pinna.sofa" "${CURRENT_PACKAGES_DIR}/share/default.sofa") +file(COPY_FILE "${CURRENT_PACKAGES_DIR}/share/${PORT}/MIT_KEMAR_normal_pinna.sofa" "${CURRENT_PACKAGES_DIR}/share/${PORT}/default.sofa") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 1243b9ee8df8f4..5104b562fc0db9 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "ca0139c0436b52a293f22d55c7f36512a3ec7c69", + "git-tree": "f8e26a1fd05fb40252d366ce38e327655fe70021", "version": "1.3.2", "port-version": 0 } From 389b1c27d44437a4f7f6512c836d5ca7d862f5e9 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Wed, 25 Sep 2024 20:44:49 -0700 Subject: [PATCH 29/31] Only removing default.sofa if it exists --- ports/libmysofa/portfile.cmake | 4 +++- versions/l-/libmysofa.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index f525c2a4bc0525..23ec7ccc235673 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -27,7 +27,9 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") # default.sofa is a symlink to MIT_KEMAR_normal_pinna.sofa, which can cause problems when downstream tries to copy these files around. # Delete that symlink and just make a copy of the file instead -file(REMOVE "${CURRENT_PACKAGES_DIR}/share/default.sofa") +if(EXISTS "${CURRENT_PACKAGES_DIR}/share/default.sofa") + file(REMOVE "${CURRENT_PACKAGES_DIR}/share/default.sofa") +endif() file(COPY_FILE "${CURRENT_PACKAGES_DIR}/share/${PORT}/MIT_KEMAR_normal_pinna.sofa" "${CURRENT_PACKAGES_DIR}/share/${PORT}/default.sofa") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 5104b562fc0db9..6678c1e8768e28 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "f8e26a1fd05fb40252d366ce38e327655fe70021", + "git-tree": "a09cc7ad3a7f72639ae0d4b5ca29e9be41ee53c8", "version": "1.3.2", "port-version": 0 } From f2a8b74bc26fa8c154ba7a035e52aadb1cddb039 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Wed, 25 Sep 2024 20:48:18 -0700 Subject: [PATCH 30/31] Changing where we swap out the symlink --- ports/libmysofa/portfile.cmake | 15 ++++++++------- versions/l-/libmysofa.json | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index 23ec7ccc235673..b0cce37045b6b2 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -8,6 +8,14 @@ vcpkg_from_github( use-vcpkg-zlib.patch ) +# default.sofa is a symlink to MIT_KEMAR_normal_pinna.sofa, which can cause problems when downstream tries to copy these files around. +# Delete that symlink and just make a copy of the file instead +# We do this before we even configure so that the port otherwise remains unaltered +if(EXISTS "${SOURCE_PATH}/share/default.sofa") + file(REMOVE "${SOURCE_PATH}/share/default.sofa") +endif() +file(COPY_FILE "${SOURCE_PATH}/share/MIT_KEMAR_normal_pinna.sofa" "${SOURCE_PATH}/share/default.sofa") + string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) vcpkg_cmake_configure( @@ -25,12 +33,5 @@ vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -# default.sofa is a symlink to MIT_KEMAR_normal_pinna.sofa, which can cause problems when downstream tries to copy these files around. -# Delete that symlink and just make a copy of the file instead -if(EXISTS "${CURRENT_PACKAGES_DIR}/share/default.sofa") - file(REMOVE "${CURRENT_PACKAGES_DIR}/share/default.sofa") -endif() -file(COPY_FILE "${CURRENT_PACKAGES_DIR}/share/${PORT}/MIT_KEMAR_normal_pinna.sofa" "${CURRENT_PACKAGES_DIR}/share/${PORT}/default.sofa") - file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 6678c1e8768e28..659ce1aa679f5f 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a09cc7ad3a7f72639ae0d4b5ca29e9be41ee53c8", + "git-tree": "3750e9c2f993280e92bf61c7dbeb0807874473b2", "version": "1.3.2", "port-version": 0 } From f9a497b7647a2149fe8f885d20198333da84b874 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Wed, 25 Sep 2024 20:54:12 -0700 Subject: [PATCH 31/31] Improving comment --- ports/libmysofa/portfile.cmake | 5 ++--- versions/l-/libmysofa.json | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ports/libmysofa/portfile.cmake b/ports/libmysofa/portfile.cmake index b0cce37045b6b2..f8ccce7a2d7ab2 100644 --- a/ports/libmysofa/portfile.cmake +++ b/ports/libmysofa/portfile.cmake @@ -8,9 +8,8 @@ vcpkg_from_github( use-vcpkg-zlib.patch ) -# default.sofa is a symlink to MIT_KEMAR_normal_pinna.sofa, which can cause problems when downstream tries to copy these files around. -# Delete that symlink and just make a copy of the file instead -# We do this before we even configure so that the port otherwise remains unaltered +# default.sofa is a symlink to MIT_KEMAR_normal_pinna.sofa, +# which can cause problems e.g. on Windows file systems. if(EXISTS "${SOURCE_PATH}/share/default.sofa") file(REMOVE "${SOURCE_PATH}/share/default.sofa") endif() diff --git a/versions/l-/libmysofa.json b/versions/l-/libmysofa.json index 659ce1aa679f5f..40580588a8b309 100644 --- a/versions/l-/libmysofa.json +++ b/versions/l-/libmysofa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "3750e9c2f993280e92bf61c7dbeb0807874473b2", + "git-tree": "7af8df14c5cacf2ba9f4798281ec863159c387ec", "version": "1.3.2", "port-version": 0 }