qca: install pkg-config file and add test

N.B. test fails with undefined references
This commit is contained in:
Tony Theodore 2017-03-26 16:01:19 +11:00 committed by Boris Pek
parent 68f5df6744
commit 946dbbec0f
2 changed files with 31 additions and 0 deletions

23
src/qca-1-fixes.patch Normal file
View File

@ -0,0 +1,23 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Sun, 26 Mar 2017 12:36:55 +1100
Subject: [PATCH] qca: add INSTAL_PKGCONFIG option
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -233,7 +233,7 @@ foreach(PATH QCA_PLUGINS_INSTALL_DIR
endif()
endforeach()
-if(NOT WIN32)
+if(NOT WIN32 OR INSTAL_PKGCONFIG)
if(OSX_FRAMEWORK)
set(PKGCONFIG_CFLAGS "-F\${libdir} -I\${includedir}")
set(PKGCONFIG_LIBS "-F\${libdir} -framework ${QCA_LIB_NAME}")

View File

@ -15,6 +15,7 @@ define $(PKG)_BUILD
-DBUILD_TOOLS=OFF \
-DUSE_RELATIVE_PATHS=OFF \
-DBUILD_PLUGINS="auto" \
-DINSTAL_PKGCONFIG=ON \
-DQCA_MAN_INSTALL_DIR="$(BUILD_DIR)/null"
$(MAKE) -C '$(BUILD_DIR)' -j $(JOBS)
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
@ -24,5 +25,12 @@ define $(PKG)_BUILD
cd '$(BUILD_DIR)/test-qca' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(PWD)/src/qca-test.pro'
$(MAKE) -C '$(BUILD_DIR)/test-qca' -j $(JOBS) $(BUILD_TYPE)
$(INSTALL) -m755 '$(BUILD_DIR)/test-qca/$(BUILD_TYPE)/test-qca5.exe' '$(PREFIX)/$(TARGET)/bin/')
# compile test
'$(TARGET)-g++' \
-W -Wall -Werror \
'$(SOURCE_DIR)/examples/base64test/base64test.cpp' \
-o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
`'$(TARGET)-pkg-config' qca2-qt5 --cflags --libs`
endef