aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2019-06-14 11:45:18 -0700
committerGitHub <noreply@github.com>2019-06-14 11:45:18 -0700
commit6ad6ba75a0e28fc64a0b05ee1c69fbad5fead89f (patch)
tree6e12706bde3bbcabd1d95da70538800ff6aac567
parent9a24bd109e3c52be14d381e374f4533059b3c2ef (diff)
downloadvcpkg-6ad6ba75a0e28fc64a0b05ee1c69fbad5fead89f.tar.gz
vcpkg-6ad6ba75a0e28fc64a0b05ee1c69fbad5fead89f.zip
[sndfile/libsndfile] remove duplicate port, forward to libsndfile (#6896)
-rw-r--r--ports/libsndfile/CONTROL4
-rw-r--r--ports/sndfile/CONTROL9
-rw-r--r--ports/sndfile/portfile.cmake63
-rw-r--r--ports/sndfile/uwp-createfile-getfilesize-addendum.patch13
-rw-r--r--ports/sndfile/uwp-createfile-getfilesize.patch58
5 files changed, 9 insertions, 138 deletions
diff --git a/ports/libsndfile/CONTROL b/ports/libsndfile/CONTROL
index d8de159b2..657a24424 100644
--- a/ports/libsndfile/CONTROL
+++ b/ports/libsndfile/CONTROL
@@ -1,8 +1,8 @@
Source: libsndfile
-Version: 1.0.29-6830c42-6
+Version: 1.0.29-6830c42-7
Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo
Default-Features: external-libs
Feature: external-libs
-Description: Support OGG and FLAC audio files
+Description: Support Ogg Vorbis and FLAC audio files
Build-Depends: libogg, libflac, libvorbis
diff --git a/ports/sndfile/CONTROL b/ports/sndfile/CONTROL
index eeee6d909..8c020a5f9 100644
--- a/ports/sndfile/CONTROL
+++ b/ports/sndfile/CONTROL
@@ -1,8 +1,9 @@
Source: sndfile
-Version: 1.0.29-cebfdf2-1
-Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo
+Version: deprecated
+Description: Deprecated port, use libsndfile instead
+Build-Depends: libsndfile
Default-Features: external-libs
Feature: external-libs
-Description: Support Ogg Vorbis and FLAC audio files
-Build-Depends: libogg, libflac, libvorbis
+Description: Deprecated port, use libsndfile[external-libs] instead
+Build-Depends: libsndfile[external-libs]
diff --git a/ports/sndfile/portfile.cmake b/ports/sndfile/portfile.cmake
index f11a8695e..47fe8ca23 100644
--- a/ports/sndfile/portfile.cmake
+++ b/ports/sndfile/portfile.cmake
@@ -1,62 +1,3 @@
-include(vcpkg_common_functions)
+set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
-vcpkg_from_github(
- OUT_SOURCE_PATH SOURCE_PATH
- REPO erikd/libsndfile
- REF cebfdf275e6173259bee6bfd40de22c8c102cf23
- SHA512 b981b9a5a457b73f444f4b134a76d9d7ab328369171a0043f89cfcf4567ca29a91ff75abfb362c4bc76c5fb0d25cb88cc397c37dd8f9d98b8892999c2e4e4123
- HEAD_REF master
- PATCHES
- "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile-getfilesize.patch"
- "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile-getfilesize-addendum.patch"
-)
-
-string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" CRT_LIB_STATIC)
-string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
-
-option(BUILD_EXECUTABLES "Build sndfile tools and install to folder tools" OFF)
-
-if("external-libs" IN_LIST FEATURES)
- set(SNDFILE_WITH_EXTERNAL_LIBS ON)
-else()
- set(SNDFILE_WITH_EXTERNAL_LIBS OFF)
-endif()
-
-vcpkg_find_acquire_program(PYTHON3)
-get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
-vcpkg_add_to_path(${PYTHON3_EXE_PATH})
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
- OPTIONS -DBUILD_EXAMPLES=0 -DBUILD_REGTEST=0 -DBUILD_TESTING=0 -DENABLE_STATIC_RUNTIME=${CRT_LIB_STATIC} -DBUILD_STATIC_LIBS=${BUILD_STATIC} -DENABLE_EXTERNAL_LIBS=${SNDFILE_WITH_EXTERNAL_LIBS}
- OPTIONS_RELEASE -DBUILD_PROGRAMS=${BUILD_EXECUTABLES}
- # Setting ENABLE_PACKAGE_CONFIG=0 has no effect
- OPTIONS_DEBUG -DBUILD_PROGRAMS=0
-)
-
-vcpkg_install_cmake()
-
-if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
- vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
-else()
- vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SndFile)
-endif()
-
-vcpkg_copy_pdbs()
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc/libsndfile ${CURRENT_PACKAGES_DIR}/share/${PORT}/doc)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
-
-if(BUILD_EXECUTABLES)
- file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
- file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
- file(REMOVE ${TOOLS})
- vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
-endif(BUILD_EXECUTABLES)
-
-# Handle copyright
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
+message(WARNING "The sndfile port is deprecated, use libsndfile instead")
diff --git a/ports/sndfile/uwp-createfile-getfilesize-addendum.patch b/ports/sndfile/uwp-createfile-getfilesize-addendum.patch
deleted file mode 100644
index 62e6b1131..000000000
--- a/ports/sndfile/uwp-createfile-getfilesize-addendum.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/file_io.c b/src/file_io.c
-index 47351bc..54741c9 100644
---- a/src/file_io.c
-+++ b/src/file_io.c
-@@ -799,6 +799,8 @@ psf_open_handle (PSF_FILE * pfile)
-
- if (handle == INVALID_HANDLE_VALUE)
- return NULL;
-+
-+ return handle;
- #else
- if (pfile->use_wchar)
- handle = CreateFileW (
diff --git a/ports/sndfile/uwp-createfile-getfilesize.patch b/ports/sndfile/uwp-createfile-getfilesize.patch
deleted file mode 100644
index 0e60cde54..000000000
--- a/ports/sndfile/uwp-createfile-getfilesize.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-diff --git a/src/file_io.c b/src/file_io.c
-index 7cf8f0c..47351bc 100644
---- a/src/file_io.c
-+++ b/src/file_io.c
-@@ -787,6 +787,19 @@ psf_open_handle (PSF_FILE * pfile)
- return NULL ;
- } ;
-
-+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
-+ if (!pfile->use_wchar)
-+ return NULL;
-+
-+ CREATEFILE2_EXTENDED_PARAMETERS cfParams = {0};
-+ cfParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS);
-+ cfParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
-+
-+ handle = CreateFile2(pfile->path.wc, dwDesiredAccess, dwShareMode, dwCreationDistribution, &cfParams);
-+
-+ if (handle == INVALID_HANDLE_VALUE)
-+ return NULL;
-+#else
- if (pfile->use_wchar)
- handle = CreateFileW (
- pfile->path.wc, /* pointer to name of the file */
-@@ -812,6 +825,7 @@ psf_open_handle (PSF_FILE * pfile)
- return NULL ;
-
- return handle ;
-+#endif
- } /* psf_open_handle */
-
- /* USE_WINDOWS_API */ static void
-@@ -1104,7 +1118,16 @@ psf_is_pipe (SF_PRIVATE *psf)
-
- /* USE_WINDOWS_API */ sf_count_t
- psf_get_filelen_handle (HANDLE handle)
--{ sf_count_t filelen ;
-+{
-+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
-+ LARGE_INTEGER size;
-+
-+ if (!GetFileSizeEx(handle, &size) && GetLastError() != NO_ERROR)
-+ return (sf_count_t) -1 ;
-+
-+ return size.QuadPart;
-+#else
-+ sf_count_t filelen ;
- DWORD dwFileSizeLow, dwFileSizeHigh, dwError = NO_ERROR ;
-
- dwFileSizeLow = GetFileSize (handle, &dwFileSizeHigh) ;
-@@ -1118,6 +1141,7 @@ psf_get_filelen_handle (HANDLE handle)
- filelen = dwFileSizeLow + ((__int64) dwFileSizeHigh << 32) ;
-
- return filelen ;
-+#endif
- } /* psf_get_filelen_handle */
-
- /* USE_WINDOWS_API */ void