This commit is contained in:
Thomas Fussell 2017-03-17 00:33:06 -04:00
commit d821b0a28a
109 changed files with 1760 additions and 515 deletions

4
ports/beast/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: beast
Version: 1.0.0-b30
Build-Depends: boost
Description: Boost.Asio based header only HTTP and WebSocket on C++11

View File

@ -0,0 +1,12 @@
# header only
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/beast-1.0.0-b30)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/vinniefalco/Beast/archive/v1.0.0-b30.zip"
FILENAME "beast-1.0.0-b30.zip"
SHA512 af801748efabafef1b7ae817be9da9480dcf881b3037f92e5997e42255399bd7b22772bb2a5c9aab7d01c31c7995c4d23a41f4b7f6ccdef18d9a8a15906fd43f
)
vcpkg_extract_source_archive(${ARCHIVE})
file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/beast RENAME copyright)

View File

@ -0,0 +1,56 @@
From b41cc93b63c99525e71291424466cdd45d92f770 Mon Sep 17 00:00:00 2001
From: Mikhail Paulyshka <me@mixaill.tk>
Date: Sun, 12 Mar 2017 04:34:10 +0300
Subject: [PATCH] fix CRT linking for static library for MSVC
---
configure.py | 15 +++++++++++++++
src/build-data/cc/msvc.txt | 8 ++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/configure.py b/configure.py
index faf5120c5..9c545cf5f 100755
--- a/configure.py
+++ b/configure.py
@@ -976,6 +976,21 @@ class CompilerInfo(object):
if flag != None and flag != '' and flag not in abi_link:
abi_link.append(flag)
+ if options.build_shared_lib:
+ if options.with_debug_info:
+ if 'dynamic-debug' in self.mach_abi_linking:
+ abi_link.append(self.mach_abi_linking['dynamic-debug'])
+ else:
+ if 'dynamic' in self.mach_abi_linking:
+ abi_link.append(self.mach_abi_linking['dynamic'])
+ else:
+ if options.with_debug_info:
+ if 'static-debug' in self.mach_abi_linking:
+ abi_link.append(self.mach_abi_linking['static-debug'])
+ else:
+ if 'static' in self.mach_abi_linking:
+ abi_link.append(self.mach_abi_linking['static'])
+
if options.with_coverage_info:
if self.coverage_flags == '':
raise ConfigureError('No coverage handling for %s' % (self.basename))
diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt
index c1b820b91..e6182b0fa 100644
--- a/src/build-data/cc/msvc.txt
+++ b/src/build-data/cc/msvc.txt
@@ -53,6 +53,10 @@ default-debug -> "$(LINKER) /DEBUG"
</binary_link_commands>
<mach_abi_linking>
-all -> "/MD /bigobj"
-all-debug -> "/MDd /bigobj"
+all -> "/bigobj"
+all-debug -> "/bigobj"
+static -> "/MT"
+static-debug -> "/MTd"
+dynamic -> "/MD"
+dynamic-debug -> "/MDd"
</mach_abi_linking>
--
2.11.0.windows.1

3
ports/botan/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: botan
Version: 2.0.1
Description: A cryptography library written in C++11

112
ports/botan/portfile.cmake Normal file
View File

@ -0,0 +1,112 @@
include(vcpkg_common_functions)
set(BOTAN_VERSION 2.0.1)
set(BOTAN_HASH c5062ce92a6e6e333b4e6af095ed54d0c4ffacefc6ac87ec651dd1e0937793c9956b7c9c0d3acf49f059505526584168364e01c55ab72c953ad255e8396aed35)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Botan-${BOTAN_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "https://botan.randombit.net/releases/Botan-${BOTAN_VERSION}.tgz"
FILENAME "Botan-${BOTAN_VERSION}.tgz"
SHA512 ${BOTAN_HASH}
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-crt-linking.patch")
vcpkg_find_acquire_program(JOM)
vcpkg_find_acquire_program(PYTHON3)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(BOTAN_FLAG_SHARED --disable-shared)
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(BOTAN_FLAG_CPU x86)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(BOTAN_FLAG_CPU x86_64)
else()
message(FATAL_ERROR "Unsupported architecture")
endif()
function(BOTAN_BUILD BOTAN_BUILD_TYPE)
if(BOTAN_BUILD_TYPE STREQUAL "dbg")
set(BOTAN_FLAG_PREFIX ${CURRENT_PACKAGES_DIR}/debug)
set(BOTAN_FLAG_DEBUGMODE --debug-mode)
set(BOTAN_DEBUG_PREFIX d)
else()
set(BOTAN_FLAG_DEBUGMODE)
set(BOTAN_FLAG_PREFIX ${CURRENT_PACKAGES_DIR})
endif()
message(STATUS "Configure ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}")
if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
endif()
make_directory(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
vcpkg_execute_required_process(
COMMAND "${PYTHON3}" "${SOURCE_PATH}/configure.py"
--cc=msvc
--cpu=${BOTAN_FLAG_CPU}
${BOTAN_FLAG_SHARED}
${BOTAN_FLAG_DEBUGMODE}
"--distribution-info=vcpkg ${TARGET_TRIPLET}"
--makefile-style=nmake
--with-pkcs11
--prefix=${BOTAN_FLAG_PREFIX}
--link-method=copy
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}"
LOGNAME configure-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
message(STATUS "Configure ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done")
message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}")
vcpkg_execute_required_process(
COMMAND ${JOM}
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}"
LOGNAME jom-build-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done")
message(STATUS "Package ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}")
vcpkg_execute_required_process(
COMMAND "${PYTHON3}" "${SOURCE_PATH}/src/scripts/install.py"
--destdir=${BOTAN_FLAG_PREFIX}
--docdir=share
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}"
LOGNAME install-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(RENAME ${BOTAN_FLAG_PREFIX}/lib/botan${BOTAN_DEBUG_PREFIX}.dll ${BOTAN_FLAG_PREFIX}/bin/botan${BOTAN_DEBUG_PREFIX}.dll)
endif()
message(STATUS "Package ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done")
endfunction()
BOTAN_BUILD(rel)
BOTAN_BUILD(dbg)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/botan)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/botan-cli.exe ${CURRENT_PACKAGES_DIR}/tools/botan/botan-cli.exe)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/botan-cli.exe)
file(RENAME ${CURRENT_PACKAGES_DIR}/include/botan-2/botan ${CURRENT_PACKAGES_DIR}/include/botan)
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/include/botan-2
${CURRENT_PACKAGES_DIR}/share/botan-${BOTAN_VERSION}/manual)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/bin
${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
vcpkg_copy_pdbs()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/botan)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/botan-${BOTAN_VERSION}/ ${CURRENT_PACKAGES_DIR}/share/botan/)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/botan/license.txt ${CURRENT_PACKAGES_DIR}/share/botan/copyright)

View File

@ -0,0 +1,25 @@
From b769f250a39df110db2615c0e0d85b52f2ab6e77 Mon Sep 17 00:00:00 2001
From: Mikhail Paulyshka <me@mixaill.tk>
Date: Sun, 12 Mar 2017 17:57:03 +0300
Subject: [PATCH] Fix build
---
cairomm/win32_surface.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cairomm/win32_surface.h b/cairomm/win32_surface.h
index 2e35b9a..c4454c4 100644
--- a/cairomm/win32_surface.h
+++ b/cairomm/win32_surface.h
@@ -84,6 +84,8 @@ public:
*/
static RefPtr<Win32Surface> create(HDC hdc);
+ static RefPtr<Win32Surface> create(Format format, int width, int height);
+
/** Creates a device-independent-bitmap surface not associated with any
* particular existing surface or device context. The created bitmap will be
* unititialized.
--
2.11.0.windows.1

View File

@ -0,0 +1,111 @@
project(cairomm)
cmake_minimum_required(VERSION 3.4)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build/cmake")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
#get cairomm version
file (STRINGS "configure.ac" CONFIGURE_AC_INIT REGEX "AC_INIT\\(\\[cairomm\\], \\[.*\\].*" )
string(REGEX REPLACE "AC_INIT\\(\\[.*\\], \\[([0-9]+\\.[0-9]+\\.[0-9]+)\\].*" "\\1" VERSION ${CONFIGURE_AC_INIT})
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" CAIROMM_MAJOR_VERSION ${VERSION})
string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" CAIROMM_MINOR_VERSION ${VERSION})
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" CAIROMM_MICRO_VERSION ${VERSION})
message(STATUS "Ciaromm version: ${CAIROMM_MAJOR_VERSION}.${CAIROMM_MINOR_VERSION}.${CAIROMM_MICRO_VERSION}")
find_package(Cairo REQUIRED)
find_package(SigC++ REQUIRED)
#configure
option(BUILD_SHARED_LIBS "Build the shared library" ON)
option(CAIROMM_ENABLE_API_EXCEPTIONS "enable API exceptions" ON)
if(CAIROMM_ENABLE_API_EXCEPTIONS)
set(CAIROMM_EXCEPTIONS_ENABLED ON)
else()
set(CAIROMM_EXCEPTIONS_ENABLED OFF)
endif()
configure_file("build/cmake/cairommconfig.h.cmake" "cairommconfig.h")
configure_file("build/cmake/cairomm.rc.cmake" "cairomm.rc" @ONLY)
#build
set(cairomm_cc
cairomm/context.cc
cairomm/context_surface_quartz.cc
cairomm/context_surface_win32.cc
cairomm/context_surface_xlib.cc
cairomm/device.cc
cairomm/exception.cc
cairomm/fontface.cc
cairomm/fontoptions.cc
cairomm/matrix.cc
cairomm/path.cc
cairomm/pattern.cc
cairomm/private.cc
cairomm/quartz_font.cc
cairomm/quartz_surface.cc
cairomm/region.cc
cairomm/scaledfont.cc
cairomm/script.cc
cairomm/script_surface.cc
cairomm/surface.cc
cairomm/win32_font.cc
cairomm/win32_surface.cc
cairomm/xlib_surface.cc)
set(cairomm_public_h
cairomm/cairomm.h
cairomm/context.h
cairomm/device.h
cairomm/enums.h
cairomm/exception.h
cairomm/fontface.h
cairomm/fontoptions.h
cairomm/matrix.h
cairomm/path.h
cairomm/pattern.h
cairomm/quartz_font.h
cairomm/quartz_surface.h
cairomm/refptr.h
cairomm/region.h
cairomm/scaledfont.h
cairomm/script.h
cairomm/script_surface.h
cairomm/surface.h
cairomm/types.h
cairomm/win32_font.h
cairomm/win32_surface.h
cairomm/xlib_surface.h)
set(cairomm_private_h
cairomm/context_private.h
cairomm/private.h)
set(cairomm_rc
${CMAKE_BINARY_DIR}/cairomm.rc)
add_library(cairomm-1.0 ${cairomm_cc} ${cairomm_rc})
target_link_libraries(cairomm-1.0 ${CAIRO_LIBRARY} ${SIGC++_LIBRARY} )
target_include_directories(cairomm-1.0 PRIVATE
${CAIRO_INCLUDE_DIR}
${SIGC++_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR})
install(
TARGETS cairomm-1.0
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib)
install(
FILES ${cairomm_public_h}
DESTINATION include/cairomm)
install(
FILES ${CMAKE_BINARY_DIR}/cairommconfig.h
DESTINATION include)

4
ports/cairomm/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: cairomm
Version: 1.15.3-1
Description: A C++ wrapper for the cairo graphics library
Build-Depends: cairo, libsigcpp

View File

@ -0,0 +1,131 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#
# revision: 2
# See https://github.com/CMakePorts/CMakeFindPackages for updates
#
#.rst:
# FindCairo
# ---------
#
# Locate Cairo library
#
# This module defines
#
# ::
# CAIRO_FOUND - system has the CAIRO library
# CAIRO_INCLUDE_DIR - the CAIRO include directory
# CAIRO_LIBRARIES - The libraries needed to use CAIRO
# CAIRO_VERSION - This is set to $major.$minor.$revision (eg. 0.9.8)
# CAIRO_VERSION_STRING - This is set to $major.$minor.$revision (eg. 0.9.8)
#
# Authors:
# Copyright (c) Eric Wing
# Copyright (c) Alexander Neundorf
# Copyright (c) 2008 Joshua L. Blocher <verbalshadow at gmail dot com>
# Copyright (c) 2012 Dmitry Baryshnikov <polimax at mail dot ru>
# Copyright (c) 2013-2017 Mikhail Paulyshka <me at mixaill dot tk>
#
if (NOT WIN32)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(_CAIRO cairo)
SET(CAIRO_VERSION ${_CAIRO_VERSION})
STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\1" num "${CAIRO_VERSION}")
MATH (EXPR CAIRO_VERSION_MAJOR "${num}")
STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\2" num "${CAIRO_VERSION}")
MATH (EXPR CAIRO_VERSION_MINOR "${num}")
STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\3" num "${CAIRO_VERSION}")
MATH (EXPR CAIRO_VERSION_MICRO "${num}")
endif (PKG_CONFIG_FOUND)
endif (NOT WIN32)
set(_CAIRO_ROOT_HINTS_AND_PATHS
HINTS
$ENV{CAIRO}
$ENV{CAIRO_DIR}
${CMAKE_FIND_ROOT_PATH}
${CAIRO_ROOT_DIR}
PATHS
${CMAKE_FIND_ROOT_PATH}
$ENV{CAIRO}/src
/usr
/usr/local
)
find_path(CAIRO_INCLUDE_DIR
NAMES
cairo.h
HINTS
${_CAIRO_INCLUDEDIR}
${_CAIRO_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
include
"include/cairo"
)
if(NOT CAIRO_LIBRARY)
FIND_LIBRARY(CAIRO_LIBRARY_RELEASE
NAMES
cairo
cairo-static
HINTS
${_CAIRO_LIBDIR}
${_CAIRO_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
"local/lib"
)
FIND_LIBRARY(CAIRO_LIBRARY_DEBUG
NAMES
cairod
cairo-staticd
HINTS
${_CAIRO_LIBDIR}
${_CAIRO_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
"local/lib"
)
include(SelectLibraryConfigurations)
select_library_configurations(CAIRO)
endif()
set(CAIRO_LIBRARIES ${CAIRO_LIBRARY})
if (NOT CAIRO_VERSION)
if (EXISTS "${CAIRO_INCLUDE_DIR}/cairo-version.h")
file(READ "${CAIRO_INCLUDE_DIR}/cairo-version.h" CAIRO_VERSION_CONTENT)
string(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
set(CAIRO_VERSION_MAJOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
set(CAIRO_VERSION_MINOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
set(CAIRO_VERSION_MICRO "${CMAKE_MATCH_1}")
set(CAIRO_VERSION "${CAIRO_VERSION_MAJOR}.${CAIRO_VERSION_MINOR}.${CAIRO_VERSION_MICRO}")
set(CAIRO_VERSION_STRING CAIRO_VERSION)
endif ()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
CAIRO
REQUIRED_VARS
CAIRO_LIBRARIES
CAIRO_INCLUDE_DIR
VERSION_VAR
CAIRO_VERSION_STRING
)
MARK_AS_ADVANCED(
CAIRO_INCLUDE_DIR
CAIRO_LIBRARY
CAIRO_LIBRARIES)

View File

@ -0,0 +1,111 @@
# - Try to find SIGC++
# Once done this will define
#
# SIGC++_ROOT_DIR - Set this variable to the root installation of SIGC++
# SIGC++_FOUND - system has SIGC++
# SIGC++_INCLUDE_DIRS - the SIGC++ include directory
# SIGC++_LIBRARIES - Link these to use SIGC++
#
# Copyright (c) 2008 Joshua L. Blocher <verbalshadow at gmail dot com>
# Copyright (c) 2012 Dmitry Baryshnikov <polimax at mail dot ru>
# Copyright (c) 2013-2017 Mikhail Paulyshka <me at mixaill dot tk>
#
# Distributed under the OSI-approved BSD License
#
if (NOT WIN32)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(_SIGC++ sigc++-2.0)
SET(SIGC++_VERSION ${_SIGC++_VERSION})
endif (PKG_CONFIG_FOUND)
endif (NOT WIN32)
SET(_SIGC++_ROOT_HINTS
$ENV{SIGC++}
${CMAKE_FIND_ROOT_PATH}
${SIGC++_ROOT_DIR}
)
SET(_SIGC++_ROOT_PATHS
$ENV{SIGC++}/src
/usr
/usr/local
)
SET(_SIGC++_ROOT_HINTS_AND_PATHS
HINTS ${_SIGC++_ROOT_HINTS}
PATHS ${_SIGC++_ROOT_PATHS}
)
FIND_PATH(SIGC++_INCLUDE_DIR
NAMES
"sigc++/sigc++.h"
HINTS
${_SIGC++_INCLUDEDIR}
${_SIGC++_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
include
"include/sigc++-2.0"
)
find_path(SIGC++_CONFIG_INCLUDE_DIR
NAMES
sigc++config.h
HINTS
${_SIGC++_LIBDIR}
${_SIGC++_INCLUDEDIR}
${_SIGC++_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
include
lib
"sigc++-2.0/include"
"lib/sigc++-2.0"
"lib/sigc++-2.0/include"
)
FIND_LIBRARY(SIGC++_LIBRARY
NAMES
sigc-2.0
HINTS
${_SIGC++_LIBDIR}
${_SIGC++_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
"local/lib"
)
SET(SIGC++_LIBRARIES
${SIGC++_LIBRARY}
)
SET(SIGC++_INCLUDE_DIRS
${SIGC++_INCLUDE_DIR}
${SIGC++_CONFIG_INCLUDE_DIR}
)
if (NOT SIGC++_VERSION)
if (EXISTS "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h")
file(READ "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h" SIGC++_VERSION_CONTENT)
string(REGEX MATCH "#define +SIGCXX_MAJOR_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}")
set(SIGC++_VERSION_MAJOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define +SIGCXX_MINOR_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}")
set(SIGC++_VERSION_MINOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define +SIGCXX_MICRO_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}")
set(SIGC++_VERSION_MICRO "${CMAKE_MATCH_1}")
set(SIGC++_VERSION "${SIGC++_VERSION_MAJOR}.${SIGC++_VERSION_MINOR}.${SIGC++_VERSION_MICRO}")
endif (EXISTS "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h")
endif(NOT SIGC++_VERSION)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SIGC++
REQUIRED_VARS SIGC++_LIBRARIES SIGC++_INCLUDE_DIRS
VERSION_VAR SIGC++_VERSION
FAIL_MESSAGE "Could NOT find SIGC++, try to set the path to SIGC++ root folder in the system variable SIGC++"
)
MARK_AS_ADVANCED(SIGC++_CONFIG_INCLUDE_DIR SIGC++_INCLUDE_DIR SIGC++_INCLUDE_DIRS SIGC++_LIBRARY SIGC++_LIBRARIES)

View File

@ -0,0 +1,71 @@
#define APSTUDIO_READONLY_SYMBOLS
#include <windows.h>
#undef APSTUDIO_READONLY_SYMBOLS
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
VS_VERSION_INFO VERSIONINFO
FILEVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1
PRODUCTVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "The cairomm development team (see AUTHORS)"
VALUE "FileDescription", "The official C++ wrapper for cairo"
VALUE "FileVersion", "@VERSION@"
VALUE "LegalCopyright", "Distribution is under the LGPL (see COPYING)"
VALUE "OriginalFilename", "cairomm-1.0"
VALUE "ProductName", "cairomm"
VALUE "ProductVersion", "@VERSION@"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // English (U.S.) resources
#ifndef APSTUDIO_INVOKED
#endif // not APSTUDIO_INVOKED

View File

@ -0,0 +1,13 @@
/* This file is part of cairomm. */
/* Defined when the --enable-api-exceptions configure argument was given */
#cmakedefine CAIROMM_EXCEPTIONS_ENABLED 1
/* Major version number of cairomm. */
#cmakedefine CAIROMM_MAJOR_VERSION @CAIROMM_MAJOR_VERSION@
/* Minor version number of cairomm. */
#cmakedefine CAIROMM_MINOR_VERSION @CAIROMM_MINOR_VERSION@
/* Micro version number of cairomm. */
#cmakedefine CAIROMM_MICRO_VERSION @CAIROMM_MICRO_VERSION@

