* [PR PATCH] WIP: New package: sourcetrail-2020.2.43
@ 2020-12-16 16:45 Piraty
2020-12-19 7:22 ` kawaiiamber
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Piraty @ 2020-12-16 16:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 429 bytes --]
There is a new pull request by Piraty against master on the void-packages repository
https://github.com/Piraty/void-packages sourcetrail
https://github.com/void-linux/void-packages/pull/27200
WIP: New package: sourcetrail-2020.2.43
TODO:
- [ ] ensure crossbuildt sourcetrail runs as expected
- [ ] python indexer
- [ ] java indexer
A patch file from https://github.com/void-linux/void-packages/pull/27200.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sourcetrail-27200.patch --]
[-- Type: text/x-diff, Size: 5860 bytes --]
From 0d920ec513f78f372de7c04635e017343f030b01 Mon Sep 17 00:00:00 2001
From: Piraty <piraty1@inbox.ru>
Date: Thu, 19 Dec 2019 20:26:49 +0100
Subject: [PATCH] WIP: New package: sourcetrail-2020.2.43
TODO: see template
---
srcpkgs/sourcetrail/files/wrapper.sh | 2 +
.../patches/disable-updatechecker.patch | 10 ++
srcpkgs/sourcetrail/template | 124 ++++++++++++++++++
3 files changed, 136 insertions(+)
create mode 100644 srcpkgs/sourcetrail/files/wrapper.sh
create mode 100644 srcpkgs/sourcetrail/patches/disable-updatechecker.patch
create mode 100644 srcpkgs/sourcetrail/template
diff --git a/srcpkgs/sourcetrail/files/wrapper.sh b/srcpkgs/sourcetrail/files/wrapper.sh
new file mode 100644
index 00000000000..3eccd974e6b
--- /dev/null
+++ b/srcpkgs/sourcetrail/files/wrapper.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+SOURCETRAIL_VIA_SCRIPT=1 exec "/usr/lib/sourcetrail/sourcetrail" $@
diff --git a/srcpkgs/sourcetrail/patches/disable-updatechecker.patch b/srcpkgs/sourcetrail/patches/disable-updatechecker.patch
new file mode 100644
index 00000000000..d94b598f7a6
--- /dev/null
+++ b/srcpkgs/sourcetrail/patches/disable-updatechecker.patch
@@ -0,0 +1,10 @@
+--- a/src/lib_gui/qt/network/QtUpdateChecker.cpp
++++ b/src/lib_gui/qt/network/QtUpdateChecker.cpp
+@@ -23,6 +23,7 @@
+
+ void QtUpdateChecker::check(bool force, std::function<void(Result)> callback)
+ {
++ return;
+ Result result;
+
+ if (!force && !needsAutomaticCheck())
diff --git a/srcpkgs/sourcetrail/template b/srcpkgs/sourcetrail/template
new file mode 100644
index 00000000000..05876860ae4
--- /dev/null
+++ b/srcpkgs/sourcetrail/template
@@ -0,0 +1,124 @@
+# Template file for 'sourcetrail'
+pkgname=sourcetrail
+_version_year=2020
+_version_minor=2
+_version_commit=43
+# grep SOURCETRAIL_PYTHON_INDEXER_VERSION script/download_python_indexer.sh
+_python_indexer="v1_db25_p4"
+version="${_version_year}.${_version_minor}.${_version_commit}"
+revision=1
+wrksrc=Sourcetrail-${version}
+build_style=cmake
+configure_args="
+ -DCMAKE_BUILD_TYPE=Release
+ -DBoost_USE_STATIC_LIBS=OFF
+ -DTREAT_WARNINGS_AS_ERRORS=OFF
+ $(vopt_if cxx -DBUILD_CXX_LANGUAGE_PACKAGE=ON)
+ $(vopt_if python -DBUILD_PYTHON_LANGUAGE_PACKAGE=ON)
+ $(vopt_if java -DBUILD_JAVA_LANGUAGE_PACKAGE=ON)"
+hostmakedepends="qt5-host-tools qt5-qmake ImageMagick tar
+ $(vopt_if python 'wget unzip')
+"
+makedepends="boost-devel qt5-devel qt5-svg-devel
+ $(vopt_if cxx "clang-tools-extra llvm11")
+"
+#FIXME: where does this come from? someone injects -lcurses down the line
+# (llvm11?) but it's actually not required here
+makedepends+=" ncurses-devel"
+
+short_desc="Interactive source explorer"
+maintainer="Piraty <piraty1@inbox.ru>"
+license="GPL-3.0-only"
+homepage="https://www.sourcetrail.com/"
+changelog="https://github.com/CoatiSoftware/Sourcetrail/raw/master/CHANGELOG.md"
+distfiles="https://github.com/CoatiSoftware/Sourcetrail/archive/${version}.tar.gz
+ https://github.com/CoatiSoftware/SourcetrailPythonIndexer/archive/${_python_indexer}.tar.gz"
+checksum="19bf4524fd53cb8918079a12c74d2a8261efdb9a71064dedaeb9254072fe9b92
+ 12d62a5e12e28542a7afbf1a079eacf039022df2ed11765b8954a81dce5d82b4"
+patch_args="-Np1"
+
+build_options="cxx java python"
+desc_option_cxx="Enable support for C++"
+desc_option_java="Enable support for Java"
+desc_option_python="Enable support for Python"
+build_options_default="cxx"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+ makedepends+=" libatomic-devel"
+fi
+
+post_patch() {
+ vsed -i cmake/version.cmake \
+ -e "s/.*set(VERSION_YEAR \"0\").*/set(VERSION_YEAR \"${_version_year}\")/" \
+ -e "s/.*set(VERSION_MINOR \"0\").*/set(VERSION_MINOR \"${_version_minor}\")/" \
+ -e "s/.*set(VERSION_COMMIT \"0\").*/set(VERSION_COMMIT \"${_version_commit}\")/"
+}
+
+if [ "$build_option_python" ]; then
+ # cmake downloads the indexer (script/download_python_indexer.sh) which
+ # contains sourcetrailDB. we need to make the build use the prefetched version
+ # or package it so sourcetrail can use it properly.
+ # depends="$(vopt_if python 'python3-jedi python3-parso')" # python indexer ships them...
+ broken=ENOTIMPLEMENTEDYET
+fi
+
+if [ "$build_option_java" ]; then
+ broken=ENOTIMPLEMENTEDYET
+fi
+
+post_fetch() {
+ if [ "$build_option_python" ]; then
+ # fake what script/download_python_indexer.sh would do
+ temp_path="build/temp"
+ ls -lA ${XBPS_BUILDDIR}/
+ set -x
+ echo "wrksrc: ${wrksrc}"
+ cp -r ${XBPS_BUILDDIR}/SourcetrailPythonIndexer-${_python_indexer} ${wrksrc}/$temp_path/
+ fi
+}
+
+do_install() {
+ # Sourcetrail is not packaging friendly at all. Hence this mess :-(
+ # upstream doesn't provide convenient install rules in their cmake and
+ # instead tries to bundle all linked shlibs
+
+ # abuse their weird package creation mechanism to gather everything relevant
+ vsed -i setup/Linux/createPackages.sh \
+ -e '/linuxdeployqt/d' \
+ -e 's,build/Release,build/,g'
+ setup/Linux/createPackages.sh
+ mkdir package
+ tar -xf Sourcetrail_${version//./_}_Linux_64bit.tar.gz -C package
+ (
+ cd package/Sourcetrail
+
+ vmkdir usr/lib/sourcetrail
+ vinstall bin/sourcetrail 755 usr/lib/sourcetrail
+ vinstall bin/sourcetrail_indexer 755 usr/lib/sourcetrail
+ mv share/data ${DESTDIR}/usr/lib/sourcetrail
+
+ vmkdir usr/share/mime
+
+ cp -r share/icons ${DESTDIR}/usr/share/icons
+ cp -r share/mime/packages ${DESTDIR}/usr/share/mime/packages
+
+ vdoc README
+ )
+
+ # use simple wrapper instead of upstream's mess
+ vbin ${FILESDIR}/wrapper.sh sourcetrail
+
+ vmkdir usr/share/applications
+ vinstall setup/Linux/data/sourcetrail.desktop 644 usr/share/applications
+
+ vmkdir usr/share/sourcetrail
+ cp -r ide_plugins ${DESTDIR}/usr/share/sourcetrail
+
+ rm -rf ${DESTDIR}/usr/lib/sourcetrail/data/license/3rd_party_licenses
+}
+
+
+
+#DEBUG
+#make_build_args+=" VERBOSE=1"
+#configure_args+=" -DBoost_DEBUG=ON"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: WIP: New package: sourcetrail-2020.2.43
2020-12-16 16:45 [PR PATCH] WIP: New package: sourcetrail-2020.2.43 Piraty
@ 2020-12-19 7:22 ` kawaiiamber
2022-02-26 22:04 ` Piraty
2022-02-26 22:04 ` [PR PATCH] [Closed]: " Piraty
2 siblings, 0 replies; 4+ messages in thread
From: kawaiiamber @ 2020-12-19 7:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
New comment by kawaiiamber on void-packages repository
https://github.com/void-linux/void-packages/pull/27200#issuecomment-748433777
Comment:
The Lint template error is
```
srcpkgs/sourcetrail/template:58: trailing whitespace
Error: Process completed with exit code 1.
```
I wonder if it's those 3 consecutive blank lines from lines 119-121?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: WIP: New package: sourcetrail-2020.2.43
2020-12-16 16:45 [PR PATCH] WIP: New package: sourcetrail-2020.2.43 Piraty
2020-12-19 7:22 ` kawaiiamber
@ 2022-02-26 22:04 ` Piraty
2022-02-26 22:04 ` [PR PATCH] [Closed]: " Piraty
2 siblings, 0 replies; 4+ messages in thread
From: Piraty @ 2022-02-26 22:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
New comment by Piraty on void-packages repository
https://github.com/void-linux/void-packages/pull/27200#issuecomment-1052684782
Comment:
sourcetrail is abandoned by upstream, no fork known yet (https://github.com/CoatiSoftware/Sourcetrail/issues/1225)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR PATCH] [Closed]: WIP: New package: sourcetrail-2020.2.43
2020-12-16 16:45 [PR PATCH] WIP: New package: sourcetrail-2020.2.43 Piraty
2020-12-19 7:22 ` kawaiiamber
2022-02-26 22:04 ` Piraty
@ 2022-02-26 22:04 ` Piraty
2 siblings, 0 replies; 4+ messages in thread
From: Piraty @ 2022-02-26 22:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
There's a closed pull request on the void-packages repository
WIP: New package: sourcetrail-2020.2.43
https://github.com/void-linux/void-packages/pull/27200
Description:
TODO:
- [ ] ensure crossbuilt sourcetrail runs as expected
- [ ] python indexer
- [ ] java indexer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-26 22:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 16:45 [PR PATCH] WIP: New package: sourcetrail-2020.2.43 Piraty
2020-12-19 7:22 ` kawaiiamber
2022-02-26 22:04 ` Piraty
2022-02-26 22:04 ` [PR PATCH] [Closed]: " Piraty
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).