diff options
Diffstat (limited to 'net-misc/freerdp/files')
7 files changed, 0 insertions, 753 deletions
diff --git a/net-misc/freerdp/files/freerdp-1.1-CVE-2014-0250.patch b/net-misc/freerdp/files/freerdp-1.1-CVE-2014-0250.patch deleted file mode 100644 index ce4d3d989098..000000000000 --- a/net-misc/freerdp/files/freerdp-1.1-CVE-2014-0250.patch +++ /dev/null @@ -1,308 +0,0 @@ -From 5ad707ddf33d1d785a8ca1fbeec91d2eee985820 Mon Sep 17 00:00:00 2001 -From: Hardening <rdp.effort@gmail.com> -Date: Fri, 6 Jun 2014 23:24:16 +0200 -Subject: [PATCH] Fix CVE-2014-0250 - -This patch fixes CVE-2014-0250 by checking width, height and bpp when -receiving a new pointer. ---- - client/X11/xf_cliprdr.c | 11 +++++-- - libfreerdp/core/fastpath.c | 2 +- - libfreerdp/core/orders.c | 21 ++++++++++++ - libfreerdp/core/surface.c | 6 ++++ - libfreerdp/core/update.c | 82 +++++++++++++++++++++++++++++++++++++++------- - libfreerdp/core/update.h | 2 +- - libfreerdp/core/window.c | 5 +++ - 7 files changed, 114 insertions(+), 15 deletions(-) - -diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c -index 19c4332..8fb49f9 100644 ---- a/client/X11/xf_cliprdr.c -+++ b/client/X11/xf_cliprdr.c -@@ -914,7 +914,7 @@ static void xf_cliprdr_process_unicodetext(clipboardContext* cb, BYTE* data, int - crlf2lf(cb->data, &cb->data_length); - } - --static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size) -+static BOOL xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size) - { - wStream* s; - UINT16 bpp; -@@ -926,12 +926,18 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size) - if (size < 40) - { - DEBUG_X11_CLIPRDR("dib size %d too short", size); -- return; -+ return FALSE; - } - - s = Stream_New(data, size); - Stream_Seek(s, 14); - Stream_Read_UINT16(s, bpp); -+ if ((bpp < 1) || (bpp > 32)) -+ { -+ fprintf(stderr, "%s: invalid bpp value %d", __FUNCTION__, bpp); -+ return FALSE; -+ } -+ - Stream_Read_UINT32(s, ncolors); - offset = 14 + 40 + (bpp <= 8 ? (ncolors == 0 ? (1 << bpp) : ncolors) * 4 : 0); - Stream_Free(s, FALSE); -@@ -949,6 +955,7 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size) - cb->data = Stream_Buffer(s); - cb->data_length = Stream_GetPosition(s); - Stream_Free(s, FALSE); -+ return TRUE; - } - - static void xf_cliprdr_process_html(clipboardContext* cb, BYTE* data, int size) -diff --git a/libfreerdp/core/fastpath.c b/libfreerdp/core/fastpath.c -index 8448160..dcc7117 100644 ---- a/libfreerdp/core/fastpath.c -+++ b/libfreerdp/core/fastpath.c -@@ -254,7 +254,7 @@ static int fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, UINT32 s - break; - - case FASTPATH_UPDATETYPE_COLOR: -- if (!update_read_pointer_color(s, &pointer->pointer_color)) -+ if (!update_read_pointer_color(s, &pointer->pointer_color, 24)) - return -1; - IFCALL(pointer->PointerColor, context, &pointer->pointer_color); - break; -diff --git a/libfreerdp/core/orders.c b/libfreerdp/core/orders.c -index e5cc520..f22407f 100644 ---- a/libfreerdp/core/orders.c -+++ b/libfreerdp/core/orders.c -@@ -1830,6 +1830,11 @@ BOOL update_read_cache_bitmap_order(wStream* s, CACHE_BITMAP_ORDER* cache_bitmap - Stream_Read_UINT8(s, cache_bitmap->bitmapWidth); /* bitmapWidth (1 byte) */ - Stream_Read_UINT8(s, cache_bitmap->bitmapHeight); /* bitmapHeight (1 byte) */ - Stream_Read_UINT8(s, cache_bitmap->bitmapBpp); /* bitmapBpp (1 byte) */ -+ if ((cache_bitmap->bitmapBpp < 1) || (cache_bitmap->bitmapBpp > 32)) -+ { -+ fprintf(stderr, "%s: invalid bitmap bpp %d\n", __FUNCTION__, cache_bitmap->bitmapBpp); -+ return FALSE; -+ } - Stream_Read_UINT16(s, cache_bitmap->bitmapLength); /* bitmapLength (2 bytes) */ - Stream_Read_UINT16(s, cache_bitmap->cacheIndex); /* cacheIndex (2 bytes) */ - -@@ -2068,6 +2073,11 @@ BOOL update_read_cache_bitmap_v3_order(wStream* s, CACHE_BITMAP_V3_ORDER* cache_ - bitmapData = &cache_bitmap_v3->bitmapData; - - Stream_Read_UINT8(s, bitmapData->bpp); -+ if ((bitmapData->bpp < 1) || (bitmapData->bpp > 32)) -+ { -+ fprintf(stderr, "%s: invalid bpp value %d", __FUNCTION__, bitmapData->bpp); -+ return FALSE; -+ } - Stream_Seek_UINT8(s); /* reserved1 (1 byte) */ - Stream_Seek_UINT8(s); /* reserved2 (1 byte) */ - Stream_Read_UINT8(s, bitmapData->codecID); /* codecID (1 byte) */ -@@ -2672,6 +2682,11 @@ BOOL update_read_create_nine_grid_bitmap_order(wStream* s, CREATE_NINE_GRID_BITM - return FALSE; - - Stream_Read_UINT8(s, create_nine_grid_bitmap->bitmapBpp); /* bitmapBpp (1 byte) */ -+ if ((create_nine_grid_bitmap->bitmapBpp < 1) || (create_nine_grid_bitmap->bitmapBpp > 32)) -+ { -+ fprintf(stderr, "%s: invalid bpp value %d", __FUNCTION__, create_nine_grid_bitmap->bitmapBpp); -+ return FALSE; -+ } - Stream_Read_UINT16(s, create_nine_grid_bitmap->bitmapId); /* bitmapId (2 bytes) */ - - nineGridInfo = &(create_nine_grid_bitmap->nineGridInfo); -@@ -2707,6 +2722,12 @@ BOOL update_read_stream_bitmap_first_order(wStream* s, STREAM_BITMAP_FIRST_ORDER - - Stream_Read_UINT8(s, stream_bitmap_first->bitmapFlags); /* bitmapFlags (1 byte) */ - Stream_Read_UINT8(s, stream_bitmap_first->bitmapBpp); /* bitmapBpp (1 byte) */ -+ if ((stream_bitmap_first->bitmapBpp < 1) || (stream_bitmap_first->bitmapBpp > 32)) -+ { -+ fprintf(stderr, "%s: invalid bpp value %d", __FUNCTION__, stream_bitmap_first->bitmapBpp); -+ return FALSE; -+ } -+ - Stream_Read_UINT16(s, stream_bitmap_first->bitmapType); /* bitmapType (2 bytes) */ - Stream_Read_UINT16(s, stream_bitmap_first->bitmapWidth); /* bitmapWidth (2 bytes) */ - Stream_Read_UINT16(s, stream_bitmap_first->bitmapHeight); /* bitmapHeigth (2 bytes) */ -diff --git a/libfreerdp/core/surface.c b/libfreerdp/core/surface.c -index 7d0fb22..992a3dd 100644 ---- a/libfreerdp/core/surface.c -+++ b/libfreerdp/core/surface.c -@@ -38,6 +38,12 @@ static int update_recv_surfcmd_surface_bits(rdpUpdate* update, wStream* s, UINT3 - Stream_Read_UINT16(s, cmd->destRight); - Stream_Read_UINT16(s, cmd->destBottom); - Stream_Read_UINT8(s, cmd->bpp); -+ if ((cmd->bpp < 1) || (cmd->bpp > 32)) -+ { -+ fprintf(stderr, "%s: invalid bpp value %d", __FUNCTION__, cmd->bpp); -+ return FALSE; -+ } -+ - Stream_Seek(s, 2); /* reserved1, reserved2 */ - Stream_Read_UINT8(s, cmd->codecID); - Stream_Read_UINT16(s, cmd->width); -diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c -index c4eaede..27c36e3 100644 ---- a/libfreerdp/core/update.c -+++ b/libfreerdp/core/update.c -@@ -219,16 +219,32 @@ BOOL update_read_pointer_system(wStream* s, POINTER_SYSTEM_UPDATE* pointer_syste - return TRUE; - } - --BOOL update_read_pointer_color(wStream* s, POINTER_COLOR_UPDATE* pointer_color) -+BOOL update_read_pointer_color(wStream* s, POINTER_COLOR_UPDATE* pointer_color, int xorBpp) - { -+ BYTE *newMask; -+ int scanlineSize; -+ - if (Stream_GetRemainingLength(s) < 14) - return FALSE; - - Stream_Read_UINT16(s, pointer_color->cacheIndex); /* cacheIndex (2 bytes) */ - Stream_Read_UINT16(s, pointer_color->xPos); /* xPos (2 bytes) */ - Stream_Read_UINT16(s, pointer_color->yPos); /* yPos (2 bytes) */ -+ -+ /** -+ * As stated in 2.2.9.1.1.4.4 Color Pointer Update: -+ * The maximum allowed pointer width/height is 96 pixels if the client indicated support -+ * for large pointers by setting the LARGE_POINTER_FLAG (0x00000001) in the Large -+ * Pointer Capability Set (section 2.2.7.2.7). If the LARGE_POINTER_FLAG was not -+ * set, the maximum allowed pointer width/height is 32 pixels. -+ * -+ * So we check for a maximum of 96 for CVE-2014-0250. -+ */ - Stream_Read_UINT16(s, pointer_color->width); /* width (2 bytes) */ - Stream_Read_UINT16(s, pointer_color->height); /* height (2 bytes) */ -+ if ((pointer_color->width > 96) || (pointer_color->height > 96)) -+ return FALSE; -+ - Stream_Read_UINT16(s, pointer_color->lengthAndMask); /* lengthAndMask (2 bytes) */ - Stream_Read_UINT16(s, pointer_color->lengthXorMask); /* lengthXorMask (2 bytes) */ - -@@ -245,26 +261,65 @@ BOOL update_read_pointer_color(wStream* s, POINTER_COLOR_UPDATE* pointer_color) - - if (pointer_color->lengthXorMask > 0) - { -+ /** -+ * Spec states that: -+ * -+ * xorMaskData (variable): A variable-length array of bytes. Contains the 24-bpp, bottom-up -+ * XOR mask scan-line data. The XOR mask is padded to a 2-byte boundary for each encoded -+ * scan-line. For example, if a 3x3 pixel cursor is being sent, then each scan-line will consume 10 -+ * bytes (3 pixels per scan-line multiplied by 3 bytes per pixel, rounded up to the next even -+ * number of bytes). -+ * -+ * In fact instead of 24-bpp, the bpp parameter is given by the containing packet. -+ */ - if (Stream_GetRemainingLength(s) < pointer_color->lengthXorMask) - return FALSE; - -- if (!pointer_color->xorMaskData) -- pointer_color->xorMaskData = malloc(pointer_color->lengthXorMask); -- else -- pointer_color->xorMaskData = realloc(pointer_color->xorMaskData, pointer_color->lengthXorMask); -+ scanlineSize = (7 + xorBpp * pointer_color->width) / 8; -+ scanlineSize = ((scanlineSize + 1) / 2) * 2; -+ if (scanlineSize * pointer_color->height != pointer_color->lengthXorMask) -+ { -+ fprintf(stderr, "%s: invalid lengthXorMask: width=%d height=%d, %d instead of %d\n", __FUNCTION__, -+ pointer_color->width, pointer_color->height, -+ pointer_color->lengthXorMask, scanlineSize * pointer_color->height); -+ return FALSE; -+ } -+ -+ newMask = realloc(pointer_color->xorMaskData, pointer_color->lengthXorMask); -+ if (!newMask) -+ return FALSE; -+ -+ pointer_color->xorMaskData = newMask; - - Stream_Read(s, pointer_color->xorMaskData, pointer_color->lengthXorMask); - } - - if (pointer_color->lengthAndMask > 0) - { -+ /** -+ * andMaskData (variable): A variable-length array of bytes. Contains the 1-bpp, bottom-up -+ * AND mask scan-line data. The AND mask is padded to a 2-byte boundary for each encoded -+ * scan-line. For example, if a 7x7 pixel cursor is being sent, then each scan-line will consume 2 -+ * bytes (7 pixels per scan-line multiplied by 1 bpp, rounded up to the next even number of -+ * bytes). -+ */ - if (Stream_GetRemainingLength(s) < pointer_color->lengthAndMask) - return FALSE; - -- if (!pointer_color->andMaskData) -- pointer_color->andMaskData = malloc(pointer_color->lengthAndMask); -- else -- pointer_color->andMaskData = realloc(pointer_color->andMaskData, pointer_color->lengthAndMask); -+ scanlineSize = ((7 + pointer_color->width) / 8); -+ scanlineSize = ((1 + scanlineSize) / 2) * 2; -+ if (scanlineSize * pointer_color->height != pointer_color->lengthAndMask) -+ { -+ fprintf(stderr, "%s: invalid lengthAndMask: %d instead of %d\n", __FUNCTION__, -+ pointer_color->lengthAndMask, scanlineSize * pointer_color->height); -+ return FALSE; -+ } -+ -+ newMask = realloc(pointer_color->andMaskData, pointer_color->lengthAndMask); -+ if (!newMask) -+ return FALSE; -+ -+ pointer_color->andMaskData = newMask; - - Stream_Read(s, pointer_color->andMaskData, pointer_color->lengthAndMask); - } -@@ -281,7 +336,12 @@ BOOL update_read_pointer_new(wStream* s, POINTER_NEW_UPDATE* pointer_new) - return FALSE; - - Stream_Read_UINT16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */ -- return update_read_pointer_color(s, &pointer_new->colorPtrAttr); /* colorPtrAttr */ -+ if ((pointer_new->xorBpp < 1) || (pointer_new->xorBpp > 32)) -+ { -+ fprintf(stderr, "%s: invalid xorBpp %d\n", __FUNCTION__, pointer_new->xorBpp); -+ return FALSE; -+ } -+ return update_read_pointer_color(s, &pointer_new->colorPtrAttr, pointer_new->xorBpp); /* colorPtrAttr */ - } - - BOOL update_read_pointer_cached(wStream* s, POINTER_CACHED_UPDATE* pointer_cached) -@@ -320,7 +380,7 @@ BOOL update_recv_pointer(rdpUpdate* update, wStream* s) - break; - - case PTR_MSG_TYPE_COLOR: -- if (!update_read_pointer_color(s, &pointer->pointer_color)) -+ if (!update_read_pointer_color(s, &pointer->pointer_color, 24)) - return FALSE; - IFCALL(pointer->PointerColor, context, &pointer->pointer_color); - break; -diff --git a/libfreerdp/core/update.h b/libfreerdp/core/update.h -index c3088f2..d6c2d59 100644 ---- a/libfreerdp/core/update.h -+++ b/libfreerdp/core/update.h -@@ -53,7 +53,7 @@ BOOL update_recv(rdpUpdate* update, wStream* s); - - BOOL update_read_pointer_position(wStream* s, POINTER_POSITION_UPDATE* pointer_position); - BOOL update_read_pointer_system(wStream* s, POINTER_SYSTEM_UPDATE* pointer_system); --BOOL update_read_pointer_color(wStream* s, POINTER_COLOR_UPDATE* pointer_color); -+BOOL update_read_pointer_color(wStream* s, POINTER_COLOR_UPDATE* pointer_color, int xorBpp); - BOOL update_read_pointer_new(wStream* s, POINTER_NEW_UPDATE* pointer_new); - BOOL update_read_pointer_cached(wStream* s, POINTER_CACHED_UPDATE* pointer_cached); - -diff --git a/libfreerdp/core/window.c b/libfreerdp/core/window.c -index 7422f5b..c10fa33 100644 ---- a/libfreerdp/core/window.c -+++ b/libfreerdp/core/window.c -@@ -35,6 +35,11 @@ BOOL update_read_icon_info(wStream* s, ICON_INFO* icon_info) - Stream_Read_UINT16(s, icon_info->cacheEntry); /* cacheEntry (2 bytes) */ - Stream_Read_UINT8(s, icon_info->cacheId); /* cacheId (1 byte) */ - Stream_Read_UINT8(s, icon_info->bpp); /* bpp (1 byte) */ -+ if ((icon_info->bpp < 1) || (icon_info->bpp > 32)) -+ { -+ fprintf(stderr, "%s: invalid bpp %d\n", __FUNCTION__, icon_info->bpp); -+ return FALSE; -+ } - Stream_Read_UINT16(s, icon_info->width); /* width (2 bytes) */ - Stream_Read_UINT16(s, icon_info->height); /* height (2 bytes) */ - --- -1.9.3 - diff --git a/net-misc/freerdp/files/freerdp-1.1-cmake-3.1.patch b/net-misc/freerdp/files/freerdp-1.1-cmake-3.1.patch deleted file mode 100644 index aedfeb07a263..000000000000 --- a/net-misc/freerdp/files/freerdp-1.1-cmake-3.1.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 1b663ceffe51008af7ae9749e5b7999b2f7d6698 Mon Sep 17 00:00:00 2001 -From: Bernhard Miklautz <bernhard.miklautz@shacknet.at> -Date: Fri, 12 Dec 2014 18:26:45 +0100 -Subject: [PATCH] build: cmake 3.1 compatibility - -* fix problem with REMOVE_DUPLICATES on undefined lists -* since 3.1 file(GLOB FILEPATHS RELATIVE .. returns single / instead of // as - previously - necessary adoptions for regex and matches done. Should - work with all cmake versions. - -Tested with 3.1.0-rc3 ---- - channels/CMakeLists.txt | 4 ++-- - channels/client/CMakeLists.txt | 2 ++ - client/CMakeLists.txt | 4 ++-- - server/CMakeLists.txt | 4 ++-- - third-party/CMakeLists.txt | 6 +++--- - 5 files changed, 11 insertions(+), 9 deletions(-) - -diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt -index c4e6048..540b1ac 100644 ---- a/channels/CMakeLists.txt -+++ b/channels/CMakeLists.txt -@@ -253,8 +253,8 @@ set(FILENAME "ChannelOptions.cmake") - file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}") - - foreach(FILEPATH ${FILEPATHS}) -- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}") -- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" DIR ${FILEPATH}) -+ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}") -+ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" DIR ${FILEPATH}) - set(CHANNEL_OPTION) - include(${FILEPATH}) - if(${CHANNEL_OPTION}) -diff --git a/channels/client/CMakeLists.txt b/channels/client/CMakeLists.txt -index 049bc7b..2db18e8 100644 ---- a/channels/client/CMakeLists.txt -+++ b/channels/client/CMakeLists.txt -@@ -24,7 +24,9 @@ set(${MODULE_PREFIX}_SRCS - ${CMAKE_CURRENT_SOURCE_DIR}/addin.c - ${CMAKE_CURRENT_SOURCE_DIR}/addin.h) - -+if(CHANNEL_STATIC_CLIENT_ENTRIES) - list(REMOVE_DUPLICATES CHANNEL_STATIC_CLIENT_ENTRIES) -+endif() - - foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES}) - foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES}) -diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt -index 09b1fd4..610f35e 100644 ---- a/third-party/CMakeLists.txt -+++ b/third-party/CMakeLists.txt -@@ -22,11 +22,11 @@ - file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt") - - foreach(dir ${all_valid_subdirs}) -- if(${dir} MATCHES "^([^/]*)//CMakeLists.txt") -- string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir}) -+ if(${dir} MATCHES "^([^/]*)/+CMakeLists.txt") -+ string(REGEX REPLACE "^([^/]*)/+CMakeLists.txt" "\\1" dir_trimmed ${dir}) - message(STATUS "Adding third-party component ${dir_trimmed}") - add_subdirectory(${dir_trimmed}) - endif() - endforeach(dir) - --set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE) -\ No newline at end of file -+set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE) diff --git a/net-misc/freerdp/files/freerdp-1.1.0_beta1-avx.patch b/net-misc/freerdp/files/freerdp-1.1.0_beta1-avx.patch deleted file mode 100644 index 8a07e8a6d30d..000000000000 --- a/net-misc/freerdp/files/freerdp-1.1.0_beta1-avx.patch +++ /dev/null @@ -1,61 +0,0 @@ -commit 81580f10d910a8e88bc09c1fc692a2e14161ffa1 -Author: Bernhard Miklautz <bernhard.miklautz@shacknet.at> -Date: Thu Mar 14 23:18:21 2013 +0100 - - winpr/sysinfo: fixed build and detection when build with AVX - -diff --git a/winpr/libwinpr/sysinfo/sysinfo.c b/winpr/libwinpr/sysinfo/sysinfo.c -index 947dc24..59200cc 100644 ---- a/winpr/libwinpr/sysinfo/sysinfo.c -+++ b/winpr/libwinpr/sysinfo/sysinfo.c -@@ -662,32 +662,29 @@ BOOL IsProcessorFeaturePresentEx(DWORD ProcessorFeature) - case PF_EX_AVX_AES: - { - if ((c & C_BITS_AVX) != C_BITS_AVX) -- ret = FALSE; -+ break; - -- int e, f; -- xgetbv(0, e, f); -+ int e, f; -+ xgetbv(0, e, f); - -- if ((e & E_BITS_AVX) == E_BITS_AVX) -+ if ((e & E_BITS_AVX) == E_BITS_AVX) -+ { -+ switch (ProcessorFeature) - { -- switch (ProcessorFeature) -- { -- case: PF_EX_AVX: -- ret = TRUE; -- break; -- case: PF_EX_FMA: -- if (c & C_BIT_FMA) -- ret = TRUE; -- break; -- case: PF_EX_AVX_AES: -- if (c & C_BIT_AVX_AES) -- ret = TRUE; -- break; -- { -+ case PF_EX_AVX: - ret = TRUE; - break; -- } -- } -- } -+ case PF_EX_FMA: -+ if (c & C_BIT_FMA) -+ ret = TRUE; -+ break; -+ case PF_EX_AVX_AES: -+ if (c & C_BIT_AVX_AES) -+ ret = TRUE; -+ break; -+ } -+ } -+ } - break; - #endif //__AVX__ - default: diff --git a/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-cmake.patch b/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-cmake.patch deleted file mode 100644 index 4ab536a50572..000000000000 --- a/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-cmake.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a668a644889bd58405b92c72a91c308c2bad8022 Mon Sep 17 00:00:00 2001 -From: Bernhard Miklautz <bernhard.miklautz@thincast.com> -Date: Tue, 11 Nov 2014 14:40:31 +0100 -Subject: [PATCH] Don't include CMakeDetermineSystem - -According to [1] this is an cmake "internal" module and shouldn't be -included directly. - -[1] http://public.kitware.com/Bug/view.php?id=13796#c31892 ---- - CMakeLists.txt | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 79f17bd..5f6859c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -44,7 +44,6 @@ include(CheckCmakeCompat) - include(CheckIncludeFiles) - include(CheckLibraryExists) - include(CheckStructHasMember) --include(CMakeDetermineSystem) - include(FindPkgConfig) - include(TestBigEndian) - diff --git a/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-ffmpeg.patch b/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-ffmpeg.patch deleted file mode 100644 index 0e08c6043080..000000000000 --- a/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-ffmpeg.patch +++ /dev/null @@ -1,127 +0,0 @@ -From bf065f3e892e0a94e442de9a7155a7ac170f2add Mon Sep 17 00:00:00 2001 -From: eroen <eroen@falcon.eroen.eu> -Date: Thu, 21 Nov 2013 11:35:53 +0100 -Subject: [PATCH 1/3] ffmpeg-2 -- AVCODEC_MAX_AUDIO_FRAME_SIZE - -deprecated: -http://git.videolan.org/?p=ffmpeg.git;a=commit;h=0eea212943544d40f99b05571aa7159d78667154 - -broken with libavcodec 54 ---- - channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c -index adf8e04..0d5b956 100644 ---- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c -+++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c -@@ -43,6 +43,12 @@ - #define AVMEDIA_TYPE_AUDIO 1 - #endif - -+#if LIBAVCODEC_VERSION_MAJOR < 54 -+#define MAX_AUDIO_FRAME_SIZE AVCODEC_MAX_AUDIO_FRAME_SIZE -+#else -+#define MAX_AUDIO_FRAME_SIZE 192000 -+#endif -+ - typedef struct _TSMFFFmpegDecoder - { - ITSMFDecoder iface; -@@ -351,7 +357,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE* data, UI - #endif - - if (mdecoder->decoded_size_max == 0) -- mdecoder->decoded_size_max = AVCODEC_MAX_AUDIO_FRAME_SIZE + 16; -+ mdecoder->decoded_size_max = MAX_AUDIO_FRAME_SIZE + 16; - mdecoder->decoded_data = malloc(mdecoder->decoded_size_max); - ZeroMemory(mdecoder->decoded_data, mdecoder->decoded_size_max); - /* align the memory for SSE2 needs */ -@@ -363,7 +369,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE* data, UI - while (src_size > 0) - { - /* Ensure enough space for decoding */ -- if (mdecoder->decoded_size_max - mdecoder->decoded_size < AVCODEC_MAX_AUDIO_FRAME_SIZE) -+ if (mdecoder->decoded_size_max - mdecoder->decoded_size < MAX_AUDIO_FRAME_SIZE) - { - mdecoder->decoded_size_max = mdecoder->decoded_size_max * 2 + 16; - mdecoder->decoded_data = realloc(mdecoder->decoded_data, mdecoder->decoded_size_max); --- -1.8.4 - - -From cbcf0de3fac985afaeeef7daf104c94ad8cdca26 Mon Sep 17 00:00:00 2001 -From: eroen <eroen@falcon.eroen.eu> -Date: Thu, 21 Nov 2013 13:14:04 +0100 -Subject: [PATCH 2/3] ffmpeg-2 -- dsp_mask - -deprecated: -http://git.videolan.org/?p=ffmpeg.git;a=commit;h=95510be8c35753da8f48062b28b65e7acdab965f - -broken with libavcodec 55 ---- - channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c -index 0d5b956..1f99ec3 100644 ---- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c -+++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c -@@ -104,6 +104,7 @@ static BOOL tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_MED - mdecoder->codec_context->channels = media_type->Channels; - mdecoder->codec_context->block_align = media_type->BlockAlign; - -+#if LIBAVCODEC_VERSION_MAJOR < 55 - #ifdef AV_CPU_FLAG_SSE2 - mdecoder->codec_context->dsp_mask = AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2; - #else -@@ -113,6 +114,13 @@ static BOOL tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_MED - mdecoder->codec_context->dsp_mask = FF_MM_SSE2 | FF_MM_MMX2; - #endif - #endif -+#else /* LIBAVCODEC_VERSION_MAJOR < 55 */ -+#ifdef AV_CPU_FLAG_SSE2 -+ av_set_cpu_flags_mask(AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2); -+#else -+ av_set_cpu_flags_mask(FF_MM_SSE2 | FF_MM_MMX2); -+#endif -+#endif /* LIBAVCODEC_VERSION_MAJOR < 55 */ - - return TRUE; - } --- -1.8.4 - - -From 6fe23e1a3860528a8ecdfc8e9ccfdbd0e3945869 Mon Sep 17 00:00:00 2001 -From: eroen <eroen@falcon.eroen.eu> -Date: Thu, 21 Nov 2013 13:26:03 +0100 -Subject: [PATCH 3/3] ffmpeg-2 -- CodecID - -deprecated: -http://git.videolan.org/?p=ffmpeg.git;a=commit;h=104e10fb426f903ba9157fdbfe30292d0e4c3d72 - -broken with libavcodec 55 ---- - channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c -index 1f99ec3..09b4f68 100644 ---- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c -+++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c -@@ -54,7 +54,11 @@ - ITSMFDecoder iface; - - int media_type; -+#if LIBAVCODEC_VERSION_MAJOR < 55 - enum CodecID codec_id; -+#else -+ enum AVCodecID codec_id; -+#endif - AVCodecContext* codec_context; - AVCodec* codec; - AVFrame* frame; --- -1.8.4 - diff --git a/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-uclibc.patch b/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-uclibc.patch deleted file mode 100644 index f4f28b287028..000000000000 --- a/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-uclibc.patch +++ /dev/null @@ -1,66 +0,0 @@ -https://bugs.gentoo.org/show_bug.cgi?id=497808 -https://github.com/FreeRDP/FreeRDP/pull/2024 - ---- FreeRDP-780d451afad21a22d2af6bd030ee71311856f038/channels/drive/client/drive_file.c -+++ FreeRDP-780d451afad21a22d2af6bd030ee71311856f038-uclibc/channels/drive/client/drive_file.c -@@ -436,7 +436,11 @@ BOOL drive_file_set_information(DRIVE_FI - int status; - char* fullpath; - struct STAT st; -+#if defined(__linux__) && !defined(ANDROID) -+ struct timespec tv[2]; -+#else - struct timeval tv[2]; -+#endif - UINT64 LastWriteTime; - UINT32 FileAttributes; - UINT32 FileNameLength; -@@ -457,14 +461,21 @@ BOOL drive_file_set_information(DRIVE_FI - return FALSE; - - tv[0].tv_sec = st.st_atime; -- tv[0].tv_usec = 0; -- tv[1].tv_sec = (LastWriteTime > 0 ? FILE_TIME_RDP_TO_SYSTEM(LastWriteTime) : st.st_mtime); -- tv[1].tv_usec = 0; -+ tv[1].tv_sec = (LastWriteTime > 0 ? FILE_TIME_RDP_TO_SYSTEM(LastWriteTime) : st.st_mtime); -+ - #ifndef WIN32 --/* TODO on win32 */ -+/* TODO on win32 */ - #ifdef ANDROID -+ tv[0].tv_usec = 0; -+ tv[1].tv_usec = 0; - utimes(file->fullpath, tv); -+#elif defined (__linux__) -+ tv[0].tv_nsec = 0; -+ tv[1].tv_nsec = 0; -+ futimens(file->fd, tv); - #else -+ tv[0].tv_usec = 0; -+ tv[1].tv_usec = 0; - futimes(file->fd, tv); - #endif - ---- FreeRDP-780d451afad21a22d2af6bd030ee71311856f038/winpr/libwinpr/synch/event.c -+++ FreeRDP-780d451afad21a22d2af6bd030ee71311856f038-uclibc/winpr/libwinpr/synch/event.c -@@ -115,6 +115,20 @@ HANDLE OpenEventA(DWORD dwDesiredAccess, - return NULL; - } - -+#ifdef HAVE_EVENTFD_H -+#if defined(__UCLIBC__) -+static int eventfd_read(int fd, eventfd_t* value) -+{ -+ return (read(fd, value, sizeof(*value)) == sizeof(*value)) ? 0 : -1; -+} -+ -+static int eventfd_write(int fd, eventfd_t value) -+{ -+ return (write(fd, &value, sizeof(value)) == sizeof(value)) ? 0 : -1; -+} -+#endif -+#endif -+ - BOOL SetEvent(HANDLE hEvent) - { - ULONG Type; diff --git a/net-misc/freerdp/files/freerdp-cmake-3.1.patch b/net-misc/freerdp/files/freerdp-cmake-3.1.patch deleted file mode 100644 index 462fb56396f8..000000000000 --- a/net-misc/freerdp/files/freerdp-cmake-3.1.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 1b663ceffe51008af7ae9749e5b7999b2f7d6698 Mon Sep 17 00:00:00 2001 -From: Bernhard Miklautz <bernhard.miklautz@shacknet.at> -Date: Fri, 12 Dec 2014 18:26:45 +0100 -Subject: [PATCH] build: cmake 3.1 compatibility - -* fix problem with REMOVE_DUPLICATES on undefined lists -* since 3.1 file(GLOB FILEPATHS RELATIVE .. returns single / instead of // as - previously - necessary adoptions for regex and matches done. Should - work with all cmake versions. - -Tested with 3.1.0-rc3 ---- - channels/CMakeLists.txt | 4 ++-- - channels/client/CMakeLists.txt | 2 ++ - client/CMakeLists.txt | 4 ++-- - server/CMakeLists.txt | 4 ++-- - third-party/CMakeLists.txt | 6 +++--- - 5 files changed, 11 insertions(+), 9 deletions(-) - -diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt -index c4e6048..540b1ac 100644 ---- a/channels/CMakeLists.txt -+++ b/channels/CMakeLists.txt -@@ -253,8 +253,8 @@ set(FILENAME "ChannelOptions.cmake") - file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}") - - foreach(FILEPATH ${FILEPATHS}) -- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}") -- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" DIR ${FILEPATH}) -+ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}") -+ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" DIR ${FILEPATH}) - set(CHANNEL_OPTION) - include(${FILEPATH}) - if(${CHANNEL_OPTION}) -diff --git a/channels/client/CMakeLists.txt b/channels/client/CMakeLists.txt -index 049bc7b..2db18e8 100644 ---- a/channels/client/CMakeLists.txt -+++ b/channels/client/CMakeLists.txt -@@ -24,7 +24,9 @@ set(${MODULE_PREFIX}_SRCS - ${CMAKE_CURRENT_SOURCE_DIR}/addin.c - ${CMAKE_CURRENT_SOURCE_DIR}/addin.h) - -+if(CHANNEL_STATIC_CLIENT_ENTRIES) - list(REMOVE_DUPLICATES CHANNEL_STATIC_CLIENT_ENTRIES) -+endif() - - foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES}) - foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES}) -diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt -index 14ed363..b8b7699 100644 ---- a/client/CMakeLists.txt -+++ b/client/CMakeLists.txt -@@ -63,8 +63,8 @@ set(FILENAME "ModuleOptions.cmake") - file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}") - - foreach(FILEPATH ${FILEPATHS}) -- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}") -- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" FREERDP_CLIENT ${FILEPATH}) -+ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}") -+ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" FREERDP_CLIENT ${FILEPATH}) - set(FREERDP_CLIENT_ENABLED 0) - include(${FILEPATH}) - if(FREERDP_CLIENT_ENABLED) -diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt -index cda14ba..ee9458e 100644 ---- a/server/CMakeLists.txt -+++ b/server/CMakeLists.txt -@@ -48,8 +48,8 @@ set(FILENAME "ModuleOptions.cmake") - file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}") - - foreach(FILEPATH ${FILEPATHS}) -- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}") -- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" FREERDP_SERVER ${FILEPATH}) -+ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}") -+ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" FREERDP_SERVER ${FILEPATH}) - set(FREERDP_SERVER_ENABLED 0) - include(${FILEPATH}) - if(FREERDP_SERVER_ENABLED) -diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt -index 09b1fd4..610f35e 100644 ---- a/third-party/CMakeLists.txt -+++ b/third-party/CMakeLists.txt -@@ -22,11 +22,11 @@ - file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt") - - foreach(dir ${all_valid_subdirs}) -- if(${dir} MATCHES "^([^/]*)//CMakeLists.txt") -- string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir}) -+ if(${dir} MATCHES "^([^/]*)/+CMakeLists.txt") -+ string(REGEX REPLACE "^([^/]*)/+CMakeLists.txt" "\\1" dir_trimmed ${dir}) - message(STATUS "Adding third-party component ${dir_trimmed}") - add_subdirectory(${dir_trimmed}) - endif() - endforeach(dir) - --set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE) -\ No newline at end of file -+set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE) |