From cded114ce350185bec04f26de7eb70eab2826809 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Sun, 26 Nov 2017 02:03:19 +1100
Subject: mingw-w64: install gl *.pc files here instead of mxe-conf

---
 src/mingw-w64.mk | 21 ++++++++++++++++++++-
 src/mxe-conf.mk  | 14 --------------
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/src/mingw-w64.mk b/src/mingw-w64.mk
index 87f5ff5..f4b1519 100644
--- a/src/mingw-w64.mk
+++ b/src/mingw-w64.mk
@@ -9,7 +9,7 @@ $(PKG)_CHECKSUM := 2a601db99ef579b9be69c775218ad956a24a09d7dabc9ff6c5bd60da9ccc9
 $(PKG)_SUBDIR   := $(PKG)-v$($(PKG)_VERSION)
 $(PKG)_FILE     := $(PKG)-v$($(PKG)_VERSION).tar.bz2
 $(PKG)_URL      := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(PKG)-release/$($(PKG)_FILE)
-$(PKG)_TYPE     := archive
+$(PKG)_TYPE     := script
 $(PKG)_DEPS     :=
 
 define $(PKG)_UPDATE
@@ -18,3 +18,22 @@ define $(PKG)_UPDATE
     $(SORT) -V | \
     tail -1
 endef
+
+# can't install headers here since dummy pthreads headers are installed
+# and then clobbered by inline winpthreads build in gcc (see #958)
+
+define $(PKG)_BUILD
+    # create pkg-config files for OpenGL/GLU
+    mkdir -p '$(PREFIX)/$(TARGET)/lib/pkgconfig'
+    (echo 'Name: gl'; \
+     echo 'Version: 0'; \
+     echo 'Description: OpenGL'; \
+     echo 'Libs: -lopengl32';) \
+     > '$(PREFIX)/$(TARGET)/lib/pkgconfig/gl.pc'
+
+    (echo 'Name: glu'; \
+     echo 'Version: 0'; \
+     echo 'Description: OpenGL'; \
+     echo 'Libs: -lglu32';) \
+     > '$(PREFIX)/$(TARGET)/lib/pkgconfig/glu.pc'
+endef
diff --git a/src/mxe-conf.mk b/src/mxe-conf.mk
index ef67b47..f6e285d 100644
--- a/src/mxe-conf.mk
+++ b/src/mxe-conf.mk
@@ -15,20 +15,6 @@ define $(PKG)_BUILD
     # install target-specific autotools config file
     # setting ac_cv_build bypasses the config.guess check in every package
     echo "ac_cv_build=$(BUILD)" > '$(PREFIX)/$(TARGET)/share/config.site'
-
-    # create pkg-config files for OpenGL/GLU
-    mkdir -p '$(PREFIX)/$(TARGET)/lib/pkgconfig'
-    (echo 'Name: gl'; \
-     echo 'Version: 0'; \
-     echo 'Description: OpenGL'; \
-     echo 'Libs: -lopengl32';) \
-     > '$(PREFIX)/$(TARGET)/lib/pkgconfig/gl.pc'
-    (echo 'Name: glu'; \
-     echo 'Version: 0'; \
-     echo 'Description: OpenGL'; \
-     echo 'Libs: -lglu32';) \
-     > '$(PREFIX)/$(TARGET)/lib/pkgconfig/glu.pc'
-
 endef
 
 define $(PKG)_BUILD_$(BUILD)
-- 
cgit v0.12