Mercurial > vanilla
changeset 505:7828241c9634
graphics: convert packages to clang
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 09 Apr 2019 20:05:00 +0200 |
parents | 162a9418ba15 |
children | e81cc338d937 |
files | graphics/cairo/cairo.sh graphics/gdk-pixbuf/gdk-pixbuf.sh graphics/graphviz/graphviz.sh graphics/gtk/gtk.sh graphics/gtk2/gtk2.sh graphics/libepoxy/libepoxy.sh graphics/libgd/libgd.sh graphics/libjpeg-turbo/libjpeg-turbo.sh graphics/libpng/libpng.sh graphics/libtiff/libtiff.sh graphics/wayland/wayland.sh graphics/weston/gobject.patch graphics/weston/musl.patch graphics/weston/weston.sh |
diffstat | 14 files changed, 103 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/graphics/cairo/cairo.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/cairo/cairo.sh Tue Apr 09 20:05:00 2019 +0200 @@ -26,7 +26,7 @@ : ${CHOST:=$(uname -m)-linux-musl} : ${CBUILD:=$(uname -m)-linux-musl} -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=}
--- a/graphics/gdk-pixbuf/gdk-pixbuf.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/gdk-pixbuf/gdk-pixbuf.sh Tue Apr 09 20:05:00 2019 +0200 @@ -24,9 +24,9 @@ PKGDEPENDS="dev/meson:build" PKGOPTIONS="JASPER JPEG PNG TIFF X" -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} -: ${CXX:=g++} +: ${CXX:=clang++} : ${CXXFLAGS:=-O2} : ${LDFLAGS:=} : ${JASPER:=no}
--- a/graphics/graphviz/graphviz.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/graphviz/graphviz.sh Tue Apr 09 20:05:00 2019 +0200 @@ -26,9 +26,9 @@ : ${CHOST:=$(uname -m)-linux-musl} : ${CBUILD:=$(uname -m)-linux-musl} -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} -: ${CXX:=g++} +: ${CXX:=clang++} : ${CXXFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=}
--- a/graphics/gtk/gtk.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/gtk/gtk.sh Tue Apr 09 20:05:00 2019 +0200 @@ -24,9 +24,9 @@ PKGDEPENDS="graphics/cairo" PKGOPTIONS="CUPS NLS WAYLAND X" -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} -: ${CXX:=g++} +: ${CXX:=clang++} : ${CXXFLAGS:=-O2} : ${LDFLAGS:=} : ${CUPS:=yes}
--- a/graphics/gtk2/gtk2.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/gtk2/gtk2.sh Tue Apr 09 20:05:00 2019 +0200 @@ -39,7 +39,7 @@ : ${CC:=clang} : ${CFLAGS:=-O2} -: ${CXX:=clang++} +: ${CXX:=clanclang++} : ${CXXFLAGS:=-O2} : ${LDFLAGS:=} : ${CUPS:=yes}
--- a/graphics/libepoxy/libepoxy.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/libepoxy/libepoxy.sh Tue Apr 09 20:05:00 2019 +0200 @@ -26,7 +26,7 @@ : ${CHOST:=$(uname -m)-linux-musl} : ${CBUILD:=$(uname -m)-linux-musl} -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=}
--- a/graphics/libgd/libgd.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/libgd/libgd.sh Tue Apr 09 20:05:00 2019 +0200 @@ -25,7 +25,7 @@ : ${CHOST:=$(uname -m)-linux-musl} : ${CBUILD:=$(uname -m)-linux-musl} -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=}
--- a/graphics/libjpeg-turbo/libjpeg-turbo.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/libjpeg-turbo/libjpeg-turbo.sh Tue Apr 09 20:05:00 2019 +0200 @@ -23,7 +23,7 @@ PKGDOWNLOAD="https://downloads.sourceforge.net/project/$PKGNAME/$PKGVERSION/$PKGNAME-$PKGVERSION.tar.gz" PKGDEPENDS="dev/cmake:build dev/nasm:build" -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} build()
--- a/graphics/libpng/libpng.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/libpng/libpng.sh Tue Apr 09 20:05:00 2019 +0200 @@ -24,7 +24,7 @@ : ${CHOST:=$(uname -m)-linux-musl} : ${CBUILD:=$(uname -m)-linux-musl} -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=}
--- a/graphics/libtiff/libtiff.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/libtiff/libtiff.sh Tue Apr 09 20:05:00 2019 +0200 @@ -25,9 +25,9 @@ : ${CHOST:=$(uname -m)-linux-musl} : ${CBUILD:=$(uname -m)-linux-musl} -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} -: ${CXX:=g++} +: ${CXX:=clang++} : ${CXXFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=}
--- a/graphics/wayland/wayland.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/wayland/wayland.sh Tue Apr 09 20:05:00 2019 +0200 @@ -26,7 +26,7 @@ : ${CHOST:=$(uname -m)-linux-musl} : ${CBUILD:=$(uname -m)-linux-musl} -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graphics/weston/gobject.patch Tue Apr 09 20:05:00 2019 +0200 @@ -0,0 +1,11 @@ +--- configure.ac.orig 2019-04-09 10:19:24.619587683 +0200 ++++ configure.ac 2019-04-09 10:19:44.374131149 +0200 +@@ -458,7 +458,7 @@ + [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])], + [have_cairo_egl=no]) + +- PKG_CHECK_MODULES(PANGO, [pangocairo pango glib-2.0 >= 2.36], [have_pango=yes], [have_pango=no]) ++ PKG_CHECK_MODULES(PANGO, [pangocairo pango glib-2.0 >= 2.36 gobject-2.0], [have_pango=yes], [have_pango=no]) + fi + + AC_ARG_ENABLE(resize-optimization,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graphics/weston/musl.patch Tue Apr 09 20:05:00 2019 +0200 @@ -0,0 +1,72 @@ +diff --git a/Makefile.am b/Makefile.am +index 5407b593ebb951031e79a70dda3b7dd555d1c8a9..5c6a051914a03ebe531e9c9a90b5cd199988a9a4 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -230,6 +230,7 @@ libsession_helper_la_SOURCES = \ + libweston/launcher-util.c \ + libweston/launcher-util.h \ + libweston/launcher-impl.h \ ++ libweston/weston-error.h \ + libweston/weston-launch.h \ + libweston/launcher-weston-launch.c \ + libweston/launcher-direct.c +diff --git a/configure.ac b/configure.ac +index c05ad01160040a0cb30d153858bbf0247f183a57..8cfec6871e5c2c9ac0df390b47c9d22ecea88ba4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -126,6 +126,7 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], + [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")], + [[#include <time.h>]]) + ++AC_CHECK_HEADERS([error.h]) + AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) + + # check for libdrm as a build-time dependency only +diff --git a/libweston/weston-error.h b/libweston/weston-error.h +new file mode 100644 +index 0000000000000000000000000000000000000000..bc7b95bda0a1772664d78119255b2e966cab8a15 +--- /dev/null ++++ b/libweston/weston-error.h +@@ -0,0 +1,22 @@ ++#ifndef _WESTON_ERROR_H ++#define _WESTON_ERROR_H ++ ++#if defined(HAVE_ERROR_H) ++#include <error.h> ++#else ++#include <string.h> ++#define _weston_error(S, E, F, ...) do { \ ++ if (E) { \ ++ printf("\n"); \ ++ fprintf(stderr, F ": %s", ##__VA_ARGS__, strerror(E)); \ ++ exit(S); \ ++ } else { \ ++ printf("\n"); \ ++ fprintf(stderr, F, ##__VA_ARGS__); \ ++ exit(S); }\ ++} while(0) ++ ++#define error _weston_error ++#endif ++ ++#endif +diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c +index bf73e0d616a0d0efc228909c48bcb6b3ad6660ca..90644394309f3ee7e33bc7fafc2f3150f0a8d2b3 100644 +--- a/libweston/weston-launch.c ++++ b/libweston/weston-launch.c +@@ -33,7 +33,6 @@ + #include <poll.h> + #include <errno.h> + +-#include <error.h> + #include <getopt.h> + + #include <sys/types.h> +@@ -59,6 +58,7 @@ + #endif + + #include "weston-launch.h" ++#include "weston-error.h" + + #define DRM_MAJOR 226 +
--- a/graphics/weston/weston.sh Mon Apr 08 20:41:30 2019 +0200 +++ b/graphics/weston/weston.sh Tue Apr 09 20:05:00 2019 +0200 @@ -25,7 +25,7 @@ : ${CHOST:=$(uname -m)-linux-musl} : ${CBUILD:=$(uname -m)-linux-musl} -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=} @@ -60,6 +60,10 @@ tar xvaf $PKGNAME-$PKGVERSION.tar.xz pushd $PKGNAME-$PKGVERSION + # https://gitlab.freedesktop.org/wayland/weston/merge_requests/135 + patch -p1 < ../musl.patch + patch -p0 < ../gobject.patch + autoreconf -vif CC="$CC" \ CFLAGS="$CFLAGS" \ LDFLAGS="$LDFLAGS" \