Skip to content

Commit d3e59de

Browse files
authored
Framework: add spksrc.main-depends.mk (#5881)
* add mk/spksrc.main-depends.mk - add mk/spksrc.main-depends.mk to unify Makefile(s) for dependency evaluation - replace spksrc.install-resources.mk by spksrc.main-depends.mk for all such dummy packages - enable make all-supported for such Makefile(s) - remove obsolete PLIST and digests files * print REAL_CONFIGURE_ARGS in configure target
1 parent 1d690d4 commit d3e59de

File tree

33 files changed

+106
-149
lines changed

33 files changed

+106
-149
lines changed

cross/gdb/Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
PKG_NAME = gdb-main
22

3-
HOMEPAGE = https://www.gnu.org/software/gdb/
4-
COMMENT = The GNU Project Debugger
5-
LICENSE = GPLv2/LGPLv2
6-
7-
DOWNLOAD_TARGET = nop
8-
CHECKSUM_TARGET = nop
9-
EXTRACT_TARGET = nop
10-
CONFIGURE_TARGET = nop
11-
COMPILE_TARGET = nop
12-
INSTALL_TARGET = nop
13-
143
OPTIONAL_DEPENDS = cross/gdb-latest
154
OPTIONAL_DEPENDS += cross/gdb-7.12
165

17-
include ../../mk/spksrc.install-resources.mk
6+
include ../../mk/spksrc.main-depends.mk
187

198
ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH))
209
DEPENDS += cross/gdb-7.12

cross/gdb/PLIST

Whitespace-only changes.

cross/gdb/digests

Whitespace-only changes.

cross/glib/Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
PKG_NAME = glib-main
22

3-
HOMEPAGE = https://developer.gnome.org/glib/
4-
COMMENT = General-purpose utility library.
5-
LICENSE = LGPLv2.1+
6-
7-
DOWNLOAD_TARGET = nop
8-
CHECKSUM_TARGET = nop
9-
EXTRACT_TARGET = nop
10-
CONFIGURE_TARGET = nop
11-
COMPILE_TARGET = nop
12-
INSTALL_TARGET = nop
13-
143
OPTIONAL_DEPENDS = cross/glib-latest
154
OPTIONAL_DEPENDS += cross/glib-2.66
165
OPTIONAL_DEPENDS += cross/glib-2.58
176

18-
include ../../mk/spksrc.install-resources.mk
7+
include ../../mk/spksrc.main-depends.mk
198

209
# If kernel >= 3.10 && gcc >= 7.5
2110
ifeq ($(call version_ge, $(TC_KERNEL), 3.10)$(call version_ge, $(TC_GCC), 7.5),11)

cross/glib/PLIST

Whitespace-only changes.

cross/glibc/Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
PKG_NAME = glibc-main
22

3-
HOMEPAGE = https://www.gnu.org/software/libc/
4-
COMMENT = The GNU C Library (glibc)
5-
LICENSE = GPLv2/LGPLv2
6-
7-
DOWNLOAD_TARGET = nop
8-
CHECKSUM_TARGET = nop
9-
EXTRACT_TARGET = nop
10-
CONFIGURE_TARGET = nop
11-
COMPILE_TARGET = nop
12-
INSTALL_TARGET = nop
13-
143
OPTIONAL_DEPENDS = cross/glibc-latest
154
OPTIONAL_DEPENDS += cross/glibc-2.28
165

17-
include ../../mk/spksrc.install-resources.mk
6+
include ../../mk/spksrc.main-depends.mk
187

198
ifeq ($(call version_ge, $(TC_GCC), 5.1),1)
209
DEPENDS = cross/glibc-latest

cross/glibc/PLIST

Whitespace-only changes.

cross/glibc/digests

Whitespace-only changes.

cross/glibmm/Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
PKG_NAME = glibmm-main
22

3-
HOMEPAGE = https://www.gtkmm.org/en/
4-
COMMENT = GLib is a low-level general-purpose library used mainly by GTK+/GNOME applications, but is useful for other programs as well. glibmm is the C++ wrapper for GLib.
5-
LICENSE = LGPLv2.1
6-
7-
DOWNLOAD_TARGET = nop
8-
CHECKSUM_TARGET = nop
9-
EXTRACT_TARGET = nop
10-
CONFIGURE_TARGET = nop
11-
COMPILE_TARGET = nop
12-
INSTALL_TARGET = nop
13-
143
OPTIONAL_DEPENDS = cross/glibmm-latest
154
OPTIONAL_DEPENDS += cross/glibmm-2.66
165

17-
include ../../mk/spksrc.install-resources.mk
6+
include ../../mk/spksrc.main-depends.mk
187

