Skip to content

Commit

Permalink
Framework: add spksrc.main-depends.mk (#5881)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
hgy59 authored Sep 14, 2023
1 parent 1d690d4 commit d3e59de
Show file tree
Hide file tree
Showing 33 changed files with 106 additions and 149 deletions.
13 changes: 1 addition & 12 deletions cross/gdb/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
PKG_NAME = gdb-main

HOMEPAGE = https://www.gnu.org/software/gdb/
COMMENT = The GNU Project Debugger
LICENSE = GPLv2/LGPLv2

DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

OPTIONAL_DEPENDS = cross/gdb-latest
OPTIONAL_DEPENDS += cross/gdb-7.12

include ../../mk/spksrc.install-resources.mk
include ../../mk/spksrc.main-depends.mk

ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH))
DEPENDS += cross/gdb-7.12
Expand Down
Empty file removed cross/gdb/PLIST
Empty file.
Empty file removed cross/gdb/digests
Empty file.
13 changes: 1 addition & 12 deletions cross/glib/Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
PKG_NAME = glib-main

HOMEPAGE = https://developer.gnome.org/glib/
COMMENT = General-purpose utility library.
LICENSE = LGPLv2.1+

DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

OPTIONAL_DEPENDS = cross/glib-latest
OPTIONAL_DEPENDS += cross/glib-2.66
OPTIONAL_DEPENDS += cross/glib-2.58

include ../../mk/spksrc.install-resources.mk
include ../../mk/spksrc.main-depends.mk

# If kernel >= 3.10 && gcc >= 7.5
ifeq ($(call version_ge, $(TC_KERNEL), 3.10)$(call version_ge, $(TC_GCC), 7.5),11)
Expand Down
Empty file removed cross/glib/PLIST
Empty file.
13 changes: 1 addition & 12 deletions cross/glibc/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
PKG_NAME = glibc-main

HOMEPAGE = https://www.gnu.org/software/libc/
COMMENT = The GNU C Library (glibc)
LICENSE = GPLv2/LGPLv2

DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

OPTIONAL_DEPENDS = cross/glibc-latest
OPTIONAL_DEPENDS += cross/glibc-2.28

include ../../mk/spksrc.install-resources.mk
include ../../mk/spksrc.main-depends.mk

ifeq ($(call version_ge, $(TC_GCC), 5.1),1)
DEPENDS = cross/glibc-latest
Expand Down
Empty file removed cross/glibc/PLIST
Empty file.
Empty file removed cross/glibc/digests
Empty file.
13 changes: 1 addition & 12 deletions cross/glibmm/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
PKG_NAME = glibmm-main

HOMEPAGE = https://www.gtkmm.org/en/
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.
LICENSE = LGPLv2.1

DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

OPTIONAL_DEPENDS = cross/glibmm-latest
OPTIONAL_DEPENDS += cross/glibmm-2.66

include ../../mk/spksrc.install-resources.mk
include ../../mk/spksrc.main-depends.mk

ifeq ($(call version_ge, $(TC_GCC), 7.5),1)
# Requires libsigc++ >= 3.x
Expand Down
Empty file removed cross/glibmm/PLIST
Empty file.
13 changes: 1 addition & 12 deletions cross/intel-gmmlib/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
PKG_NAME = intel-gmmlib-main

HOMEPAGE = https://github.com/intel/gmmlib
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.
LICENSE = MIT

DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

OPTIONAL_DEPENDS = cross/intel-gmmlib-latest
OPTIONAL_DEPENDS += cross/intel-gmmlib-22.3

include ../../mk/spksrc.install-resources.mk
include ../../mk/spksrc.main-depends.mk

ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
DEPENDS = cross/intel-gmmlib-latest
Expand Down
Empty file removed cross/intel-gmmlib/PLIST
Empty file.
3 changes: 0 additions & 3 deletions cross/intel-gmmlib/digests

This file was deleted.

13 changes: 1 addition & 12 deletions cross/intel-media-driver/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
PKG_NAME = intel-media-main

HOMEPAGE = https://github.com/intel/media-driver
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.
LICENSE = MIT

DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

OPTIONAL_DEPENDS = cross/intel-media-driver-latest
OPTIONAL_DEPENDS += cross/intel-media-driver-22.5

include ../../mk/spksrc.install-resources.mk
include ../../mk/spksrc.main-depends.mk

ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
DEPENDS = cross/intel-media-driver-latest
Expand Down
Empty file removed cross/intel-media-driver/PLIST
Empty file.
3 changes: 0 additions & 3 deletions cross/intel-media-driver/digests

This file was deleted.

13 changes: 1 addition & 12 deletions cross/intel-mediasdk/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
PKG_NAME = intel-mediasdk-main

HOMEPAGE = http://mediasdk.intel.com
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).
LICENSE = MIT

DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

OPTIONAL_DEPENDS = cross/intel-mediasdk-latest
OPTIONAL_DEPENDS += cross/intel-mediasdk-22.5

include ../../mk/spksrc.install-resources.mk
include ../../mk/spksrc.main-depends.mk

ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
DEPENDS = cross/intel-mediasdk-latest
Expand Down
Empty file removed cross/intel-mediasdk/PLIST
Empty file.
3 changes: 0 additions & 3 deletions cross/intel-mediasdk/digests

This file was deleted.

13 changes: 1 addition & 12 deletions cross/libsigc++/Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
PKG_NAME = libsigc++-main

HOMEPAGE = http://libsigc.sourceforge.net/
COMMENT = libsigc++ implements a typesafe callback system for standard C++
LICENSE = LGPL

# support for c++11/c++17 language features is required
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS) $(OLD_PPC_ARCHS)

DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

OPTIONAL_DEPENDS = cross/libsigc++-latest
OPTIONAL_DEPENDS += cross/libsigc++-2.12

include ../../mk/spksrc.install-resources.mk
include ../../mk/spksrc.main-depends.mk

ifeq ($(call version_ge, $(TC_GCC), 7.5),1)
DEPENDS = cross/libsigc++-latest
Expand Down
Empty file removed cross/libsigc++/PLIST
Empty file.
13 changes: 1 addition & 12 deletions cross/libva-utils/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
PKG_NAME = libva-utils-main

HOMEPAGE = https://01.org/vaapi
COMMENT = Libva is an implementation for VA-API (Video Acceleration API).
LICENSE = MIT

DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

OPTIONAL_DEPENDS = cross/libva-utils-latest
OPTIONAL_DEPENDS += cross/libva-utils-2.17

include ../../mk/spksrc.install-resources.mk
include ../../mk/spksrc.main-depends.mk

ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
DEPENDS = cross/libva-utils-latest
Expand Down
Empty file removed cross/libva-utils/PLIST
Empty file.
3 changes: 0 additions & 3 deletions cross/libva-utils/digests

This file was deleted.

13 changes: 1 addition & 12 deletions cross/libva/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
PKG_NAME = libva-main

HOMEPAGE = https://01.org/vaapi
COMMENT = Libva is an implementation for VA-API (Video Acceleration API).
LICENSE = MIT

DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

OPTIONAL_DEPENDS = cross/libva-latest
OPTIONAL_DEPENDS += cross/libva-2.17

include ../../mk/spksrc.install-resources.mk
include ../../mk/spksrc.main-depends.mk

ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
DEPENDS = cross/libva-latest
Expand Down
Empty file removed cross/libva/PLIST
Empty file.
3 changes: 0 additions & 3 deletions cross/libva/digests

This file was deleted.

13 changes: 1 addition & 12 deletions cross/llvm/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
PKG_NAME = llvm-main

HOMEPAGE = https://www.gnu.org/software/gdb/
COMMENT = The GNU Project Debugger
LICENSE = GPLv2/LGPLv2

UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS)

DOWNLOAD_TARGET = nop
CHECKSUM_TARGET = nop
EXTRACT_TARGET = nop
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = nop

OPTIONAL_DEPENDS = cross/llvm-latest
OPTIONAL_DEPENDS += cross/llvm-9.0

include ../../mk/spksrc.install-resources.mk
include ../../mk/spksrc.main-depends.mk

ifeq ($(call version_ge, $(TC_GCC), 5.1),1)
DEPENDS = cross/llvm-latest
Expand Down
Empty file removed cross/llvm/PLIST
Empty file.
Empty file removed cross/llvm/digests
Empty file.
3 changes: 1 addition & 2 deletions mk/spksrc.configure.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ REAL_CONFIGURE_ARGS += $(CONFIGURE_ARGS)

configure_msg:
@$(MSG) "Configuring for $(NAME)"
@$(MSG) - Configure ARGS: $(CONFIGURE_ARGS)
@$(MSG) - Configure ARGS: $(REAL_CONFIGURE_ARGS)
@$(MSG) - Install prefix: $(INSTALL_PREFIX)
@$(MSG) - Install prefix [var]: $(INSTALL_PREFIX_VAR)

