Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Oct 2012 12:45:17 GMT
From:      Rainer Hurling <rhurlin@gwdg.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/172660: [patch] science/libkml: Build error when swig is installed
Message-ID:  <201210131245.q9DCjH4E073471@red.freebsd.org>
Resent-Message-ID: <201210131250.q9DCo1Qd044105@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172660
>Category:       ports
>Synopsis:       [patch] science/libkml: Build error when swig is installed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 13 12:50:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Rainer Hurling
>Release:        10.0-CURRENT amd64
>Organization:
>Environment:
FreeBSD xxx.xxx.xxx 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r241500: Sat Oct 13 11:45:23 CEST 2012     xxx@xxx.xxx.xxx:/usr/obj/usr/src/sys/XXX  amd64
>Description:
At least on 10.0-CURRENT I get a build error if swig-1.3.40 is installed already: 

./configure: ${SWIG_VERSION:4}: Bad substitution
===>  Script "configure" failed unexpectedly.

Obviously the configure script is not able to recognize the swig version correctly.

While here do the following additions
- Introduce option 'SWIG bindings'
- Trim header to one line (if Wen@ agrees)
- Increment PORTREVISION


>How-To-Repeat:
Install devel/swig13 and afterwards try to build science/libkml.

>Fix:
I am not sure if the patch for configure corrects the problem in the right way:

-		if test ${SWIG_VERSION:4} -lt 35; then
+		if test ${SWIG_VERSION} -lt 35; then



Patch attached with submission follows:

diff -Naur libkml.orig/Makefile libkml/Makefile
--- libkml.orig/Makefile	2012-08-04 11:28:57.000000000 +0200
+++ libkml/Makefile	2012-10-13 14:09:53.000000000 +0200
@@ -1,12 +1,11 @@
-# New ports collection makefile for:	libkml
-# Date created:				3rd Oct, 2009
-# Whom:					Wen Heping <wen@FreeBSD.org>
+# Created by: Wen Heping <wen@FreeBSD.org>
 #
 # $FreeBSD: head/science/libkml/Makefile 301960 2012-08-03 15:54:35Z cs $
 #
 
 PORTNAME=	libkml
 PORTVERSION=	1.2.0
+PORTREVISION=	1
 CATEGORIES=	science
 MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
 
@@ -16,6 +15,18 @@
 BUILD_DEPENDS=	${LOCALBASE}/include/expat.h:${PORTSDIR}/textproc/expat2 \
 		${LOCALBASE}/bin/curl-config:${PORTSDIR}/ftp/curl
 
+OPTIONS_DEFINE=	SWIG
+OPTIONS_DEFAULT=	SWIG
+SWIG_DESC=	SWIG bindings
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MSWIG}
+BUILD_DEPENDS+=	swig:${PORTSDIR}/devel/swig13
+.else
+CONFIGURE_ARGS+=	--disable-swig
+.endif
+
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 USE_LDCONFIG=	yes
diff -Naur libkml.orig/files/patch-configure libkml/files/patch-configure
--- libkml.orig/files/patch-configure	1970-01-01 01:00:00.000000000 +0100
+++ libkml/files/patch-configure	2012-10-13 13:18:27.000000000 +0200
@@ -0,0 +1,11 @@
+--- configure.orig	2010-01-14 01:17:29.000000000 +0100
++++ configure	2012-10-13 13:17:45.000000000 +0200
+@@ -16934,7 +16934,7 @@
+ 
+ 	if test "x$SWIG" != x; then
+ 		SWIG_VERSION=`swig -version 2>&1|grep Version|cut -d" " -f3`
+-		if test ${SWIG_VERSION:4} -lt 35; then
++		if test ${SWIG_VERSION} -lt 35; then
+ 			{ $as_echo "$as_me:$LINENO: WARNING: You have SWIG $SWIG_VERSION installed, but libkml requires at least SWIG 1.3.35. The bindings will not be built." >&5
+ $as_echo "$as_me: WARNING: You have SWIG $SWIG_VERSION installed, but libkml requires at least SWIG 1.3.35. The bindings will not be built." >&2;}
+ 			SWIG=


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210131245.q9DCjH4E073471>