View File

@ -0,0 +1,32 @@
include(vcpkg_common_functions)
set(CAIROMM_VERSION 1.15.3)
set(CAIROMM_HASH a2c28786dbd167179561d8f580eeb11d10634a36dfdb1adeefc0279acf83ee906f01f264cb924845fc4ab98da1afac71e1ead742f283c1a32368ca9af28e464a)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cairomm-${CAIROMM_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "https://www.cairographics.org/releases/cairomm-${CAIROMM_VERSION}.tar.gz"
FILENAME "cairomm-${CAIROMM_VERSION}.tar.gz"
SHA512 ${CAIROMM_HASH}
)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}/build)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-build.patch")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cairomm)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cairomm/COPYING ${CURRENT_PACKAGES_DIR}/share/cairomm/copyright)

View File

@ -0,0 +1,13 @@
diff --git a/release/CMakeLists.txt b/release/CMakeLists.txt
index fe245e6..94a5c57 100644
--- a/release/CMakeLists.txt
+++ b/release/CMakeLists.txt
@@ -177,7 +177,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
# These settings can be used by the test targets
set(Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
-if (NOT CPPREST_EXCLUDE_WEBSOCKETS)
+if (NOT CPPREST_EXCLUDE_WEBSOCKETS AND NOT WINDOWS_STORE AND NOT WINDOWS_PHONE)
find_path(WEBSOCKETPP_CONFIG websocketpp-config.cmake
HINTS /usr/lib/cmake/websocketpp)
find_path(WEBSOCKETPP_CONFIG_VERSION websocketpp-configVersion.cmake

View File

@ -13,15 +13,21 @@ vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
${CMAKE_CURRENT_LIST_DIR}/0002_no_websocketpp_in_uwp.patch
)
SET(WEBSOCKETPP_PATH "${CURRENT_INSTALLED_DIR}/share/websocketpp")
set(OPTIONS)
if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
SET(WEBSOCKETPP_PATH "${CURRENT_INSTALLED_DIR}/share/websocketpp")
list(APPEND OPTIONS
-DWEBSOCKETPP_CONFIG=${WEBSOCKETPP_PATH}
-DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH})
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/Release
OPTIONS
-DWEBSOCKETPP_CONFIG=${WEBSOCKETPP_PATH}
-DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH}
${OPTIONS}
-DBUILD_TESTS=OFF
-DBUILD_SAMPLES=OFF
-DCPPREST_EXCLUDE_WEBSOCKETS=OFF

View File

@ -1,3 +1,4 @@
Source: dlib
Version: 19.2
Version: 19.4-1
Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3
Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++

View File

@ -4,23 +4,29 @@
# PORT is the current port name (zlib, etc)
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
#
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dlib-19.2)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dlib-19.4)
vcpkg_download_distfile(ARCHIVE
URLS "http://dlib.net/files/dlib-19.2.tar.bz2"
FILENAME "dlib-19.2.tar.bz2"
SHA512 dcef5c8be52fe2650c1eccac6c7ac4050075dc07ee504a8bf3df6c9a597da5fdc09506e631abfa979d71c74940ce39ec5267be4c3a676a01ac66fcb14cbfe854
URLS "http://dlib.net/files/dlib-19.4.tar.bz2"
FILENAME "dlib-19.4.tar.bz2"
SHA512 c5ae22c507b57a13d880d79e9671730829114d0276508b0a41b373d3abae9057d960fce84fafe1be468d943910853baaa70c88f2516e20a0c41f3895bf217f7b
)
vcpkg_extract_source_archive(${ARCHIVE})
file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libjpeg)
file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libpng)
file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/zlib)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA # Disable this option if project cannot be built with Ninja
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
# OPTIONS_RELEASE -DOPTIMIZE=1
# OPTIONS_DEBUG -DDEBUGGABLE=1
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DDLIB_LINK_WITH_SQLITE3=ON
-DDLIB_USE_FFTW=ON
#-DDLIB_USE_CUDA=ON
OPTIONS_DEBUG
-DDLIB_ENABLE_ASSERTS=ON
#-DDLIB_ENABLE_STACK_TRACE=ON
)
vcpkg_install_cmake()
@ -28,18 +34,17 @@ vcpkg_install_cmake()
# There is no way to suppress installation of the headers and resource files in debug build.
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/test)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
# Remove other files not required in package
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/all)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/test)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/travis)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm)
# Handle copyright
#file(COPY ${SOURCE_PATH}/docs/license.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib)
file(COPY ${CURRENT_PACKAGES_DIR}/share/doc/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/dlib/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/dlib/COPYRIGHT)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)

View File

@ -37,12 +37,14 @@ vcpkg_configure_cmake(
# OPTIONS_DEBUG -DDEBUGGABLE=1
)
vcpkg_build_cmake()
vcpkg_install_cmake()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/flatc.exe)
make_directory(${CURRENT_PACKAGES_DIR}/tools)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/flatc.exe ${CURRENT_PACKAGES_DIR}/tools/flatc.exe)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
endif()

View File

@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.0)
project(glib)
project(glib C)
set(GLIB_VERSION 2.50.2)
set(GLIB_DLL_SUFFIX 2)
set(GLIB_LIB_SUFFIX 2.0)

View File

@ -1,4 +1,4 @@
Source: glib
Version: 2.50.2
Version: 2.50.3
Description: Portable, general-purpose utility library.
Build-Depends: zlib, pcre, libffi, gettext, libiconv

View File

@ -10,11 +10,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glib-2.50.2)
set(GLIB_VERSION 2.50.3)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glib-${GLIB_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.gnome.org/pub/gnome/sources/glib/2.50/glib-2.50.2.tar.xz"
FILENAME "glib-2.50.2.tar.xz"
SHA512 63d7b5ece8d7d15b10e06ef10a8e0a4446f30a8d9c97daa3352ec00dfef622728bd42ed24cbf67e553166a0f9e29a3e3d024d1d085b9804fd67608db438b6771)
URLS "https://ftp.gnome.org/pub/gnome/sources/glib/2.50/glib-${GLIB_VERSION}.tar.xz"
FILENAME "glib-${GLIB_VERSION}.tar.xz"
SHA512 ef35806c15170b6608445f255136c0bebd2d433adf903c2af2865f6a57b4f2fcfc1e4a7cea1a0dac48ff5fe26248fbf7886dba4a8d209506f0a94160df8fb7af)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
@ -29,6 +30,9 @@ file(REMOVE ${SOURCE_PATH}/glib/win_iconv.c)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DGLIB_VERSION=${GLIB_VERSION}
OPTIONS_DEBUG
-DGLIB_SKIP_HEADERS=ON
-DGLIB_SKIP_TOOLS=ON)

View File

@ -4,8 +4,6 @@ project(gtk+ C)
configure_file(config.h.win32 ${CMAKE_CURRENT_SOURCE_DIR}/config.h COPYONLY)
configure_file(gdk/gdkconfig.h.win32_broadway ${CMAKE_CURRENT_SOURCE_DIR}/gdk/gdkconfig.h COPYONLY)
set(GTK_VERSION 3.22.8)
set(GLIB_LIB_SUFFIX 2.0)
set(PANGO_LIB_SUFFIX 1.0)
set(ATK_LIB_SUFFIX 1.0)

View File

@ -1,4 +1,4 @@
Source: gtk
Version: 3.22.8
Version: 3.22.9
Description: Portable library for creating graphical user interfaces.
Build-Depends: glib, atk, gdk-pixbuf, pango, cairo, libepoxy, gettext

View File

@ -1,10 +1,11 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gtk+-3.22.8)
set(GTK_VERSION 3.22.9)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gtk+-${GTK_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-3.22.8.tar.xz"
FILENAME "gtk+-3.22.8.tar.xz"
SHA512 e8c887d73a29982e8db1be6b101367326b4691905bd28e244f05435f34dfaddb054badb0b0b01a47a4c939c7f87985b7203db5d0cd499a0868c25eba44ed002c)
URLS "https://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-${GTK_VERSION}.tar.xz"
FILENAME "gtk+-${GTK_VERSION}.tar.xz"
SHA512 cfed67a6263172cdef5a8d5f1548017f2e241667779d810ed84aa14ecdd18b917b213b3e71ac97f8d7099ba97a6829b45322ab15c8540ff406247d1519a08550)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
@ -24,6 +25,8 @@ endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DGTK_VERSION=${GTK_VERSION}
OPTIONS_DEBUG
-DGTK_SKIP_HEADERS=ON)