198
ifeq ($(call version_ge, $(TC_GCC), 7.5),1)
209
# Requires libsigc++ >= 3.x

cross/glibmm/PLIST

Whitespace-only changes.

cross/intel-gmmlib/Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
PKG_NAME = intel-gmmlib-main
22

3-
HOMEPAGE = https://github.com/intel/gmmlib
4-
COMMENT = Intel Graphics Memory Management Library provides device specific and buffer management for the Intel Graphics Compute Runtime for OpenCL and the Intel Media Driver for VAAPI.
5-
LICENSE = MIT
6-
7-
DOWNLOAD_TARGET = nop
8-
CHECKSUM_TARGET = nop
9-
EXTRACT_TARGET = nop
10-
CONFIGURE_TARGET = nop
11-
COMPILE_TARGET = nop
12-
INSTALL_TARGET = nop
13-
143
OPTIONAL_DEPENDS = cross/intel-gmmlib-latest
154
OPTIONAL_DEPENDS += cross/intel-gmmlib-22.3
165

17-
include ../../mk/spksrc.install-resources.mk
6+
include ../../mk/spksrc.main-depends.mk
187

198
ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
209
DEPENDS = cross/intel-gmmlib-latest

cross/intel-gmmlib/PLIST

Whitespace-only changes.

cross/intel-gmmlib/digests

Lines changed: 0 additions & 3 deletions
This file was deleted.

cross/intel-media-driver/Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
PKG_NAME = intel-media-main
22

3-
HOMEPAGE = https://github.com/intel/media-driver
4-
COMMENT = The Intel Media Driver for VAAPI is a new VA-API (Video Acceleration API) user mode driver supporting hardware accelerated decoding, encoding, and video post processing for GEN based graphics hardware.
5-
LICENSE = MIT
6-
7-
DOWNLOAD_TARGET = nop
8-
CHECKSUM_TARGET = nop
9-
EXTRACT_TARGET = nop
10-
CONFIGURE_TARGET = nop
11-
COMPILE_TARGET = nop
12-
INSTALL_TARGET = nop
13-
143
OPTIONAL_DEPENDS = cross/intel-media-driver-latest
154
OPTIONAL_DEPENDS += cross/intel-media-driver-22.5
165

17-
include ../../mk/spksrc.install-resources.mk
6+
include ../../mk/spksrc.main-depends.mk
187

198
ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
209
DEPENDS = cross/intel-media-driver-latest

cross/intel-media-driver/PLIST

Whitespace-only changes.

cross/intel-media-driver/digests

Lines changed: 0 additions & 3 deletions
This file was deleted.

cross/intel-mediasdk/Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
PKG_NAME = intel-mediasdk-main
22

3-
HOMEPAGE = http://mediasdk.intel.com
4-
COMMENT = Intel Media SDK provides a plain C API to access hardware-accelerated video decode, encode and filtering on Intel® Gen graphics hardware platforms. Implementation written in C++ 11 with parts in C-for-Media (CM).
5-
LICENSE = MIT
6-
7-
DOWNLOAD_TARGET = nop
8-
CHECKSUM_TARGET = nop
9-
EXTRACT_TARGET = nop
10-
CONFIGURE_TARGET = nop
11-
COMPILE_TARGET = nop
12-
INSTALL_TARGET = nop
13-
143
OPTIONAL_DEPENDS = cross/intel-mediasdk-latest
154
OPTIONAL_DEPENDS += cross/intel-mediasdk-22.5
165

17-
include ../../mk/spksrc.install-resources.mk
6+
include ../../mk/spksrc.main-depends.mk
187

198
ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
209
DEPENDS = cross/intel-mediasdk-latest

cross/intel-mediasdk/PLIST

Whitespace-only changes.

cross/intel-mediasdk/digests

Lines changed: 0 additions & 3 deletions
This file was deleted.

cross/libsigc++/Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
PKG_NAME = libsigc++-main
22

3-
HOMEPAGE = http://libsigc.sourceforge.net/
4-
COMMENT = libsigc++ implements a typesafe callback system for standard C++
5-
LICENSE = LGPL
6-
73
# support for c++11/c++17 language features is required
84
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS) $(OLD_PPC_ARCHS)
95

10-
DOWNLOAD_TARGET = nop
11-
CHECKSUM_TARGET = nop
12-
EXTRACT_TARGET = nop
13-
CONFIGURE_TARGET = nop
14-
COMPILE_TARGET = nop
15-
INSTALL_TARGET = nop
16-
176
OPTIONAL_DEPENDS = cross/libsigc++-latest
187
OPTIONAL_DEPENDS += cross/libsigc++-2.12
198

