Skip to content

Commit dd1767a

Browse files
committed
Regenerate from zproject
1 parent f2fd725 commit dd1767a

File tree

16 files changed

+206
-51
lines changed

16 files changed

+206
-51
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ set(OPTIONAL_LIBRARIES_STATIC)
126126
########################################################################
127127
# LIBZMQ dependency
128128
########################################################################
129-
find_package(libzmq REQUIRED)
129+
IF (NOT libzmq_FOUND)
130+
find_package(libzmq REQUIRED)
131+
ENDIF(NOT libzmq_FOUND)
130132
IF (libzmq_FOUND)
131133
include_directories(${libzmq_INCLUDE_DIRS})
132134
list(APPEND MORE_LIBRARIES ${libzmq_LIBRARIES})
@@ -143,7 +145,9 @@ ENDIF (libzmq_FOUND)
143145
########################################################################
144146
# CZMQ dependency
145147
########################################################################
146-
find_package(czmq REQUIRED)
148+
IF (NOT czmq_FOUND)
149+
find_package(czmq REQUIRED)
150+
ENDIF(NOT czmq_FOUND)
147151
IF (czmq_FOUND)
148152
include_directories(${czmq_INCLUDE_DIRS})
149153
list(APPEND MORE_LIBRARIES ${czmq_LIBRARIES})

bindings/jni/build.gradle

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,24 @@
55
################################################################################
66
*/
77

8+
buildscript {
9+
configurations.configureEach {
10+
resolutionStrategy {
11+
force 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'
12+
}
13+
exclude group: 'xerces', module: 'xercesImpl'
14+
}
15+
}
16+
817
plugins {
918
id 'java'
1019
id 'maven-publish'
11-
id 'com.jfrog.artifactory' version '4.21.0'
20+
id 'com.jfrog.artifactory' version '5.2.3'
1221
id 'com.jfrog.bintray' version '1.8.5'
13-
id 'com.google.osdetector' version '1.7.0'
22+
id 'com.google.osdetector' version '1.7.3'
1423
}
1524

16-
wrapper.gradleVersion = '7.5.1'
25+
wrapper.gradleVersion = '8.9'
1726

1827
subprojects {
1928
apply plugin: 'java'
@@ -47,7 +56,6 @@ artifactory {
4756
repoKey = 'oss-snapshot-local'
4857
username = System.getenv('ARTIFACTORY_USERNAME')
4958
password = System.getenv('ARTIFACTORY_PASSWORD')
50-
maven = true
5159
}
5260
}
5361
}

bindings/jni/zyre-jni-all/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ artifactoryPublish {
4747
publications ('mavenJava')
4848
}
4949

