dub.sdl 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name "pixiv_down"
  2. description "A CLI tool to download from pixiv.net"
  3. authors "mio <stigma@disroot.org>"
  4. copyright "Copyright (C) 2023-2024, mio"
  5. homepage "https://yume-neru.neocities.org/p/pixiv_down.html"
  6. license "GPL-3.0-only"
  7. targetType "executable"
  8. preBuildCommands `test -d source/res || mkdir source/res
  9. if [ -x $$(which git) -a -d .git ]
  10. then
  11. git describe --tags > source/res/VERSION
  12. else
  13. pr -t VERSION > source/res/VERSION
  14. fi`
  15. stringImportPaths "source/res"
  16. # OSX before POSIX because, while OSX is POSIX, we don't want to use GraphicsMagick
  17. # there. OSX will be the default for macOS while Q16 the default for other POSIX.
  18. configuration "macOS" {
  19. platforms "osx"
  20. dflags "-L-framework" "-LFoundation" \
  21. "-L-framework" "-LImageIO" platform="dmd"
  22. }
  23. configuration "magick" {
  24. platforms "posix"
  25. versions "PD_USE_MAGICK"
  26. }
  27. // Compatibility names for when we were statically linking with GraphicsMagick
  28. configuration "Q16" {
  29. platforms "posix"
  30. versions "PD_USE_MAGICK"
  31. }
  32. configuration "Q8" {
  33. platforms "posix"
  34. versions "PD_USE_MAGICK"
  35. }
  36. configuration "Q32" {
  37. platforms "posix"
  38. versions "PD_USE_MAGICK"
  39. }
  40. # NOTE: Building with gamut doesn't support GIFs (Ugoira)
  41. # SEE: https://codeberg.org/supercell/pixiv_down/issues/25
  42. configuration "gamut" {
  43. versions "PD_USE_GAMUT"
  44. dependency "gamut" version="~>2.5.0"
  45. excludedSourceFiles "source/gif_writer/posix.d" \
  46. "source/gif_writer/gif_writer/osx.d" \
  47. "source/gif_writer/common.d" \
  48. "source/gif_writer/package.d" \
  49. "source/image_reader/osx.d" \
  50. "source/image_reader/posix.d" \
  51. "source/image_reader/package.d"
  52. }