aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel/avro-c/Makefile16
-rw-r--r--devel/avro-c/files/patch-src_CMakeLists.txt6
-rw-r--r--devel/avro-c/files/patch-src_codec.c12
3 files changed, 28 insertions, 6 deletions
diff --git a/devel/avro-c/Makefile b/devel/avro-c/Makefile
index 1cefb5021ecf..545051972e58 100644
--- a/devel/avro-c/Makefile
+++ b/devel/avro-c/Makefile
@@ -3,6 +3,7 @@
PORTNAME= avro
PORTVERSION= 1.8.1
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= APACHE/${PORTNAME}/stable
PKGNAMESUFFIX= -c
@@ -11,13 +12,24 @@ DISTNAME= ${PORTNAME}-src-${PORTVERSION}
MAINTAINER= vg@FreeBSD.org
COMMENT= Data serialization system for ANSI C
+LIB_DEPENDS= libjansson.so:devel/jansson \
+ libsnappy.so:archivers/snappy
+
USES= cmake pkgconfig
USE_LDCONFIG= yes
WRKSRC= ${WRKDIR}/${DISTNAME}/lang/c
-pre-configure:
+.include <bsd.port.pre.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1003000
+CONFIGURE_ENV+= PKG_CONFIG_PATH=${FILESDIR}
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} '/add_subdirectory(docs)/d' \
+ ${WRKSRC}/CMakeLists.txt
@${REINPLACE_CMD} 's|/bin/bash|/bin/sh|g' \
${WRKSRC}/version.sh
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/devel/avro-c/files/patch-src_CMakeLists.txt b/devel/avro-c/files/patch-src_CMakeLists.txt
index cf8c7abbbb42..81cddb617e6d 100644
--- a/devel/avro-c/files/patch-src_CMakeLists.txt
+++ b/devel/avro-c/files/patch-src_CMakeLists.txt
@@ -1,6 +1,6 @@
--- src/CMakeLists.txt.orig 2016-05-15 00:38:52 UTC
+++ src/CMakeLists.txt
-@@ -82,12 +82,14 @@ source_group(Avro FILES ${AVRO_SRC})
+@@ -82,12 +82,12 @@ source_group(Avro FILES ${AVRO_SRC})
# The version.sh script gives us a SOVERSION that uses colon as a
# separator; we need periods.
@@ -11,8 +11,6 @@
target_link_libraries(avro-static ${JANSSON_LIBRARIES} ${CODEC_LIBRARIES} ${THREADS_LIBRARIES})
set_target_properties(avro-static PROPERTIES OUTPUT_NAME avro)
-+include_directories(/usr/local/include)
-+
if (NOT WIN32)
# TODO: Create Windows DLLs. See http://www.cmake.org/Wiki/BuildingWinDLL
add_library(avro-shared SHARED ${AVRO_SRC})
@@ -21,7 +19,7 @@
configure_file(avro-c.pc.in avro-c.pc)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avro-c.pc
- DESTINATION lib/pkgconfig)
-+ DESTINATION ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig)
++ DESTINATION libdata/pkgconfig)
add_executable(avrocat avrocat.c)
target_link_libraries(avrocat avro-static)
diff --git a/devel/avro-c/files/patch-src_codec.c b/devel/avro-c/files/patch-src_codec.c
new file mode 100644
index 000000000000..ae74d17ef796
--- /dev/null
+++ b/devel/avro-c/files/patch-src_codec.c
@@ -0,0 +1,12 @@
+--- src/codec.c.orig 2016-05-15 00:38:52 UTC
++++ src/codec.c
+@@ -21,6 +21,9 @@
+ # if defined(__APPLE__)
+ # include <libkern/OSByteOrder.h>
+ # define __bswap_32 OSSwapInt32
++# elif defined(__FreeBSD__)
++# include <sys/endian.h>
++# define __bswap_32 bswap32
+ # else
+ # include <byteswap.h>
+ # endif