diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2016-06-29 21:57:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-29 21:57:23 (GMT) |
commit | 57dbfcd54aadd5e7d15ba9e8a78af5690a131c7f (patch) | |
tree | 7554efcc546650b0683eb0ab79ef64c5e9c1a657 | |
parent | b924c6596e59266f24d210642f1667c81bd361be (diff) | |
parent | 8acc43c958b0e8ba8e94611e74aecc5690543365 (diff) | |
download | mxe-57dbfcd54aadd5e7d15ba9e8a78af5690a131c7f.zip mxe-57dbfcd54aadd5e7d15ba9e8a78af5690a131c7f.tar.gz mxe-57dbfcd54aadd5e7d15ba9e8a78af5690a131c7f.tar.bz2 |
Merge pull request #1399 from tehnick/update-freeglut
freeglut: update from 2.8.1 to 3.0.0
-rw-r--r-- | src/freeglut-1-fixes.patch | 99 | ||||
-rw-r--r-- | src/freeglut-2-fix-autoconf-version.patch | 15 | ||||
-rw-r--r-- | src/freeglut.mk | 25 |
3 files changed, 62 insertions, 77 deletions
diff --git a/src/freeglut-1-fixes.patch b/src/freeglut-1-fixes.patch index c739834..985078a 100644 --- a/src/freeglut-1-fixes.patch +++ b/src/freeglut-1-fixes.patch @@ -3,58 +3,55 @@ See index.html for further information. Contains ad hoc patches for cross building. -From dc54ddf47055db70aeb19c618a70bd5448cff836 Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Thu, 11 Apr 2013 08:50:44 +0200 -Subject: [PATCH] add pkg-config support +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Pek <tehnick-8@yandex.ru> +Date: Sat, 18 Jun 2016 16:24:52 +0300 +Subject: [PATCH] Back compatibility with older freeglut packages in MXE -based on -http://old.nabble.com/-PATCH--Add-pkgconfig-file-td23312302.html -proposed to upstream -https://sourceforge.net/tracker/?func=detail&aid=3511842&group_id=1032&atid=101032 - -diff --git a/Makefile.am b/Makefile.am -index 39c5628..b504bc6 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -68,3 +68,6 @@ dist-hook: +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,7 +11,7 @@ INCLUDE(GNUInstallDirs) + # CMAKE_ARCHIVE_OUTPUT_DIRECTORY instead. + # Static libraries end up in CMAKE_ARCHIVE_OUTPUT_DIRECTORY on all + # platforms. +-SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) ++SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) + SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) + SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) - libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status --recheck -+ -+pkgconfigdir = $(libdir)/pkgconfig -+pkgconfig_DATA = glut.pc -diff --git a/configure.ac b/configure.ac -index 4f194d9..71e696d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -125,5 +125,6 @@ AC_CONFIG_FILES([ - progs/demos/spaceball/Makefile - progs/demos/subwin/Makefile - src/Makefile -+ glut.pc - ]) - AC_OUTPUT -diff --git a/glut.pc.in b/glut.pc.in -new file mode 100644 -index 0000000..ea57c4a ---- /dev/null -+++ b/glut.pc.in -@@ -0,0 +1,13 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@/@PACKAGE@ -+ -+Name: glut -+Description: A freely licensed alternative to the GLUT library -+Version: @VERSION@ -+Libs: -L${libdir} -lglut -+Libs.private: -lglu32 -lopengl32 -lwinmm -lgdi32 -mwindows -+Cflags: -I${includedir} -+Cflags.private: -DFREEGLUT_STATIC +@@ -53,9 +53,9 @@ ENDIF() + OPTION(FREEGLUT_GLES "Use OpenGL ES (requires EGL)" OFF) + + # option to build either as "glut" (ON) or "freeglut" (OFF) +-IF(NOT WIN32) ++#IF(NOT WIN32) + OPTION(FREEGLUT_REPLACE_GLUT "Be a replacement for GLUT" ON) +-ENDIF() ++#ENDIF() + + + SET(FREEGLUT_HEADERS +@@ -346,12 +346,18 @@ ENDIF() + + + IF(WIN32) ++ IF(FREEGLUT_REPLACE_GLUT) ++ SET(LIBNAME glut) ++ ELSE() ++ SET(LIBNAME freeglut) ++ ENDIF() + --- -1.8.1.4 - + LIST(APPEND LIBS winmm) + IF(FREEGLUT_BUILD_SHARED_LIBS) +- SET_TARGET_PROPERTIES(freeglut PROPERTIES COMPILE_FLAGS -DFREEGLUT_EXPORTS) ++ SET_TARGET_PROPERTIES(freeglut PROPERTIES COMPILE_FLAGS -DFREEGLUT_EXPORTS OUTPUT_NAME ${LIBNAME}) + ENDIF() + IF(FREEGLUT_BUILD_STATIC_LIBS) +- SET_TARGET_PROPERTIES(freeglut_static PROPERTIES COMPILE_FLAGS -DFREEGLUT_STATIC) ++ SET_TARGET_PROPERTIES(freeglut_static PROPERTIES COMPILE_FLAGS -DFREEGLUT_STATIC OUTPUT_NAME ${LIBNAME}) + # need to set machine:x64 for linker, at least for VC10, and + # doesn't hurt for older compilers: + # http://public.kitware.com/Bug/view.php?id=11240#c22768 diff --git a/src/freeglut-2-fix-autoconf-version.patch b/src/freeglut-2-fix-autoconf-version.patch deleted file mode 100644 index f0525d6..0000000 --- a/src/freeglut-2-fix-autoconf-version.patch +++ /dev/null @@ -1,15 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff --git a/configure.ac b/configure.ac ---- a/configure.ac 2013-02-08 23:55:11.000000000 +0100 -+++ b/configure.ac 2013-04-12 15:23:57.161451656 +0200 -@@ -2,7 +2,7 @@ - - AC_INIT([freeglut library],[2.8.1],[freeglut-bugs@lists.sourceforge.net],[freeglut]) - AM_INIT_AUTOMAKE --AC_PREREQ([2.69]) -+AC_PREREQ([2.67]) - AC_CONFIG_SRCDIR([AUTHORS]) - AC_CONFIG_HEADERS([config.h]) - diff --git a/src/freeglut.mk b/src/freeglut.mk index 78f3061..a22ca0a 100644 --- a/src/freeglut.mk +++ b/src/freeglut.mk @@ -3,9 +3,9 @@ PKG := freeglut $(PKG)_IGNORE := -$(PKG)_VERSION := 2.8.1 -$(PKG)_CHECKSUM := dde46626a62a1cd9cf48a11951cdd592e7067c345cffe193a149dfd47aef999a -$(PKG)_SUBDIR := freeglut-$(word 1,$(subst -, ,$($(PKG)_VERSION))) +$(PKG)_VERSION := 3.0.0 +$(PKG)_CHECKSUM := 2a43be8515b01ea82bcfa17d29ae0d40bd128342f0930cd1f375f1ff999f76a2 +$(PKG)_SUBDIR := freeglut-$($(PKG)_VERSION) $(PKG)_FILE := freeglut-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/freeglut/freeglut/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc @@ -17,16 +17,19 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && ./autogen.sh - cd '$(1)' && ./configure \ - $(MXE_CONFIGURE_OPTS) \ - --enable-replace-glut \ - --disable-debug \ - --without-x - $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= $(if $(BUILD_STATIC),EXPORT_FLAGS='-DFREEGLUT_STATIC') + mkdir '$(1).build' + cd '$(1).build' && $(TARGET)-cmake '$(1)' \ + -DFREEGLUT_GLES=OFF \ + -DFREEGLUT_BUILD_DEMOS=OFF \ + -DFREEGLUT_REPLACE_GLUT=ON \ + -DFREEGLUT_BUILD_STATIC_LIBS=$(if $(BUILD_STATIC),true,false) \ + -DFREEGLUT_BUILD_SHARED_LIBS=$(if $(BUILD_STATIC),false,true) + $(MAKE) -C '$(1).build' -j '$(JOBS)' + $(MAKE) -C '$(1).build' -j 1 install '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-freeglut.exe' \ - `'$(TARGET)-pkg-config' glut --cflags --libs` + $(if $(BUILD_STATIC),-DFREEGLUT_STATIC) \ + -L'$(PREFIX)/$(TARGET)/lib' -lglut -lglu32 -lopengl32 -lgdi32 -lwinmm endef |