pre_configure_target: configure_msg

Expand Down
18 changes: 18 additions & 0 deletions mk/spksrc.install-resources.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,24 @@ all-archs: $(addprefix arch-,$(AVAILABLE_TOOLCHAINS))

####

all-supported: SHELL:=/bin/bash
all-supported:
@$(MSG) Pre-build native dependencies for parallel build
@for depend in $$($(MAKE) dependency-list) ; \
do \
if [ "$${depend%/*}" = "native" ]; then \
$(MSG) "Pre-processing $${depend}" ; \
$(MSG) " env $(ENV) $(MAKE) -C ../../$$depend" ; \
env $(ENV) $(MAKE) -C ../../$$depend 2>&1 | tee --append build-$${depend%/*}-$${depend#*/}.log ; \
[ $${PIPESTATUS[0]} -eq 0 ] || false ; \
fi ; \
done ; \
$(MAKE) $(addprefix supported-arch-,$(SUPPORTED_ARCHS))

supported-arch-%:
@$(MSG) BUILDING package for arch $* with SynoCommunity toolchain
-@MAKEFLAGS= $(PSTAT_TIME) $(MAKE) arch-$* 2>&1 | tee --append build-$*.log

arch-%:
@$(MSG) Building package for arch $*
@MAKEFLAGS= $(MAKE) ARCH=$(basename $(subst -,.,$(basename $(subst .,,$*)))) TCVERSION=$(if $(findstring $*,$(basename $(subst -,.,$(basename $(subst .,,$*))))),$(DEFAULT_TC),$(notdir $(subst -,/,$*))) 2>&1 | tee --append build-$*.log
Expand Down
76 changes: 76 additions & 0 deletions mk/spksrc.main-depends.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# include this file for dummy modules that evaluate dependent packages only
#

# Common makefiles
include ../../mk/spksrc.common.mk
include ../../mk/spksrc.directories.mk

# Configure the included makefiles
NAME = $(PKG_NAME)
COOKIE_PREFIX = $(PKG_NAME)-

ifneq ($(ARCH),)
ARCH_SUFFIX = -$(ARCH)-$(TCVERSION)
TC = syno$(ARCH_SUFFIX)
endif


#####

ifneq ($(REQUIRE_KERNEL),)
@$(error main-depends cannot be used when REQUIRE_KERNEL is set)
endif

#####

# to check for supported archs and DSM versions
include ../../mk/spksrc.pre-check.mk

# for common env variables
include ../../mk/spksrc.cross-env.mk

# for dependency evaluation
include ../../mk/spksrc.depend.mk


### Clean rules
smart-clean:
rm -rf $(WORK_DIR)/$(PKG_DIR)
rm -f $(WORK_DIR)/.$(COOKIE_PREFIX)*

clean:
rm -rf work work-* build-*.log

all: depend

### For make dependency-tree
include ../../mk/spksrc.dependency-tree.mk

.PHONY: all-archs
all-archs: $(addprefix arch-,$(AVAILABLE_TOOLCHAINS))

####

all-supported: SHELL:=/bin/bash
all-supported:
@$(MSG) Pre-build native dependencies for parallel build
@for depend in $$($(MAKE) dependency-list) ; \
do \
if [ "$${depend%/*}" = "native" ]; then \
$(MSG) "Pre-processing $${depend}" ; \
$(MSG) " env $(ENV) $(MAKE) -C ../../$$depend" ; \
env $(ENV) $(MAKE) -C ../../$$depend 2>&1 | tee --append build-$${depend%/*}-$${depend#*/}.log ; \
[ $${PIPESTATUS[0]} -eq 0 ] || false ; \
fi ; \
done ; \
$(MAKE) $(addprefix supported-arch-,$(SUPPORTED_ARCHS))

supported-arch-%:
@$(MSG) BUILDING package for arch $* with SynoCommunity toolchain
-@MAKEFLAGS= $(PSTAT_TIME) $(MAKE) arch-$* 2>&1 | tee --append build-$*.log

arch-%:
@$(MSG) Building package for arch $*
@MAKEFLAGS= $(MAKE) ARCH=$(basename $(subst -,.,$(basename $(subst .,,$*)))) TCVERSION=$(if $(findstring $*,$(basename $(subst -,.,$(basename $(subst .,,$*))))),$(DEFAULT_TC),$(notdir $(subst -,/,$*))) 2>&1 | tee --append build-$*.log

####

0 comments on commit d3e59de

Please sign in to comment.