[136039] trunk/dports
ryandesign at macports.org
ryandesign at macports.org
Sun May 10 10:07:04 PDT 2015
Revision: 136039
https://trac.macports.org/changeset/136039
Author: ryandesign at macports.org
Date: 2015-05-10 10:07:04 -0700 (Sun, 10 May 2015)
Log Message:
-----------
libkml: use the liburiparser installed by the uriparser port rather than installing a conflicting copy (#41271)
Modified Paths:
--------------
trunk/dports/devel/uriparser/Portfile
trunk/dports/gis/libkml/Portfile
Added Paths:
-----------
trunk/dports/gis/libkml/files/patch-configure.ac.diff
trunk/dports/gis/libkml/files/patch-support-external-liburiparse-and-boost.diff
Removed Paths:
-------------
trunk/dports/gis/libkml/files/patch-src_kml_base_file_posix.cc.diff
Modified: trunk/dports/devel/uriparser/Portfile
===================================================================
--- trunk/dports/devel/uriparser/Portfile 2015-05-10 17:02:28 UTC (rev 136038)
+++ trunk/dports/devel/uriparser/Portfile 2015-05-10 17:07:04 UTC (rev 136039)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
@@ -3,6 +4,6 @@
name uriparser
-conflicts libkml
version 0.8.2
+revision 1
categories devel www
maintainers ryandesign openmaintainer
@@ -29,4 +30,18 @@
test.run yes
test.target check
+# Needed by libkml's build system.
+destroot.delete_la_files no
+
+pre-activate {
+ # libkml @1.2.0_1 and earlier installed a copy of liburiparser.dylib.
+ if {![catch {set installed [lindex [registry_active libkml] 0]}]} {
+ set _version [lindex $installed 1]
+ set _revision [lindex $installed 2]
+ if {[vercmp $_version 1.2.0] < 0 || ([vercmp $_version 1.2.0] == 0 && $_revision <= 1)} {
+ registry_deactivate_composite libkml "" [list ports_nodepcheck 1]
+ }
+ }
+}
+
livecheck.regex /${name}-(\[0-9.\]+)${extract.suffix}
Modified: trunk/dports/gis/libkml/Portfile
===================================================================
--- trunk/dports/gis/libkml/Portfile 2015-05-10 17:02:28 UTC (rev 136038)
+++ trunk/dports/gis/libkml/Portfile 2015-05-10 17:07:04 UTC (rev 136039)
@@ -4,9 +4,8 @@
PortSystem 1.0
name libkml
-conflicts uriparser
version 1.2.0
-revision 1
+revision 2
license BSD
platforms darwin
categories gis
@@ -21,43 +20,56 @@
homepage http://code.google.com/p/libkml/
master_sites googlecode
+# Development might move to one of these forks:
+# https://github.com/google/libkml
+# https://github.com/CPB9/libkml
+# https://github.com/libkml/libkml
+
checksums md5 25d534437f971bf55a945608e39fea79 \
sha1 3fa5acdc2b2185d7f0316d205002b7162f079894 \
rmd160 f73ed3ce47d38c5d45bd04c9498a847b24c572da
-# Not sure what needs cURL, but the configure script looks for it
-depends_build-append port:curl
+# If curl is found, the networking examples will be built. There is no
+# configure flag to turn this off, but the examples are not installed.
+#depends_build-append port:curl
depends_lib-append port:expat \
+ port:uriparser \
port:zlib
-patchfiles patch-src_kml_base_file_posix.cc.diff
+patchfiles patch-configure.ac.diff \
+ patch-support-external-liburiparse-and-boost.diff
post-patch {
# Fix build with clang
fs-traverse f ${worksrcpath} {
switch [file tail ${f}] {
- Makefile.in {
+ Makefile.am {
reinplace "s| -Werror||g" ${f}
}
}
}
}
-# Otherwise SWIG will be used if it's installed
-configure.args-append --disable-swig
+use_autoreconf yes
+configure.args-append --disable-dependency-tracking \
+ --disable-silent-rules \
+ --disable-swig \
+ --with-liburiparser=${prefix} \
+ --without-boost
+
test.run yes
test.target check
post-destroot {
- set docdir ${destroot}${prefix}/share/doc/${name}
- xinstall -d ${docdir}
+ set docdir ${prefix}/share/doc/${subport}
+ xinstall -d ${destroot}${docdir}
xinstall -W ${worksrcpath} -m 644 \
AUTHORS \
COPYING \
ChangeLog \
NEWS \
README \
- ${docdir}
+ ${destroot}${docdir}
}
Added: trunk/dports/gis/libkml/files/patch-configure.ac.diff
===================================================================
--- trunk/dports/gis/libkml/files/patch-configure.ac.diff (rev 0)
+++ trunk/dports/gis/libkml/files/patch-configure.ac.diff 2015-05-10 17:07:04 UTC (rev 136039)
@@ -0,0 +1,16 @@
+Fix autoreconf with autoconf 1.12+ by adding AM_PROG_AR
+https://code.google.com/p/libkml/issues/detail?id=186
+Fix autoreconf with autoconf 1.14+ by adding subdir-objects
+https://code.google.com/p/libkml/issues/detail?id=190
+--- configure.ac.orig 2010-01-13 18:16:35.000000000 -0600
++++ configure.ac 2015-05-10 08:16:51.000000000 -0500
+@@ -6,7 +6,8 @@
+ AC_INIT(libkml, 1.2.0, http://code.google.com/p/libkml/issues)
+ AC_CONFIG_SRCDIR(README)
+ AC_CONFIG_AUX_DIR(config)
+-AM_INIT_AUTOMAKE(-Wall -Werror)
++AM_INIT_AUTOMAKE(-Wall -Werror subdir-objects)
++m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+
+ AC_PROG_CPP
+ AC_PROG_CXX
Deleted: trunk/dports/gis/libkml/files/patch-src_kml_base_file_posix.cc.diff
===================================================================
--- trunk/dports/gis/libkml/files/patch-src_kml_base_file_posix.cc.diff 2015-05-10 17:02:28 UTC (rev 136038)
+++ trunk/dports/gis/libkml/files/patch-src_kml_base_file_posix.cc.diff 2015-05-10 17:07:04 UTC (rev 136039)
@@ -1,10 +0,0 @@
---- src/kml/base/file_posix.cc.orig 2013-11-07 13:58:08.000000000 +0400
-+++ src/kml/base/file_posix.cc 2013-11-07 13:58:19.000000000 +0400
-@@ -29,6 +29,7 @@
- #include "kml/base/file.h"
- #include <stdlib.h>
- #include <string.h>
-+#include <unistd.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-
Added: trunk/dports/gis/libkml/files/patch-support-external-liburiparse-and-boost.diff
===================================================================
--- trunk/dports/gis/libkml/files/patch-support-external-liburiparse-and-boost.diff (rev 0)
+++ trunk/dports/gis/libkml/files/patch-support-external-liburiparse-and-boost.diff 2015-05-10 17:07:04 UTC (rev 136039)
@@ -0,0 +1,319 @@
+Support external liburiparse and boost
+https://code.google.com/p/libkml/issues/detail?id=50
+--- configure.ac.orig
++++ configure.ac
+@@ -20,6 +20,8 @@ AC_FUNC_STRTOD
+ AC_HEADER_STDBOOL
+ AC_TYPE_SIZE_T
+
++m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])dnl backward compat
++
+ dnl Let Makefile know if we are GCC.
+ AM_CONDITIONAL(GCC, test "$GCC" = yes)
+
+@@ -68,6 +70,49 @@ AC_ARG_WITH(python-lib-dir,
+ [PYTHON_LIB_DIR=$withval],)
+ AC_SUBST(PYTHON_LIB_DIR)
+
++dnl use libs from system or our third_party?
++dnl CPPFLAGS_saved="$CPPFLAGS"
++internal_boost_version="_1_34_1"
++AC_LANG_PUSH(C++)
++AC_ARG_WITH([boost],
++ AC_HELP_STRING([--with-boost=DIR], [look in DIR for boost]),
++ [BOOST_INCS=$withval/include
++ test -d ${BOOST_INCS} \
++ && AS_VAR_APPEND([CPPFLAGS],[" -I$BOOST_INCS"])
++ AC_CHECK_HEADERS([boost/shared_ptr.hpp],,
++ [AC_MSG_ERROR([Required $ac_header not found])])
++ ],
++ [AC_CHECK_HEADERS([boost/shared_ptr.hpp],,
++ [AC_MSG_WARN([Using third_party/boost$internal_boost_version])
++ BOOST_INCS="\$(top_srcdir)/third_party/boost$internal_boost_version"
++dnl AS_VAR_APPEND([CPPFLAGS],[" -I\$(top_srcdir)/$BOOST_INCS"])
++ ])
++ ])
++AC_LANG_POP
++dnl CPPFLAGS="$CPPFLAGS_saved"
++AC_SUBST(BOOST_INCS)
++AM_CONDITIONAL([INTERNAL_BOOST], [test "x$BOOST_INCS" = "xthird_party/boost$internal_boost_version"])
++
++dnl FIXME: Allow for using distro's zlib
++AM_CONDITIONAL([INTERNAL_ZLIB], [true])
++
++internal_uriparser_version="-0.7.5"
++CPPFLAGS_saved="$CPPFLAGS"
++AC_ARG_WITH([liburiparser],
++ AC_HELP_STRING([--with-liburiparser=DIR], [look in DIR for liburiparser]),
++ [LIBURIPARSER_DIR=$withval
++ test -d ${LIBURIPARSER_DIR}/include \
++ && AS_VAR_APPEND([CPPFLAGS],[" -I$LIBURIPARSER_DIR/include"])
++ AC_CHECK_HEADERS([uriparser/Uri.h],,
++ [AC_MSG_ERROR([Required $ac_header not found])])
++ ],
++ [AC_CHECK_HEADERS([uriparser/Uri.h],,
++ [AC_MSG_WARN([Using third_party/uriparser$internal_uriparser_version])
++ LIBURIPARSER_DIR="third_party/uriparser$internal_uriparser_version"
++ ])
++ ])
++AC_SUBST(LIBURIPARSER_DIR)
++AM_CONDITIONAL([INTERNAL_LIBURIPARSER], [test "x$LIBURIPARSER_DIR" = "xthird_party/uriparser$internal_uriparser_version"])
+
+ AC_CHECK_HEADERS(expat.h, [expat_h_found="yes"], [expat_h_found="no"])
+ if test $expat_h_found = "no"
+@@ -78,7 +123,10 @@ AC_CHECK_LIB(expat, XML_ParserCreate, [],
+ AC_MSG_ERROR("Expat library not found. Use configure --help to see how to specify the search path"))
+
+ AC_CHECK_HEADERS([float.h limits.h stdlib.h string.h])
+-AC_CHECK_FUNCS([floor memset strstr])
++dnl saved_LIBS=$LIBS
++dnl AC_SEARCH_LIBS([floor], [m])
++AC_CHECK_LIB([m], [floor])
++AC_CHECK_FUNCS([memset strstr])
+
+ dnl If SWIG is available we will try to generate bindings.
+ AC_ARG_ENABLE(swig,
+--- examples/engine/Makefile.am.orig
++++ examples/engine/Makefile.am
+@@ -1,5 +1,5 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+- -I$(top_srcdir)/third_party/boost_1_34_1
++ -I at BOOST_INCS@
+
+ if GCC
+ AM_CXXFLAGS = -Wall -Werror -ansi -pedantic -fno-rtti
+--- examples/gpx/Makefile.am.orig
++++ examples/gpx/Makefile.am
+@@ -1,5 +1,5 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+- -I$(top_srcdir)/third_party/boost_1_34_1
++ -I at BOOST_INCS@
+
+ if GCC
+ AM_CXXFLAGS = -Wall -Werror -ansi -pedantic -fno-rtti
+--- examples/gx/Makefile.am.orig
++++ examples/gx/Makefile.am
+@@ -1,5 +1,5 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+- -I$(top_srcdir)/third_party/boost_1_34_1
++ -I at BOOST_INCS@
+
+ if GCC
+ AM_CXXFLAGS = -Wall -Werror -ansi -pedantic -fno-rtti
+--- examples/hellonet/Makefile.am.orig
++++ examples/hellonet/Makefile.am
+@@ -1,7 +1,7 @@
+ if HAVE_CURL
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+ -I$(top_srcdir)/examples/hellonet \
+- -I$(top_srcdir)/third_party/boost_1_34_1
++ -I at BOOST_INCS@
+
+ if GCC
+ AM_CXXFLAGS = -Wall -Werror -ansi -pedantic -fno-rtti
+--- examples/helloworld/Makefile.am.orig
++++ examples/helloworld/Makefile.am
+@@ -1,6 +1,6 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+ -I$(top_srcdir)/examples/helloworld \
+- -I$(top_srcdir)/third_party/boost_1_34_1
++ -I at BOOST_INCS@
+
+
+ if GCC
+--- examples/regionator/Makefile.am.orig
++++ examples/regionator/Makefile.am
+@@ -1,5 +1,5 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+- -I$(top_srcdir)/third_party/boost_1_34_1 \
++ -I at BOOST_INCS@ \
+ -I$(top_srcdir)/third_party/zlib-1.2.3/contrib
+
+ if GCC
+--- examples/xsd/Makefile.am.orig
++++ examples/xsd/Makefile.am
+@@ -1,6 +1,6 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+ -I$(top_srcdir)/examples/xsd \
+- -I$(top_srcdir)/third_party/boost_1_34_1
++ -I at BOOST_INCS@
+
+ if GCC
+ AM_CXXFLAGS = -Wall -Werror -ansi -pedantic -fno-rtti
+--- src/kml/base/Makefile.am.orig
++++ src/kml/base/Makefile.am
+@@ -1,8 +1,6 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+- -I$(top_srcdir)/third_party/boost_1_34_1 \
+- -I$(top_srcdir)/third_party/googletest-r108/include \
+- -I$(top_srcdir)/third_party/uriparser-0.7.5/include \
+- -I$(top_srcdir)/third_party/zlib-1.2.3/contrib
++ -I at BOOST_INCS@ \
++ -I$(top_srcdir)/third_party/googletest-r108/include
+
+ if GCC
+ AM_CXXFLAGS = -Wall -Wextra -Wno-unused-parameter -Werror -ansi -pedantic -fno-rtti
+@@ -30,9 +28,19 @@ libkmlbase_la_SOURCES = \
+ xml_namespaces.cc \
+ zip_file.cc
+
+-libkmlbase_la_LIBADD = \
+- $(top_builddir)/third_party/libminizip.la \
+- $(top_builddir)/third_party/liburiparser.la
++libkmlbase_la_LIBADD =
++if INTERNAL_ZLIB
++libkmlbase_la_LIBADD += \
++ $(top_builddir)/third_party/libminizip.la
++AM_CPPFLAGS += -I$(top_srcdir)/third_party/zlib-1.2.3/contrib
++endif
++if INTERNAL_LIBURIPARSER
++AM_CPPFLAGS += -I$(top_srcdir)/@LIBURIPARSER_DIR@/include
++liburiparser_la_file = $(top_builddir)/third_party/liburiparser.la
++else
++liburiparser_la_file = $(LIBURIPARSER_DIR)/lib/liburiparser.la
++endif
++libkmlbase_la_LIBADD += $(liburiparser_la_file)
+
+ # These header files will be installed in $(includedir)/kml/base
+ libkmlbaseincludedir = $(includedir)/kml/base
+@@ -138,7 +146,6 @@ math_util_test_LDADD = libkmlbase.la \
+ net_cache_test_SOURCES = net_cache_test.cc
+ net_cache_test_CXXFLAGS = -DDATADIR=\"$(DATA_DIR)\" $(AM_TEST_CXXFLAGS)
+ net_cache_test_LDADD = libkmlbase.la \
+- $(top_builddir)/third_party/liburiparser.la \
+ $(top_builddir)/third_party/libgtest.la
+
+ referent_test_SOURCES = referent_test.cc
+@@ -164,7 +171,6 @@ time_util_test_LDADD= libkmlbase.la \
+ uri_parser_test_SOURCES = uri_parser_test.cc
+ uri_parser_test_CXXFLAGS = -DDATADIR=\"$(DATA_DIR)\" $(AM_TEST_CXXFLAGS)
+ uri_parser_test_LDADD= libkmlbase.la \
+- $(top_builddir)/third_party/liburiparser.la \
+ $(top_builddir)/third_party/libgtest.la
+
+ util_test_SOURCES = util_test.cc
+--- src/kml/base/file_posix.cc.orig
++++ src/kml/base/file_posix.cc
+@@ -25,8 +25,10 @@
+
+ // The file contains the implementation of the File methods specific to
+ // POSIX platforms.
++// err.. Ever heard about boost::filesystem?
+
+ #include "kml/base/file.h"
++#include <unistd.h> /* unlink() */
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+--- src/kml/convenience/Makefile.am.orig
++++ src/kml/convenience/Makefile.am
+@@ -1,5 +1,5 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+- -I$(top_srcdir)/third_party/boost_1_34_1 \
++ -I at BOOST_INCS@ \
+ -I$(top_srcdir)/third_party/googletest-r108/include
+
+ if GCC
+--- src/kml/dom/Makefile.am.orig
++++ src/kml/dom/Makefile.am
+@@ -1,5 +1,5 @@
+ AM_CPPFLAGS= -I$(top_srcdir)/src \
+- -I$(top_srcdir)/third_party/boost_1_34_1 \
++ -I at BOOST_INCS@ \
+ -I$(top_srcdir)/third_party/googletest-r108/include
+
+ if GCC
+--- src/kml/engine/Makefile.am.orig
++++ src/kml/engine/Makefile.am
+@@ -1,5 +1,5 @@
+ AM_CPPFLAGS= -I$(top_srcdir)/src \
+- -I$(top_srcdir)/third_party/boost_1_34_1 \
++ -I at BOOST_INCS@ \
+ -I$(top_srcdir)/third_party/googletest-r108/include
+
+ if GCC
+--- src/kml/regionator/Makefile.am.orig
++++ src/kml/regionator/Makefile.am
+@@ -1,5 +1,5 @@
+ AM_CPPFLAGS= -I$(top_srcdir)/src \
+- -I$(top_srcdir)/third_party/boost_1_34_1 \
++ -I at BOOST_INCS@ \
+ -I$(top_srcdir)/third_party/googletest-r108/include
+
+
+--- src/kml/xsd/Makefile.am.orig
++++ src/kml/xsd/Makefile.am
+@@ -1,5 +1,5 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+- -I$(top_srcdir)/third_party/boost_1_34_1 \
++ -I at BOOST_INCS@ \
+ -I$(top_srcdir)/third_party/googletest-r108/include
+
+ if GCC
+--- src/swig/Makefile.am.orig
++++ src/swig/Makefile.am
+@@ -1,7 +1,7 @@
+ SUBDIRS = java python
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+- -I$(top_srcdir)/third_party/boost_1_34_1 \
++ -I at BOOST_INCS@ \
+ -I$(top_srcdir)/third_party/uriparser-0.7.5/include
+
+ COMMONLIBS = $(top_builddir)/src/kml/engine/libkmlengine.la \
+--- third_party/Makefile.am.orig
++++ third_party/Makefile.am
+@@ -1,19 +1,26 @@
+ uriparser = uriparser-0.7.5
+
+-AM_CPPFLAGS = -I$(top_srcdir)/third_party/zlib-1.2.3/contrib \
+- -I$(top_srcdir)/third_party/$(uriparser)/include \
+- -I$(top_srcdir)/third_party/googletest-r108 \
+- -I$(top_srcdir)/third_party/googletest-r108/include
++AM_CPPFLAGS =
+
+-lib_LTLIBRARIES = libminizip.la liburiparser.la
++lib_LTLIBRARIES =
+ noinst_LTLIBRARIES = libgtest.la
+
++if INTERNAL_ZLIB
++AM_CPPFLAGS += -I$(top_srcdir)/third_party/zlib-1.2.3/contrib
++lib_LTLIBRARIES += libminizip.la
++
+ libminizip_la_SOURCES = \
+ zlib-1.2.3/contrib/minizip/unzip.c \
+ zlib-1.2.3/contrib/minizip/ioapi.c \
+ zlib-1.2.3/contrib/minizip/iomem_simple.c \
+ zlib-1.2.3/contrib/minizip/zip.c
+ libminizip_la_LDFLAGS = -lz
++endif
++
++
++if INTERNAL_LIBURIPARSER
++AM_CPPFLAGS += -I$(top_srcdir)/third_party/$(uriparser)/include
++lib_LTLIBRARIES += liburiparser.la
+
+ liburiparser_la_SOURCES = \
+ $(uriparser)/lib/UriCommon.c \
+@@ -35,7 +42,10 @@ liburiparser_la_SOURCES = \
+ $(uriparser)/lib/UriResolve.c \
+ $(uriparser)/lib/UriShorten.c
+ liburiparser_la_LDFLAGS = -version-info 1:5:0
++endif
+
++
++if INTERNAL_BOOST
+ boost_root = boost_1_34_1
+ boost = $(boost_root)/boost
+ boostinc = $(includedir)/kml/third_party/$(boost)
+@@ -76,6 +86,10 @@ libboostconfigplatformincludedir = $(boostinc)/config/platform
+ libboostconfigplatforminclude_HEADERS = \
+ $(boost)/config/platform/linux.hpp \
+ $(boost)/config/platform/macos.hpp
++endif
++
++AM_CPPFLAGS += -I$(top_srcdir)/third_party/googletest-r108 \
++ -I$(top_srcdir)/third_party/googletest-r108/include
+
+ googletest = googletest-r108
+ libgtest_la_SOURCES = \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150510/b22ee026/attachment-0001.html>
More information about the macports-changes
mailing list