Skip to content

Commit

Permalink
remove GPL demosaic pack support (#28)
Browse files Browse the repository at this point in the history
non-functional since 0.19
  • Loading branch information
letmaik authored Feb 20, 2021
1 parent fb0759c commit 5d54a89
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 95 deletions.
58 changes: 0 additions & 58 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,15 @@ OPTION(ENABLE_LCMS "Build library with LCMS support
OPTION(ENABLE_JASPER "Build library with libjasper support (default=ON)" ON)
OPTION(ENABLE_EXAMPLES "Build library with sample command-line programs (default=ON)" ${MASTER_PROJECT})
OPTION(ENABLE_RAWSPEED "Build library with extra RawSpeed codec support (default=OFF)" OFF)
OPTION(ENABLE_DEMOSAIC_PACK_GPL2 "Build library with extra Demosaic pack GPL2 (default=OFF)" OFF)
OPTION(ENABLE_DEMOSAIC_PACK_GPL3 "Build library with extra Demosaic pack GPL3 (default=OFF)" OFF)
OPTION(ENABLE_DCRAW_DEBUG "Build library with debug message from dcraw (default=OFF)" OFF)
OPTION(ENABLE_X3FTOOLS "Build library with Foveon X3F support (default=OFF)" OFF)
OPTION(ENABLE_6BY9RPI "Build library with Raspberry Pi RAW support (default=OFF)" OFF)
option(LIBRAW_UNINSTALL_TARGET "Add a custom target to ease removal of installed targets" ${MASTER_PROJECT})
option(LIBRAW_INSTALL "Generate the install target." ${MASTER_PROJECT})

SET(DEMOSAIC_PACK_GPL2_RPATH "LibRaw-demosaic-pack-GPL2" CACHE STRING
"Relative path to extra Demosaic pack GPL2 (default=LibRaw-demosaic-pack-GPL2)")

SET(DEMOSAIC_PACK_GPL3_RPATH "LibRaw-demosaic-pack-GPL3" CACHE STRING
"Relative path to extra Demosaic pack GPL3 (default=LibRaw-demosaic-pack-GPL3)")

SET(RAWSPEED_RPATH "RawSpeed" CACHE STRING
"Relative path to extra RawSpeed codec (default=RawSpeed)")

SET(DEMOSAIC_PACK_GPL2_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${DEMOSAIC_PACK_GPL2_RPATH}")
SET(DEMOSAIC_PACK_GPL3_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${DEMOSAIC_PACK_GPL3_RPATH}")
SET(RAWSPEED_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${RAWSPEED_RPATH}")

SET(INSTALL_CMAKE_MODULE_PATH "share/libraw/cmake" CACHE STRING
Expand Down Expand Up @@ -338,42 +328,6 @@ ENDIF()

# -- Common LibRaw library compilation rules ------------------------------------------------------------------

SET(DEMOSAIC_PACK_GPL2_SUPPORT_CAN_BE_COMPILED false)

IF(ENABLE_DEMOSAIC_PACK_GPL2)
MESSAGE(STATUS "Demosaic pack GPL2 path: ${DEMOSAIC_PACK_GPL2_PATH}")

IF(EXISTS "${DEMOSAIC_PACK_GPL2_PATH}/dcraw_foveon.c")
INCLUDE_DIRECTORIES(${DEMOSAIC_PACK_GPL2_PATH})
# Flag to include demosaic pack GPL2
ADD_DEFINITIONS(-DLIBRAW_DEMOSAIC_PACK_GPL2)
SET(DEMOSAIC_PACK_GPL2_SUPPORT_CAN_BE_COMPILED true)
ELSE()
MESSAGE(STATUS "Demosaic pack GPL2 source code not found. Please checkout source code from Libraw project website.")
ENDIF()
ENDIF()

# For registration to libraw_config.h
MACRO_BOOL_TO_01(DEMOSAIC_PACK_GPL2_SUPPORT_CAN_BE_COMPILED LIBRAW_USE_DEMOSAIC_PACK_GPL2)

SET(DEMOSAIC_PACK_GPL3_SUPPORT_CAN_BE_COMPILED false)

IF(ENABLE_DEMOSAIC_PACK_GPL3)
MESSAGE(STATUS "Demosaic pack GPL3 path: ${DEMOSAIC_PACK_GPL3_PATH}")

IF(EXISTS "${DEMOSAIC_PACK_GPL3_PATH}/green_equi.c")
INCLUDE_DIRECTORIES(${DEMOSAIC_PACK_GPL3_PATH})
# Flag to include demosaic pack GPL3
ADD_DEFINITIONS(-DLIBRAW_DEMOSAIC_PACK_GPL3)
SET(DEMOSAIC_PACK_GPL3_SUPPORT_CAN_BE_COMPILED true)
ELSE()
MESSAGE(STATUS "Demosaic pack GPL3 source code not found. Please checkout source code from Libraw project website.")
ENDIF()
ENDIF()

# For registration to libraw_config.h
MACRO_BOOL_TO_01(DEMOSAIC_PACK_GPL3_SUPPORT_CAN_BE_COMPILED LIBRAW_USE_DEMOSAIC_PACK_GPL3)

# Flag to add debug print on the console
IF(ENABLE_DCRAW_DEBUG)
ADD_DEFINITIONS(-DDCRAW_VERBOSE)
Expand Down Expand Up @@ -458,18 +412,6 @@ ELSE()
MESSAGE(STATUS " Libraw will be compiled with DNG lossy codec support ......... NO")
ENDIF()

IF(DEMOSAIC_PACK_GPL2_SUPPORT_CAN_BE_COMPILED)
MESSAGE(STATUS " Libraw will be compiled with Demosaic Pack GPL2 support ...... YES")
ELSE()
MESSAGE(STATUS " Libraw will be compiled with Demosaic Pack GPL2 support ...... NO")
ENDIF()

IF(DEMOSAIC_PACK_GPL3_SUPPORT_CAN_BE_COMPILED)
MESSAGE(STATUS " Libraw will be compiled with Demosaic Pack GPL3 support ...... YES")
ELSE()
MESSAGE(STATUS " Libraw will be compiled with Demosaic Pack GPL3 support ...... NO")
ENDIF()

IF(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
MESSAGE(STATUS " Libraw will be compiled with RawSpeed support ................ YES")
ELSE()
Expand Down
33 changes: 2 additions & 31 deletions INSTALL.CMAKE
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,9 @@ I. Installation steps

$ tar xzvf LibRaw-0.xx.yy.tar.gz

2. If you wish to use LibRaw demosaic pack(s), unpack them in the same folder:
2. Copy this LibRaw-cmake scripts in LibRaw-... folder

$ tar xzvf LibRaw-demosaic-pack-GPL2-0.xx.yy.tar.gz
$ tar xzvf LibRaw-demosaic-pack-GPL3-0.xx.yy.tar.gz

3. Copy this LibRaw-cmake scripts in LibRaw-... folder

4. Go to LibRaw folder and run ./configure and make:
3. Go to LibRaw folder and run ./configure and make:

$ cd LibRaw-0.xx.yy
$ ./cmake [...optional args...] .
Expand Down Expand Up @@ -45,30 +40,6 @@ II. ./cmake options
Enables/disables examples compilation and installation. Enabled by default


-DENABLE_DEMOSAIC_PACK_GPL2=ON/OFF
-DDEMOSAIC_PACK_GPL2_RPATH=FOLDERNAME
-DCHECKOUT_DEMOSAIC_PACK_GPL2=ON/OFF

Enables/disables support of additional demosaic methods licensed under GPL2
You need to download and unpack LibRaw-demosaic-pack-GPL2 archive to use
this feature.
./cmake will try to find demosaic pack in:

a) If folder is specified via -DDDEMOSAIC_PACK_GPL2_RPATH=FOLDERNAME
command-line option, then only this folder will be checked.

b) If no folder is specified in -DDENABLE_DEMOSAIC_PACK_GPL2 switch:

./LibRaw-demosaic-pack-GPL2 (in LibRaw folder)

If DCHECKOUT_DEMOSAIC_PACK_GPL2 is enabled, code wil be checkout from remote repository

-DENABLE_DEMOSAIC_PACK_GPL3=ON/OFF
-DDEMOSAIC_PACK_GPL3_RPATH=FOLDERNAME
-DCHECKOUT_DEMOSAIC_PACK_GPL3=ON/OFF
Same as above, but for GPL3-licensed demosaic pack.


-DENABLE_RAWSPEED=ON/OFF
-DRAWSPEED_RPATH=FOLDERNAME

Expand Down
6 changes: 0 additions & 6 deletions cmake/data/libraw_config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ it under the terms of the one of two licenses as you choose:
/* Define to 1 if LibRaw have been compiled with RawSpeed codec support */
#cmakedefine LIBRAW_USE_RAWSPEED 1

/* Define to 1 if LibRaw have been compiled with Demosaic pack GPL2 support */
#cmakedefine LIBRAW_USE_DEMOSAIC_PACK_GPL2 1

/* Define to 1 if LibRaw have been compiled with Demosaic pack GPL3 support */
#cmakedefine LIBRAW_USE_DEMOSAIC_PACK_GPL3 1

/* Define to 1 if LibRaw have been compiled with debug message from dcraw */
#cmakedefine LIBRAW_USE_DCRAW_DEBUG 1

Expand Down

0 comments on commit 5d54a89

Please sign in to comment.