added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
SUMMARY = "C++ bindings for Cairo graphics library"
LICENSE = "LGPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9"
GNOMEBASEBUILDCLASS = "meson"
inherit gnomebase
DEPENDS += "boost cairo libsigc++-3"
SRC_URI = "https://www.cairographics.org/releases/cairomm-${PV}.tar.xz"
SRC_URI[sha256sum] = "6a63bf98a97dda2b0f55e34d1b5f3fb909ef8b70f9b8d382cb1ff3978e7dc13f"
S = "${WORKDIR}/cairomm-${PV}"
FILES:${PN}-doc += "${datadir}/devhelp"
FILES:${PN}-dev += "${libdir}/cairomm-*/"

View File

@@ -0,0 +1,16 @@
SUMMARY = "C++ bindings for Cairo graphics library"
LICENSE = "LGPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9"
GNOMEBASEBUILDCLASS = "meson"
inherit gnomebase
DEPENDS += "boost cairo libsigc++-2.0"
SRC_URI = "https://www.cairographics.org/releases/${BP}.tar.xz"
SRC_URI[sha256sum] = "0d37e067c5c4ca7808b7ceddabfe1932c5bd2a750ad64fb321e1213536297e78"
FILES:${PN}-doc += "${datadir}/devhelp"
FILES:${PN}-dev += "${libdir}/cairomm-*/"

View File

@@ -0,0 +1,25 @@
SUMMARY = "OpenGL Mathematics Library for C"
DESCRIPTION = "Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C`. \
cglm provides lot of utils to help math operations to be fast and quick to write. It is community \
friendly, feel free to bring any issues, bugs you faced."
HOMEPAGE = "https://github.com/recp/cglm"
BUGTRACKER = "https://github.com/recp/cglm/issues"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8dc95c4110ba741c43832734b51b7de7"
SRC_URI = "git://github.com/recp/cglm;branch=master;protocol=https"
# Tag v0.8.5
SRCREV = "c51040cd4139b628fba2a0e6751ad4aecbc0c81a"
S = "${WORKDIR}/git"
PACKAGECONFIG[build_tests] = "-Dbuild_tests=true,-Dbuild_tests=false,"
PACKAGECONFIG ?= ""
inherit meson pkgconfig
EXTRA_OEMESON += "--buildtype release"
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,28 @@
From 65e8e3c9c69f41778b6308c2f8f3262c82c6f3e1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 29 Jun 2017 13:57:53 -0700
Subject: [PATCH] configure.ac: Do not demand linker hash-style
This helps fixing on architectures e.g. mips where gnu hash
is not supported
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 1 -
1 file changed, 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index e1dba23..7bcc039 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,7 +65,6 @@ CC_CHECK_CFLAGS_APPEND([ \
-ffunction-sections \
-fdata-sections \
-Wl,-O1 \
- -Wl,--hash-style=gnu \
-Wl,--as-needed \
-Wl,--gc-sections])
--
2.13.2

View File

@@ -0,0 +1,22 @@
SUMMARY = "Simple bootsplash for systemd systems"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
# Really, no depends besides a C library
PV = "0.3"
PR = "r1"
SRCREV = "ef2e1a390e768e21e6a6268977580ee129a96633"
SRC_URI = "git://github.com/lucasdemarchi/dietsplash.git;branch=master;protocol=https \
file://0001-configure.ac-Do-not-demand-linker-hash-style.patch \
"
inherit autotools
S = "${WORKDIR}/git"
EXTRA_OECONF = " --with-systemdsystemunitdir=${systemd_unitdir}/system \
--disable-staticimages --with-rootdir=${root_prefix}"
FILES:${PN} += "${systemd_unitdir}/system/"

View File

