Codebase list ohcount / multiarch-fixes/main debian / patches / build-cflags.diff
multiarch-fixes/main

Tree @multiarch-fixes/main (Download .tar.gz)

build-cflags.diff @multiarch-fixes/mainraw · history · blame

Index: ohcount/build
===================================================================
--- ohcount.orig/build
+++ ohcount/build
@@ -1,4 +1,5 @@
-#!/usr/bin/env bash 
+#!/usr/bin/env bash
+set -v
 # Build script for Ohcount.
 # Written by Mitchell Foral. mitchell<att>caladbolg.net.
 
@@ -117,14 +118,18 @@ run_test_suite()
 RUBY_HEADER_DIR=`ruby -rmkmf -e 'print RbConfig::expand(CONFIG["rubyhdrdir"])'`
 rbconfig_arch=`ruby -rmkmf -e 'print RbConfig::expand(CONFIG["arch"])'`
 RUBY_CONFIG_DIR="$RUBY_HEADER_DIR/$rbconfig_arch"
+RUBY_VERSION=`ruby -rmkmf -e 'print RbConfig::expand(CONFIG["ruby_version"])'`
 
 build_ruby_bindings()
 {
 	echo "Generating Ruby bindings for $arch"
 	sh -c "swig -ruby -o ruby/ohcount_wrap.c ruby/ohcount.i" || exit 1
 	mkdir -p ruby/$arch
+    echo $cc $RB_SHARED ruby/ohcount_wrap.c $files -o ruby/$arch/$RB_SHARED_NAME \
+    -I$RUBY_HEADER_DIR -I$RUBY_CONFIG_DIR  -I/usr/include/$rbconfig_arch/ruby-$RUBY_VERSION  \
+    -lpcre -lmagic
   sh -c "$cc $RB_SHARED ruby/ohcount_wrap.c $files -o ruby/$arch/$RB_SHARED_NAME \
-    -I$RUBY_HEADER_DIR -I$RUBY_CONFIG_DIR \
+    -I$RUBY_HEADER_DIR -I$RUBY_CONFIG_DIR  -I/usr/include/$rbconfig_arch/ruby-$RUBY_VERSION  \
     -lpcre -lmagic" || exit 1
   sh -c "cd test/unit/ruby && ruby ruby_test.rb" || exit 1
 }