File: build-cflags.diff

package info (click to toggle)
ohcount 4.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,452 kB
  • sloc: ansic: 7,555; javascript: 3,300; ruby: 2,363; perl: 2,065; objc: 1,325; python: 445; pascal: 398; erlang: 350; sh: 275; lisp: 272; vhdl: 150; haskell: 149; asm: 128; cs: 124; awk: 98; java: 92; php: 77; tcl: 58; xml: 57; fortran: 54; modula3: 32; ada: 30; makefile: 30; jsp: 28; sql: 18; cobol: 13; ml: 9
file content (31 lines) | stat: -rw-r--r-- 1,292 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
 }