Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[mp3lame] decouple executable as 'frontend' non-default feature #9

Merged
35 changes: 29 additions & 6 deletions ports/mp3lame/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,29 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
file(WRITE "${SOURCE_PATH}/vc_solution/${machine}_${vcxproj}" "${vcxproj_con}")
endforeach()

vcpkg_msbuild_install(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH "vc_solution/${machine}_vc11_lame.sln"
TARGET "lame"
PLATFORM "${platform}"
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_msbuild_install(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH "vc_solution/${machine}_vc11_lame.sln"
TARGET "libmp3lame-static"
PLATFORM "${platform}"
)
else()
vcpkg_msbuild_install(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH "vc_solution/${machine}_vc11_lame.sln"
TARGET "libmp3lame"
PLATFORM "${platform}"
)
endif()
if("frontend" IN_LIST FEATURES)
vcpkg_msbuild_install(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH "vc_solution/${machine}_vc11_lame.sln"
TARGET "lame"
PLATFORM "${platform}"
)
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
Expand Down Expand Up @@ -96,6 +113,12 @@ else()
endif()
endif()

if("frontend" IN_LIST FEATURES)
list(APPEND OPTIONS --enable-frontend)
else()
list(APPEND OPTIONS --disable-frontend)
endif()

if(NOT VCPKG_TARGET_IS_MINGW)
list(APPEND OPTIONS --with-pic=yes)
endif()
Expand Down
15 changes: 13 additions & 2 deletions ports/mp3lame/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mp3lame",
"version": "3.100",
"port-version": 14,
"port-version": 15,
"description": "LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL.",
"homepage": "https://sourceforge.net/projects/lame",
"license": "LGPL-2.0-only",
Expand All @@ -11,5 +11,16 @@
"host": true,
"platform": "windows & !mingw"
}
]
],
"features": {
"frontend": {
"description": "Build the lame frontend",
"dependencies": [
{
"name": "ncurses",
"platform": "!windows | mingw"
}
]
}
}
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5922,7 +5922,7 @@
},
"mp3lame": {
"baseline": "3.100",
"port-version": 14
"port-version": 15
},
"mpark-patterns": {
"baseline": "2019-10-03",
Expand Down
5 changes: 5 additions & 0 deletions versions/m-/mp3lame.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d69dbcc93a03d6792d239a4f1f11e43618c45a16",
"version": "3.100",
"port-version": 15
},
{
"git-tree": "70565b18777c4bd7ebb7724be82f9957a5a17475",
"version": "3.100",
Expand Down
Loading