commit
09b0d4d7c7
4 changed files with 64 additions and 6 deletions
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=avro-c
|
PKG_NAME:=avro-c
|
||||||
PKG_VERSION:=1.8.2
|
PKG_VERSION:=1.9.1
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@APACHE/avro/avro-$(PKG_VERSION)/c
|
PKG_SOURCE_URL:=@APACHE/avro/avro-$(PKG_VERSION)/c
|
||||||
PKG_HASH:=4639982b2b8fbd91fc7128fef672207129c959bb7900dd64b077ce4206edf10e
|
PKG_HASH:=7df7bc1e13ce7180f0438ed05ab6642b5b2b6df91f30b927b470e25a78e04642
|
||||||
|
|
||||||
PKG_MAINTAINER:=John Clark <inindev@gmail.com>
|
PKG_MAINTAINER:=John Clark <inindev@gmail.com>
|
||||||
PKG_LICENSE:=Apache-2.0
|
PKG_LICENSE:=Apache-2.0
|
||||||
|
@ -37,10 +37,30 @@ define Package/avro-c/description
|
||||||
This package contains the Apache Avro C library.
|
This package contains the Apache Avro C library.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/avro-c-utils
|
||||||
|
SECTIONS:=utils
|
||||||
|
CATEGORY:=Utilities
|
||||||
|
DEPENDS:=+avro-c
|
||||||
|
TITLE:=Apache Avro C utilities
|
||||||
|
URL:=https://avro.apache.org
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/avro-c-utils/description
|
||||||
|
This package contains the Apache Avro C utilities.
|
||||||
|
endef
|
||||||
|
|
||||||
|
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||||
|
|
||||||
define Package/avro-c/install
|
define Package/avro-c/install
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavro.so* $(1)/usr/lib/
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavro.so* $(1)/usr/lib/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,avro-c))
|
define Package/avro-c-utils/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/avro* $(1)/usr/bin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,avro-c))
|
||||||
|
$(eval $(call BuildPackage,avro-c-utils))
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/CMakeLists.txt
|
--- a/src/CMakeLists.txt
|
||||||
+++ b/src/CMakeLists.txt
|
+++ b/src/CMakeLists.txt
|
||||||
@@ -121,9 +121,8 @@ endif(WIN32)
|
@@ -122,9 +122,8 @@ endif(WIN32)
|
||||||
|
|
||||||
# Install pkg-config file
|
# Install pkg-config file
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
Name: avro-c
|
Name: avro-c
|
||||||
Description: C library for parsing Avro data
|
Description: C library for parsing Avro data
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
URL: http://avro.apache.org/
|
URL: https://avro.apache.org/
|
||||||
-Libs: -L@prefix@/lib -lavro
|
-Libs: -L@prefix@/lib -lavro
|
||||||
-Cflags: -I@prefix@/include
|
-Cflags: -I@prefix@/include
|
||||||
+Libs: -L${libdir} -lavro
|
+Libs: -L${libdir} -lavro
|
||||||
|
|
27
libs/avro/patches/020-bin-shared.patch
Normal file
27
libs/avro/patches/020-bin-shared.patch
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
--- a/src/CMakeLists.txt
|
||||||
|
+++ b/src/CMakeLists.txt
|
||||||
|
@@ -129,20 +129,20 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avro-c.pc
|
||||||
|
DESTINATION lib/pkgconfig)
|
||||||
|
|
||||||
|
add_executable(avrocat avrocat.c)
|
||||||
|
-target_link_libraries(avrocat avro-static)
|
||||||
|
+target_link_libraries(avrocat avro-shared)
|
||||||
|
install(TARGETS avrocat RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
|
add_executable(avroappend avroappend.c)
|
||||||
|
-target_link_libraries(avroappend avro-static)
|
||||||
|
+target_link_libraries(avroappend avro-shared)
|
||||||
|
install(TARGETS avroappend RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
|
if (NOT WIN32)
|
||||||
|
#TODO: Port getopt() to Windows to compile avropipe.c and avromod.c
|
||||||
|
add_executable(avropipe avropipe.c)
|
||||||
|
-target_link_libraries(avropipe avro-static)
|
||||||
|
+target_link_libraries(avropipe avro-shared)
|
||||||
|
install(TARGETS avropipe RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
|
add_executable(avromod avromod.c)
|
||||||
|
-target_link_libraries(avromod avro-static)
|
||||||
|
+target_link_libraries(avromod avro-shared)
|
||||||
|
install(TARGETS avromod RUNTIME DESTINATION bin)
|
||||||
|
endif(NOT WIN32)
|
11
libs/avro/patches/030-ssize_t.patch
Normal file
11
libs/avro/patches/030-ssize_t.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/src/avro_generic_internal.h
|
||||||
|
+++ b/src/avro_generic_internal.h
|
||||||
|
@@ -28,6 +28,8 @@ extern "C" {
|
||||||
|
#include "avro/schema.h"
|
||||||
|
#include "avro/value.h"
|
||||||
|
|
||||||
|
+#include <stdio.h>
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Each generic value implementation struct defines a couple of extra
|
||||||
|
* methods that we use to control the lifecycle of the value objects.
|
Loading…
Reference in a new issue