diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-04-27 19:22:27 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-04-27 19:22:27 -0700 |
| commit | f6b74a9e4c20e0b7bb454757daa3790e02b2b652 (patch) | |
| tree | b558f853cbb5b60d2139432897dbad1955a1e747 | |
| parent | e7aadfa21683555afea72e0b057ea47fea0cc444 (diff) | |
| download | vcpkg-f6b74a9e4c20e0b7bb454757daa3790e02b2b652.tar.gz vcpkg-f6b74a9e4c20e0b7bb454757daa3790e02b2b652.zip | |
[taglib] Use copyright from sources. Do not assume Latin-1 filenames.
| -rw-r--r-- | ports/taglib/CONTROL | 2 | ||||
| -rw-r--r-- | ports/taglib/copyright | 24 | ||||
| -rw-r--r-- | ports/taglib/dont-assume-latin-1.patch | 18 | ||||
| -rw-r--r-- | ports/taglib/portfile.cmake | 26 |
4 files changed, 31 insertions, 39 deletions
diff --git a/ports/taglib/CONTROL b/ports/taglib/CONTROL index 05686de09..ca7992b84 100644 --- a/ports/taglib/CONTROL +++ b/ports/taglib/CONTROL @@ -1,4 +1,4 @@ Source: taglib -Version: 1.11.1 +Version: 1.11.1-1 Description: TagLib Audio Meta-Data Library Build-Depends: zlib
\ No newline at end of file diff --git a/ports/taglib/copyright b/ports/taglib/copyright deleted file mode 100644 index adbf9ecff..000000000 --- a/ports/taglib/copyright +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - copyright : (C) 2002 - 2008 by Scott Wheeler - email : wheeler@kde.org - ***************************************************************************/ - -/*************************************************************************** - * This library is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License version * - * 2.1 as published by the Free Software Foundation. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * - * 02110-1301 USA * - * * - * Alternatively, this file is available under the Mozilla Public * - * License Version 1.1. You may obtain a copy of the License at * - * http://www.mozilla.org/MPL/ * - ***************************************************************************/
\ No newline at end of file diff --git a/ports/taglib/dont-assume-latin-1.patch b/ports/taglib/dont-assume-latin-1.patch new file mode 100644 index 000000000..39557f74d --- /dev/null +++ b/ports/taglib/dont-assume-latin-1.patch @@ -0,0 +1,18 @@ +diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp +index b267aaa..3db0521 100644 +--- a/taglib/toolkit/tfilestream.cpp ++++ b/taglib/toolkit/tfilestream.cpp +@@ -54,7 +54,12 @@ namespace + if(!path.wstr().empty()) + return CreateFile2(path.wstr().c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL); + else if(!path.str().empty()) +- return CreateFile2(std::wstring(path.str().cbegin(), path.str().end()).c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL); ++ { ++ auto size = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, path.str().data(), path.str().size(), NULL, 0); ++ std::wstring tmp(size, L'\0'); ++ MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, path.str().data(), path.str().size(), &tmp[0], tmp.size()); ++ return CreateFile2(tmp.c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL); ++ } + else + return InvalidFileHandle; + } diff --git a/ports/taglib/portfile.cmake b/ports/taglib/portfile.cmake index 98bc8c3d9..12ff923c5 100644 --- a/ports/taglib/portfile.cmake +++ b/ports/taglib/portfile.cmake @@ -1,5 +1,3 @@ -# taglib - include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/taglib-1.11.1) vcpkg_download_distfile(ARCHIVE @@ -10,21 +8,17 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) #patches for UWP -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/ignore_c4996_error.patch - ${CMAKE_CURRENT_LIST_DIR}/replace_non-uwp_functions.patch - ) -endif() +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/ignore_c4996_error.patch + ${CMAKE_CURRENT_LIST_DIR}/replace_non-uwp_functions.patch + ${CMAKE_CURRENT_LIST_DIR}/dont-assume-latin-1.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() @@ -33,9 +27,13 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # copyright file -file(COPY ${CURRENT_PORT_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/taglib) +file(COPY ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/taglib) +file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/taglib) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/taglib/COPYING.LGPL ${CURRENT_PACKAGES_DIR}/share/taglib/copyright) # remove bin directory for static builds (taglib creates a cmake batch file there) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() + +vcpkg_copy_pdbs()
\ No newline at end of file |
