Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "vendor/PDCurses"]
path = vendor/PDCurses
url = https://github.com/shugo/PDCurses.git
[submodule "vendor/PDCursesMod"]
path = vendor/PDCursesMod
url = https://github.com/Bill-Gray/PDCursesMod.git
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
curses is released under the Ruby and 2-clause BSD licenses. See COPYING for
details.

It includes a forked version of PDCurses, which is in the public domain:
It includes PDCursesMod, which is in the public domain:

https://github.com/Bill-Gray/PDCurses
https://github.com/Bill-Gray/PDCursesMod

The version for Win32 console mode in the wincon subdirectory is used.

Expand Down
7 changes: 5 additions & 2 deletions ext/curses/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def exec_command(cmd)
if $use_bundled_pdcurses
$pdcurses_wide_default = true
$curses_version_default = "function"
pdcurses_dir = File.expand_path("../../vendor/PDCurses", __dir__)
pdcurses_dir = File.expand_path("../../vendor/PDCursesMod", __dir__)
$idefault = $ldefault = pdcurses_dir
wincon_dir = File.expand_path("wincon", pdcurses_dir)
old_dir = Dir.pwd
Expand All @@ -68,14 +68,17 @@ def exec_command(cmd)
$pdcurses_dll_default = true
else
w64 = $x64 ? "_w64=1" : ""
exec_command "make -f Makefile.mng clean libs #{w64} WIDE=Y DLL=N CC=\"gcc -std=gnu17\""
exec_command "make -f Makefile clean libs #{w64} WIDE=Y DLL=N CC=\"gcc -std=gnu17\""
FileUtils.cp("pdcurses.a", File.expand_path("libpdcurses.a", pdcurses_dir))
end
ensure
Dir.chdir(old_dir)
end
FileUtils.cp(File.expand_path("curses.h", pdcurses_dir),
File.expand_path("pdcurses.h", pdcurses_dir))
# PDCursesMod calls PlaySound() in PDC_beep(), so the static library
# needs winmm at link time
have_library("winmm") if $mingw
$library_candidates = [
["pdcurses.h", ["pdcurses"]]
]
Expand Down
2 changes: 1 addition & 1 deletion lib/curses.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pdcurses_dll = File.expand_path("../vendor/PDCurses/pdcurses.dll", __dir__)
pdcurses_dll = File.expand_path("../vendor/PDCursesMod/pdcurses.dll", __dir__)
if File.exist?(pdcurses_dll)
path = ENV["PATH"]
dir = File.dirname(pdcurses_dll)
Expand Down
1 change: 0 additions & 1 deletion vendor/PDCurses
Submodule PDCurses deleted from c163cd
1 change: 1 addition & 0 deletions vendor/PDCursesMod
Submodule PDCursesMod added at d22601