diff --git a/dev-util/sourcetrail/patches/sourcetrail-2019.4.102.patchset b/dev-util/sourcetrail/patches/sourcetrail-2019.4.102.patchset new file mode 100644 index 000000000..cc5b27ddc --- /dev/null +++ b/dev-util/sourcetrail/patches/sourcetrail-2019.4.102.patchset @@ -0,0 +1,75 @@ +From 6fa8ca7f3824ab63cd7708bbc5b0c5d1a9e651ed Mon Sep 17 00:00:00 2001 +From: TURX +Date: Thu, 16 Jan 2020 03:20:54 +0800 +Subject: [PATCH] haiku support + +--- + CMakeLists.txt | 2 +- + cmake/productVersion.h.in | 1 + + cmake/version.cmake | 4 +++- + src/app/main.cpp | 4 ++++ + 4 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aaf04cf..911d59f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -230,7 +230,7 @@ target_include_directories(${LIB_UTILITY_PROJECT_NAME} SYSTEM + + target_link_libraries(${LIB_UTILITY_PROJECT_NAME} ${Boost_LIBRARIES} Qt5::Widgets Qt5::Network) + +-if (UNIX AND NOT APPLE) ++if (UNIX AND NOT APPLE AND NOT HAIKU) + find_package(Threads REQUIRED) + target_link_libraries(${LIB_UTILITY_PROJECT_NAME} ${CMAKE_DL_LIBS} rt ${CMAKE_THREAD_LIBS_INIT}) + endif() +diff --git a/cmake/productVersion.h.in b/cmake/productVersion.h.in +index 8705cb6..f445999 100644 +--- a/cmake/productVersion.h.in ++++ b/cmake/productVersion.h.in +@@ -8,5 +8,6 @@ + #define VERSION_YEAR @VERSION_YEAR@ + #define VERSION_MINOR @VERSION_MINOR@ + #define VERSION_COMMIT @VERSION_COMMIT@ ++#define VERSION_STRING "@VERSION_STRING@" + + #endif // SOURCETRAIL_VERSION_H +diff --git a/cmake/version.cmake b/cmake/version.cmake +index 5e8cf0a..c52f96f 100644 +--- a/cmake/version.cmake ++++ b/cmake/version.cmake +@@ -44,7 +44,9 @@ else(EXISTS "${CMAKE_SOURCE_DIR}/.git") + + endif(EXISTS "${CMAKE_SOURCE_DIR}/.git") + +-set(VERSION_STRING "${VERSION_YEAR}.${VERSION_MINOR}.${VERSION_COMMIT}") ++if ("${VERSION_STRING}" STREQUAL "" OR "${VERSION_STRING}" STREQUAL "..") ++ set(VERSION_STRING "${VERSION_YEAR}.${VERSION_MINOR}.${VERSION_COMMIT}") ++endif() + + message(STATUS "Version: ${VERSION_STRING}") + +diff --git a/src/app/main.cpp b/src/app/main.cpp +index a6f9679..983dc38 100644 +--- a/src/app/main.cpp ++++ b/src/app/main.cpp +@@ -109,12 +109,16 @@ int main(int argc, char *argv[]) + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); + } + ++#if !defined(Q_OS_HAIKU) + Version version( + VERSION_YEAR, + VERSION_MINOR, + VERSION_COMMIT, + GIT_COMMIT_HASH + ); ++#else ++ Version version = Version::fromString(VERSION_STRING); ++#endif + QApplication::setApplicationVersion(version.toDisplayString().c_str()); + + MessageStatus( +-- +2.20.1 + diff --git a/dev-util/sourcetrail/sourcetrail-2019.4.102.recipe b/dev-util/sourcetrail/sourcetrail-2019.4.102.recipe new file mode 100644 index 000000000..af4d1ad96 --- /dev/null +++ b/dev-util/sourcetrail/sourcetrail-2019.4.102.recipe @@ -0,0 +1,78 @@ +SUMMARY="A free and open-source cross-platform source explorer" +DESCRIPTION="Sourcetrail helps you get productive on unfamiliar source code" +HOMEPAGE="https://www.sourcetrail.com/" +COPYRIGHT="2019 Andreas Stallinger and others" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://github.com/CoatiSoftware/Sourcetrail/archive/$portVersion.tar.gz" +CHECKSUM_SHA256="74b0f11904e5faaead94f92319001d77e23d102c7370f63f0f83a624e46312fe" +SOURCE_DIR="Sourcetrail-$portVersion" +PATCHES="sourcetrail-$portVersion.patchset" + +ARCHITECTURES="x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + sourcetrail$secondaryArchSuffix = $portVersion + app:sourcetrail + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libboost_date_time$secondaryArchSuffix + lib:libboost_filesystem$secondaryArchSuffix + lib:libboost_program_options$secondaryArchSuffix + lib:libboost_system$secondaryArchSuffix + lib:libQt5$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5Designer$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5Network$secondaryArchSuffix + lib:libQt5Quick$secondaryArchSuffix + lib:libQt5Test$secondaryArchSuffix + lib:libQt5Xml$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libboost_date_time$secondaryArchSuffix >= 1.69 + devel:libboost_filesystem$secondaryArchSuffix >= 1.69 + devel:libboost_program_options$secondaryArchSuffix >= 1.69 + devel:libboost_system$secondaryArchSuffix >= 1.69 + devel:libQt5$secondaryArchSuffix + devel:libQt5Core$secondaryArchSuffix + devel:libQt5Designer$secondaryArchSuffix + devel:libQt5Gui$secondaryArchSuffix + devel:libQt5Network$secondaryArchSuffix + devel:libQt5Quick$secondaryArchSuffix + devel:libQt5Test$secondaryArchSuffix + devel:libQt5Xml$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:getconf + cmd:lrelease$secondaryArchSuffix >= 5 + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:python3 + " + +BUILD() +{ + mkdir -p build + cd build + cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_BUILD_TYPE="Release" \ + -DBUILD_PYTHON_LANGUAGE_PACKAGE=ON \ + -DVERSION_STRING=$portVersion .. + make $jobArgs +} + +INSTALL() +{ + cd build + mkdir -p $appsDir/SourceTrail + cp -rf ../bin/app/* $appsDir/SourceTrail + cp app/Sourcetrail $appsDir/SourceTrail + cp app/sourcetrail_indexer $appsDir/SourceTrail + addAppDeskbarSymlink $appsDir/SourceTrail/Sourcetrail +}