Index: Makefile =================================================================== --- Makefile (revision 373528) +++ Makefile (working copy) @@ -4,7 +4,7 @@ PORTNAME= galera PORTVERSION= 25.3.5 DISTVERSIONSUFFIX= -src -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= databases MASTER_SITES= https://launchpadlibrarian.net/170877450/ @@ -21,15 +21,16 @@ USES= execinfo python:build scons shebangfix USE_CXXSTD= c++11 +USE_GCC= yes USE_LDCONFIG= yes USE_OPENSSL= yes +LDFLAGS+= -lboost_program_options -lboost_system MAKE_CMD= ${SCONS} -j${MAKE_JOBS_NUMBER} --config=force SHEBANG_FILES= docs/sphinx-* -PLIST_FILES= %%GARB%%bin/garbd \ - lib/libgalera_smm.so \ +PLIST_FILES= lib/libgalera_smm.so \ lib/libgalera.so PORTDOCS= * @@ -51,10 +52,9 @@ DOCSDIR5= ${DOCSDIR}/gcs DOC_FILES5= ChangeLog README doc/*.txt doc/*.odt doc/*.png -OPTIONS_DEFINE= BOOSTPOOL BPOSTATIC DEBUG DOCS GARB TEST +OPTIONS_DEFINE= BOOSTPOOL BPOSTATIC DEBUG DOCS TEST OPTIONS_GROUP= DOCS OPTIONS_GROUP_DOCS= EPUB JSON LATEX PICKLE -OPTIONS_DEFAULT=GARB OPTIONS_SUB= yes BOOSTPOOL_DESC= Use boost pool allocator @@ -61,21 +61,11 @@ BPOSTATIC_DESC= Use static boost_program_options EPUB_DESC= EPUB support PICKLE_DESC= Pickle support -GARB_DESC= Galera Arbitrator -GARB_USE= RC_SUBR=garb +SUB_LIST= LD_LIBRARY_PATH=${LOCALBASE}/lib/${CC}:$$LD_LIBRARY_PATH .include -.if ${OSVERSION} > 1000000 -BUILD_DEPENDS+= asio>=0:${PORTSDIR}/net/asio -RUN_DEPENDS+= asio>=0:${PORTSDIR}/net/asio -SUB_LIST= LD_LIBRARY_PATH=$$LD_LIBRARY_PATH -.else -USE_GCC= yes -SUB_LIST= LD_LIBRARY_PATH=${LOCALBASE}/lib/${CC}:$$LD_LIBRARY_PATH -.endif - .if ${OSVERSION} < 900506 IGNORE= need __WORDSIZE found in FreeBSD 9 .endif @@ -93,19 +83,33 @@ .endif post-patch: - @${REINPLACE_CMD} -e '/-Werror/d' ${WRKSRC}/SConstruct - -.if ${OSVERSION} > 1000000 - @${REINPLACE_CMD} -e '/#\/asio/d' ${WRKSRC}/SConstruct + @${REINPLACE_CMD} -e "/-Werror/d; \ + s|LINKFLAGS = link_arch|& + ' ' + os.environ['LDFLAGS']|" \ + ${WRKSRC}/SConstruct + @${REINPLACE_CMD} -e '/#\/asio/d; s|asio.hpp|boost/&|; \ + s|asio/ssl.hpp|boost/&|' ${WRKSRC}/SConstruct + @${REINPLACE_CMD} -e 's|asio.hpp|boost/&|; s|asio/ssl.hpp|boost/&|' \ + ${WRKSRC}/galera/src/ist.hpp \ + ${WRKSRC}/gcomm/src/asio_protonet.hpp + @${REINPLACE_CMD} -e 's|asio::system_error|::boost::system::system_error|g' \ + ${WRKSRC}/galera/src/ist.cpp \ + ${WRKSRC}/gcomm/src/asio_tcp.cpp \ + ${WRKSRC}/gcomm/src/asio_udp.cpp + @${REINPLACE_CMD} -e 's|asio::error_code|::boost::system::error_code|g' \ + ${WRKSRC}/gcomm/src/asio_protonet.*pp \ + ${WRKSRC}/gcomm/src/asio_tcp.*pp \ + ${WRKSRC}/gcomm/src/asio_udp.*pp + @${REINPLACE_CMD} -e 's|asio::|boost::&|g' \ + ${WRKSRC}/galera/src/ist.*pp \ + ${WRKSRC}/galera/src/ist_proto.hpp \ + ${WRKSRC}/gcomm/src/asio_addr.hpp \ + ${WRKSRC}/gcomm/src/asio_protonet.*pp \ + ${WRKSRC}/gcomm/src/asio_tcp.*pp \ + ${WRKSRC}/gcomm/src/asio_udp.*pp @${REINPLACE_CMD} -e 's|LLONG_MAX|gu::LOG_MAX|' \ ${WRKSRC}/galera/src/monitor.hpp -.endif - -.if ! ${PORT_OPTIONS:MGARB} @${REINPLACE_CMD} -e "s|'galera/SConscript',|'galera/SConscript'])|; \ /'garb\/SConscript'])/d" ${WRKSRC}/SConscript -.endif - @${REINPLACE_CMD} -e "s|'tests', 1|'tests', 0|" ${WRKSRC}/SConstruct .if ! ${PORT_OPTIONS:MTEST} @@ -189,11 +193,6 @@ @(cd ${STAGEDIR}${PREFIX}/lib && ${LN} -sf libgalera_smm.so \ libgalera.so) -.if ${PORT_OPTIONS:MGARB} - ${INSTALL_PROGRAM} ${WRKDIR}/${DISTNAME}/garb/garbd \ - ${STAGEDIR}${PREFIX}/bin/ -.endif - @(cd ${WRKSRC}/docs/build/man/man1 && ${INSTALL_MAN} \ ${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/) @(cd ${WRKSRC}/docs/build/man/man3 && ${RM} _*.3 && ${INSTALL_MAN} \ Index: files/garb.in =================================================================== --- files/garb.in (revision 373528) +++ files/garb.in (working copy) @@ -1,94 +0,0 @@ -#!/bin/sh -# -# garb.sh for rc.d usage (c) 2013 Codership Oy -# $Id$ - -# PROVIDE: garb -# REQUIRE: LOGIN -# KEYWORD: shutdown - -# -# Add the following line to /etc/rc.conf to enable Galera Arbitrator Daemon (garbd): -# garb_enable (bool): Set to "NO" by default. -# Set it to "YES" to enable Galera Arbitrator Daemon. -# garb_galera_nodes (str): A space-separated list of node addresses (address[:port]) in the cluster -# (default empty). -# garb_galera_group (str): Galera cluster name, should be the same as on the rest of the nodes. -# (default empty). -# Optional: -# garb_galera_options (str): Optional Galera internal options string (e.g. SSL settings) -# see http://www.codership.com/wiki/doku.php?id=galera_parameters -# (default empty). -# garb_log_file (str): Log file for garbd (default empty). Optional, by default logs to syslog -# garb_pid_file (str): Custum PID file path and name. -# Default to "/var/run/garb.pid". -# - -. /etc/rc.subr - -name="garb" -rcvar=garb_enable - -load_rc_config $name - -# set defaults -: ${garb_enable="NO"} -: ${garb_galera_nodes=""} -: ${garb_galera_group=""} -: ${garb_galera_options=""} -: ${garb_log_file=""} -: ${garb_pid_file="/var/run/garb.pid"} - -procname="%%PREFIX%%/bin/garbd" -command="/usr/sbin/daemon" -command_args="-c -f -u nobody -p $garb_pid_file $procname" -start_precmd="${name}_prestart" -start_postcmd="${name}_poststart" -stop_precmd="${name}_prestop" -export LD_LIBRARY_PATH=%%LD_LIBRARY_PATH%% - -garb_prestart() -{ - [ "$(id -ur)" != "0" ] && err 4 "root rights are required to start $name" - [ -r "$garb_pid_file" ] && err 0 "$procname is already running with PID $(cat $garb_pid_file)" - [ -x "$procname" ] || err 5 "$procname is not found" - - # check that node addresses are configured - [ -z "$garb_galera_nodes" ] && err 6 "List of garb_galera_nodes is not configured" - [ -z "$garb_galera_group" ] && err 6 "garb_galera_group name is not configured" - - GALERA_PORT=${GALERA_PORT:-4567} - - # Find a working node - for ADDRESS in ${garb_galera_nodes} 0; do - HOST=$(echo $ADDRESS | cut -d \: -f 1) - PORT=$(echo $ADDRESS | cut -d \: -f 2) - PORT=${PORT:-$GALERA_PORT} - nc -z $HOST $PORT >/dev/null 2>&1 && break - done - [ ${ADDRESS} == "0" ] && err 1 "None of the nodes in $garb_galera_nodes is accessible" - - command_args="$command_args -a gcomm://$ADDRESS" - [ -n "$garb_galera_group" ] && command_args="$command_args -g $garb_galera_group" - [ -n "$garb_galera_options" ] && command_args="$command_args -o $garb_galera_options" - [ -n "$garb_log_file" ] && command_args="$command_args -l $garb_log_file" - return 0 -} - -garb_poststart() -{ - local timeout=15 - while [ ! -f "$garb_pid_file" -a $timeout -gt 0 ]; do - timeout=$(( timeout - 1 )) - sleep 1 - done - return 0 -} - -garb_prestop() { - [ "$(id -ur)" != "0" ] && err 4 "root rights are required to stop $name" - [ -r $garb_pid_file ] || err 0 "" - return 0 -} - -run_rc_command "$1" Index: files/patch-SConstruct =================================================================== --- files/patch-SConstruct (revision 0) +++ files/patch-SConstruct (working copy) @@ -0,0 +1,21 @@ +--- ./SConstruct.orig 2014-08-01 16:33:09.000000000 -0400 ++++ ./SConstruct 2014-08-01 16:34:45.000000000 -0400 +@@ -153,7 +153,7 @@ + + # Initialize CPPFLAGS and LIBPATH from environment to get user preferences + env.Replace(CPPFLAGS = os.getenv('CPPFLAGS', '')) +-env.Replace(LIBPATH = [os.getenv('LIBPATH', '')]) ++env.Replace(RPATH = [os.getenv('RPATH', '')]) + + # Set -pthread flag explicitly to make sure that pthreads are + # enabled on all platforms. +@@ -165,6 +165,9 @@ + env.Append(CPPFLAGS = ' -I/usr/local/include ') + if sysname == 'sunos': + env.Replace(SHLINKFLAGS = '-shared ') ++ env.Replace(AR = 'ar') ++ env.Replace(ARFLAGS= 'r') ++ env.Replace(ARCOM = '$AR $ARFLAGS $TARGET $SOURCES') + + # Add paths is extra_sysroot argument was specified + extra_sysroot = ARGUMENTS.get('extra_sysroot', '') Property changes on: files/patch-SConstruct ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-galerautils__src__gu_errno.h =================================================================== --- files/patch-galerautils__src__gu_errno.h (revision 0) +++ files/patch-galerautils__src__gu_errno.h (working copy) @@ -0,0 +1,47 @@ +--- ./galerautils/src/gu_errno.h.orig 2014-07-31 17:55:31.000000000 -0400 ++++ ./galerautils/src/gu_errno.h 2014-07-31 17:56:57.000000000 -0400 +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2013 Codership Oy ++ * Copyright (C) 2014 Codership Oy + */ + + #ifndef GU_ERRNO_H +@@ -8,14 +8,29 @@ + #include + + #if defined(__APPLE__) || defined(__FreeBSD__) +-# define EBADFD (ELAST+1) /* the largest errno + 1 */ +-# define EREMCHG (ELAST+2) +-# define ENOTUNIQ (ELAST+3) +-# define ERESTART (ELAST+4) +-# if defined(__FreeBSD__) +-# define ENOTRECOVERABLE (ELAST+5) +-# define ENODATA (ELAST+6) +-# endif ++# define GU_ELAST ELAST ++#else ++/* must be high enough to not collide with system errnos but lower than 256 */ ++# define GU_ELAST 200 ++#endif ++ ++#ifndef EBADFD ++# define EBADFD (GU_ELAST+1) ++#endif ++#ifndef EREMCHG ++# define EREMCHG (GU_ELAST+2) ++#endif ++#ifndef ENOTUNIQ ++# define ENOTUNIQ (GU_ELAST+3) ++#endif ++#ifndef ERESTART ++# define ERESTART (GU_ELAST+4) ++#endif ++#ifndef ENOTRECOVERABLE ++# define ENOTRECOVERABLE (GU_ELAST+5) ++#endif ++#ifndef ENODATA ++# define ENODATA (GU_ELAST+6) + #endif + + #endif /* GU_STR_H */ Property changes on: files/patch-galerautils__src__gu_errno.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property