fann: Fix URL, patch. Rebuild
This commit is contained in:
@@ -4,16 +4,16 @@ _realname=fann
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=2.2.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Fast Artificial Neural Network Library (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://leenissen.dk/fann/wp/"
|
||||
url="http://leenissen.dk/fann/"
|
||||
license=('LGPL')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake")
|
||||
source=("${_realname}-${pkgver}.tar.gz::https://codeload.github.com/libfann/fann/tar.gz/${pkgver}"
|
||||
source=("${_realname}-${pkgver}.tar.gz::https://github.com/libfann/fann/archive/${pkgver}.tar.gz"
|
||||
"${_realname}-${pkgver}.patch")
|
||||
sha256sums=('f31c92c1589996f97d855939b37293478ac03d24b4e1c08ff21e0bd093449c3c'
|
||||
'd0d5a42366ddd8b0f35ad29aab436e770ec391f976c2288e371d06504a6905b0')
|
||||
'487aa5ac2201abb8824d1b3b31c7ec1cfd75024982edfe88bca198835912b5c6')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
@@ -37,4 +37,6 @@ build() {
|
||||
package() {
|
||||
cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.txt
|
||||
}
|
||||
|
||||
@@ -1,95 +1,127 @@
|
||||
diff -c -r fann-2.2.0.orig/src/CMakeLists.txt fann-2.2.0/src/CMakeLists.txt
|
||||
*** fann-2.2.0.orig/src/CMakeLists.txt 2012-01-26 09:15:00.000000000 -0200
|
||||
--- fann-2.2.0/src/CMakeLists.txt 2016-03-17 19:38:30.720241900 -0300
|
||||
***************
|
||||
*** 14,20 ****
|
||||
ADD_LIBRARY(floatfann SHARED ${floatfann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(floatfann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
! INSTALL(TARGETS floatfann DESTINATION ${LIB_INSTALL_DIR} )
|
||||
|
||||
|
||||
########### next target ###############
|
||||
--- 14,27 ----
|
||||
ADD_LIBRARY(floatfann SHARED ${floatfann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(floatfann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
! INSTALL(TARGETS floatfann
|
||||
! RUNTIME DESTINATION bin
|
||||
! LIBRARY DESTINATION lib
|
||||
! ARCHIVE DESTINATION lib)
|
||||
!
|
||||
! ADD_LIBRARY(floatfann_static STATIC ${floatfann_LIB_SRCS})
|
||||
! SET_TARGET_PROPERTIES(floatfann_static PROPERTIES OUTPUT_NAME floatfann)
|
||||
! INSTALL(TARGETS floatfann_static ARCHIVE DESTINATION lib)
|
||||
|
||||
|
||||
########### next target ###############
|
||||
***************
|
||||
*** 26,32 ****
|
||||
ADD_LIBRARY(doublefann SHARED ${doublefann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(doublefann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
! INSTALL(TARGETS doublefann DESTINATION ${LIB_INSTALL_DIR} )
|
||||
|
||||
|
||||
########### next target ###############
|
||||
--- 33,46 ----
|
||||
ADD_LIBRARY(doublefann SHARED ${doublefann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(doublefann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
! INSTALL(TARGETS doublefann
|
||||
! RUNTIME DESTINATION bin
|
||||
! LIBRARY DESTINATION lib
|
||||
! ARCHIVE DESTINATION lib)
|
||||
!
|
||||
! ADD_LIBRARY(doublefann_static STATIC ${doublefann_LIB_SRCS})
|
||||
! SET_TARGET_PROPERTIES(doublefann_static PROPERTIES OUTPUT_NAME doublefann)
|
||||
! INSTALL(TARGETS doublefann_static ARCHIVE DESTINATION lib)
|
||||
|
||||
|
||||
########### next target ###############
|
||||
***************
|
||||
*** 38,44 ****
|
||||
ADD_LIBRARY(fixedfann SHARED ${fixedfann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(fixedfann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
! INSTALL(TARGETS fixedfann DESTINATION ${LIB_INSTALL_DIR} )
|
||||
|
||||
|
||||
########### next target ###############
|
||||
--- 52,65 ----
|
||||
ADD_LIBRARY(fixedfann SHARED ${fixedfann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(fixedfann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
! INSTALL(TARGETS fixedfann
|
||||
! RUNTIME DESTINATION bin
|
||||
! LIBRARY DESTINATION lib
|
||||
! ARCHIVE DESTINATION lib)
|
||||
!
|
||||
! ADD_LIBRARY(fixedfann_static STATIC ${fixedfann_LIB_SRCS})
|
||||
! SET_TARGET_PROPERTIES(fixedfann_static PROPERTIES OUTPUT_NAME fixedfann)
|
||||
! INSTALL(TARGETS fixedfann_static ARCHIVE DESTINATION lib)
|
||||
|
||||
|
||||
########### next target ###############
|
||||
***************
|
||||
*** 50,54 ****
|
||||
ADD_LIBRARY(fann SHARED ${fann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(fann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
! INSTALL(TARGETS fann DESTINATION ${LIB_INSTALL_DIR} )
|
||||
|
||||
--- 71,82 ----
|
||||
ADD_LIBRARY(fann SHARED ${fann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(fann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
! INSTALL(TARGETS fann
|
||||
! RUNTIME DESTINATION bin
|
||||
! LIBRARY DESTINATION lib
|
||||
! ARCHIVE DESTINATION lib)
|
||||
!
|
||||
! ADD_LIBRARY(fann_static STATIC ${fann_LIB_SRCS})
|
||||
! SET_TARGET_PROPERTIES(fann_static PROPERTIES OUTPUT_NAME fann)
|
||||
! INSTALL(TARGETS fann_static ARCHIVE DESTINATION lib)
|
||||
|
||||
From 4fcc76f6fa702fb9943a956391db503fdbec93c0 Mon Sep 17 00:00:00 2001
|
||||
From: Julien Schueller <schueller@phimeca.com>
|
||||
Date: Fri, 4 Jul 2014 12:29:00 +0200
|
||||
Subject: [PATCH] Fix MinGW build.
|
||||
|
||||
---
|
||||
CMakeLists.txt | 1 +
|
||||
cmake/Modules/DefineInstallationPaths.cmake | 8 ++++----
|
||||
src/CMakeLists.txt | 24 ++++++++++++++++--------
|
||||
src/include/CMakeLists.txt | 2 +-
|
||||
4 files changed, 22 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b91f6fb..74fd738 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -7,6 +7,7 @@ SET(CMAKE_MODULE_PATH
|
||||
)
|
||||
|
||||
SET(VERSION 2.2.0)
|
||||
+option(BUILD_SHARED_LIBS "build shared/static libs" ON)
|
||||
|
||||
INCLUDE(DefineInstallationPaths)
|
||||
|
||||
diff --git a/cmake/Modules/DefineInstallationPaths.cmake b/cmake/Modules/DefineInstallationPaths.cmake
|
||||
index 644cf1b..d5dd9c5 100644
|
||||
--- a/cmake/Modules/DefineInstallationPaths.cmake
|
||||
+++ b/cmake/Modules/DefineInstallationPaths.cmake
|
||||
@@ -1,4 +1,4 @@
|
||||
-if (UNIX)
|
||||
+if (UNIX OR MINGW)
|
||||
IF (NOT APPLICATION_NAME)
|
||||
MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME")
|
||||
SET(APPLICATION_NAME ${PROJECT_NAME})
|
||||
@@ -122,9 +122,9 @@ if (UNIX)
|
||||
CACHE PATH "The ${APPLICATION_NAME} info install dir (default prefix/info)"
|
||||
FORCE
|
||||
)
|
||||
-endif (UNIX)
|
||||
+endif ()
|
||||
|
||||
-if (WIN32)
|
||||
+if (MSCV)
|
||||
# Same same
|
||||
SET(BIN_INSTALL_DIR .)
|
||||
SET(SBIN_INSTALL_DIR .)
|
||||
@@ -134,5 +134,5 @@ if (WIN32)
|
||||
SET(ICON_INSTALL_DIR .)
|
||||
SET(SOUND_INSTALL_DIR .)
|
||||
SET(LOCALE_INSTALL_DIR lang)
|
||||
-endif (WIN32)
|
||||
+endif (MSCV)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index fade00c..de0abd4 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -11,10 +11,12 @@ SET(floatfann_LIB_SRCS
|
||||
floatfann.c
|
||||
)
|
||||
|
||||
-ADD_LIBRARY(floatfann SHARED ${floatfann_LIB_SRCS})
|
||||
+ADD_LIBRARY(floatfann ${floatfann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(floatfann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
-INSTALL(TARGETS floatfann DESTINATION ${LIB_INSTALL_DIR} )
|
||||
+INSTALL(TARGETS floatfann LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR} )
|
||||
|
||||
|
||||
########### next target ###############
|
||||
@@ -23,10 +25,12 @@ SET(doublefann_LIB_SRCS
|
||||
doublefann.c
|
||||
)
|
||||
|
||||
-ADD_LIBRARY(doublefann SHARED ${doublefann_LIB_SRCS})
|
||||
+ADD_LIBRARY(doublefann ${doublefann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(doublefann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
-INSTALL(TARGETS doublefann DESTINATION ${LIB_INSTALL_DIR} )
|
||||
+INSTALL(TARGETS doublefann LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR} )
|
||||
|
||||
|
||||
########### next target ###############
|
||||
@@ -35,10 +39,12 @@ SET(fixedfann_LIB_SRCS
|
||||
fixedfann.c
|
||||
)
|
||||
|
||||
-ADD_LIBRARY(fixedfann SHARED ${fixedfann_LIB_SRCS})
|
||||
+ADD_LIBRARY(fixedfann ${fixedfann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(fixedfann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
-INSTALL(TARGETS fixedfann DESTINATION ${LIB_INSTALL_DIR} )
|
||||
+INSTALL(TARGETS fixedfann LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR} )
|
||||
|
||||
|
||||
########### next target ###############
|
||||
@@ -47,8 +53,10 @@ SET(fann_LIB_SRCS
|
||||
floatfann.c
|
||||
)
|
||||
|
||||
-ADD_LIBRARY(fann SHARED ${fann_LIB_SRCS})
|
||||
+ADD_LIBRARY(fann ${fann_LIB_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(fann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
|
||||
-INSTALL(TARGETS fann DESTINATION ${LIB_INSTALL_DIR} )
|
||||
+INSTALL(TARGETS fann LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR} )
|
||||
|
||||
diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt
|
||||
index 3a69da4..451a0b4 100644
|
||||
--- a/src/include/CMakeLists.txt
|
||||
+++ b/src/include/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
########### install files ###############
|
||||
|
||||
-INSTALL_FILES( /include FILES fann.h doublefann.h fann_internal.h floatfann.h fann_data.h fixedfann.h compat_time.h fann_activation.h fann_cascade.h fann_error.h fann_train.h fann_io.h fann_cpp.h )
|
||||
+INSTALL_FILES( /include FILES fann.h doublefann.h fann_internal.h floatfann.h fann_data.h fixedfann.h fann_activation.h fann_cascade.h fann_error.h fann_train.h fann_io.h fann_cpp.h )
|
||||
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
Reference in New Issue
Block a user