1. 17 Dec, 2020 1 commit
  2. 20 May, 2020 1 commit
    • Michael Pyne's avatar
      module: Add ability to track messages to show user after build ends. · 7851924a
      Michael Pyne authored
      This is intended to support some of the git-stash improvement we want in
      issue #42 but it will obviously have wider application.
      The hard part is that in the normal mode of operations (asynchronous)
      the update process is off in a separate subprocess and will not have
      access to the ksb::Module that we would want to print the messages from
      at the end of the main process.
      As with the similar problems I've run into here, my solution is to pass
      the info over the IPC class. This will be easier in the make_it_mojo
      branch but on the other hand it will need implemented differently in
      that branch.
  3. 12 Jan, 2020 1 commit
    • Johan Ouwerkerk's avatar
      Add 'native' support for using CMake toolchain files with KDE projects · c1bab239
      Johan Ouwerkerk authored
      CMake supports toolchain files to easily switch between compilers/toolchains.
       - Introduce cmake-toolchain high level option to configure preferred toolchain for CMake (-DCMAKE_TOOLCHAIN_FILE=)
       - Suppress setting up environment variables when building a module with a configured (custom) toolchain
  4. 04 May, 2019 1 commit
    • Michael Pyne's avatar
      Add support for Meson build system. · 6385f5e4
      Michael Pyne authored
      New/updated config file options:
      * 'configure-flags', reused as the way to pass cmdline options to the
      meson setup command.
      * 'ninja-options', a new option to pass cmdline options to the `ninja`
      command. Note that ninja is mandated by Meson as the underlying build
      Tested with https://github.com/plibither8/2048.cpp
      Fixes #27, reviewed in !8.
      Test suite passes and I continue to be able to build 2048.cpp. I've also
      validated that ninja-options is passed to ninja when building 2048.cpp,
      though this was a manual verification.
  5. 01 May, 2019 1 commit
    • Michael Pyne's avatar
      env: Do not prepend /bin when {qt,kde}dir is blank. · e54200ee
      Michael Pyne authored
      This fixes #29, where kdesrc-build was aggressively prepending '/bin' to
      the PATH if either kdedir or qtdir were unset (and qtdir is unset by
      default). This isn't normally an issue but can conflict with user
      Since the desire here is to setup Qt and/or KF5 before system packages,
      only perform this prepending if Qt and/or KF5 are actually in use from
      kdesrc-build. If those values aren't set then the system should already
      be configured to provide in the environment so we shouldn't interfere.
      It turns out that both ksb::Module and ksb::BuildContext are already
      somewhat testable without a lot of orchestration needed here. I've
      verified that the new tests fails without the patch applied, and pass
      with this patch applied.
  6. 24 Mar, 2019 1 commit
  7. 18 Feb, 2019 1 commit
  8. 09 Feb, 2019 1 commit
    • Michael Pyne's avatar
      Add support for building Qt5 modules. · 11490810
      Michael Pyne authored
      This commit adds basic support for building Qt5 using the Qt5 support
      documented at https://wiki.qt.io/Building_Qt_5_from_Git as requested in
      issue #16 (and a dependency for #15).
      Architecturally within kdesrc-build, Qt5 is handled as a special type of
      module-set, in the same way that KDE project modules are special-cased
      using 'kde-projects'. For Qt5, we use 'qt-projects', and reuse the
      existing use-modules and ignore-modules options.
      The first difference is that {use,ignore}-modules applies to Qt's git
      *submodules*. We pass the combination of those to Qt's `init-repository`
      script as a module-subset. Currently the user will need to enter at
      least a use-modules declaration for other reasons, so we would want to
      setup a sample qt5 configuration to include something appropriate.
      Qt5 support also involves a dedicated source code updater (based on the
      basic Git support already present) and a dedicated build system. The
      source code updater handles the Git update for the qt5 "supermodule"
      containing `init-repository` and then calls `init-repository` to
      complete the rest of the process.
      Unfortunately the existing async IPC code doesn't play well with this
      but the worst that happens is that kdesrc-build will have 2 updates
      running at once for a time (kdesrc-build will think all of Qt is updated
      once the supermodule is updated).
      The build system is actually fairly standard compared to the other
      There's a lot that's still missing here, including:
      * documentation,
      * real support for Git submodules (an open feature request for a long
      * the per-distro list of Qt build dependencies not handled by
      kdesrc-build, and
      * support for things like Qt's `qt5_tool`.
      But, it's successfully built for me with Qt 5.12. :)
  9. 12 Jan, 2019 1 commit
    • Michael Pyne's avatar
      Fix cxxflags being set to a space when globally empty. · b01505be
      Michael Pyne authored
      When cxxflags is globally set to an empty value, the getOption magic
      that appends module values to global values for cxxflags causes it the
      result to equal ' ' (i.e. one space). This is because the space is a
      separator between two empty values.
      This causes code testing against cxxflags to think it's actually been
      set to a value and to add it in the cmake calls.
      I fix this and add a test case, but also add some insurance by trimming
      leading/trailing white space so that the existing check for empty
      cxxflags would have had a chance to catch this.
      Differential Revision: https://phabricator.kde.org/D18165
  10. 23 Nov, 2018 2 commits
    • Michael Pyne's avatar
      doc: Add source reference documentation for ksb::Module. · f665ef22
      Michael Pyne authored
      I already have "how to understand the source" docs kind of scattered
      throughout, and in various formats. Yet another new format this time
      (AsciiDoc as implemented by AsciiDoctor).
      Trying to give a short description of the major methods in ksb::Module
      also made me realize that existing documentation on setModuleSet was
      incorrect (claimed it used a module set name, but the actual code needed
      a real ksb::ModuleSet). Added a check for that as well.
    • Michael Pyne's avatar
      Remove dead code from ksb::Module. · 483e67ed
      Michael Pyne authored
      We used to have to mark a module as being from cmdline or rc-file for
      proper option and dependency handling but fixes to ksb::Module setup
      have made this redundant.
  11. 15 Aug, 2018 1 commit
    • Michael Pyne's avatar
      logs: Postpone log dir mutable setup until a log is to be generated. · 685e68ea
      Michael Pyne authored
      The logfiles generated for each module are stored in a log directory (again for
      each module). The converse is also supposed to apply, a log directory should
      only exist for a module if it has logs.
      kdesrc-build enforced this in the past by taking extreme care not to call
      "getLogDir" unless needed. At some point I missed that nuance and used that
      call elsewhere, even when no log was to be generated.
      This had the effect of creating a new log directory for the module that had its
      log directory looked up, but without ever adding logs to it. kdesrc-build would
      also move the latest symlink to point to this empty directory, and then later
      remove the directory containing the actual set of latest logs during cleanup.
      Even worse, this would happen for every module (since we forced a call to
      "getLogDir" so that later code in new async processes would all resolve to the
      same log directory)
      I fix this by splitting up the "getLogDir" functionality into a read-only part
      (creates the base log directory but not the module log directory and does not
      move latest symlinks), and a read-write part for log_command.
  12. 12 May, 2018 1 commit
    • Roman Gilg's avatar
      Ignore system standard path when prepending environment variables · 9d977859
      Roman Gilg authored
      Ignore /usr as prefix or kdedir when prepending environment variables to not
      overrule user setting of PKG_CONFIG_PATH.
      For me it was enough to fix my build with prepending CMAKE_PREFIX_PATH
      conditionally, but in theory the other environment variables should also only
      be prepended if it is not /usr to prepend.
      Test Plan:
      Compiled XCB 1.13 to /opt/xcb and have XCB 1.11 in /usr/.... Set
      PKG_CONFIG_PATH to /opt/xcb/lib/pkgconfig.
      Without this patch CMake, called by kdesrc-build, finds XCB 1.11 in
      /usr/lib/x86_64-linux-gnu according to its log, but sets as version number
      1.13 for some reason.
      On make this fails. It still uses the lib from /opt/xcb> but does not include
      the correct headers in opt/xcb/include.
      With the patch CMake directly finds the lib in /opt/xcb and build succeeds.
      Reviewers: bshah, mpyne
      Reviewed By: mpyne
      Differential Revision: https://phabricator.kde.org/D12739
  13. 15 Apr, 2018 1 commit
    • Michael Pyne's avatar
      qmake: Fix order-dependency of *.pro glob search. · 698cc6d3
      Michael Pyne authored
      The Mojolicious work exposed this bug but it's a bug all the same.  The
      way that Perl's glob function works differs based on whether you use it
      in a scalar (including boolean) context or whether you use it in a list
      I had the parentheses in this test to try to force a list context but
      that's apparently not sufficient as I had every fourth Qt module
      failing to build due to this glob failing, in my Mojolicious testing.
      The revised test successfully forces glob() to use list context, which
      means it always returns the same values for a given directory instead of
      acting as a non-reentrant iterator.
  14. 21 Dec, 2017 1 commit
  15. 24 Sep, 2017 1 commit
  16. 06 Aug, 2017 1 commit
    • Michael Pyne's avatar
      Reduce importance of qtdir option, default to ''. · 02c616cb
      Michael Pyne authored
      The qtdir setting took on much less importance with Qt 5.  We've never
      officially supported building Qt 5 with kdesrc-build, and qmake and
      cmake both use qmake or similar Qt-provided config information to find
      Qt, rather than using the unsupported QTDIR environment variable.
      As a result, default the value to an empty string (interpreted as use of
      system Qt) and stop adding it automatically to the environment variables
      defined during the build.  If set, it will continue to be used for now.
      This also helps the environment setup driver detect when it should look
      for the system Qt5 qmake.
  17. 29 Dec, 2016 1 commit
    • Michael Pyne's avatar
      ipc: Show status of unbuilt-but-updated modules in async. · 27a4d48e
      Michael Pyne authored
      Basically, modules which are updated by default but not actually built
      (e.g. due to using the manual-build option) are never mentioned in the
      kdesrc-build output in the default async mode of operation.
      This required a bit of refactoring of the IPC code to fix, since the
      underlying cause is that the output during async mode is driven by the
      needs of the build thread, which would request updates from the monitor
      thread on a per-module basis.  But the build thread never inquired about
      modules only being updated, so any such modules were never mentioned on
      the command line.
  18. 08 Oct, 2016 3 commits
  19. 15 May, 2016 1 commit
  20. 10 Oct, 2015 1 commit
    • Michael Pyne's avatar
      ui: Streamline and reduce output. · 8d679680
      Michael Pyne authored
      Now we describe up-to-date module progress (if multiple modules are
      being built) and consolidate muliple lines of information into just a
      couple (for build and install).
  21. 12 Aug, 2015 1 commit
  22. 26 Jul, 2015 1 commit
  23. 17 May, 2015 1 commit
  24. 02 May, 2015 1 commit
    • Michael Pyne's avatar
      chdir back to known directory after using remove-after-install. · 2ccfdce7
      Michael Pyne authored
      I noticed that I was getting error messages from a git usage after
      install on my KF5 modules, which are configured to use
      Turns out that git or the shell or kernel or something doesn't like
      running a command from a now-invalid cwd.
  25. 06 Apr, 2014 2 commits
  26. 23 Feb, 2014 3 commits
  27. 13 Feb, 2014 1 commit
  28. 05 Feb, 2014 1 commit
    • Michael Pyne's avatar
      Change debug messages. · 0a4adae5
      Michael Pyne authored
      The debug message for option handling hasn't been useful to me in years,
      while it would be nice to know we're reading in the right dependencies
  29. 23 Dec, 2013 1 commit
    • Àlex Fiestas's avatar
      Adds ignore-kde-structure as an option · 34407904
      Àlex Fiestas authored
      Adds ignore-kde-structure option which will fetch and compile all
      projects in the same dir, meaning that instead of:
      it would be just
  30. 30 Sep, 2013 3 commits
    • Michael Pyne's avatar
      refactor: Complete extraction of global functions from script. · 74c19d31
      Michael Pyne authored
      Just in time for "kdelibs Monday", for the old-timers. ;)
    • Michael Pyne's avatar
      refactor: Move execution-phase code into Application class. · 83e358d3
      Michael Pyne authored
      By moving this code and associated utility methods into Application we
      nearly complete the long-in-progress refactoring of the monolithic
      kdesrc-build script into proper classes/objects.
      The kdesrc-build script itself is nearly bare, but there's still a bit
      more to do.
      At least it should be easier to make individual test scripts to test
      different bugs instead of having a monstrosity of a kdesrc-build-test
      script that has to maintain a common state.
      I've tested this in each way that I'm able (run needing to make a new
      source dir, build dir, new install and log dir, run updating existing
      checkouts, bzr/svn/git/kde-projects all tested, etc.). But this was a
      large move so let me know if I've missed anything.
    • Michael Pyne's avatar
  31. 26 Aug, 2013 1 commit
    • Michael Pyne's avatar
      Make exception class an actual class. · 56d1e7c2
      Michael Pyne authored
      This is a long-overdue change that allows for overloading the
      stringification operator to produce better error messages.
      BuildException was previously not an actual module since kdesrc-build
      itself was just a single script file. Now that we allow modules on disk
      there is no reason to leave the exception class as a figment of Perl's
  32. 12 Aug, 2013 1 commit
    • Michael Pyne's avatar
      module: Use fullProjectPath. · 4818d239
      Michael Pyne authored
      As opposed to directly using an internal specific option name
      everywhere. 'xml-full-path' is still used, but now only within Module.