View File

@ -1,3 +1,3 @@
Source: libepoxy
Version: 1.4.0-2432daf-1
Version: 1.4.1-7d58fd3
Description: Epoxy is a library for handling OpenGL function pointer management for you

View File

@ -4,11 +4,11 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libepoxy-2432daf4cf58b5ff11e008ca34811588285c43b3)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libepoxy-7d58fd3d47d2d69f2b1b9f08325302e4eeff9ebe)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/anholt/libepoxy/archive/2432daf4cf58b5ff11e008ca34811588285c43b3.zip"
FILENAME "libepoxy-2432daf4cf58b5ff11e008ca34811588285c43b3.zip"
SHA512 70b59b6c5722eb87522927fdedab44f74ffd2d71d2ae42509de07b0c3e13f71320b25da0d4c75dca75c4208ea7a525483267d6ccb8acd5274728c015c7ac4006)
URLS "https://github.com/anholt/libepoxy/archive/7d58fd3d47d2d69f2b1b9f08325302e4eeff9ebe.zip"
FILENAME "libepoxy-7d58fd3d47d2d69f2b1b9f08325302e4eeff9ebe.zip"
SHA512 7e97a7832ea136565be92d6f6f0afead2fff9ac7b2999ef9e7865ac18dfbeab354e5a652b1a86e982a323dca9a1446df07821c26d315b7da4ca72b5be7345695)
vcpkg_extract_source_archive(${ARCHIVE})

View File

@ -28,18 +28,24 @@ else()
set(NOT_BUILD_STATIC OFF)
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DENABLE_STATIC=${BUILD_STATIC}
-DENABLE_SHARED=${NOT_BUILD_STATIC}
-DWITH_CRT_DLL=ON
-DENABLE_EXECUTABLES=OFF
-DINSTALL_DOCS=OFF
# OPTIONS_RELEASE -DOPTIMIZE=1
${LIBJPEGTURBO_SIMD}
OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
)
vcpkg_build_cmake()
vcpkg_install_cmake()
# Rename libraries for static builds

3
ports/libpopt/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: libpopt
Version: 1.16-10~vcpkg1
Description: Library for parsing command line parameters

View File

@ -0,0 +1,57 @@
cmake_minimum_required(VERSION 3.0)
project(popt VERSION 1.16 LANGUAGES C)
set(PACKAGE "popt")
set(POPT_SYSCONFDIR "C:\\\\")
set(CMAKE_DEBUG_POSTFIX "d")
file(GLOB SOURCES "popt.c"
"poptconfig.c"
"popthelp.c"
"poptint.c"
"poptparse.c"
"popt.def"
)
option(POPT_USE_CONFIG "Use configuration file" OFF)
if(POPT_USE_CONFIG)
include(CheckIncludeFile)
include(CheckFunctionExists)
check_include_file(float.h HAVE_FLOAT_H)
check_include_file(fnmatch.h HAVE_FNMATCH_H)
check_include_file(glob.h HAVE_GLOB_H)
check_include_file(langinfo.h HAVE_LANGINFO_H)
check_include_file(libintl.h HAVE_LIBINTL_H)
check_include_file(mcheck.h HAVE_MCHECK_H)
check_include_file(unistd.h HAVE_UNISTD_H)
check_function_exists(gettext HAVE_GETTEXT)
check_function_exists(iconv HAVE_ICONV)
check_function_exists(mtrace HAVE_MTRACE)
check_function_exists(srandom HAVE_SRANDOM)
check_function_exists(stpcpy HAVE_STPCPY)
check_function_exists(strerror HAVE_STRERROR)
check_function_exists(vasprintf HAVE_VASPRINTF)
check_function_exists(__secure_getenv HAVE___SECURE_GETENV)
configure_file(config.h.cmake config.h @ONLY)
add_definitions(-DHAVE_CONFIG_H)
endif()
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
include_directories(${CMAKE_BINARY_DIR})
add_library(popt ${SOURCES})
set_target_properties(popt PROPERTIES COMPILE_FLAGS "/wd4996")
install(TARGETS popt
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(FILES "popt.h" DESTINATION "include")

View File

@ -0,0 +1,61 @@
#ifndef CONFIG_H
#define CONFIG_H
/* Define to 1 if translation of program messages to the user's native language is requested. */
#cmakedefine ENABLE_NLS 1
/* Define if the GNU dcgettext() function is already present or preinstalled. */
#cmakedefine HAVE_DCGETTEXT 1
/* Define to 1 if you have the <float.h> header file. */
#cmakedefine HAVE_FLOAT_H 1
/* Define to 1 if you have the <fnmatch.h> header file. */
#cmakedefine HAVE_FNMATCH_H 1
/* Define if the GNU gettext() function is already present or preinstalled. */
#cmakedefine HAVE_GETTEXT 1
/* Define to 1 if you have the <glob.h> header file. */
#cmakedefine HAVE_GLOB_H 1
/* Define if you have the iconv() function and it works. */
#cmakedefine HAVE_ICONV 1
/* Define to 1 if you have the <langinfo.h> header file. */
#cmakedefine HAVE_LANGINFO_H 1
/* Define to 1 if you have the <libintl.h> header file. */
#cmakedefine HAVE_LIBINTL_H 1
/* Define to 1 if you have the <mcheck.h> header file. */
#cmakedefine HAVE_MCHECK_H 1
/* Define to 1 if you have the `mtrace' function. */
#cmakedefine HAVE_MTRACE 1
/* Define to 1 if you have the `srandom' function. */
#cmakedefine HAVE_SRANDOM 1
/* Define to 1 if you have the `stpcpy' function. */
#cmakedefine HAVE_STPCPY 1
/* Define to 1 if you have the `strerror' function. */
#cmakedefine HAVE_STRERROR 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Define to 1 if you have the `vasprintf' function. */
#cmakedefine HAVE_VASPRINTF 1
/* Define to 1 if you have the `__secure_getenv' function. */
#cmakedefine HAVE___SECURE_GETENV 1
/* Name of package */
#cmakedefine PACKAGE "@PACKAGE@"
/* Full path to default POPT configuration directory */
#cmakedefine POPT_SYSCONFDIR "@POPT_SYSCONFDIR@"
#endif

View File

@ -0,0 +1,50 @@
EXPORTS
_poptArgMask
_poptBitsK
_poptBitsM
_poptBitsN
_poptGroupMask
poptAddAlias
poptAddItem
poptAliasOptions
poptBadOption
poptBitsAdd
poptBitsArgs
poptBitsChk
poptBitsClr
poptBitsDel
poptBitsIntersect
poptBitsUnion
poptConfigFileToString
poptDupArgv
poptFini
poptFreeContext
poptGetArg
poptGetArgs
poptGetContext
poptGetInvocationName
poptGetNextOpt
poptGetOptArg
poptHelpOptions
poptInit
poptParseArgvString
poptPeekArg
poptPrintHelp
poptPrintUsage
poptReadConfigFile
poptReadConfigFiles
poptReadDefaultConfig
poptReadFile
poptResetContext
poptSaneFile
poptSaveBits
poptSaveInt
poptSaveLong
poptSaveLongLong
poptSaveShort
poptSaveString
poptSetExecPath
poptSetOtherOptionHelp
poptStrerror
poptStrippedArgv
poptStuffArgs

View File

@ -0,0 +1,62 @@
diff -Naur a/poptconfig.c b/poptconfig.c
--- a/poptconfig.c 2009-05-20 16:18:07.000000000 +0300
+++ b/poptconfig.c 2017-01-21 03:10:17.116120500 +0300
@@ -141,17 +141,23 @@
int poptSaneFile(const char * fn)
{
struct stat sb;
- uid_t uid = getuid();
+#ifndef _MSC_VER
+ uid_t uid = getuid();
+#endif // ! _MSC_VER
if (stat(fn, &sb) == -1)
return 1;
+#ifndef _MSC_VER
if ((uid_t)sb.st_uid != uid)
return 0;
+#endif // ! _MSC_VER
if (!S_ISREG(sb.st_mode))
return 0;
/*@-bitwisesigned@*/
- if (sb.st_mode & (S_IWGRP|S_IWOTH))
- return 0;
+#ifndef _MSC_VER
+ if (sb.st_mode & (S_IWGRP | S_IWOTH))
+ return 0;
+#endif // ! _MSC_VER
/*@=bitwisesigned@*/
return 1;
}
diff -Naur a/popthelp.c b/popthelp.c
--- a/popthelp.c 2009-08-28 03:06:33.000000000 +0300
+++ b/popthelp.c 2017-01-21 02:59:26.665695800 +0300
@@ -10,7 +10,10 @@
#include "system.h"
-#define POPT_USE_TIOCGWINSZ
+#ifndef _MSC_VER
+#define POPT_USE_TIOCGWINSZ
+#endif
+
#ifdef POPT_USE_TIOCGWINSZ
#include <sys/ioctl.h>
#endif
diff -Naur a/system.h b/system.h
--- a/system.h 2008-12-18 19:09:49.000000000 +0200
+++ b/system.h 2017-01-21 03:10:59.195367500 +0300
@@ -100,4 +100,13 @@
#endif
#define UNUSED(x) x __attribute__((__unused__))
+#if defined(_MSC_VER)
+#define X_OK 0
+
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+
#include "popt.h"

View File

@ -0,0 +1,35 @@
include(vcpkg_common_functions)
set(LIBPOPT_VERSION 1.16)
set(LIBPOPT_HASH bae2dd4e5d682ef023fdc77ae60c4aad01a3a576d45af9d78d22490c11e410e60edda37ede171920746d4ae0d5de3c060d15cecfd41ba75b727a811be828d694)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/popt-${LIBPOPT_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "http://rpm5.org/files/popt/popt-${LIBPOPT_VERSION}.tar.gz"
FILENAME "popt-${LIBPOPT_VERSION}.tar.gz"
SHA512 ${LIBPOPT_HASH}
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/patches/0004-vcpkg-fixmsvc.patch"
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/config.h.cmake DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/popt.def DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DPOPT_USE_CONFIG=1
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpopt)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpopt/COPYING ${CURRENT_PACKAGES_DIR}/share/libpopt/copyright)

3
ports/libvpx/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: libvpx
Version: 1.6.1-1
Description: The reference software implementation for the video coding formats VP8 and VP9.

109
ports/libvpx/portfile.cmake Normal file
View File

@ -0,0 +1,109 @@
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(STATUS "Warning: Dynamic building not supported by libvpx yet. Building static.")
set(VCPKG_LIBRARY_LINKAGE static)
endif()
include(vcpkg_common_functions)
set(LIBVPX_VERSION 1.6.1)
set(LIBVPX_HASH 13b7eb515d026b302b8c484d6f06df067feb5aed4ceac953d85fe84fd684dab07e89ddbf80b4f395c6d9127709422156287e5754f49246050b2e18930adb3970)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libvpx-${LIBVPX_VERSION})
string(REGEX REPLACE "\\\\" "/" SOURCE_PATH_UNIX ${SOURCE_PATH})
string(REGEX REPLACE "\\\\" "/" CURRENT_PACKAGES_DIR_UNIX ${CURRENT_PACKAGES_DIR})
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/webmproject/libvpx/archive/v${LIBVPX_VERSION}.tar.gz"
FILENAME "libvpx-${LIBVPX_VERSION}.tar.gz"
SHA512 ${LIBVPX_HASH}
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_find_acquire_program(YASM)
vcpkg_find_acquire_program(PERL)
vcpkg_acquire_msys(MSYS_ROOT)
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
set(ENV{PATH} "${PERL_EXE_PATH};${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;$ENV{PATH}")
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
message(STATUS "Installing MSYS Packages")
vcpkg_execute_required_process(
COMMAND
${BASH} --noprofile --norc -c
"pacman -Sy --noconfirm --needed make"
WORKING_DIRECTORY ${MSYS_ROOT}
LOGNAME pacman-${TARGET_TRIPLET})
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
if(VCPKG_CRT_LINKAGE STREQUAL static)
set(LIBVPX_CRT_LINKAGE --enable-static-msvcrt)
set(LIBVPX_CRT_SUFFIX mt)
else()
set(LIBVPX_CRT_SUFFIX md)
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
set(LIBVPX_TARGET_ARCH "x86-win32")
set(LIBVPX_ARCH_DIR "Win32")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
set(LIBVPX_TARGET_ARCH "x86_64-win64")
set(LIBVPX_ARCH_DIR "x64")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
set(LIBVPX_TARGET_ARCH "armv7-win32")
set(LIBVPX_ARCH_DIR "ARM")
endif()
set(LIBVPX_TARGET_VS "vs14")
message(STATUS "Generating makefile")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
vcpkg_execute_required_process(
COMMAND
${BASH} --noprofile --norc
"${SOURCE_PATH_UNIX}/configure"
--target=${LIBVPX_TARGET_ARCH}-${LIBVPX_TARGET_VS}
${LIBVPX_CRT_LINKAGE}
--disable-examples
--disable-tools
--disable-docs
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}"
LOGNAME configure-${TARGET_TRIPLET})
message(STATUS "Generating MSBuild projects")
vcpkg_execute_required_process(
COMMAND
${BASH} --noprofile --norc -c "make dist"
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}"
LOGNAME generate-${TARGET_TRIPLET})
vcpkg_build_msbuild(
PROJECT_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx.vcxproj"
)
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpxmd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpxmdd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
else()
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpxmt.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpxmtd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nopost-nomt-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx")
else()
set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx")
endif()
file(
INSTALL
${LIBVPX_INCLUDE_DIR}
DESTINATION
"${CURRENT_PACKAGES_DIR}/include"
RENAME
"vpx")
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libvpx)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libvpx/LICENSE ${CURRENT_PACKAGES_DIR}/share/libvpx/copyright)

View File

