apparmor/ruby-2_0-mkmf-destdir.patch
Christian Boltz 4da2ecce1b Accepting request 188225 from home:cboltz
- add python3-apparmor subpackage (currently py2 OR py3 package can be 
  build, but not both at the same time)
- add upstream apparmor-python3-r2052.diff to fix various python3 issues

- Ruby 2.0 mkmf gets the path to ruby.h wrong (bnc#822277)

- enable python and ruby subpackages (using %bcond_without)
- update/fix paths in %files for python and ruby subpackages

OBS-URL: https://build.opensuse.org/request/show/188225
OBS-URL: https://build.opensuse.org/package/show/security:apparmor/apparmor?expand=0&rev=40
2013-08-15 12:10:13 +00:00

20 lines
1.1 KiB
Diff

diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile ../orig-apparmor-2.8.1/libraries/libapparmor/swig/ruby/extconf.rb ./libraries/libapparmor/swig/ruby/extconf.rb
--- ../orig-apparmor-2.8.1/libraries/libapparmor/swig/ruby/extconf.rb 2009-05-12 23:56:56.000000000 +0200
+++ ./libraries/libapparmor/swig/ruby/extconf.rb 2013-06-04 14:52:01.677579537 +0200
@@ -28,7 +28,14 @@
# hack 2: strip all rpath references
open('Makefile.ruby', 'w') do |out|
IO.foreach('Makefile.new') do |line|
- out.puts line.gsub(/-Wl,-R'[^']*'/, '')
+ l = line.gsub(/-Wl,-R'[^']*'/, '')
+ # oldincludedir = $(DESTDIR)/usr/include
+ # -> oldincludedir = /usr/include
+ l = l.gsub(/(oldincludedir)\s+=\s+\$\(DESTDIR\)(.*)/) { |m| "#{$1} = #{$2}" }
+ # hdrdir = $(includedir)/$(RUBY_VERSION_NAME)
+ # -> hdrdir = $(oldincludedir)/$(RUBY_VERSION_NAME)
+ l = l.gsub(/(hdrdir)\s+=\s+\$\(includedir\)(.*)/) { |m| "#{$1} = $(oldincludedir)#{$2}" }
+ out.puts l
end
end
else