aboutsummaryrefslogtreecommitdiff
path: root/libs/avro
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2019-09-21 14:20:41 -0700
committerRosen Penev <rosenp@gmail.com>2019-09-21 15:52:29 -0700
commit68d3734deab36ba7e2b5cf8984bf6f075e8dcdfe (patch)
treed807412304adfa0dfc9d9629b3cb6cc98cd2a6f7 /libs/avro
parent0dac4b74cab4938af9a0148a48557410aa5fa5ae (diff)
avro: Replace PKG_INSTALL with CMAKE_INSTALL
Allows removal of the InstallDev section as it's now implicit. PKG_INSTALL is already defined in cmake.mk This also installs a pkgconfig file. Added a patch to fix it up. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'libs/avro')
-rw-r--r--libs/avro/Makefile18
-rw-r--r--libs/avro/patches/010-pkgconfig.patch30
2 files changed, 34 insertions, 14 deletions
diff --git a/libs/avro/Makefile b/libs/avro/Makefile
index d2aa76053..272e806a4 100644
--- a/libs/avro/Makefile
+++ b/libs/avro/Makefile
@@ -9,20 +9,19 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=avro-c
PKG_VERSION:=1.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@APACHE/avro/avro-$(PKG_VERSION)/c
PKG_HASH:=4639982b2b8fbd91fc7128fef672207129c959bb7900dd64b077ce4206edf10e
PKG_MAINTAINER:=John Clark <inindev@gmail.com>
-
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
@@ -38,15 +37,6 @@ define Package/avro-c/description
This package contains the Apache Avro C library.
endef
-CMAKE_OPTIONS += \
- -DCMAKE_BUILD_TYPE:STRING=MINSIZEREL
-
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/{lib,include}
- $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavro.{a,so*} $(1)/usr/lib/
-endef
-
define Package/avro-c/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavro.so* $(1)/usr/lib/
diff --git a/libs/avro/patches/010-pkgconfig.patch b/libs/avro/patches/010-pkgconfig.patch
new file mode 100644
index 000000000..155dee8bc
--- /dev/null
+++ b/libs/avro/patches/010-pkgconfig.patch
@@ -0,0 +1,30 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -121,9 +121,8 @@ endif(WIN32)
+
+ # Install pkg-config file
+
+-set(prefix ${CMAKE_INSTALL_PREFIX})
+ set(VERSION ${AVRO_VERSION})
+-configure_file(avro-c.pc.in avro-c.pc)
++configure_file(avro-c.pc.in avro-c.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avro-c.pc
+ DESTINATION lib/pkgconfig)
+
+--- a/src/avro-c.pc.in
++++ b/src/avro-c.pc.in
+@@ -1,7 +1,12 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
+ Name: avro-c
+ Description: C library for parsing Avro data
+ Version: @VERSION@
+ URL: http://avro.apache.org/
+-Libs: -L@prefix@/lib -lavro
+-Cflags: -I@prefix@/include
++Libs: -L${libdir} -lavro
++Cflags: -I${includedir}
+ Requires: @CODEC_PKG@