From owner-svn-ports-all@freebsd.org Mon Mar 28 23:41:47 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B9E0AE0199; Mon, 28 Mar 2016 23:41:47 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC4DC18EB; Mon, 28 Mar 2016 23:41:46 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2SNfkds064808; Mon, 28 Mar 2016 23:41:46 GMT (envelope-from cpm@FreeBSD.org) Received: (from cpm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2SNfjkK064803; Mon, 28 Mar 2016 23:41:45 GMT (envelope-from cpm@FreeBSD.org) Message-Id: <201603282341.u2SNfjkK064803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cpm set sender to cpm@FreeBSD.org using -f From: "Carlos J. Puga Medina" Date: Mon, 28 Mar 2016 23:41:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r412077 - in head: multimedia/mpv security/libgcrypt security/libgcrypt/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 23:41:47 -0000 Author: cpm Date: Mon Mar 28 23:41:45 2016 New Revision: 412077 URL: https://svnweb.freebsd.org/changeset/ports/412077 Log: - cipher/salsa20.c (selftest): Ensure 16-byte alignment for salsa20 context structure. - mpi/longlong.h: Fix build on sparc. PR: 206919 Approved by: junovitch (mentor) Added: head/security/libgcrypt/files/patch-cipher_salsa20.c (contents, props changed) head/security/libgcrypt/files/patch-mpi_longlong.h (contents, props changed) Deleted: head/security/libgcrypt/files/patch-cipher-Makefile.in Modified: head/multimedia/mpv/Makefile head/security/libgcrypt/Makefile Modified: head/multimedia/mpv/Makefile ============================================================================== --- head/multimedia/mpv/Makefile Mon Mar 28 23:05:43 2016 (r412076) +++ head/multimedia/mpv/Makefile Mon Mar 28 23:41:45 2016 (r412077) @@ -4,6 +4,7 @@ PORTNAME= mpv PORTVERSION= 0.16.0 DISTVERSIONPREFIX= v +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= multimedia audio @@ -44,7 +45,7 @@ OPTIONS_DEFAULT= ASS DVDREAD DVDNAV ENCA OPTIONS_GROUP= IN VO AO OPTIONS_GROUP_IN= CDIO DVDREAD DVDNAV LIBBLURAY V4L YTDL SMB OPTIONS_GROUP_VO= CACA OPENGL VAAPI VDPAU X11 XINERAMA -OPTIONS_GROUP_AO= ALSA JACK PULSEAUDIO +OPTIONS_GROUP_AO= ALSA JACK PULSEAUDIO SDL OPTIONS_SUB= yes ASS_DESC= ASS/SSA subtitle and OSD rendering @@ -104,6 +105,10 @@ OPENGL_IMPLIES= X11 PULSEAUDIO_LIB_DEPENDS= libpulse.so:${PORTSDIR}/audio/pulseaudio PULSEAUDIO_CONFIGURE_OFF= --disable-pulse +SDL_USE= SDL=sdl2 +SDL_CONFIGURE_ON= --enable-sdl2 +SDL_CONFIGURE_OFF= --disable-sdl2 + SMB_LIB_DEPENDS= libsmbclient.so:${PORTSDIR}/net/samba-libsmbclient SMB_CONFIGURE_OFF= --disable-libsmbclient @@ -135,11 +140,6 @@ ZSH_CONFIGURE_ENABLE= zsh-comp .include -# Fix crash on i386 -.if ${ARCH} == "i386" -CFLAGS:= ${CFLAGS:N-O*} -O0 -.endif - post-patch: @${REINPLACE_CMD} -e 's|/pkgconfig/mpv.pc|data/pkgconfig/mpv.pc|g' \ ${WRKSRC}/wscript_build.py Modified: head/security/libgcrypt/Makefile ============================================================================== --- head/security/libgcrypt/Makefile Mon Mar 28 23:05:43 2016 (r412076) +++ head/security/libgcrypt/Makefile Mon Mar 28 23:41:45 2016 (r412077) @@ -2,6 +2,7 @@ PORTNAME= libgcrypt PORTVERSION= 1.6.5 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= GNUPG @@ -40,11 +41,6 @@ post-patch: ${RM} -f ${WRKSRC}/doc/gcrypt.info* ${REINPLACE_CMD} -e 's|ALIGN (3)|ALIGN (2)|g' ${WRKSRC}/mpi/i386/*.S -# Fix crash at cipher/salsa20.c module on amd64 -.if ${ARCH} == "amd64" && exists(/usr/bin/clang) -CFLAGS:= ${CFLAGS:N-O*} -O2 -.endif - post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}.so Added: head/security/libgcrypt/files/patch-cipher_salsa20.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/libgcrypt/files/patch-cipher_salsa20.c Mon Mar 28 23:41:45 2016 (r412077) @@ -0,0 +1,62 @@ +--- cipher/salsa20.c.orig 2016-03-23 16:34:00 UTC ++++ cipher/salsa20.c +@@ -485,7 +485,8 @@ salsa20r12_encrypt_stream (void *context + static const char* + selftest (void) + { +- SALSA20_context_t ctx; ++ byte ctxbuf[sizeof(SALSA20_context_t) + 15]; ++ SALSA20_context_t *ctx; + byte scratch[8+1]; + byte buf[256+64+4]; + int i; +@@ -502,32 +503,35 @@ selftest (void) + static const byte ciphertext_1[] = + { 0xE3, 0xBE, 0x8F, 0xDD, 0x8B, 0xEC, 0xA2, 0xE3}; + +- salsa20_setkey (&ctx, key_1, sizeof key_1); +- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1); ++ /* 16-byte alignment required for amd64 implementation. */ ++ ctx = (SALSA20_context_t *)((uintptr_t)(ctxbuf + 15) & ~(uintptr_t)15); ++ ++ salsa20_setkey (ctx, key_1, sizeof key_1); ++ salsa20_setiv (ctx, nonce_1, sizeof nonce_1); + scratch[8] = 0; +- salsa20_encrypt_stream (&ctx, scratch, plaintext_1, sizeof plaintext_1); ++ salsa20_encrypt_stream (ctx, scratch, plaintext_1, sizeof plaintext_1); + if (memcmp (scratch, ciphertext_1, sizeof ciphertext_1)) + return "Salsa20 encryption test 1 failed."; + if (scratch[8]) + return "Salsa20 wrote too much."; +- salsa20_setkey( &ctx, key_1, sizeof(key_1)); +- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1); +- salsa20_encrypt_stream (&ctx, scratch, scratch, sizeof plaintext_1); ++ salsa20_setkey( ctx, key_1, sizeof(key_1)); ++ salsa20_setiv (ctx, nonce_1, sizeof nonce_1); ++ salsa20_encrypt_stream (ctx, scratch, scratch, sizeof plaintext_1); + if (memcmp (scratch, plaintext_1, sizeof plaintext_1)) + return "Salsa20 decryption test 1 failed."; + + for (i = 0; i < sizeof buf; i++) + buf[i] = i; +- salsa20_setkey (&ctx, key_1, sizeof key_1); +- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1); ++ salsa20_setkey (ctx, key_1, sizeof key_1); ++ salsa20_setiv (ctx, nonce_1, sizeof nonce_1); + /*encrypt*/ +- salsa20_encrypt_stream (&ctx, buf, buf, sizeof buf); ++ salsa20_encrypt_stream (ctx, buf, buf, sizeof buf); + /*decrypt*/ +- salsa20_setkey (&ctx, key_1, sizeof key_1); +- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1); +- salsa20_encrypt_stream (&ctx, buf, buf, 1); +- salsa20_encrypt_stream (&ctx, buf+1, buf+1, (sizeof buf)-1-1); +- salsa20_encrypt_stream (&ctx, buf+(sizeof buf)-1, buf+(sizeof buf)-1, 1); ++ salsa20_setkey (ctx, key_1, sizeof key_1); ++ salsa20_setiv (ctx, nonce_1, sizeof nonce_1); ++ salsa20_encrypt_stream (ctx, buf, buf, 1); ++ salsa20_encrypt_stream (ctx, buf+1, buf+1, (sizeof buf)-1-1); ++ salsa20_encrypt_stream (ctx, buf+(sizeof buf)-1, buf+(sizeof buf)-1, 1); + for (i = 0; i < sizeof buf; i++) + if (buf[i] != (byte)i) + return "Salsa20 encryption test 2 failed."; Added: head/security/libgcrypt/files/patch-mpi_longlong.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/libgcrypt/files/patch-mpi_longlong.h Mon Mar 28 23:41:45 2016 (r412077) @@ -0,0 +1,27 @@ +--- mpi/longlong.h.orig 2016-03-23 17:33:08 UTC ++++ mpi/longlong.h +@@ -170,6 +170,7 @@ MA 02111-1307, USA. */ + (pl) = __m0 * __m1; \ + } while (0) + #define UMUL_TIME 46 ++#if 0 + #ifndef LONGLONG_STANDALONE + #define udiv_qrnnd(q, r, n1, n0, d) \ + do { UDItype __r; \ +@@ -179,6 +180,7 @@ MA 02111-1307, USA. */ + extern UDItype __udiv_qrnnd (); + #define UDIV_TIME 220 + #endif /* LONGLONG_STANDALONE */ ++#endif /* 0 */ + #endif /* __alpha */ + + /*************************************** +@@ -1287,7 +1289,7 @@ typedef unsigned int UTItype __attribute + "rJ" ((USItype)(al)), \ + "rI" ((USItype)(bl)) \ + __CLOBBER_CC) +-#if defined (__sparc_v8__) || defined(__sparcv8) ++#if defined (__sparc_v8__) || defined(__sparcv8) || defined (__sparc__) + /* Don't match immediate range because, 1) it is not often useful, + 2) the 'I' flag thinks of the range as a 13 bit signed interval, + while we want to match a 13 bit interval, sign extended to 32 bits,