Skip to content

Commit 3ad28b2

Browse files
committed
Problem: out of date with zproject
Solution: regenerate
1 parent 2891ffa commit 3ad28b2

28 files changed

+403
-82
lines changed

.editorconfig

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This is a skeleton created by zproject.
2+
# You can add hand-written code here.
3+
# See http://editorconfig.org/ and https://github.com/editorconfig/ for
4+
# details about the format and links to plugins for IDEs and editors which
5+
# do not yet support this configuration out of the box - but easily can.
6+
7+
# This is a top-level setting for project sources under this directory
8+
root = true
9+
10+
[*]
11+
end_of_line = lf
12+
insert_final_newline = true
13+
indent_style = space
14+
indent_size = 4
15+
trim_trailing_whitespace = true
16+
charset = utf-8
17+
18+
[*.am]
19+
indent_style = tab

CMakeLists.txt

+32-2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ if (MSVC)
6666
set(MORE_LIBRARIES ws2_32 Rpcrt4 Iphlpapi)
6767
endif()
6868

69+
# specific case of windows UWP
70+
if( ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore" AND ${CMAKE_SYSTEM_VERSION} STREQUAL "10.0")
71+
ADD_DEFINITIONS(-DZMQ_HAVE_WINDOWS_UWP)
72+
ADD_DEFINITIONS(-D_WIN32_WINNT=_WIN32_WINNT_WIN10)
73+
endif()
74+
75+
6976
# required libraries for mingw
7077
if (MINGW)
7178
set(MORE_LIBRARIES -lws2_32 -lrpcrt4 -liphlpapi)
@@ -162,7 +169,10 @@ set_target_properties(glar
162169
PROPERTIES DEFINE_SYMBOL "GLAR_EXPORTS"
163170
)
164171
set_target_properties (glar
165-
PROPERTIES SOVERSION "0.0.0"
172+
PROPERTIES SOVERSION "0"
173+
)
174+
set_target_properties (glar
175+
PROPERTIES VERSION "0.0.1"
166176
)
167177
target_link_libraries(glar
168178
${ZEROMQ_LIBRARIES} ${MORE_LIBRARIES}
@@ -177,7 +187,7 @@ install(TARGETS glar
177187
########################################################################
178188
# pkgconfig
179189
########################################################################
180-
set (VERSION "0.0.0")
190+
set (VERSION "0.0.1")
181191
set (prefix "${CMAKE_INSTALL_PREFIX}")
182192
set (exec_prefix "\${prefix}")
183193
set (libdir "\${prefix}/lib${LIB_SUFFIX}")
@@ -256,6 +266,22 @@ IF (ENABLE_DRAFTS)
256266
)
257267
ENDIF (ENABLE_DRAFTS)
258268

269+
270+
add_custom_target(
271+
copy-selftest-ro ALL
272+
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/src/selftest-ro ${CMAKE_BINARY_DIR}/src/selftest-ro
273+
)
274+
275+
add_custom_target(
276+
make-selftest-rw ALL
277+
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/src/selftest-rw
278+
)
279+
280+
set_directory_properties(
281+
PROPERTIES
282+
ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_BINARY_DIR}/src/selftest-ro;${CMAKE_BINARY_DIR}/src/selftest-rw"
283+
)
284+
259285
foreach(TEST_CLASS ${TEST_CLASSES})
260286
add_test(
261287
NAME ${TEST_CLASS}
@@ -265,6 +291,10 @@ foreach(TEST_CLASS ${TEST_CLASSES})
265291
${TEST_CLASS}
266292
PROPERTIES TIMEOUT ${CLASSTEST_TIMEOUT}
267293
)
294+
set_tests_properties(
295+
${TEST_CLASS}
296+
PROPERTIES DEPENDS "copy-selftest-ro;make-selftest-rw"
297+
)
268298
endforeach(TEST_CLASS)
269299

270300
include(CTest)

Makefile.am

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ check_PROGRAMS =
2929
noinst_LTLIBRARIES =
3030
TESTS =
3131
# Prepare variables that can be populated (appended) in generated Makefiles or
32-
# manually maintained src/Makemodules-local.am
32+
# manually maintained src/Makemodule-local.am
3333
EXTRA_DIST =
3434
CLEANFILES =
3535
DISTCLEANFILES =
@@ -48,6 +48,8 @@ EXTRA_DIST += \
4848
README.md \
4949
src/glar_classes.h
5050

51+
# NOTE: this "include" syntax is not a "make" but an "autotools" keyword,
52+
# see https://www.gnu.org/software/automake/manual/html_node/Include.html
5153
include $(srcdir)/src/Makemodule.am
5254
include $(srcdir)/src/Makemodule-local.am # Optional project-local hook
5355

autogen.sh

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
# Script to generate all required files from fresh git checkout.
88

9+
if [ ! -f src/Makemodule-local.am ] ; then
10+
echo "autogen.sh: generating a dummy src/Makemodule-local.am to fulfill dependencies." 1>&2
11+
touch src/Makemodule-local.am
12+
fi
13+
914
# Debian and Ubuntu do not shipt libtool anymore, but OSX does not ship libtoolize.
1015
command -v libtoolize >/dev/null 2>&1
1116
if [ $? -ne 0 ]; then

ci_build.sh

+22-8
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ case "$CI_TRACE" in
2525
set -x ;;
2626
esac
2727

28-
if [ "$BUILD_TYPE" == "default" ] || [ "$BUILD_TYPE" == "default-Werror" ] || [ "$BUILD_TYPE" == "valgrind" ]; then
28+
case "$BUILD_TYPE" in
29+
default|default-Werror|default-with-docs|valgrind)
2930
LANG=C
3031
LC_ALL=C
3132
export LANG LC_ALL
@@ -44,12 +45,12 @@ if [ "$BUILD_TYPE" == "default" ] || [ "$BUILD_TYPE" == "default-Werror" ] || [
4445
if which ccache && ls -la /usr/lib/ccache ; then
4546
HAVE_CCACHE=yes
4647
fi
48+
mkdir -p "${CCACHE_DIR}" || HAVE_CCACHE=no
4749

4850
if [ "$HAVE_CCACHE" = yes ] && [ -d "$CCACHE_DIR" ]; then
4951
echo "CCache stats before build:"
5052
ccache -s || true
5153
fi
52-
mkdir -p "${HOME}/.ccache"
5354

5455
CONFIG_OPTS=()
5556
COMMON_CFLAGS=""
@@ -111,7 +112,6 @@ if [ "$BUILD_TYPE" == "default" ] || [ "$BUILD_TYPE" == "default-Werror" ] || [
111112
CONFIG_OPTS+=("LDFLAGS=-L${BUILD_PREFIX}/lib")
112113
CONFIG_OPTS+=("PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig")
113114
CONFIG_OPTS+=("--prefix=${BUILD_PREFIX}")
114-
CONFIG_OPTS+=("--with-docs=no")
115115
if [ -z "${CI_CONFIG_QUIET-}" ] || [ "${CI_CONFIG_QUIET-}" = yes ] || [ "${CI_CONFIG_QUIET-}" = true ]; then
116116
CONFIG_OPTS+=("--quiet")
117117
fi
@@ -167,6 +167,9 @@ if [ "$BUILD_TYPE" == "default" ] || [ "$BUILD_TYPE" == "default-Werror" ] || [
167167
CONFIG_OPTS+=("CPP=${CPP}")
168168
fi
169169

170+
CONFIG_OPTS_COMMON=$CONFIG_OPTS
171+
CONFIG_OPTS+=("--with-docs=no")
172+
170173
# Clone and build dependencies, if not yet installed to Travis env as DEBs
171174
# or MacOS packages; other OSes are not currently supported by Travis cloud
172175
[ -z "$CI_TIME" ] || echo "`date`: Starting build of dependencies (if any)..."
@@ -272,14 +275,23 @@ if [ "$BUILD_TYPE" == "default" ] || [ "$BUILD_TYPE" == "default-Werror" ] || [
272275
echo "`date`: INFO: Starting build of currently tested project with DRAFT APIs..."
273276
CCACHE_BASEDIR=${PWD}
274277
export CCACHE_BASEDIR
278+
if [ "$BUILD_TYPE" = "default-with-docs" ]; then
279+
CONFIG_OPTS=$CONFIG_OPTS_COMMON
280+
CONFIG_OPTS+=("--with-docs=yes")
281+
fi
282+
if [ -n "$ADDRESS_SANITIZER" ] && [ "$ADDRESS_SANITIZER" == "enabled" ]; then
283+
CONFIG_OPTS+=("--enable-address-sanitizer=yes")
284+
fi
275285
# Only use --enable-Werror on projects that are expected to have it
276286
# (and it is not our duty to check prerequisite projects anyway)
277287
CONFIG_OPTS+=("${CONFIG_OPT_WERROR}")
278288
$CI_TIME ./autogen.sh 2> /dev/null
279289
$CI_TIME ./configure --enable-drafts=yes "${CONFIG_OPTS[@]}"
280290
if [ "$BUILD_TYPE" == "valgrind" ] ; then
281291
# Build and check this project
282-
$CI_TIME make VERBOSE=1 memcheck
292+
$CI_TIME make VERBOSE=1 memcheck && exit
293+
echo "Re-running failed ($?) memcheck with greater verbosity" >&2
294+
$CI_TIME make VERBOSE=1 memcheck-verbose
283295
exit $?
284296
fi
285297
$CI_TIME make VERBOSE=1 all
@@ -323,9 +335,11 @@ if [ "$BUILD_TYPE" == "default" ] || [ "$BUILD_TYPE" == "default-Werror" ] || [
323335
echo "CCache stats after build:"
324336
ccache -s
325337
fi
326-
327-
elif [ "$BUILD_TYPE" == "bindings" ]; then
338+
;;
339+
bindings)
328340
pushd "./bindings/${BINDING}" && ./ci_build.sh
329-
else
341+
;;
342+
*)
330343
pushd "./builds/${BUILD_TYPE}" && REPO_DIR="$(dirs -l +1)" ./ci_build.sh
331-
fi
344+
;;
345+
esac

ci_deploy.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ if [ "$BUILD_TYPE" == "default" ]; then
2222
cd -
2323
elif [ "$BUILD_TYPE" == "bindings" ] && [ "$BINDING" == "jni" ]; then
2424
( cd bindings/jni && TERM=dumb PKG_CONFIG_PATH=/tmp/lib/pkgconfig ./gradlew clean bintrayUpload )
25-
cp bindings/jni/android/glar150-android.jar glar150-android-0.0.0.jar
26-
export GLAR150_DEPLOYMENT=glar150-android-0.0.0.jar
25+
cp bindings/jni/android/glar150-android.jar glar150-android-0.0.1.jar
26+
export GLAR150_DEPLOYMENT=glar150-android-0.0.1.jar
2727
else
2828
export GLAR150_DEPLOYMENT=""
2929
fi

ci_deploy_obs.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
################################################################################
4+
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
5+
# READ THE ZPROJECT/README.MD FOR INFORMATION ABOUT MAKING PERMANENT CHANGES. #
6+
################################################################################
7+
8+
# do NOT set -x or it will log the secret tokens!
9+
set -e
10+
11+
if [ "$BUILD_TYPE" == "default" -a -n "${GH_TOKEN}" -a -n "${OBS_STABLE_TOKEN}" -a -n "${OBS_DRAFT_TOKEN}" ]; then
12+
# Trigger source run on new tag on OBS. See travis.yml for token instructions.
13+
# We have to create a temporary branch from the tag and delete it, as it is
14+
# not possible to edit files on OBS with secure tokens, and it is not
15+
# possible to dynamically fetch the latest git tag either.
16+
TAG_SHA=$(curl -s -H "Authorization: token ${GH_TOKEN}" -X GET https://api.github.com/repos/zmqers/glar150/git/refs/tags/${TRAVIS_TAG} | grep -o -P '(?<=sha":\s).*(?=,)')
17+
curl -H "Authorization: token ${GH_TOKEN}" -X POST --data "{\"ref\":\"refs/heads/tmp_obs_release_branch\",\"sha\":${TAG_SHA}}" https://api.github.com/repos/zmqers/glar150/git/refs
18+
curl -H "Authorization: Token ${OBS_STABLE_TOKEN}" -X POST https://api.opensuse.org/trigger/runservice
19+
curl -H "Authorization: Token ${OBS_DRAFT_TOKEN}" -X POST https://api.opensuse.org/trigger/runservice
20+
# give some time for the git clone to happen before deleting the temp branch
21+
sleep 60
22+
curl -H "Authorization: token ${GH_TOKEN}" -X DELETE https://api.github.com/repos/zmqers/glar150/git/refs/heads/tmp_obs_release_branch
23+
fi

configure.ac

+30-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Process this file with autoconf to produce a configure script.
88
AC_PREREQ(2.61)
99
#
10-
AC_INIT([glar150],[0.0.0],[[email protected]])
10+
AC_INIT([glar150],[0.0.1],[[email protected]])
1111

1212
AC_CONFIG_AUX_DIR(config)
1313
AC_CONFIG_MACRO_DIR(config)
@@ -52,7 +52,11 @@ AC_PROG_SED
5252
AC_PROG_AWK
5353
PKG_PROG_PKG_CONFIG
5454

55+
# Check endianess of the system
56+
AC_C_BIGENDIAN
57+
5558
# Code coverage
59+
AC_MSG_CHECKING([whether to enable GCov])
5660
AC_ARG_WITH(gcov, [AS_HELP_STRING([--with-gcov=yes/no],
5761
[With GCC Code Coverage reporting])],
5862
[GLAR_GCOV="$withval"])
@@ -64,8 +68,27 @@ if test "x${GLAR_GCOV}" == "xyes"; then
6468
CFLAGS="${CFLAGS} ${GLAR_ORIG_CFLAGS}"
6569
fi
6670
AM_CONDITIONAL(WITH_GCOV, true)
71+
AC_MSG_RESULT([yes])
6772
else
6873
AM_CONDITIONAL(WITH_GCOV, false)
74+
AC_MSG_RESULT([no])
75+
fi
76+
77+
# Memory mis-use detection
78+
AC_MSG_CHECKING([whether to enable ASan])
79+
AC_ARG_ENABLE(address-sanitizer, [AS_HELP_STRING([--enable-address-sanitizer=yes/no],
80+
[Build with GCC Address Sanitizer instrumentation])],
81+
[GLAR_ASAN="$enableval"])
82+
83+
if test "x${GLAR_ASAN}" == "xyes"; then
84+
CFLAGS="${CFLAGS} -fsanitize=address"
85+
CXXFLAGS="${CXXFLAGS} -fsanitize=address"
86+
87+
AM_CONDITIONAL(ENABLE_ASAN, true)
88+
AC_MSG_RESULT([yes])
89+
else
90+
AM_CONDITIONAL(ENABLE_ASAN, false)
91+
AC_MSG_RESULT([no])
6992
fi
7093

7194
# Set pkgconfigdir
@@ -458,6 +481,9 @@ case "${host_os}" in
458481
AC_DEFINE(GLAR_HAVE_HPUX, 1, [Have HPUX OS])
459482
;;
460483
*mingw32*)
484+
# Disable format error due to incomplete ANSI C
485+
CFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CFLAGS"
486+
CPPFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CPPFLAGS"
461487
AC_DEFINE(GLAR_HAVE_WINDOWS, 1, [Have Windows OS])
462488
AC_DEFINE(GLAR_HAVE_MINGW32, 1, [Have MinGW32])
463489
AC_CHECK_HEADERS(windows.h)
@@ -467,7 +493,8 @@ case "${host_os}" in
467493
*mingw64*)
468494
# Define on MINGW64 to enable all libeary features
469495
# Disable format error due to incomplete ANSI C
470-
CPPFLAGS="-Wno-error=format -D_XOPEN_SOURCE $CPPFLAGS"
496+
CFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CFLAGS"
497+
CPPFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CPPFLAGS"
471498
AC_DEFINE(GLAR_HAVE_WINDOWS, 1, [Have Windows OS])
472499
AC_DEFINE(GLAR_HAVE_MINGW32, 1, [Have MinGW32])
473500
AC_CHECK_HEADERS(windows.h)
@@ -651,6 +678,7 @@ AM_COND_IF([WITH_SYSTEMD_UNITS],
651678
])],
652679
[])
653680

