Skip to content

Commit

Permalink
Merge commit '0657aee69dec8508a0011f47f3b69d7538e9d262'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibras committed Sep 7, 2020
2 parents 0d1d97c + 0657aee commit 212bc9a
Show file tree
Hide file tree
Showing 262 changed files with 2,605 additions and 2,997 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,26 @@ vorbisfile-uninstalled.pc
vorbisfile.pc
doc/Doxyfile
doc/doxygen-build.stamp
examples/chaining_example
examples/decoder_example
examples/encoder_example
examples/seeking_example
examples/vorbisfile_example
lib/test_sharedbook
test/test

CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
CMakeSettings.json

*[Bb]uild*/

.vs/
.vscode/
27 changes: 27 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
default:
tags:
- docker
# Image from https://hub.docker.com/_/gcc/ based on Debian
image: gcc:9

autoconf:
stage: build
before_script:
- apt-get update &&
apt-get install -y libogg-dev zip doxygen
script:
- ./autogen.sh
- ./configure
- make
- make distcheck

cmake:
stage: build
before_script:
- apt-get update &&
apt-get install -y libogg-dev zip doxygen
cmake ninja-build
script:
- mkdir build
- cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release
- cmake --build build
19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
language: c

os:
- linux
- osx

osx_image: xcode11

compiler:
- gcc
- clang
Expand All @@ -12,13 +18,10 @@ addons:
apt:
packages:
- libogg-dev
homebrew:
brewfile: true
update: true

script:
- if [[ "$BUILD_SYSTEM" == "AUTOTOOLS" ]] ; then ./autogen.sh ; fi
- if [[ "$BUILD_SYSTEM" == "AUTOTOOLS" ]] ; then ./configure ; fi
- if [[ "$BUILD_SYSTEM" == "AUTOTOOLS" ]] ; then make -j2 V=1 distcheck ; fi
- if [[ "$BUILD_SYSTEM" == "CMAKE" ]] ; then mkdir build ; fi
- if [[ "$BUILD_SYSTEM" == "CMAKE" ]] ; then pushd build ; fi
- if [[ "$BUILD_SYSTEM" == "CMAKE" ]] ; then cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. ; fi
- if [[ "$BUILD_SYSTEM" == "CMAKE" ]] ; then cmake --build . ; fi
- if [[ "$BUILD_SYSTEM" == "CMAKE" ]] ; then popd ; fi
- if [[ "$BUILD_SYSTEM" == "AUTOTOOLS" ]] ; then ./autogen.sh && ./configure && make -j2 V=1 distcheck; fi
- if [[ "$BUILD_SYSTEM" == "CMAKE" ]] ; then mkdir build && pushd build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. && cmake --build . && popd; fi
3 changes: 3 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
brew 'doxygen'
brew 'libogg'
brew 'xz'
19 changes: 19 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
libvorbis 1.3.7 (2020-07-04) -- "Xiph.Org libVorbis I 20200704 (Reducing Environment)"

* Fix CVE-2018-10393 - out-of-bounds read encoding very low sample rates.
* Fix CVE-2017-14160 - out-of-bounds read encoding very low sample rates.
* Fix handling invalid bytes per sample arguments.
* Fix handling invalid channel count arguments.
* Fix invalid free on seek failure.
* Fix negative shift reading blocksize.
* Fix accepting unreasonable float32 values.
* Fix tag comparison depending on locale.
* Fix unnecessarily linking libm.
* Fix memory leak in test_sharedbook.
* Update Visual Studio projects for ogg library filename change.
* Distribute CMake build files with the source package.
* Remove unnecessary configure --target switch.
* Add gitlab CI support.
* Add OSS-Fuzz support.
* Build system and integration updates.

libvorbis 1.3.6 (2018-03-16) -- "Xiph.Org libVorbis I 20180316 (Now 100% fewer shells)"

* Fix CVE-2018-5146 - out-of-bounds write on codebook decoding.
Expand Down
23 changes: 11 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 2.8.12)
project(vorbis)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

# Required modules
include(GNUInstallDirs)
include(CheckIncludeFiles)
include(CheckLibraryExists)

# Build options
option(BUILD_SHARED_LIBS "Build shared library" OFF)
Expand All @@ -15,6 +18,8 @@ if(BUILD_FRAMEWORK)
set(BUILD_SHARED_LIBS TRUE)
endif()

option(INSTALL_CMAKE_PACKAGE_MODULE "Install CMake package configiguration module" ON)

# Extract project version from configure.ac
file(READ configure.ac CONFIGURE_AC_CONTENTS)
string(REGEX MATCH "AC_INIT\\(\\[libvorbis\\],\\[([0-9]*).([0-9]*).([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS})
Expand Down Expand Up @@ -52,18 +57,12 @@ endfunction()

message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}")

# Find math library

check_library_exists(m floor "" HAVE_LIBM)

