Skip to content

Commit

Permalink
apply bsd-compatibility patch to Onigmo (k-takata/Onigmo#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed Sep 9, 2015
1 parent 5b1ec07 commit 6699ed4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Onigmo-bsd-compat.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git Makefile.am Makefile.am
index 07cf35f..1acf663 100644
--- Makefile.am
+++ Makefile.am
@@ -65,7 +65,7 @@ do_subst = sed \
-e 's,[@]includedir[@],$(includedir),g'

oniguruma.pc: $(srcdir)/oniguruma.pc.in Makefile
- $(do_subst) < $(<) > $(@)
+ $(do_subst) < $(srcdir)/oniguruma.pc.in > $(@)

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = oniguruma.pc
diff --git Makefile.in Makefile.in
index 5849df9..d4e4c0e 100644
--- Makefile.in
+++ Makefile.in
@@ -1428,7 +1428,7 @@ uninstall-am: uninstall-binSCRIPTS uninstall-includeHEADERS \
onig-config: onig-config.in

oniguruma.pc: $(srcdir)/oniguruma.pc.in Makefile
- $(do_subst) < $(<) > $(@)
+ $(do_subst) < $(srcdir)/oniguruma.pc.in > $(@)

dll:
$(CXX) -shared -Wl,--output-def,libonig.def -o libonig.dll *.o \
5 changes: 5 additions & 0 deletions mrbgem.rake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ MRuby::Gem::Specification.new('mruby-onig-regexp') do |spec|
_pp 'extracting', "Onigmo-#{version}"
`gzip -dc "#{dir}/Onigmo-#{version}.tar.gz" | tar xf -`
end
unless ENV['OS'] == 'Windows_NT'
Dir.chdir(oniguruma_dir) do
`patch -p0 < #{dir}/Onigmo-bsd-compat.patch`
end
end
end

def run_command(env, command)
Expand Down

0 comments on commit 6699ed4

Please sign in to comment.