@@ -0,0 +1,39 @@
From 85a30903ea3ba4232379bbbcb54960307d5a2da0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 2 Sep 2022 18:49:03 -0700
Subject: [PATCH] spacedream: Add typecast to pthread_t in assignment
render_loop_thread is of type pthread_t, therefore -1 which is int can
not be assigned to it. Do the needed typecast conversion
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/spacedream/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/spacedream/main.c b/src/spacedream/main.c
index 430800f..8e1887c 100644
--- a/src/spacedream/main.c
+++ b/src/spacedream/main.c
@@ -205,7 +205,7 @@ void unload_stars()
int main( int argc, char *argv[] )
{
int quit = 0;
- pthread_t render_loop_thread = -1;
+ pthread_t render_loop_thread = (pthread_t)-1;
IDirectFBSurface *primary;
IDirectFBEventBuffer *buffer;
@@ -344,7 +344,7 @@ int main( int argc, char *argv[] )
pthread_cancel( render_loop_thread );
pthread_mutex_unlock( &render_start );
pthread_join( render_loop_thread, NULL );
- render_loop_thread = -1;
+ render_loop_thread = (pthread_t)-1;
unload_stars();
--
2.37.3

View File

@@ -0,0 +1,28 @@
From 88077ed156a714f32bb408f422278d61611ffd41 Mon Sep 17 00:00:00 2001
From: Otavio Salvador <otavio@ossystems.com.br>
Date: Sat, 26 Jul 2014 16:57:46 -0300
Subject: [PATCH] configure.in: Fix string argument syntax
Upstream-Status: Submitted
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.in b/configure.in
index bfe1b82..e939bbd 100644
--- a/configure.in
+++ b/configure.in
@@ -65,7 +65,7 @@ fi)
DIRECTFB_REQUIRED_VERSION=1.4.14
-PKG_CHECK_MODULES(DIRECTFB, directfb >= $DIRECTFB_REQUIRED_VERSION,[ WATER=`$PKG_CONFIG --variable=water directfb` ],
+PKG_CHECK_MODULES([DIRECTFB], directfb >= $DIRECTFB_REQUIRED_VERSION,[ WATER=`$PKG_CONFIG --variable=water directfb` ],
AC_MSG_ERROR([$DIRECTFB_PKG_ERRORS
*** DirectFB $DIRECTFB_REQUIRED_VERSION or newer is required. The latest version
*** of DirectFB is available from http://www.directfb.org/.]))
--
1.7.10.4

View File

@@ -0,0 +1,22 @@
SUMMARY = "Example DirectFB applications"
DESCRIPTION = "The DirectFB-examples package contains a set of simple DirectFB \
applications that can be used to test and demonstrate various DirectFB \
features"
DEPENDS = "directfb"
SECTION = "libs"
LICENSE = "MIT"
SRC_URI = " \
http://downloads.yoctoproject.org/mirror/sources/DirectFB-examples-${PV}.tar.gz \
file://configure.in-Fix-string-argument-syntax.patch \
file://0001-spacedream-Add-typecast-to-pthread_t-in-assignment.patch \
"
LIC_FILES_CHKSUM = "file://COPYING;md5=ecf6fd2b19915afc4da56043926ca18f"
S = "${WORKDIR}/DirectFB-examples-${PV}"
inherit autotools pkgconfig
SRC_URI[md5sum] = "8b60c867af295481c32a8c7fc5802307"
SRC_URI[sha256sum] = "9a2104cc4da8123c8371813551b66b943198979f745cbebc034bb5e10844122a"

View File

@@ -0,0 +1,90 @@
SUMMARY = "Graphics abstraction library for the Linux Framebuffer Device"
DESCRIPTION = "DirectFB is a thin library that provides developers \
with hardware graphics acceleration, input device handling and \
abstraction, an integrated windowing system with support for \
translucent windows and multiple display layers on top of the \
Linux framebuffer device."
SECTION = "libs"
LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=dcf3c825659e82539645da41a7908589"
HOMEPAGE = "http://directfb.org"
DEPENDS = "jpeg libpng freetype zlib sysfsutils"
SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/DirectFB-${PV}.tar.gz \
file://configurefix.patch \
file://fusion.patch \
file://bashism.patch \
file://0001-gfx-direct-Aboid-usng-VLAs-and-printf-formats.patch \
file://compar_fn_t.patch \
file://union-sigval.patch \
file://use-PTHREAD_MUTEX_RECURSIVE.patch \
file://fix-client-gfx_state-initialisation.patch \
file://fix-tslib-version-check.patch \
file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
file://0001-os-linux-Fix-build-when-__NR_futex-is-not-available.patch \
"
S = "${WORKDIR}/DirectFB-${PV}"
LDFLAGS:append = " -lm"
CXXFLAGS:append:toolchain-clang = " -Wno-error=dtor-typedef"
# Workaround for linking issues seen with armv7a + gold
LDFLAGS:append:arm = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
BINCONFIG = "${bindir}/directfb-config"
inherit autotools binconfig-disabled pkgconfig
PACKAGECONFIG ??= "linuxinput"
PACKAGECONFIG[jpeg2000] = "--enable-jpeg2000,--disable-jpeg2000,jasper"
PACKAGECONFIG[drmkms] = "--enable-drmkms,--disable-drmkms,libdrm"
PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
PACKAGECONFIG[tslib] = "--with-inputdrivers=tslib,,tslib"
PACKAGECONFIG[linuxinput] = "--with-inputdrivers=linuxinput,,"
PACKAGECONFIG[noinput] = "--with-inputdrivers=none,,"
PACKAGECONFIG[mesa] = "--enable-mesa,--disable-mesa,virtual/mesa,"
PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,xserver-xorg,"
EXTRA_OECONF = "\
--with-gfxdrivers=none \
--enable-freetype=yes \
--enable-zlib \
--disable-imlib2 \
--disable-sdl \
--disable-vnc \
--disable-x11vdpau \
--disable-xine-vdpau \
"
#Once -fno-omit-frame-pointer option of gcc is added into TARGET_CLFAGS as default
#this will cause directfb build failure on x86 arch, so filter out it.
TARGET_CFLAGS:remove:x86 = "-fno-omit-frame-pointer"
#PACKAGES_DYNAMIC += "^directfb-inputdrivers-.*"
#
#python populate_packages:prepend () {
# inputdrivers_libdir = d.expand('${libdir}/directfb-${RV}/inputdrivers')
# do_split_packages(d, inputdrivers_libdir, '*.so$', 'directfb-inputdrivers-%s', 'Directfb plugin for %s')
#}
# NOTE: monolithic packaging for now, should improve that eventually
FILES:${PN}-dev += "\
${bindir}/directfb-config \
${libdir}/directfb-${RV}/systems/*.la \
${libdir}/directfb-${RV}/inputdrivers/*.la \
${libdir}/directfb-${RV}/interfaces/*/*.la \
${libdir}/directfb-${RV}/wm/*.la \
"
FILES:${PN} += "\
${libdir}/directfb-${RV}/systems/*.so \
${libdir}/directfb-${RV}/inputdrivers/*.so \
${libdir}/directfb-${RV}/interfaces/*/*.so \
${libdir}/directfb-${RV}/wm/*.so \
${datadir}/directfb-${PV} \
"

View File

@@ -0,0 +1,139 @@
From 0b66557f2e924023b12006b58d8e86149c745aed Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Nov 2019 20:34:33 -0800
Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
time element is deprecated on new input_event structure in kernel's
input.h [1]
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
inputdrivers/linux_input/linux_input.c | 36 ++++++++++++++++++--------
1 file changed, 25 insertions(+), 11 deletions(-)
diff --git a/inputdrivers/linux_input/linux_input.c b/inputdrivers/linux_input/linux_input.c
index 7e9a6ad..03deebc 100644
--- a/inputdrivers/linux_input/linux_input.c
+++ b/inputdrivers/linux_input/linux_input.c
@@ -42,6 +42,11 @@ typedef unsigned long kernel_ulong_t;
#include <linux/input.h>
+#ifndef input_event_sec
+#define input_event_sec time.tv_sec
+#define input_event_usec time.tv_usec
+#endif
+
#ifndef KEY_OK
/* Linux kernel 2.5.42+ defines additional keys in linux/input.h */
#include "input_fake.h"
@@ -754,7 +759,8 @@ translate_event( const LinuxInputData *data,
DFBInputEvent *devt )
{
devt->flags = DIEF_TIMESTAMP;
- devt->timestamp = levt->time;
+ devt->timestamp.tv_sec = levt->input_event_sec;
+ devt->timestamp.tv_usec = levt->input_event_usec;
switch (levt->type) {
case EV_KEY:
@@ -2139,7 +2145,8 @@ touchpad_translate( struct touchpad_fsm_state *state,
int abs, rel;
devt->flags = DIEF_TIMESTAMP | (dfb_config->linux_input_touch_abs ? DIEF_AXISABS : DIEF_AXISREL);
- devt->timestamp = levt->time;
+ devt->timestamp.tv_sec = levt->input_event_sec;
+ devt->timestamp.tv_usec = levt->input_event_usec;
devt->type = DIET_AXISMOTION;
switch (levt->code) {
@@ -2204,7 +2211,7 @@ touchpad_fsm( struct touchpad_fsm_state *state,
DFBInputEvent *devt )
{
struct timeval timeout = { 0, 125000 };
-
+ struct timeval tval;
/* select() timeout? */
if (!levt) {
/* Check if button release is due. */
@@ -2223,6 +2230,8 @@ touchpad_fsm( struct touchpad_fsm_state *state,
return 0;
}
+ tval.tv_sec = levt->input_event_sec;
+ tval.tv_usec = levt->input_event_usec;
/* More or less ignore these events for now */
if ((levt->type == EV_SYN && levt->code == SYN_REPORT) ||
(levt->type == EV_ABS && levt->code == ABS_PRESSURE) ||
@@ -2233,7 +2242,7 @@ touchpad_fsm( struct touchpad_fsm_state *state,
/* Check if button release is due. */
if (state->fsm_state == TOUCHPAD_FSM_DRAG_START &&
- timeout_passed( &state->timeout, &levt->time )) {
+ timeout_passed( &state->timeout, &tval )) {
devt->flags = DIEF_TIMESTAMP;
devt->timestamp = state->timeout; /* timeout of levt->time? */
devt->type = DIET_BUTTONRELEASE;
@@ -2255,7 +2264,8 @@ touchpad_fsm( struct touchpad_fsm_state *state,
case TOUCHPAD_FSM_START:
if (touchpad_finger_landing( levt )) {
state->fsm_state = TOUCHPAD_FSM_MAIN;
- state->timeout = levt->time;
+ state->timeout.tv_sec = levt->input_event_sec;
+ state->timeout.tv_usec = levt->input_event_usec;
timeout_add( &state->timeout, &timeout );
}
return 0;
@@ -2268,15 +2278,17 @@ touchpad_fsm( struct touchpad_fsm_state *state,
}
}
else if (touchpad_finger_leaving( levt )) {
- if (!timeout_passed( &state->timeout, &levt->time )) {
+ if (!timeout_passed( &state->timeout, &tval )) {
devt->flags = DIEF_TIMESTAMP;
- devt->timestamp = levt->time;
+ devt->timestamp.tv_sec = levt->input_event_sec;
+ devt->timestamp.tv_usec = levt->input_event_usec;
devt->type = DIET_BUTTONPRESS;
devt->button = DIBI_FIRST;
touchpad_fsm_init( state );
state->fsm_state = TOUCHPAD_FSM_DRAG_START;
- state->timeout = levt->time;
+ state->timeout.tv_sec = levt->input_event_sec;
+ state->timeout.tv_usec = levt->input_event_usec;
timeout_add( &state->timeout, &timeout );
return 1;
}
@@ -2287,7 +2299,7 @@ touchpad_fsm( struct touchpad_fsm_state *state,
return 0;
case TOUCHPAD_FSM_DRAG_START:
- if (timeout_passed( &state->timeout, &levt->time )){
+ if (timeout_passed( &state->timeout, &tval )){
devt->flags = DIEF_TIMESTAMP;
devt->timestamp = state->timeout; /* timeout of levt->time? */
devt->type = DIET_BUTTONRELEASE;
@@ -2299,7 +2311,8 @@ touchpad_fsm( struct touchpad_fsm_state *state,
else {
if (touchpad_finger_landing( levt )) {
state->fsm_state = TOUCHPAD_FSM_DRAG_MAIN;
- state->timeout = levt->time;
+ state->timeout.tv_sec = levt->input_event_sec;
+ state->timeout.tv_usec = levt->input_event_usec;
timeout_add( &state->timeout, &timeout );
}
}
@@ -2314,7 +2327,8 @@ touchpad_fsm( struct touchpad_fsm_state *state,
}
else if (touchpad_finger_leaving( levt )) {
devt->flags = DIEF_TIMESTAMP;
- devt->timestamp = levt->time;
+ devt->timestamp.tv_sec = levt->input_event_sec;
+ devt->timestamp.tv_usec = levt->input_event_usec;
devt->type = DIET_BUTTONRELEASE;
devt->button = DIBI_FIRST;

View File

@@ -0,0 +1,61 @@
From f43ef44806ffb8e3b35d99070dde9b6cc1714d3d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 8 Sep 2015 21:32:20 +0000
Subject: [PATCH] gfx,direct: Aboid usng VLAs and printf formats
VLAs are flagged by clang when using non-POD types, therefore replace
the usage with alloca which is exact same allocation on stack
__attribute__((__format__ (__printf__))) is not portable as used here
therefore disable the check for clang here, we lose no functionality
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
lib/direct/util.h | 2 +-
src/gfx/util.cpp | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/direct/util.h b/lib/direct/util.h
index 72941e9..8e7fa4a 100644
--- a/lib/direct/util.h
+++ b/lib/direct/util.h
@@ -98,7 +98,7 @@
#define D_CONST_FUNC
#endif
-#if __GNUC__ >= 3
+#if __GNUC__ >= 3 && !defined __clang__
#define D_FORMAT_PRINTF(n) __attribute__((__format__ (__printf__, n, n+1)))
#define D_FORMAT_VPRINTF(n) __attribute__((__format__ (__printf__, n, 0)))
#else
diff --git a/src/gfx/util.cpp b/src/gfx/util.cpp
index 40032bc..d1015d4 100644
--- a/src/gfx/util.cpp
+++ b/src/gfx/util.cpp
@@ -294,8 +294,8 @@ dfb_gfx_copy_regions_stereo( CoreSurface *source,
{
unsigned int i, n = 0;
DFBRectangle rect = { 0, 0, source->config.size.w, source->config.size.h };
- DFBRectangle rects[num];
- DFBPoint points[num];
+ DFBRectangle *rects = (DFBRectangle*)alloca( sizeof(struct DFBRectangle) * num);
+ DFBPoint *points = (DFBPoint*)alloca( sizeof(struct DFBPoint) * num);
for (i=0; i<num; i++) {
DFB_REGION_ASSERT( &regions[i] );
@@ -351,8 +351,8 @@ dfb_gfx_copy_regions_client( CoreSurface *source,
{
unsigned int i, n = 0;
DFBRectangle rect = { 0, 0, source->config.size.w, source->config.size.h };
- DFBRectangle rects[num];
- DFBPoint points[num];
+ DFBRectangle *rects = (DFBRectangle*)alloca( sizeof(struct DFBRectangle) * num);
+ DFBPoint *points = (DFBPoint*)alloca( sizeof(struct DFBPoint) * num);
CoreGraphicsStateClient *client = _client ? _client : &StateClient::Get()->client;
CardState *state = client->state;
CardState backup;
--
2.5.1

View File

@@ -0,0 +1,54 @@
From 7df69c3a784ab2cc4770bdb366cf788cdb78099a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 15 Nov 2020 12:30:41 -0800
Subject: [PATCH] os/linux: Fix build when __NR_futex is not available
Newer architectures like riscv32 do not define __NR_futex intentionally
since it uses 64bit time_t from very beginning, therefore only caters to
futex_time64 syscall
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
lib/direct/os/linux/glibc/system.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/direct/os/linux/glibc/system.c b/lib/direct/os/linux/glibc/system.c
index 373a711..d027a70 100644
--- a/lib/direct/os/linux/glibc/system.c
+++ b/lib/direct/os/linux/glibc/system.c
@@ -36,6 +36,7 @@
#include <errno.h>
#include <signal.h>
+#include <sys/syscall.h>
#include <unistd.h>
#include <linux/unistd.h>
@@ -46,6 +47,10 @@
#include <direct/system.h>
#include <direct/util.h>
+#if !defined(SYS_futex) && defined(SYS_futex_time64)
+# define SYS_futex SYS_futex_time64
+#endif
+
D_LOG_DOMAIN( Direct_Futex, "Direct/Futex", "Direct Futex" );
D_LOG_DOMAIN( Direct_Trap, "Direct/Trap", "Direct Trap" );
@@ -239,10 +244,9 @@ direct_futex( int *uaddr, int op, int val, const struct timespec *timeout, int *
}
#endif
- ret = syscall( __NR_futex, uaddr, op, val, timeout, uaddr2, val3 );
+ ret = syscall( SYS_futex, uaddr, op, val, timeout, uaddr2, val3 );
if (ret < 0)
return errno2result( errno );
return DR_OK;
}
-
--
2.29.2

View File

@@ -0,0 +1,18 @@
${x//y/} is a bash syntax. Replace with something dash compatible
RP 2015/5/3
Upstream-Status: Pending
Index: DirectFB-1.7.7/configure.in
===================================================================
--- DirectFB-1.7.7.orig/configure.in
+++ DirectFB-1.7.7/configure.in
@@ -2696,7 +2696,7 @@ AM_CONDITIONAL(BUILD_TOOLS, test "$with_
AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes")
CFLAGS="$CFLAGS $DFB_INTERNAL_CFLAGS"
-CXXFLAGS="$CXXFLAGS ${CFLAGS//-Werror-implicit-function-declaration/}"
+CXXFLAGS="$CXXFLAGS $(printf '%s\n' "$CFLAGS" | sed 's/-Werror-implicit-function-declaration//g')"
DFB_LDFLAGS="$LDFLAGS $ZLIB_LIBS"
CFLAGS="$CFLAGS $CFLAGS_STD"

View File

@@ -0,0 +1,62 @@
test for __compar_fn_t and if not defined by libc then define it
help make directfb compile with musl
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: DirectFB-1.7.7/configure.in
===================================================================
--- DirectFB-1.7.7.orig/configure.in
+++ DirectFB-1.7.7/configure.in
@@ -112,6 +112,17 @@ AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_FUNCS(fork)
+AC_CACHE_CHECK([for compar_fn_t in stdlib.h],ccache_cv_COMPAR_FN_T, [
+ AC_TRY_COMPILE(
+ [#include <stdlib.h>],
+ [void test_fn(void) { qsort(NULL, 0, 0, (__compar_fn_t)NULL); }],
+ ccache_cv_COMPAR_FN_T=yes,
+ ccache_cv_COMPAR_FN_T=no)])
+if test x"$ccache_cv_COMPAR_FN_T" = x"yes"; then
+ AC_DEFINE(HAVE_COMPAR_FN_T, 1,
+ Define to 1 if you have the `__compar_fn_t' typedef.)
+fi
+
AC_PATH_PROGS(PERL, perl5 perl)
AC_PATH_PROG(MAN2HTML, man2html, no)
Index: DirectFB-1.7.7/inputdrivers/lirc/lirc.c
===================================================================
--- DirectFB-1.7.7.orig/inputdrivers/lirc/lirc.c
+++ DirectFB-1.7.7/inputdrivers/lirc/lirc.c
@@ -59,6 +59,11 @@
#include <core/input_driver.h>
+#if HAVE_COMPAR_FN_T
+#define COMPAR_FN_T __compar_fn_t
+#else
+typedef int (*COMPAR_FN_T)(const void *, const void *);
+#endif
DFB_INPUT_DRIVER( lirc )
@@ -97,7 +102,7 @@ static DFBInputDeviceKeySymbol lirc_pars
qsort ( keynames,
D_ARRAY_SIZE( keynames ),
sizeof(keynames[0]),
- (__compar_fn_t) keynames_sort_compare );
+ (COMPAR_FN_T) keynames_sort_compare );
keynames_sorted = true;
}
@@ -124,7 +129,7 @@ static DFBInputDeviceKeySymbol lirc_pars
symbol_name = bsearch( name, keynames,
D_ARRAY_SIZE( keynames ),
sizeof(keynames[0]),
- (__compar_fn_t) keynames_compare );
+ (COMPAR_FN_T) keynames_compare );
if (symbol_name)
return symbol_name->symbol;
break;

View File

@@ -0,0 +1,60 @@
Libtool needs these set correctly else we end up with pointless rpaths
such as the QA warnings:
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfblayer contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbmaster contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/mkdgifft contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbdump contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbinput contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbfx contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/pack ages-split/directfb/usr/bin/dfbscreen contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/mkdgiff contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbinspector contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/mkdfiff contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbinfo contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbpenmount contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbg contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/libfusion-1.4.so.6 contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/libdirectfb-1.4.so.6.0.9 contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/libdirectfb-1.4.so.6 contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/libfusion-1.4.so.6.0.9 contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/systems/libdirectfb_fbdev.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/systems/libdirectfb_devmem.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/systems/libdirectfb_dummy.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBVideoProvider/libidirectfbvideoprovider_v4l.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBVideoProvider/libidirectfbvideoprovider_gif.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/ICoreResourceManager/libicoreresourcemanager_test.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_jpeg.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_png.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_dfiff.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_gif.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBFont/libidirectfbfont_ft2.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBFont/libidirectfbfont_dgiff.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/wm/libdirectfbwm_default.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_zytronic.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_penmount.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_linux_input.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_serialmouse.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_mutouch.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_tslib.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_joystick.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_sonypi.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_lirc.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_wm97xx_ts.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_ps2mouse.so contains probably-redundant RPATH /usr/lib
WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_keyboard.so contains probably-redundant RPATH /usr/lib
Upstream-Status: Pending
RP 2012/03/16
Index: DirectFB-1.4.15/configure.in
===================================================================
--- DirectFB-1.4.15.orig/configure.in 2012-03-16 13:32:23.692402879 +0000
+++ DirectFB-1.4.15/configure.in 2012-03-16 13:33:22.312400960 +0000
@@ -97,13 +97,6 @@
AC_CHECK_SIZEOF(long long)
AC_CHECK_FUNCS(fork)
-
-## Work around libstuhl during cross build...
-if test "$host" != "$build"; then
- sys_lib_dlsearch_path_spec=""
- sys_lib_search_path_spec=""
-fi
-
AC_PATH_PROGS(PERL, perl5 perl)
AC_PATH_PROG(MAN2HTML, man2html, no)

View File

@@ -0,0 +1,38 @@
From 8e53c0b9cedb62b82e2b7680d793d433b647ae20 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Mon, 13 Jun 2016 13:32:44 -0700
Subject: [PATCH] fix client->gfx_state initialisation
Shortly before the DirectFB 1.7.7 release, an optimisation was added
to CoreGraphicsStateClient_Init() to avoid creating an extended
Graphics State object if it will not later be required:
4d422fb Client: Create extended Graphics State object when needed for later usage
Unfortunately the client->gfx_state variable used to track the
extended Graphics State object is not initialised, which can lead to
crashes etc due to creation of the Graphics State object erroneously
being skipped.
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
src/core/CoreGraphicsStateClient.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/core/CoreGraphicsStateClient.cpp b/src/core/CoreGraphicsStateClient.cpp
index 5d46f0e..5007755 100644
--- a/src/core/CoreGraphicsStateClient.cpp
+++ b/src/core/CoreGraphicsStateClient.cpp
@@ -364,6 +364,7 @@ CoreGraphicsStateClient_Init( CoreGraphicsStateClient *client,
client->renderer = NULL;
client->requestor = NULL;
client->throttle = NULL;
+ client->gfx_state = NULL;
if (dfb_config->task_manager) {
if (dfb_config->call_nodirect) {
--
1.9.1

View File

@@ -0,0 +1,38 @@
fix tslib version check in configure.in
The patch makes sure that the old as well as the new tslib pkg-config
metadata file naming style is handled correctly.
tslib 0.0 to 1.0 created only a tslib-<VERSION>.pc pkg-config metadata
file.
With tslib 1.1 the tslib-<VERSION>.pc phase out was started.
Additionally, the pkg-config metadata file tslib.pc was added.
Since tslib 1.6 the tslib-<VERSION>.pc metadata file is deprecated.
Now, there is only a tslib.pc.
Upstream-Status: Inappropriate [no upstream]
Signed-off-by: Ben Guan <ben.guan@cn.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
diff -Nru DirectFB-1.7.7.orig/configure.in DirectFB-1.7.7/configure.in
--- DirectFB-1.7.7.orig/configure.in 2015-02-10 01:16:46.000000000 +0800
+++ DirectFB-1.7.7/configure.in 2018-06-06 17:19:18.472143103 +0800
@@ -2459,10 +2459,13 @@
enable_tslib=no
if test "$checkfor_tslib" = "yes"; then
- PKG_CHECK_MODULES([TSLIB], [tslib-1.0 >= 1.0.0], [enable_tslib=yes], [enable_tslib=no])
+ PKG_CHECK_MODULES([TSLIB], [tslib >= 1.1], [enable_tslib=yes], [enable_tslib=no])
if test "$enable_tslib" = "no"; then
- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [enable_tslib=yes], [enable_tslib=no
- AC_MSG_WARN([*** no tslib -- tslib driver will not be built.])])
+ PKG_CHECK_MODULES([TSLIB], [tslib-1.0 >= 1.0], [enable_tslib=yes], [enable_tslib=no])
+ if test "$enable_tslib" = "no"; then
+ PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [enable_tslib=yes], [enable_tslib=no
+ AC_MSG_WARN([*** no tslib -- tslib driver will not be built.])])
+ fi
fi
fi

View File

@@ -0,0 +1,36 @@
directfb: Fix for hangs in direct_test, fusion_skirmish on exit
Upstream-Status: Pending
Signed-off-by: Lauren Post <lauren.post@freescale.com>
--- a/lib/fusion/fusion.c 2013-01-18 22:57:11.000000000 +0800
+++ b/lib/fusion/fusion.c 2013-07-04 10:42:56.502699119 +0800
@@ -2853,9 +2853,14 @@
direct_mutex_lock( &world->event_dispatcher_mutex );
while (1) {
- if (!world->event_dispatcher_buffers)
+ if (!world->event_dispatcher_buffers){
direct_waitqueue_wait( &world->event_dispatcher_cond, &world->event_dispatcher_mutex );
-
+ if (world->dispatch_stop) {
+ D_DEBUG_AT( Fusion_Main_Dispatch, " -> IGNORING (dispatch_stop!)\n" );
+ direct_mutex_unlock( &world->event_dispatcher_mutex );
+ return NULL;
+ }
+ }
buf = (FusionEventDispatcherBuffer *)world->event_dispatcher_buffers;
D_MAGIC_ASSERT( buf, FusionEventDispatcherBuffer );
@@ -2872,6 +2877,11 @@
//D_INFO("waiting...\n");
D_ASSERT( buf->read_pos == buf->write_pos );
direct_waitqueue_wait( &world->event_dispatcher_cond, &world->event_dispatcher_mutex );
+ if (world->dispatch_stop) {
+ D_DEBUG_AT( Fusion_Main_Dispatch, " -> IGNORING (dispatch_stop!)\n" );
+ direct_mutex_unlock( &world->event_dispatcher_mutex );
+ return NULL;
+ }
}
buf = (FusionEventDispatcherBuffer *)world->event_dispatcher_buffers;

View File

@@ -0,0 +1,19 @@
This patch is taken from gentoo musl overlay
sigval_t is glibc only construct, we use a union of sigval
which pretty much is same effect as sigval_t
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
diff -Naur DirectFB-1.7.6.orig/lib/direct/os/linux/glibc/system.c DirectFB-1.7.6/lib/direct/os/linux/glibc/system.c
--- DirectFB-1.7.6.orig/lib/direct/os/linux/glibc/system.c 2014-07-15 02:54:58.000000000 -0400
+++ DirectFB-1.7.6/lib/direct/os/linux/glibc/system.c 2015-07-18 16:55:35.077989166 -0400
@@ -111,7 +111,7 @@
void
direct_trap( const char *domain, int sig )
{
- sigval_t val;
+ union sigval val;
if (direct_config->delay_trap_ms) {
D_LOG( Direct_Trap, VERBOSE, "NOT RAISING signal %d from %s, waiting for %dms... attach gdb --pid=%d\n", sig, domain, direct_config->delay_trap_ms, getpid() );

View File

@@ -0,0 +1,116 @@
Remove use of DIRECT_RECURSIVE_MUTEX_INITIALIZER its not portable
use portable way to initialize recursive mutex using pthread_once() and direct_recursive_mutex_init()
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: DirectFB-1.7.7/lib/direct/os/linux/glibc/mutex.h
===================================================================
--- DirectFB-1.7.7.orig/lib/direct/os/linux/glibc/mutex.h
+++ DirectFB-1.7.7/lib/direct/os/linux/glibc/mutex.h
@@ -46,7 +46,6 @@ struct __D_DirectMutex {
/**********************************************************************************************************************/
#define DIRECT_MUTEX_INITIALIZER(name) { PTHREAD_MUTEX_INITIALIZER }
-#define DIRECT_RECURSIVE_MUTEX_INITIALIZER(name) { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP }
#endif
Index: DirectFB-1.7.7/lib/direct/trace.c
===================================================================
--- DirectFB-1.7.7.orig/lib/direct/trace.c
+++ DirectFB-1.7.7/lib/direct/trace.c
@@ -89,8 +89,15 @@ struct __D_DirectTraceBuffer {
/**************************************************************************************************/
static DirectLink *buffers;
-static DirectMutex buffers_lock = DIRECT_RECURSIVE_MUTEX_INITIALIZER(buffers_lock);
+static pthread_once_t buffers_lock_init_once = PTHREAD_ONCE_INIT;
+static DirectMutex buffers_lock;
+
+static void
+buffers_lock_init( void )
+{
+ direct_recursive_mutex_init(&buffers_lock);
+}
/**************************************************************************************************/
__dfb_no_instrument_function__
@@ -113,6 +120,7 @@ get_trace_buffer( void )
D_MAGIC_SET( buffer, DirectTraceBuffer );
+ pthread_once(&buffers_lock_init_once, buffers_lock_init);
direct_mutex_lock( &buffers_lock );
direct_list_append( &buffers, &buffer->link );
direct_mutex_unlock( &buffers_lock );
@@ -138,8 +146,14 @@ typedef struct {
} SymbolTable;
static DirectLink *tables = NULL;
-static DirectMutex tables_lock = DIRECT_RECURSIVE_MUTEX_INITIALIZER(tables_lock);
+static pthread_once_t tables_lock_init_once = PTHREAD_ONCE_INIT;
+static DirectMutex tables_lock;
+static void
+tables_lock_init( void )
+{
+ direct_recursive_mutex_init(&tabless_lock);
+}
__dfb_no_instrument_function__
static void
@@ -370,6 +384,7 @@ direct_trace_lookup_symbol( const char *
Symbol *symbol;
SymbolTable *table;
+ pthread_once(&tables_lock_init_once, tables_lock_init);
direct_mutex_lock( &tables_lock );
table = find_table( filename );
@@ -514,6 +529,7 @@ direct_trace_print_stacks()
DirectTraceBuffer *b;
DirectTraceBuffer *buffer = get_trace_buffer();
+ pthread_once(&buffers_lock_init_once, buffers_lock_init);
direct_mutex_lock( &buffers_lock );
if (buffer && buffer->level)
@@ -611,6 +627,7 @@ direct_trace_free_buffer( DirectTraceBuf
D_MAGIC_ASSERT( buffer, DirectTraceBuffer );
if (buffer->thread) {
+ pthread_once(&buffers_lock_init_once, buffers_lock_init);
direct_mutex_lock( &buffers_lock );
direct_list_remove( &buffers, &buffer->link );
direct_mutex_unlock( &buffers_lock );
Index: DirectFB-1.7.7/src/directfb.c
===================================================================
--- DirectFB-1.7.7.orig/src/directfb.c
+++ DirectFB-1.7.7/src/directfb.c
@@ -99,6 +99,15 @@ const unsigned int directfb_micro_versio
const unsigned int directfb_binary_age = DIRECTFB_BINARY_AGE;
const unsigned int directfb_interface_age = DIRECTFB_INTERFACE_AGE;
+static pthread_once_t lock_init_once = PTHREAD_ONCE_INIT;
+static DirectMutex lock;
+
+static void
+lock_init( void )
+{
+ direct_recursive_mutex_init(&lock);
+}
+
const char *
DirectFBCheckVersion( unsigned int required_major,
unsigned int required_minor,
@@ -215,8 +224,7 @@ DirectFBCreate( IDirectFB **interface_pt
if (dfb_config->remote.host)
return CreateRemote( dfb_config->remote.host, dfb_config->remote.port, interface_ptr );
- static DirectMutex lock = DIRECT_RECURSIVE_MUTEX_INITIALIZER(lock);
-
+ pthread_once(&lock_init_once, lock_init);
direct_mutex_lock( &lock );
if (!dfb_config->no_singleton && idirectfb_singleton) {

View File

@@ -0,0 +1,8 @@
require directfb.inc
RV = "1.7-7"
LEAD_SONAME = "libdirectfb-1.7.so.0"
SRC_URI[md5sum] = "152cf1863b1a3a28aa1370e9053440bf"
SRC_URI[sha256sum] = "b785c638dc31b8fe3a7c81be1475c89b2255ab3d67b777c747d3fbc52f8027a3"

View File

@@ -0,0 +1,26 @@
From 80179c297abb9de2829bd02356257241dd414d70 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Mon, 18 Dec 2017 16:25:54 +0900
Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python.
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 230c87b..e699e83 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ else(SPHINX_EXECUTABLE STREQUAL "SPHINX_EXECUTABLE-NOTFOUND")
message(STATUS "Found sphinx-build: ${SPHINX_EXECUTABLE}")
endif(SPHINX_EXECUTABLE STREQUAL "SPHINX_EXECUTABLE-NOTFOUND")
-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(), end='')" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+#execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(), end='')" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
string(REGEX REPLACE "\n$" "" ${PYTHON_INSTALL_DIR} "${PYTHON_INSTALL_DIR}")
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write('%s.%s' % (sys.version_info.major, sys.version_info.minor))" OUTPUT_VARIABLE PYTHON_MAJOR_DOT_MINOR_VERSION)
message(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
--
2.17.1

View File

@@ -0,0 +1,32 @@
From 56d9b838b3475729d7ed9c6c156d72c28943c2b6 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Tue, 19 Dec 2017 11:15:29 +0900
Subject: [PATCH] To fix error when do_package
QA Issue: nativesdk-dnfdragora: Files/directories were installed but not
shipped in any package:
/etc
/etc/dnfdragora
/etc/dnfdragora/dnfdragora.yaml
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 230c87b..1b8d800 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,7 +68,7 @@ endif(ENABLE_COMPS)
set(CMAKE_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
set(CMAKE_INSTALL_DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share")
set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
-set(CMAKE_INSTALL_FULL_SYSCONFDIR "/etc" CACHE PATH "sysconfig directory (default /etc)")
+set(CMAKE_INSTALL_FULL_SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/../etc" CACHE PATH "sysconfig directory (default /etc)")
# Configure files
configure_file(${CMAKE_SOURCE_DIR}/etc/dnfdragora.yaml.in ${CMAKE_BINARY_DIR}/etc/dnfdragora.yaml @ONLY)
--
2.17.1

View File

@@ -0,0 +1,25 @@
From 2e6a0db24be373a5b7741dc5a0d322a28389fbf0 Mon Sep 17 00:00:00 2001
From: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Date: Thu, 23 Nov 2017 16:35:44 +0900
Subject: [PATCH] disable build manpages.
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
---
CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 230c87b..1624998 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,7 +81,6 @@ endif(GETTEXT_FOUND)
# Build and install the man-pages
if(NOT SPHINX_EXECUTABLE STREQUAL "SPHINX_EXECUTABLE-NOTFOUND")
- add_subdirectory(man)
endif(NOT SPHINX_EXECUTABLE STREQUAL "SPHINX_EXECUTABLE-NOTFOUND")
# Installing application code
--
2.17.1

View File

@@ -0,0 +1,31 @@
SUMMARY = "dnfdragora is a DNF frontend, based on rpmdragora from Mageia (originally rpmdrake) Perl code."
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504 \
"
SRC_URI = "git://github.com/manatools/dnfdragora.git;branch=master;protocol=https \
file://0001-disable-build-manpages.patch \
file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
file://0001-To-fix-error-when-do_package.patch \
"
SRCREV = "e38e1127e56f5c7cc38e22c6dd4c2728fc4f0b3c"
S = "${WORKDIR}/git"
inherit cmake gettext pkgconfig python3-dir python3native setuptools3-base mime-xdg
DEPENDS += "dnf python3 "
#DEPENDS:class-nativesdk += "nativesdk-python3"
RDEPENDS:${PN}:class-target = " python3-core libyui libyui-ncurses "
# manpages generation requires http://www.sphinx-doc.org/
EXTRA_OECMAKE = " -DWITH_MAN=OFF -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
BBCLASSEXTEND = "nativesdk"
FILES:${PN} = "${PYTHON_SITEPACKAGES_DIR}/ ${datadir}/ ${bindir}/ ${sysconfdir}/dnfdragora ${sysconfdir}/xdg"
SKIP_RECIPE[dnfdragora] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"

View File

@@ -0,0 +1,16 @@
SUMMARY = "FBGrab is a framebuffer screenshot program"
HOMEPAGE = "https://github.com/GunnarMonell/fbgrab"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a"
SECTION = "console/utils"
DEPENDS = "libpng zlib"
SRC_URI = "git://github.com/GunnarMonell/fbgrab.git;protocol=https;branch=master"
SRCREV = "f43ce6d5ce48fb01360eaa7c4a92c2573a1d02f8"
S = "${WORKDIR}/git"
inherit autotools-brokensep
do_configure:prepend() {
sed -i 's|$(DESTDIR)/usr/man/|$(DESTDIR)${mandir}/|g' ${S}/Makefile
}

View File

@@ -0,0 +1,80 @@
SUMMARY = "Framebuffer image and doc viewer tools"
DESCRIPTION = "The fbida project contains a few applications for viewing and editing images, \
with the main focus being photos."
HOMEPAGE = "http://linux.bytesex.org/fbida/"
AUTHOR = "Gerd Hoffmann"
SECTION = "utils"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=e8feb78a32950a909621bbb51f634b39"
DEPENDS = "virtual/libiconv jpeg fontconfig freetype libexif libdrm pixman poppler libepoxy cairo"
SRC_URI = "https://www.kraxel.org/releases/fbida/fbida-${PV}.tar.gz \
file://0001-Avoid-using-host-path.patch \
file://fix-preprocessor.patch \
file://support-jpeg-turbo.patch \
file://cairo-weak-detect.patch \
file://fbida-gcc10.patch \
"
SRC_URI[sha256sum] = "95b7c01556cb6ef9819f358b314ddfeb8a4cbe862b521a3ed62f03d163154438"
inherit pkgconfig features_check
# Depends on libepoxy
REQUIRED_DISTRO_FEATURES = "opengl"
EXTRA_OEMAKE = "STRIP= 'srcdir=${S}' -f ${S}/GNUmakefile"
PACKAGECONFIG ??= "gif png curl"
PACKAGECONFIG[curl] = ",,curl"
PACKAGECONFIG[gif] = ",,giflib"
PACKAGECONFIG[png] = ",,libpng"
PACKAGECONFIG[tiff] = ",,tiff"
PACKAGECONFIG[motif] = ",,libx11 libxext libxpm libxt openmotif"
PACKAGECONFIG[webp] = ",,libwebp"
PACKAGECONFIG[lirc] = ",,lirc"
# This can only be enabled when cairo has egl enabled in its packageconfig support too
PACKAGECONFIG[egl] = ",,"
EXTRA_OEMAKE += ""${@bb.utils.contains('PACKAGECONFIG', 'egl', 'HAVE_CAIRO_GL=yes', 'HAVE_CAIRO_GL=no', d)}""
CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
do_compile() {
sed -i -e 's# fbgs# \$(srcdir)/fbgs#; s#-Ijpeg#-I\$(srcdir)/jpeg#; s# jpeg/# \$(srcdir)/jpeg/#' ${S}/GNUmakefile
sed -i -e 's:/sbin/ldconfig:echo x:' ${S}/mk/Autoconf.mk
sed -i -e 's: cpp: ${CPP}:' ${S}/GNUmakefile
# Be sure to respect preferences (force to "no")
# Also avoid issues when ${BUILD_ARCH} == ${HOST_ARCH}
if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'curl', d)}" ]; then
sed -i -e '/^HAVE_LIBCURL/s/:=.*$/:= no/' ${S}/GNUmakefile
fi
if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'gif', d)}" ]; then
sed -i -e '/^HAVE_LIBGIF/s/:=.*$/:= no/' ${S}/GNUmakefile
fi
if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'png', d)}" ]; then
sed -i -e '/^HAVE_LIBPNG/s/:=.*$/:= no/' ${S}/GNUmakefile
fi
if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'tiff', d)}" ]; then
sed -i -e '/^HAVE_LIBTIFF/s/:=.*$/:= no/' ${S}/GNUmakefile
fi
if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'motif', d)}" ]; then
sed -i -e '/^HAVE_MOTIF/s/:=.*$/:= no/' ${S}/GNUmakefile
fi
if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'webp', d)}" ]; then
sed -i -e '/^HAVE_LIBWEBP/s/:=.*$/:= no/' ${S}/GNUmakefile
fi
if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'lirc', d)}" ]; then
sed -i -e '/^HAVE_LIBLIRC/s/:=.*$/:= no/' ${S}/GNUmakefile
fi
oe_runmake
}
do_install() {
oe_runmake 'DESTDIR=${D}' install
}
RDEPENDS:${PN} = "ttf-dejavu-sans-mono"

View File

@@ -0,0 +1,34 @@
From 8d8fa9f22d9f6a95523bac63ac3af724faf5ff92 Mon Sep 17 00:00:00 2001
From: Marek Vasut <marex@denx.de>
Date: Fri, 7 Apr 2017 23:26:09 +0200
Subject: [PATCH] Avoid using host-path
Remove the explicit reference to /usr/local/* , this is completely
bogus and causes trouble during cross-compilation.
Signed-off-by: Marek Vasut <marex@denx.de>
Upstream-Status: Inappropriate [upstream requires this]
---
mk/Variables.mk | 6 ------
1 file changed, 6 deletions(-)
diff --git a/mk/Variables.mk b/mk/Variables.mk
index 99f787c..3ffd87a 100644
--- a/mk/Variables.mk
+++ b/mk/Variables.mk
@@ -42,12 +42,6 @@ CFLAGS += -Wall -Wmissing-prototypes -Wstrict-prototypes \
-Wpointer-arith -Wunused
CXXFLAGS += -Wall -Wpointer-arith -Wunused
-# add /usr/local to the search path if something is in there ...
-ifneq ($(wildcard /usr/local/include/*.h),)
- CFLAGS += -I/usr/local/include
- LDFLAGS += -L/usr/local/$(LIB)
-endif
-
# fixup include path for $(srcdir) != "."
ifneq ($(srcdir),.)
CFLAGS += -I. -I$(srcdir)
--
2.11.0

View File

@@ -0,0 +1,17 @@
OE configures cairo to disable EGL support, however fbida expects cairo with egl support
this patch therefore makes it possible to set HAVE_CAIRO_GL via recipe
Upstream-Status: Inappropriate [OE-Specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -67,7 +67,7 @@ define make-config
LIB := $(LIB)
RESDIR := $(call ac_resdir)
HAVE_LINUX_FB_H := $(call ac_header,linux/fb.h)
-HAVE_CAIRO_GL := $(call ac_pkg_config,cairo-gl)
+HAVE_CAIRO_GL ?= $(call ac_pkg_config,cairo-gl)
HAVE_LIBPCD := $(call ac_lib,pcd_open,pcd)
HAVE_LIBGIF := $(call ac_lib,DGifOpenFileName,gif)
HAVE_LIBWEBP := $(call ac_pkg_config,libwebp)

View File

@@ -0,0 +1,61 @@
Fix build with gcc10
Patch from https://src.fedoraproject.org/rpms/fbida/raw/master/f/fbida.gcc10.patch
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- fbida-2.14/fbi.c.org 2020-03-15 17:02:17.944189632 +0100
+++ fbida-2.14/fbi.c 2020-03-15 17:02:21.880223224 +0100
@@ -100,7 +100,6 @@
/* graphics interface */
gfxstate *gfx;
-int debug;
/* framebuffer */
char *fbdev = NULL;
--- fbida-2.14/filter.c 2020-03-15 16:44:17.159855150 +0100
+++ fbida-2.14/filter.c 2020-03-15 16:44:27.017941447 +0100
@@ -6,8 +6,6 @@
#include "readers.h"
#include "filter.h"
-int debug = 0;
-
/* ----------------------------------------------------------------------- */
static void
--- fbida-2.14/readers.c.org 2020-03-15 17:01:18.692683597 +0100
+++ fbida-2.14/readers.c 2020-03-15 16:57:19.141632384 +0100
@@ -6,6 +6,8 @@
#include "readers.h"
+int debug=0;
+
/* ----------------------------------------------------------------------- */
void load_bits_lsb(unsigned char *dst, unsigned char *src, int width,
--- fbida-2.14/viewer.c.org 2020-03-15 17:05:02.991595832 +0100
+++ fbida-2.14/viewer.c 2020-03-15 17:04:55.424531467 +0100
@@ -40,7 +40,6 @@
#define PROCESS_LINES 16
-int debug;
Cursor ptrs[POINTER_COUNT];
/* ----------------------------------------------------------------------- */
--- fbida-2.14/idaconfig.h.org 2020-03-15 17:07:09.239668196 +0100
+++ fbida-2.14/idaconfig.h 2020-03-15 17:07:21.248770061 +0100
@@ -17,7 +17,7 @@
/* -------------------------------------------------------------------------- */
-char *ida_lists;
+extern char *ida_lists;
void ida_init_config(void);
void ida_read_config(void);

View File

@@ -0,0 +1,6 @@
--- a/scripts/jpeg-version.sh
+++ b/scripts/jpeg-version.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-echo JPEG_LIB_VERSION | cpp $CFLAGS -include jpeglib.h | tail -1
+${CPP} -include jpeglib.h -dM -E -x c /dev/null | grep 'define JPEG_LIB_VERSION' | cut -f 3 -d' '

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
Index: fbida-2.10/GNUmakefile
===================================================================
--- fbida-2.10.orig/GNUmakefile
+++ fbida-2.10/GNUmakefile
@@ -51,7 +51,7 @@ HAVE_LIBSANE := $(call ac_lib,sane_init,
HAVE_LIBCURL := $(call ac_lib,curl_easy_init,curl)
HAVE_LIBLIRC := $(call ac_lib,lirc_init,lirc_client)
HAVE_MOTIF := $(call ac_lib,XmStringGenerate,Xm,-L/usr/X11R6/$(LIB) -lXpm -lXt -lXext -lX11)
-JPEG_VER := $(call ac_jpeg_ver)
+JPEG_VER := 62
endef
# transposing

View File

@@ -0,0 +1,31 @@
SUMMARY = "X11 image viewer aimed mostly at console users"
AUTHOR = "Tom Gilbert & Daniel Friesel"
HOMEPAGE = "https://feh.finalrewind.org/"
SECTION = "x11/utils"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=f91bd06901085c94bdc50649d98c5059"
DEPENDS = "\
imlib2 \
virtual/libx11 libxt\
"
SRC_URI = "https://feh.finalrewind.org/feh-${PV}.tar.bz2"
SRC_URI[sha256sum] = "455c92711b588af149b945edc5c145f3e9aa137ed9689dabed49d5e4acac75fa"
inherit mime-xdg features_check
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
EXTRA_OEMAKE = "curl=0 xinerama=0 PREFIX=/usr"
do_compile () {
oe_runmake
}
do_install () {
oe_runmake install app=1 'DESTDIR=${D}' 'ICON_PREFIX=${D}${datadir}/icons'
}
RDEPENDS:${PN} += "imlib2-loaders"
FILES:${PN} += "${datadir}/icons"

View File

@@ -0,0 +1,77 @@
From 644c3380f75b20a11755e7052aa632887f3eee2b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 7 Jul 2022 12:32:47 -0700
Subject: [PATCH] cmake: Use alternate way to detect libm
The standard package provided with MathLib cmake module does not work
when libm is folded into libc starting glibc 2.35+
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
CMakeLists.txt | 7 ++++++-
contrib/fonttools/CMakeLists.txt | 2 +-
fontforge/CMakeLists.txt | 2 +-
fontforgeexe/CMakeLists.txt | 2 +-
4 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e234cb6e9..284ba2d20 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -115,9 +115,14 @@ else()
endif()
find_package(Iconv REQUIRED)
find_package(LibXml2 REQUIRED)
-find_package(MathLib REQUIRED)
find_package(ZLIB REQUIRED)
+include(CheckLibraryExists)
+CHECK_LIBRARY_EXISTS(m pow "" HAVE_LIB_M)
+if (HAVE_LIB_M)
+ set(EXTRA_LIBS ${EXTRA_LIBS} m)
+endif (HAVE_LIB_M)
+
check_include_file(pthread.h HAVE_PTHREAD_H)
if(HAVE_PTHREAD_H)
find_package(Threads)
diff --git a/contrib/fonttools/CMakeLists.txt b/contrib/fonttools/CMakeLists.txt
index d6c698877..1608af152 100644
--- a/contrib/fonttools/CMakeLists.txt
+++ b/contrib/fonttools/CMakeLists.txt
@@ -15,7 +15,7 @@ add_executable(woff woff.c)
target_link_libraries(acorn2sfd PRIVATE fontforge)
target_link_libraries(dewoff PRIVATE ZLIB::ZLIB)
-target_link_libraries(pcl2ttf PRIVATE MathLib::MathLib)
+target_link_libraries(pcl2ttf PRIVATE ${EXTRA_LIBS})
target_link_libraries(ttf2eps PRIVATE fontforge)
target_link_libraries(woff PRIVATE ZLIB::ZLIB)
diff --git a/fontforge/CMakeLists.txt b/fontforge/CMakeLists.txt
index 9a052f360..067ef40df 100644
--- a/fontforge/CMakeLists.txt
+++ b/fontforge/CMakeLists.txt
@@ -237,7 +237,7 @@ target_link_libraries(fontforge
GLIB::GLIB
Intl::Intl
PRIVATE
- MathLib::MathLib
+ ${EXTRA_LIBS}
Iconv::Iconv
ZLIB::ZLIB
)
diff --git a/fontforgeexe/CMakeLists.txt b/fontforgeexe/CMakeLists.txt
index e2982c39d..8829993ea 100644
--- a/fontforgeexe/CMakeLists.txt
+++ b/fontforgeexe/CMakeLists.txt
@@ -121,7 +121,7 @@ if(ENABLE_PYTHON_SCRIPTING_RESULT)
target_link_libraries(fontforgeexe PRIVATE Python3::Python)
endif()
-target_link_libraries(fontforgeexe PRIVATE fontforge Iconv::Iconv MathLib::MathLib)
+target_link_libraries(fontforgeexe PRIVATE fontforge Iconv::Iconv ${EXTRA_LIBS})
install(TARGETS fontforgeexe RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
if(UNIX)

View File

@@ -0,0 +1,29 @@
From f5a19ad9b2aea85dab28e7c61ac39404631fad2d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 6 Jul 2022 04:54:23 -0700
Subject: [PATCH] fontforgeexe: Use env to find fontforge
This helps in avoiding to encode build paths into interpeter
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
fontforgeexe/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fontforgeexe/CMakeLists.txt b/fontforgeexe/CMakeLists.txt
index b2d663b88..e2a8fee54 100644
--- a/fontforgeexe/CMakeLists.txt
+++ b/fontforgeexe/CMakeLists.txt
@@ -118,7 +118,7 @@ if(UNIX)
foreach(_script fontimage.pe fontlint.pe sfddiff.pe)
get_filename_component(_output \"\${_script}\" NAME_WE)
file(READ \"${CMAKE_CURRENT_SOURCE_DIR}/\${_script}\" _input)
- file(WRITE \"${CMAKE_CURRENT_BINARY_DIR}/\${_output}\" \"#!\${CMAKE_INSTALL_PREFIX}/bin/fontforge -lang=ff\\n\${_input}\")
+ file(WRITE \"${CMAKE_CURRENT_BINARY_DIR}/\${_output}\" \"#!/usr/bin/env fontforge -lang=ff\\n\${_input}\")
endforeach()
" COMPONENT nativescripts)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/fontimage" "${CMAKE_CURRENT_BINARY_DIR}/fontlint" "${CMAKE_CURRENT_BINARY_DIR}/sfddiff"
--
2.37.0

View File

@@ -0,0 +1,24 @@
From 798f2816130838f3618212291de6ab0ea814c868 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 29 Sep 2019 20:39:02 -0700
Subject: [PATCH] include sys/select on non-glibc platforms
musl needs sys/select.h for defining fd_set
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
gdraw/gdraw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/gdraw/gdraw.c
+++ b/gdraw/gdraw.c
@@ -33,7 +33,7 @@
#include "gkeysym.h"
#include "ustring.h"
-#if __Mac
+#if __Mac || (defined(__linux__) && !defined(__GLIBC__))
# include <sys/select.h>
#endif

View File

@@ -0,0 +1,49 @@
SUMMARY = "A font editor"
HOMEPAGE = "http://fontforge.github.io/en-US/"
LICENSE = "BSD-3-Clause & GPL-3.0-only"
LIC_FILES_CHKSUM = " \
file://COPYING.gplv3;md5=d32239bcb673463ab874e80d47fae504 \
file://LICENSE;md5=d042f3d2a8fd7208b704a499168e3c89 \
"
DEPENDS = "python3 glib-2.0 pango giflib tiff libxml2 jpeg libtool uthash gettext-native libspiro"
DEPENDS:append:class-target = " libxi"
inherit cmake pkgconfig python3native python3targetconfig features_check gettext gtk-icon-cache mime mime-xdg
REQUIRED_DISTRO_FEATURES:append:class-target = " x11"
# tag 20220308
SRCREV = "a1dad3e81da03d5d5f3c4c1c1b9b5ca5ebcfcecf"
SRC_URI = "git://github.com/${BPN}/${BPN}.git;branch=master;protocol=https \
file://0001-include-sys-select-on-non-glibc-platforms.patch \
file://0001-fontforgeexe-Use-env-to-find-fontforge.patch \
file://0001-cmake-Use-alternate-way-to-detect-libm.patch \
"
S = "${WORKDIR}/git"
EXTRA_OECMAKE = "-DENABLE_DOCS=OFF"
CFLAGS += "-fno-strict-aliasing"
LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}"
BUILD_LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}"
#do_configure:prepend() {
# uthash sources are expected in uthash/src
# mkdir -p ${S}/uthash/src
# cp ${STAGING_INCDIR}/ut*.h ${S}/uthash/src
#}
PACKAGES =+ "${PN}-python"
FILES:${PN} += " \
${datadir}/appdata \
${datadir}/metainfo \
${datadir}/mime \
"
FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR} ${datadir}/${BPN}/python"
RDEPENDS:${PN}-python = "python3"
# for e.g kde's oxygen-fonts
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,14 @@
# Copyright (C) 2022 Khem Raj <raj.khem@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "LibSpiro is an adaptation of Spiro formula and functions into a sharable library"
HOMEPAGE = "https://github.com/fontforge/libspiro"
LICENSE = "GPL-3.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI = "https://github.com/fontforge/libspiro/releases/download/20200505/libspiro-dist-20200505.tar.gz"
SRC_URI[sha256sum] = "06c69a1e8dcbcabcf009fd96fd90b1a244d0257246e376c2c4d57c4ea4af0e49"
inherit autotools
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,30 @@
DESCRIPTION = "FreeGLUT is a free-software/open-source alternative to the OpenGL \
Utility Toolkit (GLUT) library"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=89c0b58a3e01ce3d8254c9f59e78adfb"
SRC_URI = "https://sourceforge.net/projects/${BPN}/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz"
SRC_URI[sha256sum] = "3c0bcb915d9b180a97edaebd011b7a1de54583a838644dcd42bb0ea0c6f3eaec"
inherit cmake features_check pkgconfig
# depends on virtual/libgl
REQUIRED_DISTRO_FEATURES = "opengl"
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
PACKAGECONFIG[gles] = "-DFREEGLUT_GLES=ON,-DFREEGLUT_GLES=OFF,"
PACKAGECONFIG[wayland] = "-DFREEGLUT_WAYLAND=ON,-DFREEGLUT_WAYLAND=OFF,libxkbcommon"
PACKAGECONFIG[demos] = "-DFREEGLUT_BUILD_DEMOS=ON,-DFREEGLUT_BUILD_DEMOS=OFF,"
PACKAGECONFIG[x11] = ",,virtual/libx11 libice libxmu libglu libxrandr libxext"
# Add -Wno-implicit-function-declaration since it might be otherwise treated at
# error by clang16+ and this is not really a problem
CFLAGS += "-Wno-implicit-function-declaration"
PROVIDES += "mesa-glut"
DEPENDS = "virtual/libgl libxi"
do_install:append() {
# Remove buildpaths
sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/FreeGLUT/FreeGLUTTargets.cmake
}

View File

@@ -0,0 +1,38 @@
From e3bce98a60d6db3b719bbf5d71f732f9b86cb566 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 9 Feb 2019 08:28:09 -0800
Subject: [PATCH] Explicit typecast to avoid implicit double to float
conversion
fixes compile errors e.g.
../../ftgl-2.1.3~rc5/demo/simple.cpp:110:27: error: non-constant-expression cannot be narrowed from type 'double' to
'float' in initializer list [-Wc++11-narrowing]
(t3 + 2.0) / 3, 0.3 };
^~~~~~~~~~~~~~
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
demo/simple.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/demo/simple.cpp b/demo/simple.cpp
index 532e862..aba55b4 100644
--- a/demo/simple.cpp
+++ b/demo/simple.cpp
@@ -105,9 +105,9 @@ static void RenderScene(void)
float t2 = sin(n / 50 + 1);
float t3 = sin(n / 30 + 2);
- float ambient[4] = { (t1 + 2.0) / 3,
- (t2 + 2.0) / 3,
- (t3 + 2.0) / 3, 0.3 };
+ float ambient[4] = { float(t1 + 2.0) / 3,
+ float(t2 + 2.0) / 3,
+ float(t3 + 2.0) / 3, 0.3 };
float diffuse[4] = { 1.0, 0.9, 0.9, 1.0 };
float specular[4] = { 1.0, 0.7, 0.7, 1.0 };
float position[4] = { 100.0, 100.0, 0.0, 1.0 };
--
2.20.1

View File

@@ -0,0 +1,38 @@
From 8bb183926078b6dd54048fb6820838fe7b6e6163 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Sun, 23 Oct 2016 22:46:43 +0200
Subject: [PATCH] use pkg-config to find freetype2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
configure.ac | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 53560ea..b5bb6a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,8 +41,13 @@ AC_CHECK_FUNCS(strndup)
AC_PATH_X
-AC_CHECK_FT2([9.0.3],[],
- [AC_MSG_ERROR([FreeType2 is required to compile this library])])
+PKG_CHECK_MODULES(FT2, freetype2,
+ CFLAGS="$CFLAGS $FT2_CFLAGS"
+ LIBS="$LIBS $FT2_LIBS",
+ AC_MSG_ERROR([FreeType2 is required to compile this library])
+)
+AC_SUBST([FT2_CFLAGS])
+AC_SUBST([FT2_LIBS])
AC_PATH_XTRA
--
2.5.5

View File

@@ -0,0 +1,38 @@
From daabb4110661c4358ec73293d5c0b2106f567c1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Sun, 23 Oct 2016 23:54:14 +0200
Subject: [PATCH] Makefile.am: remove useless and breaking code
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
Makefile.am | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 89a8a7f..e582a34 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,15 +24,6 @@ EXTRA_DIST = \
m4 \
$(NULL)
-# Print out an informative summary.
-all-local:
- @$(ECHO) "Done."
- @$(ECHO)
- @if test "x$(MAKECMDGOALS)" = "xall-am" -o "x$(.TARGETS)" = "xall-am" -o "x$(MAKECMDGOALS)" = "x" -o "x$(.TARGETS)" = "x" ; then \
- $(ECHO) "---" ;\
- $(ECHO) "Run 'make install' to begin installation into $(prefix)" ;\
- fi
- @$(ECHO)
# Upload documentation
DOC = docs/html docs/latex/ftgl.pdf
--
2.5.5

View File

@@ -0,0 +1,27 @@
SUMMARY = "OpenGL frontend to Freetype 2"
HOMEPAGE = "https://sourceforge.net/projects/ftgl/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=527a83e92c7bf363025380eec05df6e4"
inherit autotools pkgconfig features_check
REQUIRED_DISTRO_FEATURES = "opengl x11"
DEPENDS += " \
freetype \
freeglut \
"
SRC_URI = " \
${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
file://0001-use-pkg-config-to-find-freetype2.patch \
file://0002-Makefile.am-remove-useless-and-breaking-code.patch \
file://0001-Explicit-typecast-to-avoid-implicit-double-to-float-.patch \
"
SRC_URI[md5sum] = "c7879018cde844059495b3029b0b6503"
SRC_URI[sha256sum] = "521ff7bd62c459ff5372e269c223e2a6107a6a99a36afdc2ae634a973af70c59"
S = "${WORKDIR}/ftgl-2.1.3~rc5"
# undefined reference to symbol 'sin@@GLIBC_2.4'
CFLAGS += "-lm"

View File

@@ -0,0 +1,37 @@
From 60c17eb49121bf2aa485acd30750b2fc6c8eb61f Mon Sep 17 00:00:00 2001
From: Jarmo Jaakkola <jarmo.jaakkola@vincit.fi>
Date: Mon, 19 Jun 2017 16:41:36 +0300
Subject: [PATCH] Fix compilation for Helix.
Gnome support, including GNOME_INIT_HOOK, has been removed, but it was
still being called.
COMPAT_OLD_KEYSYMDEF is a check for a legacy system, which our system
most definitely is not. It is accomplished by trying to execute
a program, which does not work when cross compiling.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Jarmo Jaakkola <jarmo.jaakkola@vincit.fi>
Signed-off-by: Riku Hämäläinen <riku.hamalainen@ge.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
configure.ac | 20 ++++----------------
doc/fvwm/Makefile.am | 2 +-
3 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/configure.ac b/configure.ac
index 48ce264..fab7b44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1413,8 +1413,4 @@ else
# Define some compatibility macros needed for config.h.
-mg_DEFINE_IF_NOT([#include <X11/keysym.h>],
- [defined XK_Page_Up && defined XK_Page_Down],
- [COMPAT_OLD_KEYSYMDEF], [$X_CFLAGS],
- [Old AIX systems (3.2.5) don't define some common keysyms.])
AH_VERBATIM([_COMPAT_OLD_KEYSYMDEF],
[#ifdef COMPAT_OLD_KEYSYMDEF
# define XK_Page_Up XK_Prior
--
1.9.1

View File

@@ -0,0 +1,123 @@
SUMMARY = "F Virtual Window Manager "
HOMEPAGE = "http://www.fvwm.org/"
SECTION = "x11/wm"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=f8204787357db6ea518dcc9b6cf08388"
DEPENDS = " \
bison-native \
flex-native \
freetype-native \
gettext-native \
libxslt-native \
fontconfig \
libice \
libpng \
librsvg \
libsm \
libxau \
libxcb \
libxcursor \
libxdmcp \
libxext \
libxfixes \
libxft \
libxinerama \
libxml2 \
libxrender \
libxt \
virtual/libx11 \
xrandr \
zlib \
"
SRC_URI = " \
git://github.com/fvwmorg/fvwm.git;protocol=https;branch=master \
file://0001-Fix-compilation-for-disabled-gnome.patch \
"
SRCREV = "7baf540e56fb1a3e91752acba872a88543529d46"
S = "${WORKDIR}/git"
inherit autotools gettext update-alternatives pkgconfig python3native perlnative features_check
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
ALTERNATIVE:${PN} = "x-window-manager"
ALTERNATIVE_TARGET[x-window-manager] = "${bindir}/fvwm"
ALTERNATIVE_PRIORITY[x-window-manager] = "20"
EXTRA_OECONF = " \
--disable-bidi \
--disable-fontconfigtest \
--disable-htmldoc \
--disable-imlibtest \
--disable-nls \
--disable-perllib \
--disable-rsvg \
--disable-shape \
--disable-sm \
--disable-xfttest \
--with-imlib-exec-prefix=/nonexistent \
--with-imlib-prefix=/nonexistent \
--without-ncurses-library \
--without-readline-library \
--without-rplay-library \
--without-stroke-library \
--without-termcap-library \
--without-xpm-library \
ac_cv_func_mkstemp=no \
has_safety_mkstemp=yes \
"
# show the exact commands in the log file
EXTRA_OEMAKE = " \
V=1 \
"
# clang treats them as errors by default now starting with 15.0+
CFLAGS += "-Wno-error=int-conversion -Wno-error=implicit-int"
do_install:append() {
install -d -m 0755 ${D}/${sysconfdir}/xdg/fvwm
# You can install the config file here
install -d -m 0755 ${D}/${datadir}/fvwm
touch ${D}/${datadir}/fvwm/ConfigFvwmDefaults
sed -i -e 's:${STAGING_BINDIR_NATIVE}/perl-native/perl:${USRBINPATH}/env perl:g' ${D}${bindir}/fvwm-*
sed -i -e 's:${STAGING_BINDIR_NATIVE}/perl-native/perl:${USRBINPATH}/env perl:g' ${D}${libexecdir}/fvwm/*/Fvwm*
sed -i -e 's:${STAGING_BINDIR_NATIVE}/python3-native/python3:${USRBINPATH}/env python3:g' ${D}${bindir}/fvwm-menu-desktop
}
# the only needed packages (note: locale packages are automatically generated
# as well)
PACKAGES = " \
${PN} \
${PN}-extra \
${PN}-doc \
${PN}-dbg \
"
# minimal set of binaries
FILES:${PN} = " \
${bindir}/fvwm \
${bindir}/fvwm-root \
${datadir}/fvwm/ConfigFvwmDefaults \
"
FILES:${PN}-extra = " \
${bindir} \
${libexecdir} \
${sysconfdir}/xdg/fvwm \
"
FILES:${PN}-doc = " \
${mandir} \
${datadir}/fvwm \
"
RDEPENDS:${PN} = " \
xuser-account \
"
RDEPENDS:${PN}-extra += "\
perl \
python3-core \
"

View File

@@ -0,0 +1,30 @@
From ee405855bca7d6399ff1a1aef952010056c84ff6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 1 Mar 2023 21:08:09 -0800
Subject: [PATCH] Do not use -Werror with clang
Too many warnings to handle for a distro build
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
test/CMakeLists.txt | 4 ----
1 file changed, 4 deletions(-)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index e7f85f19..0b6fd980 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -197,10 +197,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message("GLM: Clang - ${CMAKE_CXX_COMPILER_ID} compiler")
endif()
- add_compile_options(-Werror -Weverything)
- add_compile_options(-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++11-long-long -Wno-padded -Wno-gnu-anonymous-struct -Wno-nested-anon-types)
- add_compile_options(-Wno-undefined-reinterpret-cast -Wno-sign-conversion -Wno-unused-variable -Wno-missing-prototypes -Wno-unreachable-code -Wno-missing-variable-declarations -Wno-sign-compare -Wno-global-constructors -Wno-unused-macros -Wno-format-nonliteral)
-
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if(NOT GLM_QUIET)
message("GLM: GCC - ${CMAKE_CXX_COMPILER_ID} compiler")
--
2.39.2

View File

@@ -0,0 +1,145 @@
From bd9b5060bc3b9581090d44f15b4e236566ea86a6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 4 Jun 2021 12:57:57 -0700
Subject: [PATCH] Silence clang warnings
Fixes
glm/gtc/random.inl:25:17: error: implicit conversion loses integer precision: 'int' to 'unsigned char' [-Werror,-Wimplicit-int-conversion]
| std::rand() % std::numeric_limits<uint8>::max());
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glm/gtc/../ext/quaternion_common.inl:76:87: error: unused parameter 'k' [-Werror,-Wunused-parameter]
GLM_FUNC_QUALIFIER qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a, S k)
^
and
test/gtx/gtx_fast_trigonometry.cpp:135:9: error: variable 'result' set but not used [-Werror,-Wunused-but-set-variable]
| float result = 0.f;
| ^
Upstream-Status: Submitted [https://github.com/g-truc/glm/pull/1055]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
glm/ext/quaternion_common.inl | 2 +-
glm/gtc/random.inl | 2 +-
test/gtx/gtx_fast_trigonometry.cpp | 30 ++++++++++++------------------
3 files changed, 14 insertions(+), 20 deletions(-)
--- a/glm/ext/quaternion_common.inl
+++ b/glm/ext/quaternion_common.inl
@@ -104,7 +104,7 @@ namespace glm
{
// Graphics Gems III, page 96
T angle = acos(cosTheta);
- T phi = angle + k * glm::pi<T>();
+ T phi = angle + static_cast<T>(k) * glm::pi<T>();
return (sin(angle - a * phi)* x + sin(a * phi) * z) / sin(angle);
}
}
--- a/test/gtx/gtx_fast_trigonometry.cpp
+++ b/test/gtx/gtx_fast_trigonometry.cpp
@@ -19,15 +19,14 @@ namespace fastCos
{
const float begin = -glm::pi<float>();
const float end = glm::pi<float>();
- float result = 0.f;
const std::clock_t timestamp1 = std::clock();
for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastCos(i);
+ glm::fastCos(i);
const std::clock_t timestamp2 = std::clock();
for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::cos(i);
+ glm::cos(i);
const std::clock_t timestamp3 = std::clock();
const std::clock_t time_fast = timestamp2 - timestamp1;
@@ -53,15 +52,14 @@ namespace fastSin
{
const float begin = -glm::pi<float>();
const float end = glm::pi<float>();
- float result = 0.f;
const std::clock_t timestamp1 = std::clock();
for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastSin(i);
+ glm::fastSin(i);
const std::clock_t timestamp2 = std::clock();
for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::sin(i);
+ glm::sin(i);
const std::clock_t timestamp3 = std::clock();
const std::clock_t time_fast = timestamp2 - timestamp1;
@@ -79,15 +77,14 @@ namespace fastTan
{
const float begin = -glm::pi<float>();
const float end = glm::pi<float>();
- float result = 0.f;
const std::clock_t timestamp1 = std::clock();
for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastTan(i);
+ glm::fastTan(i);
const std::clock_t timestamp2 = std::clock();
for (float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::tan(i);
+ glm::tan(i);
const std::clock_t timestamp3 = std::clock();
const std::clock_t time_fast = timestamp2 - timestamp1;
@@ -105,15 +102,14 @@ namespace fastAcos
{
const float begin = -glm::pi<float>();
const float end = glm::pi<float>();
- float result = 0.f;
const std::clock_t timestamp1 = std::clock();
for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastAcos(i);
+ glm::fastAcos(i);
const std::clock_t timestamp2 = std::clock();
for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::acos(i);
+ glm::acos(i);
const std::clock_t timestamp3 = std::clock();
const std::clock_t time_fast = timestamp2 - timestamp1;
@@ -132,13 +128,12 @@ namespace fastAsin
{
const float begin = -glm::pi<float>();
const float end = glm::pi<float>();
- float result = 0.f;
const std::clock_t timestamp1 = std::clock();
for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastAsin(i);
+ glm::fastAsin(i);
const std::clock_t timestamp2 = std::clock();
for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::asin(i);
+ glm::asin(i);
const std::clock_t timestamp3 = std::clock();
const std::clock_t time_fast = timestamp2 - timestamp1;
const std::clock_t time_default = timestamp3 - timestamp2;
@@ -155,13 +150,12 @@ namespace fastAtan
{
const float begin = -glm::pi<float>();
const float end = glm::pi<float>();
- float result = 0.f;
const std::clock_t timestamp1 = std::clock();
for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastAtan(i);
+ glm::fastAtan(i);
const std::clock_t timestamp2 = std::clock();
for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::atan(i);
+ glm::atan(i);
const std::clock_t timestamp3 = std::clock();
const std::clock_t time_fast = timestamp2 - timestamp1;
const std::clock_t time_default = timestamp3 - timestamp2;

View File

@@ -0,0 +1,7 @@
prefix=/usr
includedir=${prefix}/include
Name: GLM
Description: OpenGL Mathematics
Version: @VERSION@
Cflags: -I${includedir}

View File

@@ -0,0 +1,20 @@
set(GLM_VERSION "@VERSION@")
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()
####################################################################################
set_and_check(GLM_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include")
if (NOT CMAKE_VERSION VERSION_LESS "3.0")
include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake")
endif()

View File

@@ -0,0 +1,31 @@
# This is a basic version file for the Config-mode of find_package().
# It is used by write_basic_package_version_file() as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
# The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "@VERSION@")
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
return()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
math(EXPR installedBits "8 * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE FALSE)
endif()

View File

@@ -0,0 +1,107 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
message(FATAL_ERROR "CMake >= 2.6.0 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.6)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_targetsDefined)
set(_targetsNotDefined)
set(_expectedTargets)
foreach(_expectedTarget glm)
list(APPEND _expectedTargets ${_expectedTarget})
if(NOT TARGET ${_expectedTarget})
list(APPEND _targetsNotDefined ${_expectedTarget})
endif()
if(TARGET ${_expectedTarget})
list(APPEND _targetsDefined ${_expectedTarget})
endif()
endforeach()
if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT "${_targetsDefined}" STREQUAL "")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
endif()
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
# Use original install prefix when loaded through a
# cross-prefix symbolic link such as /lib -> /usr/lib.
get_filename_component(_realCurr "${_IMPORT_PREFIX}" REALPATH)
get_filename_component(_realOrig "/usr/lib/cmake/glm" REALPATH)
if(_realCurr STREQUAL _realOrig)
set(_IMPORT_PREFIX "/usr/lib/cmake/glm")
endif()
unset(_realOrig)
unset(_realCurr)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()
# Create imported target glm
add_library(glm INTERFACE IMPORTED)
set_target_properties(glm PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
)
if(CMAKE_VERSION VERSION_LESS 3.0.0)
message(FATAL_ERROR "This file relies on consumers using CMake 3.0.0 or greater.")
endif()
# Load information for each installed configuration.
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
file(GLOB CONFIG_FILES "${_DIR}/glmTargets-*.cmake")
foreach(f ${CONFIG_FILES})
include(${f})
endforeach()
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(target ${_IMPORT_CHECK_TARGETS} )
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
if(NOT EXISTS "${file}" )
message(FATAL_ERROR "The imported target \"${target}\" references the file
\"${file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
endif()
endforeach()
unset(_IMPORT_CHECK_FILES_FOR_${target})
endforeach()
unset(_IMPORT_CHECK_TARGETS)
# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)

View File

@@ -0,0 +1,41 @@
SUMMARY = "OpenGL Mathematics Library"
DESCRIPTION = "OpenGL Mathematics (GLM) is a header only C++ \
mathematics library for graphics software based on the OpenGL \
Shading Language (GLSL) specifications."
HOMEPAGE = "https://glm.g-truc.net"
BUGTRACKER = "https://github.com/g-truc/glm/issues"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://copying.txt;md5=462e4b97f73ef12f8171c3c546ce4e8d"
SRC_URI = " \
git://github.com/g-truc/glm;branch=master;protocol=https \
file://0001-Silence-clang-warnings.patch \
file://0001-Do-not-use-Werror-with-clang.patch \
file://glmConfig.cmake.in \
file://glmConfigVersion.cmake.in \
file://glm.pc.in \
file://glmTargets.cmake \
"
SRCREV = "efec5db081e3aad807d0731e172ac597f6a39447"
PV .= "+0.9.9.9+git${SRCPV}"
S = "${WORKDIR}/git"
inherit cmake
do_install() {
install -d ${D}${includedir} ${D}${docdir}/glm ${D}${libdir}/pkgconfig ${D}${libdir}/cmake/glm
cp -R --no-dereference --preserve=mode,links ${S}/glm ${D}${includedir}
cp -R --no-dereference --preserve=mode,links ${S}/doc ${D}${docdir}/glm
rm ${D}${includedir}/glm/CMakeLists.txt
sed "s/@VERSION@/${PV}/" ${WORKDIR}/glmConfigVersion.cmake.in > ${D}${libdir}/cmake/glm/glmConfigVersion.cmake
sed "s/@VERSION@/${PV}/" ${WORKDIR}/glmConfig.cmake.in > ${D}${libdir}/cmake/glm/glmConfig.cmake
sed "s/@VERSION@/${PV}/" ${WORKDIR}/glm.pc.in > ${D}${libdir}/pkgconfig/glm.pc
install -Dm644 ${WORKDIR}/glmTargets.cmake ${D}${libdir}/cmake/glm/glmTargets.cmake
}
RDEPENDS:${PN}-dev = ""
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,50 @@
From 366930ccc1a261c3eb883da2bf3c655162ccd75f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 1 Mar 2023 22:58:37 -0800
Subject: [PATCH] Match prototypes of callbacks with libgphoto
In https://github.com/gphoto/gphoto2/pull/535/commits/ccc4c1f092bd21ebc713f4d7b9be85be49f92f1e
we tried to fix by using pthread_t but it also needs to make changes in
libgphoto and these changes can be invasive, therefore lets revert to
older types and to fix musl problem fix it via type casts
Upstream-Status: Submitted [https://github.com/gphoto/gphoto2/pull/569]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
gphoto2/main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gphoto2/main.c b/gphoto2/main.c
index 0dac947..cd3c990 100644
--- a/gphoto2/main.c
+++ b/gphoto2/main.c
@@ -1198,7 +1198,7 @@ thread_func (void *data)
pthread_cleanup_pop (1);
}
-static pthread_t
+static unsigned int
start_timeout_func (Camera *camera, unsigned int timeout,
CameraTimeoutFunc func, void __unused__ *data)
{
@@ -1215,14 +1215,14 @@ start_timeout_func (Camera *camera, unsigned int timeout,
pthread_create (&tid, NULL, thread_func, td);
- return (tid);
+ return (unsigned int)tid;
}
static void
-stop_timeout_func (Camera __unused__ *camera, pthread_t id,
+stop_timeout_func (Camera __unused__ *camera, unsigned int id,
void __unused__ *data)
{
- pthread_t tid = id;
+ pthread_t tid = (pthread_t)id;
pthread_cancel (tid);
pthread_join (tid, NULL);
--
2.39.2

View File

@@ -0,0 +1,21 @@
From 60b6d5c95ca3632e02031ac04fb5486dd209011c Mon Sep 17 00:00:00 2001
From: Andreas Baak <andreas.baak@gmail.com>
Date: Sun, 12 Jul 2015 01:02:15 -0700
Subject: [PATCH] configure.ac remove AM_PO_SUBDIRS
This is done twice together with oe autotools.bbclass.
---
configure.ac | 1 -
1 file changed, 1 deletion(-)
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,6 @@ dnl i18n support
dnl ---------------------------------------------------------------------------
GP_GETTEXT_HACK([],[Lutz Müller and others],[${MAIL_GPHOTO_TRANSLATION}])
ALL_LINGUAS="az cs da de en_GB es eu fi fr hu id is it ja nl pa pl pt_BR ro ru rw sk sr sv uk vi zh_CN zh_TW"
-AM_PO_SUBDIRS()
AM_GNU_GETTEXT_VERSION([0.14.1])
AM_GNU_GETTEXT([external])
AM_ICONV()

View File

@@ -0,0 +1,39 @@
From 23c67e93e51f700d0aeecfc08277e39f51201fc3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 2 Sep 2022 12:59:46 -0700
Subject: [PATCH] gphoto2: Use pthread_t abstract type for thead IDs
This is not a plain old datatype in every libc, e.g. with musl this
would fail in type conversion
Upstream-Status: Submitted [https://github.com/gphoto/gphoto2/pull/535]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
gphoto2/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gphoto2/main.c b/gphoto2/main.c
index 2bf5964..9a6b05d 100644
--- a/gphoto2/main.c
+++ b/gphoto2/main.c
@@ -1198,7 +1198,7 @@ thread_func (void *data)
pthread_cleanup_pop (1);
}
-static unsigned int
+static pthread_t
start_timeout_func (Camera *camera, unsigned int timeout,
CameraTimeoutFunc func, void __unused__ *data)
{
@@ -1219,7 +1219,7 @@ start_timeout_func (Camera *camera, unsigned int timeout,
}
static void
-stop_timeout_func (Camera __unused__ *camera, unsigned int id,
+stop_timeout_func (Camera __unused__ *camera, pthread_t id,
void __unused__ *data)
{
pthread_t tid = id;
--
2.37.3

View File

@@ -0,0 +1,21 @@
SUMMARY = "gphoto2 - a command-line frontend to libgphoto2"
HOMEPAGE = "http://www.gphoto.com/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
DEPENDS = "libgphoto2 popt readline"
RDEPENDS:gphoto2 = "libgphoto2"
SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/gphoto2-${PV}.tar.bz2;name=gphoto2 \
file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
file://0001-gphoto2-Use-pthread_t-abstract-type-for-thead-IDs.patch \
file://0001-Match-prototypes-of-callbacks-with-libgphoto.patch \
"
SRC_URI[gphoto2.sha256sum] = "2a648dcdf12da19e208255df4ebed3e7d2a02f905be4165f2443c984cf887375"
inherit autotools pkgconfig gettext
EXTRA_OECONF += "--with-jpeg-prefix=${STAGING_INCDIR} \
--without-cdk \
"

View File

@@ -0,0 +1,48 @@
From 06be633b8f4e2241bd37d4faf62b49606ad778e7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 25 May 2023 19:01:36 -0700
Subject: [PATCH] configure: Filter out buildpaths from CC
Upstream-Status: Inappropriate [Cross-compile specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 4 +++-
libgphoto2_port/configure.ac | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 17216b1..39c8cc4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -261,7 +261,9 @@ GP_CONFIG_MSG([Compiler],[${CC}])
GP_CONFIG_MSG([libltdl includes],[$LTDLINCL])
GP_CONFIG_MSG([libltdl library],[$LIBLTDL])
-AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC"],
+CC_NO_SYSROOT=`echo $CC | sed -e \
+ 's|--sysroot=.*\b||g'`
+AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC_NO_SYSROOT"],
[The C compiler we are using])
diff --git a/libgphoto2_port/configure.ac b/libgphoto2_port/configure.ac
index 1086b8e..59f3c34 100644
--- a/libgphoto2_port/configure.ac
+++ b/libgphoto2_port/configure.ac
@@ -103,8 +103,10 @@ GP_CONFIG_MSG([Compiler],[${CC}])
GP_CONFIG_MSG([libltdl includes],[$LTDLINCL])
GP_CONFIG_MSG([libltdl library],[$LIBLTDL])
-AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC"],
- [The C compiler we're using])
+CC_NO_SYSROOT=`echo $CC | sed -e \
+ 's|--sysroot=.*\b||g'`
+AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC_NO_SYSROOT"],
+ [The C compiler we are using])
AM_CPPFLAGS=""
--
2.40.1

View File

@@ -0,0 +1,41 @@
From 31a5d2f7db18737aef08c34e8707b4f69f7e5156 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Sun, 21 Oct 2012 17:59:20 +0200
Subject: [PATCH] configure.ac: remove AM_PO_SUBDIRS
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
together with oe autotools.bbclass this is done twice and causes:
| autoreconf: running: aclocal --system-acdir=/home/Superandy/tmp/oe-core-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/libgphoto2-2.4.11-r2/libgphoto2-2.4.11/aclocal-copy/ --automake-acdir=/home/Superandy/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/share/aclocal-1.12 -I /home/Superandy/tmp/oe-core-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/libgphoto2-2.4.11-r2/libgphoto2-2.4.11/auto-m4/ -I /home/Superandy/tmp/oe-core-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/libgphoto2-2.4.11-r2/libgphoto2-2.4.11/m4m/ -I /home/Superandy/tmp/oe-core-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/libgphoto2-2.4.11-r2/libgphoto2-2.4.11/auto-m4/ -I /home/Superandy/tmp/oe-core-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/libgphoto2-2.4.11-r2/libgphoto2-2.4.11/m4m/ --force -I auto-m4 -I m4m
| configure.ac:230: error: `po-directories' is already registered with AC_CONFIG_COMMANDS.
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
configure.ac | 1 -
libgphoto2_port/configure.ac | 1 -
2 files changed, 0 insertions(+), 2 deletions(-)
--- a/configure.ac
+++ b/configure.ac
@@ -282,7 +282,6 @@ dnl ------------------------------------
GP_GETTEXT_SETUP([GETTEXT_PACKAGE_LIBGPHOTO2],
[${PACKAGE}-${LIBGPHOTO2_CURRENT_MIN}],
[po])
-AM_PO_SUBDIRS()
AM_GNU_GETTEXT_VERSION([0.19.1])
AM_GNU_GETTEXT([external])
AM_ICONV()
--- a/libgphoto2_port/configure.ac
+++ b/libgphoto2_port/configure.ac
@@ -122,7 +122,6 @@ dnl ------------------------------------
GP_GETTEXT_SETUP([GETTEXT_PACKAGE_LIBGPHOTO2_PORT],
[${PACKAGE}-${LIBGPHOTO2_PORT_CURRENT_MIN}],
[po])
-AM_PO_SUBDIRS()
AM_GNU_GETTEXT_VERSION([0.19.1])
AM_GNU_GETTEXT([external])
AM_ICONV()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,53 @@
SUMMARY = "libgphoto2 allows you to access digital cameras"
SECTION = "libs"
LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=477378d78dfeeaa93826ee4ec7c643fb"
DEPENDS = "libtool jpeg virtual/libusb0 libexif zlib libxml2"
# The .fdi and .rules files were generated with:
# libgphoto2-2.5.8/packaging/generic$ qemu-arm -s 1048576 -r 2.6.24 -L /OE/angstrom-dev/staging/armv5te-angstrom-linux-gnueabi/ .libs/print-camera-list
# They are release specific, so please regen when adding new releases
SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2 \
file://40-libgphoto2.rules \
file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
file://0001-configure-Filter-out-buildpaths-from-CC.patch \
"
SRC_URI[libgphoto2.sha256sum] = "ee61a1dac6ad5cf711d114e06b90a6d431961a6e7ec59f4b757a7cd77b1c0fb4"
inherit autotools pkgconfig gettext lib_package
EXTRA_OECONF = " --with-drivers=all udevscriptdir=${nonarch_base_libdir}/udev ac_cv_lib_ltdl_lt_dlcaller_register=yes"
PACKAGECONFIG ??= ""
PACKAGECONFIG[gd] = ",--without-gdlib,gd"
PACKAGECONFIG[serial] = "--enable-serial,--disable-serial,lockdev"
do_configure:prepend() {
rm -rf ${S}/libgphoto2_port/auto-m4/*
rm -rf ${S}/auto-m4/*
}
do_configure:append() {
cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/libgphoto2_port/po/
cd ${S}/libgphoto2_port/
autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
cd ${S}
}
do_install:append() {
install -d ${D}${sysconfdir}/udev/rules.d/
install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
}
PACKAGES =+ "libgphotoport libgphoto2-camlibs"
FILES:libgphoto2-camlibs = "${libdir}/libgphoto2*/*/*.so*"
RRECOMMENDS:${PN} = "libgphoto2-camlibs"
FILES:libgphotoport = "${libdir}/libgphoto2_port.so.*"
FILES:${PN} += "${nonarch_base_libdir}/udev/*"
FILES:${PN}-dbg += "${libdir}/*/*/.debug"
FILES:${PN}-dev += "${libdir}/*/*/*.la"
FILES:${PN}-doc += "${datadir}/libgphoto2_port/0.12.?/vcamera/README.txt"

View File

@@ -0,0 +1,33 @@
From 564901ab78da2b2b1bed92351dc3c102dc0a8154 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 6 Aug 2019 17:51:39 -0700
Subject: [PATCH] Set use_tcl to be empty string if tcl is disabled
Upstream-Status: Inappropriate [Cross-compile specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/configure.ac
+++ b/configure.ac
@@ -1540,7 +1540,7 @@ AC_ARG_ENABLE(tcl,
[], [enable_tcl=yes])
if test "x$enable_tcl" != "xyes"; then
- use_tcl="No (disabled)"
+ use_tcl=""
fi
if test "x$use_tcl" = "x"; then
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,7 @@ pkginclude_HEADERS = $(top_builddir)/gra
man_MANS = graphviz.7
# $(subdirs) contains the list from: AC_CONFIG_SUBDIRS
-SUBDIRS = $(subdirs) lib plugin cmd tclpkg doc contrib share graphs rtest tests
+SUBDIRS = $(subdirs) lib plugin cmd doc contrib share graphs rtest tests
.PHONY: doxygen
doxygen:

View File

@@ -0,0 +1,26 @@
From 5e53b643615fd53f3ff960521bbe9d95641e5f68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Sun, 20 Jan 2019 23:58:29 +0100
Subject: [PATCH] Use native mkdefs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
lib/gvpr/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/lib/gvpr/Makefile.am
+++ b/lib/gvpr/Makefile.am
@@ -59,7 +59,7 @@ mkdefs$(EXEEXT):
$(HOSTCC) $(srcdir)/mkdefs.c -o mkdefs$(EXEEXT)
gdefs.h: $(top_srcdir)/lib/gvpr/gprdata mkdefs$(EXEEXT)
- ./mkdefs$(EXEEXT) gdefs.h < $(top_srcdir)/lib/gvpr/gprdata
+ mkdefs$(EXEEXT) gdefs.h < $(top_srcdir)/lib/gvpr/gprdata
EXTRA_DIST = $(man_MANS) $(pdf_DATA) gprdata mkdefs.c gdefs.h trie.c gvprlib.vcxproj*

View File

@@ -0,0 +1,33 @@
From 926d9285f3367ae1bdb9ce1dce95f7de73b3a980 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 6 Aug 2019 12:42:19 -0700
Subject: [PATCH] plugin/pango: Include freetype headers explicitly
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Do not depend on pango automatically adding these headers
Fixes
| gvtextlayout_pango.c:140:10: error: unknown type name FT_Face
| FT_Face face;
| ^~~~~~~
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
plugin/pango/gvtextlayout_pango.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/plugin/pango/gvtextlayout_pango.c
+++ b/plugin/pango/gvtextlayout_pango.c
@@ -15,6 +15,10 @@
#include <stdlib.h>
#include <string.h>
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
#include "gvplugin_render.h"
#include "agxbuf.h"
#include "utils.h"

View File

@@ -0,0 +1,6 @@
#!/bin/sh
echo "Setting up graphviz..."
# Create /usr/lib/graphviz/config6
$OECORE_NATIVE_SYSROOT/usr/bin/dot -c

View File

@@ -0,0 +1,126 @@
SUMMARY = "Graph Visualization Tools"
HOMEPAGE = "http://www.graphviz.org"
LICENSE = "EPL-1.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=9109f5fc16cf963fb3cdd32781b3ce04"
DEPENDS = " \
intltool-native \
bison-native \
groff-native \
libtool \
gdk-pixbuf \
cairo \
pango \
expat \
freetype \
"
DEPENDS:append:class-target = " ${BPN}-native"
DEPENDS:append:class-nativesdk = " ${BPN}-native"
inherit autotools-brokensep pkgconfig gettext qemu
SRC_URI = "https://gitlab.com/api/v4/projects/4207231/packages/generic/${BPN}-releases/${PV}/${BP}.tar.xz \
"
# Use native mkdefs
SRC_URI:append:class-target = "\
file://0001-Set-use_tcl-to-be-empty-string-if-tcl-is-disabled.patch \
"
SRC_URI:append:class-nativesdk = "\
file://graphviz-setup.sh \
"
SRC_URI[sha256sum] = "6b16bf990df114195be669773a1dae975dbbffada45e1de2849ddeb5851bb9a8"
CVE_CHECK_IGNORE += "\
CVE-2014-9157 \
"
PACKAGECONFIG ??= "librsvg"
PACKAGECONFIG[librsvg] = "--with-librsvg,--without-librsvg,librsvg"
EXTRA_OECONF:append = " PS2PDF=/bin/echo"
EXTRA_OECONF:class-target = "\
--with-expatincludedir=${STAGING_INCDIR} \
--with-expatlibdir=${STAGING_LIBDIR} \
--without-included-ltdl \
--disable-java \
--disable-tcl \
--disable-r \
--disable-sharp \
"
EXTRA_OECONF:class-nativesdk = "\
--with-expatincludedir=${STAGING_INCDIR} \
--with-expatlibdir=${STAGING_LIBDIR} \
--without-included-ltdl \
--disable-java \
--disable-tcl \
--disable-r \
--disable-sharp \
"
EXTRA_OECONF:class-native = "\
--disable-tcl \
"
CFLAGS:append:class-target = " -D_typ_ssize_t=1 -D_long_double=1"
CFLAGS:append:class-nativesdk = " -D_typ_ssize_t=1 -D_long_double=1"
do_configure:prepend() {
cd ${S}
# create version.m4 and ignore libtoolize errors
./autogen.sh NOCONFIG || true
}
do_install:append:class-nativesdk() {
# graphviz-setup.sh must be executed at SDK installation
install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d
install -m 0755 ${WORKDIR}/graphviz-setup.sh ${D}${SDKPATHNATIVE}/post-relocate-setup.d
}
FILES:${PN}:class-nativesdk += "${SDKPATHNATIVE}"
# create /usr/lib/graphviz/config6
graphviz_sstate_postinst() {
mkdir -p ${SYSROOT_DESTDIR}${bindir}
dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN}
echo '#!/bin/sh' > $dest
echo '' >> $dest
echo 'dot -c' >> $dest
chmod 0755 $dest
}
SYSROOT_PREPROCESS_FUNCS:append:class-native = " graphviz_sstate_postinst"
pkg_postinst:${PN} () {
if [ -n "$D" ]; then
if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true', 'false', d)}; then
${@qemu_run_binary(d, '$D', '${bindir}/dot')} -c
fi
else
dot -c
fi
}
pkg_postrm:${PN} () {
rm -f $D${libdir}/graphviz/config*
rmdir --ignore-fail-on-non-empty $D${libdir}/graphviz
}
PACKAGE_WRITE_DEPS += "qemu-native"
PACKAGES =+ "${PN}-python ${PN}-perl ${PN}-demo"
FILES:${PN}-python += "${libdir}/python*/site-packages/ ${libdir}/graphviz/python/"
FILES:${PN}-perl += "${libdir}/perl5/*/vendor_perl/ ${libdir}/graphviz/perl/"
FILES:${PN}-demo += "${datadir}/graphviz/demo/"
RDEPENDS:${PN}-perl += "perl"
RDEPENDS:${PN}-python += "python3"
RDEPENDS:${PN}-demo += "python3 perl"
RRECOMMENDS:${PN} = "liberation-fonts"
INSANE_SKIP:${PN}-perl = "dev-so"
INSANE_SKIP:${PN}-python = "dev-so"
FILES_SOLIBSDEV:append = " ${libdir}/graphviz/lib*${SOLIBSDEV}"
RRECOMMENDS:${PN} = "liberation-fonts"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,34 @@
From f8ac48abded02353918b02db38629988bd111c46 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 27 Jun 2017 08:19:44 -0700
Subject: [PATCH 1/2] Include stdlib.h for exit() API
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes
main.c:81: warning: incompatible implicit declaration of built-in function exit
Patch from Debian
http://sources.debian.net/src/gtkperf/0.40%2Bds-2/debian/patches/01-include_stdlib.patch/
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main.c b/src/main.c
index 888eb36..c226799 100644
--- a/src/main.c
+++ b/src/main.c
@@ -11,6 +11,7 @@
#endif
#include <getopt.h>
+#include <stdlib.h>
#include "interface.h"
#include "support.h"
--
2.13.2

View File

@@ -0,0 +1,27 @@
From 6b5f695cb206cd8b3cbcbcd7713e52772e89306b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 2 Sep 2022 20:47:32 -0700
Subject: [PATCH] main.c: Define prototype for setup_appdata
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main.c b/src/main.c
index c226799..b4ce6d1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -18,6 +18,8 @@
#include "callbacks.h"
#include "appdata.h"
+void setup_appdata(AppData * appdata_in);
+
int
main (int argc, char **argv)
{
--
2.37.3

View File

@@ -0,0 +1,42 @@
From 47974b8473c5b928f6742caee466f5c2d4d2e9eb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 27 Jun 2017 08:22:26 -0700
Subject: [PATCH 2/2] timing.c: Fix format-security errors
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/timing.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/timing.c b/src/timing.c
index 0b8f0eb..c0668c9 100644
--- a/src/timing.c
+++ b/src/timing.c
@@ -97,7 +97,7 @@ add_test_info_time (AppData * appdata)
gtk_text_buffer_insert (appdata->textview_info_buffer, &iter,
timestring, -1);
- g_printf (timestring);
+ g_printf ("%s", timestring);
}
@@ -129,7 +129,7 @@ add_test_info_end (AppData * appdata)
gtk_statusbar_push (GTK_STATUSBAR (appdata->statusbar_main), 0,
" Test Finished");
- g_printf (timestring);
+ g_printf ("%s", timestring);
}
@@ -154,5 +154,5 @@ add_test_info_start (AppData * appdata)
gtk_statusbar_push (GTK_STATUSBAR (appdata->statusbar_main), 0,
" Running tests...");
- g_printf (timestring);
+ g_printf ("%s", timestring);
}
--
2.13.2

View File

@@ -0,0 +1,25 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =

View File

@@ -0,0 +1,36 @@
Fix build with gettext 0.20.x
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,7 @@
## If you don't want it to overwrite it,
## Please disable it in the Anjuta project configuration
-SUBDIRS = intl po src pixmaps
+SUBDIRS = po src pixmaps
gtkperfdocdir = ${prefix}/doc/gtkperf
gtkperfdoc_DATA = \
--- a/configure.in
+++ b/configure.in
@@ -31,8 +31,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GE
dnl Languages which your application supports
ALL_LINGUAS=""
-AM_GNU_GETTEXT
-AM_GNU_GETTEXT_VERSION(0.10.40)
+AM_GNU_GETTEXT([external])
dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
@@ -100,7 +99,6 @@ AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "
AC_OUTPUT([
Makefile
-intl/Makefile
po/Makefile.in
src/Makefile
pixmaps/Makefile

View File

@@ -0,0 +1,34 @@
SUMMARY = "GTK Performance tool"
SECTION = "libs"
LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
SRC_URI = "http://prdownloads.sourceforge.net/${BPN}/${BPN}_${PV}.tar.gz \
file://Makevars \
file://0001-Include-stdlib.h-for-exit-API.patch \
file://0002-timing.c-Fix-format-security-errors.patch \
file://gettext.patch \
file://0001-main.c-Define-prototype-for-setup_appdata.patch \
"
SRC_URI[md5sum] = "4331dde4bb83865e15482885fcb0cc53"
SRC_URI[sha256sum] = "9704344e732038eecbd007dd996a56293a6b027b5b76f3f036273a3fae1ab27b"
DEPENDS = "gtk+"
S = "${WORKDIR}/${BPN}"
inherit features_check autotools binconfig pkgconfig gettext
REQUIRED_DISTRO_FEATURES = "x11"
do_configure:prepend () {
rm -f ${S}/m4/init.m4
cp -f ${WORKDIR}/Makevars ${S}/po/
}
do_install:append () {
rm -rf ${D}/${exec_prefix}/doc
}
FILES:${PN} += "${exec_prefix}/share/duck.png"

View File

@@ -0,0 +1,44 @@
SUMMARY = "VCD (Value Change Dump) file waveform viewer"
DESCRIPTION = "gtkwave is a viewer for VCD (Value Change Dump) files which are usually created by digital circuit simulators. (These files have no connection to video CDs!) "
HOMEPAGE = "http://gtkwave.sourceforge.net/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e"
SRC_URI = "http://gtkwave.sourceforge.net/gtkwave-gtk3-${PV}.tar.gz"
SRC_URI[sha256sum] = "b4e1c2f718fb3c4b4f412a220876b9da599fe11745fb6f7eb4aed107b1106233"
S = "${WORKDIR}/${BPN}-gtk3-${PV}"
DEPENDS = " \
gperf-native \
gtk+3 \
gdk-pixbuf \
tcl \
tk \
bzip2 \
xz \
pango \
zlib \
"
inherit pkgconfig autotools gettext texinfo mime mime-xdg
inherit features_check
# depends on gtk+3 which has this restriction
# ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
# but https://github.com/gtkwave/gtkwave/blob/f9d82a82aa3ddc30ca47984278371f62c9a3bd81/gtkwave3-gtk3/src/gtk23compat.h#L10
# explicitly includes gdk/gdkwayland.h for gtk-3.22.26 and newer (oe-core currently has 3.24.29)
# and it needs x11 as well for tk dependency (so it happends to be both GTK3DISTROFEATURES instead of either of them)
REQUIRED_DISTRO_FEATURES = "wayland x11"
EXTRA_OECONF = " \
--enable-gtk3 \
--with-tcl=${STAGING_BINDIR_CROSS} \
--with-tk=${STAGING_BINDIR_CROSS} \
--with-tirpc \
--disable-mime-update \
"
FILES:${PN} = "${bindir} ${datadir}"
RDEPENDS:${PN} += "tk-lib"

View File

@@ -0,0 +1,42 @@
SUMMARY = "A graphic library for file loading, saving, rendering, and manipulation"
HOMEPAGE = "https://sourceforge.net/projects/enlightenment/"
SECTION = "libs"
LICENSE = "Imlib2"
LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35"
DEPENDS = "freetype "
PROVIDES = "virtual/imlib2"
PV = "1.7.1"
SRCREV = "01424487e360383a039dc123bc2a345fe7ea2535"
inherit autotools pkgconfig lib_package
AUTO_LIBNAME_PKGS = ""
SRC_URI = "git://git.enlightenment.org/old/legacy-${BPN}.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
PACKAGECONFIG ??= "jpeg png zlib ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
X11_DEPS = "virtual/libx11 libxext libice"
PACKAGECONFIG[x11] = "--with-x,--without-x,${X11_DEPS}"
PACKAGECONFIG[gif] = "--with-gif,--without-gif,giflib"
PACKAGECONFIG[jpeg] = "--with-jpeg,--without-jpeg,jpeg"
PACKAGECONFIG[png] = "--with-png,--without-png,libpng"
PACKAGECONFIG[tiff] = "--with-tiff,--without-tiff,tiff"
PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
PACKAGECONFIG[id3] = "--with-id3,--without-id3,libid3tag"
PACKAGES =+ "${BPN}-loaders ${BPN}-filters ${BPN}-data"
FILES:${PN}-data = "${datadir}"
FILES:imlib2-loaders = "${libdir}/imlib2/loaders/*.so"
FILES:imlib2-filters = "${libdir}/imlib2/filters/*.so"
inherit multilib_script
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/imlib2-config"

View File

@@ -0,0 +1,28 @@
SUMMARY = "Jpeg 2000 implementation"
HOMEPAGE = "https://jasper-software.github.io/jasper/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a80440d1d8f17d041c71c7271d6e06eb"
SRC_URI = "git://github.com/jasper-software/jasper.git;protocol=https;branch=master"
SRCREV = "fe00207dc10db1d7cc6f2757961c5c6bdfd10973"
CVE_CHECK_IGNORE += "\
CVE-2015-8751 \
"
S = "${WORKDIR}/git"
inherit cmake
PACKAGECONFIG ??= ""
PACKAGECONFIG[jpeg] = "-DJAS_ENABLE_LIBJPEG=true, -DJAS_ENABLE_LIBJPEG=false, jpeg"
PACKAGECONFIG[opengl] = "-DJAS_ENABLE_OPENGL=true, -DJAS_ENABLE_OPENGL=false, freeglut"
EXTRA_OECMAKE:append = " -DJAS_ENABLE_SHARED=true"
do_install:append() {
chrpath -d ${D}${bindir}/jasper
chrpath -d ${D}${bindir}/imginfo
chrpath -d ${D}${bindir}/imgcmp
chrpath -d ${D}${libdir}/libjasper.so.*
}

View File

@@ -0,0 +1,19 @@
DESCRIPTION = "A pedagogically-oriented open source site containing software that is broadly useful for image processing and image analysis applications"
DEPENDS = "jpeg tiff libpng zlib"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://leptonica-license.txt;md5=809b282cea2df68975fbe0ffe02b560f"
UPSTREAM_CHECK_URI = "https://github.com/DanBloomberg/leptonica/releases"
SRC_URI = "http://www.leptonica.org/source/leptonica-${PV}.tar.gz"
SRC_URI[sha256sum] = "155302ee914668c27b6fe3ca9ff2da63b245f6d62f3061c8f27563774b8ae2d6"
EXTRA_OECONF += " \
--without-libwebp \
"
PACKAGECONFIG ??= "giflib"
PACKAGECONFIG[openjpeg] = "--with-libopenjpeg,--without-libopenjpeg,openjpeg"
PACKAGECONFIG[giflib] = "--with-giflib,--without-giflib,giflib"
inherit autotools pkgconfig

View File

@@ -0,0 +1,31 @@
From fb6eb15b34b5b07a431bb4c3585341411a3e088f Mon Sep 17 00:00:00 2001
From: Markus Volk <f_l_k@t-online.de>
Date: Tue, 28 Feb 2023 13:42:18 +0100
Subject: [PATCH] libdecor-gtk.c: dont skip for conflicting_symbols
This is a hack that should be removed, once the underlying bug in glibc was fixed and
libdecor was updated to use dlmopen() instead of dlopen()
https://gitlab.freedesktop.org/libdecor/libdecor/-/issues/47
https://gitlab.freedesktop.org/libdecor/libdecor/-/issues/44
---
src/plugins/gtk/libdecor-gtk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/gtk/libdecor-gtk.c b/src/plugins/gtk/libdecor-gtk.c
index 228161e..fd91afb 100644
--- a/src/plugins/gtk/libdecor-gtk.c
+++ b/src/plugins/gtk/libdecor-gtk.c
@@ -2606,7 +2606,7 @@ libdecor_plugin_description = {
.priorities = priorities,
.constructor = libdecor_plugin_new,
.conflicting_symbols = {
- "png_free",
+ //"png_free",
NULL,
},
};
--
2.34.1

View File

@@ -0,0 +1,32 @@
SUMMARY = "libdecor - A client-side decorations library for Wayland clients"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7ae2be7fb1637141840314b51970a9f7"
SRC_URI = " \
git://gitlab.freedesktop.org/libdecor/libdecor.git;protocol=https;branch=master \
file://0001-libdecor-gtk.c-dont-skip-for-conflicting-symbols.patch \
"
DEPENDS = " \
cairo \
pango \
wayland \
wayland-native \
wayland-protocols \
"
S = "${WORKDIR}/git"
SRCREV = "a254d0c2ff0cbfcf0bbf14cc67cc403640880c01"
PACKAGECONFIG ?= "dbus ${@bb.utils.filter('DISTRO_FEATURES', 'gtk+3', d)}"
PACKAGECONFIG[dbus] = "-Ddbus=enabled,-Ddbus=disabled,dbus"
PACKAGECONFIG[demo] = "-Ddemo=true,-Ddemo=false,virtual/libegl libxkbcommon"
PACKAGECONFIG[install_demo] = "-Dinstall_demo=true,-Dinstall_demo=false"
PACKAGECONFIG[gtk+3] = "-Dgtk=enabled,-Dgtk=disabled,gtk+3"
inherit meson pkgconfig
EXTRA_OEMESON += "--buildtype release"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,31 @@
From a57c498f6c25aa297e49533c242525f2b9da7048 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 13 Aug 2020 18:20:42 -0700
Subject: [PATCH] Make extern declarations in header file
curobj is a static object in other places as well.
Fixes build with gcc10/-fno-common
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
fdesign/sp_spinner.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fdesign/sp_spinner.c b/fdesign/sp_spinner.c
index 04f2c19..6206daa 100644
--- a/fdesign/sp_spinner.c
+++ b/fdesign/sp_spinner.c
@@ -29,7 +29,7 @@
#include "spec/spinner_spec.h"
static FD_spinnerattrib * spn_attrib;
-FL_OBJECT *curobj;
+static FL_OBJECT *curobj;
/***************************************
--
2.28.0

View File

@@ -0,0 +1,33 @@
From d2d05928342f7f9f687ffea5e0b77f97f0ae5aad Mon Sep 17 00:00:00 2001
From: Wang Mingyu <wangmy@fujitsu.com>
Date: Wed, 7 Sep 2022 14:29:13 +0900
Subject: [PATCH] Modify include dir
error messagge:
../../xforms-1.2.4/lib/fd/cmdbr.h:28:10: fatal error: ../include/forms.h: No such file or directory
../include/forms.h specified in the header file cmdbr.h is not exist.
Upstream-Status: Pending
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
---
lib/fd/cmdbr.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/fd/cmdbr.h b/lib/fd/cmdbr.h
index 8495e05..2ddeced 100644
--- a/lib/fd/cmdbr.h
+++ b/lib/fd/cmdbr.h
@@ -25,7 +25,7 @@
#ifndef FD_cmd_h_
#define FD_cmd_h_
-#include "../include/forms.h"
+#include "include/forms.h"
/* Callbacks, globals and object handlers */
--
2.25.1

View File

@@ -0,0 +1,12 @@
diff -Naur xforms-1.2.3.orig/fdesign/Makefile.am xforms-1.2.3/fdesign/Makefile.am
--- xforms-1.2.3.orig/fdesign/Makefile.am 2019-02-24 12:58:51.968645873 +0000
+++ xforms-1.2.3/fdesign/Makefile.am 2019-02-24 13:00:48.500635163 +0000
@@ -11,7 +11,7 @@
fdesign.1:
cp -p $(srcdir)/fdesign.man fdesign.1
-INCLUDES = -I./xpm $(X_CFLAGS)
+INCLUDES = -I./xpm -I$(srcdir)/xpm $(X_CFLAGS)
bin_PROGRAMS = fdesign

View File

@@ -0,0 +1,12 @@
diff -Naur xforms-1.2.3.orig/lib/Makefile.am xforms-1.2.3/lib/Makefile.am
--- xforms-1.2.3.orig/lib/Makefile.am 2019-02-24 12:53:58.340678373 +0000
+++ xforms-1.2.3/lib/Makefile.am 2019-02-24 12:54:33.096674102 +0000
@@ -25,7 +25,7 @@
man_MANS = xforms.5
xforms.5:
- cp -p ./xforms.man xforms.5
+ cp -p $(srcdir)/xforms.man xforms.5
libforms_la_SOURCES = \
align.c \

View File

@@ -0,0 +1,12 @@
diff -Naur xforms-1.2.3.orig/fdesign/Makefile.am xforms-1.2.3/fdesign/Makefile.am
--- xforms-1.2.3.orig/fdesign/Makefile.am 2019-02-24 13:08:48.412603250 +0000
+++ xforms-1.2.3/fdesign/Makefile.am 2019-02-24 13:09:18.412601874 +0000
@@ -15,7 +15,7 @@
bin_PROGRAMS = fdesign
-fdesign_LDADD = $(top_srcdir)/lib/libforms.la $(X_LIBS) $(X_PRE_LIBS) $(XPM_LIB) -lX11 $(LIBS) $(X_EXTRA_LIBS)
+fdesign_LDADD = $(top_builddir)/lib/libforms.la $(X_LIBS) $(X_PRE_LIBS) $(XPM_LIB) -lX11 $(LIBS) $(X_EXTRA_LIBS)
fdesign_SOURCES = \
fd_attribs.c \

View File

@@ -0,0 +1,26 @@
DESCRIPTION = "The XForms graphical interface widget library "
HOMEPAGE = "http://savannah.nongnu.org/projects/xforms/"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=ade9a053df81f5b9408d2f4f5546df86"
SRC_URI = "http://download.savannah.nongnu.org/releases/xforms/xforms-${PV}.tar.gz \
file://fix-link-to-xforms-man.patch \
file://add-absolute-path-for-include-dir.patch \
file://fix-path-fdesign_LDADD.patch \
file://0001-Make-extern-declarations-in-header-file.patch \
file://0001-Modify-include-dir.patch \
"
SRC_URI[sha256sum] = "92b5e6466ea2dffca7332aec12734e65b3e961825eb3100b7d889c0d1abb4697"
inherit autotools features_check
REQUIRED_DISTRO_FEATURES = "opengl x11"
S = "${WORKDIR}/xforms-${PV}"
DEPENDS = "libxpm jpeg libx11 mesa"
RDEPENDS:${PN} = "bash"
EXTRA_OECONF = "--with-extra-inc=${S}/lib"

View File

@@ -0,0 +1,30 @@
DESCRIPTION = "libglvnd is a vendor-neutral dispatch layer for arbitrating \
OpenGL API calls between multiple vendors."
HOMEPAGE = "https://gitlab.freedesktop.org/glvnd/libglvnd"
LICENSE = "MIT & BSD-1-Clause & BSD-3-Clause & GPL-3.0-with-autoconf-exception"
LIC_FILES_CHKSUM = "file://README.md;beginline=323;md5=7ac5f0111f648b92fe5427efeb08e8c4"
SRC_URI = "git://git@gitlab.freedesktop.org/glvnd/libglvnd.git;protocol=https;branch=master"
# v1.5.0 tag
SRCREV = "b05bbcdaeb9b700cf7877e6d66f8fc3ac952295b"
REQUIRED_DISTRO_FEATURES = "opengl"
inherit meson pkgconfig features_check
S = "${WORKDIR}/git"
PACKAGECONFIG ?= "\
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl gles1 gles2', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'glx', '', d)} \
"
PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,libx11 libxext xorgproto"
PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,libx11 libxext xorgproto"
PACKAGECONFIG[egl] = "-Degl=true,-Degl=false,"
PACKAGECONFIG[gles1] = "-Dgles1=true,-Dgles1=false,"
PACKAGECONFIG[gles2] = "-Dgles2=true,-Dgles2=false,"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,23 @@
# Copyright (C) 2016 Khem Raj <raj.khem@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Development files for the Multiple-image Network Graphics library"
HOMEPAGE = "http://www.libpng.org/pub/mng/"
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://LICENSE;md5=32becdb8930f90eab219a8021130ec09"
SECTION = "devel"
DEPENDS = "zlib"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz"
SRC_URI[md5sum] = "7e9a12ba2a99dff7e736902ea07383d4"
SRC_URI[sha256sum] = "cf112a1fb02f5b1c0fce5cab11ea8243852c139e669c44014125874b14b7dfaa"
inherit autotools-brokensep pkgconfig
PACKAGECONFIG ??= "jpeg"
PACKAGECONFIG[jpeg] = "--with-jpeg,--without-jpeg,jpeg"
PACKAGECONFIG[lcms] = "--with-lcms2,--without-lcms2,lcms"
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,73 @@
From 44e4bb4cfb81024c8f5fd2e179e8a32c42756a2f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 23 Jul 2017 16:52:43 -0700
Subject: [PATCH] build: Pass --tag=CC explictly when using libtool
Do not depend solely on libtool heuristics which fail
in OE case when building with external compiler and
hardening flags
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makefile.in | 4 ++--
build-scripts/makedep.sh | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index ab51035..743ce30 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -72,10 +72,10 @@ depend:
include $(depend)
$(objects)/$(TARGET): $(OBJECTS)
- $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
+ $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
- $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) $(SDLMAIN_LDFLAGS)
+ $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) $(SDLMAIN_LDFLAGS)
install: all install-bin install-hdrs install-lib install-data install-man
diff --git a/build-scripts/makedep.sh b/build-scripts/makedep.sh
index 3b3863b..dba28f2 100755
--- a/build-scripts/makedep.sh
+++ b/build-scripts/makedep.sh
@@ -51,19 +51,19 @@ do echo "Generating dependencies for $src"
case $ext in
c) cat >>${output}.new <<__EOF__
- \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
+ \$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
__EOF__
;;
cc) cat >>${output}.new <<__EOF__
- \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
+ \$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
__EOF__
;;
m) cat >>${output}.new <<__EOF__
- \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
+ \$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
__EOF__
;;
@@ -75,7 +75,7 @@ __EOF__
;;
S) cat >>${output}.new <<__EOF__
- \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
+ \$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
__EOF__
;;
--
2.13.3

View File

@@ -0,0 +1,27 @@
From 97fefd050976bbbfca9608499f6a7d9fb86e70db Mon Sep 17 00:00:00 2001
From: Sam Lantinga <slouken@libsdl.org>
Date: Tue, 30 Jul 2019 11:00:00 -0700
Subject: [PATCH] Fixed bug 4538 - validate image size when loading BMP files
---
src/video/SDL_bmp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c
index 8eadc5f..5b5e12c 100644
--- a/src/video/SDL_bmp.c
+++ b/src/video/SDL_bmp.c
@@ -143,6 +143,11 @@ SDL_Surface * SDL_LoadBMP_RW (SDL_RWops *src, int freesrc)
(void) biYPelsPerMeter;
(void) biClrImportant;
+ if (biWidth <= 0 || biHeight == 0) {
+ SDL_SetError("BMP file with bad dimensions (%dx%d)", biWidth, biHeight);
+ was_error = SDL_TRUE;
+ goto done;
+ }
if (biHeight < 0) {
topDown = SDL_TRUE;
biHeight = -biHeight;
--
2.25.1

View File

@@ -0,0 +1,114 @@
# HG changeset patch
# User Petr Písař <ppisar@redhat.com>
# Date 1560182231 25200
# Mon Jun 10 08:57:11 2019 -0700
# Branch SDL-1.2
# Node ID a8afedbcaea0e84921dc770195c4699bda3ccdc5
# Parent faf9abbcfb5fe0d0ca23c4bf0394aa226ceccf02
CVE-2019-7572: Fix a buffer overwrite in IMA_ADPCM_decode
If data chunk was longer than expected based on a WAV format
definition, IMA_ADPCM_decode() tried to write past the output
buffer. This patch fixes it.
Based on patch from
<https://bugzilla.libsdl.org/show_bug.cgi?id=4496>.
CVE-2019-7572
https://bugzilla.libsdl.org/show_bug.cgi?id=4495
Signed-off-by: Petr Písař <ppisar@redhat.com>
# HG changeset patch
# User Petr Písař <ppisar@redhat.com>
# Date 1560041863 25200
# Sat Jun 08 17:57:43 2019 -0700
# Branch SDL-1.2
# Node ID e52413f5258600878f9a10d2f92605a729aa8976
# Parent 4e73be7b47877ae11d2279bd916910d469d18f8e
CVE-2019-7572: Fix a buffer overread in IMA_ADPCM_nibble
If an IMA ADPCM block contained an initial index out of step table
range (loaded in IMA_ADPCM_decode()), IMA_ADPCM_nibble() blindly used
this bogus value and that lead to a buffer overread.
This patch fixes it by moving clamping the index value at the
beginning of IMA_ADPCM_nibble() function instead of the end after
an update.
CVE-2019-7572
https://bugzilla.libsdl.org/show_bug.cgi?id=4495
Signed-off-by: Petr Písař <ppisar@redhat.com>
CVE: CVE-2019-7572
Upstream-Status: Backport
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
diff -r faf9abbcfb5f -r a8afedbcaea0 src/audio/SDL_wave.c
--- a/src/audio/SDL_wave.c Mon Jun 10 08:54:29 2019 -0700
+++ b/src/audio/SDL_wave.c Mon Jun 10 08:57:11 2019 -0700
@@ -346,7 +346,7 @@
static int IMA_ADPCM_decode(Uint8 **audio_buf, Uint32 *audio_len)
{
struct IMA_ADPCM_decodestate *state;
- Uint8 *freeable, *encoded, *encoded_end, *decoded;
+ Uint8 *freeable, *encoded, *encoded_end, *decoded, *decoded_end;
Sint32 encoded_len, samplesleft;
unsigned int c, channels;
@@ -373,6 +373,7 @@
return(-1);
}
decoded = *audio_buf;
+ decoded_end = decoded + *audio_len;
/* Get ready... Go! */
while ( encoded_len >= IMA_ADPCM_state.wavefmt.blockalign ) {
@@ -392,6 +393,7 @@
}
/* Store the initial sample we start with */
+ if (decoded + 2 > decoded_end) goto invalid_size;
decoded[0] = (Uint8)(state[c].sample&0xFF);
decoded[1] = (Uint8)(state[c].sample>>8);
decoded += 2;
@@ -402,6 +404,8 @@
while ( samplesleft > 0 ) {
for ( c=0; c<channels; ++c ) {
if (encoded + 4 > encoded_end) goto invalid_size;
+ if (decoded + 4 * 4 * channels > decoded_end)
+ goto invalid_size;
Fill_IMA_ADPCM_block(decoded, encoded,
c, channels, &state[c]);
encoded += 4;
diff -r 4e73be7b4787 -r e52413f52586 src/audio/SDL_wave.c
--- a/src/audio/SDL_wave.c Sat Jun 01 18:27:46 2019 +0100
+++ b/src/audio/SDL_wave.c Sat Jun 08 17:57:43 2019 -0700
@@ -264,6 +264,14 @@
};
Sint32 delta, step;
+ /* Clamp index value. The inital value can be invalid. */
+ if ( state->index > 88 ) {
+ state->index = 88;
+ } else
+ if ( state->index < 0 ) {
+ state->index = 0;
+ }
+
/* Compute difference and new sample value */
step = step_table[state->index];
delta = step >> 3;
@@ -275,12 +283,6 @@
/* Update index value */
state->index += index_table[nybble];
- if ( state->index > 88 ) {
- state->index = 88;
- } else
- if ( state->index < 0 ) {
- state->index = 0;
- }
/* Clamp output sample */
if ( state->sample > max_audioval ) {

View File

@@ -0,0 +1,68 @@
# HG changeset patch
# User Petr Písař <ppisar@redhat.com>
# Date 1560181859 25200
# Mon Jun 10 08:50:59 2019 -0700
# Branch SDL-1.2
# Node ID a6e3d2f5183e1cc300ad993e10e9ce077e13bd9c
# Parent 388987dff7bf8f1e214e69c2e4f1aa31e06396b5
CVE-2019-7574: Fix a buffer overread in IMA_ADPCM_decode
If data chunk was shorter than expected based on a WAV format
definition, IMA_ADPCM_decode() tried to read past the data chunk
buffer. This patch fixes it.
CVE-2019-7574
https://bugzilla.libsdl.org/show_bug.cgi?id=4496
Signed-off-by: Petr Písař <ppisar@redhat.com>
CVE: CVE-2019-7574
Upstream-Status: Backport
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
diff -r 388987dff7bf -r a6e3d2f5183e src/audio/SDL_wave.c
--- a/src/audio/SDL_wave.c Sat Jun 08 18:02:09 2019 -0700
+++ b/src/audio/SDL_wave.c Mon Jun 10 08:50:59 2019 -0700
@@ -331,7 +331,7 @@
static int IMA_ADPCM_decode(Uint8 **audio_buf, Uint32 *audio_len)
{
struct IMA_ADPCM_decodestate *state;
- Uint8 *freeable, *encoded, *decoded;
+ Uint8 *freeable, *encoded, *encoded_end, *decoded;
Sint32 encoded_len, samplesleft;
unsigned int c, channels;
@@ -347,6 +347,7 @@
/* Allocate the proper sized output buffer */
encoded_len = *audio_len;
encoded = *audio_buf;
+ encoded_end = encoded + encoded_len;
freeable = *audio_buf;
*audio_len = (encoded_len/IMA_ADPCM_state.wavefmt.blockalign) *
IMA_ADPCM_state.wSamplesPerBlock*
@@ -362,6 +363,7 @@
while ( encoded_len >= IMA_ADPCM_state.wavefmt.blockalign ) {
/* Grab the initial information for this block */
for ( c=0; c<channels; ++c ) {
+ if (encoded + 4 > encoded_end) goto invalid_size;
/* Fill the state information for this block */
state[c].sample = ((encoded[1]<<8)|encoded[0]);
encoded += 2;
@@ -384,6 +386,7 @@
samplesleft = (IMA_ADPCM_state.wSamplesPerBlock-1)*channels;
while ( samplesleft > 0 ) {
for ( c=0; c<channels; ++c ) {
+ if (encoded + 4 > encoded_end) goto invalid_size;
Fill_IMA_ADPCM_block(decoded, encoded,
c, channels, &state[c]);
encoded += 4;
@@ -395,6 +398,10 @@
}
SDL_free(freeable);
return(0);
+invalid_size:
+ SDL_SetError("Unexpected chunk length for an IMA ADPCM decoder");
+ SDL_free(freeable);
+ return(-1);
}
SDL_AudioSpec * SDL_LoadWAV_RW (SDL_RWops *src, int freesrc,

View File

@@ -0,0 +1,81 @@
# HG changeset patch
# User Petr Písař <ppisar@redhat.com>
# Date 1560183905 25200
# Mon Jun 10 09:25:05 2019 -0700
# Branch SDL-1.2
# Node ID a936f9bd3e381d67d8ddee8b9243f85799ea4798
# Parent fcbecae427951bac1684baaba2ade68221315140
CVE-2019-7575: Fix a buffer overwrite in MS_ADPCM_decode
If a WAV format defines shorter audio stream and decoded MS ADPCM data chunk
is longer, decoding continued past the output audio buffer.
This fix is based on a patch from
<https://bugzilla.libsdl.org/show_bug.cgi?id=4492>.
https://bugzilla.libsdl.org/show_bug.cgi?id=4493
CVE-2019-7575
Signed-off-by: Petr Písař <ppisar@redhat.com>
CVE: CVE-2019-7575
Upstream-Status: Backport
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
diff -r fcbecae42795 -r a936f9bd3e38 src/audio/SDL_wave.c
--- a/src/audio/SDL_wave.c Mon Jun 10 09:06:23 2019 -0700
+++ b/src/audio/SDL_wave.c Mon Jun 10 09:25:05 2019 -0700
@@ -122,7 +122,7 @@
static int MS_ADPCM_decode(Uint8 **audio_buf, Uint32 *audio_len)
{
struct MS_ADPCM_decodestate *state[2];
- Uint8 *freeable, *encoded, *encoded_end, *decoded;
+ Uint8 *freeable, *encoded, *encoded_end, *decoded, *decoded_end;
Sint32 encoded_len, samplesleft;
Sint8 nybble, stereo;
Sint16 *coeff[2];
@@ -142,6 +142,7 @@
return(-1);
}
decoded = *audio_buf;
+ decoded_end = decoded + *audio_len;
/* Get ready... Go! */
stereo = (MS_ADPCM_state.wavefmt.channels == 2);
@@ -149,7 +150,7 @@
state[1] = &MS_ADPCM_state.state[stereo];
while ( encoded_len >= MS_ADPCM_state.wavefmt.blockalign ) {
/* Grab the initial information for this block */
- if (encoded + 7 + (stereo ? 7 : 0) > encoded_end) goto too_short;
+ if (encoded + 7 + (stereo ? 7 : 0) > encoded_end) goto invalid_size;
state[0]->hPredictor = *encoded++;
if ( stereo ) {
state[1]->hPredictor = *encoded++;
@@ -179,6 +180,7 @@
coeff[1] = MS_ADPCM_state.aCoeff[state[1]->hPredictor];
/* Store the two initial samples we start with */
+ if (decoded + 4 + (stereo ? 4 : 0) > decoded_end) goto invalid_size;
decoded[0] = state[0]->iSamp2&0xFF;
decoded[1] = state[0]->iSamp2>>8;
decoded += 2;
@@ -200,7 +202,8 @@
samplesleft = (MS_ADPCM_state.wSamplesPerBlock-2)*
MS_ADPCM_state.wavefmt.channels;
while ( samplesleft > 0 ) {
- if (encoded + 1 > encoded_end) goto too_short;
+ if (encoded + 1 > encoded_end) goto invalid_size;
+ if (decoded + 4 > decoded_end) goto invalid_size;
nybble = (*encoded)>>4;
new_sample = MS_ADPCM_nibble(state[0],nybble,coeff[0]);
@@ -223,8 +226,8 @@
}
SDL_free(freeable);
return(0);
-too_short:
- SDL_SetError("Too short chunk for a MS ADPCM decoder");
+invalid_size:
+ SDL_SetError("Unexpected chunk length for a MS ADPCM decoder");
SDL_free(freeable);
return(-1);
invalid_predictor:

View File

@@ -0,0 +1,80 @@
# HG changeset patch
# User Petr Písař <ppisar@redhat.com>
# Date 1560182783 25200
# Mon Jun 10 09:06:23 2019 -0700
# Branch SDL-1.2
# Node ID fcbecae427951bac1684baaba2ade68221315140
# Parent a8afedbcaea0e84921dc770195c4699bda3ccdc5
CVE-2019-7573, CVE-2019-7576: Fix buffer overreads in InitMS_ADPCM
If MS ADPCM format chunk was too short, InitMS_ADPCM() parsing it
could read past the end of chunk data. This patch fixes it.
CVE-2019-7573
https://bugzilla.libsdl.org/show_bug.cgi?id=4491
CVE-2019-7576
https://bugzilla.libsdl.org/show_bug.cgi?id=4490
Signed-off-by: Petr Písař <ppisar@redhat.com>
CVE: CVE-2019-7573
CVE: CVE-2019-7576
Upstream-Status: Backport
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
diff -r a8afedbcaea0 -r fcbecae42795 src/audio/SDL_wave.c
--- a/src/audio/SDL_wave.c Mon Jun 10 08:57:11 2019 -0700
+++ b/src/audio/SDL_wave.c Mon Jun 10 09:06:23 2019 -0700
@@ -44,12 +44,13 @@
struct MS_ADPCM_decodestate state[2];
} MS_ADPCM_state;
-static int InitMS_ADPCM(WaveFMT *format)
+static int InitMS_ADPCM(WaveFMT *format, int length)
{
- Uint8 *rogue_feel;
+ Uint8 *rogue_feel, *rogue_feel_end;
int i;
/* Set the rogue pointer to the MS_ADPCM specific data */
+ if (length < sizeof(*format)) goto too_short;
MS_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
MS_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
MS_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
@@ -58,9 +59,11 @@
MS_ADPCM_state.wavefmt.bitspersample =
SDL_SwapLE16(format->bitspersample);
rogue_feel = (Uint8 *)format+sizeof(*format);
+ rogue_feel_end = (Uint8 *)format + length;
if ( sizeof(*format) == 16 ) {
rogue_feel += sizeof(Uint16);
}
+ if (rogue_feel + 4 > rogue_feel_end) goto too_short;
MS_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1]<<8)|rogue_feel[0]);
rogue_feel += sizeof(Uint16);
MS_ADPCM_state.wNumCoef = ((rogue_feel[1]<<8)|rogue_feel[0]);
@@ -70,12 +73,16 @@
return(-1);
}
for ( i=0; i<MS_ADPCM_state.wNumCoef; ++i ) {
+ if (rogue_feel + 4 > rogue_feel_end) goto too_short;
MS_ADPCM_state.aCoeff[i][0] = ((rogue_feel[1]<<8)|rogue_feel[0]);
rogue_feel += sizeof(Uint16);
MS_ADPCM_state.aCoeff[i][1] = ((rogue_feel[1]<<8)|rogue_feel[0]);
rogue_feel += sizeof(Uint16);
}
return(0);
+too_short:
+ SDL_SetError("Unexpected length of a chunk with a MS ADPCM format");
+ return(-1);
}
static Sint32 MS_ADPCM_nibble(struct MS_ADPCM_decodestate *state,
@@ -495,7 +502,7 @@
break;
case MS_ADPCM_CODE:
/* Try to understand this */
- if ( InitMS_ADPCM(format) < 0 ) {
+ if ( InitMS_ADPCM(format, lenread) < 0 ) {
was_error = 1;
goto done;
}

View File

@@ -0,0 +1,118 @@
# HG changeset patch
# User Petr Písař <ppisar@redhat.com>
# Date 1560182051 25200
# Mon Jun 10 08:54:11 2019 -0700
# Branch SDL-1.2
# Node ID 416136310b88cbeeff8773e573e90ac1e22b3526
# Parent a6e3d2f5183e1cc300ad993e10e9ce077e13bd9c
CVE-2019-7577: Fix a buffer overread in MS_ADPCM_decode
If RIFF/WAV data chunk length is shorter then expected for an audio
format defined in preceeding RIFF/WAV format headers, a buffer
overread can happen.
This patch fixes it by checking a MS ADPCM data to be decoded are not
past the initialized buffer.
CVE-2019-7577
Reproducer: https://bugzilla.libsdl.org/show_bug.cgi?id=4492
Signed-off-by: Petr Písař <ppisar@redhat.com>
# HG changeset patch
# User Petr Písař <ppisar@redhat.com>
# Date 1560182069 25200
# Mon Jun 10 08:54:29 2019 -0700
# Branch SDL-1.2
# Node ID faf9abbcfb5fe0d0ca23c4bf0394aa226ceccf02
# Parent 416136310b88cbeeff8773e573e90ac1e22b3526
CVE-2019-7577: Fix a buffer overread in MS_ADPCM_nibble and MS_ADPCM_decode
If a chunk of RIFF/WAV file with MS ADPCM encoding contains an invalid
predictor (a valid predictor's value is between 0 and 6 inclusive),
a buffer overread can happen when the predictor is used as an index
into an array of MS ADPCM coefficients.
The overead happens when indexing MS_ADPCM_state.aCoeff[] array in
MS_ADPCM_decode() and later when dereferencing a coef pointer in
MS_ADPCM_nibble().
This patch fixes it by checking the MS ADPCM predictor values fit
into the valid range.
CVE-2019-7577
Reproducer: https://bugzilla.libsdl.org/show_bug.cgi?id=4492
Signed-off-by: Petr Písař <ppisar@redhat.com>
CVE: CVE-2019-7577
Upstream-Status: Backport
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Refresh CVE-2019-7577.patch as it can't be applyed when using PATCHTOOL = "patch".
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
---
src/audio/SDL_wave.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/audio/SDL_wave.c b/src/audio/SDL_wave.c
index b4ad6c7..0bcf7e2 100644
--- a/src/audio/SDL_wave.c
+++ b/src/audio/SDL_wave.c
@@ -115,7 +115,7 @@ static Sint32 MS_ADPCM_nibble(struct MS_ADPCM_decodestate *state,
static int MS_ADPCM_decode(Uint8 **audio_buf, Uint32 *audio_len)
{
struct MS_ADPCM_decodestate *state[2];
- Uint8 *freeable, *encoded, *decoded;
+ Uint8 *freeable, *encoded, *encoded_end, *decoded;
Sint32 encoded_len, samplesleft;
Sint8 nybble, stereo;
Sint16 *coeff[2];
@@ -124,6 +124,7 @@ static int MS_ADPCM_decode(Uint8 **audio_buf, Uint32 *audio_len)
/* Allocate the proper sized output buffer */
encoded_len = *audio_len;
encoded = *audio_buf;
+ encoded_end = encoded + encoded_len;
freeable = *audio_buf;
*audio_len = (encoded_len/MS_ADPCM_state.wavefmt.blockalign) *
MS_ADPCM_state.wSamplesPerBlock*
@@ -141,10 +142,14 @@ static int MS_ADPCM_decode(Uint8 **audio_buf, Uint32 *audio_len)
state[1] = &MS_ADPCM_state.state[stereo];
while ( encoded_len >= MS_ADPCM_state.wavefmt.blockalign ) {
/* Grab the initial information for this block */
+ if (encoded + 7 + (stereo ? 7 : 0) > encoded_end) goto too_short;
state[0]->hPredictor = *encoded++;
if ( stereo ) {
state[1]->hPredictor = *encoded++;
}
+ if (state[0]->hPredictor >= 7 || state[1]->hPredictor >= 7) {
+ goto invalid_predictor;
+ }
state[0]->iDelta = ((encoded[1]<<8)|encoded[0]);
encoded += sizeof(Sint16);
if ( stereo ) {
@@ -188,6 +193,8 @@ static int MS_ADPCM_decode(Uint8 **audio_buf, Uint32 *audio_len)
samplesleft = (MS_ADPCM_state.wSamplesPerBlock-2)*
MS_ADPCM_state.wavefmt.channels;
while ( samplesleft > 0 ) {
+ if (encoded + 1 > encoded_end) goto too_short;
+
nybble = (*encoded)>>4;
new_sample = MS_ADPCM_nibble(state[0],nybble,coeff[0]);
decoded[0] = new_sample&0xFF;
@@ -209,6 +216,14 @@ static int MS_ADPCM_decode(Uint8 **audio_buf, Uint32 *audio_len)
}
SDL_free(freeable);
return(0);
+too_short:
+ SDL_SetError("Too short chunk for a MS ADPCM decoder");
+ SDL_free(freeable);
+ return(-1);
+invalid_predictor:
+ SDL_SetError("Invalid predictor value for a MS ADPCM decoder");
+ SDL_free(freeable);
+ return(-1);
}
struct IMA_ADPCM_decodestate {
--
2.7.4

View File

@@ -0,0 +1,64 @@
# HG changeset patch
# User Petr Písař <ppisar@redhat.com>
# Date 1560042129 25200
# Sat Jun 08 18:02:09 2019 -0700
# Branch SDL-1.2
# Node ID 388987dff7bf8f1e214e69c2e4f1aa31e06396b5
# Parent e52413f5258600878f9a10d2f92605a729aa8976
CVE-2019-7578: Fix a buffer overread in InitIMA_ADPCM
If IMA ADPCM format chunk was too short, InitIMA_ADPCM() parsing it
could read past the end of chunk data. This patch fixes it.
CVE-2019-7578
https://bugzilla.libsdl.org/show_bug.cgi?id=4494
Signed-off-by: Petr Písař <ppisar@redhat.com>
CVE: CVE-2019-7578
Upstream-Status: Backport
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
diff -r e52413f52586 -r 388987dff7bf src/audio/SDL_wave.c
--- a/src/audio/SDL_wave.c Sat Jun 08 17:57:43 2019 -0700
+++ b/src/audio/SDL_wave.c Sat Jun 08 18:02:09 2019 -0700
@@ -222,11 +222,12 @@
struct IMA_ADPCM_decodestate state[2];
} IMA_ADPCM_state;
-static int InitIMA_ADPCM(WaveFMT *format)
+static int InitIMA_ADPCM(WaveFMT *format, int length)
{
- Uint8 *rogue_feel;
+ Uint8 *rogue_feel, *rogue_feel_end;
/* Set the rogue pointer to the IMA_ADPCM specific data */
+ if (length < sizeof(*format)) goto too_short;
IMA_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
IMA_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
IMA_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
@@ -235,11 +236,16 @@
IMA_ADPCM_state.wavefmt.bitspersample =
SDL_SwapLE16(format->bitspersample);
rogue_feel = (Uint8 *)format+sizeof(*format);
+ rogue_feel_end = (Uint8 *)format + length;
if ( sizeof(*format) == 16 ) {
rogue_feel += sizeof(Uint16);
}
+ if (rogue_feel + 2 > rogue_feel_end) goto too_short;
IMA_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1]<<8)|rogue_feel[0]);
return(0);
+too_short:
+ SDL_SetError("Unexpected length of a chunk with an IMA ADPCM format");
+ return(-1);
}
static Sint32 IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state,Uint8 nybble)
@@ -471,7 +477,7 @@
break;
case IMA_ADPCM_CODE:
/* Try to understand this */
- if ( InitIMA_ADPCM(format) < 0 ) {
+ if ( InitIMA_ADPCM(format, lenread) < 0 ) {
was_error = 1;
goto done;
}

View File

@@ -0,0 +1,63 @@
# HG changeset patch
# User Petr Písař <ppisar@redhat.com>
# Date 1560259692 25200
# Tue Jun 11 06:28:12 2019 -0700
# Branch SDL-1.2
# Node ID f1f5878be5dbf63c1161a8ee52b8a86ece30e552
# Parent a936f9bd3e381d67d8ddee8b9243f85799ea4798
CVE-2019-7635: Reject BMP images with pixel colors out the palette
If a 1-, 4-, or 8-bit per pixel BMP image declares less used colors
than the palette offers an SDL_Surface with a palette of the indicated
number of used colors is created. If some of the image's pixel
refer to a color number higher then the maximal used colors, a subsequent
bliting operation on the surface will look up a color past a blit map
(that is based on the palette) memory. I.e. passing such SDL_Surface
to e.g. an SDL_DisplayFormat() function will result in a buffer overread in
a blit function.
This patch fixes it by validing each pixel's color to be less than the
maximal color number in the palette. A validation failure raises an
error from a SDL_LoadBMP_RW() function.
CVE-2019-7635
https://bugzilla.libsdl.org/show_bug.cgi?id=4498
Signed-off-by: Petr Písař <ppisar@redhat.com>
CVE: CVE-2019-7635
Upstream-Status: Backport
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
diff -r a936f9bd3e38 -r f1f5878be5db src/video/SDL_bmp.c
--- a/src/video/SDL_bmp.c Mon Jun 10 09:25:05 2019 -0700
+++ b/src/video/SDL_bmp.c Tue Jun 11 06:28:12 2019 -0700
@@ -308,6 +308,12 @@
}
*(bits+i) = (pixel>>shift);
pixel <<= ExpandBMP;
+ if ( bits[i] >= biClrUsed ) {
+ SDL_SetError(
+ "A BMP image contains a pixel with a color out of the palette");
+ was_error = SDL_TRUE;
+ goto done;
+ }
} }
break;
@@ -318,6 +324,16 @@
was_error = SDL_TRUE;
goto done;
}
+ if ( 8 == biBitCount && palette && biClrUsed < (1 << biBitCount ) ) {
+ for ( i=0; i<surface->w; ++i ) {
+ if ( bits[i] >= biClrUsed ) {
+ SDL_SetError(
+ "A BMP image contains a pixel with a color out of the palette");
+ was_error = SDL_TRUE;
+ goto done;
+ }
+ }
+ }
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
/* Byte-swap the pixels if needed. Note that the 24bpp
case has already been taken care of above. */

View File

@@ -0,0 +1,192 @@
# HG changeset patch
# User Petr Písař <ppisar@redhat.com>
# Date 1552788984 25200
# Sat Mar 16 19:16:24 2019 -0700
# Branch SDL-1.2
# Node ID 9b0e5c555c0f5ce6d2c3c19da6cc2c7fb5048bf2
# Parent 4646533663ae1d80c2cc6b2d6dbfb37c62491c1e
CVE-2019-7637: Fix in integer overflow in SDL_CalculatePitch
If a too large width is passed to SDL_SetVideoMode() the width travels
to SDL_CalculatePitch() where the width (e.g. 65535) is multiplied by
BytesPerPixel (e.g. 4) and the result is stored into Uint16 pitch
variable. During this arithmetics an integer overflow can happen (e.g.
the value is clamped as 65532). As a result SDL_Surface with a pitch
smaller than width * BytesPerPixel is created, too small pixel buffer
is allocated and when the SDL_Surface is processed in SDL_FillRect()
a buffer overflow occurs.
This can be reproduced with "./graywin -width 21312312313123213213213"
command.
This patch fixes is by using a very careful arithmetics in
SDL_CalculatePitch(). If an overflow is detected, an error is reported
back as a special 0 value. We assume that 0-width surfaces do not
occur in the wild. Since SDL_CalculatePitch() is a private function,
we can change the semantics.
CVE-2019-7637
https://bugzilla.libsdl.org/show_bug.cgi?id=4497
Signed-off-by: Petr Písař <ppisar@redhat.com>
CVE: CVE-2019-7637
Upstream-Status: Backport
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
diff -r 4646533663ae -r 9b0e5c555c0f src/video/SDL_pixels.c
--- a/src/video/SDL_pixels.c Sat Mar 16 18:35:33 2019 -0700
+++ b/src/video/SDL_pixels.c Sat Mar 16 19:16:24 2019 -0700
@@ -286,26 +286,53 @@
}
}
/*
- * Calculate the pad-aligned scanline width of a surface
+ * Calculate the pad-aligned scanline width of a surface. Return 0 in case of
+ * an error.
*/
Uint16 SDL_CalculatePitch(SDL_Surface *surface)
{
- Uint16 pitch;
+ unsigned int pitch = 0;
/* Surface should be 4-byte aligned for speed */
- pitch = surface->w*surface->format->BytesPerPixel;
+ /* The code tries to prevent from an Uint16 overflow. */;
+ for (Uint8 byte = surface->format->BytesPerPixel; byte; byte--) {
+ pitch += (unsigned int)surface->w;
+ if (pitch < surface->w) {
+ SDL_SetError("A scanline is too wide");
+ return(0);
+ }
+ }
switch (surface->format->BitsPerPixel) {
case 1:
- pitch = (pitch+7)/8;
+ if (pitch % 8) {
+ pitch = pitch / 8 + 1;
+ } else {
+ pitch = pitch / 8;
+ }
break;
case 4:
- pitch = (pitch+1)/2;
+ if (pitch % 2) {
+ pitch = pitch / 2 + 1;
+ } else {
+ pitch = pitch / 2;
+ }
break;
default:
break;
}
- pitch = (pitch + 3) & ~3; /* 4-byte aligning */
- return(pitch);
+ /* 4-byte aligning */
+ if (pitch & 3) {
+ if (pitch + 3 < pitch) {
+ SDL_SetError("A scanline is too wide");
+ return(0);
+ }
+ pitch = (pitch + 3) & ~3;
+ }
+ if (pitch > 0xFFFF) {
+ SDL_SetError("A scanline is too wide");
+ return(0);
+ }
+ return((Uint16)pitch);
}
/*
* Match an RGB value to a particular palette index
diff -r 4646533663ae -r 9b0e5c555c0f src/video/gapi/SDL_gapivideo.c
--- a/src/video/gapi/SDL_gapivideo.c Sat Mar 16 18:35:33 2019 -0700
+++ b/src/video/gapi/SDL_gapivideo.c Sat Mar 16 19:16:24 2019 -0700
@@ -733,6 +733,9 @@
video->w = gapi->w = width;
video->h = gapi->h = height;
video->pitch = SDL_CalculatePitch(video);
+ if (!current->pitch) {
+ return(NULL);
+ }
/* Small fix for WinCE/Win32 - when activating window
SDL_VideoSurface is equal to zero, so activating code
diff -r 4646533663ae -r 9b0e5c555c0f src/video/nanox/SDL_nxvideo.c
--- a/src/video/nanox/SDL_nxvideo.c Sat Mar 16 18:35:33 2019 -0700
+++ b/src/video/nanox/SDL_nxvideo.c Sat Mar 16 19:16:24 2019 -0700
@@ -378,6 +378,10 @@
current -> w = width ;
current -> h = height ;
current -> pitch = SDL_CalculatePitch (current) ;
+ if (!current->pitch) {
+ current = NULL;
+ goto done;
+ }
NX_ResizeImage (this, current, flags) ;
}
diff -r 4646533663ae -r 9b0e5c555c0f src/video/ps2gs/SDL_gsvideo.c
--- a/src/video/ps2gs/SDL_gsvideo.c Sat Mar 16 18:35:33 2019 -0700
+++ b/src/video/ps2gs/SDL_gsvideo.c Sat Mar 16 19:16:24 2019 -0700
@@ -479,6 +479,9 @@
current->w = width;
current->h = height;
current->pitch = SDL_CalculatePitch(current);
+ if (!current->pitch) {
+ return(NULL);
+ }
/* Memory map the DMA area for block memory transfer */
if ( ! mapped_mem ) {
diff -r 4646533663ae -r 9b0e5c555c0f src/video/ps3/SDL_ps3video.c
--- a/src/video/ps3/SDL_ps3video.c Sat Mar 16 18:35:33 2019 -0700
+++ b/src/video/ps3/SDL_ps3video.c Sat Mar 16 19:16:24 2019 -0700
@@ -339,6 +339,9 @@
current->w = width;
current->h = height;
current->pitch = SDL_CalculatePitch(current);
+ if (!current->pitch) {
+ return(NULL);
+ }
/* Alloc aligned mem for current->pixels */
s_pixels = memalign(16, current->h * current->pitch);
diff -r 4646533663ae -r 9b0e5c555c0f src/video/windib/SDL_dibvideo.c
--- a/src/video/windib/SDL_dibvideo.c Sat Mar 16 18:35:33 2019 -0700
+++ b/src/video/windib/SDL_dibvideo.c Sat Mar 16 19:16:24 2019 -0700
@@ -675,6 +675,9 @@
video->w = width;
video->h = height;
video->pitch = SDL_CalculatePitch(video);
+ if (!current->pitch) {
+ return(NULL);
+ }
/* Small fix for WinCE/Win32 - when activating window
SDL_VideoSurface is equal to zero, so activating code
diff -r 4646533663ae -r 9b0e5c555c0f src/video/windx5/SDL_dx5video.c
--- a/src/video/windx5/SDL_dx5video.c Sat Mar 16 18:35:33 2019 -0700
+++ b/src/video/windx5/SDL_dx5video.c Sat Mar 16 19:16:24 2019 -0700
@@ -1127,6 +1127,9 @@
video->w = width;
video->h = height;
video->pitch = SDL_CalculatePitch(video);
+ if (!current->pitch) {
+ return(NULL);
+ }
#ifndef NO_CHANGEDISPLAYSETTINGS
/* Set fullscreen mode if appropriate.
diff -r 4646533663ae -r 9b0e5c555c0f src/video/x11/SDL_x11video.c
--- a/src/video/x11/SDL_x11video.c Sat Mar 16 18:35:33 2019 -0700
+++ b/src/video/x11/SDL_x11video.c Sat Mar 16 19:16:24 2019 -0700
@@ -1225,6 +1225,10 @@
current->w = width;
current->h = height;
current->pitch = SDL_CalculatePitch(current);
+ if (!current->pitch) {
+ current = NULL;
+ goto done;
+ }
if (X11_ResizeImage(this, current, flags) < 0) {
current = NULL;
goto done;

View File

@@ -0,0 +1,38 @@
# HG changeset patch
# User Sam Lantinga <slouken@libsdl.org>
# Date 1550504903 28800
# Mon Feb 18 07:48:23 2019 -0800
# Branch SDL-1.2
# Node ID 19d8c3b9c25143f71a34ff40ce1df91b4b3e3b78
# Parent 8586f153eedec4c4e07066d6248ebdf67f10a229
Fixed bug 4500 - Heap-Buffer Overflow in Map1toN pertaining to SDL_pixels.c
Petr Pisar
The reproducer has these data in BITMAPINFOHEADER:
biSize = 40
biBitCount = 8
biClrUsed = 131075
SDL_LoadBMP_RW() function passes biBitCount as a color depth to SDL_CreateRGBSurface(), thus 256-color pallete is allocated. But then biClrUsed colors are read from a file and stored into the palette. SDL_LoadBMP_RW should report an error if biClrUsed is greater than 2^biBitCount.
CVE: CVE-2019-7638
CVE: CVE-2019-7636
Upstream-Status: Backport
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
diff -r 8586f153eede -r 19d8c3b9c251 src/video/SDL_bmp.c
--- a/src/video/SDL_bmp.c Sun Jan 13 15:27:50 2019 +0100
+++ b/src/video/SDL_bmp.c Mon Feb 18 07:48:23 2019 -0800
@@ -233,6 +233,10 @@
if ( palette ) {
if ( biClrUsed == 0 ) {
biClrUsed = 1 << biBitCount;
+ } else if ( biClrUsed > (1 << biBitCount) ) {
+ SDL_SetError("BMP file has an invalid number of colors");
+ was_error = SDL_TRUE;
+ goto done;
}
if ( biSize == 12 ) {
for ( i = 0; i < (int)biClrUsed; ++i ) {

View File

@@ -0,0 +1,19 @@
libX11-1.5.99.901 has changed prototype of _XData32
Upstream-Status: Backport
<http://bugzilla.libsdl.org/show_bug.cgi?id=1769>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
diff -r b6b2829cd7ef src/video/x11/SDL_x11sym.h
--- a/src/video/x11/SDL_x11sym.h Wed Feb 27 15:20:31 2013 -0800
+++ b/src/video/x11/SDL_x11sym.h Wed Mar 27 16:07:23 2013 +0100
@@ -165,7 +165,7 @@
*/
#ifdef LONG64
SDL_X11_MODULE(IO_32BIT)
-SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
+SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
#endif

View File

@@ -0,0 +1,187 @@
Rather than code which doesn't even work properly when cross compiling,
lets just use pkg-config instead. Its a little simpler.
RP 2014/6/20
Upstream-Status: Pending
Index: SDL-1.2.15/sdl.m4
===================================================================
--- SDL-1.2.15.orig/sdl.m4
+++ SDL-1.2.15/sdl.m4
@@ -12,174 +12,8 @@ dnl Test for SDL, and define SDL_CFLAGS
dnl
AC_DEFUN([AM_PATH_SDL],
[dnl
-dnl Get the cflags and libraries from the sdl-config script
-dnl
-AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
- sdl_prefix="$withval", sdl_prefix="")
-AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
- sdl_exec_prefix="$withval", sdl_exec_prefix="")
-AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
- , enable_sdltest=yes)
-
- if test x$sdl_exec_prefix != x ; then
- sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
- if test x${SDL_CONFIG+set} != xset ; then
- SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
- fi
- fi
- if test x$sdl_prefix != x ; then
- sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
- if test x${SDL_CONFIG+set} != xset ; then
- SDL_CONFIG=$sdl_prefix/bin/sdl-config
- fi
- fi
-
- as_save_PATH="$PATH"
- if test "x$prefix" != xNONE; then
- PATH="$prefix/bin:$prefix/usr/bin:$PATH"
- fi
- AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
- PATH="$as_save_PATH"
min_sdl_version=ifelse([$1], ,0.11.0,$1)
- AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
- no_sdl=""
- if test "$SDL_CONFIG" = "no" ; then
- no_sdl=yes
- else
- SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
- SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
-
- sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_sdltest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_CXXFLAGS="$CXXFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $SDL_CFLAGS"
- CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
- LIBS="$LIBS $SDL_LIBS"
-dnl
-dnl Now check if the installed SDL is sufficiently new. (Also sanity
-dnl checks the results of sdl-config to some extent
-dnl
- rm -f conf.sdltest
- AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "SDL.h"
-
-char*
-my_strdup (char *str)
-{
- char *new_str;
-
- if (str)
- {
- new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
- strcpy (new_str, str);
- }
- else
- new_str = NULL;
-
- return new_str;
-}
-
-int main (int argc, char *argv[])
-{
- int major, minor, micro;
- char *tmp_version;
-
- /* This hangs on some systems (?)
- system ("touch conf.sdltest");
- */
- { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = my_strdup("$min_sdl_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
- printf("%s, bad version string\n", "$min_sdl_version");
- exit(1);
- }
-
- if (($sdl_major_version > major) ||
- (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
- (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
- printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
- printf("*** best to upgrade to the required version.\n");
- printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
- printf("*** to point to the correct copy of sdl-config, and remove the file\n");
- printf("*** config.cache before re-running configure\n");
- return 1;
- }
-}
-
-],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- CXXFLAGS="$ac_save_CXXFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_sdl" = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$SDL_CONFIG" = "no" ; then
- echo "*** The sdl-config script installed by SDL could not be found"
- echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the SDL_CONFIG environment variable to the"
- echo "*** full path to sdl-config."
- else
- if test -f conf.sdltest ; then
- :
- else
- echo "*** Could not run SDL test program, checking why..."
- CFLAGS="$CFLAGS $SDL_CFLAGS"
- CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
- LIBS="$LIBS $SDL_LIBS"
- AC_TRY_LINK([
-#include <stdio.h>
-#include "SDL.h"
-
-int main(int argc, char *argv[])
-{ return 0; }
-#undef main
-#define main K_and_R_C_main
-], [ return 0; ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding SDL or finding the wrong"
- echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means SDL was incorrectly installed"
- echo "*** or that you have moved SDL since it was installed. In the latter case, you"
- echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
- CFLAGS="$ac_save_CFLAGS"
- CXXFLAGS="$ac_save_CXXFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- SDL_CFLAGS=""
- SDL_LIBS=""
- ifelse([$3], , :, [$3])
- fi
+ PKG_CHECK_MODULES([SDL], [sdl >= $min_sdl_version])
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
- rm -f conf.sdltest
])

View File

@@ -0,0 +1,19 @@
SUMMARY = "SDL graphics drawing primitives and other support functions"
SECTION = "libs"
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5d1de21f0b70830e299905eac3419084"
DEPENDS = "libsdl"
SRC_URI = "http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-${PV}.tar.gz"
SRC_URI[md5sum] = "ea24ed4b82ff1304809c363494fa8e16"
SRC_URI[sha256sum] = "556eedc06b6cf29eb495b6d27f2dcc51bf909ad82389ba2fa7bdc4dec89059c0"
S = "${WORKDIR}/SDL_gfx-${PV}"
inherit autotools pkgconfig
EXTRA_OECONF += " \
--disable-mmx \
"

Some files were not shown because too many files have changed in this diff Show More