Skip to content

Commit

Permalink
doxygen: Update to 1.8.20
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt committed Oct 25, 2020
1 parent 57a287d commit e4c6f9e
Showing 1 changed file with 17 additions and 50 deletions.
67 changes: 17 additions & 50 deletions doxygen-1.8.13.cmake → doxygen-1.8.20.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

set(version 1.8.13)
set(download_hash SHA256=af667887bd7a87dc0dbf9ac8d86c96b552dfb8ca9c790ed1cbffaa6131573f6b)
set(patch_version ${version}-10)
set(patch_hash SHA256=e4fb3fa4266998c4192dcdbb1efb563360f1f009d9a80d445721d526de4f9482)
set(base_url https://snapshot.debian.org/archive/debian/20180312T232337Z/pool/main/d/doxygen/)
set(version 1.8.20)
set(download_hash SHA256=3dbdf8814d6e68233d5149239cb1f0b40b4e7b32eef2fd53de8828fedd7aca15)
set(patch_version ${version}-4)
set(patch_hash SHA256=e7e1ea9f8dfb4decdf2617e67124ea1f90d7ecd361f5c54943603ed0be6c2e72)
set(base_url https://snapshot.debian.org/archive/debian/20201002T144451Z/pool/main/d/doxygen/)

option(USE_SYSTEM_DOXYGEN "Use the system DOXYGEN if possible" ON)

Expand All @@ -45,50 +45,15 @@ set(test_system_doxygen [[
endif()
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(extra_flags "-Wno-tautological-constant-out-of-range-compare -Wno-deprecated-declarations" PARENT_SCOPE)
set(extra_flags "-Wno-return-type -Wno-tautological-constant-out-of-range-compare" PARENT_SCOPE)
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(extra_flags "-Wno-return-type -Wno-deprecated" PARENT_SCOPE)
set(extra_flags "-Wno-return-type -Wno-write-strings" PARENT_SCOPE)
else()
set(extra_flags "" PARENT_SCOPE)
endif()
]])


# Fix mingw64 builds
# https://github.com/msys2/MINGW-packages/blob/b99b3d396d8d3dfcee41548d1b96729464bde4e5/mingw-w64-doxygen/fix-casts.patch
set(fix-casts_patch [[
--- doxygen-1.8.6/qtools/qcstring.cpp.orig 2013-05-19 19:12:31.000000000 +0400
+++ doxygen-1.8.6/qtools/qcstring.cpp 2014-04-04 06:54:07.313800000 +0400
@@ -476,7 +476,7 @@
if ( to > first && *(to-1) == 0x20 )
to--;
*to = '\0';
- result.resize( (int)((long)to - (long)result.data()) + 1 );
+ result.resize( (int)(reinterpret_cast<intptr_t>(to) - reinterpret_cast<intptr_t>(result.data())) + 1 );
return result;
}

@@ -717,7 +717,7 @@
int res;
uchar c;
if ( !s1 || !s2 )
- return s1 == s2 ? 0 : (int)((long)s2 - (long)s1);
+ return s1 == s2 ? 0 : (int)(reinterpret_cast<intptr_t>(s2) - reinterpret_cast<intptr_t>(s1));
for ( ; !(res = (c=tolower(*s1)) - tolower(*s2)); s1++, s2++ )
if ( !c ) // strings are equal
break;
@@ -731,7 +731,7 @@
int res;
uchar c;
if ( !s1 || !s2 )
- return (int)((long)s2 - (long)s1);
+ return (int)(reinterpret_cast<uintptr_t>(s2) - reinterpret_cast<uintptr_t>(s1));
for ( ; len--; s1++, s2++ ) {
if ( (res = (c=tolower(*s1)) - tolower(*s2)) )
return res;
]])


superbuild_package(
NAME doxygen-patches
VERSION ${patch_version}
Expand All @@ -110,18 +75,19 @@ superbuild_package(
SOURCE
URL ${base_url}doxygen_${version}.orig.tar.gz
URL_HASH ${download_hash}

PATCH_COMMAND
patch -p1 -i fix-casts.patch
"${CMAKE_COMMAND}"
-Dpackage=doxygen-patches-${patch_version}
-P "${APPLY_PATCHES_SERIES}"
COMMAND
sed -i -e "/set.ICONV_DIR/d" CMakeLists.txt
sed -e "/set.YACC_FLAGS/ s/set.*/set(YACC_FLAGS -Wno-deprecated)/" -i --
CMakeLists.txt
COMMAND
sed -i -e "/bigobj/d" CMakeLists.txt
sed -e "/BISON_EXECUTABLE/ s/ -o / -Wno-deprecated -o /" -i --
CMakeLists.txt
COMMAND
sed -i -e "s/mmacosx-version-min=10.5/mmacosx-version-min=10.11/" CMakeLists.txt

SOURCE_WRITE
fix-casts.patch fix-casts_patch
sed -e "/set.PROJECT_WARNINGS/ s/set.*/set(PROJECT_WARNINGS )/" -i --
cmake/CompilerWarnings.cmake

USING USE_SYSTEM_DOXYGEN patch_version extra_flags
BUILD_CONDITION ${test_system_doxygen}
Expand All @@ -130,6 +96,7 @@ superbuild_package(
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} ${extra_flags}"
"-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} ${extra_flags}"
-DCMAKE_BUILD_TYPE=Release
-Denglish_only=1
INSTALL_COMMAND
"${CMAKE_COMMAND}" --build . --target install/strip/fast
Expand Down

0 comments on commit e4c6f9e

Please sign in to comment.