aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pkg-config
diff options
context:
space:
mode:
authorJames <>2015-09-26 12:29:31 +0100
committerJames <>2015-09-26 12:29:31 +0100
commit626d9efa74685720020e816f3a917b7591d3cf7a (patch)
treed22eef73ae82287b30a1140decb4fc806d39d621 /tools/pkg-config
downloadtrunk-47048-626d9efa74685720020e816f3a917b7591d3cf7a.tar.gz
trunk-47048-626d9efa74685720020e816f3a917b7591d3cf7a.tar.bz2
trunk-47048-626d9efa74685720020e816f3a917b7591d3cf7a.zip
trunk-47048
Diffstat (limited to 'tools/pkg-config')
-rw-r--r--tools/pkg-config/Makefile35
-rwxr-xr-xtools/pkg-config/files/pkg-config3
-rw-r--r--tools/pkg-config/patches/001-fix-package-rebuild.patch22
-rw-r--r--tools/pkg-config/patches/002-musl_host_fixup.patch24
4 files changed, 84 insertions, 0 deletions
diff --git a/tools/pkg-config/Makefile b/tools/pkg-config/Makefile
new file mode 100644
index 0000000..9a1b3fb
--- /dev/null
+++ b/tools/pkg-config/Makefile
@@ -0,0 +1,35 @@
+#
+# Copyright (C) 2006-2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pkg-config
+PKG_VERSION:=0.28
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pkgconfig.freedesktop.org/releases/
+PKG_MD5SUM:=aa3c86e67551adc3ac865160e34a2a0d
+
+HOST_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+
+unexport PKG_CONFIG
+
+HOST_CONFIGURE_ARGS += --with-internal-glib
+
+define Host/Install
+ $(MAKE) -C $(HOST_BUILD_DIR) install
+ mv $(STAGING_DIR_HOST)/bin/pkg-config $(STAGING_DIR_HOST)/bin/pkg-config.real
+ $(INSTALL_BIN) ./files/pkg-config $(STAGING_DIR_HOST)/bin/pkg-config
+endef
+
+define Host/Clean
+ -$(MAKE) -C $(HOST_BUILD_DIR) uninstall
+ $(call Host/Clean/Default)
+endef
+
+$(eval $(call HostBuild))
diff --git a/tools/pkg-config/files/pkg-config b/tools/pkg-config/files/pkg-config
new file mode 100755
index 0000000..e58b132
--- /dev/null
+++ b/tools/pkg-config/files/pkg-config
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pkg-config.real $@ --define-variable=prefix=${STAGING_PREFIX} --define-variable=exec_prefix=${STAGING_PREFIX}
diff --git a/tools/pkg-config/patches/001-fix-package-rebuild.patch b/tools/pkg-config/patches/001-fix-package-rebuild.patch
new file mode 100644
index 0000000..54f549c
--- /dev/null
+++ b/tools/pkg-config/patches/001-fix-package-rebuild.patch
@@ -0,0 +1,22 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -39,7 +39,7 @@
+ if HOST_TOOL
+ host_tool = $(host)-pkg-config$(EXEEXT)
+ install-exec-hook:
+- cd $(DESTDIR)$(bindir) && $(LN) pkg-config$(EXEEXT) $(host_tool)
++ cd $(DESTDIR)$(bindir) && $(LN) -f pkg-config$(EXEEXT) $(host_tool)
+ uninstall-hook:
+ cd $(DESTDIR)$(bindir) && rm -f $(host_tool)
+ endif
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1093,7 +1093,7 @@
+ uninstall-man1
+
+ @HOST_TOOL_TRUE@install-exec-hook:
+-@HOST_TOOL_TRUE@ cd $(DESTDIR)$(bindir) && $(LN) pkg-config$(EXEEXT) $(host_tool)
++@HOST_TOOL_TRUE@ cd $(DESTDIR)$(bindir) && $(LN) -f pkg-config$(EXEEXT) $(host_tool)
+ @HOST_TOOL_TRUE@uninstall-hook:
+ @HOST_TOOL_TRUE@ cd $(DESTDIR)$(bindir) && rm -f $(host_tool)
+
diff --git a/tools/pkg-config/patches/002-musl_host_fixup.patch b/tools/pkg-config/patches/002-musl_host_fixup.patch
new file mode 100644
index 0000000..d39a738
--- /dev/null
+++ b/tools/pkg-config/patches/002-musl_host_fixup.patch
@@ -0,0 +1,24 @@
+--- a/glib/config.sub
++++ b/glib/config.sub
+@@ -122,9 +122,9 @@ esac
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+- knetbsd*-gnu* | netbsd*-gnu* | \
++ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-musl* | \
++ linux-newlib* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
++ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+@@ -1354,7 +1354,7 @@ case $os in
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+- | -linux-newlib* | -linux-uclibc* \
++ | -linux-musl* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \