diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/devil | |
Diffstat (limited to 'vcpkg/ports/devil')
| -rw-r--r-- | vcpkg/ports/devil/0001_fix-encoding.patch | 173 | ||||
| -rw-r--r-- | vcpkg/ports/devil/0002_fix-missing-mfc-includes.patch | 102 | ||||
| -rw-r--r-- | vcpkg/ports/devil/0003_fix-openexr.patch | 55 | ||||
| -rw-r--r-- | vcpkg/ports/devil/0004_compatible-jasper-2-0-20.patch | 52 | ||||
| -rw-r--r-- | vcpkg/ports/devil/0005-fix-pkgconfig.patch | 52 | ||||
| -rw-r--r-- | vcpkg/ports/devil/0006-fix-ilut-header.patch | 12 | ||||
| -rw-r--r-- | vcpkg/ports/devil/0007-remove_register_keyword_cpp17.patch | 30 | ||||
| -rw-r--r-- | vcpkg/ports/devil/enable-static.patch | 26 | ||||
| -rw-r--r-- | vcpkg/ports/devil/jasper-4.patch | 28 | ||||
| -rw-r--r-- | vcpkg/ports/devil/portfile.cmake | 50 | ||||
| -rw-r--r-- | vcpkg/ports/devil/vcpkg.json | 67 |
11 files changed, 647 insertions, 0 deletions
diff --git a/vcpkg/ports/devil/0001_fix-encoding.patch b/vcpkg/ports/devil/0001_fix-encoding.patch new file mode 100644 index 0000000..59d826d --- /dev/null +++ b/vcpkg/ports/devil/0001_fix-encoding.patch @@ -0,0 +1,173 @@ +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-french.h b/DevIL/src-ILU/include/ilu_error/ilu_err-french.h +index d3b280d..445440e 100644 +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-french.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-french.h +@@ -17,19 +17,19 @@ + #include "ilu_internal.h" + + ILconst_string iluErrorStringsFrench[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { +- IL_TEXT("énumération invalide"), +- IL_TEXT("dépassement de mémoire"), +- IL_TEXT("format non supporté"), ++ IL_TEXT("énumération invalide"), ++ IL_TEXT("dépassement de mémoire"), ++ IL_TEXT("format non supporté"), + IL_TEXT("erreur interne"), +- IL_TEXT("valeur illégale"), +- IL_TEXT("opération illégale"), +- IL_TEXT("valeur de fichier illégale"), +- IL_TEXT("en-tête de fichier invalide"), +- IL_TEXT("paramètre invalide"), ++ IL_TEXT("valeur illégale"), ++ IL_TEXT("opération illégale"), ++ IL_TEXT("valeur de fichier illégale"), ++ IL_TEXT("en-tête de fichier invalide"), ++ IL_TEXT("paramètre invalide"), + IL_TEXT("ne peut pas ouvrir le fichier"), + IL_TEXT("extension invalide"), +- IL_TEXT("fichier déjà existant"), +- IL_TEXT("équivalent hors-format"), ++ IL_TEXT("fichier déjà existant"), ++ IL_TEXT("équivalent hors-format"), + IL_TEXT("stack overflow"), //often used like this in French, so no need to translate + IL_TEXT("stack underflow"), + IL_TEXT("conversion invalide"), +@@ -38,7 +38,7 @@ ILconst_string iluErrorStringsFrench[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = + }; + + ILconst_string iluLibErrorStringsFrench[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { +- IL_TEXT("gif : erreur dans la librairie"), //or: gif : erreur dans la bibliothèque (but less used) ++ IL_TEXT("gif : erreur dans la librairie"), //or: gif : erreur dans la bibliothèque (but less used) + IL_TEXT("jpeg : erreur dans la librairie"), + IL_TEXT("png : erreur dans la librairie"), + IL_TEXT("tiff : erreur dans la librairie"), +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-german.h b/DevIL/src-ILU/include/ilu_error/ilu_err-german.h +index bf3f05c..acdbe8a 100644 +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-german.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-german.h +@@ -6,7 +6,7 @@ + // + // Filename: src-ILU/include/ilu_error/ilu_err_German.h + // +-// Description: Error functions in German, translated by Andreas Stöckel. ++// Description: Error functions in German, translated by Andreas Stöckel. + // + //----------------------------------------------------------------------------- + +@@ -17,23 +17,23 @@ + #include "ilu_internal.h" + + ILconst_string iluErrorStringsGerman[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { +- IL_TEXT("Ungültiger Enumerator"), +- IL_TEXT("Kein Speicher verfügbar"), +- IL_TEXT("Das Format wird noch nicht unterstützt"), ++ IL_TEXT("Ungültiger Enumerator"), ++ IL_TEXT("Kein Speicher verfügbar"), ++ IL_TEXT("Das Format wird noch nicht unterstützt"), + IL_TEXT("Interner Fehler"), +- IL_TEXT("Ungültiger Wert"), +- IL_TEXT("Unzulässige Operation"), +- IL_TEXT("Unzulässiger Datei-Wert"), +- IL_TEXT("Unzulässiger Datei-Header"), +- IL_TEXT("Unzulässiger Parameter"), +- IL_TEXT("Datei konnte nicht geöffnet werden"), +- IL_TEXT("Ungültiger Erweiterung"), ++ IL_TEXT("Ungültiger Wert"), ++ IL_TEXT("Unzulässige Operation"), ++ IL_TEXT("Unzulässiger Datei-Wert"), ++ IL_TEXT("Unzulässiger Datei-Header"), ++ IL_TEXT("Unzulässiger Parameter"), ++ IL_TEXT("Datei konnte nicht geöffnet werden"), ++ IL_TEXT("Ungültiger Erweiterung"), + IL_TEXT("Die Datei existiert bereits"), + IL_TEXT("out format equivalent"), +- IL_TEXT("Stack Überlauf"), ++ IL_TEXT("Stack Überlauf"), + IL_TEXT("Stack Unterlauf"), +- IL_TEXT("Ungültige Konvertierung"), +- IL_TEXT("Unzulässige Abmessungen"), ++ IL_TEXT("Ungültige Konvertierung"), ++ IL_TEXT("Unzulässige Abmessungen"), + IL_TEXT("Fehler beim Lesen der Datei") + }; + +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h b/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h +index 09d7bd1..d34b23f 100644 +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h +@@ -22,13 +22,13 @@ ILconst_string iluErrorStringsItalian[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] + IL_TEXT("configuri non sostenne"), + IL_TEXT("erreur interne"), + IL_TEXT("errore interno"), +- IL_TEXT("opération illégale"), ++ IL_TEXT("opération illégale"), + IL_TEXT("operazione illegale"), + IL_TEXT("inebri archivio nullo"), + IL_TEXT("parametro nullo"), +- IL_TEXT("non può aprire l'archivio"), ++ IL_TEXT("non può aprire l'archivio"), + IL_TEXT("dilazione nulla"), +- IL_TEXT("archivi già esistendo"), ++ IL_TEXT("archivi già esistendo"), + IL_TEXT("equivalente fuori-configuri"), + IL_TEXT("inondi di batteria"), + IL_TEXT("insufficienza di batteria"), +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h b/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h +index 77b5a24..0945fdf 100644 +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h +@@ -6,7 +6,7 @@ + // + // Filename: src-ILU/include/ilu_error/ilu_err-spanish.h + // +-// Description: Error functions in Spanish, translated by Carlos Aragonés ++// Description: Error functions in Spanish, translated by Carlos Aragonés + // + //----------------------------------------------------------------------------- + +@@ -19,32 +19,32 @@ + ILconst_string iluErrorStringsSpanish[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("enumerador incorrecto"), + IL_TEXT("no queda memoria disponible"), +- IL_TEXT("formato no soportado todavía"), ++ IL_TEXT("formato no soportado todavÃa"), + IL_TEXT("error interno"), + IL_TEXT("valor incorrecto"), +- IL_TEXT("operación ilegaIL_TEXT("), ++ IL_TEXT("operación ilegaIL_TEXT("), + IL_TEXT("valor de fichero ilegaIL_TEXT("), + IL_TEXT("cabecera incorrecta"), +- IL_TEXT("parámetro incorrecto"), ++ IL_TEXT("parámetro incorrecto"), + IL_TEXT("no se puede abrir el fichero"), +- IL_TEXT("extensión desconocida"), ++ IL_TEXT("extensión desconocida"), + IL_TEXT("el fichero ya existe"), + IL_TEXT("formato de salida equivalente"), + IL_TEXT("desbordamiento superior de pila"), + IL_TEXT("desbordamiento inferior de pila"), +- IL_TEXT("conversión incorrecta"), +- IL_TEXT("número de dimensiones incorrecto"), ++ IL_TEXT("conversión incorrecta"), ++ IL_TEXT("número de dimensiones incorrecto"), + IL_TEXT("error de lectura en el fichero") + }; + + ILconst_string iluLibErrorStringsSpanish[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { +- IL_TEXT("error en la librería gif"), // the correct translation will be 'error en la biblioteca gif', but nobody in spain uses the word 'biblioteca' for the translation the word 'library'. Almost all Spanish programmers translate 'library' incorrectly to 'librería'. +- IL_TEXT("error en la librería jpeg"), +- IL_TEXT("error en la librería png"), +- IL_TEXT("error en la librería tiff"), +- IL_TEXT("error en la librería mng"), +- IL_TEXT("error en la librería jp2"), +- IL_TEXT("error en la librería exr"), ++ IL_TEXT("error en la librerÃa gif"), // the correct translation will be 'error en la biblioteca gif', but nobody in spain uses the word 'biblioteca' for the translation the word 'library'. Almost all Spanish programmers translate 'library' incorrectly to 'librerÃa'. ++ IL_TEXT("error en la librerÃa jpeg"), ++ IL_TEXT("error en la librerÃa png"), ++ IL_TEXT("error en la librerÃa tiff"), ++ IL_TEXT("error en la librerÃa mng"), ++ IL_TEXT("error en la librerÃa jp2"), ++ IL_TEXT("error en la librerÃa exr"), + }; + + ILconst_string iluMiscErrorStringsSpanish[2] = { diff --git a/vcpkg/ports/devil/0002_fix-missing-mfc-includes.patch b/vcpkg/ports/devil/0002_fix-missing-mfc-includes.patch new file mode 100644 index 0000000..3b18981 --- /dev/null +++ b/vcpkg/ports/devil/0002_fix-missing-mfc-includes.patch @@ -0,0 +1,102 @@ +diff --git a/DevIL/src-IL/msvc/IL Unicode.rc b/DevIL/src-IL/msvc/IL Unicode.rc +index 346758f..298a207 100644 +--- a/DevIL/src-IL/msvc/IL Unicode.rc ++++ b/DevIL/src-IL/msvc/IL Unicode.rc +@@ -7,7 +7,11 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" ++ + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS + +diff --git a/DevIL/src-IL/msvc/IL.rc b/DevIL/src-IL/msvc/IL.rc +index 8bfadf9..0b8289f 100644 +--- a/DevIL/src-IL/msvc/IL.rc ++++ b/DevIL/src-IL/msvc/IL.rc +@@ -7,10 +7,13 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + +-///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS ++///////////////////////////////////////////////////////////////////////////// + + ///////////////////////////////////////////////////////////////////////////// + // English (United States) resources +diff --git a/DevIL/src-IL/msvc8/IL Unicode.rc b/DevIL/src-IL/msvc8/IL Unicode.rc +index 026ee49..66ca4bf 100644 +--- a/DevIL/src-IL/msvc8/IL Unicode.rc ++++ b/DevIL/src-IL/msvc8/IL Unicode.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +diff --git a/DevIL/src-IL/msvc8/IL.rc b/DevIL/src-IL/msvc8/IL.rc +index 9301d41..3ad52c0 100644 +--- a/DevIL/src-IL/msvc8/IL.rc ++++ b/DevIL/src-IL/msvc8/IL.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +diff --git a/DevIL/src-IL/msvc9/IL Unicode.rc b/DevIL/src-IL/msvc9/IL Unicode.rc +index d0dff4f..c9cf51f 100644 +--- a/DevIL/src-IL/msvc9/IL Unicode.rc ++++ b/DevIL/src-IL/msvc9/IL Unicode.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +diff --git a/DevIL/src-IL/msvc9/IL.rc b/DevIL/src-IL/msvc9/IL.rc +index 9f5c795..6b8c891 100644 +--- a/DevIL/src-IL/msvc9/IL.rc ++++ b/DevIL/src-IL/msvc9/IL.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +
\ No newline at end of file diff --git a/vcpkg/ports/devil/0003_fix-openexr.patch b/vcpkg/ports/devil/0003_fix-openexr.patch new file mode 100644 index 0000000..2465bb9 --- /dev/null +++ b/vcpkg/ports/devil/0003_fix-openexr.patch @@ -0,0 +1,55 @@ +diff --git a/DevIL/src-IL/CMakeLists.txt b/DevIL/src-IL/CMakeLists.txt +index 02e4f03..4accaa1 100644 +--- a/DevIL/src-IL/CMakeLists.txt ++++ b/DevIL/src-IL/CMakeLists.txt +@@ -235,8 +235,12 @@ target_link_libraries(IL ${libs}) + + # generate config.h + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.h.cmake.in ${CMAKE_CURRENT_SOURCE_DIR}/include/config.h) +- +- ++add_definitions(-DHAVE_CONFIG_H) ++if(WIN32) ++ if(BUILD_SHARED_LIBS) ++ add_definitions(-DOPENEXR_DLL) ++ endif() ++endif() + + # generate pkg-config file + # TODO: add Requires.private or Libs.private +diff --git a/DevIL/src-IL/src/il_exr.cpp b/DevIL/src-IL/src/il_exr.cpp +index bbb3978..3916c6f 100644 +--- a/DevIL/src-IL/src/il_exr.cpp ++++ b/DevIL/src-IL/src/il_exr.cpp +@@ -14,15 +14,10 @@ + #include "il_internal.h" + #ifndef IL_NO_EXR + +-#ifndef HAVE_CONFIG_H // We are probably on a Windows box . +-//#define OPENEXR_DLL +-#define HALF_EXPORTS +-#endif //HAVE_CONFIG_H +- + #include "il_exr.h" +-#include <ImfRgba.h> +-#include <ImfArray.h> +-#include <ImfRgbaFile.h> ++#include <OpenEXR/ImfRgba.h> ++#include <OpenEXR/ImfArray.h> ++#include <OpenEXR/ImfRgbaFile.h> + //#include <ImfTiledRgbaFile.h> + //#include <ImfInputFile.h> + //#include <ImfTiledInputFile.h> +diff --git a/DevIL/src-IL/include/il_exr.h b/DevIL/src-IL/include/il_exr.h +index 3d880c4..04d721a 100644 +--- a/DevIL/src-IL/include/il_exr.h ++++ b/DevIL/src-IL/include/il_exr.h +@@ -15,7 +15,7 @@ + #define EXR_H + + #include "il_internal.h" +-#include <ImfIO.h> ++#include <OpenEXR/ImfIO.h> + + + //using namespace Imf; // Using this leads to errors with Microsoft's IStream. diff --git a/vcpkg/ports/devil/0004_compatible-jasper-2-0-20.patch b/vcpkg/ports/devil/0004_compatible-jasper-2-0-20.patch new file mode 100644 index 0000000..5cb2363 --- /dev/null +++ b/vcpkg/ports/devil/0004_compatible-jasper-2-0-20.patch @@ -0,0 +1,52 @@ +diff --git a/DevIL/src-IL/src/il_jp2.cpp b/DevIL/src-IL/src/il_jp2.cpp +index 730afee..a419c14 100644 +--- a/DevIL/src-IL/src/il_jp2.cpp ++++ b/DevIL/src-IL/src/il_jp2.cpp +@@ -313,20 +313,31 @@ ILboolean iLoadJp2Internal(jas_stream_t *Stream, ILimage *Image) + } + + +- +-static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt) ++#ifdef __APPLE__ ++static int iJp2_file_read(void *obj, char *buf, unsigned int cnt) ++#else ++static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, unsigned int cnt) ++#endif + { + obj; +- return iread(buf, 1, cnt); ++ return iread((void*)buf, 1, cnt); + } + +-static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt) ++#ifdef __APPLE__ ++static int iJp2_file_write(void *obj, const char *buf, unsigned int cnt) ++#else ++static int iJp2_file_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt) ++#endif + { + obj; + return iwrite(buf, 1, cnt); + } + ++#ifdef __APPLE__ + static long iJp2_file_seek(jas_stream_obj_t *obj, long offset, int origin) ++#else ++static long iJp2_file_seek(void *obj, long offset, int origin) ++#endif + { + obj; + +@@ -343,7 +354,11 @@ static long iJp2_file_seek(jas_stream_obj_t *obj, long offset, int origin) + return 0; // Failed + } + ++#ifdef __APPLE__ ++static int iJp2_file_close(void *obj) ++#else + static int iJp2_file_close(jas_stream_obj_t *obj) ++#endif + { + obj; + return 0; // We choose when we want to close the file. diff --git a/vcpkg/ports/devil/0005-fix-pkgconfig.patch b/vcpkg/ports/devil/0005-fix-pkgconfig.patch new file mode 100644 index 0000000..d45af68 --- /dev/null +++ b/vcpkg/ports/devil/0005-fix-pkgconfig.patch @@ -0,0 +1,52 @@ +diff --git a/DevIL/src-IL/CMakeLists.txt b/DevIL/src-IL/CMakeLists.txt +index 4accaa1..c3a1874 100644 +--- a/DevIL/src-IL/CMakeLists.txt ++++ b/DevIL/src-IL/CMakeLists.txt +@@ -160,6 +160,27 @@ if(WIN32) + # Linux uses libIL.so, libILU.so, and libILUT.so, but Windows uses + # DevIL.dll, ILU.dll, and ILUT.dll. + set_target_properties(IL PROPERTIES OUTPUT_NAME "DevIL") ++ ++ configure_file(${CMAKE_CURRENT_LIST_DIR}/pkgconfig/IL.pc.cmake.in ${CMAKE_CURRENT_LIST_DIR}/pkgconfig/DevIL.pc.cmake.in COPYONLY) ++ ++ file(READ ${CMAKE_CURRENT_LIST_DIR}/pkgconfig/DevIL.pc.cmake.in PKGCONFIG_FILE) ++ string(REPLACE "IL" "DevIL" PKGCONFIG_FILE "${PKGCONFIG_FILE}") ++ file(WRITE ${CMAKE_CURRENT_LIST_DIR}/pkgconfig/DevIL.pc.cmake.in "${PKGCONFIG_FILE}") ++ ++ file(READ ${CMAKE_CURRENT_LIST_DIR}/../src-ILU/pkgconfig/ILU.pc.cmake.in PKGCONFIG_FILE) ++ string(REPLACE "Requires: IL" "Requires: DevIL" PKGCONFIG_FILE "${PKGCONFIG_FILE}") ++ string(REPLACE "Libs.private: -lIL" "Libs.private: -lDevIL" PKGCONFIG_FILE "${PKGCONFIG_FILE}") ++ file(WRITE ${CMAKE_CURRENT_LIST_DIR}/../src-ILU/pkgconfig/ILU.pc.cmake.in "${PKGCONFIG_FILE}") ++ ++ file(READ ${CMAKE_CURRENT_LIST_DIR}/../src-ILUT/pkgconfig/ILUT.pc.cmake.in PKGCONFIG_FILE) ++ string(REPLACE "Requires: IL" "Requires: DevIL" PKGCONFIG_FILE "${PKGCONFIG_FILE}") ++ string(REPLACE "Libs.private: -lIL" "Libs.private: -lDevIL" PKGCONFIG_FILE "${PKGCONFIG_FILE}") ++ file(WRITE ${CMAKE_CURRENT_LIST_DIR}/../src-ILUT/pkgconfig/ILUT.pc.cmake.in "${PKGCONFIG_FILE}") ++ set(PKGCFG_IN_FILE pkgconfig/DevIL.pc.cmake.in) ++ set(PKGCFG_FILE DevIL.pc) ++else(WIN32) ++ set(PKGCFG_IN_FILE pkgconfig/IL.pc.cmake.in) ++ set(PKGCFG_FILE IL.pc) + endif(WIN32) + + if(UNICODE) +@@ -246,8 +267,8 @@ endif() + # TODO: add Requires.private or Libs.private + # (needed to support static linking?) + # TODO: sort out version number +-configure_file( pkgconfig/IL.pc.cmake.in +- ${CMAKE_CURRENT_BINARY_DIR}/IL.pc @ONLY) ++configure_file( ${PKGCFG_IN_FILE} ++ ${CMAKE_CURRENT_BINARY_DIR}/${PKGCFG_FILE} @ONLY) + + + # Installation +@@ -259,7 +280,7 @@ install (TARGETS IL + install (FILES ../include/IL/il.h DESTINATION include/IL) + + install(FILES +- ${CMAKE_CURRENT_BINARY_DIR}/IL.pc ++ ${CMAKE_CURRENT_BINARY_DIR}/${PKGCFG_FILE} + DESTINATION lib/pkgconfig + ) + diff --git a/vcpkg/ports/devil/0006-fix-ilut-header.patch b/vcpkg/ports/devil/0006-fix-ilut-header.patch new file mode 100644 index 0000000..5af04e8 --- /dev/null +++ b/vcpkg/ports/devil/0006-fix-ilut-header.patch @@ -0,0 +1,12 @@ +diff --git a/DevIL/src-ILUT/CMakeLists.txt b/DevIL/src-ILUT/CMakeLists.txt +index 398d3c1..617c8d8 100644 +--- a/DevIL/src-ILUT/CMakeLists.txt ++++ b/DevIL/src-ILUT/CMakeLists.txt +@@ -77,6 +77,7 @@ install (TARGETS ILUT + RUNTIME DESTINATION bin + ) + install (FILES ../include/IL/ilut.h DESTINATION include/IL) ++install (FILES ../include/IL/ilut_config.h DESTINATION include/IL) + + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/ILUT.pc diff --git a/vcpkg/ports/devil/0007-remove_register_keyword_cpp17.patch b/vcpkg/ports/devil/0007-remove_register_keyword_cpp17.patch new file mode 100644 index 0000000..5876fe3 --- /dev/null +++ b/vcpkg/ports/devil/0007-remove_register_keyword_cpp17.patch @@ -0,0 +1,30 @@ +diff --git a/DevIL/src-IL/src/il_manip.cpp b/DevIL/src-IL/src/il_manip.cpp +index 79acc99..229a692 100644 +--- a/DevIL/src-IL/src/il_manip.cpp ++++ b/DevIL/src-IL/src/il_manip.cpp +@@ -37,9 +37,9 @@ ILushort ILAPIENTRY ilFloatToHalf(ILuint i) { + // of float and half (127 versus 15). + // + +- register int s = (i >> 16) & 0x00008000; +- register int e = ((i >> 23) & 0x000000ff) - (127 - 15); +- register int m = i & 0x007fffff; ++ int s = (i >> 16) & 0x00008000; ++ int e = ((i >> 23) & 0x000000ff) - (127 - 15); ++ int m = i & 0x007fffff; + + // + // Now reassemble s, e and m into a half: +diff --git a/DevIL/src-ILU/src/ilu_scaling.cpp b/DevIL/src-ILU/src/ilu_scaling.cpp +index c2893a3..ef35c13 100644 +--- a/DevIL/src-ILU/src/ilu_scaling.cpp ++++ b/DevIL/src-ILU/src/ilu_scaling.cpp +@@ -406,7 +406,7 @@ main(argc, argv) + int argc; + char *argv[]; + { +- register int c; ++ int c; + int optind; + char *optarg; + int xsize = 0, ysize = 0; diff --git a/vcpkg/ports/devil/enable-static.patch b/vcpkg/ports/devil/enable-static.patch new file mode 100644 index 0000000..8d77c0d --- /dev/null +++ b/vcpkg/ports/devil/enable-static.patch @@ -0,0 +1,26 @@ +diff --git a/DevIL/src-ILU/CMakeLists.txt b/DevIL/src-ILU/CMakeLists.txt +index 17a3afe..a46ab41 100644 +--- a/DevIL/src-ILU/CMakeLists.txt ++++ b/DevIL/src-ILU/CMakeLists.txt +@@ -43,7 +43,7 @@ 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}) ++add_library(ILU ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) + + + ## ILU requires IL +diff --git a/DevIL/src-ILUT/CMakeLists.txt b/DevIL/src-ILUT/CMakeLists.txt +index 21470cb..398d3c1 100644 +--- a/DevIL/src-ILUT/CMakeLists.txt ++++ b/DevIL/src-ILUT/CMakeLists.txt +@@ -43,7 +43,7 @@ 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}) ++add_library(ILUT ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC}) + + ## add link sub library info + target_link_libraries(ILUT diff --git a/vcpkg/ports/devil/jasper-4.patch b/vcpkg/ports/devil/jasper-4.patch new file mode 100644 index 0000000..2373a0f --- /dev/null +++ b/vcpkg/ports/devil/jasper-4.patch @@ -0,0 +1,28 @@ +diff --git a/DevIL/src-IL/src/il_jp2.cpp b/DevIL/src-IL/src/il_jp2.cpp +index a419c1484..7b7e3cb12 100644 +--- a/DevIL/src-IL/src/il_jp2.cpp ++++ b/DevIL/src-IL/src/il_jp2.cpp +@@ -314,9 +314,9 @@ ILboolean iLoadJp2Internal(jas_stream_t *Stream, ILimage *Image) + + + #ifdef __APPLE__ +-static int iJp2_file_read(void *obj, char *buf, unsigned int cnt) ++static ssize_t iJp2_file_read(void *obj, char *buf, size_t cnt) + #else +-static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, unsigned int cnt) ++static ssize_t iJp2_file_read(jas_stream_obj_t *obj, char *buf, size_t cnt) + #endif + { + obj; +@@ -324,9 +324,9 @@ static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, unsigned int cnt) + } + + #ifdef __APPLE__ +-static int iJp2_file_write(void *obj, const char *buf, unsigned int cnt) ++static ssize_t iJp2_file_write(void *obj, const char *buf, size_t cnt) + #else +-static int iJp2_file_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt) ++static ssize_t iJp2_file_write(jas_stream_obj_t *obj, const char *buf, size_t cnt) + #endif + { + obj; diff --git a/vcpkg/ports/devil/portfile.cmake b/vcpkg/ports/devil/portfile.cmake new file mode 100644 index 0000000..fb0aca6 --- /dev/null +++ b/vcpkg/ports/devil/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DentonW/DevIL + REF v1.8.0 + SHA512 4aed5e50a730ece8b1eb6b2f6204374c6fb6f5334cf7c880d84c0f79645ea7c6b5118f57a7868a487510fc59c452f51472b272215d4c852f265f58b5857e17c7 + HEAD_REF master + PATCHES + 0001_fix-encoding.patch + 0002_fix-missing-mfc-includes.patch + 0003_fix-openexr.patch + enable-static.patch + 0004_compatible-jasper-2-0-20.patch + 0005-fix-pkgconfig.patch + 0006-fix-ilut-header.patch + jasper-4.patch + 0007-remove_register_keyword_cpp17.patch +) + +file(REMOVE "${SOURCE_PATH}/DevIL/src-IL/cmake/FindOpenEXR.cmake") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + INVERTED_FEATURES + libpng IL_NO_PNG + tiff IL_NO_TIF + libjpeg IL_NO_JPG + openexr IL_NO_EXR + jasper IL_NO_JP2 + lcms IL_NO_LCMS +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/DevIL" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + ${FEATURE_OPTIONS} + -DIL_NO_MNG=ON + -DIL_USE_DXTC_NVIDIA=OFF + -DIL_USE_DXTC_SQUISH=OFF +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/devil/vcpkg.json b/vcpkg/ports/devil/vcpkg.json new file mode 100644 index 0000000..b617165 --- /dev/null +++ b/vcpkg/ports/devil/vcpkg.json @@ -0,0 +1,67 @@ +{ + "name": "devil", + "version": "1.8.0", + "port-version": 13, + "description": "A full featured cross-platform image library", + "homepage": "https://github.com/DentonW/DevIL", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "jasper", + "lcms", + "libjpeg", + "libpng", + "openexr", + "tiff" + ], + "features": { + "jasper": { + "description": "Use JasPer for .jp2 (and some .icns) support", + "dependencies": [ + "jasper" + ] + }, + "lcms": { + "description": "Use Little CMS for color profiles", + "dependencies": [ + "lcms" + ] + }, + "libjpeg": { + "description": "Use Libjpeg for .jpg (and some .blp) support", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "libpng": { + "description": "Use Libpng for .png (and some .ico)", + "dependencies": [ + "libpng" + ] + }, + "openexr": { + "description": " Use openexr", + "dependencies": [ + "openexr" + ] + }, + "tiff": { + "description": "Use Libtiff for .tif support", + "dependencies": [ + { + "name": "tiff", + "default-features": false + } + ] + } + } +} |