pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/geography/mapcode Update geography/mapcode to 2.5.1. F...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0cd307f8a4e2
branches:  trunk
changeset: 354590:0cd307f8a4e2
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Thu Nov 03 15:06:41 2016 +0000

description:
Update geography/mapcode to 2.5.1. Fix cmake build.

2.5.1
- Updated unit test to compile with plain C and added some test cases.

2.5.0
- Added support for getting territory names in English and local
  alphabets.
- Added much improved unit test scripts to run gprof, valgrind,
  the CLang address sanitize and compare the output of the new library
  with and older version.

diffstat:

 geography/mapcode/Makefile                     |  23 +++++++++++++----------
 geography/mapcode/distinfo                     |  11 ++++++-----
 geography/mapcode/patches/patch-CMakeLists.txt |  26 ++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 15 deletions(-)

diffs (90 lines):

diff -r 490b08efaf8e -r 0cd307f8a4e2 geography/mapcode/Makefile
--- a/geography/mapcode/Makefile        Thu Nov 03 14:55:19 2016 +0000
+++ b/geography/mapcode/Makefile        Thu Nov 03 15:06:41 2016 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2016/10/26 10:50:33 fhajny Exp $
+# $NetBSD: Makefile,v 1.3 2016/11/03 15:06:41 fhajny Exp $
 
-DISTNAME=      mapcode-cpp-2.4.0
+DISTNAME=      mapcode-cpp-2.5.1
 PKGNAME=       ${DISTNAME:S/-cpp//}
 CATEGORIES=    geography
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=mapcode-foundation/}
@@ -16,20 +16,23 @@
 USE_LANGUAGES= c c++
 
 # Included CMakeLists is nonsensical
-# USE_CMAKE=   yes
+USE_CMAKE=     yes
+
+CMAKE_ARGS+=           -DCMAKE_BINARY_DIR=${WRKSRC}/build
+
+LDFLAGS.SunOS+=                -lm
 
 PTHREAD_AUTO_VARS=     yes
 
 INSTALLATION_DIRS=     bin include lib
 
-do-build:
-       cd ${WRKSRC}/utility && ${CXX} ${CXXFLAGS} mapcode.cpp -o mapcode
-       cd ${WRKSRC}/mapcodelib && ${CC} ${CFLAGS} -fPIC -shared ${LDFLAGS} mapcoder.c -o libmapcode.so
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/mapcodelib/mapcoder.h ${DESTDIR}${PREFIX}/include/mapcode.h
+       ${INSTALL_PROGRAM} ${WRKSRC}/build/mapcode ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_LIB} ${WRKSRC}/build/libmapcode.so ${DESTDIR}${PREFIX}/lib
 
-do-install:
-       ${INSTALL_PROGRAM} ${WRKSRC}/utility/mapcode ${DESTDIR}${PREFIX}/bin
-       ${INSTALL_DATA} ${WRKSRC}/mapcodelib/mapcoder.h ${DESTDIR}${PREFIX}/include/mapcode.h
-       ${INSTALL_LIB} ${WRKSRC}/mapcodelib/libmapcode.so ${DESTDIR}${PREFIX}/lib
+do-test:
+       cd ${WRKSRC}/unittest && ${SETENV} ${TEST_ENV} LD_LIBRARY_PATH=${WRKSRC}/build ${WRKSRC}/build/unittest
 
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 490b08efaf8e -r 0cd307f8a4e2 geography/mapcode/distinfo
--- a/geography/mapcode/distinfo        Thu Nov 03 14:55:19 2016 +0000
+++ b/geography/mapcode/distinfo        Thu Nov 03 15:06:41 2016 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2016/10/26 10:50:33 fhajny Exp $
+$NetBSD: distinfo,v 1.3 2016/11/03 15:06:41 fhajny Exp $
 
-SHA1 (mapcode-cpp-2.4.0.tar.gz) = 393cdb4cb935847d122bc09f351c9f639b6fa96e
-RMD160 (mapcode-cpp-2.4.0.tar.gz) = 2ffff7a096bbab58571f7ac8223ad86f602a67e4
-SHA512 (mapcode-cpp-2.4.0.tar.gz) = 657543dcc31433d48a33cf3e499f33581d7f2b01c6fe5f203a811d31d82df13e869a914098ed9d1ade349b929012d2b91175f55074b34a9fcb7af49fa556fc7a
-Size (mapcode-cpp-2.4.0.tar.gz) = 990523 bytes
+SHA1 (mapcode-cpp-2.5.1.tar.gz) = d988b54e7303067959c32d9f09fe58bbfbc6b4ad
+RMD160 (mapcode-cpp-2.5.1.tar.gz) = 249060a872ad83599c77556f9002cef9d48cb182
+SHA512 (mapcode-cpp-2.5.1.tar.gz) = 01a14a12c233be40f3014d535fba418685f327a1e7b59b41d8931fd7376f85049c81f35eec7b307b809f484fe2e6b513604f30dc7702c07ed606705c1f07f275
+Size (mapcode-cpp-2.5.1.tar.gz) = 1043969 bytes
+SHA1 (patch-CMakeLists.txt) = 4d029bd3666278d52aa41e9ea831b5f5544555c1
diff -r 490b08efaf8e -r 0cd307f8a4e2 geography/mapcode/patches/patch-CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/geography/mapcode/patches/patch-CMakeLists.txt    Thu Nov 03 15:06:41 2016 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2016/11/03 15:06:41 fhajny Exp $
+
+Fix cmake build, ensure sane lib name.
+
+--- CMakeLists.txt.orig        2016-11-02 12:47:12.000000000 +0000
++++ CMakeLists.txt
+@@ -43,6 +43,9 @@ set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${MAPC
+ set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${MAPCODE_SANITIZER_LINKER_OPTIONS}")
+ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "")
+ 
++set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/build" )
++set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/build" )
++
+ set(SOURCE_FILES_MAPCODELIB
+         mapcodelib/internal_data.h
+         mapcodelib/internal_alphabet_recognizer.h
+@@ -65,7 +68,8 @@ set(SOURCE_FILES_UNITTEST
+ set(SOURCE_FILES_UTILITY
+         utility/mapcode.cpp)
+ 
+-add_library(mapcodelib ${SOURCE_FILES_MAPCODELIB})
++add_library(mapcodelib SHARED ${SOURCE_FILES_MAPCODELIB})
++set_target_properties(mapcodelib PROPERTIES OUTPUT_NAME mapcode)
+ target_include_directories(mapcodelib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+ 
+ add_executable(unittest ${SOURCE_FILES_UNITTEST})



Home | Main Index | Thread Index | Old Index