50-
5150
bintray {
5251
user = System.getenv('BINTRAY_USER')
5352
key = System.getenv('BINTRAY_KEY')

bindings/jni/zyre-jni-native/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies {
1313
// ------------------------------------------------------------------
1414
// Build section
1515

16-
task copyLibs(type: Copy) {
16+
tasks.register('copyLibs', Copy) {
1717
def libraryPaths = []
1818
if (project.hasProperty('buildPrefix')) {
1919
if (osdetector.os == 'windows') {
@@ -24,7 +24,7 @@ task copyLibs(type: Copy) {
2424
}
2525

2626
def javaLibraryPaths = System.getProperty('java.library.path').split(File.pathSeparator).toList()
27-
libraryPaths.addAll (javaLibraryPaths)
27+
libraryPaths.addAll(javaLibraryPaths)
2828

2929
libraryPaths.add('/usr/local/lib')
3030
if (osdetector.os == 'windows') {
@@ -54,7 +54,7 @@ task copyLibs(type: Copy) {
5454
duplicatesStrategy = oldStrategy
5555
}
5656

57-
jar.baseName = "zyre-jni-${osdetector.classifier}"
57+
jar.archiveBaseName = "zyre-jni-${osdetector.classifier}"
5858
jar.dependsOn copyLibs
5959

6060
jar {

bindings/jni/zyre-jni/build.gradle

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ ext.hasNotEmptyProperty = { propertyName ->
1212

1313
dependencies {
1414
implementation "org.zeromq.czmq:czmq-jni:$jni_dependencies_version"
15-
implementation 'org.scijava:native-lib-loader:2.4.0'
16-
testImplementation 'junit:junit:4.12'
17-
testImplementation 'org.hamcrest:hamcrest-all:1.3'
15+
implementation 'org.scijava:native-lib-loader:2.5.0'
16+
testImplementation 'junit:junit:4.13.2'
17+
testImplementation 'org.hamcrest:hamcrest:2.2'
1818
}
1919

2020
// ------------------------------------------------------------------
2121
// Build section
2222

23-
task generateJniHeaders(type: Exec, dependsOn: 'classes') {
23+
tasks.register('generateJniHeaders', Exec) {
24+
dependsOn 'classes'
2425
def classpath = sourceSets.main.output.classesDirs
2526
def appclasspath = configurations.runtimeClasspath.files*.getAbsolutePath().join(File.pathSeparator)
2627
def nativeIncludes = 'src/native/include'
@@ -34,14 +35,14 @@ task generateJniHeaders(type: Exec, dependsOn: 'classes') {
3435
commandLine("javac", "-h", "$nativeIncludes", "-classpath", "$classpath${File.pathSeparator}$appclasspath", *jniClasses, *utilityClasses)
3536
}
3637

37-
tasks.withType(Test) {
38+
tasks.withType(Test).configureEach {
3839
def defaultJavaLibraryPath = System.getProperty("java.library.path")
3940
if (osdetector.os == 'windows') {
40-
def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix\\bin;$project.buildPrefix\\lib" : ''
41-
extraJavaLibraryPath = extraJavaLibraryPath.replace("/", "\\")
42-
systemProperty "java.library.path", "${projectDir}\\build\\Release${File.pathSeparator}" +
43-
"${extraJavaLibraryPath}${File.pathSeparator}" +
44-
"${defaultJavaLibraryPath}"
41+
def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix\\bin;$project.buildPrefix\\lib" : ''
42+
extraJavaLibraryPath = extraJavaLibraryPath.replace("/", "\\")
43+
systemProperty "java.library.path", "${projectDir}\\build\\Release${File.pathSeparator}" +
44+
"${extraJavaLibraryPath}${File.pathSeparator}" +
45+
"${defaultJavaLibraryPath}"
4546
} else {
4647
def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix/lib" : ''
4748
systemProperty "java.library.path", "${projectDir}/build${File.pathSeparator}" +
@@ -52,22 +53,24 @@ tasks.withType(Test) {
5253
}
5354
}
5455

55-
task initCMake(type: Exec, dependsOn: 'generateJniHeaders') {
56-
workingDir 'build'
56+
tasks.register('initCMake', Exec) {
57+
dependsOn 'generateJniHeaders'
58+
workingDir 'build'
5759
def prefixPath = hasNotEmptyProperty('buildPrefix') ? "-DCMAKE_PREFIX_PATH=$project.buildPrefix" : ''
5860
commandLine 'cmake', "$prefixPath", '..'
5961
}
6062

61-
task buildNative(type: Exec, dependsOn: 'initCMake') {
63+
tasks.register('buildNative', Exec) {
64+
dependsOn 'initCMake'
6265
if (osdetector.os == 'windows') {
6366
commandLine 'cmake',
64-
'--build', 'build',
67+
'--build', 'build',
6568
'--config', 'Release',
6669
'--target', 'zyrejni',
67-
'--', '-verbosity:Minimal', '-maxcpucount'
70+
'--', '-verbosity:Minimal', '-maxcpucount'
6871
} else {
6972
commandLine 'cmake',
70-
'--build', 'build'
73+
'--build', 'build'
7174
}
7275
}
7376

@@ -77,13 +80,15 @@ test.dependsOn buildNative
7780
// ------------------------------------------------------------------
7881
// Install and Publish section
7982

80-
task sourcesJar(type: Jar, dependsOn: 'classes') {
81-
classifier = 'sources'
83+
tasks.register('sourcesJar', Jar) {
84+
dependsOn 'classes'
85+
archiveClassifier = 'sources'
8286
from sourceSets.main.allSource
8387
}
8488

85-
task javadocJar(type: Jar, dependsOn: 'javadoc') {
86-
classifier = 'javadoc'
89+
tasks.register('javadocJar', Jar) {
90+
dependsOn 'javadoc'
91+
archiveClassifier = 'javadoc'
8792
from javadoc.destinationDir
8893
}
8994

@@ -119,7 +124,6 @@ artifactoryPublish {
119124
publications ('mavenJava')
120125
}
121126

122-
123127
bintray {
124128
user = System.getenv('BINTRAY_USER')
125129
key = System.getenv('BINTRAY_KEY')

bindings/python_cffi/zyre_cffi/cdefs.py

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,11 @@
891891
zlist_t *
892892
zdir_list (zdir_t *self);
893893
894+
// Returns a sorted list of char*; Each entry in the list is a path of a file
895+
// or directory contained in self.
896+
zlist_t *
897+
zdir_list_paths (zdir_t *self);
898+
894899
// Remove directory, optionally including all files that it contains, at
895900
// all levels. If force is false, will only remove the directory if empty.
896901
// If force is true, will remove all files and all subdirectories.
@@ -1635,6 +1640,10 @@
16351640
const char *
16361641
ziflist_netmask (ziflist_t *self);
16371642
1643+
// Return the current interface MAC address as a printable string
1644+
const char *
1645+
ziflist_mac (ziflist_t *self);
1646+
16381647
// Return the list of interfaces.
16391648
void
16401649
ziflist_print (ziflist_t *self);
@@ -1694,13 +1703,13 @@
16941703
zlist_item (zlist_t *self);
16951704
16961705
// Append an item to the end of the list, return 0 if OK or -1 if this
1697-
// failed for some reason (out of memory). Note that if a duplicator has
1706+
// failed for some reason (invalid input). Note that if a duplicator has
16981707
// been set, this method will also duplicate the item.
16991708
int
17001709
zlist_append (zlist_t *self, void *item);
17011710
17021711
// Push an item to the start of the list, return 0 if OK or -1 if this
1703-
// failed for some reason (out of memory). Note that if a duplicator has
1712+
// failed for some reason (invalid input). Note that if a duplicator has
17041713
// been set, this method will also duplicate the item.
17051714
int
17061715
zlist_push (zlist_t *self, void *item);
@@ -1791,13 +1800,13 @@
17911800
17921801
// Add an item to the head of the list. Calls the item duplicator, if any,
17931802
// on the item. Resets cursor to list head. Returns an item handle on
1794-
// success, NULL if memory was exhausted.
1803+
// success.
17951804
void *
17961805
zlistx_add_start (zlistx_t *self, void *item);
17971806
17981807
// Add an item to the tail of the list. Calls the item duplicator, if any,
17991808
// on the item. Resets cursor to list head. Returns an item handle on
1800-
// success, NULL if memory was exhausted.
1809+
// success.
18011810
void *
18021811
zlistx_add_end (zlistx_t *self, void *item);
18031812
@@ -1902,8 +1911,7 @@
19021911
// duplicator, if any, on the item. If low_value is true, starts searching
19031912
// from the start of the list, otherwise searches from the end. Use the item
19041913
// comparator, if any, to find where to place the new node. Returns a handle
1905-
// to the new node, or NULL if memory was exhausted. Resets the cursor to the
1906-
// list head.
1914+
// to the new node. Resets the cursor to the list head.
19071915
void *
19081916
zlistx_insert (zlistx_t *self, void *item, bool low_value);
19091917
@@ -2360,19 +2368,19 @@
23602368
23612369
// Connects process stdin with a readable ('>', connect) zeromq socket. If
23622370
// socket argument is NULL, zproc creates own managed pair of inproc
2363-
// sockets. The writable one is then accessbile via zproc_stdin method.
2371+
// sockets. The writable one is then accessible via zproc_stdin method.
23642372
void
23652373
zproc_set_stdin (zproc_t *self, void *socket);
23662374
23672375
// Connects process stdout with a writable ('@', bind) zeromq socket. If
23682376
// socket argument is NULL, zproc creates own managed pair of inproc
2369-
// sockets. The readable one is then accessbile via zproc_stdout method.
2377+
// sockets. The readable one is then accessible via zproc_stdout method.
23702378
void
23712379
zproc_set_stdout (zproc_t *self, void *socket);
23722380
23732381
// Connects process stderr with a writable ('@', bind) zeromq socket. If
23742382
// socket argument is NULL, zproc creates own managed pair of inproc
2375-
// sockets. The readable one is then accessbile via zproc_stderr method.
2383+
// sockets. The readable one is then accessible via zproc_stderr method.
23762384
void
23772385
zproc_set_stderr (zproc_t *self, void *socket);
23782386
@@ -4649,6 +4657,11 @@
46494657
zosc_t *
46504658
zosc_frommem (char *data, size_t size);
46514659
4660+
// Create a new zosc message from a string. This the same syntax as
4661+
// zosc_create but written as a single line string.
4662+
zosc_t *
4663+
zosc_fromstring (const char *oscstring);
4664+
46524665
// Create a new zosc message from the given format and arguments.
46534666
// The format type tags are as follows:
46544667
// i - 32bit integer
@@ -4752,6 +4765,10 @@
47524765
zosc_t *
47534766
zosc_unpack (zframe_t *frame);
47544767
4768+
// Return a string describing the the OSC message. The returned string must be freed by the caller.
4769+
char *
4770+
zosc_dump (zosc_t *self);
4771+
47554772
// Dump OSC message to stdout, for debugging and tracing.
47564773
void
47574774
zosc_print (zosc_t *self);

bindings/qt/src/qzlist.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void * QZlist::item ()
8383

8484
///
8585
// Append an item to the end of the list, return 0 if OK or -1 if this
86-
// failed for some reason (out of memory). Note that if a duplicator has
86+
// failed for some reason (invalid input). Note that if a duplicator has
8787
// been set, this method will also duplicate the item.
8888
int QZlist::append (void *item)
8989
{
@@ -93,7 +93,7 @@ int QZlist::append (void *item)
9393

9494
///
9595
// Push an item to the start of the list, return 0 if OK or -1 if this
96-
// failed for some reason (out of memory). Note that if a duplicator has
96+
// failed for some reason (invalid input). Note that if a duplicator has
9797
// been set, this method will also duplicate the item.
9898
int QZlist::push (void *item)
9999
{

bindings/qt/src/qzlist.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ class QT_ZYRE_EXPORT QZlist : public QObject
4646
void * item ();
4747

4848
// Append an item to the end of the list, return 0 if OK or -1 if this
49-
// failed for some reason (out of memory). Note that if a duplicator has
49+
// failed for some reason (invalid input). Note that if a duplicator has
5050
// been set, this method will also duplicate the item.
5151
int append (void *item);
5252

5353
// Push an item to the start of the list, return 0 if OK or -1 if this
54-
// failed for some reason (out of memory). Note that if a duplicator has
54+
// failed for some reason (invalid input). Note that if a duplicator has
5555
// been set, this method will also duplicate the item.
5656
int push (void *item);
5757

bindings/ruby/lib/zyre/ffi/event.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ def initialize(ptr, finalize = true)
3333
# @param ptr [::FFI::Pointer]
3434
# @return [Proc]
3535
def self.create_finalizer_for(ptr)
36+
ptr_ptr = ::FFI::MemoryPointer.new :pointer
37+
3638
Proc.new do
37-
ptr_ptr = ::FFI::MemoryPointer.new :pointer
3839
ptr_ptr.write_pointer ptr
3940
::Zyre::FFI.zyre_event_destroy ptr_ptr
4041
end

bindings/ruby/lib/zyre/ffi/zyre.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ def initialize(ptr, finalize = true)
3333
# @param ptr [::FFI::Pointer]
3434
# @return [Proc]
3535
def self.create_finalizer_for(ptr)
36+
ptr_ptr = ::FFI::MemoryPointer.new :pointer
37+
3638
Proc.new do
37-
ptr_ptr = ::FFI::MemoryPointer.new :pointer
3839
ptr_ptr.write_pointer ptr
3940
::Zyre::FFI.zyre_destroy ptr_ptr
4041
end

builds/ios/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# iOS Build
2+
3+
## Prerequisites
4+
5+
The build script require to be run on MacOs with XCode and the developer SDK installed.
6+
7+
This project is tested against SDK 15.5.
8+
9+
If you want to specify another version you need to set the environment variable below:
10+
11+
export SDK_VERSION=15.5
12+
13+
You can list all the versions of the SDK installed on your Mac using the command below:
14+
15+
xcodebuild -showsdks
16+
17+
## Build
18+
19+
In the ios directory, run:
20+
./build.sh [ iPhoneOS armv7 | iPhoneOS armv7s | iPhoneOS arm64 | iPhoneSimulator i386 | iPhoneSimulator x86_64 ]
21+
22+
Note that certain target architectures may or may not be available depending on your target SDK Version. For example, iOS 10 is the maximum deployment target for 32-bit targets.
23+
24+
[This website](https://docs.elementscompiler.com/Platforms/Cocoa/CpuArchitectures/) can help you choose which architecture you need to target depending on your SDK version.

0 commit comments

Comments
 (0)