all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob cb5919ebf4891d9cfbfcd010742854c6b6d3e3e1 4777 bytes (raw)
name: gnu/packages/patches/libjxr-use-cmake.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
 
Description: Prefer a cmake based build system
Author: Mathieu Malaterre <malat@debian.org>
Forwarded: https://jxrlib.codeplex.com/discussions/440294

Index: jxrlib-1.1/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ jxrlib-1.1/CMakeLists.txt	2014-03-26 17:05:04.429637801 +0100
@@ -0,0 +1,134 @@
+# Copyright Mathieu Malaterre <malat@debian.org>
+# BSD (Same as jxrlib)
+cmake_minimum_required(VERSION 2.8)
+project(jxrlib C)
+
+# Need shared libs for ABI
+set(BUILD_SHARED_LIBS ON)
+
+# helper macro to preserve original Makefile convention
+macro(JXR_MAKE_OBJ SET_NAME)
+  foreach(src ${SRC_${SET_NAME}})
+    list(APPEND OBJ_${SET_NAME} ${DIR_${SET_NAME}}/${src})
+  endforeach()
+endmacro()
+
+include(TestBigEndian)
+test_big_endian(ISBIGENDIAN)
+if(ISBIGENDIAN)
+  set(DEF_ENDIAN _BIG__ENDIAN_)
+endif()
+
+set(DIR_SYS image/sys)
+set(DIR_DEC image/decode)
+set(DIR_ENC image/encode)
+
+set(DIR_GLUE jxrgluelib)
+set(DIR_TEST jxrtestlib)
+set(DIR_EXEC jxrencoderdecoder)
+
+if(NOT JXRLIB_INSTALL_BIN_DIR)
+  set(JXRLIB_INSTALL_BIN_DIR "bin")
+endif()
+
+if(NOT JXRLIB_INSTALL_LIB_DIR)
+  set(JXRLIB_INSTALL_LIB_DIR "lib")
+endif()
+
+if(NOT JXRLIB_INSTALL_INCLUDE_DIR)
+  set(JXRLIB_INSTALL_INCLUDE_DIR "include/jxrlib")
+endif()
+
+include_directories(
+  common/include
+  ${DIR_SYS}
+  ${DIR_GLUE}
+  ${DIR_TEST}
+)
+
+# where is strlcpy ?
+include(CheckSymbolExists)
+check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY)
+#set(CMAKE_REQUIRED_LIBRARIES bsd)
+#CHECK_SYMBOL_EXISTS(strlcpy "string.h" HAVE_STRLCPY4)
+# on linux, strlcpy is in -lbsd:
+#if(NOT HAVE_STRLCPY)
+#  include(CheckLibraryExists)
+#  find_library(BSD_LIBRARY bsd)
+#  check_library_exists(bsd "strlcpy" ${BSD_LIBRARY} HAVE_STRLCPY_BSD)
+#endif()
+
+# JPEG-XR
+set(SRC_SYS adapthuff.c image.c strcodec.c strPredQuant.c strTransform.c perfTimerANSI.c)
+JXR_MAKE_OBJ(SYS)
+set(SRC_DEC decode.c postprocess.c segdec.c strdec.c strInvTransform.c strPredQuantDec.c JXRTranscode.c)
+JXR_MAKE_OBJ(DEC)
+set(SRC_ENC encode.c segenc.c strenc.c strFwdTransform.c strPredQuantEnc.c)
+JXR_MAKE_OBJ(ENC)
+
+add_library(jpegxr ${OBJ_ENC} ${OBJ_DEC} ${OBJ_SYS})
+set_property(TARGET jpegxr
+  PROPERTY COMPILE_DEFINITIONS __ANSI__ DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN}
+)
+set_property(TARGET jpegxr PROPERTY LINK_INTERFACE_LIBRARIES "")
+set_property(TARGET jpegxr PROPERTY COMPILE_FLAGS -w)
+# VERSION/SOVERSION
+set_property(TARGET jpegxr PROPERTY VERSION 1.1)
+set_property(TARGET jpegxr PROPERTY SOVERSION 0)
+install(TARGETS jpegxr
+  EXPORT JXRLibTargets
+  RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR} COMPONENT Applications
+  LIBRARY DESTINATION ${JXRLIB_INSTALL_LIB_DIR} COMPONENT Libraries
+)
+
+# JXR-GLUE
+set(SRC_GLUE JXRGlue.c JXRMeta.c JXRGluePFC.c JXRGlueJxr.c)
+JXR_MAKE_OBJ(GLUE)
+set(SRC_TEST JXRTest.c JXRTestBmp.c JXRTestHdr.c JXRTestPnm.c JXRTestTif.c JXRTestYUV.c)
+JXR_MAKE_OBJ(TEST)
+
+add_library(jxrglue ${OBJ_GLUE} ${OBJ_TEST})
+set_property(TARGET jxrglue
+  PROPERTY COMPILE_DEFINITIONS __ANSI__ DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN}
+)
+set_property(TARGET jxrglue PROPERTY LINK_INTERFACE_LIBRARIES "")
+set_property(TARGET jxrglue PROPERTY COMPILE_FLAGS -w)
+# VERSION/SOVERSION
+set_property(TARGET jxrglue PROPERTY VERSION 1.1)
+set_property(TARGET jxrglue PROPERTY SOVERSION 0)
+install(TARGETS jxrglue
+  EXPORT JXRLibTargets
+  RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR} COMPONENT Applications
+  LIBRARY DESTINATION ${JXRLIB_INSTALL_LIB_DIR} COMPONENT Libraries
+)
+#if(HAVE_STRLCPY_BSD)
+#	target_link_libraries(jxrglue ${BSD_LIBRARY})
+#endif()
+target_link_libraries(jxrglue jpegxr m)
+# Enc app files
+set(ENCAPP JxrEncApp)
+add_executable(${ENCAPP} ${DIR_EXEC}/${ENCAPP}.c)
+set_property(TARGET ${ENCAPP}
+  PROPERTY COMPILE_DEFINITIONS __ANSI__ DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN}
+)
+set_property(TARGET ${ENCAPP} PROPERTY COMPILE_FLAGS -w)
+target_link_libraries(${ENCAPP} jxrglue) # jpegxr)
+install(TARGETS ${ENCAPP} RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR})
+# Dec app files
+set(DECAPP JxrDecApp)
+add_executable(${DECAPP} ${DIR_EXEC}/${DECAPP}.c)
+set_property(TARGET ${DECAPP}
+  PROPERTY COMPILE_DEFINITIONS __ANSI__ DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN}
+)
+set_property(TARGET ${DECAPP} PROPERTY COMPILE_FLAGS -w)
+target_link_libraries(${DECAPP} jxrglue) # jpegxr)
+install(TARGETS ${DECAPP} RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR})
+
+# install rules
+install(FILES jxrgluelib/JXRGlue.h jxrgluelib/JXRMeta.h jxrtestlib/JXRTest.h
+  image/sys/windowsmediaphoto.h
+  DESTINATION ${JXRLIB_INSTALL_INCLUDE_DIR} COMPONENT Headers
+)
+install(DIRECTORY common/include/ DESTINATION ${JXRLIB_INSTALL_INCLUDE_DIR}
+  FILES_MATCHING PATTERN "*.h"
+)

debug log:

solving cb5919e ...
found cb5919e in https://yhetil.org/guix/87eg39qvjh.fsf@openmailbox.org/

applying [1/1] https://yhetil.org/guix/87eg39qvjh.fsf@openmailbox.org/
diff --git a/gnu/packages/patches/libjxr-use-cmake.patch b/gnu/packages/patches/libjxr-use-cmake.patch
new file mode 100644
index 0000000..cb5919e

Checking patch gnu/packages/patches/libjxr-use-cmake.patch...
Applied patch gnu/packages/patches/libjxr-use-cmake.patch cleanly.

index at:
100644 cb5919ebf4891d9cfbfcd010742854c6b6d3e3e1	gnu/packages/patches/libjxr-use-cmake.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.