2010-11-30 18:31:28 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Owfs < Formula
|
2012-07-07 18:08:22 +00:00
|
|
|
homepage 'http://owfs.org/'
|
2013-02-02 02:13:43 +00:00
|
|
|
url 'http://sourceforge.net/projects/owfs/files/owfs/2.8p21/owfs-2.8p21.tar.gz'
|
|
|
|
version '2.8p21'
|
|
|
|
sha1 '253b70aef2637dc60beeb0187254b69abe158e43'
|
2010-11-30 18:31:28 +00:00
|
|
|
|
2012-07-07 18:08:22 +00:00
|
|
|
depends_on 'libusb-compat'
|
2012-02-29 01:44:13 +00:00
|
|
|
|
2012-12-16 07:57:58 +00:00
|
|
|
# Fixes inline functions in clang.
|
|
|
|
# Reported upstream:
|
|
|
|
# http://sourceforge.net/mailarchive/message.php?msg_id=30219156
|
|
|
|
def patches
|
|
|
|
DATA if ENV.compiler == :clang
|
|
|
|
end
|
|
|
|
|
2010-11-30 18:31:28 +00:00
|
|
|
def install
|
2012-12-16 07:57:58 +00:00
|
|
|
# Fix include of getline and strsep to avoid crash
|
|
|
|
inreplace 'configure', '-D_POSIX_C_SOURCE=200112L', ''
|
|
|
|
|
|
|
|
# 'tac' command is missing in MacOSX
|
|
|
|
inreplace 'src/man/Makefile.am', 'tac', 'tail -r'
|
|
|
|
inreplace 'src/man/Makefile.in', 'tac', 'tail -r'
|
|
|
|
|
2012-11-07 06:54:39 +00:00
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
2010-11-30 18:31:28 +00:00
|
|
|
"--disable-swig",
|
2012-12-16 07:57:58 +00:00
|
|
|
"--disable-owfs",
|
2010-11-30 18:31:28 +00:00
|
|
|
"--disable-owtcl",
|
|
|
|
"--disable-zero",
|
2012-11-07 06:54:39 +00:00
|
|
|
"--disable-owpython",
|
|
|
|
"--disable-owperl",
|
2010-11-30 18:31:28 +00:00
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make install"
|
|
|
|
end
|
2012-12-16 07:57:58 +00:00
|
|
|
|
|
|
|
def test
|
|
|
|
system "owserver --version"
|
|
|
|
end
|
2010-11-30 18:31:28 +00:00
|
|
|
end
|
2012-12-16 07:57:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
__END__
|
|
|
|
|
|
|
|
diff --git a/module/owlib/src/include/rwlock.h b/module/owlib/src/include/rwlock.h
|
|
|
|
index 29246ea..57fce7a 100644
|
|
|
|
--- a/module/owlib/src/include/rwlock.h
|
|
|
|
+++ b/module/owlib/src/include/rwlock.h
|
|
|
|
@@ -26,10 +26,10 @@ typedef struct {
|
|
|
|
} my_rwlock_t;
|
|
|
|
|
|
|
|
void my_rwlock_init(my_rwlock_t * rwlock);
|
|
|
|
-inline void my_rwlock_write_lock(my_rwlock_t * rwlock);
|
|
|
|
-inline void my_rwlock_write_unlock(my_rwlock_t * rwlock);
|
|
|
|
-inline void my_rwlock_read_lock(my_rwlock_t * rwlock);
|
|
|
|
-inline void my_rwlock_read_unlock(my_rwlock_t * rwlock);
|
|
|
|
+void my_rwlock_write_lock(my_rwlock_t * rwlock);
|
|
|
|
+void my_rwlock_write_unlock(my_rwlock_t * rwlock);
|
|
|
|
+void my_rwlock_read_lock(my_rwlock_t * rwlock);
|
|
|
|
+void my_rwlock_read_unlock(my_rwlock_t * rwlock);
|
|
|
|
void my_rwlock_destroy(my_rwlock_t * rwlock);
|
|
|
|
|
|
|
|
#else /* not OW_MT */
|
|
|
|
diff --git a/module/ownet/c/src/include/rwlock.h b/module/ownet/c/src/include/rwlock.h
|
|
|
|
index 28fc598..c5e6188 100644
|
|
|
|
--- a/module/ownet/c/src/include/rwlock.h
|
|
|
|
+++ b/module/ownet/c/src/include/rwlock.h
|
|
|
|
@@ -26,10 +26,10 @@ typedef struct {
|
|
|
|
} my_rwlock_t;
|
|
|
|
|
|
|
|
void my_rwlock_init(my_rwlock_t * rwlock);
|
|
|
|
-inline void my_rwlock_write_lock(my_rwlock_t * rwlock);
|
|
|
|
-inline void my_rwlock_write_unlock(my_rwlock_t * rwlock);
|
|
|
|
-inline void my_rwlock_read_lock(my_rwlock_t * rwlock);
|
|
|
|
-inline void my_rwlock_read_unlock(my_rwlock_t * rwlock);
|
|
|
|
+void my_rwlock_write_lock(my_rwlock_t * rwlock);
|
|
|
|
+void my_rwlock_write_unlock(my_rwlock_t * rwlock);
|
|
|
|
+void my_rwlock_read_lock(my_rwlock_t * rwlock);
|
|
|
|
+void my_rwlock_read_unlock(my_rwlock_t * rwlock);
|
|
|
|
void my_rwlock_destroy(my_rwlock_t * rwlock);
|
|
|
|
|
|
|
|
#endif /* OW_MT */
|