diff options
-rw-r--r-- | .SRCINFO | 38 | ||||
-rw-r--r-- | PKGBUILD | 142 | ||||
-rw-r--r-- | codelite-DebugAdapterClient-CMakeLists-cxx17.patch | 11 | ||||
-rw-r--r-- | codelite-fsw-symlink.patch | 217 | ||||
-rw-r--r-- | codelite-git.install | 7 |
5 files changed, 348 insertions, 67 deletions
@@ -1,42 +1,38 @@ -# Generated by mksrcinfo v8 -# Sat Dec 15 17:49:08 UTC 2018 pkgbase = codelite-git - pkgdesc = A cross platform C/C++/PHP and Node.js IDE written in C++ - pkgver = v12.0.10.r57.g09d91b099 + pkgdesc = Cross platform IDE for C, C++, Rust, Python, PHP and Node.js written in C++ + pkgver = 17.7.0.r26.g473b156f7 pkgrel = 1 - url = http://www.codelite.org/ - install = codelite-git.install + url = https://codelite.org/ arch = i686 arch = x86_64 + arch = aarch64 license = GPL - makedepends = pkgconfig makedepends = cmake + makedepends = ninja makedepends = clang - depends = wxgtk + makedepends = git + depends = wxwidgets-gtk3 depends = libedit depends = libssh - depends = libmariadbclient + depends = mariadb-libs depends = ncurses - depends = xterm - depends = curl - depends = python2 - depends = clang - depends = lldb + depends = uchardet depends = hunspell - optdepends = graphviz: callgraph visualization - optdepends = cscope: CScope Integration for CodeLite optdepends = clang: compiler + optdepends = lldb: debugger optdepends = gcc: compiler optdepends = gdb: debugger optdepends = valgrind: debugger + optdepends = rust: language + optdepends = php: language + optdepends = graphviz: callgraph visualization + optdepends = cscope: CScope Integration for CodeLite provides = codelite conflicts = codelite - conflicts = codelite-bin noextract = wxgui.zip - source = git://github.com/eranif/codelite.git + source = codelite::git+https://github.com/eranif/codelite.git source = http://repos.codelite.org/wxCrafterLibs/wxgui.zip - md5sums = SKIP - md5sums = SKIP + sha256sums = SKIP + sha256sums = SKIP pkgname = codelite-git - @@ -1,49 +1,80 @@ -# Maintainer: Jefferson Gonzalez <jgmdev@gmail.com> +# +# AUR PKGBUILD for "bleeding edge" codelite from github repo +# +# Maintainer: Uffe Jakobsen <uffe _at_ uffe _dot_ org> +# Past Maintainer: Jefferson Gonzalez <jgmdev@gmail.com> # Contributor: Pyro Devil <p dot devil at gmail dot com> +# +# NOTES: +# +# Using Make as long as Ninja cannot be job-controlled from makepkg.conf (like Make can) +# Systems with many cores but little memory will be (OOM) killed by Ninja creating too many jobs +# pkgname=codelite-git _gitname=codelite -pkgver=v12.0.10.r57.g09d91b099 +pkgver=17.7.0.r26.g473b156f7 pkgrel=1 -pkgdesc="A cross platform C/C++/PHP and Node.js IDE written in C++" -arch=('i686' 'x86_64') -url="http://www.codelite.org/" +pkgdesc="Cross platform IDE for C, C++, Rust, Python, PHP and Node.js written in C++" +arch=('i686' 'x86_64' 'aarch64') +url="https://codelite.org/" license=('GPL') -install=codelite-git.install -makedepends=('pkgconfig' 'cmake' 'clang') + +makedepends=('cmake' 'ninja' 'clang' 'git') + depends=( - 'wxgtk' - 'libedit' - 'libssh' - 'libmariadbclient' - 'ncurses' - 'xterm' - 'curl' - 'python2' - 'clang' - 'lldb' - 'hunspell' + 'wxwidgets-gtk3' + 'libedit' + 'libssh' + 'mariadb-libs' + 'ncurses' + 'uchardet' + 'hunspell' + #'ctags' + #'xterm' + #'wget' + #'curl' + #'python' + #'python2' ) + optdepends=( - 'graphviz: callgraph visualization' - 'cscope: CScope Integration for CodeLite' - 'clang: compiler' - 'gcc: compiler' - 'gdb: debugger' - 'valgrind: debugger' + 'clang: compiler' + 'lldb: debugger' + 'gcc: compiler' + 'gdb: debugger' + 'valgrind: debugger' + 'rust: language' + 'php: language' + 'graphviz: callgraph visualization' + 'cscope: CScope Integration for CodeLite' ) -conflicts=('codelite' 'codelite-bin') + provides=('codelite') + +conflicts=('codelite') + source=( - git://github.com/eranif/codelite.git - http://repos.codelite.org/wxCrafterLibs/wxgui.zip + ${_gitname}::git+https://github.com/eranif/codelite.git + http://repos.codelite.org/wxCrafterLibs/wxgui.zip ) -md5sums=( - 'SKIP' - 'SKIP' + +sha256sums=( + 'SKIP' + 'SKIP' ) + noextract=('wxgui.zip') +# +# +# + +BUILD_DIR="_build.out" + +# +# +# pkgver() { cd "${srcdir}/${_gitname}" @@ -51,27 +82,60 @@ pkgver() { } prepare() { + #cd "${srcdir}" + #git clone -b master --single-branch --depth 1 --recursive --shallow-submodules https://github.com/eranif/codelite.git ${_gitname}; + cd "${srcdir}/${_gitname}" - mkdir -p build + + git submodule update --init + git submodule foreach git submodule update --init + + # Apply patches here: + # example: patch -p0 < "${startdir}/codelite-feature.patch" + + #patch -p0 < "${startdir}/codelite-fsw-symlink.patch" + + #patch -p0 < "${startdir}/codelite-DebugAdapterClient-CMakeLists-cxx17.patch" } build() { - cd "${srcdir}/${_gitname}/build" + cd "${srcdir}/${_gitname}" + + mkdir -p "${BUILD_DIR}" CXXFLAGS="${CXXFLAGS} -fno-devirtualize" + export CXXFLAGS + + #WX_CONFIG="/usr/bin/wx-config-gtk3" + WX_CONFIG="wx-config" - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release \ - -DENABLE_CLANG=1 -DENABLE_LLDB=1 -DWITH_MYSQL=1 \ + # generate + # -DWITH_NATIVEBOOK=1 \ + cmake -G "Unix Makefiles" \ + -S . \ + -B "${BUILD_DIR}" \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ - .. + -DCL_PREFIX=/usr \ + -DWITH_PCH=0 \ + -DWITH_WX_CONFIG="${WX_CONFIG}" \ + -DENABLE_LLDB=1 \ + -DWITH_MYSQL=0 \ - make + + # build + cmake --build "${BUILD_DIR}" } package() { - cd "${srcdir}/${_gitname}/build" + cd "${srcdir}/${_gitname}" + + DESTDIR="${pkgdir}" cmake --install "${BUILD_DIR}" - make -j1 DESTDIR="${pkgdir}" install - install -m 644 -D "${srcdir}/wxgui.zip" "${pkgdir}/usr/share/codelite/wxgui.zip" install -m 644 -D "${srcdir}/${_gitname}/LICENSE" "${pkgdir}/usr/share/licenses/codelite/LICENSE" + install -m 644 -D "${srcdir}/wxgui.zip" "${pkgdir}/usr/share/codelite/wxgui.zip" } + +# +# EOF +# diff --git a/codelite-DebugAdapterClient-CMakeLists-cxx17.patch b/codelite-DebugAdapterClient-CMakeLists-cxx17.patch new file mode 100644 index 000000000000..0955858a8c5c --- /dev/null +++ b/codelite-DebugAdapterClient-CMakeLists-cxx17.patch @@ -0,0 +1,11 @@ +diff --git DebugAdapterClient/CMakeLists.txt DebugAdapterClient/CMakeLists.txt +index 93d69c075..61a2b31f4 100644 +--- DebugAdapterClient/CMakeLists.txt ++++ DebugAdapterClient/CMakeLists.txt +@@ -1,5 +1,5 @@ + # lldb requires C++11 +-add_definitions(-std=c++11) ++add_definitions(-std=c++17) + set(PLUGIN_NAME "DebugAdapterClient") + project(DebugAdapterClient) + diff --git a/codelite-fsw-symlink.patch b/codelite-fsw-symlink.patch new file mode 100644 index 000000000000..2fcec83173f5 --- /dev/null +++ b/codelite-fsw-symlink.patch @@ -0,0 +1,217 @@ +diff --git CodeLite/CMakeLists.txt CodeLite/CMakeLists.txt +index f0f48e2d3..f4019cf5f 100644 +--- CodeLite/CMakeLists.txt ++++ CodeLite/CMakeLists.txt +@@ -58,7 +58,8 @@ include_directories( + "${CL_SRC_ROOT}/CodeLite/ssh" + "${CL_SRC_ROOT}/PCH" + "${CL_SRC_ROOT}/Interfaces" +- "${CL_SRC_ROOT}/CodeLite/ssh") ++ "${CL_SRC_ROOT}/Plugin" ++) + + set(ADDITIONAL_LIBRARIES "") + +diff --git CodeLite/clFilesCollector.cpp CodeLite/clFilesCollector.cpp +index 9ac968545..1bc295017 100644 +--- CodeLite/clFilesCollector.cpp ++++ CodeLite/clFilesCollector.cpp +@@ -2,6 +2,7 @@ + + #include "file_logger.h" + #include "fileutils.h" ++#include "globals.h" + + #include <queue> + #include <unordered_set> +@@ -10,6 +11,8 @@ + #include <wx/filename.h> + #include <wx/tokenzr.h> + ++static wxString my_CLRealPath(const wxString& filepath) { return filepath; } ++ + clFilesScanner::clFilesScanner() {} + + clFilesScanner::~clFilesScanner() {} +@@ -110,19 +113,19 @@ size_t clFilesScanner::Scan(const wxString& rootFolder, std::vector<wxString>& f + filename.MakeLower(); + #endif + bool isDirectory = wxFileName::DirExists(fullpath); +- // Use FileUtils::RealPath() here to cope with symlinks on Linux ++ // Use CLRealPath() here to cope with symlinks on Linux + bool isExcludeDir = + isDirectory && + ( + #if defined(__FreeBSD__) +- ((FileUtils::IsSymlink(fullpath) && excludeFolders.count(FileUtils::RealPath(fullpath))) ++ ((FileUtils::IsSymlink(fullpath) && excludeFolders.count(my_CLRealPath(fullpath))) + #else +- (excludeFolders.count(FileUtils::RealPath(fullpath)) ++ (excludeFolders.count(my_CLRealPath(fullpath)) + #endif + || IsRelPathContainedInSpec(rootFolder, fullpath, excludeFolders))); + if (isDirectory && !isExcludeDir) { + // Traverse into this folder +- wxString realPath = FileUtils::RealPath(fullpath); ++ wxString realPath = my_CLRealPath(fullpath); + if (Visited.insert(realPath).second) { + Q.push(fullpath); + } +@@ -153,8 +156,8 @@ size_t clFilesScanner::Scan(const wxString& rootFolder, const wxString& filespec + std::queue<wxString> Q; + std::unordered_set<wxString> Visited; + +- Q.push(FileUtils::RealPath(rootFolder)); +- Visited.insert(FileUtils::RealPath(rootFolder)); ++ Q.push(my_CLRealPath(rootFolder)); ++ Visited.insert(my_CLRealPath(rootFolder)); + + size_t nCount = 0; + while (!Q.empty()) { +@@ -174,11 +177,11 @@ size_t clFilesScanner::Scan(const wxString& rootFolder, const wxString& filespec + fullpath << dir.GetNameWithSep() << filename; + bool isDirectory = wxFileName::DirExists(fullpath); + bool isFile = !isDirectory; +- // Use FileUtils::RealPath() here to cope with symlinks on Linux ++ // Use CLRealPath() here to cope with symlinks on Linux + if (isDirectory /* a folder */ && + !FileUtils::WildMatch(excludeFoldersSpecArr, filename) /* does not match the exclude folder spec */) { + // Traverse into this folder +- wxString real_path = FileUtils::RealPath(fullpath); ++ wxString real_path = my_CLRealPath(fullpath); + if (Visited.count(real_path) == 0) { + Visited.insert(real_path); + Q.push(fullpath); +@@ -259,8 +262,8 @@ void clFilesScanner::ScanWithCallbacks(const wxString& rootFolder, std::function + std::vector<wxString> Q; + std::unordered_set<wxString> Visited; + +- Q.push_back(FileUtils::RealPath(rootFolder)); +- Visited.insert(FileUtils::RealPath(rootFolder)); ++ Q.push_back(my_CLRealPath(rootFolder)); ++ Visited.insert(my_CLRealPath(rootFolder)); + + while (!Q.empty()) { + wxString dirpath = Q.front(); +@@ -299,7 +302,7 @@ void clFilesScanner::ScanWithCallbacks(const wxString& rootFolder, std::function + + if (on_folder_cb && on_folder_cb(fullpath)) { + // Traverse into this folder +- wxString real_path = FileUtils::RealPath(fullpath); ++ wxString real_path = my_CLRealPath(fullpath); + if (Visited.insert(real_path).second) { + Q.push_back(fullpath); + } +diff --git LiteEditor/mainbook.cpp LiteEditor/mainbook.cpp +index f522aee37..d7b0939f5 100644 +--- LiteEditor/mainbook.cpp ++++ LiteEditor/mainbook.cpp +@@ -429,7 +429,7 @@ int MainBook::FindEditorIndexByFullPath(const wxString& fullpath) + { + #ifdef __WXGTK__ + // On gtk either fileName or the editor filepath (or both) may be (or their paths contain) symlinks +- wxString fileNameDest = CLRealPath(fullpath); ++ wxString fileNameDest = CLRealPath(fullpath, true); + #endif + + for (size_t i = 0; i < m_book->GetPageCount(); ++i) { +@@ -463,7 +463,7 @@ int MainBook::FindEditorIndexByFullPath(const wxString& fullpath) + + #if defined(__WXGTK__) + // Try again, dereferencing the editor fpath +- wxString editorDest = CLRealPath(unixStyleFile); ++ wxString editorDest = CLRealPath(unixStyleFile, true); + if (editorDest.Cmp(fullpath) == 0 || editorDest.Cmp(fileNameDest) == 0) { + return i; + } +@@ -592,6 +592,13 @@ clEditor* MainBook::OpenFile(const wxString& file_name, const wxString& projectN + int bmp /*= wxNullBitmap*/, const wxString& tooltip /* wxEmptyString */) + { + wxFileName fileName(CLRealPath(file_name)); ++ ++ if (fileName.IsRelative()) { ++ if (clWorkspaceManager::Get().IsWorkspaceOpened()) { ++ wxFileName wsPath = clWorkspaceManager::Get().GetWorkspace()->GetDir(); ++ fileName.MakeAbsolute(wsPath.GetFullPath()); ++ } ++ } + fileName.MakeAbsolute(); + + #ifdef __WXMSW__ +@@ -1743,7 +1750,7 @@ WelcomePage* MainBook::GetWelcomePage(bool createIfMissing) + + clEditor* MainBook::OpenFileAsync(const wxString& file_name, std::function<void(IEditor*)>&& callback) + { +- wxString real_path = CLRealPath(file_name); ++ wxString real_path = CLRealPath(file_name, true); + auto editor = FindEditor(real_path); + if (editor) { + push_callback(std::move(callback), real_path); +@@ -1754,7 +1761,7 @@ clEditor* MainBook::OpenFileAsync(const wxString& file_name, std::function<void( + m_book->SetSelection(index); + } + } else { +- editor = OpenFile(real_path); ++ editor = OpenFile(file_name); + if (editor) { + push_callback(std::move(callback), real_path); + } +@@ -1819,11 +1826,12 @@ void MainBook::OnIdle(wxIdleEvent& event) + auto editor = GetActiveEditor(); + CHECK_PTR_RET(editor); + +- execute_callbacks_for_file(CLRealPath(editor->GetFileName().GetFullPath())); ++ execute_callbacks_for_file(CLRealPath(editor->GetFileName().GetFullPath(), true)); + } + + void MainBook::OnEditorModified(clCommandEvent& event) { event.Skip(); } + + void MainBook::OnEditorSaved(clCommandEvent& event) { event.Skip(); } + +-void MainBook::OnSessionLoaded(clCommandEvent& event) { event.Skip(); } +\ No newline at end of file ++void MainBook::OnSessionLoaded(clCommandEvent& event) { event.Skip(); } ++ +diff --git Plugin/globals.cpp Plugin/globals.cpp +index 9d15b750d..0c0e18dcf 100644 +--- Plugin/globals.cpp ++++ Plugin/globals.cpp +@@ -1075,7 +1075,7 @@ wxFileName wxReadLink(const wxFileName& filename) + if (wxIsFileSymlink(filename)) { + #if defined(__WXGTK__) + // Use 'realpath' on Linux, otherwise this breaks on relative symlinks, and (untested) on symlinks-to-symlinks +- return wxFileName(CLRealPath(filename.GetFullPath())); ++ return wxFileName(FileUtils::RealPath(filename.GetFullPath())); + + #else // OSX + wxFileName realFileName; +@@ -1095,10 +1095,14 @@ wxFileName wxReadLink(const wxFileName& filename) + #endif + } + +-wxString CLRealPath(const wxString& filepath) // This is readlink on steroids: it also makes-absolute, and dereferences ++wxString CLRealPath(const wxString& filepath, bool force) // This is readlink on steroids: it also makes-absolute, and dereferences + // any symlinked dirs in the path + { +- return FileUtils::RealPath(filepath); ++ if (force) { ++ return FileUtils::RealPath(filepath); ++ } else { ++ return filepath; ++ } + } + + int wxStringToInt(const wxString& str, int defval, int minval, int maxval) +diff --git Plugin/globals.h Plugin/globals.h +index 64cd6bda5..2388362ea 100644 +--- Plugin/globals.h ++++ Plugin/globals.h +@@ -373,7 +373,7 @@ WXDLLIMPEXP_SDK wxFileName wxReadLink(const wxFileName& filename); + /** + * @brief makes-absolute filepath, and dereferences it and any symlinked dirs in the path + */ +-WXDLLIMPEXP_SDK wxString CLRealPath(const wxString& filepath); ++WXDLLIMPEXP_SDK wxString CLRealPath(const wxString& filepath, bool force=false); + + /** + * @brief convert string to integer using range validation and default value diff --git a/codelite-git.install b/codelite-git.install deleted file mode 100644 index 4063311ea1c2..000000000000 --- a/codelite-git.install +++ /dev/null @@ -1,7 +0,0 @@ -post_install() { - xdg-icon-resource forceupdate -} - -post_remove() { - xdg-icon-resource forceupdate -} |