vcpkg/ports/libopensp/portfile.cmake

59 lines
1.9 KiB
CMake
Raw Normal View History

[libopensp] new port (#20391) * [libopensp] initial port * [libopensp] update versions * [libopensp] fix license file location * [libopensp] update versions * [libopensp] need autopoint on Windows * [libopensp] update versions * [libopensp] also remove debug/include * [libopensp] use KDE's CMakeLists on Windows * [libopensp] remove /bin for static builds * [libopensp] update versions * [libopensp] fix Windows/UWP condition * [libopensp] update versions * [libopensp] align *Nix functionality with Windows * [libopensp] update versions * [libopensp] fix compilation on arm64-osx * [libopensp] update versions * [libopensp] fix getenv failures on UWP * [libopensp] update versions * [libopensp] add comment on LDFLAGS usage * [libopensp] update versions * [libopensp] reduce patch size * [libopensp] update versions * [libopensp] further reduce patch size * [libopensp] update versions * [libopensp] don't overwrite vcpkg's own LDFLAGS * [libopensp] backport Debian patch with several fixes * [libopensp] update versions * [libopensp] fix library name on Windows * [libopensp] update versions * [libopensp] don't force shared lib on Windows * [libopensp] update versions * [libopensp] reduce Debian patch size * [libopensp] update versions * [libopensp] UWP in platform definition is redundant Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libopensp] update versions Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2021-10-22 13:51:06 +08:00
set(OPENSP_VERSION 1.5.2)
set(PATCHES opensp_1.5.2-13.diff) # http://deb.debian.org/debian/pool/main/o/opensp/opensp_1.5.2-13.diff.gz
if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
list(APPEND PATCHES windows_cmake_build.diff) # https://invent.kde.org/packaging/craft-blueprints-kde/-/tree/master/libs/libopensp
endif()
if (VCPKG_TARGET_IS_UWP)
list(APPEND PATCHES uwp_getenv_fix.diff)
endif()
vcpkg_download_distfile(ARCHIVE
URLS "https://downloads.sourceforge.net/project/openjade/opensp/${OPENSP_VERSION}/OpenSP-${OPENSP_VERSION}.tar.gz"
FILENAME "OpenSP-${OPENSP_VERSION}.tar.gz"
SHA512 a7dcc246ba7f58969ecd6d107c7b82dede811e65f375b7aa3e683621f2c6ff3e7dccefdd79098fcadad6cca8bb94c2933c63f4701be2c002f9a56f1bbe6b047e
)
vcpkg_extract_source_archive(
SOURCE_PATH
[libopensp] new port (#20391) * [libopensp] initial port * [libopensp] update versions * [libopensp] fix license file location * [libopensp] update versions * [libopensp] need autopoint on Windows * [libopensp] update versions * [libopensp] also remove debug/include * [libopensp] use KDE's CMakeLists on Windows * [libopensp] remove /bin for static builds * [libopensp] update versions * [libopensp] fix Windows/UWP condition * [libopensp] update versions * [libopensp] align *Nix functionality with Windows * [libopensp] update versions * [libopensp] fix compilation on arm64-osx * [libopensp] update versions * [libopensp] fix getenv failures on UWP * [libopensp] update versions * [libopensp] add comment on LDFLAGS usage * [libopensp] update versions * [libopensp] reduce patch size * [libopensp] update versions * [libopensp] further reduce patch size * [libopensp] update versions * [libopensp] don't overwrite vcpkg's own LDFLAGS * [libopensp] backport Debian patch with several fixes * [libopensp] update versions * [libopensp] fix library name on Windows * [libopensp] update versions * [libopensp] don't force shared lib on Windows * [libopensp] update versions * [libopensp] reduce Debian patch size * [libopensp] update versions * [libopensp] UWP in platform definition is redundant Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libopensp] update versions Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2021-10-22 13:51:06 +08:00
ARCHIVE "${ARCHIVE}"
SOURCE_BASE ${OPENSP_VERSION}
[libopensp] new port (#20391) * [libopensp] initial port * [libopensp] update versions * [libopensp] fix license file location * [libopensp] update versions * [libopensp] need autopoint on Windows * [libopensp] update versions * [libopensp] also remove debug/include * [libopensp] use KDE's CMakeLists on Windows * [libopensp] remove /bin for static builds * [libopensp] update versions * [libopensp] fix Windows/UWP condition * [libopensp] update versions * [libopensp] align *Nix functionality with Windows * [libopensp] update versions * [libopensp] fix compilation on arm64-osx * [libopensp] update versions * [libopensp] fix getenv failures on UWP * [libopensp] update versions * [libopensp] add comment on LDFLAGS usage * [libopensp] update versions * [libopensp] reduce patch size * [libopensp] update versions * [libopensp] further reduce patch size * [libopensp] update versions * [libopensp] don't overwrite vcpkg's own LDFLAGS * [libopensp] backport Debian patch with several fixes * [libopensp] update versions * [libopensp] fix library name on Windows * [libopensp] update versions * [libopensp] don't force shared lib on Windows * [libopensp] update versions * [libopensp] reduce Debian patch size * [libopensp] update versions * [libopensp] UWP in platform definition is redundant Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libopensp] update versions Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2021-10-22 13:51:06 +08:00
PATCHES ${PATCHES}
)
if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_cmake_install()
else()
if(VCPKG_TARGET_IS_OSX)
# libintl links to those
set(EXTRA_LIBS "-framework CoreFoundation -lintl -liconv")
[libopensp] new port (#20391) * [libopensp] initial port * [libopensp] update versions * [libopensp] fix license file location * [libopensp] update versions * [libopensp] need autopoint on Windows * [libopensp] update versions * [libopensp] also remove debug/include * [libopensp] use KDE's CMakeLists on Windows * [libopensp] remove /bin for static builds * [libopensp] update versions * [libopensp] fix Windows/UWP condition * [libopensp] update versions * [libopensp] align *Nix functionality with Windows * [libopensp] update versions * [libopensp] fix compilation on arm64-osx * [libopensp] update versions * [libopensp] fix getenv failures on UWP * [libopensp] update versions * [libopensp] add comment on LDFLAGS usage * [libopensp] update versions * [libopensp] reduce patch size * [libopensp] update versions * [libopensp] further reduce patch size * [libopensp] update versions * [libopensp] don't overwrite vcpkg's own LDFLAGS * [libopensp] backport Debian patch with several fixes * [libopensp] update versions * [libopensp] fix library name on Windows * [libopensp] update versions * [libopensp] don't force shared lib on Windows * [libopensp] update versions * [libopensp] reduce Debian patch size * [libopensp] update versions * [libopensp] UWP in platform definition is redundant Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libopensp] update versions Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2021-10-22 13:51:06 +08:00
endif()
vcpkg_configure_make(
AUTOCONFIG
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
--disable-doc-build
"LDFLAGS=${EXTRA_LIBS} \$LDFLAGS"
[libopensp] new port (#20391) * [libopensp] initial port * [libopensp] update versions * [libopensp] fix license file location * [libopensp] update versions * [libopensp] need autopoint on Windows * [libopensp] update versions * [libopensp] also remove debug/include * [libopensp] use KDE's CMakeLists on Windows * [libopensp] remove /bin for static builds * [libopensp] update versions * [libopensp] fix Windows/UWP condition * [libopensp] update versions * [libopensp] align *Nix functionality with Windows * [libopensp] update versions * [libopensp] fix compilation on arm64-osx * [libopensp] update versions * [libopensp] fix getenv failures on UWP * [libopensp] update versions * [libopensp] add comment on LDFLAGS usage * [libopensp] update versions * [libopensp] reduce patch size * [libopensp] update versions * [libopensp] further reduce patch size * [libopensp] update versions * [libopensp] don't overwrite vcpkg's own LDFLAGS * [libopensp] backport Debian patch with several fixes * [libopensp] update versions * [libopensp] fix library name on Windows * [libopensp] update versions * [libopensp] don't force shared lib on Windows * [libopensp] update versions * [libopensp] reduce Debian patch size * [libopensp] update versions * [libopensp] UWP in platform definition is redundant Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libopensp] update versions Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2021-10-22 13:51:06 +08:00
)
vcpkg_install_make()
endif()
configure_file("${CMAKE_CURRENT_LIST_DIR}/opensp.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/opensp.pc" @ONLY)
[libopensp] new port (#20391) * [libopensp] initial port * [libopensp] update versions * [libopensp] fix license file location * [libopensp] update versions * [libopensp] need autopoint on Windows * [libopensp] update versions * [libopensp] also remove debug/include * [libopensp] use KDE's CMakeLists on Windows * [libopensp] remove /bin for static builds * [libopensp] update versions * [libopensp] fix Windows/UWP condition * [libopensp] update versions * [libopensp] align *Nix functionality with Windows * [libopensp] update versions * [libopensp] fix compilation on arm64-osx * [libopensp] update versions * [libopensp] fix getenv failures on UWP * [libopensp] update versions * [libopensp] add comment on LDFLAGS usage * [libopensp] update versions * [libopensp] reduce patch size * [libopensp] update versions * [libopensp] further reduce patch size * [libopensp] update versions * [libopensp] don't overwrite vcpkg's own LDFLAGS * [libopensp] backport Debian patch with several fixes * [libopensp] update versions * [libopensp] fix library name on Windows * [libopensp] update versions * [libopensp] don't force shared lib on Windows * [libopensp] update versions * [libopensp] reduce Debian patch size * [libopensp] update versions * [libopensp] UWP in platform definition is redundant Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libopensp] update versions Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2021-10-22 13:51:06 +08:00
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")