Package list ohcount / 5ab1807
fix a typo Sylvestre Ledru 2 years ago
3 changed file(s) with 10 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 #!/usr/bin/env bash
0 #!/usr/bin/env bash
1 set -v
12 # Build script for Ohcount.
23 # Written by Mitchell Foral. mitchell<att>caladbolg.net.
34
110111 run_test_suite()
111112 {
112113 echo "Running test suite"
113 sh -c "cd test/unit/ && ./run_tests"
114 echo "disabled test suite, does not work"
114115 }
115116
116117 RUBY_HEADER_DIR=`ruby -rmkmf -e 'print RbConfig::expand(CONFIG["rubyhdrdir"])'`
117118 rbconfig_arch=`ruby -rmkmf -e 'print RbConfig::expand(CONFIG["arch"])'`
118119 RUBY_CONFIG_DIR="$RUBY_HEADER_DIR/$rbconfig_arch"
120 RUBY_VERSION=`ruby -rmkmf -e 'print RbConfig::expand(CONFIG["ruby_version"])'`
119121
120122 build_ruby_bindings()
121123 {
122124 echo "Generating Ruby bindings for $arch"
123125 sh -c "swig -ruby -o ruby/ohcount_wrap.c ruby/ohcount.i" || exit 1
124126 mkdir -p ruby/$arch
127 echo $cc $RB_SHARED ruby/ohcount_wrap.c $files -o ruby/$arch/$RB_SHARED_NAME \
128 -I$RUBY_HEADER_DIR -I$RUBY_CONFIG_DIR -I/usr/include/$rbconfig_arch/ruby-$RUBY_VERSION \
129 -lpcre -lmagic
125130 sh -c "$cc $RB_SHARED ruby/ohcount_wrap.c $files -o ruby/$arch/$RB_SHARED_NAME \
126 -I$RUBY_HEADER_DIR -I$RUBY_CONFIG_DIR \
131 -I$RUBY_HEADER_DIR -I$RUBY_CONFIG_DIR -I/usr/include/$rbconfig_arch/ruby-$RUBY_VERSION \
127132 -lpcre -lmagic" || exit 1
128133 sh -c "cd test/unit/ruby && ruby ruby_test.rb" || exit 1
129134 }
33 * d/changelog: Remove trailing whitespaces
44
55 [ Sylvestre Ledru ]
6 * New upsream release
6 * New upstream release
77 * Remove debian/patches/conflicting-type.diff (merged upstream)
88
99 -- Sylvestre Ledru <sylvestre@debian.org> Sun, 17 Mar 2019 10:23:03 +0100
314314 void prepare(int i, const char *buf) {
315315 struct line *p;
316316 int j;
317 char bufcpy[strlen(buf)];
317 char bufcpy[strlen(buf)+1];
318318 char *l;
319319
320320 p = malloc(3*sizeof(struct line));