hakonhagland

perl-macos-curses-install-from-source

Feb 22nd, 2022 (edited)
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. # Download Curses source code from here:
  2. # https://cpan.metacpan.org/authors/id/G/GI/GIRAFFED/Curses-1.38.tar.gz
  3. # extract it and change to the source directory
  4.  
  5. $ brew info ncurses
  6. ncurses: stable 6.3 (bottled) [keg-only]
  7. Text-based UI library
  8. https://invisible-island.net/ncurses/announce.html
  9. /opt/homebrew/Cellar/ncurses/6.3 (3,968 files, 9.6MB)
  10. Poured from bottle on 2022-02-22 at 00:08:28
  11. From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/ncurses.rb
  12. License: MIT
  13. ==> Dependencies
  14. Build: pkg-config ✔
  15. ==> Caveats
  16. ncurses is keg-only, which means it was not symlinked into /opt/homebrew,
  17. because macOS already provides this software and installing another version in
  18. parallel can cause all kinds of trouble.
  19.  
  20. If you need to have ncurses first in your PATH, run:
  21. echo 'export PATH="/opt/homebrew/opt/ncurses/bin:$PATH"' >> ~/.zshrc
  22.  
  23. For compilers to find ncurses you may need to set:
  24. export LDFLAGS="-L/opt/homebrew/opt/ncurses/lib"
  25. export CPPFLAGS="-I/opt/homebrew/opt/ncurses/include"
  26.  
  27. For pkg-config to find ncurses you may need to set:
  28. export PKG_CONFIG_PATH="/opt/homebrew/opt/ncurses/lib/pkgconfig"
  29.  
  30. $ PKG_CONFIG_PATH="/opt/homebrew/opt/ncurses/lib/pkgconfig" pkg-config --libs ncurses
  31. -L/opt/homebrew/Cellar/ncurses/6.3/lib -Wl,-search_paths_first -lncursesw
  32.  
  33. $ PKG_CONFIG_PATH="/opt/homebrew/opt/ncurses/lib/pkgconfig" pkg-config --cflags ncurses
  34. -D_DARWIN_C_SOURCE -I/opt/homebrew/Cellar/ncurses/6.3/include/ncursesw -I/opt/homebrew/Cellar/ncurses/6.3/include
  35.  
  36. # Run perl Makefile.PL with these settings:
  37. $ CURSES_LIBTYPE=ncurses CURSES_LDFLAGS="-L/opt/homebrew/Cellar/ncurses/6.3/lib -Wl,-search_paths_first -lncursesw" CURSES_CFLAGS="-D_DARWIN_C_SOURCE -I/opt/homebrew/Cellar/ncurses/6.3/include/ncursesw -I/opt/homebrew/Cellar/ncurses/6.3/include" perl Makefile.PL
  38. GEN function: not applicable
  39. PANELS functions: not enabled
  40. MENUS functions: not enabled
  41. FORMS functions: not enabled
  42.  
  43. Generating a Unix-style Makefile
  44. Writing Makefile for Curses
  45. Writing MYMETA.yml and MYMETA.json
  46.  
  47. # Then compile, test, and install the module
  48. $ make
  49. $ otool -L blib/arch/auto/Curses/Curses.bundle
  50. blib/arch/auto/Curses/Curses.bundle:
  51. /opt/homebrew/opt/ncurses/lib/libncursesw.6.dylib (compatibility version 6.0.0, current version 6.0.0)
  52. /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
  53. $ make test
  54. $ make install
  55.  
  56.  
  57.  
Add Comment
Please, Sign In to add comment