From 4e3f9c4e4f253a2839a5bd8e817526d64c0a1a74 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Thu, 20 Jul 2017 20:25:38 +1000 Subject: ccfits cfitsio devil jasper: update and switch to cmake --- src/ccfits.mk | 13 +++---- src/cfitsio.mk | 13 +++---- src/devil-1-fixes.patch | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ src/devil-1-png.patch | 35 ----------------- src/devil-2-il.patch | 27 ------------- src/devil.mk | 41 ++++---------------- src/jasper-1-fixes.patch | 34 +++++++++++++++++ src/jasper.mk | 30 ++++++--------- 8 files changed, 163 insertions(+), 129 deletions(-) create mode 100644 src/devil-1-fixes.patch delete mode 100644 src/devil-1-png.patch delete mode 100644 src/devil-2-il.patch create mode 100644 src/jasper-1-fixes.patch diff --git a/src/ccfits.mk b/src/ccfits.mk index 2b78985..f44a990 100644 --- a/src/ccfits.mk +++ b/src/ccfits.mk @@ -4,8 +4,8 @@ PKG := ccfits $(PKG)_WEBSITE := https://heasarc.gsfc.nasa.gov/fitsio/ccfits $(PKG)_DESCR := CCfits $(PKG)_IGNORE := -$(PKG)_VERSION := 2.4 -$(PKG)_CHECKSUM := ba6c5012b260adf7633f92581279ea582e331343d8c973981aa7de07242bd7f8 +$(PKG)_VERSION := 2.5 +$(PKG)_CHECKSUM := 938ecd25239e65f519b8d2b50702416edc723de5f0a5387cceea8c4004a44740 $(PKG)_SUBDIR := CCfits $(PKG)_FILE := CCfits-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://heasarc.gsfc.nasa.gov/fitsio/CCfits/$($(PKG)_FILE) @@ -19,12 +19,9 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && ./configure \ - $(MXE_CONFIGURE_OPTS) \ - --with-cfitsio='$(PREFIX)/$(TARGET)' - - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install endef $(PKG)_BUILD_SHARED = diff --git a/src/cfitsio.mk b/src/cfitsio.mk index 304f491..fd5f967 100644 --- a/src/cfitsio.mk +++ b/src/cfitsio.mk @@ -3,8 +3,8 @@ PKG := cfitsio $(PKG)_WEBSITE := https://heasarc.gsfc.nasa.gov/fitsio/ $(PKG)_IGNORE := -$(PKG)_VERSION := 3370 -$(PKG)_CHECKSUM := 092897c6dae4dfe42d91d35a738e45e8236aa3d8f9b3ffc7f0e6545b8319c63a +$(PKG)_VERSION := 3410 +$(PKG)_CHECKSUM := a556ac7ea1965545dcb4d41cfef8e4915eeb8c0faa1b52f7ff70870f8bb5734c $(PKG)_SUBDIR := cfitsio $(PKG)_FILE := cfitsio$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/$($(PKG)_FILE) @@ -18,12 +18,9 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --prefix='$(PREFIX)/$(TARGET)' \ - FC='$(TARGET)-gfortran' - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install '$(TARGET)-gcc' \ -W -Wall -Werror -ansi \ diff --git a/src/devil-1-fixes.patch b/src/devil-1-fixes.patch new file mode 100644 index 0000000..17b7263 --- /dev/null +++ b/src/devil-1-fixes.patch @@ -0,0 +1,99 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Christian Weigel +Date: Fri, 17 Feb 2017 10:07:48 +0100 +Subject: [PATCH] fix static build of ilu and ilut + +taken from https://github.com/DentonW/DevIL/pull/59 + +diff --git a/DevIL/src-ILU/CMakeLists.txt b/DevIL/src-ILU/CMakeLists.txt +index 1111111..2222222 100644 +--- a/DevIL/src-ILU/CMakeLists.txt ++++ b/DevIL/src-ILU/CMakeLists.txt +@@ -42,9 +42,13 @@ source_group("Source Files" FILES src/*.cpp) + source_group("Header Files" FILES ${ILU_INC} ) + source_group("Resource Files" FILES ${ILU_RSRC} ) + +-# Remove SHARED to create a static library +-add_library(ILU SHARED ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) +-set_target_properties(ILU PROPERTIES SOVERSION 1) ++if(BUILD_SHARED_LIBS) ++ add_library(ILU SHARED ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) ++ set_target_properties(ILU PROPERTIES SOVERSION 1) ++else(BUILD_SHARED_LIBS) ++ add_library(ILU ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) ++endif(BUILD_SHARED_LIBS) ++ + + + ## ILU requires IL +diff --git a/DevIL/src-ILUT/CMakeLists.txt b/DevIL/src-ILUT/CMakeLists.txt +index 1111111..2222222 100644 +--- a/DevIL/src-ILUT/CMakeLists.txt ++++ b/DevIL/src-ILUT/CMakeLists.txt +@@ -62,9 +62,13 @@ source_group("Source Files" FILES src/*.cpp) + source_group("Header Files" FILES ${ILUT_INC} ) + source_group("Resource Files" FILES ${ILUT_RSRC} ) + +-# Remove SHARED to create a static library +-add_library(ILUT SHARED ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC}) +-set_target_properties(ILUT PROPERTIES SOVERSION 1) ++if(BUILD_SHARED_LIBS) ++ add_library(ILUT SHARED ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC}) ++ set_target_properties(ILUT PROPERTIES SOVERSION 1) ++else(BUILD_SHARED_LIBS) ++ add_library(ILUT ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC}) ++endif(BUILD_SHARED_LIBS) ++ + + ## add link sub library info + target_link_libraries(ILUT + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Thu, 20 Jul 2017 16:34:51 +1000 +Subject: [PATCH] fix resource paths + + +diff --git a/DevIL/src-IL/msvc/IL.rc b/DevIL/src-IL/msvc/IL.rc +index 1111111..2222222 100644 +--- a/DevIL/src-IL/msvc/IL.rc ++++ b/DevIL/src-IL/msvc/IL.rc +@@ -69,7 +69,7 @@ END + + // Icon with lowest ID value placed first to ensure application icon + // remains consistent on all systems. +-IDI_ICON1 ICON "resources\\IL Logo.ico" ++IDI_ICON1 ICON "./resources/IL Logo.ico" + + #ifdef APSTUDIO_INVOKED + ///////////////////////////////////////////////////////////////////////////// +diff --git a/DevIL/src-ILU/msvc/ILU.rc b/DevIL/src-ILU/msvc/ILU.rc +index 1111111..2222222 100644 +--- a/DevIL/src-ILU/msvc/ILU.rc ++++ b/DevIL/src-ILU/msvc/ILU.rc +@@ -101,7 +101,7 @@ END + + // Icon with lowest ID value placed first to ensure application icon + // remains consistent on all systems. +-IDI_ICON1 ICON "resources\\IL Logo.ico" ++IDI_ICON1 ICON "./resources/IL Logo.ico" + + ///////////////////////////////////////////////////////////////////////////// + // +diff --git a/DevIL/src-ILUT/msvc/ILUT.rc b/DevIL/src-ILUT/msvc/ILUT.rc +index 1111111..2222222 100644 +--- a/DevIL/src-ILUT/msvc/ILUT.rc ++++ b/DevIL/src-ILUT/msvc/ILUT.rc +@@ -101,7 +101,7 @@ END + + // Icon with lowest ID value placed first to ensure application icon + // remains consistent on all systems. +-IDI_ICON1 ICON "resources\\IL Logo.ico" ++IDI_ICON1 ICON "./resources/IL Logo.ico" + + ///////////////////////////////////////////////////////////////////////////// + // diff --git a/src/devil-1-png.patch b/src/devil-1-png.patch deleted file mode 100644 index 86b21cf..0000000 --- a/src/devil-1-png.patch +++ /dev/null @@ -1,35 +0,0 @@ -This file is part of MXE. See LICENSE.md for licensing information. - -diff -urN devil-1.7.8.orig/src-IL/src/il_icon.c devil-1.7.8/src-IL/src/il_icon.c ---- devil-1.7.8.orig/src-IL/src/il_icon.c 2009-03-08 08:10:09.000000000 +0100 -+++ devil-1.7.8/src-IL/src/il_icon.c 2010-02-01 16:01:37.000000000 +0100 -@@ -525,7 +525,7 @@ - - // Expand low-bit-depth grayscale images to 8 bits - if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { -- png_set_gray_1_2_4_to_8(ico_png_ptr); -+ png_set_expand_gray_1_2_4_to_8(ico_png_ptr); - } - - // Expand RGB images with transparency to full alpha channels -diff -urN devil-1.7.8.orig/src-IL/src/il_png.c devil-1.7.8/src-IL/src/il_png.c ---- devil-1.7.8.orig/src-IL/src/il_png.c 2009-03-08 08:10:09.000000000 +0100 -+++ devil-1.7.8/src-IL/src/il_png.c 2010-02-01 15:58:41.000000000 +0100 -@@ -105,7 +105,7 @@ - Read = iread(Signature, 1, 8); - iseek(-Read, IL_SEEK_CUR); - -- return png_check_sig(Signature, 8); -+ return !png_sig_cmp(Signature, 0, 8); - } - - -@@ -278,7 +278,7 @@ - - // Expand low-bit-depth grayscale images to 8 bits - if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { -- png_set_gray_1_2_4_to_8(png_ptr); -+ png_set_expand_gray_1_2_4_to_8(png_ptr); - } - - // Expand RGB images with transparency to full alpha channels diff --git a/src/devil-2-il.patch b/src/devil-2-il.patch deleted file mode 100644 index 53899dd..0000000 --- a/src/devil-2-il.patch +++ /dev/null @@ -1,27 +0,0 @@ -This file is part of MXE. See LICENSE.md for licensing information. - -Contains ad hoc patches for cross building. - -From ba27492b5ffea8c7cdbd54b2337ca9537576ec18 Mon Sep 17 00:00:00 2001 -From: MXE -Date: Tue, 19 May 2015 12:38:30 +0300 -Subject: [PATCH] fix Devil compilation, see: - http://lists.nongnu.org/archive/html/mingw-cross-env-list/2015-04/msg00028.html - - -diff --git a/include/IL/il.h b/include/IL/il.h -index 540a56e..21fd6b2 100644 ---- a/include/IL/il.h -+++ b/include/IL/il.h -@@ -63,7 +63,7 @@ extern "C" { - #endif - #endif - --#ifdef RESTRICT_KEYWORD -+#if defined(RESTRICT_KEYWORD) && !defined(__cplusplus) - #define RESTRICT restrict - #define CONST_RESTRICT const restrict - #else --- -1.9.1 - diff --git a/src/devil.mk b/src/devil.mk index efd2a0a..008b5a0 100644 --- a/src/devil.mk +++ b/src/devil.mk @@ -4,40 +4,15 @@ PKG := devil $(PKG)_WEBSITE := https://openil.sourceforge.io/ $(PKG)_DESCR := DevIL $(PKG)_IGNORE := -$(PKG)_VERSION := 1.7.8 -$(PKG)_CHECKSUM := 682ffa3fc894686156337b8ce473c954bf3f4fb0f3ecac159c73db632d28a8fd -$(PKG)_SUBDIR := devil-$($(PKG)_VERSION) -$(PKG)_FILE := DevIL-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/openil/DevIL/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_VERSION := cba359b +$(PKG)_CHECKSUM := 18323d6ac0a9e5109b0f461c628e24fc2666eee5bd476aaca8cbcdb2dae9e211 +$(PKG)_GH_CONF := DentonW/DevIL/master $(PKG)_DEPS := gcc freeglut jasper jpeg lcms libmng libpng openexr sdl tiff zlib -define $(PKG)_UPDATE - $(WGET) -q -O- 'https://sourceforge.net/p/openil/svn/HEAD/tree/tags/' | \ - grep ' +Date: Thu, 20 Jul 2017 12:28:06 +1000 +Subject: [PATCH] add option to disable programs + +taken from: https://github.com/mdadams/jasper/pull/144 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -91,6 +91,7 @@ option(JAS_ENABLE_STRICT "Enable pedantic error checking" false) + option(JAS_ENABLE_AUTOMATIC_DEPENDENCIES "Enable automatic dependencies" true) + option(JAS_LOCAL "Enable local hacks for developers (do not enable)" false) + option(JAS_ENABLE_DOC "Enable building of the documentation" true) ++option(JAS_ENABLE_PROGRAMS "Enable building of the programs" true) + + ################################################################################ + # +@@ -368,7 +369,9 @@ endif() + ################################################################################ + + add_subdirectory(src/libjasper) +-add_subdirectory(src/appl) ++if (JAS_ENABLE_PROGRAMS) ++ add_subdirectory(src/appl) ++endif () + if (JAS_ENABLE_DOC) + add_subdirectory(doc) + endif () diff --git a/src/jasper.mk b/src/jasper.mk index 7449646..05d94ec 100644 --- a/src/jasper.mk +++ b/src/jasper.mk @@ -4,25 +4,19 @@ PKG := jasper $(PKG)_WEBSITE := https://www.ece.uvic.ca/~mdadams/jasper/ $(PKG)_DESCR := JasPer $(PKG)_IGNORE := -$(PKG)_VERSION := 1.900.1 -$(PKG)_CHECKSUM := 6b905a9c2aca2e275544212666eefc4eb44d95d0a57e4305457b407fe63f9494 -$(PKG)_SUBDIR := jasper-$($(PKG)_VERSION) -$(PKG)_FILE := jasper-$($(PKG)_VERSION).zip -$(PKG)_URL := https://www.ece.uvic.ca/~mdadams/jasper/software/$($(PKG)_FILE) +$(PKG)_VERSION := 2.0.13 +$(PKG)_CHECKSUM := b50413b41bfc82ae419298b41eadcde1aa31f362fb9dc2ac089e5cbc19f60c24 +$(PKG)_GH_CONF := mdadams/jasper, version- $(PKG)_DEPS := gcc jpeg -define $(PKG)_UPDATE - $(WGET) -q -O- 'https://www.ece.uvic.ca/~mdadams/jasper/' | \ - grep 'jasper-' | \ - $(SED) -n 's,.*jasper-\([0-9][^>]*\)\.zip.*,\1,p' | \ - head -1 -endef - define $(PKG)_BUILD - cd '$(1)' && ./configure \ - $(MXE_CONFIGURE_OPTS) \ - --enable-libjpeg \ - --disable-opengl \ - --without-x - $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= LDFLAGS="-no-undefined" + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \ + -DJAS_ENABLE_SHARED=$(CMAKE_SHARED_BOOL) \ + -DJAS_ENABLE_LIBJPEG=ON \ + -DJAS_ENABLE_OPENGL=OFF \ + -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF \ + -DJAS_ENABLE_DOC=OFF \ + -DJAS_ENABLE_PROGRAMS=OFF + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install endef -- cgit v0.12