681+
654682
AC_OUTPUT
655683

656684
# Print configure summary and list make options

doc/asciidoc.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ template::[header-declarations]
4545
<refsect1 id="_resources">
4646
<title>RESOURCES</title>
4747
<simpara>Main web site: <ulink url=""></ulink></simpara>
48-
<simpara>Report bugs to the email &lt;<ulink url="mailto:[email protected]">[email protected]</ulink>&gt;</simpara>
48+
<simpara>Report bugs to the email &lt;<ulink url="mailto:[email protected]">[email protected]</ulink>&gt;</simpara>
4949
</refsect1>
5050
<refsect1 id="_copyright">
5151
<title>COPYRIGHT</title>

include/glar_library.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/* =========================================================================
22
glar150 - generated layer of public API
33
4-
Copyright (c) the Contributors as noted in the AUTHORS file.
5-
This file is part of the Glar150 Project.
6-
4+
Copyright (c) the Contributors as noted in the AUTHORS file.
5+
This file is part of the Glar150 Project.
6+
77
This Source Code Form is subject to the terms of the Mozilla Public
88
License, v. 2.0. If a copy of the MPL was not distributed with this
9-
file, You can obtain one at http://mozilla.org/MPL/2.0/.
9+
file, You can obtain one at http://mozilla.org/MPL/2.0/.
1010
1111
################################################################################
1212
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
@@ -26,7 +26,7 @@
2626
// GLAR version macros for compile-time API detection
2727
#define GLAR_VERSION_MAJOR 0
2828
#define GLAR_VERSION_MINOR 0
29-
#define GLAR_VERSION_PATCH 0
29+
#define GLAR_VERSION_PATCH 1
3030

3131
#define GLAR_MAKE_VERSION(major, minor, patch) \
3232
((major) * 10000 + (minor) * 100 + (patch))

packaging/debian/changelog

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
glar150 (0.0.0) UNRELEASED; urgency=low
1+
glar150 (0.0.1) UNRELEASED; urgency=low
22

33
* Initial packaging.
44

5-
-- glar150 Developers <[email protected]> Wed, 31 Dec 2014 00:00:00 +0000
5+
-- glar150 Developers <[email protected]> Wed, 31 Dec 2014 00:00:00 +0000

packaging/debian/compat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9
1+
10

0 commit comments

Comments
 (0)