@ -0,0 +1,65 @@
From 5bd18b68658c2ba66e358341c159b17d9ba18791 Mon Sep 17 00:00:00 2001
From: Mikhail Paulyshka <me@mixaill.tk>
Date: Wed, 15 Mar 2017 00:01:24 +0300
Subject: [PATCH] fix cmake
- enable shared lib
- add install target
- set _CRT_SECURE_NO_WARNINGS
---
CMakeLists.txt | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf99829..a7bf021 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,14 +5,21 @@
## tree. An additional intellectual property rights grant can be found
## in the file PATENTS. All contributing project authors may
## be found in the AUTHORS file in the root of the source tree.
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.4)
project(LIBWEBM)
+
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
include("${CMAKE_CURRENT_SOURCE_DIR}/build/msvc_runtime.cmake")
set(LIBWEBM_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+if(MSVC)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+endif()
+
# Libwebm section.
-add_library(webm STATIC
+add_library(webm
"${LIBWEBM_SRC_DIR}/mkvmuxer.cpp"
"${LIBWEBM_SRC_DIR}/mkvmuxer.hpp"
"${LIBWEBM_SRC_DIR}/mkvmuxertypes.hpp"
@@ -62,3 +69,21 @@ add_executable(webm2pes
"${LIBWEBM_SRC_DIR}/webm2pes.cc"
"${LIBWEBM_SRC_DIR}/webm2pes.h")
target_link_libraries(webm2pes LINK_PUBLIC webm)
+
+install(
+ TARGETS webm
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
+
+install(
+ FILES
+ "mkvmuxer.hpp"
+ "mkvmuxertypes.hpp"
+ "mkvmuxerutil.hpp"
+ "mkvparser.hpp"
+ "mkvreader.hpp"
+ "mkvwriter.hpp"
+ "webmids.hpp"
+ DESTINATION
+ "include/libwebm")
--
2.11.0.windows.1

3
ports/libwebm/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: libwebm
Version: 1.0.0.27-1
Description: WebM File Parser

View File

@ -0,0 +1,36 @@
include(vcpkg_common_functions)
set(LIBWEBM_VERSION 1.0.0.27)
set(LIBWEBM_HASH 15650b8b121b226654a5abed45a3586ddaf785dee8dac7c72df3f3f9aef76af4e561b75a2ef05328af8dfcfde21948b2edb59cd884dad08b8919cab4ee5a8596)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libwebm-libwebm-${LIBWEBM_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/webmproject/libwebm/archive/libwebm-${LIBWEBM_VERSION}.tar.gz"
FILENAME "libwebm-${LIBWEBM_VERSION}.tar.gz"
SHA512 ${LIBWEBM_HASH}
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-cmake.patch")
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
set(LIBWEBM_CRT_LINKAGE -DMSVC_RUNTIME=dll)
else()
set(LIBWEBM_CRT_LINKAGE -DMSVC_RUNTIME=static)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${LIBWEBM_CRT_LINKAGE})
vcpkg_build_cmake()
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebm)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebm/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/libwebm/copyright)

View File

@ -1,244 +0,0 @@
From aa43d3193302cd545ae2a45079b12af62bf13b38 Mon Sep 17 00:00:00 2001
From: Robert Schumacher <roschuma@microsoft.com>
Date: Sat, 7 May 2016 00:47:10 -0700
Subject: [PATCH] Modify 2010/libmpg123.vcxproj to use VS 2015, along with
reverting #undef MPG123_EXPORT
---
ports/MSVC++/2010/libmpg123/libmpg123.vcxproj | 54 +++++++++++++++++++--------
src/libmpg123/mpg123.h.in | 2 -
2 files changed, 38 insertions(+), 18 deletions(-)
diff --git a/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
index afa7de2..84c8d25 100644
--- a/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
+++ b/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
@@ -47,6 +47,10 @@
<RootNamespace>libmpg123</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_x86_Dll_Minimal|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
@@ -154,7 +158,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Generic|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<ExceptionHandling>
@@ -178,7 +182,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
@@ -200,7 +204,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Generic_Dll|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;BUILD_MPG123_DLL;ACCURATE_ROUNDING;IEEE_FLOAT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<ExceptionHandling>
@@ -231,7 +235,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;BUILD_MPG123_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
@@ -258,7 +262,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_x86|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<ExceptionHandling>
@@ -278,6 +282,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
+
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
@@ -337,7 +344,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
</Command>
</PreLinkEvent>
<Lib>
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(ProjectDir)Debug\$(ProjectName).lib</OutputFile>
<AdditionalLibraryDirectories>$(ProjectDir)\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
@@ -349,7 +356,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
@@ -371,6 +378,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_sse.o" "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
+
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
@@ -430,7 +440,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
</Command>
</PreLinkEvent>
<Lib>
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(ProjectDir)Release\$(ProjectName).lib</OutputFile>
<AdditionalLibraryDirectories>$(ProjectDir)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
@@ -438,7 +448,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_x86_Dll|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<ExceptionHandling>
@@ -460,6 +470,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
+
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
@@ -519,7 +532,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
</Command>
</PreLinkEvent>
<Link>
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(ProjectDir)Debug\$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>$(ProjectDir)\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -540,7 +553,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
@@ -563,6 +576,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_sse.o" "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
+
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
@@ -622,7 +638,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
</Command>
</PreLinkEvent>
<Link>
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(ProjectDir)Release\$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>$(ProjectDir)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -638,7 +654,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_x86_Dll_Minimal|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;NO_STRING;NO_ID3V2;NO_ICY;NO_DOWNSAMPLE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<ExceptionHandling>
@@ -660,6 +676,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
+
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
@@ -719,7 +738,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
</Command>
</PreLinkEvent>
<Link>
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(ProjectDir)Debug\$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>$(ProjectDir)\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -740,7 +759,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;NO_STRING;NO_ID3V2;NO_ICY;NO_DOWNSAMPLE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
@@ -763,6 +782,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_sse.o" "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
+
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
@@ -822,7 +844,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
</Command>
</PreLinkEvent>
<Link>
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(ProjectDir)Release\$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>$(ProjectDir)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
diff --git a/src/libmpg123/mpg123.h.in b/src/libmpg123/mpg123.h.in
index a25d4d1..d95e41d 100644
--- a/src/libmpg123/mpg123.h.in
+++ b/src/libmpg123/mpg123.h.in
@@ -1404,6 +1404,4 @@ MPG123_EXPORT int mpg123_replace_reader_handle( mpg123_handle *mh
}
#endif
-#undef MPG123_EXPORT
-
#endif
--
2.8.1.windows.1

View File

@ -0,0 +1,88 @@
From fcf5f82c9abeb6068be26dc43f613a253cac3436 Mon Sep 17 00:00:00 2001
From: Mikhail Paulyshka <me@mixaill.tk>
Date: Mon, 13 Mar 2017 02:59:35 +0300
Subject: [PATCH] ports/msvc/libmpg123: fix static library linking
---
ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
index 0a69525..ecf3a66 100644
--- a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
+++ b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
@@ -265,7 +265,7 @@
<ExceptionHandling>
</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -285,7 +285,7 @@
<ExceptionHandling>
</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -312,7 +312,7 @@
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
@@ -336,7 +336,7 @@
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
@@ -474,7 +474,7 @@
<ExceptionHandling>
</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -562,7 +562,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_
<ExceptionHandling>
</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -623,7 +623,7 @@ yasm -a x86 -m amd64 -f win64 -p gas -r raw -g null -o "$(IntDir)synth_stereo_x8
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
@@ -716,7 +716,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_X86_64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
--
2.11.0.windows.1

View File

@ -1,3 +1,3 @@
Source: mpg123
Version: 1.23.3
Version: 1.24.0-1
Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3).

View File

@ -1,13 +1,27 @@
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
message(STATUS "Warning: Static building not supported yet. Building dynamic.")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3)
set(MPG123_VERSION 1.24.0)
set(MPG123_HASH e7c0d7a103daf496e75a6aa6aca861cfc0ad391f242335990c2360305e567039d24ca3b37a35f79b75749055e255f4692b8b43d2fec332b119223b00e12b0cb7)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpg123-${MPG123_VERSION})
#architecture detection
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(MPG123_ARCH Win32)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(MPG123_ARCH x64)
else()
message(FATAL_ERROR "unsupported architecture")
endif()
#linking
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(MPG123_CONFIGURATION_SUFFIX _Dll)
endif()
vcpkg_download_distfile(ARCHIVE
URLS "http://downloads.sourceforge.net/project/mpg123/mpg123/1.23.3/mpg123-1.23.3.tar.bz2"
FILENAME "mpg123-1.23.3.tar.bz2"
SHA512 a5ebfb36223a3966386bc8e5769b8543861872d20f9de037d07857e857000f20e198e0b1db04bdc56b18b19d5b4027d8261a104af0216d6ea45274b21a18dda4
URLS "http://downloads.sourceforge.net/project/mpg123/mpg123/${MPG123_VERSION}/mpg123-${MPG123_VERSION}.tar.bz2"
FILENAME "mpg123-${MPG123_VERSION}.tar.bz2"
SHA512 ${MPG123_HASH}
)
vcpkg_extract_source_archive(${ARCHIVE})
@ -16,44 +30,51 @@ get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}")
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Modify-2010-libmpg123.vcxproj-to-use-VS-2015-along-w.patch
)
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch")
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
RELEASE_CONFIGURATION Release_x86_Dll
DEBUG_CONFIGURATION Debug_x86_Dll
PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
RELEASE_CONFIGURATION Release_x86${MPG123_CONFIGURATION_SUFFIX}
DEBUG_CONFIGURATION Debug_x86${MPG123_CONFIGURATION_SUFFIX}
)
message(STATUS "Installing")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.dll
${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.dll
${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
)
else()
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug_x86/libmpg123.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release_x86/libmpg123.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
endif()
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Debug/libmpg123.dll
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Debug/libmpg123.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Release/libmpg123.dll
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Release/libmpg123.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Debug/libmpg123.lib
${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Release/libmpg123.lib
${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/mpg123.h
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)
file(INSTALL
${SOURCE_PATH}/src/libmpg123/mpg123.h.in
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpg123 RENAME copyright)
vcpkg_copy_pdbs()
message(STATUS "Installing done")

View File

@ -1,3 +1,3 @@
Source: mpir
Version: 3.0.0-1
Version: 3.0.0-2
Description: Multiple Precision Integers and Rationals.

View File

@ -11,7 +11,7 @@ vcpkg_download_distfile(ARCHIVE_FILE
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
if(VCPKG_PLATFORM_TOOLSET MATCHES "v141*")
if(VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(MSVC_VERSION 15)
else()
set(MSVC_VERSION 14)
@ -27,10 +27,10 @@ else()
)
endif()
IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
SET(BUILD_ARCH "Win32")
ELSE()
SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE})
ENDIF()
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
@ -43,12 +43,10 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
)
file(INSTALL
${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.dll
${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
)
file(INSTALL
${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.dll
${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
)
file(INSTALL
@ -77,7 +75,7 @@ else()
${SOURCE_PATH}/lib/${BUILD_ARCH}/Release/mpir.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpir RENAME copyright)
file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpir RENAME copyright)
endif()
message(STATUS "Installing done")

View File

@ -0,0 +1,3 @@
Source: nlohmann-json
Version: 2.1.1
Description: JSON for Modern C++

View File

@ -0,0 +1,22 @@
include(vcpkg_common_functions)
set(SOURCE_VERSION 2.1.1)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/json-${SOURCE_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/nlohmann/json/archive/v${SOURCE_VERSION}.zip"
FILENAME "nlohmann-json-v${SOURCE_VERSION}.zip"
SHA512 7f7155c4bcc4f704f329ba6976c31888a45d17bc2fa08ee9e64dc1b0b1f39439819b895cda9d77f3f60446ad6f5802e9c6ae79fbaf6d1b6f7e49ca050b86cd7c
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
file(COPY ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/nlohmann-json)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/nlohmann-json/LICENSE.MIT ${CURRENT_PACKAGES_DIR}/share/nlohmann-json/copyright)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.0)
project(pango)
project(pango C)
set(PANGO_LIB_SUFFIX 1.0)
set(PANGO_DLL_SUFFIX 1)

View File

@ -1,4 +1,4 @@
Source: pango
Version: 1.40.3
Version: 1.40.4
Description: Text and font handling library.
Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz

View File

@ -5,17 +5,19 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pango-1.40.3)
set(PANGO_VERSION 1.40.4)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pango-${PANGO_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-1.40.3.tar.xz"
FILENAME "pango-1.40.3.tar.xz"
SHA512 ff82395e8487624dffe212975b72b3383dcebb197a8675c8b409665e3e2e30fc23d9a6c25c3129a115adb7182b2a71a49550dbe881eb7ee9bbc572de6ba18d27)
URLS "http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-${PANGO_VERSION}.tar.xz"
FILENAME "pango-${PANGO_VERSION}.tar.xz"
SHA512 8c7413f6712eaf9fd4bd92a9260a85e7e4bd5e1a03c4c89db139e1704e8681e9834f8b98394b9f4b87babd45155a15b6cffd583ad8f89a48a4849305d43aa613)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG
-DPANGO_SKIP_HEADERS=ON)

3
ports/pcre2/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: pcre2
Version: 10.23
Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library

View File

@ -0,0 +1,45 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcre2-10.23)
vcpkg_download_distfile(ARCHIVE
URLS "https://sourceforge.net/projects/pcre/files/pcre2/10.23/pcre2-10.23.zip/download"
FILENAME "pcre2-10.23.zip"
SHA512 0f0638ce28ce17e18425d499cc516a30dabbfa868180ea320361ffeaa26d4f6f6975f12bc20024f7457fe3c6eed686976a9e5c66c2785d1ea63bee38131ea0d2)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DPCRE2_BUILD_PCRE2_8=ON
-DPCRE2_BUILD_PCRE2_16=ON
-DPCRE2_BUILD_PCRE2_32=ON
-DPCRE2_SUPPORT_JIT=ON
-DPCRE2_SUPPORT_UNICODE=ON
-DPCRE2_BUILD_TESTS=OFF
-DPCRE2_BUILD_PCRE2GREP=OFF)
vcpkg_install_cmake()
file(READ ${CURRENT_PACKAGES_DIR}/include/pcre2.h PCRE2_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
string(REPLACE "defined(PCRE2_STATIC)" "1" PCRE2_H "${PCRE2_H}")
else()
string(REPLACE "defined(PCRE2_STATIC)" "0" PCRE2_H "${PCRE2_H}")
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/pcre2.h "${PCRE2_H}")
# don't install POSIX wrapper
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/pcre2posix.h)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/pcre2-posix.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pcre2-posixd.lib)
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/pcre2-posix.dll ${CURRENT_PACKAGES_DIR}/debug/bin/pcre2-posixd.dll)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/man)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/man)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcre2)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/pcre2/COPYING ${CURRENT_PACKAGES_DIR}/share/pcre2/copyright)

