Skip to content

Commit

Permalink
Problem: WITH_DRAFTS not defined in header file
Browse files Browse the repository at this point in the history
Solution: regenerate from zproject
  • Loading branch information
hintjens committed Jan 19, 2016
1 parent d7ea494 commit fb7369e
Show file tree
Hide file tree
Showing 19 changed files with 327 additions and 25 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
set(libdir "\${prefix}/lib${LIB_SUFFIX}")
set(includedir "\${prefix}/include")
IF (WITH_DRAFTS)
set(pkg_config_defines "-DWITH_DRAFTS=1")
ELSE (WITH_DRAFTS)
set(pkg_config_defines "")
ENDIF (WITH_DRAFTS)
configure_file(
"${SOURCE_DIR}/src/libmlm.pc.in"
"${SOURCE_DIR}/src/libmlm.pc"
Expand Down
6 changes: 3 additions & 3 deletions FindCZMQ.cmake → Findczmq.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

if (NOT MSVC)
include(FindPkgConfig)
pkg_check_modules(PC_CZMQ "libczmq")
pkg_check_modules(PC_CZMQ "czmq")
if (NOT PC_CZMQ_FOUND)
pkg_check_modules(PC_CZMQ "czmq")
endif (NOT PC_CZMQ_FOUND)
Expand All @@ -18,13 +18,13 @@ if (NOT MSVC)
endif(PC_CZMQ_FOUND)
endif (NOT MSVC)

find_path(
find_path (
CZMQ_INCLUDE_DIRS
NAMES czmq.h
HINTS ${PC_CZMQ_INCLUDE_HINTS}
)

find_library(
find_library (
CZMQ_LIBRARIES
NAMES czmq
HINTS ${PC_CZMQ_LIBRARY_HINTS}
Expand Down
6 changes: 3 additions & 3 deletions FindLibsodium.cmake → Findlibsodium.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

if (NOT MSVC)
include(FindPkgConfig)
pkg_check_modules(PC_LIBSODIUM "libsodium")
pkg_check_modules(PC_LIBSODIUM "sodium")
if (NOT PC_LIBSODIUM_FOUND)
pkg_check_modules(PC_LIBSODIUM "sodium")
endif (NOT PC_LIBSODIUM_FOUND)
Expand All @@ -18,13 +18,13 @@ if (NOT MSVC)
endif(PC_LIBSODIUM_FOUND)
endif (NOT MSVC)

find_path(
find_path (
LIBSODIUM_INCLUDE_DIRS
NAMES sodium.h
HINTS ${PC_LIBSODIUM_INCLUDE_HINTS}
)

find_library(
find_library (
LIBSODIUM_LIBRARIES
NAMES sodium
HINTS ${PC_LIBSODIUM_LIBRARY_HINTS}
Expand Down
36 changes: 18 additions & 18 deletions FindZeroMQ.cmake → Findlibzmq.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@

if (NOT MSVC)
include(FindPkgConfig)
pkg_check_modules(PC_ZEROMQ "libzmq")
if (NOT PC_ZEROMQ_FOUND)
pkg_check_modules(PC_ZEROMQ "zmq")
endif (NOT PC_ZEROMQ_FOUND)
if (PC_ZEROMQ_FOUND)
pkg_check_modules(PC_LIBZMQ "zmq")
if (NOT PC_LIBZMQ_FOUND)
pkg_check_modules(PC_LIBZMQ "zmq")
endif (NOT PC_LIBZMQ_FOUND)
if (PC_LIBZMQ_FOUND)
# some libraries install the headers is a subdirectory of the include dir
# returned by pkg-config, so use a wildcard match to improve chances of finding
# headers and SOs.
set(PC_ZEROMQ_INCLUDE_HINTS ${PC_ZEROMQ_INCLUDE_DIRS} ${PC_ZEROMQ_INCLUDE_DIRS}/*)
set(PC_ZEROMQ_LIBRARY_HINTS ${PC_ZEROMQ_LIBRARY_DIRS} ${PC_ZEROMQ_LIBRARY_DIRS}/*)
endif(PC_ZEROMQ_FOUND)
set(PC_LIBZMQ_INCLUDE_HINTS ${PC_LIBZMQ_INCLUDE_DIRS} ${PC_LIBZMQ_INCLUDE_DIRS}/*)
set(PC_LIBZMQ_LIBRARY_HINTS ${PC_LIBZMQ_LIBRARY_DIRS} ${PC_LIBZMQ_LIBRARY_DIRS}/*)
endif(PC_LIBZMQ_FOUND)
endif (NOT MSVC)

find_path(
ZEROMQ_INCLUDE_DIRS
find_path (
LIBZMQ_INCLUDE_DIRS
NAMES zmq.h
HINTS ${PC_ZEROMQ_INCLUDE_HINTS}
HINTS ${PC_LIBZMQ_INCLUDE_HINTS}
)

find_library(
ZEROMQ_LIBRARIES
find_library (
LIBZMQ_LIBRARIES
NAMES zmq
HINTS ${PC_ZEROMQ_LIBRARY_HINTS}
HINTS ${PC_LIBZMQ_LIBRARY_HINTS}
)

include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(
ZEROMQ
REQUIRED_VARS ZEROMQ_LIBRARIES ZEROMQ_INCLUDE_DIRS
LIBZMQ
REQUIRED_VARS LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS
)
mark_as_advanced(
ZEROMQ_FOUND
ZEROMQ_LIBRARIES ZEROMQ_INCLUDE_DIRS
LIBZMQ_FOUND
LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS
)

################################################################################
Expand Down
8 changes: 8 additions & 0 deletions bindings/ruby/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

require 'rspec/core/rake_task'

task :default => :test

# Run tests.
RSpec::Core::RakeTask.new :test do |c|
end
47 changes: 47 additions & 0 deletions bindings/ruby/lib/malamute/ffi.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################

require 'ffi'
require_relative 'ffi/version'

module Malamute
module FFI
module LibC
extend ::FFI::Library
ffi_lib ::FFI::Platform::LIBC
attach_function :free, [ :pointer ], :void, blocking: true
end

extend ::FFI::Library

def self.available?
@available
end

begin
lib_name = 'libmlm'
lib_paths = ['/usr/local/lib', '/opt/local/lib', '/usr/lib64']
.map { |path| "#{path}/#{lib_name}.#{::FFI::Platform::LIBSUFFIX}" }
ffi_lib lib_paths + [lib_name]
@available = true
rescue LoadError
warn ""
warn "WARNING: ::Malamute::FFI is not available without libmlm."
warn ""
@available = false
end

if available?
opts = {
blocking: true # only necessary on MRI to deal with the GIL.
}
end
end
end

################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
15 changes: 15 additions & 0 deletions bindings/ruby/lib/malamute/ffi/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################

module Malamute
module FFI
VERSION = '0.0.0'
end
end

################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
15 changes: 15 additions & 0 deletions bindings/ruby/spec/ffi_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################

require 'spec_helper'

describe ::Malamute::FFI do
it { should be }
end

################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
8 changes: 8 additions & 0 deletions bindings/ruby/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

require 'malamute/ffi'

RSpec.configure do |c|
# Enable 'should' syntax
c.expect_with(:rspec) { |c| c.syntax = [:should, :expect] }
c.mock_with(:rspec) { |c| c.syntax = [:should, :expect] }
end
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,10 @@ AM_CONDITIONAL([WITH_DRAFTS], [test x$with_drafts != xno])
if test "x$with_drafts" = "xyes"; then
AC_MSG_NOTICE([building draft, stable, and legacy API])
AC_DEFINE(WITH_DRAFTS, 1, [Build and install draft classes and methods.])
AC_SUBST(pkg_config_defines, "-DWITH_DRAFTS=1")
else
AC_MSG_NOTICE([building stable and legacy API (no drafts)])
AC_SUBST(pkg_config_defines, "")
fi

# Specify output files
Expand Down
3 changes: 3 additions & 0 deletions packaging/debian/Malamute-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
debian/tmp/usr/include/*
debian/tmp/usr/lib/*/libmlm.so
debian/tmp/usr/lib/*/pkgconfig/libmlm.pc
7 changes: 7 additions & 0 deletions packaging/debian/Malamute.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
debian/tmp/usr/bin/malamute
debian/tmp/usr/bin/mshell
debian/tmp/usr/bin/mlm_tutorial
debian/tmp/usr/bin/mlm_perftest
debian/tmp/usr/lib/systemd/system/malamute*.service


1 change: 1 addition & 0 deletions packaging/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
60 changes: 60 additions & 0 deletions packaging/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#
# malamute - ZeroMQ Message Broker
#
# Copyright (c) the Contributors as noted in the AUTHORS file.
# This file is part of the Malamute Project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

Source: Malamute
Section: net
Priority: optional
Maintainer: John Doe <John.Doe@example.com>
Uploaders: John Doe <John.Doe@example.com>
Standards-Version: 3.9.5
Build-Depends: bison, debhelper (>= 8),
pkg-config,
automake,
autoconf,
libtool,
libsodium-dev,
libzmq4-dev,
libczmq-dev,
dh-autoreconf,
systemd

Package: libmlm0
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: malamute
This package contains shared library for malamute: zeromq message broker

Package: Malamute-dev
Architecture: all
Section: libdevel
Depends:
libsodium-dev,
libzmq4-dev,
libczmq-dev,
libmlm0 (= ${binary:Version})
Description: development files for malamute
This package contains development files for malamute: zeromq message broker

Package: Malamute
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: zeromq message broker
Main package for malamute: zeromq message broker

Package: malamute-dbg
Architecture: any
Section: debug
Priority: extra
Depends:
Malamute (= ${binary:Version}),
${misc:Depends}
Description: debugging symbols for malamute
This package contains the debugging symbols for malamute : zeromq message broker.

1 change: 1 addition & 0 deletions packaging/debian/libmlm0.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian/tmp/usr/lib/*/libmlm.so.*
21 changes: 21 additions & 0 deletions packaging/debian/malamute.dsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Format: 1.0
Source: Malamute
Version: 0.0.0-1
Binary: libmlm0, Malamute-dev
Architecture: any all
Maintainer: John Doe <John.Doe@example.com>
Standards-Version: 3.9.5
Build-Depends: bison, debhelper (>= 8),
pkg-config,
automake,
autoconf,
libtool,
libsodium-dev,
libzmq4-dev,
libczmq-dev,
dh-autoreconf

Package-List:
libmlm0 deb net optional arch=any
Malamute-dev deb libdevel optional arch=any

17 changes: 17 additions & 0 deletions packaging/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/make -f
# -*- makefile -*-

override_dh_strip:
dh_strip --dbg-package=malamute-dbg

override_dh_auto_test:
echo "Skipped for now"

override_dh_auto_configure:
dh_auto_configure -- --with-systemd

%:
dh $@ --with=autoreconf

.PHONY: override_dh_strip override_dh_auto_test override_dh_auto_configure

Loading

0 comments on commit fb7369e

Please sign in to comment.