Skip to content

Commit

Permalink
[boost-modular-build-helper] Fixup mingw lib names (microsoft#20576)
Browse files Browse the repository at this point in the history
* Fixup mingw lib names on windows

* Update versions

* Bump boost-modular-build-helper port-version.

Co-authored-by: Billy Robert O'Neal III <[email protected]>
  • Loading branch information
dg0yt and BillyONeal authored Oct 12, 2021
1 parent 677eae7 commit 5fb4257
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
14 changes: 14 additions & 0 deletions ports/boost-modular-build-helper/boost-modular-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,20 @@ function(boost_modular_build)
file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME})
endif()
endforeach()
# Similar for mingw
file(GLOB INSTALLED_LIBS "${CURRENT_PACKAGES_DIR}/debug/lib/*-mgw10-*.a" "${CURRENT_PACKAGES_DIR}/lib/*-mgw10-*.a")
foreach(LIB IN LISTS INSTALLED_LIBS)
get_filename_component(OLD_FILENAME "${LIB}" NAME)
get_filename_component(DIRECTORY_OF_LIB_FILE "${LIB}" DIRECTORY)
string(REGEX REPLACE "-mgw[0-9]+-.*[0-9](\\.dll\\.a|\\.a)$" "\\1" NEW_FILENAME "${OLD_FILENAME}")
if("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}")
# nothing to do
elseif(EXISTS "${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}")
file(REMOVE "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}")
else()
file(RENAME "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}" "${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}")
endif()
endforeach()

# boost-regex[icu] and boost-locale[icu] generate has_icu.lib
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/has_icu.lib")
Expand Down
2 changes: 1 addition & 1 deletion ports/boost-modular-build-helper/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "boost-modular-build-helper",
"version": "1.77.0",
"port-version": 1,
"port-version": 2,
"description": "Internal vcpkg port used to build Boost libraries",
"dependencies": [
"boost-uninstall"
Expand Down
2 changes: 1 addition & 1 deletion scripts/boost/generate-ports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $portVersions = @{
"boost-config" = 2;
"boost-gil" = 1;
"boost-iostreams" = 1;
"boost-modular-build-helper" = 1;
"boost-modular-build-helper" = 2;
"boost-odeint" = 1;
"boost-python" = 1;
"boost-process" = 2;
Expand Down
5 changes: 5 additions & 0 deletions versions/b-/boost-modular-build-helper.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9795fd3f465461fea28201a773909b6fd0e3400b",
"version": "1.77.0",
"port-version": 2
},
{
"git-tree": "c076291c3d44f7cea167e469748ead6270e1c424",
"version": "1.77.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@
},
"boost-modular-build-helper": {
"baseline": "1.77.0",
"port-version": 1
"port-version": 2
},
"boost-move": {
"baseline": "1.77.0",
Expand Down

0 comments on commit 5fb4257

Please sign in to comment.