From 771894141932a327f20f9768b8e45e5098cfa64a Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 21 Mar 2022 01:31:17 -0700 Subject: [PATCH 1/7] [vcpkg baseline][openal-soft/libmikmod] Fix OSX build --- ports/libmikmod/fix-dependency-openal.patch | 24 +++++++++++++++++++++ ports/libmikmod/portfile.cmake | 15 +++++++------ ports/libmikmod/vcpkg.json | 3 ++- ports/openal-soft/fix-export-libs.patch | 22 +++++++++++++++++++ ports/openal-soft/portfile.cmake | 1 + ports/openal-soft/vcpkg.json | 3 ++- 6 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 ports/libmikmod/fix-dependency-openal.patch create mode 100644 ports/openal-soft/fix-export-libs.patch diff --git a/ports/libmikmod/fix-dependency-openal.patch b/ports/libmikmod/fix-dependency-openal.patch new file mode 100644 index 00000000000000..27911a6e20ef74 --- /dev/null +++ b/ports/libmikmod/fix-dependency-openal.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 40fa4ee..8244a8a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -799,8 +799,8 @@ ELSE() + ENDIF(ENABLE_SDL) + + IF (ENABLE_OPENAL) +- include(FindOpenAL) +- IF (OPENAL_FOUND) ++ find_package(OpenAL CONFIG REQUIRED) ++ IF (1) + SET (DRV_OPENAL 1) + CHECK_MULTI_INCLUDE_FILES("AL/al.h" "AL/alc.h") + IF (HAVE_AL_AL_H) +@@ -811,7 +811,7 @@ IF (ENABLE_OPENAL) + #include + int main() {return 0;}" HAVE_AL_ALEXT_H) + ENDIF() +- LIST (APPEND EXTRA_LIBS ${OPENAL_LIBRARY}) ++ LIST (APPEND EXTRA_LIBS OpenAL::OpenAL stdc++) + ELSE() + SET (ENABLE_OPENAL 0) + SET (DRV_OPENAL) diff --git a/ports/libmikmod/portfile.cmake b/ports/libmikmod/portfile.cmake index 17d19c755e2f2e..26aa49962a32dd 100644 --- a/ports/libmikmod/portfile.cmake +++ b/ports/libmikmod/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_sourceforge( PATCHES fix-missing-dll.patch name_conflict.patch + fix-dependency-openal.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -16,7 +17,7 @@ else() endif() vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DENABLE_DOC=OFF @@ -30,7 +31,7 @@ vcpkg_configure_cmake( -DENABLE_RAW=ON -DENABLE_STDOUT=ON -DENABLE_WAV=ON - -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DOPENAL_INCLUDE_DIR="${CURRENT_INSTALLED_DIR}/include" -DENABLE_STATIC=${ENABLE_STATIC} OPTIONS_RELEASE -DENABLE_SIMD=ON OPTIONS_DEBUG -DENABLE_SIMD=OFF @@ -38,12 +39,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() -file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -vcpkg_fixup_pkgconfig() +file(INSTALL "${SOURCE_PATH}/COPYING.LESSER" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libmikmod/vcpkg.json b/ports/libmikmod/vcpkg.json index 797bcbc03226ec..0df4644c6ed788 100644 --- a/ports/libmikmod/vcpkg.json +++ b/ports/libmikmod/vcpkg.json @@ -1,9 +1,10 @@ { "name": "libmikmod", "version-string": "3.3.11.1", - "port-version": 10, + "port-version": 11, "description": "Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm.", "homepage": "https://sourceforge.net/projects/mikmod/", + "license": "GPL-2.0-only", "dependencies": [ "openal-soft" ] diff --git a/ports/openal-soft/fix-export-libs.patch b/ports/openal-soft/fix-export-libs.patch new file mode 100644 index 00000000000000..4b61fc9927c258 --- /dev/null +++ b/ports/openal-soft/fix-export-libs.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0cf0613..f1ac2ed 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1211,7 +1211,7 @@ set(IMPL_TARGET OpenAL) # Either OpenAL or soft_oal. + if(LIBTYPE STREQUAL "STATIC") + add_library(${IMPL_TARGET} STATIC ${COMMON_OBJS} ${OPENAL_OBJS} ${ALC_OBJS} ${CORE_OBJS}) + target_compile_definitions(${IMPL_TARGET} PUBLIC AL_LIBTYPE_STATIC) +- target_link_libraries(${IMPL_TARGET} PRIVATE ${LINKER_FLAGS} ${EXTRA_LIBS} ${MATH_LIB}) ++ target_link_libraries(${IMPL_TARGET} PRIVATE ${LINKER_FLAGS} PUBLIC ${EXTRA_LIBS} ${MATH_LIB}) + if(WIN32) + # This option is for static linking OpenAL Soft into another project + # that already defines the IDs. It is up to that project to ensure all +@@ -1263,7 +1263,7 @@ else() + if(WIN32) + set_target_properties(${IMPL_TARGET} PROPERTIES PREFIX "") + endif() +- target_link_libraries(${IMPL_TARGET} PRIVATE common ${LINKER_FLAGS} ${EXTRA_LIBS} ${MATH_LIB}) ++ target_link_libraries(${IMPL_TARGET} PRIVATE common ${LINKER_FLAGS} PUBLIC ${EXTRA_LIBS} ${MATH_LIB}) + + if(APPLE AND ALSOFT_OSX_FRAMEWORK) + # Sets framework name to soft_oal to avoid ambiguity with the system OpenAL.framework diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake index c090c7406671d4..732a8aae97e4eb 100644 --- a/ports/openal-soft/portfile.cmake +++ b/ports/openal-soft/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES dont-export-symbols-in-static-build.patch + fix-export-libs.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") diff --git a/ports/openal-soft/vcpkg.json b/ports/openal-soft/vcpkg.json index 4988f6635261d8..d3fca4a3658f88 100644 --- a/ports/openal-soft/vcpkg.json +++ b/ports/openal-soft/vcpkg.json @@ -1,8 +1,9 @@ { "name": "openal-soft", "version-semver": "1.21.1", - "port-version": 4, + "port-version": 5, "description": "OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API.", "homepage": "https://github.com/kcat/openal-soft", + "license": "GPL-2.0-only", "supports": "!uwp" } From b3ce703c211a8ec4a4c1e2554e563bb6744d1b4f Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 21 Mar 2022 01:33:39 -0700 Subject: [PATCH 2/7] version field --- ports/libmikmod/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libmikmod/vcpkg.json b/ports/libmikmod/vcpkg.json index 0df4644c6ed788..9be145c185ddff 100644 --- a/ports/libmikmod/vcpkg.json +++ b/ports/libmikmod/vcpkg.json @@ -1,6 +1,6 @@ { "name": "libmikmod", - "version-string": "3.3.11.1", + "version": "3.3.11.1", "port-version": 11, "description": "Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm.", "homepage": "https://sourceforge.net/projects/mikmod/", From 6f4796919be7e097882f78002c077217fc9bf23e Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 21 Mar 2022 01:34:02 -0700 Subject: [PATCH 3/7] version --- versions/baseline.json | 4 ++-- versions/l-/libmikmod.json | 5 +++++ versions/o-/openal-soft.json | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 100d4446abce01..2b4219c82c91d2 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3730,7 +3730,7 @@ }, "libmikmod": { "baseline": "3.3.11.1", - "port-version": 10 + "port-version": 11 }, "libmodbus": { "baseline": "3.1.6", @@ -5006,7 +5006,7 @@ }, "openal-soft": { "baseline": "1.21.1", - "port-version": 4 + "port-version": 5 }, "openblas": { "baseline": "0.3.19", diff --git a/versions/l-/libmikmod.json b/versions/l-/libmikmod.json index a1735fbbef8965..dfe3518fe955d3 100644 --- a/versions/l-/libmikmod.json +++ b/versions/l-/libmikmod.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1330e11e3f02f71f77fefd6cc72a8db4df4bbd07", + "version": "3.3.11.1", + "port-version": 11 + }, { "git-tree": "ed94a83a674fb90d5884515fc763840df2ec0375", "version-string": "3.3.11.1", diff --git a/versions/o-/openal-soft.json b/versions/o-/openal-soft.json index 1d70617a9c2886..906c7d1ed29b58 100644 --- a/versions/o-/openal-soft.json +++ b/versions/o-/openal-soft.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f9f1b680060b8cc8484965d0987654d94ae5598b", + "version-semver": "1.21.1", + "port-version": 5 + }, { "git-tree": "a1dee3171a9184c0a13631fda79f6aa58d2b80b6", "version-semver": "1.21.1", From 13af8c74917bae6d4cc3bde572f5ec4d46eee372 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 21 Mar 2022 01:57:12 -0700 Subject: [PATCH 4/7] Fix win build --- ports/libmikmod/fix-dependency-openal.patch | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ports/libmikmod/fix-dependency-openal.patch b/ports/libmikmod/fix-dependency-openal.patch index 27911a6e20ef74..599d50cd276805 100644 --- a/ports/libmikmod/fix-dependency-openal.patch +++ b/ports/libmikmod/fix-dependency-openal.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 40fa4ee..8244a8a 100644 +index 40fa4ee..814123b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -799,8 +799,8 @@ ELSE() @@ -13,12 +13,15 @@ index 40fa4ee..8244a8a 100644 SET (DRV_OPENAL 1) CHECK_MULTI_INCLUDE_FILES("AL/al.h" "AL/alc.h") IF (HAVE_AL_AL_H) -@@ -811,7 +811,7 @@ IF (ENABLE_OPENAL) +@@ -811,7 +811,10 @@ IF (ENABLE_OPENAL) #include int main() {return 0;}" HAVE_AL_ALEXT_H) ENDIF() - LIST (APPEND EXTRA_LIBS ${OPENAL_LIBRARY}) -+ LIST (APPEND EXTRA_LIBS OpenAL::OpenAL stdc++) ++ LIST (APPEND EXTRA_LIBS OpenAL::OpenAL) ++ if (APPLE) ++ LIST (APPEND EXTRA_LIBS stdc++) ++ endif() ELSE() SET (ENABLE_OPENAL 0) SET (DRV_OPENAL) From 23ed0c4ded646ad4246c319757386c37e52f408e Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 21 Mar 2022 01:57:26 -0700 Subject: [PATCH 5/7] version --- versions/l-/libmikmod.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libmikmod.json b/versions/l-/libmikmod.json index dfe3518fe955d3..359300d0383fcd 100644 --- a/versions/l-/libmikmod.json +++ b/versions/l-/libmikmod.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1330e11e3f02f71f77fefd6cc72a8db4df4bbd07", + "git-tree": "1d51cff4cb76a299d12741f9b3dc28ef05b4d74b", "version": "3.3.11.1", "port-version": 11 }, From 76d8225e719c1a8c7880f03867190d9d11fc16c5 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Tue, 22 Mar 2022 00:36:06 -0700 Subject: [PATCH 6/7] Apply suggestions --- ports/libmikmod/fix-dependency-openal.patch | 4 ++-- ports/libmikmod/portfile.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libmikmod/fix-dependency-openal.patch b/ports/libmikmod/fix-dependency-openal.patch index 599d50cd276805..b57fd1eb7fc41b 100644 --- a/ports/libmikmod/fix-dependency-openal.patch +++ b/ports/libmikmod/fix-dependency-openal.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 40fa4ee..814123b 100644 +index 40fa4ee..78ad3f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -799,8 +799,8 @@ ELSE() @@ -20,7 +20,7 @@ index 40fa4ee..814123b 100644 - LIST (APPEND EXTRA_LIBS ${OPENAL_LIBRARY}) + LIST (APPEND EXTRA_LIBS OpenAL::OpenAL) + if (APPLE) -+ LIST (APPEND EXTRA_LIBS stdc++) ++ LIST (APPEND EXTRA_LIBS c++) + endif() ELSE() SET (ENABLE_OPENAL 0) diff --git a/ports/libmikmod/portfile.cmake b/ports/libmikmod/portfile.cmake index 26aa49962a32dd..6499e9c6beda1f 100644 --- a/ports/libmikmod/portfile.cmake +++ b/ports/libmikmod/portfile.cmake @@ -31,7 +31,7 @@ vcpkg_configure_cmake( -DENABLE_RAW=ON -DENABLE_STDOUT=ON -DENABLE_WAV=ON - -DOPENAL_INCLUDE_DIR="${CURRENT_INSTALLED_DIR}/include" + "-DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include" -DENABLE_STATIC=${ENABLE_STATIC} OPTIONS_RELEASE -DENABLE_SIMD=ON OPTIONS_DEBUG -DENABLE_SIMD=OFF From 183416b0083515eab4ab7e172a23083052d1c228 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Tue, 22 Mar 2022 00:36:15 -0700 Subject: [PATCH 7/7] version --- versions/l-/libmikmod.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libmikmod.json b/versions/l-/libmikmod.json index 359300d0383fcd..31f4739bcf4910 100644 --- a/versions/l-/libmikmod.json +++ b/versions/l-/libmikmod.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1d51cff4cb76a299d12741f9b3dc28ef05b4d74b", + "git-tree": "19de7c2ac0ec006729301f4a0c1efdf791a5dc6b", "version": "3.3.11.1", "port-version": 11 },