diff options
| author | Victor Romero <romerosanchezv@gmail.com> | 2019-02-28 23:53:42 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-28 23:53:42 -0800 |
| commit | 8641dfd9dd6d3bf190515822060872a56ee37906 (patch) | |
| tree | 1334dd5e7c0b2b5eb89452010b730cfbcf25ff85 /ports/smpeg2 | |
| parent | 1afa2b0f7ba4079ff1bb1dd7724733b0cfc583d2 (diff) | |
| download | vcpkg-8641dfd9dd6d3bf190515822060872a56ee37906.tar.gz vcpkg-8641dfd9dd6d3bf190515822060872a56ee37906.zip | |
Modify `vcpkg_fixup_cmake_targets()` (#5459)
* some libraries export <PackageName>LibraryDepends.cmake
instead of <PackageName>Targets.cmake.
Those file also need the fix of #1044
should close #4753
* prefered the general solution #4622.
hopefully solved the issue within #4150
replaced the regex with something more readable
(also ident is lost)
should close:
#4753
#4633
#4150
and maybe more
* Hash vcpkg_fixup_cmake_targets.cmake
* [boost] Fix use of find_package(Boost) with cache variables
[socket-io-client] Fix install
* reversed change back to use regex replace
* [glbinding] Fix _IMPORT_PREFIX depth in *-export.cmake files
* [tinyspline] Ignore warnings treated as errors
* [libevent, liblemon, libpng, smpeg2, zlib] Fix apply patches
* [libsodium] Fix apply patches
* [folly] Link correct libraries in debug and release
* [vtk] Remove unset of _IMPORT_PREFIX
* [tinyspline] Do not treat warnings as errors
* [smpeg2] Fix double* to int comparison
* [nvtt] Define value for HAVE_UNISTD_H in MacOS
* [libui] Fix MacOS X build
* [zlib] Fix download URL
* [qhull] Update to v7.2.1
* [podofo] Set value for HAVE_UNISTD_H in MacOS
* [mongo-cxx-driver,ogre,podofo,qhull] Bump CONTROL version
* [mongo-c-driver] Set _IMPORT_PREFIX
* [tmxparser] Bump CONTROL version
* [qhull,vxl] Bump CONTROL version
Diffstat (limited to 'ports/smpeg2')
| -rw-r--r-- | ports/smpeg2/001-correct-sdl-headers-dir.patch (renamed from ports/smpeg2/correct-sdl-headers-dir.patch) | 0 | ||||
| -rw-r--r-- | ports/smpeg2/002-use-SDL2-headers.patch | 229 | ||||
| -rw-r--r-- | ports/smpeg2/003-fix-double-ptr-to-int-comparison.patch | 13 | ||||
| -rw-r--r-- | ports/smpeg2/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | ports/smpeg2/CONTROL | 2 | ||||
| -rw-r--r-- | ports/smpeg2/portfile.cmake | 23 |
6 files changed, 260 insertions, 10 deletions
diff --git a/ports/smpeg2/correct-sdl-headers-dir.patch b/ports/smpeg2/001-correct-sdl-headers-dir.patch index 6cbcb6b9b..6cbcb6b9b 100644 --- a/ports/smpeg2/correct-sdl-headers-dir.patch +++ b/ports/smpeg2/001-correct-sdl-headers-dir.patch diff --git a/ports/smpeg2/002-use-SDL2-headers.patch b/ports/smpeg2/002-use-SDL2-headers.patch new file mode 100644 index 000000000..9737c6d7b --- /dev/null +++ b/ports/smpeg2/002-use-SDL2-headers.patch @@ -0,0 +1,229 @@ +diff --git a/MPEG.cpp b/MPEG.cpp
+index 1645965..9d44166 100644
+--- a/MPEG.cpp
++++ b/MPEG.cpp
+@@ -1,4 +1,4 @@
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ #include "MPEG.h"
+
+diff --git a/MPEG.h b/MPEG.h
+index ca04260..d0b0d55 100644
+--- a/MPEG.h
++++ b/MPEG.h
+@@ -28,7 +28,7 @@
+ #include <stdio.h>
+ #include <string.h>
+
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ #include "MPEGerror.h"
+ #include "MPEGstream.h"
+diff --git a/MPEGaction.h b/MPEGaction.h
+index f9da3a3..ea0b94f 100644
+--- a/MPEGaction.h
++++ b/MPEGaction.h
+@@ -24,7 +24,7 @@
+ #ifndef _MPEGACTION_H_
+ #define _MPEGACTION_H_
+
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+ #include "MPEGframe.h"
+
+ typedef enum {
+diff --git a/MPEGaudio.h b/MPEGaudio.h
+index 3f315d2..2ec4377 100644
+--- a/MPEGaudio.h
++++ b/MPEGaudio.h
+@@ -24,7 +24,7 @@
+ #ifndef _MPEGAUDIO_H_
+ #define _MPEGAUDIO_H_
+
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+ #include "MPEGerror.h"
+ #include "MPEGaction.h"
+
+diff --git a/MPEGlist.h b/MPEGlist.h
+index 3a58a5f..fe0dbac 100644
+--- a/MPEGlist.h
++++ b/MPEGlist.h
+@@ -6,7 +6,7 @@
+ #ifndef _MPEGLIST_H_
+ #define _MPEGLIST_H_
+
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ class MPEGlist {
+ public:
+diff --git a/MPEGring.cpp b/MPEGring.cpp
+index 6d9dabb..0350d54 100644
+--- a/MPEGring.cpp
++++ b/MPEGring.cpp
+@@ -23,7 +23,7 @@
+ #include <assert.h>
+ #include <string.h>
+
+-#include "SDL_timer.h"
++#include "SDL2/SDL_timer.h"
+
+ #include "MPEGring.h"
+
+diff --git a/MPEGring.h b/MPEGring.h
+index 89172ac..550fbcc 100644
+--- a/MPEGring.h
++++ b/MPEGring.h
+@@ -24,8 +24,8 @@
+ #ifndef _MPEGRING_H
+ #define _MPEGRING_H
+
+-#include "SDL_types.h"
+-#include "SDL_thread.h"
++#include "SDL2/SDL_types.h"
++#include "SDL2/SDL_thread.h"
+
+ class MPEG_ring {
+ public:
+diff --git a/MPEGstream.h b/MPEGstream.h
+index b96c631..50e0c3a 100644
+--- a/MPEGstream.h
++++ b/MPEGstream.h
+@@ -22,7 +22,7 @@
+ #ifndef _MPEGSTREAM_H_
+ #define _MPEGSTREAM_H_
+
+-#include "SDL_types.h"
++#include "SDL2/SDL_types.h"
+ #include "MPEGerror.h"
+ #include "MPEGvideo.h"
+ #include "MPEGaudio.h"
+diff --git a/MPEGsystem.h b/MPEGsystem.h
+index 823b679..28454b3 100644
+--- a/MPEGsystem.h
++++ b/MPEGsystem.h
+@@ -6,8 +6,8 @@
+ #define _MPEGSYSTEM_H_
+ #define USE_SYSTEM_TIMESTAMP
+
+-#include "SDL.h"
+-#include "SDL_thread.h"
++#include "SDL2/SDL.h"
++#include "SDL2/SDL_thread.h"
+ #include "MPEGerror.h"
+
+ class MPEGstream;
+diff --git a/MPEGvideo.h b/MPEGvideo.h
+index 12da092..9f1ed43 100644
+--- a/MPEGvideo.h
++++ b/MPEGvideo.h
+@@ -24,8 +24,8 @@
+ #ifndef _MPEGVIDEO_H_
+ #define _MPEGVIDEO_H_
+
+-#include "SDL.h"
+-#include "SDL_thread.h"
++#include "SDL2/SDL.h"
++#include "SDL2/SDL_thread.h"
+ #include "MPEGerror.h"
+ #include "MPEGaction.h"
+
+diff --git a/README.SDL_mixer b/README.SDL_mixer
+index c01b575..5cacc4f 100644
+--- a/README.SDL_mixer
++++ b/README.SDL_mixer
+@@ -5,7 +5,7 @@ You can have the SDL mixer library mix audio from a movie by hooking into
+ the SDL mixer music hooks:
+
+ #include "smpeg.h"
+-#include "SDL_mixer.h"
++#include "SDL2/SDL_mixer.h"
+
+ .. set up the mixer audio ...
+
+diff --git a/acinclude/sdl2.m4 b/acinclude/sdl2.m4
+index 93bc4b0..776ad42 100644
+--- a/acinclude/sdl2.m4
++++ b/acinclude/sdl2.m4
+@@ -84,7 +84,7 @@ dnl
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ char*
+ my_strdup (char *str)
+@@ -167,7 +167,7 @@ int main (int argc, char *argv[])
+ LIBS="$LIBS $SDL_LIBS"
+ AC_TRY_LINK([
+ #include <stdio.h>
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ int main(int argc, char *argv[])
+ { return 0; }
+diff --git a/configure b/configure
+index 4ac7e60..ee1d934 100644
+--- a/configure
++++ b/configure
+@@ -15270,7 +15270,7 @@ else
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ char*
+ my_strdup (char *str)
+@@ -15367,7 +15367,7 @@ $as_echo "no" >&6; }
+ /* end confdefs.h. */
+
+ #include <stdio.h>
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ int main(int argc, char *argv[])
+ { return 0; }
+diff --git a/video/gdith.cpp b/video/gdith.cpp
+index c56da96..53ba388 100644
+--- a/video/gdith.cpp
++++ b/video/gdith.cpp
+@@ -52,7 +52,7 @@
+ #include "video.h"
+ #include "proto.h"
+ #include "dither.h"
+-#include "SDL_timer.h"
++#include "SDL2/SDL_timer.h"
+
+ #ifdef __STDC__
+ #include <stdlib.h>
+diff --git a/video/readfile.cpp b/video/readfile.cpp
+index eb71194..a19e66d 100644
+--- a/video/readfile.cpp
++++ b/video/readfile.cpp
+@@ -56,7 +56,7 @@
+ #include <string.h>
+ #include <signal.h>
+
+-#include "SDL_endian.h"
++#include "SDL2/SDL_endian.h"
+ #include "video.h"
+ #include "proto.h"
+ #include "util.h"
+diff --git a/video/video.h b/video/video.h
+index 96de89b..a35095b 100644
+--- a/video/video.h
++++ b/video/video.h
+@@ -400,7 +400,7 @@ extern unsigned int cacheMiss[8][8];
+ #define __SCO__ 1
+ #endif
+
+-#include "SDL_endian.h"
++#include "SDL2/SDL_endian.h"
+ #if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ #ifdef LITTLE_ENDIAN_ARCHITECTURE
+ #undef LITTLE_ENDIAN_ARCHITECTURE
diff --git a/ports/smpeg2/003-fix-double-ptr-to-int-comparison.patch b/ports/smpeg2/003-fix-double-ptr-to-int-comparison.patch new file mode 100644 index 000000000..31128a848 --- /dev/null +++ b/ports/smpeg2/003-fix-double-ptr-to-int-comparison.patch @@ -0,0 +1,13 @@ +diff --git a/audio/mpegtoraw.cpp b/audio/mpegtoraw.cpp +index 493c870..a4eabdc 100644 +--- a/audio/mpegtoraw.cpp ++++ b/audio/mpegtoraw.cpp +@@ -448,7 +448,7 @@ int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len) + if (audio->timestamp[0] != -1){ + double timeshift = audio->Time() - audio->timestamp[0]; + double correction = 0; +- assert(audio->timestamp >= 0); ++ assert(audio->timestamp[0] >= 0); + if (fabs(timeshift) > 1.0){ + correction = -timeshift; + #ifdef DEBUG_TIMESTAMP_SYNC diff --git a/ports/smpeg2/CMakeLists.txt b/ports/smpeg2/CMakeLists.txt index aa36bbb21..87a3586be 100644 --- a/ports/smpeg2/CMakeLists.txt +++ b/ports/smpeg2/CMakeLists.txt @@ -8,6 +8,9 @@ include_directories(${SDL_INCLUDE_DIR}) include_directories(${SDL_INCLUDE_DIR}/SDL2) include_directories(${CMAKE_SOURCE_DIR}) +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif() add_definitions(-DNOCONTROLS -DTHREADED_AUDIO) # some c++ code just assumes memset is available diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL index 0b0bee21e..0de1c4700 100644 --- a/ports/smpeg2/CONTROL +++ b/ports/smpeg2/CONTROL @@ -1,4 +1,4 @@ Source: smpeg2
-Version: 2.0.0-3
+Version: 2.0.0-5
Description: SDL MPEG Player Library
Build-Depends: sdl2
diff --git a/ports/smpeg2/portfile.cmake b/ports/smpeg2/portfile.cmake index 7639ca264..a7c6e9b07 100644 --- a/ports/smpeg2/portfile.cmake +++ b/ports/smpeg2/portfile.cmake @@ -1,17 +1,22 @@ 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})
+set(VERSION 2.0.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.libsdl.org/projects/smpeg/release/smpeg2-${VERSION}.tar.gz"
+ FILENAME "smpeg2-${VERSION}.tar.gz"
+ SHA512 80a779d01e7aa76778ef6ceea8041537db9e4b354df413214c4413c875cb98551891cef98fa0f057cc6a3222e4983da9ae65b86bdad2f87f9e2a6751837e2baf
+)
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ REF ${VERSION}
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/correct-sdl-headers-dir.patch)
+ "001-correct-sdl-headers-dir.patch"
+ "002-use-SDL2-headers.patch"
+ "003-fix-double-ptr-to-int-comparison.patch"
+)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
