diff options
Diffstat (limited to 'media-libs/freeglut')
-rw-r--r-- | media-libs/freeglut/Manifest | 3 | ||||
-rw-r--r-- | media-libs/freeglut/files/3.2.2-Fix-aliasing-violation.patch | 65 | ||||
-rw-r--r-- | media-libs/freeglut/freeglut-3.2.2.ebuild | 4 |
3 files changed, 71 insertions, 1 deletions
diff --git a/media-libs/freeglut/Manifest b/media-libs/freeglut/Manifest index e1c9c4feda64..f2dab21dcb45 100644 --- a/media-libs/freeglut/Manifest +++ b/media-libs/freeglut/Manifest @@ -1,3 +1,4 @@ +AUX 3.2.2-Fix-aliasing-violation.patch 2746 BLAKE2B 37dbcfbebaf7609fd292305b7fdca72439a834b5ca8b525af9a577921851de183a7906fc7d053fcf1fd8616f653fe8ce52a9044cc9c053d68bce83ba0df629fb SHA512 9f56d78528c32218e649243388c63673a2859421029011fcb098a8a792e871532c586924d30ab79a324aa32a9778108ad0499d79ef8663e9fb03d00a8f9b9c45 DIST freeglut-3.2.2.tar.gz 397203 BLAKE2B e4151d9bd984504edb02fadf2983c750c1c81557f3467c01d4202d34e9e082a62f07d373908d3517f9b3fd3253b7b409f882cfe2187d4ff1787f3cdc09eecfe4 SHA512 190231951d314f854c244bd27f7c20488403bd0eecffc342097a2e3d1621cec87f6c209a77b4c153aabcf44697b4070227930e295ab74fb88953cbbf94fc81d9 -EBUILD freeglut-3.2.2.ebuild 1418 BLAKE2B ba39423769e8625cd765175e57cdae6988a4a7940f732cc3c61281af47a010d0c5fa72f6c716bf12683e7638610ed2ab29d10f4342ac9a5bed6a45dfff082b50 SHA512 df7ba88f571cb1f2a5563213f579b3dde1b969d62c5f36bd318f1baf04815c9071e8a4baf6aa658c18dafda90a3efea51a43264951b5dc881b8d4637ff43d55c +EBUILD freeglut-3.2.2.ebuild 1481 BLAKE2B d00c6ca7cdb69f3dd3d740a1e32c6737812ac01e254d9f7917453181d5950254072af4b0f470d4c52cc6f913ac1095b6ac4669d487864961afa868a2fbc5e7d4 SHA512 0a2cc714348e75f781d30d2d48efe54a089716dc28f939e8eaa9935d2c5dd0b2d9d6ee99b19aedecf715848ceaf010383eab18a6910939291f4f29048b75830c MISC metadata.xml 529 BLAKE2B ef8eb49e76fa342486804eb88393b0b80710761c9255e8971f99cd40a41cdfa7ac4734d66a2d2b285d9493ae9b6c56706235749f4958985e15bb22796a81908b SHA512 fe290b4e32aaecbc3f604adf0ef295d8fb1e9a2dee4fd4c3b61a56a82e4d6c4395cb6b6e4e91a6c196d632cf65102539d8f91dd7556ab7d63e539866d83dc8e5 diff --git a/media-libs/freeglut/files/3.2.2-Fix-aliasing-violation.patch b/media-libs/freeglut/files/3.2.2-Fix-aliasing-violation.patch new file mode 100644 index 000000000000..d6544578bcf1 --- /dev/null +++ b/media-libs/freeglut/files/3.2.2-Fix-aliasing-violation.patch @@ -0,0 +1,65 @@ +https://bugs.gentoo.org/859847 + +From 8c6f6bf3ad2fd33d15de6ee96175cd29bf804d9f Mon Sep 17 00:00:00 2001 +From: Matt Turner <mattst88@gmail.com> +Date: Tue, 26 Jul 2022 15:47:02 -0400 +Subject: [PATCH] Fix aliasing violation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Noticed when compiling with link-time optimizations. + +include/GL/freeglut_std.h:240:18: error: type of ‘glutBitmapHelvetica18’ does not match original declaration [-Werror=lto-type-mismatch] + 240 | extern void* glutBitmapHelvetica18; + | ^ +src/x11/fg_glutfont_definitions_x11.c:103:27: note: ‘glutBitmapHelvetica18’ was previously declared here + 103 | struct freeglutBitmapFont glutBitmapHelvetica18 ; + | ^ +src/x11/fg_glutfont_definitions_x11.c:103:27: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used +--- + src/x11/fg_glutfont_definitions_x11.c | 29 ++++++++++++++++++--------- + 1 file changed, 20 insertions(+), 9 deletions(-) + +diff --git a/src/x11/fg_glutfont_definitions_x11.c b/src/x11/fg_glutfont_definitions_x11.c +index bec20371..d086a990 100644 +--- a/src/x11/fg_glutfont_definitions_x11.c ++++ b/src/x11/fg_glutfont_definitions_x11.c +@@ -91,14 +91,25 @@ struct freeglutBitmapFont + }; + + +-struct freeglutStrokeFont glutStrokeRoman ; +-struct freeglutStrokeFont glutStrokeMonoRoman ; ++static struct freeglutStrokeFont glutStrokeRoman_ ; ++static struct freeglutStrokeFont glutStrokeMonoRoman_ ; + +-struct freeglutBitmapFont glutBitmap9By15 ; +-struct freeglutBitmapFont glutBitmap8By13 ; +-struct freeglutBitmapFont glutBitmapTimesRoman10 ; +-struct freeglutBitmapFont glutBitmapTimesRoman24 ; +-struct freeglutBitmapFont glutBitmapHelvetica10 ; +-struct freeglutBitmapFont glutBitmapHelvetica12 ; +-struct freeglutBitmapFont glutBitmapHelvetica18 ; ++static struct freeglutBitmapFont glutBitmap9By15_ ; ++static struct freeglutBitmapFont glutBitmap8By13_ ; ++static struct freeglutBitmapFont glutBitmapTimesRoman10_ ; ++static struct freeglutBitmapFont glutBitmapTimesRoman24_ ; ++static struct freeglutBitmapFont glutBitmapHelvetica10_ ; ++static struct freeglutBitmapFont glutBitmapHelvetica12_ ; ++static struct freeglutBitmapFont glutBitmapHelvetica18_ ; + ++ ++void *glutStrokeRoman = &glutStrokeRoman_ ; ++void *glutStrokeMonoRoman = &glutStrokeMonoRoman_ ; ++ ++void *glutBitmap9By15 = &glutBitmap9By15_ ; ++void *glutBitmap8By13 = &glutBitmap8By13_ ; ++void *glutBitmapTimesRoman10 = &glutBitmapTimesRoman10_ ; ++void *glutBitmapTimesRoman24 = &glutBitmapTimesRoman24_ ; ++void *glutBitmapHelvetica10 = &glutBitmapHelvetica10_ ; ++void *glutBitmapHelvetica12 = &glutBitmapHelvetica12_ ; ++void *glutBitmapHelvetica18 = &glutBitmapHelvetica18_ ; +-- +2.35.1 + diff --git a/media-libs/freeglut/freeglut-3.2.2.ebuild b/media-libs/freeglut/freeglut-3.2.2.ebuild index d8fb60843cac..0a46c30d469d 100644 --- a/media-libs/freeglut/freeglut-3.2.2.ebuild +++ b/media-libs/freeglut/freeglut-3.2.2.ebuild @@ -28,6 +28,10 @@ DEPEND="${RDEPEND} x11-base/xorg-proto" BDEPEND="virtual/pkgconfig" +PATCHES=( + "${FILESDIR}"/${PV}-Fix-aliasing-violation.patch +) + src_configure() { local mycmakeargs=( # "-DOpenGL_GL_PREFERENCE=GLVND" # bug 721006 |