# Find ogg dependency
if(NOT OGG_ROOT)
find_package(PkgConfig QUIET)
pkg_check_modules(PC_OGG QUIET ogg)
find_path(OGG_INCLUDE_DIRS NAMES ogg/ogg.h HINTS ${PC_OGG_INCLUDE_DIRS} PATH_SUFFIXES ogg)
find_library(OGG_LIBRARIES NAMES ogg HINTS ${PC_OGG_LIBRARY_DIRS})
else()
find_path(OGG_INCLUDE_DIRS NAMES ogg/ogg.h HINTS ${OGG_ROOT}/include PATH_SUFFIXES ogg)
find_library(OGG_LIBRARIES NAMES ogg HINTS ${OGG_ROOT}/lib ${OGG_ROOT}/lib64)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OGG DEFAULT_MSG OGG_INCLUDE_DIRS OGG_LIBRARIES)
find_package(Ogg REQUIRED)

add_subdirectory(lib)

Expand Down
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2002-2018 Xiph.org Foundation
Copyright (c) 2002-2020 Xiph.org Foundation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
5 changes: 2 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ EXTRA_DIST = \
vorbis-uninstalled.pc.in \
vorbisenc-uninstalled.pc.in \
vorbisfile-uninstalled.pc.in \
symbian \
macosx win32

symbian macosx win32 \
CMakeLists.txt cmake/FindOgg.cmake cmake/VorbisConfig.cmake.in

DISTCHECK_CONFIGURE_FLAGS = --enable-docs

Expand Down
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Vorbis

