View | Details | Raw Unified | Return to bug 222348
Collapse All | Expand All

(-)textproc/pugixml/Makefile (-3 / +3 lines)
Lines 1-8 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	pugixml
3
PORTNAME=	pugixml
4
PORTVERSION=	1.7
4
PORTVERSION=	1.8.1
5
PORTREVISION=	2
6
CATEGORIES=	textproc
5
CATEGORIES=	textproc
7
MASTER_SITES=	https://github.com/zeux/pugixml/releases/download/v${PORTVERSION}/
6
MASTER_SITES=	https://github.com/zeux/pugixml/releases/download/v${PORTVERSION}/
8
7
Lines 12-19 Link Here
12
LICENSE=	MIT
11
LICENSE=	MIT
13
12
14
USES=		cmake compiler:c++11-lang
13
USES=		cmake compiler:c++11-lang
15
CMAKE_SOURCE_PATH=	${WRKSRC}/scripts
16
14
17
CXXFLAGS+=	-std=c++11
15
CXXFLAGS+=	-std=c++11
16
WRKSRC=		${WRKDIR}/${PORTNAME}-1.8
17
CMAKE_ARGS=	-DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_TESTS=OFF -DBUILD_PKGCONFIG=ON
18
18
19
.include <bsd.port.mk>
19
.include <bsd.port.mk>
(-)textproc/pugixml/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (pugixml-1.7.tar.gz) = fbe10d46f61d769f7d92a296102e4e2bd3ee16130f11c5b10a1aae590ea1f5ca
1
TIMESTAMP = 1505424287
2
SIZE (pugixml-1.7.tar.gz) = 354472
2
SHA256 (pugixml-1.8.1.tar.gz) = 00d974a1308e85ca0677a981adc1b2855cb060923181053fb0abf4e2f37b8f39
3
SIZE (pugixml-1.8.1.tar.gz) = 357846
(-)textproc/pugixml/files/patch-CMakeLists.txt (+62 lines)
Line 0 Link Here
1
--- CMakeLists.txt.orig	2016-11-27 15:48:03.000000000 -0500
2
+++ CMakeLists.txt	2017-09-14 18:31:07.892853000 -0400
3
@@ -2,7 +2,8 @@
4
 
5
 cmake_minimum_required(VERSION 2.6)
6
 
7
-option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF)
8
+option(BUILD_SHARED_LIBS "Build shared library" OFF)
9
+option(BUILD_STATIC_LIBS "Build static library" OFF)
10
 option(BUILD_TESTS "Build tests" OFF)
11
 option(BUILD_PKGCONFIG "Build in PKGCONFIG mode" OFF)
12
 
13
@@ -38,28 +39,27 @@
14
 
15
 if(BUILD_SHARED_LIBS)
16
 	add_library(pugixml SHARED ${SOURCES})
17
-else()
18
-	add_library(pugixml STATIC ${SOURCES})
19
+        set_target_properties(pugixml PROPERTIES VERSION 1.8 SOVERSION 1)
20
+        install(TARGETS pugixml EXPORT pugixml-config
21
+        	ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
22
+        	LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
23
+        	RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
24
 endif()
25
+if(BUILD_STATIC_LIBS)
26
+        add_library(pugixml_static STATIC ${SOURCES})
27
+        set_target_properties(pugixml_static PROPERTIES OUTPUT_NAME pugixml)
28
+        install(TARGETS pugixml_static
29
+        	ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
30
+        	LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
31
+        	RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
32
+endif()
33
 
34
 # Enable C++11 long long for compilers that are capable of it
35
 if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1 AND ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_long_long_type;")
36
 	target_compile_features(pugixml PUBLIC cxx_long_long_type)
37
 endif()
38
 
39
-set_target_properties(pugixml PROPERTIES VERSION 1.8 SOVERSION 1)
40
-get_target_property(PUGIXML_VERSION_STRING pugixml VERSION)
41
-
42
-if(BUILD_PKGCONFIG)
43
-	# Install library into its own directory under LIBDIR
44
-	set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING})
45
-endif()
46
-
47
-install(TARGETS pugixml EXPORT pugixml-config
48
-	ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX}
49
-	LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX}
50
-	RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
51
-install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX})
52
+install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
53
 install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)
