-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
145 changed files
with
746 additions
and
866 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
diff -ruN giflib-5.2.1/CMakeLists.txt giflib-5.2.1-patch/CMakeLists.txt | ||
--- giflib-5.2.1/CMakeLists.txt 1970-01-01 09:00:00.000000000 +0900 | ||
+++ giflib-5.2.1-patch/CMakeLists.txt 2022-03-31 10:10:57.340022595 +0900 | ||
@@ -0,0 +1,142 @@ | ||
+cmake_minimum_required(VERSION 2.6.0) | ||
+ | ||
+project(giflib C) | ||
+ | ||
+SET(BUILD_STATIC_LIBS OFF CACHE BOOL "Whether to also build static libs") | ||
+ | ||
+execute_process(COMMAND ./getversion | ||
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
+ OUTPUT_VARIABLE VERSION | ||
+ OUTPUT_STRIP_TRAILING_WHITESPACE | ||
+) | ||
+ | ||
+set(LIBMAJOR 7) | ||
+set(LIBMINOR 1) | ||
+set(LIBPOINT 0) | ||
+set(LIBVER "${LIBMAJOR}.${LIBMINOR}.${LIBPOINT}") | ||
+ | ||
+set(giflib_SRC | ||
+ dgif_lib.c | ||
+ egif_lib.c | ||
+ getarg.c | ||
+ gifalloc.c | ||
+ gif_err.c | ||
+ gif_font.c | ||
+ gif_hash.c | ||
+ openbsd-reallocarray.c | ||
+ qprintf.c | ||
+ quantize.c | ||
+) | ||
+ | ||
+# Some utilities are installed | ||
+set(giflib_INSTALLABLE | ||
+ gif2rgb | ||
+ gifbuild | ||
+ gifecho | ||
+ giffilter | ||
+ giffix | ||
+ gifinto | ||
+ giftext | ||
+ giftool | ||
+ gifsponge | ||
+ gifclrmp | ||
+) | ||
+ | ||
+# Some utilities are only used internally for testing. | ||
+# There is a parallel list in doc/Makefile. | ||
+# These are all candidates for removal in future releases. | ||
+set(giflib_UTILS | ||
+ ${giflib_INSTALLABLE} | ||
+ gifbg | ||
+ gifcolor | ||
+ gifhisto | ||
+ gifwedge | ||
+) | ||
+ | ||
+file(GLOB giflib_MAN doc/*.1) | ||
+ | ||
+### Build library / tools | ||
+ | ||
+add_library(giflib SHARED ${giflib_SRC}) | ||
+target_link_libraries(giflib m) | ||
+set_target_properties(giflib PROPERTIES VERSION ${LIBVER} SOVERSION ${LIBMAJOR}) | ||
+if(WIN32) | ||
+ set_target_properties(giflib PROPERTIES SUFFIX "-${LIBMAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}") | ||
+endif(WIN32) | ||
+ | ||
+if(${BUILD_STATIC_LIBS}) | ||
+ add_library(giflib_static STATIC ${giflib_SRC}) | ||
+ set_target_properties(giflib_static PROPERTIES OUTPUT_NAME giflib) | ||
+endif(${BUILD_STATIC_LIBS}) | ||
+ | ||
+ | ||
+foreach(UTILITY ${giflib_UTILS}) | ||
+ add_executable(${UTILITY} ${UTILITY}.c) | ||
+ target_link_libraries(${UTILITY} giflib) | ||
+endforeach() | ||
+ | ||
+### Installation | ||
+ | ||
+install(TARGETS giflib | ||
+ RUNTIME DESTINATION bin | ||
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} | ||
+ LIBRARY DESTINATION lib${LIB_SUFFIX} | ||
+) | ||
+ | ||
+if(${BUILD_STATIC_LIBS}) | ||
+ install(TARGETS giflib_static ARCHIVE DESTINATION lib${LIB_SUFFIX}) | ||
+endif(${BUILD_STATIC_LIBS}) | ||
+ | ||
+foreach(UTILITY ${giflib_UTILS}) | ||
+ install(TARGETS ${UTILITY} DESTINATION bin) | ||
+endforeach() | ||
+ | ||
+install(FILES gif_lib.h DESTINATION include) | ||
+install(FILES ${giflib_MAN} DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1) | ||
+ | ||
+ | ||
+### Distribution tarball | ||
+set(giflib_DIST | ||
+ *.c | ||
+ *.h | ||
+ README | ||
+ NEWS | ||
+ TODO | ||
+ COPYING | ||
+ getversion | ||
+ ChangeLog | ||
+ CMakeLists.txt | ||
+ build.adoc | ||
+ history.adoc | ||
+ control | ||
+ doc/whatsinagif | ||
+ doc/*.1 | ||
+ doc/*.xml | ||
+ doc/*.txt | ||
+ doc/index.html.in | ||
+ doc/00README | ||
+ doc/Makefile | ||
+ tests | ||
+ pic | ||
+) | ||
+# We include all of the XML, and also generated manual pages | ||
+# so people working from the distribution tarball won't need xmlto. | ||
+add_custom_target(dist-gz | ||
+ COMMAND tar --transform='s:^:giflib-${VERSION}/:' -czf giflib-${VERSION}.tar.gz ${giflib_DIST} | ||
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
+) | ||
+ | ||
+add_custom_target(dist-bz2 | ||
+ COMMAND tar --transform='s:^:giflib-${VERSION}/:' -cjf giflib-${VERSION}.tar.bz2 ${giflib_DIST} | ||
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
+) | ||
+ | ||
+add_custom_target(dist DEPENDS dist-gz DEPENDS dist-bz2) | ||
+ | ||
+ | ||
+### Auditing tools | ||
+ | ||
+# cppcheck should run clean | ||
+add_custom_target(cppcheck | ||
+ COMMAND cppcheck --inline-suppr --template gcc --enable=all --suppress=unusedFunction --force *.[ch] | ||
+) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.