summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Gruetzmacher <tobias-git@23.gs>2014-10-12 19:52:30 (GMT)
committerTobias Gruetzmacher <tobias-git@23.gs>2014-10-12 19:52:30 (GMT)
commit05c7f490a9aa15e2ced65901222d7bbb2bbe8cad (patch)
tree056cce97d9cd98956a2cf7ed42ad08ace0478fbd
parentc13477914812a43099b3fbf3165938e3058855f6 (diff)
downloadmxe-05c7f490a9aa15e2ced65901222d7bbb2bbe8cad.zip
mxe-05c7f490a9aa15e2ced65901222d7bbb2bbe8cad.tar.gz
mxe-05c7f490a9aa15e2ced65901222d7bbb2bbe8cad.tar.bz2
glfw3: Update, enable shared & refresh patch.
-rw-r--r--src/glfw3-1-fixes.patch88
-rw-r--r--src/glfw3.mk12
2 files changed, 16 insertions, 84 deletions
diff --git a/src/glfw3-1-fixes.patch b/src/glfw3-1-fixes.patch
index 969adb7..3112cdf 100644
--- a/src/glfw3-1-fixes.patch
+++ b/src/glfw3-1-fixes.patch
@@ -1,81 +1,19 @@
This file is part of MXE.
See index.html for further information.
-Contains ad hoc patches for cross building.
+Add option to install pkg-config file
-From 7106d77856268c39b08de8cbe6f526fda8506389 Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Sun, 10 Nov 2013 16:23:03 +1100
-Subject: [PATCH] add option to install pkg-config file
-
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7c9b2c2..cd0112c 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -14,6 +14,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
- option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON)
+--- a/CMakeLists.txt 2013-12-31 20:06:18.000000000 +0100
++++ b/CMakeLists.txt 2014-10-12 21:02:16.415982168 +0200
+@@ -15,6 +15,7 @@
option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON)
+ option(GLFW_BUILD_DOCS "Build the GLFW documentation" ON)
option(GLFW_INSTALL "Generate installation target" ON)
+option(GLFW_INSTALL_PKG_CONFIG "Install pkg-config file" OFF)
option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF)
if (WIN32)
-@@ -117,7 +118,7 @@ endif()
- #--------------------------------------------------------------------
- if (WIN32)
- set(_GLFW_WIN32 1)
-- message(STATUS "Using Win32 for window creation")
-+ message(STATUS "Using Win32 for window creation")
-
- if (GLFW_USE_EGL)
- set(_GLFW_EGL 1)
-@@ -133,7 +134,7 @@ elseif (APPLE)
- message(STATUS "Using NSGL for context creation")
- elseif (UNIX)
- set(_GLFW_X11 1)
-- message(STATUS "Using X11 for window creation")
-+ message(STATUS "Using X11 for window creation")
-
- if (GLFW_USE_EGL)
- set(_GLFW_EGL 1)
-@@ -238,7 +239,7 @@ if (_GLFW_X11)
- # Check for Xkb (X keyboard extension)
- if (NOT X11_Xkb_FOUND)
- message(FATAL_ERROR "The X keyboard extension headers were not found")
-- endif()
-+ endif()
-
- list(APPEND glfw_INCLUDE_DIR ${X11_Xkb_INCLUDE_PATH})
-
-@@ -336,7 +337,7 @@ endif()
- # Use Cocoa for window creation and NSOpenGL for context creation
- #--------------------------------------------------------------------
- if (_GLFW_COCOA AND _GLFW_NSGL)
--
-+
- if (GLFW_USE_MENUBAR)
- set(_GLFW_USE_MENUBAR 1)
- endif()
-@@ -351,7 +352,7 @@ if (_GLFW_COCOA AND _GLFW_NSGL)
- else()
- message(STATUS "Building GLFW only for the native architecture")
- endif()
--
-+
- # Set up library and include paths
- find_library(COCOA_FRAMEWORK Cocoa)
- find_library(IOKIT_FRAMEWORK IOKit)
-@@ -386,7 +387,7 @@ endif()
- configure_file(${GLFW_SOURCE_DIR}/docs/Doxyfile.in
- ${GLFW_BINARY_DIR}/docs/Doxyfile @ONLY)
-
--configure_file(${GLFW_SOURCE_DIR}/src/config.h.in
-+configure_file(${GLFW_SOURCE_DIR}/src/config.h.in
- ${GLFW_BINARY_DIR}/src/config.h @ONLY)
-
- configure_file(${GLFW_SOURCE_DIR}/src/glfwConfig.cmake.in
-@@ -395,7 +396,7 @@ configure_file(${GLFW_SOURCE_DIR}/src/glfwConfig.cmake.in
+@@ -392,7 +393,7 @@
configure_file(${GLFW_SOURCE_DIR}/src/glfwConfigVersion.cmake.in
${GLFW_BINARY_DIR}/src/glfwConfigVersion.cmake @ONLY)
@@ -84,16 +22,7 @@ index 7c9b2c2..cd0112c 100644
configure_file(${GLFW_SOURCE_DIR}/src/glfw3.pc.in
${GLFW_BINARY_DIR}/src/glfw3.pc @ONLY)
endif()
-@@ -422,7 +423,7 @@ endif()
- # The library is installed by src/CMakeLists.txt
- #--------------------------------------------------------------------
- if (GLFW_INSTALL)
-- install(DIRECTORY include/GLFW DESTINATION include
-+ install(DIRECTORY include/GLFW DESTINATION include
- FILES_MATCHING PATTERN glfw3.h PATTERN glfw3native.h)
-
- install(FILES ${GLFW_BINARY_DIR}/src/glfwConfig.cmake
-@@ -431,6 +432,9 @@ if (GLFW_INSTALL)
+@@ -428,6 +429,9 @@
if (UNIX)
install(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw)
@@ -103,6 +32,3 @@ index 7c9b2c2..cd0112c 100644
install(FILES ${GLFW_BINARY_DIR}/src/glfw3.pc
DESTINATION lib${LIB_SUFFIX}/pkgconfig)
endif()
---
-1.8.4
-
diff --git a/src/glfw3.mk b/src/glfw3.mk
index d6a35d4..36816fa 100644
--- a/src/glfw3.mk
+++ b/src/glfw3.mk
@@ -3,8 +3,8 @@
PKG := glfw3
$(PKG)_IGNORE :=
-$(PKG)_VERSION := 3.0.3
-$(PKG)_CHECKSUM := 95d0d2a250dc4e9d612cdd1a7433de464db16d89
+$(PKG)_VERSION := 3.0.4
+$(PKG)_CHECKSUM := 9b04309418ccbc74b2115d11198b7912669814ee
$(PKG)_SUBDIR := glfw-$($(PKG)_VERSION)
$(PKG)_FILE := glfw-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/glfw/glfw/$($(PKG)_VERSION)/$($(PKG)_FILE)
@@ -22,16 +22,22 @@ define $(PKG)_BUILD
mkdir '$(1).build'
cd '$(1).build' && cmake '$(1)' \
-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
+ -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),FALSE,TRUE) \
-DGLFW_BUILD_EXAMPLES=FALSE \
-DGLFW_BUILD_TESTS=FALSE \
+ -DGLFW_BUILD_DOCS=FALSE \
-DGLFW_INSTALL_PKG_CONFIG=TRUE \
-DGLFW_PKG_LIBS='-lopengl32 -lgdi32'
$(MAKE) -C '$(1).build' -j '$(JOBS)' install
+ # Windows convention: DLLs in bin/, not in lib/, import library is called "libglfw3.dll.a"
+ $(if $(BUILD_SHARED),
+ mv -fv $(PREFIX)/$(TARGET)/lib/glfw3.dll '$(PREFIX)/$(TARGET)/bin/'; \
+ mv -fv $(PREFIX)/$(TARGET)/lib/glfw3dll.a '$(PREFIX)/$(TARGET)/lib/libglfw3.dll.a')
+
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-glfw3.exe' \
`'$(TARGET)-pkg-config' glfw3 --cflags --libs`
endef
-$(PKG)_BUILD_SHARED =