OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/mruby?expand=0&rev=19
71 lines
2.4 KiB
Diff
71 lines
2.4 KiB
Diff
diff -Nur mruby-3.4.0/build_config/host-shared.rb new/build_config/host-shared.rb
|
|
--- mruby-3.4.0/build_config/host-shared.rb 2025-04-20 06:08:22.000000000 +0200
|
|
+++ new/build_config/host-shared.rb 2025-07-09 13:57:53.778707930 +0200
|
|
@@ -15,12 +15,12 @@
|
|
|
|
conf.archiver do |archiver|
|
|
archiver.command = cc.command
|
|
- archiver.archive_options = '-shared -o %{outfile} %{objs}'
|
|
+ archiver.archive_options = '-shared -Wl,-soname,%{filename} -o %{outfile} %{objs}'
|
|
end
|
|
|
|
# file extensions
|
|
conf.exts do |exts|
|
|
- exts.library = '.so'
|
|
+ exts.library = '.so.%{version}'
|
|
end
|
|
|
|
# file separator
|
|
diff -Nur mruby-3.4.0/lib/mruby/build/command.rb new/lib/mruby/build/command.rb
|
|
--- mruby-3.4.0/lib/mruby/build/command.rb 2025-04-20 06:08:22.000000000 +0200
|
|
+++ new/lib/mruby/build/command.rb 2025-07-09 13:56:55.668375790 +0200
|
|
@@ -4,7 +4,7 @@
|
|
class Command
|
|
include Rake::DSL
|
|
extend Forwardable
|
|
- def_delegators :@build, :filename, :objfile, :libfile, :exefile
|
|
+ def_delegators :@build, :filename, :realname, :objfile, :libfile, :exefile
|
|
attr_accessor :build, :command
|
|
|
|
def initialize(build)
|
|
@@ -240,7 +240,7 @@
|
|
def run(outfile, objfiles)
|
|
mkdir_p File.dirname(outfile)
|
|
_pp "AR", outfile.relative_path
|
|
- _run archive_options, { :outfile => filename(outfile), :objs => filename(objfiles).map{|f| %Q["#{f}"]}.join(' ') }
|
|
+ _run archive_options, { :outfile => filename(outfile), :filename => realname(outfile), :objs => filename(objfiles).map{|f| %Q["#{f}"]}.join(' ') }
|
|
end
|
|
end
|
|
|
|
diff -Nur mruby-3.4.0/lib/mruby/build.rb new/lib/mruby/build.rb
|
|
--- mruby-3.4.0/lib/mruby/build.rb 2025-04-20 06:08:22.000000000 +0200
|
|
+++ new/lib/mruby/build.rb 2025-07-09 13:56:55.668457919 +0200
|
|
@@ -7,6 +7,7 @@
|
|
autoload :Gem, "mruby/gem"
|
|
autoload :Lockfile, "mruby/lockfile"
|
|
autoload :Presym, "mruby/presym"
|
|
+ autoload :Source, 'mruby/source'
|
|
|
|
INSTALL_PREFIX = ENV['PREFIX'] || ENV['INSTALL_PREFIX'] || '/usr/local'
|
|
INSTALL_DESTDIR = ENV['DESTDIR'] || ''
|
|
@@ -425,6 +426,10 @@
|
|
end
|
|
end
|
|
|
|
+ def realname(name)
|
|
+ filename(name).rpartition(file_separator)[-1]
|
|
+ end
|
|
+
|
|
def exefile(name)
|
|
if name.is_a?(Array)
|
|
name.flatten.map { |n| exefile(n) }
|
|
@@ -448,7 +453,7 @@
|
|
if name.is_a?(Array)
|
|
name.flatten.map { |n| libfile(n) }
|
|
else
|
|
- "#{name}#{exts.library}"
|
|
+ "#{name}#{exts.library}" % {:version => MRuby::Source::MRUBY_VERSION}
|
|
end
|
|
end
|
|
|