3
ports/tinyexr/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: tinyexr
Version: v0.9.5-d16ea6
Description: Library to load and save OpenEXR(.exr) images

5
ports/tinyexr/copyright Normal file
View File

@ -0,0 +1,5 @@
3-clause BSD
tinyexr uses miniz, which is developed by Rich Geldreich richgel99@gmail.com, and licensed under public domain.
tinyexr tools uses stb, which is licensed under public domain: https://github.com/nothings/stb tinyexr uses some code from OpenEXR, which is licensed under 3-clause BSD license.

View File

@ -0,0 +1,14 @@
# header-only
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyexr-d16ea6347ae78bcee984fb57cab1f023aeda4fb0)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/syoyo/tinyexr/archive/d16ea6347ae78bcee984fb57cab1f023aeda4fb0.tar.gz"
FILENAME "tinyexr-v0.9.5-d16ea6.tar.gz"
SHA512 189ab04f6c5fb50c20ac0515a83ee16cba4b0f1bca004db2926281077868d1384e0c54f81768a54b76286a17c1b0c45a0b82acaf22b7ee843dc87c654b09e950
)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${SOURCE_PATH}/tinyexr.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
# Handle copyright
file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyexr)

View File

@ -1,4 +1,4 @@
Source: uwebsockets
Version: 0.12.0
Version: 0.13.0-1
Build-Depends: libuv, openssl, zlib
Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js

View File

