Browse Source

- switch to pkgconf

master
vanhofen 4 years ago
parent
commit
c0cb37fe0f
  1. 6
      make/environment-build.mk
  2. 15
      make/helpers.mk
  3. 41
      make/host-tools.mk
  4. 3
      make/neutrino.mk
  5. 1
      make/target-blobs.mk
  6. 2
      make/target-development.mk
  7. 1
      make/target-ffmpeg-coolstream.mk
  8. 1
      make/target-ffmpeg.mk
  9. 1
      make/target-libs-static.mk
  10. 5
      make/target-libs-unused.mk
  11. 36
      make/target-libs.mk
  12. 1
      make/target-lua.mk
  13. 4
      make/target-tools-unused.mk
  14. 5
      make/target-tools.mk
  15. 15
      package/pkgconf/files/pkg-config.in
  16. 45
      patches/pkgconf/0002-Revert-main-assume-modversion-insted-of-version-if-o.patch
  17. 8
      patches/pkgconf/pkgconf-pkg-config

6
make/environment-build.mk

@ -75,6 +75,7 @@ PKG_DIR = $($(PKG_UPPER)_DIR)
PKG_SOURCE = $($(PKG_UPPER)_SOURCE)
PKG_SITE = $($(PKG_UPPER)_SITE)
PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_DIR)
PKG_FILES_DIR = $(BASE_DIR)/package/$(subst host-,,$(PKG_NAME))/files
PKG_PATCHES_DIR = $(PATCHES)/$(subst host-,,$(PKG_NAME))
# -----------------------------------------------------------------------------
@ -192,6 +193,7 @@ PATH := $(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(CROSS_DIR)/bin:$(PATH)
PKG_CONFIG = $(HOST_DIR)/bin/$(TARGET)-pkg-config
PKG_CONFIG_LIBDIR = $(TARGET_libdir)
PKG_CONFIG_PATH = $(PKG_CONFIG_LIBDIR)/pkgconfig
PKG_CONFIG_SYSROOT_DIR=$(TARGET_DIR)
# -----------------------------------------------------------------------------
@ -263,7 +265,9 @@ MAKE_ENV = \
MAKE_ENV += \
PKG_CONFIG=$(PKG_CONFIG) \
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" \
PKG_CONFIG_SYSROOT_DIR=$(PKG_CONFIG_SYSROOT_DIR)
CONFIGURE_OPTS = \
--build=$(BUILD) \

15
make/helpers.mk

@ -77,21 +77,6 @@ REWRITE_CONFIG_RULES = "s,^prefix=.*,prefix='$(TARGET_prefix)',; \
REWRITE_CONFIG = $(SED) $(REWRITE_CONFIG_RULES)
REWRITE_CONFIG_TAG = rewritten=1
define REWRITE_PKGCONF
for pc in $$(find $(PKG_CONFIG_PATH) -name "*.pc" -type f); do \
if ! grep -q "$(REWRITE_CONFIG_TAG)" $${pc}; then \
echo -e "$(TERM_YELLOW)Rewriting $${pc#$(TARGET_DIR)/}$(TERM_NORMAL)"; \
$(SED) $(REWRITE_CONFIG_RULES) $${pc}; \
echo -e "\n# Adapted to buildsystem\n$(REWRITE_CONFIG_TAG)" >> $${pc}; \
fi; \
done
endef
# rewrite pkg-config files automatically
REWRITE_PKGCONF_PC = $(call REWRITE_PKGCONF)
# -----------------------------------------------------------------------------
#

41
make/host-tools.mk

@ -11,7 +11,7 @@ $(HOST_DIR):
# -----------------------------------------------------------------------------
host-tools: $(HOST_DIR) \
host-pkg-config \
host-pkgconf \
$(PKG_CONFIG) \
host-mtd-utils \
host-mkimage \
@ -27,38 +27,18 @@ host-tools: $(HOST_DIR) \
# -----------------------------------------------------------------------------
pkg-config-preqs:
@PATH=$(subst $(HOST_DIR)/bin:,,$(PATH)); \
@PATH=$(subst $(HOST_DIR)/bin:$(HOST_DIR)/sbin:,,$(PATH)); \
if ! pkg-config --exists glib-2.0; then \
echo "pkg-config and glib2-devel packages are needed for building cross-pkg-config."; false; \
fi
# -----------------------------------------------------------------------------
HOST_PKG-CONFIG_VER = 0.29.2
HOST_PKG-CONFIG_DIR = pkg-config-$(HOST_PKG-CONFIG_VER)
HOST_PKG-CONFIG_SOURCE = pkg-config-$(HOST_PKG-CONFIG_VER).tar.gz
HOST_PKG-CONFIG_SITE = https://pkg-config.freedesktop.org/releases
$(DL_DIR)/$(HOST_PKG-CONFIG_SOURCE):
$(DOWNLOAD) $(HOST_PKG-CONFIG_SITE)/$(HOST_PKG-CONFIG_SOURCE)
HOST_PKG-CONFIG = $(HOST_DIR)/bin/pkg-config
host-pkg-config: $(HOST_PKG-CONFIG)
$(HOST_PKG-CONFIG): $(DL_DIR)/$(HOST_PKG-CONFIG_SOURCE) | $(HOST_DIR) pkg-config-preqs
$(REMOVE)/$(HOST_PKG-CONFIG_DIR)
$(UNTAR)/$(HOST_PKG-CONFIG_SOURCE)
$(CHDIR)/$(HOST_PKG-CONFIG_DIR); \
./configure \
--with-pc_path=$(PKG_CONFIG_PATH) \
; \
$(MAKE); \
$(INSTALL_EXEC) -D pkg-config $(HOST_PKG-CONFIG)
$(REMOVE)/$(HOST_PKG-CONFIG_DIR)
# -----------------------------------------------------------------------------
HOST_PKGCONF_VER = 1.6.3
HOST_PKGCONF_VER = 1.7.3
HOST_PKGCONF_DIR = pkgconf-$(HOST_PKGCONF_VER)
HOST_PKGCONF_SOURCE = pkgconf-$(HOST_PKGCONF_VER).tar.gz
HOST_PKGCONF_SITE = https://distfiles.dereferenced.org/pkgconf
@ -66,28 +46,25 @@ HOST_PKGCONF_SITE = https://distfiles.dereferenced.org/pkgconf
$(DL_DIR)/$(HOST_PKGCONF_SOURCE):
$(DOWNLOAD) $(HOST_PKGCONF_SITE)/$(HOST_PKGCONF_SOURCE)
HOST_PKGCONF_PATCH = 0001-Only-prefix-with-the-sysroot-a-subset-of-variables.patch
HOST_PKGCONF_PATCH += 0002-Revert-main-assume-modversion-insted-of-version-if-o.patch
host-pkgconf: $(DL_DIR)/$(HOST_PKGCONF_SOURCE) | $(HOST_DIR) pkg-config-preqs
$(REMOVE)/$(HOST_PKGCONF_DIR)
$(UNTAR)/$(HOST_PKGCONF_SOURCE)
$(CHDIR)/$(HOST_PKGCONF_DIR); \
$(call apply_patches,$(addprefix $(@F)/,$(HOST_PKGCONF_PATCH))); \
$(APPLY_PATCHES); \
./configure \
--prefix=$(HOST_DIR) \
--with-sysroot=$(TARGET_DIR) \
--with-system-libdir=$(TARGET_libdir) \
--with-system-includedir=$(TARGET_includedir) \
; \
$(MAKE); \
$(MAKE) install
$(INSTALL_EXEC) $(PATCHES)/$(@F)/pkgconf-pkg-config $(HOST_PKG-CONFIG)
$(INSTALL_EXEC) $(PKG_FILES_DIR)/pkg-config.in $(HOST_PKG-CONFIG)
$(REMOVE)/$(HOST_PKGCONF_DIR)
$(TOUCH)
# -----------------------------------------------------------------------------
$(PKG_CONFIG): $(HOST_PKG-CONFIG)
PKG_CONFIG_DEPS = host-pkgconf
$(PKG_CONFIG): $(PKG_CONFIG_DEPS) | $(HOST_DIR)
ln -sf pkg-config $(@)
# -----------------------------------------------------------------------------

3
make/neutrino.mk

@ -76,7 +76,8 @@ NEUTRINO_CONF_ENV = \
NEUTRINO_CONF_ENV += \
PKG_CONFIG=$(PKG_CONFIG) \
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" \
PKG_CONFIG_SYSROOT_DIR=$(PKG_CONFIG_SYSROOT_DIR)
# -----------------------------------------------------------------------------

1
make/target-blobs.mk

@ -274,7 +274,6 @@ hd61-libgles: $(DL_DIR)/$(BOXMODEL-LIBGLES_SOURCE) | $(TARGET_DIR)
ln -sf libMali.so libGLESv1_CM.so.1.1; ln -sf libGLESv1_CM.so.1.1 libGLESv1_CM.so.1; ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so; \
ln -sf libMali.so libGLESv2.so.2.0; ln -sf libGLESv2.so.2.0 libGLESv2.so.2; ln -sf libGLESv2.so.2 libGLESv2.so; \
ln -sf libMali.so libgbm.so
$(REWRITE_PKGCONF_PC)
$(TOUCH)
vusolo4k-libgles \

2
make/target-development.mk

@ -35,7 +35,6 @@ valgrind3: $(DL_DIR)/$(VALGRIND_SOURCE) | $(TARGET_DIR)
; \
$(MAKE); \
make install DESTDIR=$(TARGET_DIR)
$(REWRITE_PKGCONF_PC)
rm -f $(addprefix $(TARGET_libdir)/valgrind/,*.a *.xml)
rm -f $(addprefix $(TARGET_bindir)/,cg_* callgrind_* ms_print)
$(REMOVE)/$(VALGRIND_DIR)
@ -61,7 +60,6 @@ valgrind12305: | $(TARGET_DIR)
; \
$(MAKE); \
make install DESTDIR=$(TARGET_DIR)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/valgrind
$(TOUCH)

1
make/target-ffmpeg-coolstream.mk

@ -183,6 +183,5 @@ ffmpeg: $(FFMPEG_DEPS) | $(TARGET_DIR)
; \
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(NI-FFMPEG)
$(TOUCH)

1
make/target-ffmpeg.mk

@ -356,6 +356,5 @@ endif
; \
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(FFMPEG_DIR)
$(TOUCH)

1
make/target-libs-static.mk

@ -11,7 +11,6 @@ endif
libs-static: $(LIBS-STATIC) | $(TARGET_DIR)
$(INSTALL_COPY) $(STATIC_DIR)/. $(TARGET_DIR)/
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
# -----------------------------------------------------------------------------

5
make/target-libs-unused.mk

@ -28,7 +28,6 @@ libid3tag: $(LIBID3TAG_DEPS) $(DL_DIR)/$(LIBID3TAG_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBID3TAG_DIR)
$(TOUCH)
@ -84,7 +83,6 @@ fontconfig: $(FONTCONFIG_DEPS) $(DL_DIR)/$(FONTCONFIG_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(FONTCONFIG_DIR)
$(TOUCH)
@ -119,7 +117,6 @@ pixman: $(PIXMAN_DEPS) $(DL_DIR)/$(PIXMAN_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(PIXMAN_DIR)
$(TOUCH)
@ -162,7 +159,6 @@ cairo: $(CAIRO_DEPS) $(DL_DIR)/$(CAIRO_SOURCE) | $(TARGET_DIR)
rm -rf $(TARGET_libdir)/cairo/.debug/cairo-fdr*
rm -rf $(TARGET_libdir)/cairo/.debug/cairo-sphinx*
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(CAIRO_DIR)
$(TOUCH)
@ -198,6 +194,5 @@ harfbuzz: $(HARFBUZZ_DEPS) $(DL_DIR)/$(HARFBUZZ_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(HARFBUZZ_DIR)
$(TOUCH)

36
make/target-libs.mk

@ -28,7 +28,6 @@ zlib: $(DL_DIR)/$(ZLIB_SOURCE) | $(TARGET_DIR)
; \
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(ZLIB_DIR)
$(TOUCH)
@ -60,7 +59,6 @@ libfuse: $(DL_DIR)/$(LIBFUSE_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
rm -rf $(TARGET_sysconfdir)/udev
rm -rf $(TARGET_sysconfdir)/init.d/fuse
$(REMOVE)/$(LIBFUSE_DIR)
@ -88,7 +86,6 @@ libupnp: $(DL_DIR)/$(LIBUPNP_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR); \
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBUPNP_DIR)
$(TOUCH)
@ -116,7 +113,6 @@ libdvbsi: | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR); \
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBDVBSI_DIR)
$(TOUCH)
@ -190,7 +186,6 @@ libcurl: $(LIBCURL_DEPS) $(DL_DIR)/$(LIBCURL_SOURCE) | $(TARGET_DIR)
$(REWRITE_CONFIG) $(HOST_DIR)/bin/curl-config
rm -f $(TARGET_datadir)/zsh
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBCURL_DIR)
$(TOUCH)
@ -227,7 +222,6 @@ libpng: $(LIBPNG_DEPS) $(DL_DIR)/$(LIBPNG_SOURCE) | $(TARGET_DIR)
mv $(TARGET_bindir)/libpng*-config $(HOST_DIR)/bin/
$(REWRITE_CONFIG) $(HOST_DIR)/bin/libpng16-config
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBPNG_DIR)
$(TOUCH)
@ -275,7 +269,6 @@ freetype: $(FREETYPE_DEPS) $(DL_DIR)/$(FREETYPE_SOURCE) | $(TARGET_DIR)
mv $(TARGET_bindir)/freetype-config $(HOST_DIR)/bin
$(REWRITE_CONFIG) $(HOST_DIR)/bin/freetype-config
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(FREETYPE_DIR) \
$(TARGET_datadir)/aclocal
$(TOUCH)
@ -303,7 +296,6 @@ libjpeg-turbo: $(DL_DIR)/$(LIBJPEG-TURBO_SOURCE) | $(TARGET_DIR)
; \
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_PKGCONF_PC)
rm -f $(addprefix $(TARGET_bindir)/,cjpeg djpeg jpegtran rdjpgcom tjbench wrjpgcom)
$(REMOVE)/$(LIBJPEG-TURBO_DIR)
$(TOUCH)
@ -358,7 +350,6 @@ openssl: $(DL_DIR)/$(OPENSSL_SOURCE) | $(TARGET_DIR)
$(MAKE) depend; \
$(MAKE); \
$(MAKE) install_sw INSTALL_PREFIX=$(TARGET_DIR)
$(REWRITE_PKGCONF_PC)
rm -rf $(TARGET_libdir)/engines
rm -f $(TARGET_bindir)/c_rehash
rm -f $(TARGET_sysconfdir)/ssl/misc/{CA.pl,tsget}
@ -415,7 +406,6 @@ ncurses: $(DL_DIR)/$(NCURSES_SOURCE) | $(TARGET_DIR)
rm -f $(HOST_DIR)/bin/ncurses*
mv $(TARGET_bindir)/ncurses6-config $(HOST_DIR)/bin
$(REWRITE_CONFIG) $(HOST_DIR)/bin/ncurses6-config
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(NCURSES_DIR)
$(TOUCH)
@ -433,7 +423,6 @@ openthreads: $(SOURCE_DIR)/$(NI-OPENTHREADS) | $(TARGET_DIR)
$(MAKE) install DESTDIR=$(TARGET_DIR)
rm -f $(TARGET_libdir)/cmake
$(REMOVE)/$(NI-OPENTHREADS)
$(REWRITE_PKGCONF_PC)
$(TOUCH)
# -----------------------------------------------------------------------------
@ -457,7 +446,6 @@ libusb: $(DL_DIR)/$(LIBUSB_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR); \
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBUSB_DIR)
$(TOUCH)
@ -488,7 +476,6 @@ libusb-compat: $(LUBUSB-COMPAT_DEPS) $(DL_DIR)/$(LIBUSB-COMPAT_SOURCE) | $(TARGE
mv $(TARGET_bindir)/libusb-config $(HOST_DIR)/bin
$(REWRITE_CONFIG) $(HOST_DIR)/bin/libusb-config
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBUSB-COMPAT_DIR)
$(TOUCH)
@ -519,7 +506,6 @@ libgd: $(LIBGD_DEPS) $(DL_DIR)/$(LIBGD_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBGD_DIR)
$(TOUCH)
@ -598,7 +584,6 @@ libsigc: $(DL_DIR)/$(LIBSIGC_SOURCE) | $(TARGET_DIR)
cp sigc++config.h $(TARGET_includedir)
ln -sf ./sigc++-2.0/sigc++ $(TARGET_includedir)/sigc++
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBSIGC_DIR)
$(TOUCH)
@ -631,7 +616,6 @@ expat: $(DL_DIR)/$(EXPAT_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(EXPAT_DIR)
$(TOUCH)
@ -677,7 +661,6 @@ libbluray: $(LIBBLURAY_DEPS) $(DL_DIR)/$(LIBBLURAY_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBBLURAY_DIR)
$(TOUCH)
@ -712,7 +695,6 @@ libass: $(LIBASS_DEPS) $(DL_DIR)/$(LIBASS_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBASS_DIR)
$(TOUCH)
@ -749,7 +731,6 @@ libgpg-error: $(DL_DIR)/$(LIBGPG-ERROR_SOURCE) | $(TARGET_DIR)
mv $(TARGET_bindir)/gpg-error-config $(HOST_DIR)/bin
$(REWRITE_CONFIG) $(HOST_DIR)/bin/gpg-error-config
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
rm -f $(addprefix $(TARGET_bindir)/,gpg-error gpgrt-config)
$(REMOVE)/$(LIBGPG-ERROR_DIR)
$(TOUCH)
@ -817,7 +798,6 @@ libaacs: $(LIBAACS_DEPS) $(DL_DIR)/$(LIBAACS_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(CD) $(TARGET_DIR); \
mkdir -p .config/aacs .cache/aacs/vuk
cp $(TARGET_FILES)/libaacs/KEYDB.cfg $(TARGET_DIR)/.config/aacs
@ -851,7 +831,6 @@ libbdplus: $(LIBBDPLUS_DEPS) $(DL_DIR)/$(LIBBDPLUS_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(CD) $(TARGET_DIR); \
mkdir -p .config/bdplus/vm0
cp -f $(TARGET_FILES)/libbdplus/* $(TARGET_DIR)/.config/bdplus/vm0
@ -893,7 +872,6 @@ libxml2: $(DL_DIR)/$(LIBXML2_SOURCE) | $(TARGET_DIR)
mv $(TARGET_bindir)/xml2-config $(HOST_DIR)/bin
$(REWRITE_CONFIG) $(HOST_DIR)/bin/xml2-config
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
rm -rf $(TARGET_libdir)/xml2Conf.sh
rm -rf $(TARGET_libdir)/cmake
$(REMOVE)/$(LIBXML2_DIR)
@ -920,7 +898,6 @@ pugixml: $(DL_DIR)/$(PUGIXML_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
-rm -r $(TARGET_libdir)/cmake
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(PUGIXML_DIR)
$(TOUCH)
@ -945,7 +922,6 @@ libroxml: $(DL_DIR)/$(LIBROXML_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBROXML_DIR)
$(TOUCH)
@ -966,7 +942,6 @@ rtmpdump: $(RTMPDUMP_DEPS) $(SOURCE_DIR)/$(NI-RTMPDUMP) | $(TARGET_DIR)
rm -rf $(TARGET_DIR)/sbin/rtmpgw
rm -rf $(TARGET_DIR)/sbin/rtmpsrv
rm -rf $(TARGET_DIR)/sbin/rtmpsuck
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(NI-RTMPDUMP)
$(TOUCH)
@ -1001,7 +976,6 @@ libtirpc: $(DL_DIR)/$(LIBTIRPC_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
ifeq ($(BOXSERIES),hd1)
$(SED) '/^\(udp\|tcp\)6/ d' $(TARGET_sysconfdir)/netconfig
endif
@ -1032,7 +1006,6 @@ confuse: $(DL_DIR)/$(CONFUSE_SOURCE) | $(TARGET_DIR)
; \
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(CONFUSE_DIR)
$(TOUCH)
@ -1060,7 +1033,6 @@ libite: $(DL_DIR)/$(LIBITE_SOURCE) | $(TARGET_DIR)
; \
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBITE_DIR)
$(TOUCH)
@ -1097,7 +1069,6 @@ libmad: $(DL_DIR)/$(LIBMAD_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBMAD_DIR)
$(TOUCH)
@ -1125,7 +1096,6 @@ libvorbisidec: $(LIBVORBISIDEC_DEPS) $(DL_DIR)/$(LIBVORBISIDEC_SOURCE) | $(TARGE
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR); \
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBVORBISIDEC_DIR)
$(TOUCH)
@ -1151,7 +1121,6 @@ libogg: $(DL_DIR)/$(LIBOGG_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBOGG_DIR)
$(TOUCH)
@ -1178,7 +1147,6 @@ fribidi: $(DL_DIR)/$(FRIBIDI_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(FRIBIDI_DIR)
$(TOUCH)
@ -1208,7 +1176,6 @@ libffi: $(DL_DIR)/$(LIBFFI_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBFFI_DIR)
$(TOUCH)
@ -1268,7 +1235,6 @@ glib2: $(GLIB2_DEPS) $(DL_DIR)/$(GLIB2_SOURCE) | $(TARGET_DIR)
$(MAKE) install DESTDIR=$(TARGET_DIR)
rm -f $(addprefix $(TARGET_bindir)/,gapplication gdbus* gio* glib* gobject-query gresource gsettings gtester*)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(GLIB2_DIR)
$(TOUCH)
@ -1309,7 +1275,6 @@ alsa-lib: $(DL_DIR)/$(ALSA-LIB_SOURCE)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(ALSA-LIB_DIR)
$(TOUCH)
@ -1334,7 +1299,6 @@ popt: $(DL_DIR)/$(POPT_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(POPT_DIR)
$(TOUCH)

1
make/target-lua.mk

@ -33,7 +33,6 @@ lua: $(LUA_DEPS) $(DL_DIR)/$(LUA_SOURCE) | $(TARGET_DIR)
; \
$(MAKE) install INSTALL_TOP=$(TARGET_prefix) INSTALL_MAN=$(TARGET_DIR)$(REMOVE_man1dir); \
$(MAKE) pc INSTALL_TOP=$(TARGET_prefix) > $(PKG_CONFIG_PATH)/lua.pc
$(REWRITE_PKGCONF_PC)
rm -rf $(TARGET_bindir)/luac
$(REMOVE)/$(LUA_DIR)
$(TOUCH)

4
make/target-tools-unused.mk

@ -168,7 +168,6 @@ util-linux: $(UTUL-LINUX_DEPS) $(DL_DIR)/$(UTIL-LINUX_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(UTIL-LINUX_DIR)
$(TOUCH)
@ -239,7 +238,6 @@ readline: $(DL_DIR)/$(READLINE_SOURCE) | $(TARGET_DIR)
; \
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(READLINE_DIR)
$(TOUCH)
@ -266,7 +264,6 @@ libzen: $(LIBZEN_DEPS) $(DL_DIR)/$(LIBZEN_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBZEN_TMP)
$(TOUCH)
@ -293,7 +290,6 @@ libmediainfo: $(LIBMEDIAINFO_DEPS) $(DL_DIR)/$(LIBMEDIAINFO_SOURCE) | $(TARGET_D
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(LIBMEDIAINFO_TMP)
$(TOUCH)

5
make/target-tools.mk

@ -158,7 +158,6 @@ bash: $(DL_DIR)/$(BASH_SOURCE) | $(TARGET_DIR)
; \
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_PKGCONF_PC)
-rm $(addprefix $(TARGET_libdir)/bash/, loadables.h Makefile.inc)
$(BASH_ADD_TO_SHELLS)
$(REMOVE)/$(BASH_DIR)
@ -271,7 +270,6 @@ procps-ng: $(PROCPS-NG_DEPS) $(DL_DIR)/$(PROCPS-NG_SOURCE) | $(TARGET_DIR)
$(INSTALL_EXEC) -D $(TARGET_DIR)/bin.$(@F)/$$bin $(TARGET_bindir)/$$bin; \
done
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(PROCPS-NG_DIR) \
$(TARGET_DIR)/bin.$(@F) \
$(TARGET_DIR)/sbin.$(@F)
@ -491,7 +489,6 @@ e2fsprogs: $(DL_DIR)/$(E2FSPROGS_SOURCE) | $(TARGET_DIR)
-rm $(addprefix $(TARGET_base_sbindir)/, dumpe2fs e2mmpstatus e2undo logsave)
-rm $(addprefix $(TARGET_bindir)/, chattr compile_et lsattr mk_cmds uuidgen)
-rm $(addprefix $(TARGET_sbindir)/, e2freefrag e4crypt filefrag)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(E2FSPROGS_DIR)
$(TOUCH)
@ -709,7 +706,6 @@ parted: $(PARTED_DEPS) $(DL_DIR)/$(PARTED_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(PARTED_DIR)
$(TOUCH)
@ -1857,7 +1853,6 @@ flac: $(DL_DIR)/$(FLAC_SOURCE) | $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
$(REMOVE)/$(FLAC_DIR)
$(TOUCH)

15
package/pkgconf/files/pkg-config.in

@ -0,0 +1,15 @@
#!/bin/sh
PKGCONFDIR=$(dirname $0)
DEFAULT_PKG_CONFIG_LIBDIR=${PKGCONFDIR}/../../root/usr/lib/pkgconfig
DEFAULT_PKG_CONFIG_SYSROOT_DIR=${PKGCONFDIR}/../../root
DEFAULT_PKG_CONFIG_SYSTEM_INCLUDE_PATH=${PKGCONFDIR}/../../root/usr/include
DEFAULT_PKG_CONFIG_SYSTEM_LIBRARY_PATH=${PKGCONFDIR}/../../root/usr/lib
set -x
PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${DEFAULT_PKG_CONFIG_LIBDIR}} \
PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-${DEFAULT_PKG_CONFIG_SYSROOT_DIR}} \
PKG_CONFIG_SYSTEM_INCLUDE_PATH=${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_INCLUDE_PATH}} \
PKG_CONFIG_SYSTEM_LIBRARY_PATH=${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_LIBRARY_PATH}} \
exec ${PKGCONFDIR}/pkgconf --keep-system-libs "$@"

45
patches/pkgconf/0002-Revert-main-assume-modversion-insted-of-version-if-o.patch

@ -1,45 +0,0 @@
From 4ccef40918a539905a2951bfb81cf8dba4a245c6 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Wed, 2 Jan 2019 18:15:50 +0100
Subject: [PATCH] Revert "main: assume --modversion insted of --version if
other flags or module names are provided"
This reverts commit 12a0eb124cea85586e57f33c91a1e4c73459eef6, as it
causes pkg-config to assume --modversion is used when something as
simple as 'pkg-config --static --version' is used, leading to a
failure instead of the expected behavior: the one of "pkg-config
--version".
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
cli/main.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/cli/main.c b/cli/main.c
index b52cc85..c5acc10 100644
--- a/cli/main.c
+++ b/cli/main.c
@@ -1002,18 +1002,8 @@ main(int argc, char *argv[])
if ((want_flags & PKG_VERSION) == PKG_VERSION)
{
- if (argc > 2)
- {
- fprintf(stderr, "%s: --version specified with other options or module names, assuming --modversion.\n", argv[0]);
-
- want_flags &= ~PKG_VERSION;
- want_flags |= PKG_MODVERSION;
- }
- else
- {
- version();
- return EXIT_SUCCESS;
- }
+ version();
+ return EXIT_SUCCESS;
}
if ((want_flags & PKG_HELP) == PKG_HELP)
--
2.20.1

8
patches/pkgconf/pkgconf-pkg-config

@ -1,8 +0,0 @@
#!/bin/sh
PKGCONFDIR=$(dirname $0)
DEFAULT_PKG_CONFIG_LIBDIR=${PKGCONFDIR}/../../root/lib/pkgconfig
DEFAULT_PKG_CONFIG_SYSROOT_DIR=${PKGCONFDIR}/../../root
set -x
PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${DEFAULT_PKG_CONFIG_LIBDIR}} \
PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-${DEFAULT_PKG_CONFIG_SYSROOT_DIR}} \
exec ${PKGCONFDIR}/pkgconf "$@"
Loading…
Cancel
Save