From 81bb6873f1c0291fecbf6e429ad15ac3db66a4c0 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 12 Mar 2024 22:07:03 +0100 Subject: Legal notices updated Rename contrib -> third-party intendes to express the origin and purpose of that part of the code better. I plan to readd contrib/ again but with more in-project things like bash-completions, dev workflow scripts etc. --- third-party/ogg/1.cmake.patch | 111 +++++++++++++++++++++++++++++++++++++++++ third-party/ogg/CMakeLists.txt | 8 +++ third-party/ogg/COPYING | 28 +++++++++++ 3 files changed, 147 insertions(+) create mode 100644 third-party/ogg/1.cmake.patch create mode 100644 third-party/ogg/CMakeLists.txt create mode 100644 third-party/ogg/COPYING (limited to 'third-party/ogg') diff --git a/third-party/ogg/1.cmake.patch b/third-party/ogg/1.cmake.patch new file mode 100644 index 0000000..1534d17 --- /dev/null +++ b/third-party/ogg/1.cmake.patch @@ -0,0 +1,111 @@ +diff '--color=auto' -arNu a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 ++++ b/CMakeLists.txt 2024-03-03 12:39:28.260224931 +0100 +@@ -0,0 +1,107 @@ ++cmake_minimum_required(VERSION 2.8.7) ++project(libogg) ++ ++# Required modules ++include(GNUInstallDirs) ++include(CheckIncludeFiles) ++ ++# Build options ++option(BUILD_SHARED_LIBS "Build shared library" OFF) ++if(APPLE) ++ option(BUILD_FRAMEWORK "Build Framework bundle for OSX" OFF) ++endif() ++ ++# Extract project version from configure.ac ++file(READ configure.ac CONFIGURE_AC_CONTENTS) ++string(REGEX MATCH "AC_INIT\\(\\[libogg\\],\\[([0-9]*).([0-9]*).([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS}) ++set(PROJECT_VERSION_MAJOR ${CMAKE_MATCH_1}) ++set(PROJECT_VERSION_MINOR ${CMAKE_MATCH_2}) ++set(PROJECT_VERSION_PATCH ${CMAKE_MATCH_3}) ++set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) ++ ++# Helper function to get version-info ++function(get_version_info result current_var_name age_var_name revision_var_name) ++ string(REGEX MATCH "${current_var_name}=([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS}) ++ set(VERSION_INFO_CURRENT ${CMAKE_MATCH_1}) ++ ++ string(REGEX MATCH "${age_var_name}=([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS}) ++ set(VERSION_INFO_AGE ${CMAKE_MATCH_1}) ++ ++ string(REGEX MATCH "${revision_var_name}=([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS}) ++ set(VERSION_INFO_REVISION ${CMAKE_MATCH_1}) ++ ++ math(EXPR VERSION_INFO_CURRENT_MINUS_AGE "${VERSION_INFO_CURRENT} - ${VERSION_INFO_AGE}") ++ ++ set(${result} "${VERSION_INFO_CURRENT_MINUS_AGE}.${VERSION_INFO_AGE}.${VERSION_INFO_REVISION}" PARENT_SCOPE) ++endfunction() ++ ++# Helper function to configure pkg-config files ++function(configure_pkg_config_file pkg_config_file_in) ++ set(prefix ${CMAKE_INSTALL_PREFIX}) ++ set(exec_prefix ${CMAKE_INSTALL_FULL_BINDIR}) ++ set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) ++ set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) ++ set(VERSION ${PROJECT_VERSION}) ++ string(REPLACE ".in" "" pkg_config_file ${pkg_config_file_in}) ++ configure_file(${pkg_config_file_in} ${CMAKE_CURRENT_BINARY_DIR}/${pkg_config_file} @ONLY) ++endfunction() ++ ++message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}") ++ ++# Configure config_type.h ++check_include_files(inttypes.h INCLUDE_INTTYPES_H) ++check_include_files(stdint.h INCLUDE_STDINT_H) ++check_include_files(sys/types.h INCLUDE_SYS_TYPES_H) ++ ++set(SIZE16 int16_t) ++set(USIZE16 uint16_t) ++set(SIZE32 int32_t) ++set(USIZE32 uint32_t) ++set(SIZE64 int64_t) ++ ++configure_file(include/ogg/config_types.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/ogg/config_types.h @ONLY) ++ ++set(OGG_HEADERS ++ ${CMAKE_CURRENT_BINARY_DIR}/include/ogg/config_types.h ++ include/ogg/ogg.h ++ include/ogg/os_types.h ++) ++ ++set(OGG_SOURCES ++ src/bitwise.c ++ src/framing.c ++) ++ ++if(MSVC) ++ list(APPEND OGG_SOURCES win32/ogg.def) ++endif() ++ ++if(BUILD_FRAMEWORK) ++ set(BUILD_SHARED_LIBS TRUE) ++endif() ++ ++include_directories(include ${CMAKE_CURRENT_BINARY_DIR}/include) ++add_library(ogg ${OGG_HEADERS} ${OGG_SOURCES}) ++target_include_directories(ogg PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) ++add_library(Ogg::ogg ALIAS ogg) ++ ++get_version_info(OGG_VERSION_INFO "LIB_CURRENT" "LIB_AGE" "LIB_REVISION") ++set_target_properties( ++ ogg PROPERTIES ++ SOVERSION ${OGG_VERSION_INFO} ++ PUBLIC_HEADER "${OGG_HEADERS}" ++) ++ ++if(BUILD_FRAMEWORK) ++ set_target_properties(ogg PROPERTIES ++ FRAMEWORK TRUE ++ FRAMEWORK_VERSION ${PROJECT_VERSION} ++ MACOSX_FRAMEWORK_IDENTIFIER org.xiph.ogg ++ MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PROJECT_VERSION} ++ MACOSX_FRAMEWORK_BUNDLE_VERSION ${PROJECT_VERSION} ++ XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" ++ OUTPUT_NAME Ogg ++ ) ++endif() ++ ++configure_pkg_config_file(ogg.pc.in) diff --git a/third-party/ogg/CMakeLists.txt b/third-party/ogg/CMakeLists.txt new file mode 100644 index 0000000..a1d2372 --- /dev/null +++ b/third-party/ogg/CMakeLists.txt @@ -0,0 +1,8 @@ +FetchContent_Declare( + ogg + URL + https://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz + https://ftp.ignore.pl/starshatter/resources/mirror/libogg-1.3.3.tar.gz + URL_HASH SHA1=28ba40fd2e2d41988f658a0016fa7b534e509bc0 + PATCH_COMMAND ${CMAKE_COMMAND} -D "PATCH_FILE=${CMAKE_CURRENT_SOURCE_DIR}/1.cmake.patch" -P ${PATCH_SCRIPT} + DOWNLOAD_EXTRACT_TIMESTAMP No) diff --git a/third-party/ogg/COPYING b/third-party/ogg/COPYING new file mode 100644 index 0000000..6111c6c --- /dev/null +++ b/third-party/ogg/COPYING @@ -0,0 +1,28 @@ +Copyright (c) 2002, Xiph.org Foundation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- cgit v1.1