@ -20,6 +20,9 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
file(GLOB HEADERS ${SOURCE_PATH}/src/*.h)
file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/uWS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/uwebsockets)

View File

@ -7,7 +7,9 @@
# vcpkg_build_msbuild(PROJECT_PATH <sln_project_path>
# [RELEASE_CONFIGURATION <release_configuration>] # (default = "Release")
# [DEBUG_CONFIGURATION <debug_configuration>] @ (default = "Debug")
# [TARGET_PLATFORM_VERSION <windows_target_platform_version>]
# [PLATFORM <platform>] # (default = "${TRIPLET_SYSTEM_ARCH}")
# [PLATFORM_TOOLSET <platform_toolset>] # (default = "${VCPKG_PLATFORM_TOOLSET}")
# [OPTIONS arg1 [arg2 ...]]
# [OPTIONS_RELEASE arg1 [arg2 ...]]
# [OPTIONS_DEBUG arg1 [arg2 ...]]
@ -21,12 +23,16 @@
# ``DEBUG_CONFIGURATION``
# The configuration (``/p:Configuration`` msbuild parameter)
# used for Debug builds.
# ``DEBUG_CONFIGURATION``
# The configuration (``/p:Configuration`` msbuild parameter)
# used for Debug builds.
# ``TARGET_PLATFORM_VERSION``
# The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter)
# ``TARGET``
# The MSBuild target to build. (``/t:<TARGET>``)
# ``PLATFORM``
# The platform (``/p:Platform`` msbuild parameter)
# used for the build.
# ``PLATFORM_TOOLSET``
# The platform toolset (``/p:PlatformToolset`` msbuild parameter)
# used for the build.
# ``OPTIONS``
# The options passed to msbuild for all builds.
# ``OPTIONS_RELEASE``
@ -35,8 +41,9 @@
# The options passed to msbuild for Debug builds.
#
function(vcpkg_build_msbuild)
cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN})
cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN})
if(NOT DEFINED _csc_RELEASE_CONFIGURATION)
set(_csc_RELEASE_CONFIGURATION Release)
@ -47,16 +54,33 @@ function(vcpkg_build_msbuild)
if(NOT DEFINED _csc_PLATFORM)
set(_csc_PLATFORM ${TRIPLET_SYSTEM_ARCH})
endif()
if(NOT DEFINED _csc_PLATFORM_TOOLSET)
set(_csc_PLATFORM_TOOLSET ${VCPKG_PLATFORM_TOOLSET})
endif()
if(NOT DEFINED _csc_TARGET_PLATFORM_VERSION)
vcpkg_get_windows_sdk(_csc_TARGET_PLATFORM_VERSION)
endif()
if(NOT DEFINED _csc_TARGET)
set(_csc_TARGET Rebuild)
endif()
list(APPEND _csc_OPTIONS
/t:${_csc_TARGET}
/p:Platform=${_csc_PLATFORM}
/p:PlatformToolset=${_csc_PLATFORM_TOOLSET}
/p:VCPkgLocalAppDataDisabled=true
/p:UseIntelMKL=No
/p:WindowsTargetPlatformVersion=${_csc_TARGET_PLATFORM_VERSION}
/m
)
message(STATUS "Building ${_csc_PROJECT_PATH} for Release")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
vcpkg_execute_required_process(
COMMAND msbuild ${_csc_PROJECT_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE}
COMMAND msbuild ${_csc_PROJECT_PATH}
/p:Configuration=${_csc_RELEASE_CONFIGURATION}
/p:Platform=${_csc_PLATFORM}
/p:VCPkgLocalAppDataDisabled=true
/p:UseIntelMKL=No
/m
${_csc_OPTIONS}
${_csc_OPTIONS_RELEASE}
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
LOGNAME build-${TARGET_TRIPLET}-rel
)
@ -64,12 +88,10 @@ function(vcpkg_build_msbuild)
message(STATUS "Building ${_csc_PROJECT_PATH} for Debug")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
vcpkg_execute_required_process(
COMMAND msbuild ${_csc_PROJECT_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG}
COMMAND msbuild ${_csc_PROJECT_PATH}
/p:Configuration=${_csc_DEBUG_CONFIGURATION}
/p:Platform=${_csc_PLATFORM}
/p:VCPkgLocalAppDataDisabled=true
/p:UseIntelMKL=No
/m
${_csc_OPTIONS}
${_csc_OPTIONS_DEBUG}
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
LOGNAME build-${TARGET_TRIPLET}-dbg
)

View File

@ -19,8 +19,8 @@ function(vcpkg_configure_cmake)
set(GENERATOR "Visual Studio 14 2015")
elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
set(GENERATOR "Visual Studio 14 2015 Win64")
elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm")
set(GENERATOR "Visual Studio 14 2015 ARM" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
set(GENERATOR "Visual Studio 14 2015 ARM")
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017")
@ -32,8 +32,8 @@ function(vcpkg_configure_cmake)
set(GENERATOR "Visual Studio 15 2017")
elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017 Win64")
elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm")
set(GENERATOR "Visual Studio 15 2017 ARM" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017 ARM")
endif()
# If we use Ninja, make sure it's on PATH

View File

@ -1,6 +1,6 @@
function(vcpkg_get_windows_sdk ret)
execute_process(
COMMAND powershell.exe -ExecutionPolicy Bypass ${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1
COMMAND powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& {& '${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1'}" 2>&1
OUTPUT_VARIABLE WINDOWS_SDK
RESULT_VARIABLE error_code)
@ -10,6 +10,5 @@ function(vcpkg_get_windows_sdk ret)
# Remove trailing newline
string(REGEX REPLACE "\n$" "" WINDOWS_SDK "${WINDOWS_SDK}")
set(${ret} ${WINDOWS_SDK} PARENT_SCOPE)
endfunction()

View File

@ -1,9 +1,13 @@
# Common Ambient Variables:
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
# PORT is the current port name (zlib, etc)
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
# PORT = current port name (zlib, etc)
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
#
include(vcpkg_common_functions)

View File

@ -0,0 +1,17 @@
#pragma once
namespace vcpkg
{
struct LineInfo
{
int line_number;
const char* file_name;
constexpr LineInfo() : line_number(0), file_name(nullptr) {}
constexpr LineInfo(const int line_number, const char* file_name) : line_number(line_number), file_name(file_name) {}
std::string toString() const;
};
}
#define VCPKG_LINE_INFO vcpkg::LineInfo(__LINE__, __FILE__)

View File

@ -40,15 +40,15 @@ namespace vcpkg
return this->m_error_code;
}
T&& get_or_throw() &&
T&& get_or_throw(const LineInfo& line_info) &&
{
throw_if_error();
throw_if_error(line_info);
return std::move(this->m_t);
}
const T& get_or_throw() const &
const T& get_or_throw(const LineInfo& line_info) const &
{
throw_if_error();
throw_if_error(line_info);
return this->m_t;
}
@ -71,9 +71,9 @@ namespace vcpkg
}
private:
void throw_if_error() const
void throw_if_error(const LineInfo& line_info) const
{
Checks::check_throw(!this->m_error_code, this->m_error_code.message().c_str());
Checks::check_throw(line_info, !this->m_error_code, this->m_error_code.message().c_str());
}
std::error_code m_error_code;

View File

@ -9,7 +9,7 @@ namespace vcpkg
lazy() : value(T()), initialized(false) {}
template <class F>
T const& get_lazy(F& f) const
T const& get_lazy(const F& f) const
{
if (!initialized)
{

View File

@ -1,51 +1,52 @@
#pragma once
#include "vcpkg_Strings.h"
#include "LineInfo.h"
namespace vcpkg::Checks
{
__declspec(noreturn) void unreachable();
__declspec(noreturn) void unreachable(const LineInfo& line_info);
// Part of the reason these exist is to not include extra headers in this one to avoid circular #includes.
_declspec(noreturn) void exit_with_message(const char* errorMessage);
_declspec(noreturn) void exit_with_message(const LineInfo& line_info, const char* errorMessage);
template <class...Args>
_declspec(noreturn) void exit_with_message(const char* errorMessageTemplate, const Args&... errorMessageArgs)
_declspec(noreturn) void exit_with_message(const LineInfo& line_info, const char* errorMessageTemplate, const Args&... errorMessageArgs)
{
exit_with_message(Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
exit_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
}
_declspec(noreturn) void throw_with_message(const char* errorMessage);
_declspec(noreturn) void throw_with_message(const LineInfo& line_info, const char* errorMessage);
template <class...Args>
_declspec(noreturn) void throw_with_message(const char* errorMessageTemplate, const Args&... errorMessageArgs)
_declspec(noreturn) void throw_with_message(const LineInfo& line_info, const char* errorMessageTemplate, const Args&... errorMessageArgs)
{
throw_with_message(Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
throw_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
}
void check_throw(bool expression, const char* errorMessage);
void check_throw(const LineInfo& line_info, bool expression, const char* errorMessage);
template <class...Args>
void check_throw(bool expression, const char* errorMessageTemplate, const Args&... errorMessageArgs)
void check_throw(const LineInfo& line_info, bool expression, const char* errorMessageTemplate, const Args&... errorMessageArgs)
{
if (!expression)
{
// Only create the string if the expression is false
throw_with_message(Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
throw_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
}
}
void check_exit(bool expression);
void check_exit(const LineInfo& line_info, bool expression);
void check_exit(bool expression, const char* errorMessage);
void check_exit(const LineInfo& line_info, bool expression, const char* errorMessage);
template <class...Args>
void check_exit(bool expression, const char* errorMessageTemplate, const Args&... errorMessageArgs)
void check_exit(const LineInfo& line_info, bool expression, const char* errorMessageTemplate, const Args&... errorMessageArgs)
{
if (!expression)
{
// Only create the string if the expression is false
exit_with_message(Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
exit_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
}
}
}

View File

@ -1,11 +1,10 @@
#pragma once
#include <string>
#include "LineInfo.h"
namespace vcpkg::Enums
{
std::string nullvalue_toString(const std::string& enum_name);
__declspec(noreturn) void nullvalue_used(const std::string& enum_name);
__declspec(noreturn) void unreachable(const std::string& enum_name);
__declspec(noreturn) void nullvalue_used(const LineInfo& line_info, const std::string& enum_name);
}

View File

@ -8,7 +8,7 @@ namespace vcpkg::Files
{
static const char* FILESYSTEM_INVALID_CHARACTERS = R"(\/:*?"<>|)";
void check_is_directory(const fs::path& dirpath);
void check_is_directory(const LineInfo& line_info, const fs::path& dirpath);
bool has_invalid_chars_for_filesystem(const std::string& s);

View File

@ -6,6 +6,8 @@
namespace vcpkg
{
extern bool g_debugging;
StatusParagraphs database_load_check(const vcpkg_paths& paths);
void write_update(const vcpkg_paths& paths, const StatusParagraph& p);

View File

@ -31,14 +31,14 @@ namespace vcpkg
const std::string architecture = details::remove_required_field(&fields, BinaryParagraphRequiredField::ARCHITECTURE);
const triplet target_triplet = triplet::from_canonical_name(architecture);
this->spec = package_spec::from_name_and_triplet(name, target_triplet).get_or_throw();
this->spec = package_spec::from_name_and_triplet(name, target_triplet).get_or_throw(VCPKG_LINE_INFO);
this->version = details::remove_required_field(&fields, BinaryParagraphRequiredField::VERSION);
this->description = details::remove_optional_field(&fields, BinaryParagraphOptionalField::DESCRIPTION);
this->maintainer = details::remove_optional_field(&fields, BinaryParagraphOptionalField::MAINTAINER);
std::string multi_arch = details::remove_required_field(&fields, BinaryParagraphRequiredField::MULTI_ARCH);
Checks::check_exit(multi_arch == "same", "Multi-Arch must be 'same' but was %s", multi_arch);
Checks::check_exit(VCPKG_LINE_INFO, multi_arch == "same", "Multi-Arch must be 'same' but was %s", multi_arch);
std::string deps = details::remove_optional_field(&fields, BinaryParagraphOptionalField::DEPENDS);
this->depends = parse_depends(deps);
@ -46,7 +46,7 @@ namespace vcpkg
BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const triplet& target_triplet)
{
this->spec = package_spec::from_name_and_triplet(spgh.name, target_triplet).get_or_throw();
this->spec = package_spec::from_name_and_triplet(spgh.name, target_triplet).get_or_throw(VCPKG_LINE_INFO);
this->version = spgh.version;
this->description = spgh.description;
this->maintainer = spgh.maintainer;

11
toolsrc/src/LineInfo.cpp Normal file
View File

@ -0,0 +1,11 @@
#include "pch.h"
#include "LineInfo.h"
#include "vcpkg_Strings.h"
namespace vcpkg
{
std::string LineInfo::toString() const
{
return Strings::format("%s(%d)", this->file_name, this->line_number);
}
}

View File

@ -36,7 +36,7 @@ namespace vcpkg
case MachineType::WCEMIPSV2:
return t;
default:
Checks::exit_with_message("Unknown machine type code 0x%x", value);
Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown machine type code 0x%x", value);
}
}
}

View File

@ -99,7 +99,7 @@ namespace vcpkg::Paragraphs
auto begin_fieldname = cur;
while (is_alphanum(ch) || ch == '-')
next(ch);
Checks::check_exit(ch == ':', "Expected ':'");
Checks::check_exit(VCPKG_LINE_INFO, ch == ':', "Expected ':'");
fieldname = std::string(begin_fieldname, cur);
// skip ': '
@ -117,7 +117,7 @@ namespace vcpkg::Paragraphs
get_fieldname(ch, fieldname);
auto it = fields.find(fieldname);
Checks::check_exit(it == fields.end(), "Duplicate field");
Checks::check_exit(VCPKG_LINE_INFO, it == fields.end(), "Duplicate field");
get_fieldvalue(ch, fieldvalue);
@ -158,7 +158,7 @@ namespace vcpkg::Paragraphs
return parse_paragraphs(*spgh);
}
Checks::exit_with_message("Error while reading %s: %s", control_path.generic_string(), contents.error_code().message());
Checks::exit_with_message(VCPKG_LINE_INFO, "Error while reading %s: %s", control_path.generic_string(), contents.error_code().message());
}
std::vector<std::unordered_map<std::string, std::string>> parse_paragraphs(const std::string& str)
@ -171,7 +171,7 @@ namespace vcpkg::Paragraphs
try
{
auto pghs = get_paragraphs(path / "CONTROL");
Checks::check_exit(pghs.size() == 1, "Invalid control file at %s\\CONTROL", path.string());
Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid control file at %s\\CONTROL", path.string());
return SourceParagraph(pghs[0]);
}
catch (std::runtime_error const&) {}
@ -192,7 +192,7 @@ namespace vcpkg::Paragraphs
pghs = parse_paragraphs(*control_contents);
}
catch (std::runtime_error) {}
Checks::check_exit(pghs.size() == 1, "Invalid control file at %s", path.string());
Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid control file at %s", path.string());
return BinaryParagraph(pghs[0]);
}
return control_contents_maybe.error_code();

View File

@ -98,12 +98,12 @@ namespace vcpkg::PostBuildLint
return lint_status::SUCCESS;
}
static lint_status check_folder_lib_cmake(const fs::path& package_dir)
static lint_status check_folder_lib_cmake(const fs::path& package_dir, const package_spec& spec)
{
const fs::path lib_cmake = package_dir / "lib" / "cmake";
if (fs::exists(lib_cmake))
{
System::println(System::color::warning, "The /lib/cmake folder should be moved to just /cmake");
System::println(System::color::warning, "The /lib/cmake folder should be moved to /share/%s/cmake.", spec.name());
return lint_status::ERROR_DETECTED;
}
@ -227,7 +227,7 @@ namespace vcpkg::PostBuildLint
{
const std::wstring cmd_line = Strings::wformat(LR"("%s" /exports "%s")", dumpbin_exe.native(), dll.native());
System::exit_code_and_output ec_data = System::cmd_execute_and_capture_output(cmd_line);
Checks::check_exit(ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
if (ec_data.output.find("ordinal hint RVA name") == std::string::npos)
{
@ -258,7 +258,7 @@ namespace vcpkg::PostBuildLint
{
const std::wstring cmd_line = Strings::wformat(LR"("%s" /headers "%s")", dumpbin_exe.native(), dll.native());
System::exit_code_and_output ec_data = System::cmd_execute_and_capture_output(cmd_line);
Checks::check_exit(ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
if (ec_data.output.find("App Container") == std::string::npos)
{
@ -318,7 +318,7 @@ namespace vcpkg::PostBuildLint
for (const fs::path& file : files)
{
Checks::check_exit(file.extension() == ".dll", "The file extension was not .dll: %s", file.generic_string());
Checks::check_exit(VCPKG_LINE_INFO, file.extension() == ".dll", "The file extension was not .dll: %s", file.generic_string());
COFFFileReader::dll_info info = COFFFileReader::read_dll(file);
const std::string actual_architecture = get_actual_architecture(info.machine_type);
@ -343,9 +343,9 @@ namespace vcpkg::PostBuildLint
for (const fs::path& file : files)
{
Checks::check_exit(file.extension() == ".lib", "The file extension was not .lib: %s", file.generic_string());
Checks::check_exit(VCPKG_LINE_INFO, file.extension() == ".lib", "The file extension was not .lib: %s", file.generic_string());
COFFFileReader::lib_info info = COFFFileReader::read_lib(file);
Checks::check_exit(info.machine_types.size() == 1, "Found more than 1 architecture in file %s", file.generic_string());
Checks::check_exit(VCPKG_LINE_INFO, info.machine_types.size() == 1, "Found more than 1 architecture in file %s", file.generic_string());
const std::string actual_architecture = get_actual_architecture(info.machine_types.at(0));
if (expected_architecture != actual_architecture)
@ -496,7 +496,7 @@ namespace vcpkg::PostBuildLint
{
const std::wstring cmd_line = Strings::wformat(LR"("%s" /directives "%s")", dumpbin_exe.native(), lib.native());
System::exit_code_and_output ec_data = System::cmd_execute_and_capture_output(cmd_line);
Checks::check_exit(ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
for (const BuildType::type& bad_build_type : bad_build_types)
{
@ -543,7 +543,7 @@ namespace vcpkg::PostBuildLint
{
const std::wstring cmd_line = Strings::wformat(LR"("%s" /dependents "%s")", dumpbin_exe.native(), dll.native());
System::exit_code_and_output ec_data = System::cmd_execute_and_capture_output(cmd_line);
Checks::check_exit(ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
for (const OutdatedDynamicCrt& outdated_crt : outdated_crts)
{
@ -630,7 +630,7 @@ namespace vcpkg::PostBuildLint
error_count += check_for_files_in_include_directory(package_dir);
error_count += check_for_files_in_debug_include_directory(package_dir);
error_count += check_for_files_in_debug_share_directory(package_dir);
error_count += check_folder_lib_cmake(package_dir);
error_count += check_folder_lib_cmake(package_dir, spec);
error_count += check_for_misplaced_cmake_files(package_dir, spec);
error_count += check_folder_debug_lib_cmake(package_dir);
error_count += check_for_dlls_in_lib_dirs(package_dir);
@ -693,7 +693,7 @@ namespace vcpkg::PostBuildLint
}
case LinkageType::backing_enum_t::NULLVALUE:
default:
Checks::unreachable();
Checks::unreachable(VCPKG_LINE_INFO);
}
error_count += check_no_empty_folders(package_dir);

View File

@ -19,17 +19,17 @@ namespace vcpkg::PostBuildLint
BuildInfo build_info;
const std::string crt_linkage_as_string = details::remove_required_field(&pgh, BuildInfoRequiredField::CRT_LINKAGE);
build_info.crt_linkage = LinkageType::value_of(crt_linkage_as_string);
Checks::check_exit(build_info.crt_linkage != LinkageType::NULLVALUE, "Invalid crt linkage type: [%s]", crt_linkage_as_string);
Checks::check_exit(VCPKG_LINE_INFO, build_info.crt_linkage != LinkageType::NULLVALUE, "Invalid crt linkage type: [%s]", crt_linkage_as_string);
const std::string library_linkage_as_string = details::remove_required_field(&pgh, BuildInfoRequiredField::LIBRARY_LINKAGE);
build_info.library_linkage = LinkageType::value_of(library_linkage_as_string);
Checks::check_exit(build_info.library_linkage != LinkageType::NULLVALUE, "Invalid library linkage type: [%s]", library_linkage_as_string);
Checks::check_exit(VCPKG_LINE_INFO, build_info.library_linkage != LinkageType::NULLVALUE, "Invalid library linkage type: [%s]", library_linkage_as_string);
// The remaining entries are policies
for (const std::unordered_map<std::string, std::string>::value_type& p : pgh)
{
const BuildPolicies::type policy = BuildPolicies::parse(p.first);
Checks::check_exit(policy != BuildPolicies::NULLVALUE, "Unknown policy found: %s", p.first);
Checks::check_exit(VCPKG_LINE_INFO, policy != BuildPolicies::NULLVALUE, "Unknown policy found: %s", p.first);
const opt_bool_t status = opt_bool::parse(p.second);
build_info.policies.emplace(policy, status);
}
@ -40,7 +40,7 @@ namespace vcpkg::PostBuildLint
BuildInfo read_build_info(const fs::path& filepath)
{
const std::vector<std::unordered_map<std::string, std::string>> pghs = Paragraphs::get_paragraphs(filepath);
Checks::check_exit(pghs.size() == 1, "Invalid BUILD_INFO file for package");
Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid BUILD_INFO file for package");
return BuildInfo::create(pghs[0]);
}

View File

@ -1,6 +1,7 @@
#include "pch.h"
#include "PostBuildLint_BuildPolicies.h"
#include "vcpkg_Enums.h"
#include "vcpkg_Checks.h"
namespace vcpkg::PostBuildLint::BuildPolicies
{
@ -23,7 +24,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
case NULLVALUE:
return NULLVALUE_STRING;
default:
Enums::unreachable(ENUM_NAME);
Checks::unreachable(VCPKG_LINE_INFO);
}
}
@ -42,9 +43,9 @@ namespace vcpkg::PostBuildLint::BuildPolicies
case ONLY_RELEASE_CRT:
return CMAKE_VARIABLE_ONLY_RELEASE_CRT;
case NULLVALUE:
Enums::nullvalue_used(ENUM_NAME);
Enums::nullvalue_used(VCPKG_LINE_INFO, ENUM_NAME);
default:
Enums::unreachable(ENUM_NAME);
Checks::unreachable(VCPKG_LINE_INFO);
}
}

View File

@ -1,6 +1,6 @@
#include "pch.h"
#include "PostBuildLint_BuildType.h"
#include "vcpkg_Enums.h"
#include "vcpkg_Checks.h"
namespace vcpkg::PostBuildLint::BuildType
{
@ -26,7 +26,7 @@ namespace vcpkg::PostBuildLint::BuildType
return RELEASE_DYNAMIC;
}
Enums::unreachable(ENUM_NAME);
Checks::unreachable(VCPKG_LINE_INFO);
}
const ConfigurationType::type& type::config() const
@ -57,7 +57,7 @@ namespace vcpkg::PostBuildLint::BuildType
case BuildType::RELEASE_DYNAMIC:
return REGEX_RELEASE_DYNAMIC;
default:
Enums::unreachable(ENUM_NAME);
Checks::unreachable(VCPKG_LINE_INFO);
}
}
@ -79,7 +79,7 @@ namespace vcpkg::PostBuildLint::BuildType
case BuildType::RELEASE_DYNAMIC:
return NAME_RELEASE_DYNAMIC;
default:
Enums::unreachable(ENUM_NAME);
Checks::unreachable(VCPKG_LINE_INFO);
}
}
}

View File

@ -1,6 +1,7 @@
#include "pch.h"
#include "PostBuildLint_ConfigurationType.h"
#include "vcpkg_Enums.h"
#include "package_spec.h"
namespace vcpkg::PostBuildLint::ConfigurationType
{
@ -20,7 +21,7 @@ namespace vcpkg::PostBuildLint::ConfigurationType
case ConfigurationType::NULLVALUE:
return NULLVALUE_STRING;
default:
Enums::unreachable(ENUM_NAME);
Checks::unreachable(VCPKG_LINE_INFO);
}
}
}

View File

@ -1,6 +1,7 @@
#include "pch.h"
#include "PostBuildLint_LinkageType.h"
#include "vcpkg_Enums.h"
#include "vcpkg_Checks.h"
namespace vcpkg::PostBuildLint::LinkageType
{
@ -20,7 +21,7 @@ namespace vcpkg::PostBuildLint::LinkageType
case LinkageType::NULLVALUE:
return NULLVALUE_STRING;
default:
Enums::unreachable(ENUM_NAME);
Checks::unreachable(VCPKG_LINE_INFO);
}
}

View File

@ -42,7 +42,7 @@ namespace vcpkg
StatusParagraphs::iterator StatusParagraphs::insert(std::unique_ptr<StatusParagraph> pgh)
{
Checks::check_exit(pgh != nullptr, "Inserted null paragraph");
Checks::check_exit(VCPKG_LINE_INFO, pgh != nullptr, "Inserted null paragraph");
const package_spec& spec = pgh->package.spec;
auto ptr = find(spec.name(), spec.target_triplet());
if (ptr == end())

View File

@ -30,9 +30,9 @@ namespace vcpkg::COFFFileReader
return data;
}
static void verify_equal_strings(const char* expected, const char* actual, int size, const char* label)
static void verify_equal_strings(const LineInfo& line_info, const char* expected, const char* actual, int size, const char* label)
{
Checks::check_exit(memcmp(expected, actual, size) == 0, "Incorrect string (%s) found. Expected: (%s) but found (%s)", label, expected, actual);
Checks::check_exit(line_info, memcmp(expected, actual, size) == 0, "Incorrect string (%s) found. Expected: (%s) but found (%s)", label, expected, actual);
}
static void read_and_verify_PE_signature(fstream& fs)
@ -48,7 +48,7 @@ namespace vcpkg::COFFFileReader
fs.seekg(offset_to_PE_signature);
char signature[PE_SIGNATURE_SIZE];
fs.read(signature, PE_SIGNATURE_SIZE);
verify_equal_strings(PE_SIGNATURE, signature, PE_SIGNATURE_SIZE, "PE_SIGNATURE");
verify_equal_strings(VCPKG_LINE_INFO, PE_SIGNATURE, signature, PE_SIGNATURE_SIZE, "PE_SIGNATURE");
fs.seekg(offset_to_PE_signature + PE_SIGNATURE_SIZE, ios_base::beg);
}
@ -104,7 +104,7 @@ namespace vcpkg::COFFFileReader
if (ret.data[0] != '\0') // Due to freeglut. github issue #223
{
const std::string header_end = ret.data.substr(HEADER_END_OFFSET, HEADER_END_SIZE);
verify_equal_strings(HEADER_END, header_end.c_str(), HEADER_END_SIZE, "LIB HEADER_END");
verify_equal_strings(VCPKG_LINE_INFO, HEADER_END, header_end.c_str(), HEADER_END_SIZE, "LIB HEADER_END");
}
return ret;
@ -186,11 +186,11 @@ namespace vcpkg::COFFFileReader
const std::string sig1_as_string = ret.data.substr(SIG1_OFFSET, SIG1_SIZE);
const uint16_t sig1 = reinterpret_bytes<uint16_t>(sig1_as_string.c_str());
Checks::check_exit(sig1 == SIG1, "Sig1 was incorrect. Expected %s but got %s", SIG1, sig1);
Checks::check_exit(VCPKG_LINE_INFO, sig1 == SIG1, "Sig1 was incorrect. Expected %s but got %s", SIG1, sig1);
const std::string sig2_as_string = ret.data.substr(SIG2_OFFSET, SIG2_SIZE);
const uint16_t sig2 = reinterpret_bytes<uint16_t>(sig2_as_string.c_str());
Checks::check_exit(sig2 == SIG2, "Sig2 was incorrect. Expected %s but got %s", SIG2, sig2);
Checks::check_exit(VCPKG_LINE_INFO, sig2 == SIG2, "Sig2 was incorrect. Expected %s but got %s", SIG2, sig2);
return ret;
}
@ -218,13 +218,13 @@ namespace vcpkg::COFFFileReader
char file_start[FILE_START_SIZE];
fs.read(file_start, FILE_START_SIZE);
verify_equal_strings(FILE_START, file_start, FILE_START_SIZE, "LIB FILE_START");
verify_equal_strings(VCPKG_LINE_INFO, FILE_START, file_start, FILE_START_SIZE, "LIB FILE_START");
}
dll_info read_dll(const fs::path& path)
{
std::fstream fs(path, std::ios::in | std::ios::binary | std::ios::ate);
Checks::check_exit(fs.is_open(), "Could not open file %s for reading", path.generic_string());
Checks::check_exit(VCPKG_LINE_INFO, fs.is_open(), "Could not open file %s for reading", path.generic_string());
read_and_verify_PE_signature(fs);
coff_file_header header = coff_file_header::read(fs);
@ -261,7 +261,7 @@ namespace vcpkg::COFFFileReader
lib_info read_lib(const fs::path& path)
{
std::fstream fs(path, std::ios::in | std::ios::binary | std::ios::ate);
Checks::check_exit(fs.is_open(), "Could not open file %s for reading", path.generic_string());
Checks::check_exit(VCPKG_LINE_INFO, fs.is_open(), "Could not open file %s for reading", path.generic_string());
read_and_verify_archive_file_signature(fs);
@ -270,12 +270,12 @@ namespace vcpkg::COFFFileReader
// First Linker Member
const archive_member_header first_linker_member_header = archive_member_header::read(fs);
Checks::check_exit(first_linker_member_header.name().substr(0, 2) == "/ ", "Could not find proper first linker member");
Checks::check_exit(VCPKG_LINE_INFO, first_linker_member_header.name().substr(0, 2) == "/ ", "Could not find proper first linker member");
marker.advance_by(archive_member_header::HEADER_SIZE + first_linker_member_header.member_size());
marker.seek_to_marker(fs);
const archive_member_header second_linker_member_header = archive_member_header::read(fs);
Checks::check_exit(second_linker_member_header.name().substr(0, 2) == "/ ", "Could not find proper second linker member");
Checks::check_exit(VCPKG_LINE_INFO, second_linker_member_header.name().substr(0, 2) == "/ ", "Could not find proper second linker member");
// The first 4 bytes contains the number of archive members
const uint32_t archive_member_count = read_value_from_stream<uint32_t>(fs);
const offsets_array offsets = offsets_array::read(fs, archive_member_count);

View File

@ -28,12 +28,12 @@ namespace vcpkg::Commands::Build
BuildResult build_package(const SourceParagraph& source_paragraph, const package_spec& spec, const vcpkg_paths& paths, const fs::path& port_dir, const StatusParagraphs& status_db)
{
Checks::check_exit(spec.name() == source_paragraph.name, "inconsistent arguments to build_package()");
Checks::check_exit(VCPKG_LINE_INFO, spec.name() == source_paragraph.name, "inconsistent arguments to build_package()");
const triplet& target_triplet = spec.target_triplet();
for (auto&& dep : source_paragraph.depends)
for (auto&& dep : filter_dependencies(source_paragraph.depends, target_triplet))
{
if (status_db.find_installed(dep.name, target_triplet) == status_db.end())
if (status_db.find_installed(dep, target_triplet) == status_db.end())
{
return BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES;
}
@ -101,7 +101,7 @@ namespace vcpkg::Commands::Build
case BuildResult::BUILD_FAILED: return BUILD_FAILED_STRING;
case BuildResult::POST_BUILD_CHECKS_FAILED: return POST_BUILD_CHECKS_FAILED_STRING;
case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: return CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING;
default: Checks::unreachable();
default: Checks::unreachable(VCPKG_LINE_INFO);
}
}
@ -134,7 +134,7 @@ namespace vcpkg::Commands::Build
}
const expected<SourceParagraph> maybe_spgh = Paragraphs::try_load_port(port_dir);
Checks::check_exit(!maybe_spgh.error_code(), "Could not find package named %s: %s", spec, maybe_spgh.error_code().message());
Checks::check_exit(VCPKG_LINE_INFO, !maybe_spgh.error_code(), "Could not find package named %s: %s", spec, maybe_spgh.error_code().message());
const SourceParagraph& spgh = *maybe_spgh.get();
StatusParagraphs status_db = database_load_check(paths);
@ -149,7 +149,7 @@ namespace vcpkg::Commands::Build
}),
unmet_dependencies.end());
Checks::check_exit(!unmet_dependencies.empty());
Checks::check_exit(VCPKG_LINE_INFO, !unmet_dependencies.empty());
System::println(System::color::error, "The build command requires all dependencies to be already installed.");
System::println("The following dependencies are missing:");
System::println("");

View File

@ -20,7 +20,7 @@ namespace vcpkg::Commands::CI
std::vector<package_spec> specs;
for (const SourceParagraph& p : ports)
{
specs.push_back(package_spec::from_name_and_triplet(p.name, target_triplet).get_or_throw());
specs.push_back(package_spec::from_name_and_triplet(p.name, target_triplet).get_or_throw(VCPKG_LINE_INFO));
}
return specs;
@ -37,7 +37,7 @@ namespace vcpkg::Commands::CI
StatusParagraphs status_db = database_load_check(paths);
const std::vector<package_spec_with_install_plan> install_plan = Dependencies::create_install_plan(paths, specs, status_db);
Checks::check_exit(!install_plan.empty(), "Install plan cannot be empty");
Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty");
std::vector<BuildResult> results;
std::vector<std::chrono::milliseconds::rep> timing;
@ -70,7 +70,7 @@ namespace vcpkg::Commands::CI
System::println(System::color::error, Build::create_error_message(result, action.spec));
continue;
}
const BinaryParagraph bpgh = Paragraphs::try_load_cached_package(paths, action.spec).get_or_throw();
const BinaryParagraph bpgh = Paragraphs::try_load_cached_package(paths, action.spec).get_or_throw(VCPKG_LINE_INFO);
Install::install_package(paths, bpgh, &status_db);
System::println(System::color::success, "Package %s is installed", action.spec);
}
@ -81,7 +81,7 @@ namespace vcpkg::Commands::CI
System::println(System::color::success, "Package %s is installed from cache", action.spec);
}
else
Checks::unreachable();
Checks::unreachable(VCPKG_LINE_INFO);
}
catch (const std::exception& e)
{

View File

@ -29,9 +29,9 @@ namespace vcpkg::Commands::Create
if (args.command_arguments.size() >= 3)
{
const std::string& zip_file_name = args.command_arguments.at(2);
Checks::check_exit(!Files::has_invalid_chars_for_filesystem(zip_file_name),
R"(Filename cannot contain invalid chars %s, but was %s)",
Files::FILESYSTEM_INVALID_CHARACTERS, zip_file_name);
Checks::check_exit(VCPKG_LINE_INFO, !Files::has_invalid_chars_for_filesystem(zip_file_name),
R"(Filename cannot contain invalid chars %s, but was %s)",
Files::FILESYSTEM_INVALID_CHARACTERS, zip_file_name);
cmake_args.push_back({ L"FILENAME", zip_file_name });
}

View File

@ -14,7 +14,7 @@ namespace vcpkg::Commands::Edit
const std::string port_name = args.command_arguments.at(0);
const fs::path portpath = paths.ports / port_name;
Checks::check_exit(fs::is_directory(portpath), R"(Could not find port named "%s")", port_name);
Checks::check_exit(VCPKG_LINE_INFO, fs::is_directory(portpath), R"(Could not find port named "%s")", port_name);
// Find the user's selected editor
std::wstring env_EDITOR;
@ -56,13 +56,19 @@ namespace vcpkg::Commands::Edit
env_EDITOR = p.native();
break;
}
auto p_insiders = fs::path(*code_installpath) / "Code - Insiders.exe";
if (fs::exists(p_insiders))
{
env_EDITOR = p_insiders.native();
break;
}
}
}
}
if (env_EDITOR.empty())
{
Checks::exit_with_message("Visual Studio Code was not found and the environment variable EDITOR is not set");
Checks::exit_with_message(VCPKG_LINE_INFO, "Visual Studio Code was not found and the environment variable EDITOR is not set");
}
std::wstring cmdLine = Strings::wformat(LR"("%s" "%s" "%s" -n)", env_EDITOR, portpath.native(), (portpath / "portfile.cmake").native());

View File

@ -9,15 +9,15 @@ namespace vcpkg::Commands::Hash
auto cmd_line = Strings::wformat(LR"(CertUtil.exe -hashfile "%s" %s)",
path.c_str(), hashType.c_str());
auto ec_data = System::cmd_execute_and_capture_output(cmd_line);
Checks::check_exit(ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
std::string const& output = ec_data.output;
auto start = output.find_first_of("\r\n");
Checks::check_exit(start != std::string::npos, "Unexpected output format from command: %s", Strings::utf16_to_utf8(cmd_line));
Checks::check_exit(VCPKG_LINE_INFO, start != std::string::npos, "Unexpected output format from command: %s", Strings::utf16_to_utf8(cmd_line));
auto end = output.find_first_of("\r\n", start + 1);
Checks::check_exit(end != std::string::npos, "Unexpected output format from command: %s", Strings::utf16_to_utf8(cmd_line));
Checks::check_exit(VCPKG_LINE_INFO, end != std::string::npos, "Unexpected output format from command: %s", Strings::utf16_to_utf8(cmd_line));
auto hash = output.substr(start, end - start);
hash.erase(std::remove_if(hash.begin(), hash.end(), isspace), hash.end());

View File

@ -14,7 +14,7 @@ namespace vcpkg::Commands::Import
static Binaries find_binaries_in_dir(const fs::path& path)
{
Files::check_is_directory(path);
Files::check_is_directory(VCPKG_LINE_INFO, path);
Binaries binaries;
binaries.dlls = Files::recursive_find_files_with_extension_in_dir(path, ".dll");
@ -35,9 +35,9 @@ namespace vcpkg::Commands::Import
static void place_library_files_in(const fs::path& include_directory, const fs::path& project_directory, const fs::path& destination_path)
{
Files::check_is_directory(include_directory);
Files::check_is_directory(project_directory);
Files::check_is_directory(destination_path);
Files::check_is_directory(VCPKG_LINE_INFO, include_directory);
Files::check_is_directory(VCPKG_LINE_INFO, project_directory);
Files::check_is_directory(VCPKG_LINE_INFO, destination_path);
Binaries debug_binaries = find_binaries_in_dir(project_directory / "Debug");
Binaries release_binaries = find_binaries_in_dir(project_directory / "Release");
@ -73,7 +73,7 @@ namespace vcpkg::Commands::Import
const fs::path project_directory(args.command_arguments[2]);
auto pghs = Paragraphs::get_paragraphs(control_file_path);
Checks::check_exit(pghs.size() == 1, "Invalid control file %s for package", control_file_path.generic_string());
Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid control file %s for package", control_file_path.generic_string());
StatusParagraph spgh;
spgh.package = BinaryParagraph(pghs[0]);

View File

@ -170,7 +170,7 @@ namespace vcpkg::Commands::Install
{
if (status_db->find_installed(dep, spgh.package.spec.target_triplet()) == status_db->end())
{
Checks::unreachable();
Checks::unreachable(VCPKG_LINE_INFO);
}
}
write_update(paths, spgh);
@ -193,7 +193,7 @@ namespace vcpkg::Commands::Install
StatusParagraphs status_db = database_load_check(paths);
std::vector<package_spec_with_install_plan> install_plan = Dependencies::create_install_plan(paths, specs, status_db);
Checks::check_exit(!install_plan.empty(), "Install plan cannot be empty");
Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty");
std::string specs_string = install_plan[0].spec.toString();
for (size_t i = 1; i < install_plan.size(); ++i)
@ -223,7 +223,7 @@ namespace vcpkg::Commands::Install
System::println(Build::create_user_troubleshooting_message(action.spec));
exit(EXIT_FAILURE);
}
const BinaryParagraph bpgh = Paragraphs::try_load_cached_package(paths, action.spec).get_or_throw();
const BinaryParagraph bpgh = Paragraphs::try_load_cached_package(paths, action.spec).get_or_throw(VCPKG_LINE_INFO);
install_package(paths, bpgh, &status_db);
System::println(System::color::success, "Package %s is installed", action.spec);
}
@ -233,7 +233,7 @@ namespace vcpkg::Commands::Install
System::println(System::color::success, "Package %s is installed", action.spec);
}
else
Checks::unreachable();
Checks::unreachable(VCPKG_LINE_INFO);
}
catch (const std::exception& e)
{

View File

@ -156,7 +156,7 @@ namespace vcpkg::Commands::Integrate
System::println(System::color::warning, "Warning: Previous integration file was not removed");
exit(EXIT_FAILURE);
default:
Checks::unreachable();
Checks::unreachable(VCPKG_LINE_INFO);
}
}
}
@ -195,10 +195,10 @@ namespace vcpkg::Commands::Integrate
System::println(System::color::warning, "Warning: integration was not applied");
exit(EXIT_FAILURE);
default:
Checks::unreachable();
Checks::unreachable(VCPKG_LINE_INFO);
}
Checks::check_exit(fs::exists(system_wide_targets_file), "Error: failed to copy targets file to %s", system_wide_targets_file.string());
Checks::check_exit(VCPKG_LINE_INFO, fs::exists(system_wide_targets_file), "Error: failed to copy targets file to %s", system_wide_targets_file.string());
}
const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets";
@ -272,7 +272,7 @@ namespace vcpkg::Commands::Integrate
const int exit_code = System::cmd_execute_clean(cmd_line);
const fs::path nuget_package = buildsystems_dir / Strings::format("%s.%s.nupkg", nuget_id, nupkg_version);
Checks::check_exit(exit_code == 0 && fs::exists(nuget_package), "Error: NuGet package creation failed");
Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0 && fs::exists(nuget_package), "Error: NuGet package creation failed");
System::println(System::color::success, "Created nupkg: %s", nuget_package.string());
System::println(R"(

View File

@ -57,9 +57,9 @@ namespace vcpkg::Commands::PortsDiff
{
static const std::string VALID_COMMIT_OUTPUT = "commit\n";
const std::wstring cmd = Strings::wformat(LR"("%s" cat-file -t %s 2>NUL)", git_exe.native(), git_commit_id);
const std::wstring cmd = Strings::wformat(LR"("%s" cat-file -t %s)", git_exe.native(), git_commit_id);
const System::exit_code_and_output output = System::cmd_execute_and_capture_output(cmd);
Checks::check_exit(output.output == VALID_COMMIT_OUTPUT, "Invalid commit id %s", Strings::utf16_to_utf8(git_commit_id));
Checks::check_exit(VCPKG_LINE_INFO, output.output == VALID_COMMIT_OUTPUT, "Invalid commit id %s", Strings::utf16_to_utf8(git_commit_id));
}
void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)

View File

@ -129,7 +129,7 @@ namespace vcpkg::Commands::Remove
continue;
}
Checks::unreachable();
Checks::unreachable(VCPKG_LINE_INFO);
}
if (!not_installed.empty())
@ -158,7 +158,7 @@ namespace vcpkg::Commands::Remove
return " " + p->spec.toString();
}
Checks::unreachable();
Checks::unreachable(VCPKG_LINE_INFO);
}));
}
}
@ -175,7 +175,7 @@ namespace vcpkg::Commands::Remove
auto status_db = database_load_check(paths);
const std::vector<package_spec_with_remove_plan> remove_plan = Dependencies::create_remove_plan(specs, status_db);
Checks::check_exit(!remove_plan.empty(), "Remove plan cannot be empty");
Checks::check_exit(VCPKG_LINE_INFO, !remove_plan.empty(), "Remove plan cannot be empty");
print_plan(remove_plan);
@ -208,7 +208,7 @@ namespace vcpkg::Commands::Remove
break;
case remove_plan_type::UNKNOWN:
default:
Checks::unreachable();
Checks::unreachable(VCPKG_LINE_INFO);
}
if (alsoRemoveFolderFromPackages)

View File

@ -88,7 +88,7 @@ namespace vcpkg::Commands::Search
}
}
System::println("\nIf your library is not listed, please open an issue at:\n"
System::println("\nIf your library is not listed, please open an issue at and/or consider making a pull request:\n"
" https://github.com/Microsoft/vcpkg/issues");
exit(EXIT_SUCCESS);

View File

@ -24,6 +24,6 @@ namespace vcpkg::opt_bool
return opt_bool_t::DISABLED;
}
Checks::exit_with_message("Could not convert string [%s] to opt_bool", s);
Checks::exit_with_message(VCPKG_LINE_INFO, "Could not convert string [%s] to opt_bool", s);
}
}

View File

@ -20,7 +20,7 @@ namespace vcpkg
case package_spec_parse_result::INVALID_CHARACTERS:
return "Contains invalid characters. Only alphanumeric lowercase ASCII characters and dashes are allowed";
default:
Checks::unreachable();
Checks::unreachable(VCPKG_LINE_INFO);
}
}

View File

@ -40,7 +40,7 @@ namespace vcpkg
{
const std::string s(Strings::ascii_to_lowercase(triplet_as_string));
auto it = std::find(s.cbegin(), s.cend(), '-');
Checks::check_exit(it != s.cend(), "Invalid triplet: %s", triplet_as_string);
Checks::check_exit(VCPKG_LINE_INFO, it != s.cend(), "Invalid triplet: %s", triplet_as_string);
triplet t;
t.m_canonical_name = s;

View File

@ -1,7 +1,6 @@
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <iostream>
#include <fstream>
#include <memory>
#include <cassert>
@ -14,11 +13,10 @@
#include "Paragraphs.h"
#include "vcpkg_Strings.h"
#include "vcpkg_Chrono.h"
#include "vcpkglib.h"
using namespace vcpkg;
bool g_debugging = false;
void invalid_command(const std::string& cmd)
{
System::println(System::color::error, "invalid command: %s", cmd);
@ -58,13 +56,13 @@ static void inner(const vcpkg_cmd_arguments& args)
}
}
Checks::check_exit(!vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root.");
Checks::check_exit(VCPKG_LINE_INFO, !vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root.");
const expected<vcpkg_paths> expected_paths = vcpkg_paths::create(vcpkg_root_dir);
Checks::check_exit(!expected_paths.error_code(), "Error: Invalid vcpkg root directory %s: %s", vcpkg_root_dir.string(), expected_paths.error_code().message());
const vcpkg_paths paths = expected_paths.get_or_throw();
Checks::check_exit(VCPKG_LINE_INFO, !expected_paths.error_code(), "Error: Invalid vcpkg root directory %s: %s", vcpkg_root_dir.string(), expected_paths.error_code().message());
const vcpkg_paths paths = expected_paths.get_or_throw(VCPKG_LINE_INFO);
int exit_code = _wchdir(paths.root.c_str());
Checks::check_exit(exit_code == 0, "Changing the working dir failed");
Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed");
if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b()))
{
@ -113,7 +111,7 @@ static void loadConfig()
try
{
std::string config_contents = Files::read_contents(localappdata / "vcpkg" / "config").get_or_throw();
std::string config_contents = Files::read_contents(localappdata / "vcpkg" / "config").get_or_throw(VCPKG_LINE_INFO);
std::unordered_map<std::string, std::string> keys;
auto pghs = Paragraphs::parse_paragraphs(config_contents);
@ -128,7 +126,7 @@ static void loadConfig()
auto user_id = keys["User-Id"];
auto user_time = keys["User-Since"];
Checks::check_throw(!user_id.empty() && !user_time.empty(), ""); // Use as goto to the catch statement
Checks::check_throw(VCPKG_LINE_INFO, !user_id.empty() && !user_time.empty(), ""); // Use as goto to the catch statement
SetUserInformation(user_id, user_time);
return;
@ -156,7 +154,7 @@ static void loadConfig()
static std::string trim_path_from_command_line(const std::string& full_command_line)
{
Checks::check_exit(full_command_line.size() > 0, "Internal failure - cannot have empty command line");
Checks::check_exit(VCPKG_LINE_INFO, full_command_line.size() > 0, "Internal failure - cannot have empty command line");
if (full_command_line[0] == '"')
{

View File

@ -1,12 +1,22 @@
#include "pch.h"
#include "vcpkg_Checks.h"
#include "vcpkg_System.h"
#include "vcpkglib.h"
namespace vcpkg::Checks
{
__declspec(noreturn) void unreachable()
static void print_line_info_if_debug(const LineInfo& line_info)
{
if (g_debugging)
{
System::println(System::color::error, line_info.toString());
}
}
__declspec(noreturn) void unreachable(const LineInfo& line_info)
{
System::println(System::color::error, "Error: Unreachable code was reached");
System::println(System::color::error, line_info.toString()); // Always print line_info here
#ifndef NDEBUG
std::abort();
#else
@ -14,38 +24,40 @@ namespace vcpkg::Checks
#endif
}
__declspec(noreturn) void exit_with_message(const char* errorMessage)
__declspec(noreturn) void exit_with_message(const LineInfo& line_info, const char* errorMessage)
{
System::println(System::color::error, errorMessage);
print_line_info_if_debug(line_info);
exit(EXIT_FAILURE);
}
__declspec(noreturn) void throw_with_message(const char* errorMessage)
__declspec(noreturn) void throw_with_message(const LineInfo& line_info, const char* errorMessage)
{
print_line_info_if_debug(line_info);
throw std::runtime_error(errorMessage);
}
void check_throw(bool expression, const char* errorMessage)
void check_throw(const LineInfo& line_info, bool expression, const char* errorMessage)
{
if (!expression)
{
throw_with_message(errorMessage);
throw_with_message(line_info, errorMessage);
}
}
void check_exit(bool expression)
void check_exit(const LineInfo& line_info, bool expression)
{
if (!expression)
{
exit(EXIT_FAILURE);
exit_with_message(line_info, "");
}
}
void check_exit(bool expression, const char* errorMessage)
void check_exit(const LineInfo& line_info, bool expression, const char* errorMessage)
{
if (!expression)
{
exit_with_message(errorMessage);
exit_with_message(line_info, errorMessage);
}
}
}

View File

@ -56,7 +56,7 @@ namespace vcpkg::Dependencies
{
for (const std::string& dep_as_string : dependencies_as_string)
{
const package_spec current_dep = package_spec::from_name_and_triplet(dep_as_string, spec.target_triplet()).get_or_throw();
const package_spec current_dep = package_spec::from_name_and_triplet(dep_as_string, spec.target_triplet()).get_or_throw(VCPKG_LINE_INFO);
graph.add_edge(spec, current_dep);
if (was_examined.find(current_dep) == was_examined.end())
{
@ -82,7 +82,7 @@ namespace vcpkg::Dependencies
expected<SourceParagraph> maybe_spgh = Paragraphs::try_load_port(paths.port_dir(spec));
SourceParagraph* spgh = maybe_spgh.get();
Checks::check_exit(spgh != nullptr, "Cannot find package %s", spec.name());
Checks::check_exit(VCPKG_LINE_INFO, spgh != nullptr, "Cannot find package %s", spec.name());
process_dependencies(filter_dependencies(spgh->depends, spec.target_triplet()));
was_examined.emplace(spec, install_plan_action{install_plan_type::BUILD_AND_INSTALL, nullptr, std::make_unique<SourceParagraph>(std::move(*spgh))});
}

View File

@ -9,13 +9,8 @@ namespace vcpkg::Enums
return Strings::format("%s_NULLVALUE", enum_name);
}
void nullvalue_used(const std::string& enum_name)
__declspec(noreturn) void nullvalue_used(const LineInfo& line_info, const std::string& enum_name)
{
Checks::exit_with_message("NULLVALUE of enum %s was used", enum_name);
}
void unreachable(const std::string& enum_name)
{
Checks::exit_with_message("Unreachable code for enum, %s", enum_name);
Checks::exit_with_message(VCPKG_LINE_INFO, "NULLVALUE of enum %s was used", enum_name);
}
}

View File

@ -12,7 +12,7 @@ namespace vcpkg::Environment
const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1";
const std::wstring cmd = System::create_powershell_script_cmd(script);
System::exit_code_and_output ec_data = System::cmd_execute_and_capture_output(cmd);
Checks::check_exit(ec_data.exit_code == 0, "Could not run script to detect VS 2017 instances");
Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect VS 2017 instances");
return Strings::split(ec_data.output, "\n");
}
@ -141,7 +141,7 @@ namespace vcpkg::Environment
static fs::path find_ProgramFiles()
{
const optional<std::wstring> program_files = System::get_environmental_variable(L"PROGRAMFILES");
Checks::check_exit(program_files.get() != nullptr, "Could not detect the PROGRAMFILES environmental variable");
Checks::check_exit(VCPKG_LINE_INFO, program_files.get() != nullptr, "Could not detect the PROGRAMFILES environmental variable");
return *program_files;
}

View File

@ -6,9 +6,9 @@ namespace vcpkg::Files
{
static const std::regex FILESYSTEM_INVALID_CHARACTERS_REGEX = std::regex(R"([\/:*?"<>|])");
void check_is_directory(const fs::path& dirpath)
void check_is_directory(const LineInfo& line_info, const fs::path& dirpath)
{
Checks::check_exit(fs::is_directory(dirpath), "The path %s is not a directory", dirpath.string());
Checks::check_exit(VCPKG_LINE_INFO, fs::is_directory(dirpath), "The path %s is not a directory", dirpath.string());
}
bool has_invalid_chars_for_filesystem(const std::string& s)

View File

@ -103,7 +103,7 @@ namespace vcpkg::System
// Flush stdout before launching external process
fflush(stdout);
const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line);
const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s 2>&1")###", cmd_line);
std::string output;
char buf[1024];
@ -132,7 +132,7 @@ namespace vcpkg::System
std::wstring create_powershell_script_cmd(const fs::path& script_path, const std::wstring& args)
{
// TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned
return Strings::wformat(LR"(powershell -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args);
return Strings::wformat(LR"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args);
}
void print(const char* message)
@ -172,9 +172,9 @@ namespace vcpkg::System
return nullptr;
auto ret = std::make_unique<std::wstring>(sz, L'\0');
Checks::check_exit(MAXDWORD >= ret->size());
Checks::check_exit(VCPKG_LINE_INFO, MAXDWORD >= ret->size());
auto sz2 = GetEnvironmentVariableW(varname, ret->data(), static_cast<DWORD>(ret->size()));
Checks::check_exit(sz2 + 1 == sz);
Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz);
ret->pop_back();
return ret;
}

Some files were not shown because too many files have changed in this diff Show More