20-
include ../../mk/spksrc.install-resources.mk
9+
include ../../mk/spksrc.main-depends.mk
2110

2211
ifeq ($(call version_ge, $(TC_GCC), 7.5),1)
2312
DEPENDS = cross/libsigc++-latest

cross/libsigc++/PLIST

Whitespace-only changes.

cross/libva-utils/Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
PKG_NAME = libva-utils-main
22

3-
HOMEPAGE = https://01.org/vaapi
4-
COMMENT = Libva is an implementation for VA-API (Video Acceleration API).
5-
LICENSE = MIT
6-
7-
DOWNLOAD_TARGET = nop
8-
CHECKSUM_TARGET = nop
9-
EXTRACT_TARGET = nop
10-
CONFIGURE_TARGET = nop
11-
COMPILE_TARGET = nop
12-
INSTALL_TARGET = nop
13-
143
OPTIONAL_DEPENDS = cross/libva-utils-latest
154
OPTIONAL_DEPENDS += cross/libva-utils-2.17
165

17-
include ../../mk/spksrc.install-resources.mk
6+
include ../../mk/spksrc.main-depends.mk
187

198
ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
209
DEPENDS = cross/libva-utils-latest

cross/libva-utils/PLIST

Whitespace-only changes.

cross/libva-utils/digests

Lines changed: 0 additions & 3 deletions
This file was deleted.

cross/libva/Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
PKG_NAME = libva-main
22

3-
HOMEPAGE = https://01.org/vaapi
4-
COMMENT = Libva is an implementation for VA-API (Video Acceleration API).
5-
LICENSE = MIT
6-
7-
DOWNLOAD_TARGET = nop
8-
CHECKSUM_TARGET = nop
9-
EXTRACT_TARGET = nop
10-
CONFIGURE_TARGET = nop
11-
COMPILE_TARGET = nop
12-
INSTALL_TARGET = nop
13-
143
OPTIONAL_DEPENDS = cross/libva-latest
154
OPTIONAL_DEPENDS += cross/libva-2.17
165

17-
include ../../mk/spksrc.install-resources.mk
6+
include ../../mk/spksrc.main-depends.mk
187

198
ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
209
DEPENDS = cross/libva-latest

cross/libva/PLIST

Whitespace-only changes.

cross/libva/digests

Lines changed: 0 additions & 3 deletions
This file was deleted.

cross/llvm/Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
PKG_NAME = llvm-main
22

3-
HOMEPAGE = https://www.gnu.org/software/gdb/
4-
COMMENT = The GNU Project Debugger
5-
LICENSE = GPLv2/LGPLv2
6-
73
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS)
84

9-
DOWNLOAD_TARGET = nop
10-
CHECKSUM_TARGET = nop
11-
EXTRACT_TARGET = nop
12-
CONFIGURE_TARGET = nop
13-
COMPILE_TARGET = nop
14-
INSTALL_TARGET = nop
15-
165
OPTIONAL_DEPENDS = cross/llvm-latest
176
OPTIONAL_DEPENDS += cross/llvm-9.0
187

19-
include ../../mk/spksrc.install-resources.mk
8+
include ../../mk/spksrc.main-depends.mk
209

2110
ifeq ($(call version_ge, $(TC_GCC), 5.1),1)
2211
DEPENDS = cross/llvm-latest

cross/llvm/PLIST

Whitespace-only changes.

cross/llvm/digests

Whitespace-only changes.

mk/spksrc.configure.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ REAL_CONFIGURE_ARGS += $(CONFIGURE_ARGS)
4747

4848
configure_msg:
4949
@$(MSG) "Configuring for $(NAME)"
50-
@$(MSG) - Configure ARGS: $(CONFIGURE_ARGS)
50+
@$(MSG) - Configure ARGS: $(REAL_CONFIGURE_ARGS)
5151
@$(MSG) - Install prefix: $(INSTALL_PREFIX)
52-
@$(MSG) - Install prefix [var]: $(INSTALL_PREFIX_VAR)
5352

5453
pre_configure_target: configure_msg
5554

mk/spksrc.install-resources.mk

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,24 @@ all-archs: $(addprefix arch-,$(AVAILABLE_TOOLCHAINS))
8080

8181
####
8282

