Skip to content

Commit

Permalink
Removed the thirdparty 'unrar' library because it is incompatible wit…
Browse files Browse the repository at this point in the history
…h the base license of that library, GPLv2.

Support for rar archives was not implemented, so no functionality was affected.
For future implementation of support for rar archives, need to use an external program `unrar` or `rar`.
See https://www.gnu.org/licenses/gpl-faq.html#GPLPlugins
  • Loading branch information
virxkane committed Nov 24, 2022
1 parent 9202f56 commit d100951
Show file tree
Hide file tree
Showing 129 changed files with 15 additions and 26,931 deletions.
14 changes: 1 addition & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,9 @@ endif( ${GUI} STREQUAL QT5 )
# thirdparty sources definitions
include("${CMAKE_SOURCE_DIR}/thirdparty_repo/repo_srcdirs.cmake")

#UNRAR support
#UNRAR support (not implemented yet)
if(DEFINED USE_UNRAR)
message("Will build static UNRAR library")
SET(USE_UNRAR 1)
SET(UNRAR_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty_unman/unrar)
SET(UNRAR_LIBRARIES unrar)
ADD_DEFINITIONS(-DUSE_UNRAR=1)
INCLUDE_DIRECTORIES(${UNRAR_INCLUDE_DIR})
ADD_SUBDIRECTORY(thirdparty_unman/unrar)
else()
message("NO_UNRAR parameter specified: Will not support UNRAR")
SET(UNRAR_INCLUDE_DIR)
SET(UNRAR_LIBRARIES)
ADD_DEFINITIONS(-DUSE_UNRAR=0)
SET(USE_UNRAR 0)
endif(DEFINED USE_UNRAR)

find_path(NANOSVG_INCLUDE_DIR nanosvg.h DOC "Path to NanoSVG include dir")
Expand Down
2 changes: 1 addition & 1 deletion cr3qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ IF(MAC)
ELSE()
SET (EXTRA_LIBS ${STD_LIBS} ${QT_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES} )
ENDIF(MAC)
TARGET_LINK_LIBRARIES(cr3 crengine tinydict ${UNRAR_LIBRARIES} ${EXTRA_LIBS})
TARGET_LINK_LIBRARIES(cr3 crengine tinydict ${EXTRA_LIBS})

IF (MAC)

Expand Down
14 changes: 13 additions & 1 deletion crengine/src/lvstream/lvrararc.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/***************************************************************************
* CoolReader engine *
* Copyright (C) 2008,2011 Vadim Lopatin <[email protected]> *
* Copyright (C) 2020 Aleksey Chernov <[email protected]> *
* Copyright (C) 2020,2022 Aleksey Chernov <[email protected]> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
Expand All @@ -19,6 +19,18 @@
* MA 02110-1301, USA. *
***************************************************************************/

/**
* Support for rar archives is not implemented yet.
* When implementing support for rar archives, we cannot use 'unrar'
* library, we cannot link the program with it, since it has a license
* that is not compatible with the GPL.
* Instead, we can call the 'unrar' or 'rar' program installed on the
* system and process the data it returns.
* After support for rar archives is implemented, this comment should be removed.
*
* See https://www.gnu.org/licenses/gpl-faq.html#GPLPlugins
*/

#include "lvrararc.h"

#if (USE_UNRAR==1)
Expand Down
9 changes: 0 additions & 9 deletions thirdparty_unman/unrar/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit d100951

Please sign in to comment.