diff options
| author | codicodi <rob.ceglinski@gmail.com> | 2016-12-20 15:17:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-20 15:17:24 +0100 |
| commit | a5bb368f2480bc8d1d6cbeaa9b264792430b1728 (patch) | |
| tree | 2e8001f9dda550aadecf47c01003bfd4abbe7b14 | |
| parent | 3b7b380798fbae1072f093019fb89cb7ced744d4 (diff) | |
| download | vcpkg-a5bb368f2480bc8d1d6cbeaa9b264792430b1728.tar.gz vcpkg-a5bb368f2480bc8d1d6cbeaa9b264792430b1728.zip | |
[smpeg2] initial commit
| -rw-r--r-- | ports/smpeg2/CMakeLists.txt | 57 | ||||
| -rw-r--r-- | ports/smpeg2/CONTROL | 4 | ||||
| -rw-r--r-- | ports/smpeg2/correct-sdl-headers-dir.patch | 17 | ||||
| -rw-r--r-- | ports/smpeg2/portfile.cmake | 27 |
4 files changed, 105 insertions, 0 deletions
diff --git a/ports/smpeg2/CMakeLists.txt b/ports/smpeg2/CMakeLists.txt new file mode 100644 index 000000000..9f061cfb8 --- /dev/null +++ b/ports/smpeg2/CMakeLists.txt @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 2.6) +project(SMPEG2) + +find_path(SDL_INCLUDE_DIR SDL2/SDL.h) +find_library(SDL_LIBRARY SDL2) + +include_directories(${SDL_INCLUDE_DIR}) +include_directories(${SDL_INCLUDE_DIR}/SDL2) +include_directories(${CMAKE_SOURCE_DIR}) + +add_definitions(-DNOCONTROLS -DTHREADED_AUDIO) + +# some c++ code just assumes memset is available +file(WRITE ${CMAKE_SOURCE_DIR}/declare_memset.h "#include <string.h>\n") +add_definitions(-FIdeclare_memset.h) + +add_library(smpeg2 + audio/bitwindow.cpp + audio/filter.cpp + audio/filter_2.cpp + audio/hufftable.cpp + audio/mpeglayer1.cpp + audio/mpeglayer2.cpp + audio/mpeglayer3.cpp + audio/mpegtable.cpp + audio/mpegtoraw.cpp + audio/MPEGaudio.cpp + video/decoders.cpp + video/floatdct.cpp + video/gdith.cpp + video/jrevdct.cpp + video/motionvec.cpp + video/parseblock.cpp + video/readfile.cpp + video/util.cpp + video/video.cpp + video/MPEGvideo.cpp + MPEG.cpp + MPEGlist.cpp + MPEGring.cpp + MPEGstream.cpp + MPEGsystem.cpp + smpeg.cpp) + +target_link_libraries(smpeg2 ${SDL_LIBRARY}) + +install(TARGETS smpeg2 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT DEFINED SMPEG_SKIP_HEADERS) + install(FILES smpeg.h MPEGframe.h DESTINATION include) +endif() + +message(STATUS "Link-time dependencies:") +message(STATUS " " ${SDL_LIBRARY}) diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL new file mode 100644 index 000000000..8465a6446 --- /dev/null +++ b/ports/smpeg2/CONTROL @@ -0,0 +1,4 @@ +Source: smpeg2
+Version: 2.0.0
+Description: SDL MPEG Player Library
+Build-Depends: sdl2
diff --git a/ports/smpeg2/correct-sdl-headers-dir.patch b/ports/smpeg2/correct-sdl-headers-dir.patch new file mode 100644 index 000000000..601b6c8a8 --- /dev/null +++ b/ports/smpeg2/correct-sdl-headers-dir.patch @@ -0,0 +1,17 @@ +diff --git a/smpeg.h b/smpeg.h
+index 6bc2dbd..d12c8f8 100644
+--- a/smpeg.h
++++ b/smpeg.h
+@@ -22,9 +22,9 @@
+ #ifndef _SMPEG_H_
+ #define _SMPEG_H_
+
+-#include "SDL.h"
+-#include "SDL_mutex.h"
+-#include "SDL_audio.h"
++#include "SDL2/SDL.h"
++#include "SDL2/SDL_mutex.h"
++#include "SDL2/SDL_audio.h"
+ #include "MPEGframe.h"
+
+ #ifdef __cplusplus
diff --git a/ports/smpeg2/portfile.cmake b/ports/smpeg2/portfile.cmake new file mode 100644 index 000000000..43e6e623e --- /dev/null +++ b/ports/smpeg2/portfile.cmake @@ -0,0 +1,27 @@ +
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/smpeg2-2.0.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.libsdl.org/projects/smpeg/release/smpeg2-2.0.0.tar.gz"
+ FILENAME "smpeg2-2.0.0.tar.gz"
+ SHA512 80a779d01e7aa76778ef6ceea8041537db9e4b354df413214c4413c875cb98551891cef98fa0f057cc6a3222e4983da9ae65b86bdad2f87f9e2a6751837e2baf)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/correct-sdl-headers-dir.patch)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG
+ -DSMPEG_SKIP_HEADERS=ON)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/smpeg2)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/smpeg2/COPYING ${CURRENT_PACKAGES_DIR}/share/smpeg2/copyright)
|