83+
all-supported: SHELL:=/bin/bash
84+
all-supported:
85+
@$(MSG) Pre-build native dependencies for parallel build
86+
@for depend in $$($(MAKE) dependency-list) ; \
87+
do \
88+
if [ "$${depend%/*}" = "native" ]; then \
89+
$(MSG) "Pre-processing $${depend}" ; \
90+
$(MSG) " env $(ENV) $(MAKE) -C ../../$$depend" ; \
91+
env $(ENV) $(MAKE) -C ../../$$depend 2>&1 | tee --append build-$${depend%/*}-$${depend#*/}.log ; \
92+
[ $${PIPESTATUS[0]} -eq 0 ] || false ; \
93+
fi ; \
94+
done ; \
95+
$(MAKE) $(addprefix supported-arch-,$(SUPPORTED_ARCHS))
96+
97+
supported-arch-%:
98+
@$(MSG) BUILDING package for arch $* with SynoCommunity toolchain
99+
-@MAKEFLAGS= $(PSTAT_TIME) $(MAKE) arch-$* 2>&1 | tee --append build-$*.log
100+
83101
arch-%:
84102
@$(MSG) Building package for arch $*
85103
@MAKEFLAGS= $(MAKE) ARCH=$(basename $(subst -,.,$(basename $(subst .,,$*)))) TCVERSION=$(if $(findstring $*,$(basename $(subst -,.,$(basename $(subst .,,$*))))),$(DEFAULT_TC),$(notdir $(subst -,/,$*))) 2>&1 | tee --append build-$*.log

mk/spksrc.main-depends.mk

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# include this file for dummy modules that evaluate dependent packages only
2+
#
3+
4+
# Common makefiles
5+
include ../../mk/spksrc.common.mk
6+
include ../../mk/spksrc.directories.mk
7+
8+
# Configure the included makefiles
9+
NAME = $(PKG_NAME)
10+
COOKIE_PREFIX = $(PKG_NAME)-
11+
12+
ifneq ($(ARCH),)
13+
ARCH_SUFFIX = -$(ARCH)-$(TCVERSION)
14+
TC = syno$(ARCH_SUFFIX)
15+
endif
16+
17+
18+
#####
19+
20+
ifneq ($(REQUIRE_KERNEL),)
21+
@$(error main-depends cannot be used when REQUIRE_KERNEL is set)
22+
endif
23+
24+
#####
25+
26+
# to check for supported archs and DSM versions
27+
include ../../mk/spksrc.pre-check.mk
28+
29+
# for common env variables
30+
include ../../mk/spksrc.cross-env.mk
31+
32+
# for dependency evaluation
33+
include ../../mk/spksrc.depend.mk
34+
35+
36+
### Clean rules
37+
smart-clean:
38+
rm -rf $(WORK_DIR)/$(PKG_DIR)
39+
rm -f $(WORK_DIR)/.$(COOKIE_PREFIX)*
40+
41+
clean:
42+
rm -rf work work-* build-*.log
43+
44+
all: depend
45+
46+
### For make dependency-tree
47+
include ../../mk/spksrc.dependency-tree.mk
48+
49+
.PHONY: all-archs
50+
all-archs: $(addprefix arch-,$(AVAILABLE_TOOLCHAINS))
51+
52+
####
53+
54+
all-supported: SHELL:=/bin/bash
55+
all-supported:
56+
@$(MSG) Pre-build native dependencies for parallel build
57+
@for depend in $$($(MAKE) dependency-list) ; \
58+
do \
59+
if [ "$${depend%/*}" = "native" ]; then \
60+
$(MSG) "Pre-processing $${depend}" ; \
61+
$(MSG) " env $(ENV) $(MAKE) -C ../../$$depend" ; \
62+
env $(ENV) $(MAKE) -C ../../$$depend 2>&1 | tee --append build-$${depend%/*}-$${depend#*/}.log ; \
63+
[ $${PIPESTATUS[0]} -eq 0 ] || false ; \
64+
fi ; \
65+
done ; \
66+
$(MAKE) $(addprefix supported-arch-,$(SUPPORTED_ARCHS))
67+
68+
supported-arch-%:
69+
@$(MSG) BUILDING package for arch $* with SynoCommunity toolchain
70+
-@MAKEFLAGS= $(PSTAT_TIME) $(MAKE) arch-$* 2>&1 | tee --append build-$*.log
71+
72+
arch-%:
73+
@$(MSG) Building package for arch $*
74+
@MAKEFLAGS= $(MAKE) ARCH=$(basename $(subst -,.,$(basename $(subst .,,$*)))) TCVERSION=$(if $(findstring $*,$(basename $(subst -,.,$(basename $(subst .,,$*))))),$(DEFAULT_TC),$(notdir $(subst -,/,$*))) 2>&1 | tee --append build-$*.log
75+
76+
####

0 commit comments

Comments
 (0)