54
 
55
 if(BUILD_PKGCONFIG)
56
@@ -75,4 +75,4 @@
57
 	add_executable(check ${TEST_SOURCES})
58
 	target_link_libraries(check pugixml)
59
 	add_custom_command(TARGET check POST_BUILD COMMAND check WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
60
-endif()
61
\ No newline at end of file
62
+endif()
(-)textproc/pugixml/files/patch-scripts_CMakeLists.txt (-34 lines)
Lines 1-34 Link Here
1
--- scripts/CMakeLists.txt.orig	2015-10-19 06:15:50.000000000 +0300
2
+++ scripts/CMakeLists.txt	2016-06-20 22:08:33.133152000 +0300
3
@@ -19,27 +19,19 @@
4
 	endforeach()
5
 endif()
6
 
7
-if(BUILD_SHARED_LIBS)
8
-	add_library(pugixml SHARED ${SOURCES})
9
-else()
10
-	add_library(pugixml STATIC ${SOURCES})
11
-endif()
12
-
13
-# Enable C++11 long long for compilers that are capable of it
14
-if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1)
15
-	target_compile_features(pugixml PUBLIC cxx_long_long_type)
16
-endif()
17
+add_library(pugixml SHARED ${SOURCES})
18
+add_library(pugixml_static STATIC ${SOURCES})
19
 
20
 set_target_properties(pugixml PROPERTIES VERSION 1.7 SOVERSION 1)
21
+set_target_properties(pugixml_static PROPERTIES OUTPUT_NAME pugixml)
22
 
23
-install(TARGETS pugixml EXPORT pugixml-config 
24
+install(TARGETS pugixml pugixml_static
25
 	ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
26
 	LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
27
 	RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
28
 )
29
 
30
 install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
31
-install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)
32
 
33
 if(BUILD_TESTS)
34
 	file(GLOB TEST_SOURCES ../tests/*.cpp)
(-)textproc/pugixml/files/patch-scripts_pugixml.pc.in (+18 lines)
Line 0 Link Here
1
--- scripts/pugixml.pc.in.orig	2017-09-14 18:05:00.281262000 -0400
2
+++ scripts/pugixml.pc.in	2017-09-14 18:05:14.312398000 -0400
3
@@ -1,11 +1,11 @@
4
 prefix=@CMAKE_INSTALL_PREFIX@
5
 exec_prefix=${prefix}
6
-includedir=${prefix}/include/pugixml-@PUGIXML_VERSION_STRING@
7
-libdir=${exec_prefix}/lib/pugixml-@PUGIXML_VERSION_STRING@
8
+includedir=${prefix}/include
9
+libdir=${exec_prefix}/lib
10
 
11
 Name: pugixml
12
 Description: Light-weight, simple and fast XML parser for C++ with XPath support.
13
 URL: http://pugixml.org/
14
 Version: @PUGIXML_VERSION_STRING@
15
 Cflags: -I${includedir}
16
-Libs: -L${libdir} -lpugixml
17
\ No newline at end of file
18
+Libs: -L${libdir} -lpugixml
(-)textproc/pugixml/pkg-plist (-1 / +4 lines)
Lines 1-6 Link Here
1
include/pugiconfig.hpp
1
include/pugiconfig.hpp
2
include/pugixml.hpp
2
include/pugixml.hpp
3
lib/cmake/pugixml/pugixml-config-%%CMAKE_BUILD_TYPE%%.cmake
4
lib/cmake/pugixml/pugixml-config.cmake
3
lib/libpugixml.a
5
lib/libpugixml.a
4
lib/libpugixml.so
6
lib/libpugixml.so
5
lib/libpugixml.so.1
7
lib/libpugixml.so.1
6
lib/libpugixml.so.1.7
8
lib/libpugixml.so.1.8
9
libdata/pkgconfig/pugixml.pc

Return to bug 222348