Merge pull request #603 from proski/x11rdp

Some good things extracted from the X11rdp MacOS port
This commit is contained in:
metalefty 2017-01-19 13:13:58 +09:00 committed by GitHub
commit c5e6eec12f
8 changed files with 69 additions and 27 deletions

View File

@ -0,0 +1,11 @@
--- a/src/mesa/x86-64/xform4.S
+++ b/src/mesa/x86-64/xform4.S
@@ -118,7 +118,7 @@
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
-.float 0f+1.0
+.float 1.0
.text
.align 16

View File

@ -25,15 +25,23 @@
download_all_files()
{
# download files parallelly using keepalive
# a little bit faster than calling wget with single file more than 100 times
< x11_file_list.txt cut -f1 -d: | sed -e "s|^|${download_url}/|" | \
# download files in parallel using keepalive - a little bit faster
# than calling wget for a single file more than 100 times
urls=
for f in `cut -f1 -d: x11_file_list.txt`; do
if ! test -s "downloads/$f"; then
urls="$urls ${download_url}/$f"
fi
done
if test -n "$urls"; then
echo $urls | \
xargs -P2 -n $(expr $num_modules / 2 + 1) \
wget \
--directory-prefix=downloads \
--no-verbose \
--timestamping \
--continue
fi
status=$?
return $status
@ -278,7 +286,7 @@ fi
# this will copy the build X server with the other X server binaries
cd rdp
cp X11rdp $X11RDPBASE/bin
cp X11rdp $X11RDPBASE/bin/X11rdp
strip $X11RDPBASE/bin/X11rdp
if [ "$2" = "drop" ]; then

View File

@ -0,0 +1,24 @@
diff -ur a/src/common_interface.c b/src/common_interface.c
--- a/src/common_interface.c
+++ b/src/common_interface.c
@@ -51,6 +51,20 @@
# define HTOLE_32(x) (x)
#endif /* linux */
+#elif defined(__GNUC__) || defined(__clang__)
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define LETOH_16(x) __builtin_bswap16(x)
+# define HTOLE_16(x) __builtin_bswap16(x)
+# define LETOH_32(x) __builtin_bswap32(x)
+# define HTOLE_32(x) __builtin_bswap32(x)
+#else
+# define LETOH_16(x) (x)
+# define HTOLE_16(x) (x)
+# define LETOH_32(x) (x)
+# define HTOLE_32(x) (x)
+#endif /* gcc or clang */
+
#elif defined(__sun)
#include <sys/byteorder.h>

View File

@ -0,0 +1,11 @@
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -89,7 +89,7 @@ _mm_mulhi_pu16 (__m64 __A, __m64 __B)
return __A;
}
-# ifdef __OPTIMIZE__
+# if defined(__OPTIMIZE__) && !defined(__clang__)
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_shuffle_pi16 (__m64 __A, int8_t const __N)
{

View File

@ -49,20 +49,12 @@ LLIBS = -Wl,-rpath=$(LIBBASE) -lfreetype -lz -lm -lXfont -lXau \
-lXdmcp -lpixman-1 -lrt -ldl -lcrypto -lGL -lXdamage
CFLAGS = -g -O2 -Wall -fno-strength-reduce \
-I../../include \
-I../../cfb \
-I../../mfb \
-I../../mi \
-I$(INCBASE) \
-I$(INCBASE)/X11 \
-I$(INCBASE)/X11/fonts \
-I$(INCBASE)/X11/extensions \
-I$(INCBASE)/xorg \
-I$(INCBASE)/pixman-1 \
-I../../os \
-I../../render \
-I../xfree86/common \
-I../xfree86/os-support \
-I../../../common \
-D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_REENTRANT \
-DGLX_USE_MESA -DXRECORD -D_GNU_SOURCE -DXAPPGROUP \

View File

@ -76,20 +76,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//#include "colormapst.h"
/* test to see if this is xorg source or xfree86 */
#ifdef XORGSERVER
# define RDP_IS_XORG
#else
# include <xf86Version.h>
# if (XF86_VERSION_MAJOR == 4 && XF86_VERSION_MINOR > 3)
# define RDP_IS_XFREE86
# elif (XF86_VERSION_MAJOR > 4)
# define RDP_IS_XFREE86
# else
# define RDP_IS_XORG
# endif
#endif
#define X11RDPVER "0.9.1"
#define PixelDPI 100

View File

@ -58,8 +58,8 @@ mkfontdir-1.0.6.tar.bz2 : mkfontdir-1.0.6
mkfontscale-1.0.8.tar.bz2 : mkfontscale-1.0.8 :
xkbcomp-1.2.0.tar.bz2 : xkbcomp-1.2.0 :
xdriinfo-1.0.4.tar.bz2 : xdriinfo-1.0.4 :
xorg-server-1.9.3.tar.bz2 : xorg-server-1.9.3 : --with-sha1=libcrypto --disable-dmx --without-dtrace
applewmproto-1.4.1.tar.bz2 : applewmproto-1.4.1 :
xorg-server-1.9.3.tar.bz2 : xorg-server-1.9.3 : --with-fontrootdir=$PREFIX_DIR/share/fonts/X11 --with-sha1=libcrypto --disable-dmx --without-dtrace
bdftopcf-1.0.3.tar.bz2 : bdftopcf-1.0.3 :
intltool-0.41.1.tar.gz : intltool-0.41.1 :
xkeyboard-config-2.0.tar.bz2 : xkeyboard-config-2.0 :

View File

@ -0,0 +1,10 @@
--- a/configure
+++ b/configure
@@ -21551,6 +21551,7 @@
if test "x$with_sha1" = xlibcrypto; then
if test "x$HAVE_LIBCRYPTO" = xyes; then
SHA1_LIBS=-lcrypto
+ SHA1_CFLAGS="$OPENSSL_CFLAGS"
else
SHA1_LIBS="$OPENSSL_LIBS"
SHA1_CFLAGS="$OPENSSL_CFLAGS"