mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
Merge pull request #941 from codicodi/fix-vorbis
[libvorbis] enable static builds & fix symbol duplication
This commit is contained in:
commit
e1f5fe728d
@ -1,25 +0,0 @@
|
|||||||
From 0046f290a31b603a4caa9b728b54447b95ee5aa1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: vlj <vljn.ovi@gmail.com>
|
|
||||||
Date: Mon, 24 Oct 2016 23:59:55 +0200
|
|
||||||
Subject: [PATCH] Add vorbisenc.c to vorbis library.
|
|
||||||
|
|
||||||
---
|
|
||||||
lib/CMakeLists.txt | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
|
||||||
index a682ed4..2043294 100644
|
|
||||||
--- a/lib/CMakeLists.txt
|
|
||||||
+++ b/lib/CMakeLists.txt
|
|
||||||
@@ -68,7 +68,7 @@ include_directories(.)
|
|
||||||
include_directories(${OGG_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
if (NOT BUILD_FRAMEWORK)
|
|
||||||
- add_library(vorbis ${VORBIS_HEADERS} ${VORBIS_SOURCES})
|
|
||||||
+ add_library(vorbis ${VORBIS_HEADERS} ${VORBIS_SOURCES} ${VORBISENC_SOURCES})
|
|
||||||
add_library(vorbisenc ${VORBISENC_SOURCES})
|
|
||||||
add_library(vorbisfile ${VORBISFILE_SOURCES})
|
|
||||||
|
|
||||||
--
|
|
||||||
2.10.0.windows.1
|
|
||||||
|
|
16
ports/libvorbis/0001-Dont-export-vorbisenc-functions.patch
Normal file
16
ports/libvorbis/0001-Dont-export-vorbisenc-functions.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/win32/vorbis.def b/win32/vorbis.def
|
||||||
|
index 9cca64d..a80fff7 100644
|
||||||
|
--- a/win32/vorbis.def
|
||||||
|
+++ b/win32/vorbis.def
|
||||||
|
@@ -49,11 +49,4 @@ vorbis_synthesis_idheader
|
||||||
|
;
|
||||||
|
vorbis_window
|
||||||
|
;_analysis_output_always
|
||||||
|
-vorbis_encode_init
|
||||||
|
-vorbis_encode_setup_managed
|
||||||
|
-vorbis_encode_setup_vbr
|
||||||
|
-vorbis_encode_init_vbr
|
||||||
|
-vorbis_encode_setup_init
|
||||||
|
-vorbis_encode_ctl
|
||||||
|
-;
|
||||||
|
vorbis_version_string
|
@ -1,4 +1,4 @@
|
|||||||
Source: libvorbis
|
Source: libvorbis
|
||||||
Version: 1.3.5-1-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee
|
Version: 1.3.5-143caf4-2
|
||||||
Description: Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format.
|
Description: Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format.
|
||||||
Build-Depends: libogg
|
Build-Depends: libogg
|
||||||
|
@ -6,37 +6,18 @@
|
|||||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||||
#
|
#
|
||||||
|
|
||||||
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)
|
include(vcpkg_common_functions)
|
||||||
find_program(GIT git)
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/vorbis-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee)
|
||||||
|
vcpkg_download_distfile(ARCHIVE
|
||||||
|
URLS "https://github.com/xiph/vorbis/archive/143caf4023a90c09a5eb685fdd46fb9b9c36b1ee.zip"
|
||||||
|
FILENAME "vorbis-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee.zip"
|
||||||
|
SHA512 9eeb64b1664ba8a1d118cdc5efc0090fe5f542eff33a16f4676fde8e59031fd0f9017857a7c45ca549899cab34efefd81dd54a57fab97f91f776fd9426f4e37a
|
||||||
|
)
|
||||||
|
|
||||||
set(GIT_URL "https://git.xiph.org/vorbis.git")
|
vcpkg_extract_source_archive(${ARCHIVE})
|
||||||
set(GIT_REF "143caf4023a90c09a5eb685fdd46fb9b9c36b1ee")
|
vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
|
||||||
if(NOT EXISTS "${DOWNLOADS}/vorbis.git")
|
|
||||||
message(STATUS "Cloning")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/vorbis.git
|
|
||||||
WORKING_DIRECTORY ${DOWNLOADS}
|
|
||||||
LOGNAME clone
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
|
|
||||||
message(STATUS "Adding worktree and patching")
|
|
||||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REF}
|
|
||||||
WORKING_DIRECTORY ${DOWNLOADS}/vorbis.git
|
|
||||||
LOGNAME worktree
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
vcpkg_apply_patches(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src
|
|
||||||
PATCHES
|
PATCHES
|
||||||
${CMAKE_CURRENT_LIST_DIR}/0001-Add-vorbisenc.c-to-vorbis-library.patch
|
${CMAKE_CURRENT_LIST_DIR}/0001-Dont-export-vorbisenc-functions.patch
|
||||||
${CMAKE_CURRENT_LIST_DIR}/0002-Allow-deprecated-functions.patch
|
${CMAKE_CURRENT_LIST_DIR}/0002-Allow-deprecated-functions.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -45,7 +26,8 @@ file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/ogg.lib"
|
|||||||
file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/lib/ogg.lib" OGG_LIB_DBG)
|
file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/lib/ogg.lib" OGG_LIB_DBG)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
PREFER_NINJA
|
||||||
OPTIONS -DOGG_INCLUDE_DIRS=${OGG_INCLUDE}
|
OPTIONS -DOGG_INCLUDE_DIRS=${OGG_INCLUDE}
|
||||||
OPTIONS_RELEASE -DOGG_LIBRARIES=${OGG_LIB_REL}
|
OPTIONS_RELEASE -DOGG_LIBRARIES=${OGG_LIB_REL}
|
||||||
OPTIONS_DEBUG -DOGG_LIBRARIES=${OGG_LIB_DBG}
|
OPTIONS_DEBUG -DOGG_LIBRARIES=${OGG_LIB_DBG}
|
||||||
@ -56,7 +38,7 @@ vcpkg_install_cmake()
|
|||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
|
|
||||||
# Handle copyright
|
# Handle copyright
|
||||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libvorbis)
|
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libvorbis)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libvorbis/COPYING ${CURRENT_PACKAGES_DIR}/share/libvorbis/copyright)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libvorbis/COPYING ${CURRENT_PACKAGES_DIR}/share/libvorbis/copyright)
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
vcpkg_copy_pdbs()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user