From 9945d8f8d4556961e6cec1cb7381a9ff3064bd2c Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 27 Mar 2021 23:52:39 +0100 Subject: [PATCH] - move more autotools-packages to package dir --- Makefile | 1 - make/target-libs-unused.mk | 167 ------------------------------------- make/target-libs.mk | 113 ------------------------- make/target-tools.mk | 41 +++++---- 4 files changed, 27 insertions(+), 295 deletions(-) delete mode 100644 make/target-libs-unused.mk diff --git a/Makefile b/Makefile index 8fa91905..06a5d8fc 100755 --- a/Makefile +++ b/Makefile @@ -219,7 +219,6 @@ include make/target-ffmpeg$(if $(filter $(BOXTYPE),coolstream),-coolstream).mk include make/target-files.mk include make/target-libs.mk include make/target-libs-static.mk -include make/target-libs-unused.mk include make/target-lua.mk include make/target-rootfs.mk include make/target-scripts.mk diff --git a/make/target-libs-unused.mk b/make/target-libs-unused.mk deleted file mode 100644 index 4d742bf3..00000000 --- a/make/target-libs-unused.mk +++ /dev/null @@ -1,167 +0,0 @@ -# -# makefile to build system libs (currently unused in ni-image) -# -# ----------------------------------------------------------------------------- - -LIBID3TAG_VERSION = 0.15.1b -LIBID3TAG_DIR = libid3tag-$(LIBID3TAG_VERSION) -LIBID3TAG_SOURCE = libid3tag-$(LIBID3TAG_VERSION).tar.gz -LIBID3TAG_SITE = https://sourceforge.net/projects/mad/files/libid3tag/$(LIBID3TAG_VERSION) - -$(DL_DIR)/$(LIBID3TAG_SOURCE): - $(download) $(LIBID3TAG_SITE)/$(LIBID3TAG_SOURCE) - -LIBID3TAG_DEPENDENCIES = zlib - -LIBID3TAG_AUTORECONF = YES - -LIBID3TAG_CONF_OPTS = \ - --enable-shared=yes - -libid3tag: $(LIBID3TAG_DEPENDENCIES) $(DL_DIR)/$(LIBID3TAG_SOURCE) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(UNTAR)/$(PKG_SOURCE) - $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) - $(CHDIR)/$(PKG_DIR); \ - $(CONFIGURE); \ - $(MAKE); \ - $(MAKE) install DESTDIR=$(TARGET_DIR) - $(REWRITE_LIBTOOL) - $(REMOVE)/$(PKG_DIR) - $(TOUCH) - -# ----------------------------------------------------------------------------- - -FONTCONFIG_VERSION = 2.11.93 -FONTCONFIG_DIR = fontconfig-$(FONTCONFIG_VERSION) -FONTCONFIG_SOURCE = fontconfig-$(FONTCONFIG_VERSION).tar.bz2 -FONTCONFIG_SITE = https://www.freedesktop.org/software/fontconfig/release - -$(DL_DIR)/$(FONTCONFIG_SOURCE): - $(download) $(FONTCONFIG_SITE)/$(FONTCONFIG_SOURCE) - -FONTCONFIG_DEPENDENCIES = freetype expat - -FONTCONFIG_CONF_OPTS = \ - --with-freetype-config=$(HOST_DIR)/bin/freetype-config \ - --with-expat-includes=$(TARGET_includedir) \ - --with-expat-lib=$(TARGET_libdir) \ - --disable-docs - -fontconfig: $(FONTCONFIG_DEPENDENCIES) $(DL_DIR)/$(FONTCONFIG_SOURCE) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(UNTAR)/$(PKG_SOURCE) - $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) - $(CHDIR)/$(PKG_DIR); \ - $(CONFIGURE); \ - $(MAKE); \ - $(MAKE) install DESTDIR=$(TARGET_DIR) - $(REWRITE_LIBTOOL) - $(REMOVE)/$(PKG_DIR) - $(TOUCH) - -# ----------------------------------------------------------------------------- - -PIXMAN_VERSION = 0.34.0 -PIXMAN_DIR = pixman-$(PIXMAN_VERSION) -PIXMAN_SOURCE = pixman-$(PIXMAN_VERSION).tar.gz -PIXMAN_SITE = https://www.cairographics.org/releases - -$(DL_DIR)/$(PIXMAN_SOURCE): - $(download) $(PIXMAN_SITE)/$(PIXMAN_SOURCE) - -PIXMAN_DEPENDENCIES = zlib libpng - -PIXMAN_CONF_OPTS = \ - --disable-gtk \ - --disable-arm-simd \ - --disable-loongson-mmi \ - --disable-docs - -pixman: $(PIXMAN_DEPENDENCIES) $(DL_DIR)/$(PIXMAN_SOURCE) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(UNTAR)/$(PKG_SOURCE) - $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) - $(CHDIR)/$(PKG_DIR); \ - $(CONFIGURE); \ - $(MAKE); \ - $(MAKE) install DESTDIR=$(TARGET_DIR) - $(REWRITE_LIBTOOL) - $(REMOVE)/$(PKG_DIR) - $(TOUCH) - -# ----------------------------------------------------------------------------- - -CAIRO_VERSION = 1.16.0 -CAIRO_DIR = cairo-$(CAIRO_VERSION) -CAIRO_SOURCE = cairo-$(CAIRO_VERSION).tar.xz -CAIRO_SITE = https://www.cairographics.org/releases - -$(DL_DIR)/$(CAIRO_SOURCE): - $(download) $(CAIRO_SITE)/$(CAIRO_SOURCE) - -CAIRO_DEPENDENCIES = fontconfig glib2 libpng pixman zlib - -CAIRO_CONF_ENV = \ - ax_cv_c_float_words_bigendian="no" - -CAIRO_CONF_OPTS = \ - --with-html-dir=$(REMOVE_htmldir) \ - --with-x=no \ - --disable-xlib \ - --disable-xcb \ - --disable-egl \ - --disable-glesv2 \ - --disable-gl \ - --enable-tee - -cairo: $(CAIRO_DEPENDENCIES) $(DL_DIR)/$(CAIRO_SOURCE) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(UNTAR)/$(PKG_SOURCE) - $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) - $(CHDIR)/$(PKG_DIR); \ - $(CONFIGURE); \ - $(MAKE); \ - $(MAKE) install DESTDIR=$(TARGET_DIR) - $(TARGET_RM) $(TARGET_bindir)/cairo-sphinx - $(TARGET_RM) $(TARGET_libdir)/cairo/cairo-fdr* - $(TARGET_RM) $(TARGET_libdir)/cairo/cairo-sphinx* - $(TARGET_RM) $(TARGET_libdir)/cairo/.debug/cairo-fdr* - $(TARGET_RM) $(TARGET_libdir)/cairo/.debug/cairo-sphinx* - $(REWRITE_LIBTOOL) - $(REMOVE)/$(PKG_DIR) - $(TOUCH) - -# ----------------------------------------------------------------------------- - -HARFBUZZ_VERSION = 1.8.8 -HARFBUZZ_DIR = harfbuzz-$(HARFBUZZ_VERSION) -HARFBUZZ_SOURCE = harfbuzz-$(HARFBUZZ_VERSION).tar.bz2 -HARFBUZZ_SITE = https://www.freedesktop.org/software/harfbuzz/release - -$(DL_DIR)/$(HARFBUZZ_SOURCE): - $(download) $(HARFBUZZ_SITE)/$(HARFBUZZ_SOURCE) - -HARFBUZZ_DEPENDENCIES = fontconfig glib2 cairo freetype - -HARFBUZZ_AUTORECONF = YES - -HARFBUZZ_CONF_OPTS = \ - --with-cairo \ - --with-fontconfig \ - --with-freetype \ - --with-glib \ - --without-graphite2 \ - --without-icu - -harfbuzz: $(HARFBUZZ_DEPENDENCIES) $(DL_DIR)/$(HARFBUZZ_SOURCE) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(UNTAR)/$(PKG_SOURCE) - $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) - $(CHDIR)/$(PKG_DIR); \ - $(CONFIGURE); \ - $(MAKE); \ - $(MAKE) install DESTDIR=$(TARGET_DIR) - $(REWRITE_LIBTOOL) - $(REMOVE)/$(PKG_DIR) - $(TOUCH) diff --git a/make/target-libs.mk b/make/target-libs.mk index efbadb01..320c1b8f 100644 --- a/make/target-libs.mk +++ b/make/target-libs.mk @@ -441,119 +441,6 @@ rtmpdump: $(RTMPDUMP_DEPENDENCIES) $(SOURCE_DIR)/$(NI_RTMPDUMP) | $(TARGET_DIR) # ----------------------------------------------------------------------------- -LIBVORBISIDEC_VERSION = 1.2.1+git20180316 -LIBVORBISIDEC_DIR = libvorbisidec-$(LIBVORBISIDEC_VERSION) -LIBVORBISIDEC_SOURCE = libvorbisidec_$(LIBVORBISIDEC_VERSION).orig.tar.gz -LIBVORBISIDEC_SITE = https://ftp.de.debian.org/debian/pool/main/libv/libvorbisidec - -$(DL_DIR)/$(LIBVORBISIDEC_SOURCE): - $(download) $(LIBVORBISIDEC_SITE)/$(LIBVORBISIDEC_SOURCE) - -LIBVORBISIDEC_DEPENDENCIES = libogg - -LIBVORBISIDEC_AUTORECONF = YES - -libvorbisidec: $(LIBVORBISIDEC_DEPENDENCIES) $(DL_DIR)/$(LIBVORBISIDEC_SOURCE) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(UNTAR)/$(PKG_SOURCE) - $(CHDIR)/$(PKG_DIR); \ - $(SED) '122 s/^/#/' configure.in; \ - $(CONFIGURE); \ - $(MAKE); \ - $(MAKE) install DESTDIR=$(TARGET_DIR) - $(REWRITE_LIBTOOL) - $(REMOVE)/$(PKG_DIR) - $(TOUCH) - -# ----------------------------------------------------------------------------- - -GLIB2_VERSION = 2.56.3 -GLIB2_DIR = glib-$(GLIB2_VERSION) -GLIB2_SOURCE = glib-$(GLIB2_VERSION).tar.xz -GLIB2_SITE = https://ftp.gnome.org/pub/gnome/sources/glib/$(basename $(GLIB2_VERSION)) - -$(DL_DIR)/$(GLIB2_SOURCE): - $(download) $(GLIB2_SITE)/$(GLIB2_SOURCE) - -GLIB2_DEPENDENCIES = zlib libffi -ifeq ($(BOXSERIES),hd2) - GLIB2_DEPENDENCIES += gettext -endif - -GLIB2_AUTORECONF = YES - -GLIB2_CONF_OPTS = \ - --bindir=$(REMOVE_bindir) \ - --datadir=$(REMOVE_datadir) \ - $(if $(filter $(BOXSERIES),hd1),--enable-static --disable-shared) \ - --cache-file=arm-linux.cache \ - --disable-debug \ - --disable-selinux \ - --disable-libmount \ - --disable-fam \ - --disable-gtk-doc \ - --disable-gtk-doc-html \ - --disable-compile-warnings \ - --with-threads="posix" \ - --with-pcre=internal - -ifeq ($(BOXTYPE),$(filter $(BOXTYPE),armbox mipsbox)) - GLIB2_DEPENDENCIES += libiconv - GLIB2_CONF_OPTS += --with-libiconv=gnu -endif - -glib2: $(GLIB2_DEPENDENCIES) $(DL_DIR)/$(GLIB2_SOURCE) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(UNTAR)/$(PKG_SOURCE) - $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) - $(CHDIR)/$(PKG_DIR); \ - echo "ac_cv_type_long_long=yes" > arm-linux.cache; \ - echo "glib_cv_stack_grows=no" >> arm-linux.cache; \ - echo "glib_cv_uscore=no" >> arm-linux.cache; \ - echo "glib_cv_va_copy=no" >> arm-linux.cache; \ - echo "glib_cv_va_val_copy=yes" >> arm-linux.cache; \ - echo "ac_cv_func_posix_getpwuid_r=yes" >> arm-linux.cache; \ - echo "ac_cv_func_posix_getgrgid_r=yes" >> arm-linux.cache; \ - $(CONFIGURE); \ - $(MAKE); \ - $(MAKE) install DESTDIR=$(TARGET_DIR) - $(REWRITE_LIBTOOL) - $(REMOVE)/$(PKG_DIR) - $(TOUCH) - -# ----------------------------------------------------------------------------- - -LIBICONV_VERSION = 1.15 -LIBICONV_DIR = libiconv-$(LIBICONV_VERSION) -LIBICONV_SOURCE = libiconv-$(LIBICONV_VERSION).tar.gz -LIBICONV_SITE = $(GNU_MIRROR)/libiconv - -$(DL_DIR)/$(LIBICONV_SOURCE): - $(download) $(LIBICONV_SITE)/$(LIBICONV_SOURCE) - -LIBICONV_CONF_ENV = \ - CPPFLAGS="$(TARGET_CPPFLAGS) -fPIC" - -LIBICONV_CONF_OPTS = \ - --datarootdir=$(REMOVE_datarootdir) \ - --enable-static \ - --disable-shared \ - --enable-relocatable - -libiconv: $(DL_DIR)/$(LIBICONV_SOURCE) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(UNTAR)/$(PKG_SOURCE) - $(CHDIR)/$(PKG_DIR); \ - $(SED) '/preload/d' Makefile.in; \ - $(CONFIGURE); \ - $(MAKE); \ - $(MAKE) install DESTDIR=$(TARGET_DIR) - $(REWRITE_LIBTOOL) - $(REMOVE)/$(PKG_DIR) - $(TOUCH) - -# ----------------------------------------------------------------------------- - GRAPHLCD_BASE_VERSION = git GRAPHLCD_BASE_DIR = graphlcd-base.$(GRAPHLCD_BASE_VERSION) GRAPHLCD_BASE_SOURCE = graphlcd-base.$(GRAPHLCD_BASE_VERSION) diff --git a/make/target-tools.mk b/make/target-tools.mk index 5610bc01..ebbcb406 100644 --- a/make/target-tools.mk +++ b/make/target-tools.mk @@ -264,6 +264,8 @@ E2FSPROGS_AUTORECONF = YES E2FSPROGS_CONF_OPTS = \ --with-root-prefix="$(base_prefix)" \ + --libdir=$(libdir) \ + --includedir=$(includedir) \ --datarootdir=$(REMOVE_datarootdir) \ --disable-backtrace \ --disable-blkid-debug \ @@ -928,28 +930,39 @@ XUPNPD_DEPENDENCIES = lua openssl XUPNPD_MAKE_OPTS = \ TARGET=$(TARGET) LUAFLAGS="$(TARGET_LDFLAGS) -I$(TARGET_includedir)" -xupnpd: $(XUPNPD_DEPENDENCIES) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(GET_GIT_SOURCE) $(PKG_SITE)/$(PKG_SOURCE) $(DL_DIR)/$(PKG_SOURCE) - $(CPDIR)/$(PKG_SOURCE) - $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) - $(CHDIR)/$(PKG_DIR); \ - git checkout $($(PKG)_CHECKOUT); \ - $(TARGET_CONFIGURE_ENV) \ - $(MAKE) -C src $($(PKG)_MAKE_OPTS) embedded ; \ - $(INSTALL_EXEC) -D src/xupnpd $(TARGET_bindir)/xupnpd; \ - $(INSTALL) -d $(TARGET_datadir)/xupnpd/config; \ - $(INSTALL_COPY) src/{plugins,profiles,ui,www,*.lua} $(TARGET_datadir)/xupnpd/ +define XUPNPD_TARGET_CLEANUP $(TARGET_RM) $(TARGET_datadir)/xupnpd/plugins/staff/xupnpd_18plus.lua +endef +XUPNPD_TARGET_FINALIZE_HOOKS += XUPNPD_TARGET_CLEANUP + +define XUPNPD_INSTALL_PLUGINS $(INSTALL_DATA) -D $(SOURCE_DIR)/$(NI_NEUTRINO_PLUGINS)/scripts-lua/xupnpd/xupnpd_18plus.lua $(TARGET_datadir)/xupnpd/plugins/ $(INSTALL_DATA) -D $(SOURCE_DIR)/$(NI_NEUTRINO_PLUGINS)/scripts-lua/xupnpd/xupnpd_cczwei.lua $(TARGET_datadir)/xupnpd/plugins/ $(INSTALL_DATA) -D $(SOURCE_DIR)/$(NI_NEUTRINO_PLUGINS)/scripts-lua/xupnpd/xupnpd_neutrino.lua $(TARGET_datadir)/xupnpd/plugins/ $(INSTALL_DATA) -D $(SOURCE_DIR)/$(NI_NEUTRINO_PLUGINS)/scripts-lua/xupnpd/xupnpd_vimeo.lua $(TARGET_datadir)/xupnpd/plugins/ $(INSTALL_DATA) -D $(SOURCE_DIR)/$(NI_NEUTRINO_PLUGINS)/scripts-lua/xupnpd/xupnpd_youtube.lua $(TARGET_datadir)/xupnpd/plugins/ +endef +XUPNPD_TARGET_FINALIZE_HOOKS += XUPNPD_INSTALL_PLUGINS + +define XUPNPD_INSTALL_SKEL $(INSTALL_COPY) $(PKG_FILES_DIR)-skel/* $(TARGET_DIR)/ $(UPDATE-RC.D) xupnpd defaults 75 25 - $(REMOVE)/$(PKG_DIR) - $(TOUCH) +endef +XUPNPD_TARGET_FINALIZE_HOOKS += XUPNPD_INSTALL_SKEL + +xupnpd: $(XUPNPD_DEPENDENCIES) | $(TARGET_DIR) + $(call DEPENDENCIES) + $(call DOWNLOAD,$($(PKG)_SOURCE)) + $(call STARTUP) + $(call EXTRACT,$(BUILD_DIR)) + $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) + $(CHDIR)/$(PKG_DIR); \ + $(TARGET_CONFIGURE_ENV) \ + $(MAKE) -C src $($(PKG)_MAKE_OPTS) embedded + $(INSTALL_EXEC) -D $(PKG_BUILD_DIR)/src/xupnpd $(TARGET_bindir)/xupnpd + $(INSTALL) -d $(TARGET_datadir)/xupnpd/config + $(INSTALL_COPY) $(PKG_BUILD_DIR)/src/{plugins,profiles,ui,www,*.lua} $(TARGET_datadir)/xupnpd/ + $(call TARGET_FOLLOWUP) # -----------------------------------------------------------------------------