notcurses 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ #ifndef NOTCURSES_WRAPPER_H
2
+ #define NOTCURSES_WRAPPER_H
3
+
4
+ #define ALLOC
5
+ #define API
6
+ #define __attribute__(x)
7
+ #define __attribute(x)
8
+ #define __declspec(x)
9
+ #define __nonnull(x)
10
+
11
+ #include <notcurses/notcurses.h>
12
+
13
+ #undef ALLOC
14
+ #undef API
15
+ #undef __attribute__
16
+ #undef __attribute
17
+ #undef __declspec
18
+ #undef __nonnull
19
+
20
+ #endif // NOTCURSES_WRAPPER_H
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative './notcurses.so'
4
+
5
+ puts "Loaded Notcurses version #{Notcurses.notcurses_version}"
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Notcurses
4
+ VERSION = "0.0.1"
5
+ end
data/lib/notcurses.rb ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'notcurses/version'
4
+ require_relative 'notcurses.so'
@@ -0,0 +1,26 @@
1
+ desc "Compile Notcurses Swig SO"
2
+ task :compile do
3
+ require 'rake'
4
+
5
+ root_dir = File.expand_path('..', __FILE__)
6
+ while root_dir != '/' && !File.exist?("#{root_dir}/Rakefile")
7
+ root_dir = File.expand_path('..', root_dir)
8
+ end
9
+
10
+ notcurses_so_dir = "#{root_dir}/ext/notcurses"
11
+ raise StandardError, "no ext dir" unless Dir.exist? notcurses_so_dir
12
+ og_pwd = Dir.pwd
13
+
14
+ begin
15
+ Dir.chdir notcurses_so_dir
16
+ `./extconf.rb`
17
+ raise StandardError, "Failed compiling makefile" if !$?.success?
18
+ `make`
19
+ raise StandardError, "Failed compiling shared object" if !$?.success?
20
+ rescue => e
21
+ raise e
22
+ ensure
23
+ Dir.chdir og_pwd
24
+ end
25
+ end
26
+
data/notcurses.gemspec ADDED
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/notcurses/version"
4
+ Gem::Specification.new do |spec|
5
+ spec.name = "notcurses"
6
+ spec.version = Notcurses::VERSION
7
+ spec.authors = ["Snake Blitzken"]
8
+ spec.email = ["git@slithernix.com"]
9
+
10
+ spec.summary = "Notcurses Ruby Extension Auto-Generated by SWIG"
11
+ spec.description = "Notcurses is a modern reimagining of the classic TUI library curses. It supports true color, has stock widgets, and should be familiar enough to anyone familiar with curses, though it is not an API-compatible drop-in."
12
+ spec.homepage = "https://github.com/slithernix/notcurses-ruby"
13
+ spec.required_ruby_version = ">= 2.6.0"
14
+
15
+ spec.metadata["homepage_uri"] = spec.homepage
16
+ spec.metadata["source_code_uri"] = "https://github.com/slithernix/notcurses-ruby"
17
+ spec.metadata["changelog_uri"] = "https://github.com/slithernix/notcurses-ruby/tree/main/CHANGELOG.md"
18
+
19
+ spec.files = Dir.chdir(__dir__) do
20
+ `git ls-files -z`.split("\x0").reject do |f|
21
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
22
+ end
23
+ end
24
+
25
+ spec.bindir = "exe"
26
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
27
+ spec.extensions = ["ext/notcurses/extconf.rb"]
28
+ spec.require_paths = ["lib"]
29
+ end
30
+
data/sig/notcurses.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Notcurses
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: notcurses
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Snake Blitzken
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-07-23 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Notcurses is a modern reimagining of the classic TUI library curses.
14
+ It supports true color, has stock widgets, and should be familiar enough to anyone
15
+ familiar with curses, though it is not an API-compatible drop-in.
16
+ email:
17
+ - git@slithernix.com
18
+ executables: []
19
+ extensions:
20
+ - ext/notcurses/extconf.rb
21
+ extra_rdoc_files: []
22
+ files:
23
+ - ".rubocop.yml"
24
+ - ".ruby-version"
25
+ - Gemfile
26
+ - Gemfile.lock
27
+ - README.md
28
+ - Rakefile
29
+ - ext/notcurses/Makefile
30
+ - ext/notcurses/extconf.rb
31
+ - ext/notcurses/modified_ruby_std_wstring.i
32
+ - ext/notcurses/ncplane_vprintf_aligned.c
33
+ - ext/notcurses/ncplane_vprintf_stained.c
34
+ - ext/notcurses/ncplane_vprintf_yx.c
35
+ - ext/notcurses/notcurses.i
36
+ - ext/notcurses/notcurses_wrap.c
37
+ - ext/notcurses/notcurses_wrapper.h
38
+ - ext/notcurses/test
39
+ - lib/notcurses.rb
40
+ - lib/notcurses/version.rb
41
+ - lib/tasks/compile_notcurses_so.rake
42
+ - notcurses.gemspec
43
+ - sig/notcurses.rbs
44
+ homepage: https://github.com/slithernix/notcurses-ruby
45
+ licenses: []
46
+ metadata:
47
+ homepage_uri: https://github.com/slithernix/notcurses-ruby
48
+ source_code_uri: https://github.com/slithernix/notcurses-ruby
49
+ changelog_uri: https://github.com/slithernix/notcurses-ruby/tree/main/CHANGELOG.md
50
+ post_install_message:
51
+ rdoc_options: []
52
+ require_paths:
53
+ - lib
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: 2.6.0
59
+ required_rubygems_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ requirements: []
65
+ rubygems_version: 3.4.1
66
+ signing_key:
67
+ specification_version: 4
68
+ summary: Notcurses Ruby Extension Auto-Generated by SWIG
69
+ test_files: []