diff options
author | pingplug | 2015-06-12 10:10:08 +0800 |
---|---|---|
committer | pingplug | 2015-06-12 10:10:08 +0800 |
commit | 27b4f5a4faa39f7e9f51631ca6c09c25f7870643 (patch) | |
tree | 4a4d5977def0420e437bea612cb3b42a2251cc14 | |
parent | 420ad195f9358c34cd6ff86b60b6239ff48671f7 (diff) | |
download | aur-27b4f5a4faa39f7e9f51631ca6c09c25f7870643.tar.gz |
Update to 18.16 and remove prebuild library
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 32 | ||||
-rw-r--r-- | cmake | 237 | ||||
-rw-r--r-- | dlib-18.16.patch (renamed from dlib-18.15.patch) | 18 | ||||
-rw-r--r-- | mingw-w64-dlib.install | 9 |
5 files changed, 19 insertions, 294 deletions
@@ -1,15 +1,10 @@ -# Generated by makepkg 4.2.1 -# Fri May 8 03:04:35 UTC 2015 pkgbase = mingw-w64-dlib pkgdesc = Dlib is a general purpose cross-platform C++ library designed using contract programming and modern C++ techniques. (mingw-w64 with pre-build library) - pkgver = 18.15 + pkgver = 18.16 pkgrel = 1 url = http://www.dlib.net/ - install = mingw-w64-dlib.install arch = any license = Boost Software License - makedepends = mingw-w64-gcc - makedepends = mingw-w64-cmake depends = mingw-w64-crt optdepends = mingw-w64-cblas: for BLAS support optdepends = mingw-w64-lapack: for LAPACK support @@ -19,12 +14,10 @@ pkgbase = mingw-w64-dlib options = !buildflags options = !strip options = staticlibs - source = http://downloads.sourceforge.net/project/dclib/dlib/v18.15/dlib-18.15.tar.bz2 - source = dlib-18.15.patch - source = cmake - md5sums = 55922b2138913100634c42e36730dac7 - md5sums = f2a50bc7df3361c71b34b44641f3a52a - md5sums = c0c067d75d28a623e2036c793bc58ea2 + source = http://downloads.sourceforge.net/project/dclib/dlib/v18.16/dlib-18.16.tar.bz2 + source = dlib-18.16.patch + md5sums = e9e5449bc25370afce2d254327afac99 + md5sums = 87d1e10b4dc52960a4508264ce842602 pkgname = mingw-w64-dlib @@ -2,14 +2,13 @@ pkgname=mingw-w64-dlib _pkgname=dlib -pkgver=18.15 +pkgver=18.16 pkgrel=1 -pkgdesc="Dlib is a general purpose cross-platform C++ library designed using contract programming and modern C++ techniques. (mingw-w64 with pre-build library)" +pkgdesc="Dlib is a general purpose cross-platform C++ library designed using contract programming and modern C++ techniques. (mingw-w64)" arch=('any') url="http://www.dlib.net/" license=('Boost Software License') depends=('mingw-w64-crt') -makedepends=('mingw-w64-gcc' 'mingw-w64-cmake') optdepends=('mingw-w64-cblas: for BLAS support' 'mingw-w64-lapack: for LAPACK support' 'mingw-w64-libjpeg: for JPEG support' @@ -17,12 +16,9 @@ optdepends=('mingw-w64-cblas: for BLAS support' 'mingw-w64-sqlite: for sqlite support') options=('!buildflags' '!strip' 'staticlibs') source=(http://downloads.sourceforge.net/project/dclib/${_pkgname}/v${pkgver}/${_pkgname}-${pkgver}.tar.bz2 - dlib-${pkgver}.patch - cmake) -md5sums=('55922b2138913100634c42e36730dac7' - 'f2a50bc7df3361c71b34b44641f3a52a' - 'c0c067d75d28a623e2036c793bc58ea2') -install=${pkgname}.install + dlib-${pkgver}.patch) +md5sums=('e9e5449bc25370afce2d254327afac99' + '87d1e10b4dc52960a4508264ce842602') _architectures="i686-w64-mingw32 x86_64-w64-mingw32" @@ -35,29 +31,11 @@ prepare() { patch -Np0 -i dlib-${pkgver}.patch } -build() { - for _arch in ${_architectures}; do - mkdir -p "${srcdir}/${_pkgname}-build-${_arch}" - cd "${srcdir}/${_pkgname}-build-${_arch}" - - ${_arch}-cmake "../${_pkgname}-${pkgver}/${_pkgname}" - make - done -} - package() { for _arch in ${_architectures}; do cd "${srcdir}/${_pkgname}-${pkgver}" - mv ${_pkgname}/cmake ${_pkgname}/cmake.orig - install -Dm644 ../cmake ${_pkgname} - install -Dm755 -d "${pkgdir}/usr/${_arch}/include" cp -a ${_pkgname} "${pkgdir}/usr/${_arch}/include" - - cd "${srcdir}/${_pkgname}-build-${_arch}" - install -Dm755 -d "${pkgdir}/usr/${_arch}/lib" - install -Dm644 libdlib.a "${pkgdir}/usr/${_arch}/lib" - ${_arch}-strip -g "${pkgdir}/usr/${_arch}/lib/"*.a done } diff --git a/cmake b/cmake deleted file mode 100644 index c196f3fe0d3f..000000000000 --- a/cmake +++ /dev/null @@ -1,237 +0,0 @@ -# this file is written for mingw-w64-dlib package -# -# modified from CMakeLists.txt and cmake in this -# directory by pingplug<pingplug@foxmail.com> -# -# MAY NOT WORK IN OTHER LINUX DISTRIBUTIONS -# - -# make macros that can add #define directives to the entire project. Not just -# to the dlib library itself. I.e. to dlib and to any projects that depend -# on dlib. -macro ( add_global_define def_name ) - if (NOT CMAKE_CXX_FLAGS MATCHES "-D${def_name}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${def_name}" - CACHE STRING "Flags used by the compiler during all C++ builds." - FORCE) - endif () -endmacro() -macro ( remove_global_define def_name ) - if (CMAKE_CXX_FLAGS MATCHES " -D${def_name}") - string (REGEX REPLACE " -D${def_name}" "" temp_var ${CMAKE_CXX_FLAGS}) - set (CMAKE_CXX_FLAGS "${temp_var}" - CACHE STRING "Flags used by the compiler during all C++ builds." - FORCE) - endif () -endmacro() - - -# Make sure ENABLE_ASSERTS is defined for debug builds -if (NOT CMAKE_CXX_FLAGS_DEBUG MATCHES "-DENABLE_ASSERTS") - set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLE_ASSERTS" - CACHE STRING "Flags used by the compiler during C++ debug builds." - FORCE) -endif () - - -# Don't add dlib if it's already been added to the cmake project -if (NOT TARGET dlib) - - set (USE_SYSTEM_DLIB_STR - "disable this if you want to compile dlib manually (i.e. you want a debug build of dlib)" ) - option(USE_SYSTEM_DLIB ${USE_SYSTEM_DLIB_STR} ON) - - # Determine the path to dlib. - string(REGEX REPLACE "cmake$" "" dlib_path ${CMAKE_CURRENT_LIST_FILE}) - - # By default, g++ won't warn or error if you forget to return a value in a - # function which requires you to do so. This option makes it give a warning - # for doing this. - set(${CMAKE_CXX_FLAGS} "${CMAKE_CXX_FLAGS} -Wreturn-type") - - # Setup some options to allow a user to enable SSE and AVX instruction use. - option(USE_SSE2_INSTRUCTIONS "Compile your program with SSE2 instructions" OFF) - option(USE_SSE4_INSTRUCTIONS "Compile your program with SSE4 instructions" OFF) - option(USE_AVX_INSTRUCTIONS "Compile your program with AVX instructions" OFF) - if(USE_AVX_INSTRUCTIONS) - add_definitions(-mavx) - elseif (USE_SSE4_INSTRUCTIONS) - add_definitions(-msse4) - elseif(USE_SSE2_INSTRUCTIONS) - add_definitions(-msse2) - endif() - - - # Add folder containing dlib to the include search path. - INCLUDE_DIRECTORIES(${dlib_path}/..) - - # This is really optional, but nice. It will make sure the build mode - # created by cmake is always release by default. - include(${dlib_path}/release_build_by_default) - - find_library(dlib_found dlib) - if(dlib_found AND USE_SYSTEM_DLIB) - set(USE_SYSTEM_DLIB ON) - message("Use system dlib") - else() - set(USE_SYSTEM_DLIB OFF CACHE STRING ${USE_SYSTEM_DLIB_STR} FORCE) - message("Build dlib manually") - add_subdirectory(${dlib_path} dlib_build) - endif() - -endif() - -if (NOT TARGET dlib) - - # Removed two debug options - set (DLIB_ISO_CPP_ONLY_STR - "Enable this if you don't want to compile any non-ISO C++ code (i.e. you don't use any of the API Wrappers)" ) - set (DLIB_NO_GUI_SUPPORT_STR - "Enable this if you don't want to compile any of the dlib GUI code" ) - set (DLIB_USE_BLAS_STR - "Disable this if you don't want to use a BLAS library" ) - set (DLIB_USE_LAPACK_STR - "Disable this if you don't want to use a LAPACK library" ) - set (DLIB_LINK_WITH_LIBPNG_STR - "Disable this if you don't want to link against libpng" ) - set (DLIB_LINK_WITH_LIBJPEG_STR - "Disable this if you don't want to link against libjpeg" ) - set (DLIB_LINK_WITH_SQLITE3_STR - "Disable this if you don't want to link against sqlite3" ) - #set (DLIB_LINK_WITH_FFTW_STR - #"Disable this if you don't want to link against fftw" ) - - option(DLIB_ISO_CPP_ONLY ${DLIB_ISO_CPP_ONLY_STR} OFF) - option(DLIB_NO_GUI_SUPPORT ${DLIB_NO_GUI_SUPPORT_STR} OFF) - option(DLIB_USE_BLAS ${DLIB_USE_BLAS_STR} ON) - option(DLIB_USE_LAPACK ${DLIB_USE_LAPACK_STR} ON) - option(DLIB_LINK_WITH_LIBPNG ${DLIB_LINK_WITH_LIBPNG_STR} ON) - option(DLIB_LINK_WITH_LIBJPEG ${DLIB_LINK_WITH_LIBJPEG_STR} ON) - option(DLIB_LINK_WITH_SQLITE3 ${DLIB_LINK_WITH_SQLITE3_STR} ON) - #option(DLIB_LINK_WITH_FFTW ${DLIB_LINK_WITH_FFTW_STR} ON) - - - # Removed check for headers - if (NOT DLIB_ISO_CPP_ONLY) - - if (DLIB_NO_GUI_SUPPORT) - set (dlib_needed_libraries " -lws2_32 ") - else() - set (dlib_needed_libraries " -lws2_32 -lcomctl32 -lgdi32 -limm32 ") - endif() - - if (DLIB_LINK_WITH_LIBPNG) - set(ZLIB_FIND_QUIETLY ON) - set(PNG_FIND_QUIETLY ON) - include(FindPNG) - if (PNG_FOUND) - set (dlib_needed_libraries "${dlib_needed_libraries} -lpng -lz ") - else() - set(DLIB_LINK_WITH_LIBPNG OFF CACHE STRING ${DLIB_LINK_WITH_LIBPNG_STR} FORCE ) - endif() - endif() - - if (DLIB_LINK_WITH_LIBJPEG) - include(FindJPEG) - if (JPEG_FOUND) - set (dlib_needed_libraries "${dlib_needed_libraries} -ljpeg ") - else() - set(DLIB_LINK_WITH_LIBJPEG OFF CACHE STRING ${DLIB_LINK_WITH_LIBJPEG_STR} FORCE ) - endif() - endif() - - if (DLIB_USE_BLAS) - find_library(blas_found cblas) - if (blas_found) - set (dlib_needed_libraries "${dlib_needed_libraries} -lcblas ") - else() - set(DLIB_USE_BLAS OFF CACHE STRING ${DLIB_USE_BLAS_STR} FORCE ) - endif() - endif() - - if (DLIB_USE_LAPACK) - find_library(lapack_found lapack) - if (lapack_found) - set (dlib_needed_libraries "${dlib_needed_libraries} -llapack ") - else() - set(DLIB_USE_LAPACK OFF CACHE STRING ${DLIB_USE_LAPACK_STR} FORCE ) - endif() - endif() - - if (DLIB_LINK_WITH_SQLITE3) - find_library(sqlite sqlite3) - if (sqlite) - set(dlib_needed_libraries "${dlib_needed_libraries} -lsqlite3 ") - else() - set(DLIB_LINK_WITH_SQLITE3 OFF CACHE STRING ${DLIB_LINK_WITH_SQLITE3_STR} FORCE ) - endif() - mark_as_advanced(sqlite) - endif() - - if (DLIB_LINK_WITH_FFTW) - find_library(fftw fftw3) - if (fftw) - set(dlib_needed_libraries "${dlib_needed_libraries} -lfftw3 ") - else() - set(DLIB_LINK_WITH_FFTW OFF CACHE STRING ${DLIB_LINK_WITH_SQLITE3_STR} FORCE ) - endif() - mark_as_advanced(fftw) - endif() - - set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} ${dlib_needed_libraries}") - - endif () ##### end of if NOT DLIB_ISO_CPP_ONLY ########################################################## - - - #test for some things that really should be true about the compiler - include(TestForSTDNamespace) - include(TestForANSIStreamHeaders) - - - if (DLIB_LINK_WITH_LIBPNG AND NOT DLIB_ISO_CPP_ONLY) - add_global_define(DLIB_PNG_SUPPORT) - else() - remove_global_define(DLIB_PNG_SUPPORT) - endif() - - if (DLIB_LINK_WITH_LIBJPEG AND NOT DLIB_ISO_CPP_ONLY) - add_global_define(DLIB_JPEG_SUPPORT) - else() - remove_global_define(DLIB_JPEG_SUPPORT) - endif() - - if (DLIB_LINK_WITH_FFTW AND NOT DLIB_ISO_CPP_ONLY) - add_global_define(DLIB_USE_FFTW) - else() - remove_global_define(DLIB_USE_FFTW) - endif() - - if (DLIB_USE_BLAS AND blas_found) - add_global_define(DLIB_USE_BLAS) - else() - remove_global_define(DLIB_USE_BLAS) - endif() - - if (DLIB_USE_LAPACK AND lapack_found) - add_global_define(DLIB_USE_LAPACK) - else() - remove_global_define(DLIB_USE_LAPACK) - endif() - - if (DLIB_ISO_CPP_ONLY) - add_global_define(DLIB_ISO_CPP_ONLY) - else() - remove_global_define(DLIB_ISO_CPP_ONLY) - endif() - - if (DLIB_NO_GUI_SUPPORT) - add_global_define(DLIB_NO_GUI_SUPPORT) - else() - remove_global_define(DLIB_NO_GUI_SUPPORT) - endif() - - remove_global_define(DLIB_ENABLE_STACK_TRACE) - remove_global_define(ENABLE_ASSERTS) - -endif() - diff --git a/dlib-18.15.patch b/dlib-18.16.patch index b91e9bee3363..4e9d99191e59 100644 --- a/dlib-18.15.patch +++ b/dlib-18.16.patch @@ -1,6 +1,6 @@ -diff -ruN dlib-18.15/dlib/cmake dlib-18.15-fixed/dlib/cmake ---- dlib-18.15/dlib/cmake 2015-05-08 04:39:21.000000000 +0800 -+++ dlib-18.15-fixed/dlib/cmake 2015-05-08 17:08:26.328545784 +0800 +diff -ruN dlib-18.16/dlib/cmake dlib-18.16-fixed/dlib/cmake +--- dlib-18.16/dlib/cmake 2015-06-04 08:15:45.000000000 +0800 ++++ dlib-18.16-fixed/dlib/cmake 2015-06-12 09:59:41.793632173 +0800 @@ -16,7 +16,7 @@ # By default, g++ won't warn or error if you forget to return a value in a # function which requires you to do so. This option makes it give a warning @@ -10,9 +10,9 @@ diff -ruN dlib-18.15/dlib/cmake dlib-18.15-fixed/dlib/cmake endif() # Setup some options to allow a user to enable SSE and AVX instruction use. -diff -ruN dlib-18.15/dlib/cmake_find_blas.txt dlib-18.15-fixed/dlib/cmake_find_blas.txt ---- dlib-18.15/dlib/cmake_find_blas.txt 2015-05-08 04:39:21.000000000 +0800 -+++ dlib-18.15-fixed/dlib/cmake_find_blas.txt 2015-05-08 17:08:26.331879117 +0800 +diff -ruN dlib-18.16/dlib/cmake_find_blas.txt dlib-18.16-fixed/dlib/cmake_find_blas.txt +--- dlib-18.16/dlib/cmake_find_blas.txt 2015-06-04 08:15:45.000000000 +0800 ++++ dlib-18.16-fixed/dlib/cmake_find_blas.txt 2015-06-12 09:59:41.793632173 +0800 @@ -261,6 +261,89 @@ endif() @@ -103,9 +103,9 @@ diff -ruN dlib-18.15/dlib/cmake_find_blas.txt dlib-18.15-fixed/dlib/cmake_find_b endif() -diff -ruN dlib-18.15/dlib/CMakeLists.txt dlib-18.15-fixed/dlib/CMakeLists.txt ---- dlib-18.15/dlib/CMakeLists.txt 2015-05-08 04:39:21.000000000 +0800 -+++ dlib-18.15-fixed/dlib/CMakeLists.txt 2015-05-08 17:08:26.331879117 +0800 +diff -ruN dlib-18.16/dlib/CMakeLists.txt dlib-18.16-fixed/dlib/CMakeLists.txt +--- dlib-18.16/dlib/CMakeLists.txt 2015-06-04 08:15:45.000000000 +0800 ++++ dlib-18.16-fixed/dlib/CMakeLists.txt 2015-06-12 09:59:41.793632173 +0800 @@ -227,6 +227,7 @@ if (PNG_FOUND AND LIBPNG_IS_GOOD) include_directories(${PNG_INCLUDE_DIR}) diff --git a/mingw-w64-dlib.install b/mingw-w64-dlib.install deleted file mode 100644 index c267fa2824a0..000000000000 --- a/mingw-w64-dlib.install +++ /dev/null @@ -1,9 +0,0 @@ -post_install() { - echo "*****************************************" - echo "** The cmake file has been modified to **" - echo "** work with the pre-build library. **" - echo "** The original file has been renamed **" - echo "** to cmake.orig **" - echo "*****************************************" -} - |