svn commit: r373590 - in head/databases/galera: . files
Dmitry Marakasov
amdmi3 at FreeBSD.org
Sat Nov 29 00:38:00 UTC 2014
Author: amdmi3
Date: Sat Nov 29 00:37:59 2014
New Revision: 373590
URL: https://svnweb.freebsd.org/changeset/ports/373590
QAT: https://qat.redports.org/buildarchive/r373590/
Log:
- Bump PORTREVISION
- Add USE_GCC=yes, fix mysql signal 11 crash
- Remove dependency on net/asio, use asio from devel/boost-libs
- Remove GARB option (linker problem - upstream notified)
- Fix errnos warnings
- Fix problem with 'ar' and pass RPATH properly
PR: 195457
Submitted by: amdmi3 (but all changes by maintainer)
Approved by: horia at racoviceanu.com (maintainer)
Added:
head/databases/galera/files/patch-SConstruct (contents, props changed)
head/databases/galera/files/patch-galerautils__src__gu_errno.h (contents, props changed)
Deleted:
head/databases/galera/files/garb.in
Modified:
head/databases/galera/Makefile
Modified: head/databases/galera/Makefile
==============================================================================
--- head/databases/galera/Makefile Sat Nov 29 00:35:12 2014 (r373589)
+++ head/databases/galera/Makefile Sat Nov 29 00:37:59 2014 (r373590)
@@ -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 @@ LIB_DEPENDS= libboost_date_time.so:${POR
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,31 +52,18 @@ DOCSRCDIR5= ${DOCSRCDIR1}/gcs
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
BPOSTATIC_DESC= Use static boost_program_options
EPUB_DESC= EPUB support
PICKLE_DESC= Pickle support
-GARB_DESC= Galera Arbitrator
-
-GARB_USE= RC_SUBR=garb
.include <bsd.port.pre.mk>
-.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 +81,33 @@ MAKE_CMD+= debug=3
.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 +191,6 @@ do-install:
@(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} \
Added: head/databases/galera/files/patch-SConstruct
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/galera/files/patch-SConstruct Sat Nov 29 00:37:59 2014 (r373590)
@@ -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', '')
Added: head/databases/galera/files/patch-galerautils__src__gu_errno.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/galera/files/patch-galerautils__src__gu_errno.h Sat Nov 29 00:37:59 2014 (r373590)
@@ -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 <info at codership.com>
++ * Copyright (C) 2014 Codership Oy <info at codership.com>
+ */
+
+ #ifndef GU_ERRNO_H
+@@ -8,14 +8,29 @@
+ #include <errno.h>
+
+ #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 */
More information about the svn-ports-all
mailing list