summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/sys-kernel/linux-image-redcore-lts/files/linux-pkg-config.patch170
-rw-r--r--packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-013
2 files changed, 180 insertions, 3 deletions
diff --git a/packages/sys-kernel/linux-image-redcore-lts/files/linux-pkg-config.patch b/packages/sys-kernel/linux-image-redcore-lts/files/linux-pkg-config.patch
new file mode 100644
index 0000000..7ed4014
--- /dev/null
+++ b/packages/sys-kernel/linux-image-redcore-lts/files/linux-pkg-config.patch
@@ -0,0 +1,170 @@
+diff -Nur a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
+--- a/scripts/kconfig/lxdialog/check-lxdialog.sh 2018-08-18 09:48:00.000000000 +0100
++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh 2018-10-14 21:09:22.771609384 +0100
+@@ -5,8 +5,8 @@
+ # What library to link
+ ldflags()
+ {
+- pkg-config --libs ncursesw 2>/dev/null && exit
+- pkg-config --libs ncurses 2>/dev/null && exit
++ $(PKG-CONFIG) --libs ncursesw 2>/dev/null && exit
++ $(PKG-CONFIG) --libs ncurses 2>/dev/null && exit
+ for ext in so a dll.a dylib ; do
+ for lib in ncursesw ncurses curses ; do
+ $cc -print-file-name=lib${lib}.${ext} | grep -q /
+@@ -22,9 +22,9 @@
+ # Where is ncurses.h?
+ ccflags()
+ {
+- if pkg-config --cflags ncursesw 2>/dev/null; then
++ if $(PKG-CONFIG) --cflags ncursesw 2>/dev/null; then
+ echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
+- elif pkg-config --cflags ncurses 2>/dev/null; then
++ elif $(PKG-CONFIG) --cflags ncurses 2>/dev/null; then
+ echo '-DCURSES_LOC="<ncurses.h>"'
+ elif [ -f /usr/include/ncursesw/curses.h ]; then
+ echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"'
+diff -Nur a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
+--- a/scripts/kconfig/Makefile 2018-08-18 09:48:00.000000000 +0100
++++ b/scripts/kconfig/Makefile 2018-10-14 21:10:09.702147539 +0100
+@@ -216,15 +216,15 @@
+ HOSTLOADLIBES_qconf = $(KC_QT_LIBS)
+ HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
+
+-HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
+-HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
++HOSTLOADLIBES_gconf = `$(PKG-CONFIG) --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
++HOSTCFLAGS_gconf.o = `$(PKG-CONFIG) --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
+ -Wno-missing-prototypes
+
+ HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
+
+ HOSTLOADLIBES_nconf = $(shell \
+- pkg-config --libs menuw panelw ncursesw 2>/dev/null \
+- || pkg-config --libs menu panel ncurses 2>/dev/null \
++ $(PKG-CONFIG) --libs menuw panelw ncursesw 2>/dev/null \
++ || $(PKG-CONFIG) --libs menu panel ncurses 2>/dev/null \
+ || echo "-lmenu -lpanel -lncurses" )
+ $(obj)/qconf.o: $(obj)/.tmp_qtcheck
+
+@@ -235,17 +235,17 @@
+ # Qt needs some extra effort...
+ $(obj)/.tmp_qtcheck:
+ @set -e; $(kecho) " CHECK qt"; \
+- if pkg-config --exists Qt5Core; then \
+- cflags="-std=c++11 -fPIC `pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets`"; \
+- libs=`pkg-config --libs Qt5Core Qt5Gui Qt5Widgets`; \
+- moc=`pkg-config --variable=host_bins Qt5Core`/moc; \
+- elif pkg-config --exists QtCore; then \
+- cflags=`pkg-config --cflags QtCore QtGui`; \
+- libs=`pkg-config --libs QtCore QtGui`; \
+- moc=`pkg-config --variable=moc_location QtCore`; \
++ if $(PKG-CONFIG) --exists Qt5Core; then \
++ cflags="-std=c++11 -fPIC `$(PKG-CONFIG) --cflags Qt5Core Qt5Gui Qt5Widgets`"; \
++ libs=`$(PKG-CONFIG) --libs Qt5Core Qt5Gui Qt5Widgets`; \
++ moc=`$(PKG-CONFIG) --variable=host_bins Qt5Core`/moc; \
++ elif $(PKG-CONFIG) --exists QtCore; then \
++ cflags=`$(PKG-CONFIG) --cflags QtCore QtGui`; \
++ libs=`$(PKG-CONFIG) --libs QtCore QtGui`; \
++ moc=`$(PKG-CONFIG) --variable=moc_location QtCore`; \
+ else \
+ echo >&2 "*"; \
+- echo >&2 "* Could not find Qt via pkg-config."; \
++ echo >&2 "* Could not find Qt via $(PKG-CONFIG)."; \
+ echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH"; \
+ echo >&2 "*"; \
+ exit 1; \
+@@ -262,8 +262,8 @@
+
+ # GTK+ needs some extra effort, too...
+ $(obj)/.tmp_gtkcheck:
+- @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \
+- if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \
++ @if `$(PKG-CONFIG) --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \
++ if `$(PKG-CONFIG) --atleast-version=2.0.0 gtk+-2.0`; then \
+ touch $@; \
+ else \
+ echo >&2 "*"; \
+diff -Nur a/tools/build/feature/Makefile b/tools/build/feature/Makefile
+--- a/tools/build/feature/Makefile 2018-08-18 09:48:00.000000000 +0100
++++ b/tools/build/feature/Makefile 2018-10-14 21:10:22.198558244 +0100
+@@ -57,7 +57,7 @@
+
+ CC ?= $(CROSS_COMPILE)gcc
+ CXX ?= $(CROSS_COMPILE)g++
+-PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
++PKG_CONFIG ?= $(CROSS_COMPILE)$(PKG-CONFIG)
+ LLVM_CONFIG ?= llvm-config
+
+ all: $(FILES)
+diff -Nur a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
+--- a/tools/perf/Makefile.perf 2018-08-18 09:48:00.000000000 +0100
++++ b/tools/perf/Makefile.perf 2018-10-14 21:11:19.975457787 +0100
+@@ -156,7 +156,7 @@
+ HOSTLD ?= ld
+ HOSTAR ?= ar
+
+-PKG_CONFIG = $(CROSS_COMPILE)pkg-config
++PKG_CONFIG = $(CROSS_COMPILE)$(PKG-CONFIG)
+ LLVM_CONFIG ?= llvm-config
+
+ RM = rm -f
+diff -Nur a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
+--- a/tools/testing/selftests/memfd/Makefile 2018-08-18 09:48:00.000000000 +0100
++++ b/tools/testing/selftests/memfd/Makefile 2018-10-14 21:11:09.398110027 +0100
+@@ -8,8 +8,8 @@
+ TEST_FILES := run_fuse_test.sh
+ TEST_GEN_FILES := memfd_test fuse_mnt fuse_test
+
+-fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags)
++fuse_mnt.o: CFLAGS += $(shell $(PKG-CONFIG) fuse --cflags)
+
+ include ../lib.mk
+
+-$(OUTPUT)/fuse_mnt: LDLIBS += $(shell pkg-config fuse --libs)
++$(OUTPUT)/fuse_mnt: LDLIBS += $(shell $(PKG-CONFIG) fuse --libs)
+diff -Nur a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
+--- a/tools/thermal/tmon/Makefile 2018-08-18 09:48:00.000000000 +0100
++++ b/tools/thermal/tmon/Makefile 2018-10-14 21:10:55.517653672 +0100
+@@ -19,12 +19,12 @@
+ endif
+
+ TMON_LIBS=-lm -lpthread
+-TMON_LIBS += $(shell pkg-config --libs $(STATIC) panelw ncursesw 2> /dev/null || \
+- pkg-config --libs $(STATIC) panel ncurses 2> /dev/null || \
++TMON_LIBS += $(shell $(PKG-CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null || \
++ $(PKG-CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \
+ echo -lpanel -lncurses)
+
+-CFLAGS += $(shell pkg-config --cflags $(STATIC) panelw ncursesw 2> /dev/null || \
+- pkg-config --cflags $(STATIC) panel ncurses 2> /dev/null)
++CFLAGS += $(shell $(PKG-CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \
++ $(PKG-CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null)
+
+ OBJS = tmon.o tui.o sysfs.o pid.o
+ OBJS +=
+diff -Nur a/tools/usb/ffs-aio-example/multibuff/host_app/Makefile b/tools/usb/ffs-aio-example/multibuff/host_app/Makefile
+--- a/tools/usb/ffs-aio-example/multibuff/host_app/Makefile 2018-08-18 09:48:00.000000000 +0100
++++ b/tools/usb/ffs-aio-example/multibuff/host_app/Makefile 2018-10-14 21:10:35.307989238 +0100
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ CC = gcc
+-LIBUSB_CFLAGS = $(shell pkg-config --cflags libusb-1.0)
+-LIBUSB_LIBS = $(shell pkg-config --libs libusb-1.0)
++LIBUSB_CFLAGS = $(shell $(PKG-CONFIG) --cflags libusb-1.0)
++LIBUSB_LIBS = $(shell $(PKG-CONFIG) --libs libusb-1.0)
+ WARNINGS = -Wall -Wextra
+ CFLAGS = $(LIBUSB_CFLAGS) $(WARNINGS)
+ LDFLAGS = $(LIBUSB_LIBS)
+diff -Nur a/tools/usb/ffs-aio-example/simple/host_app/Makefile b/tools/usb/ffs-aio-example/simple/host_app/Makefile
+--- a/tools/usb/ffs-aio-example/simple/host_app/Makefile 2018-08-18 09:48:00.000000000 +0100
++++ b/tools/usb/ffs-aio-example/simple/host_app/Makefile 2018-10-14 21:10:45.212314862 +0100
+@@ -1,6 +1,6 @@
+ CC = gcc
+-LIBUSB_CFLAGS = $(shell pkg-config --cflags libusb-1.0)
+-LIBUSB_LIBS = $(shell pkg-config --libs libusb-1.0)
++LIBUSB_CFLAGS = $(shell $(PKG-CONFIG) --cflags libusb-1.0)
++LIBUSB_LIBS = $(shell $(PKG-CONFIG) --libs libusb-1.0)
+ WARNINGS = -Wall -Wextra
+ CFLAGS = $(LIBUSB_CFLAGS) $(WARNINGS)
+ LDFLAGS = $(LIBUSB_LIBS)
diff --git a/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0 b/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0
index f44e49e..39f8b9a 100644
--- a/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0
+++ b/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0
@@ -43,6 +43,7 @@ DEFAULT_SRC_PREPARE_PATCHES=(
"${FILES}"/linux-hardened.patch
"${FILES}"/uksm-for-linux-hardened.patch
"${FILES}"/0015-Enable-BFQ-io-scheduler-by-default.patch
+ "${FILES}"/linux-pkg-config.patch
)
WORK="${WORKBASE}"/linux-"${PV}"
@@ -57,14 +58,20 @@ pkg_setup() {
src_prepare() {
default
- emake mrproper
+ edo emake CC="${CC}" HOSTCC="${CC}" mrproper
edo sed -ri "s|^(EXTRAVERSION =).*|\1 -${EXTRAVERSION}|" Makefile
edo cp "${FILES}"/"${EXTRAVERSION}"-amd64.config .config
}
src_compile() {
- emake prepare modules_prepare
- emake bzImage modules
+ params=(
+ CC="${CC}"
+ HOSTCC="${CC}"
+ )
+
+ edo emake V=1 \
+ "${params[@]}" \
+ prepare modules_prepare bzImage modules
}
src_install() {