[![GitLab Build Status](https://gitlab.xiph.org/xiph/vorbis/badges/master/pipeline.svg)](https://gitlab.xiph.org/xiph/vorbis/-/pipelines)
[![Travis Build Status](https://travis-ci.org/xiph/vorbis.svg?branch=master)](https://travis-ci.org/xiph/vorbis)
[![Jenkins Build Status](https://mf4.xiph.org/jenkins/job/libvorbis/badge/icon)](https://mf4.xiph.org/jenkins/job/libvorbis/)
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/github/xiph/vorbis?branch=master&svg=true)](https://ci.appveyor.com/project/rillian/vorbis)

Vorbis is a general purpose audio and music encoding format
Expand All @@ -17,7 +17,7 @@ This package contains:

- libvorbis, a BSD-style license software implementation of
the Vorbis specification by the Xiph.Org Foundation
(https://www.xiph.org/)
(https://xiph.org/)

- libvorbisfile, a BSD-style license convenience library
built on Vorbis designed to simplify common uses
Expand Down Expand Up @@ -58,19 +58,17 @@ Directory:

## Contact ##

The Ogg homepage is located at 'https://www.xiph.org/ogg/'.
Vorbis's homepage is located at 'https://www.xiph.org/vorbis/'.
The Ogg homepage is located at 'https://xiph.org/ogg/'.
Vorbis's homepage is located at 'https://xiph.org/vorbis/'.
Up to date technical documents, contact information, source code and
pre-built utilities may be found there.

The user website for Ogg Vorbis software and audio is http://vorbis.com/

## Building ##

#### Building from master ####

Development source is under git revision control at
https://git.xiph.org/vorbis.git. You will also need the
https://gitlab.xiph.org/xiph/vorbis.git. You will also need the
newest versions of autoconf, automake, libtool and pkg-config in
order to compile Vorbis from development source. A configure script
is provided for you in the source tarball distributions.
Expand Down Expand Up @@ -107,8 +105,8 @@ after normal configuring:

## Building with CMake ##

Ogg supports building using [CMake](http://www.cmake.org/). CMake is a meta build system that generates native projects for each platform.
To generate projects just run cmake replacing `YOUR-PROJECT-GENERATOR` with a proper generator from a list [here](http://www.cmake.org/cmake/help/v3.2/manual/cmake-generators.7.html):
Ogg supports building using [CMake](https://cmake.org/). CMake is a meta build system that generates native projects for each platform.
To generate projects just run cmake replacing `YOUR-PROJECT-GENERATOR` with a proper generator from a list [here](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html):

cmake -G YOUR-PROJECT-GENERATOR .

Expand Down Expand Up @@ -145,5 +143,5 @@ USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS
GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE
IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.

THE OggVorbis SOURCE CODE IS COPYRIGHT (C) 1994-2018
by the Xiph.Org Foundation https://www.xiph.org/
THE OggVorbis SOURCE CODE IS COPYRIGHT (C) 1994-2020
by the Xiph.Org Foundation https://xiph.org/
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ environment:

install:
- git clone -q https://github.com/xiph/ogg.git %APPVEYOR_BUILD_FOLDER%\..\libogg
- if "%BUILD_SYSTEM%"=="MSVC" msbuild "%APPVEYOR_BUILD_FOLDER%\..\libogg\win32\VS2015\libogg_static.sln" /m /v:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=%CONFIGURATION%;Platform=%PLATFORM%
- if "%BUILD_SYSTEM%"=="MSVC" msbuild "%APPVEYOR_BUILD_FOLDER%\..\libogg\win32\VS2015\libogg.sln" /m /v:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=%CONFIGURATION%;Platform=%PLATFORM%
- if "%BUILD_SYSTEM%"=="CMAKE" mkdir "%APPVEYOR_BUILD_FOLDER%\..\libogg\build"
- if "%BUILD_SYSTEM%"=="CMAKE" pushd "%APPVEYOR_BUILD_FOLDER%\..\libogg\build"
- if "%BUILD_SYSTEM%"=="CMAKE" cmake -A "%PLATFORM%" -G "Visual Studio 14 2015" -DCMAKE_INSTALL_PREFIX="%APPVEYOR_BUILD_FOLDER%\..\libogg\install" ..
Expand Down
94 changes: 94 additions & 0 deletions cmake/FindOgg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#[=======================================================================[.rst:
FindOgg
--------
Find the native Ogg includes and library.
IMPORTED Targets
^^^^^^^^^^^^^^^^
This module defines :prop_tgt:`IMPORTED` target ``Ogg::ogg``, if
Ogg has been found.
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
::
OGG_INCLUDE_DIRS - where to find ogg.h, etc.
OGG_LIBRARIES - List of libraries when using ogg.
OGG_FOUND - True if ogg found.
::
OGG_VERSION_STRING - The version of ogg found (x.y.z)
Hints
^^^^^
A user may set ``OGG_ROOT`` to a ogg installation root to tell this
module where to look.
#]=======================================================================]

if(OGG_INCLUDE_DIR)
# Already in cache, be silent
set(OGG_FIND_QUIETLY TRUE)
endif()

find_package(PkgConfig QUIET)
pkg_check_modules(PC_OGG QUIET ogg)

set(OGG_VERSION_STRING ${PC_OGG_VERSION})

find_path(OGG_INCLUDE_DIR ogg/ogg.h
HINTS
${PC_OGG_INCLUDEDIR}
${PC_OGG_INCLUDE_DIRS}
${OGG_ROOT}
PATH_SUFFIXES
include
)
# MSVC built ogg may be named ogg_static.
# The provided project files name the library with the lib prefix.
find_library(OGG_LIBRARY
NAMES
ogg
ogg_static
libogg
libogg_static
HINTS
${PC_OGG_LIBDIR}
${PC_OGG_LIBRARY_DIRS}
${OGG_ROOT}
PATH_SUFFIXES
lib
)

# Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND
# to TRUE if all listed variables are TRUE.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Ogg
REQUIRED_VARS
OGG_LIBRARY
OGG_INCLUDE_DIR
VERSION_VAR
OGG_VERSION_STRING
)

if(OGG_FOUND)
set(OGG_LIBRARIES ${OGG_LIBRARY})
set(OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR})

if(NOT TARGET Ogg::ogg)
add_library(Ogg::ogg UNKNOWN IMPORTED)
set_target_properties(Ogg::ogg PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIRS}"
IMPORTED_LOCATION "${OGG_LIBRARIES}"
)
endif()
endif()

mark_as_advanced(OGG_INCLUDE_DIR OGG_LIBRARY)
19 changes: 19 additions & 0 deletions cmake/VorbisConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)
find_dependency(Ogg REQUIRED)

include(${CMAKE_CURRENT_LIST_DIR}/VorbisTargets.cmake)

set(Vorbis_Vorbis_FOUND 1)
set(Vorbis_Enc_FOUND 0)
set(Vorbis_File_FOUND 0)

if(TARGET Vorbis::vorbisenc)
set(Vorbis_Enc_FOUND TRUE)
endif()
if(TARGET Vorbis::vorbisfile)
set(Vorbis_File_FOUND TRUE)
endif()

check_required_components(Vorbis Enc File)
10 changes: 5 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ dnl Initialization and Versioning
dnl ------------------------------------------------


AC_INIT([libvorbis],[1.3.6],[[email protected]])
AC_INIT([libvorbis],[1.3.7],[[email protected]])

AC_CONFIG_MACRO_DIR([m4])

AC_CONFIG_SRCDIR([lib/mdct.c])

AC_CANONICAL_TARGET([])
AC_CANONICAL_HOST

AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
Expand All @@ -29,15 +29,15 @@ dnl - interfaces added -> increment AGE
dnl - interfaces removed -> AGE = 0

V_LIB_CURRENT=4
V_LIB_REVISION=8
V_LIB_REVISION=9
V_LIB_AGE=4

VF_LIB_CURRENT=6
VF_LIB_REVISION=7
VF_LIB_REVISION=8
VF_LIB_AGE=3

VE_LIB_CURRENT=2
VE_LIB_REVISION=11
VE_LIB_REVISION=12
VE_LIB_AGE=0

AC_SUBST(V_LIB_CURRENT)
Expand Down
Loading

0 comments on commit 212bc9a

Please sign in to comment.