Bug 40450 - lang/pike fails to build on -current, due to missing libgmp (fix attached)
Summary: lang/pike fails to build on -current, due to missing libgmp (fix attached)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-11 09:40 UTC by Stanislav Grozev
Modified: 2002-09-09 18:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Grozev 2002-07-11 09:40:10 UTC
when trying to build the lang/pike port, if you enable gmp functionality
(enabled by default) on -current, it complains for missing libgmp.
that's due to the removal of libgmp from -current base.
the patch adds a check for current, and if so, and gmp is enabled,
adds a LIB_DEPENDS to math/libgmp4

Fix: use the following patch (tested on both -current and -stable):

--- begin patch ---



--- end patch -----9T7z4eesGgUWTkBT1A6KQ6p8iVTYl83Gil9iG0gAYKxmDVlv
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -urN ../pike.orig/Makefile ./Makefile
--- ../pike.orig/Makefile	Thu Jul 11 10:26:20 2002
+++ ./Makefile	Thu Jul 11 10:29:55 2002
@@ -7,6 +7,7 @@
 
 PORTNAME=	pike
 PORTVERSION=	7.0.78
+PORTREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES=	ftp://ftp.roxen.com/pub/pike/all/${PORTVERSION}/
 DISTNAME=	Pike-v${PORTVERSION}
@@ -18,6 +19,9 @@
 USE_SUBMAKE=	yes
 IS_INTERACTIVE=	yes
 GNU_CONFIGURE=  yes
+
+.include <bsd.port.pre.mk>
+
 .if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
 .include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
 .else
@@ -48,4 +52,4 @@
 	${CHOWN} ${SHAREOWN}:${SHAREGRP} ${PREFIX}/include/pike/*.h
 	${CHMOD} ${SHAREMODE} ${PREFIX}/include/pike/*.h
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -urN ../pike.orig/scripts/configure.pike ./scripts/configure.pike
--- ../pike.orig/scripts/configure.pike	Thu Jul 11 10:26:20 2002
+++ ./scripts/configure.pike	Thu Jul 11 10:26:32 2002
@@ -50,6 +50,9 @@
 			threads=1
 			;;
 		\"gmp\")
+			echo '.if ${OSVERSION} >= 500000' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+			echo 'LIB_DEPENDS+=	gmp.6:${PORTSDIR}/math/libgmp4' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+			echo '.endif' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
 			echo "CONFIGURE_ARGS+=	--with-gmp" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
 			gmp=1
 			;;
How-To-Repeat: 
on -current:
cd /usr/ports/lang/pike
sudo make
(and choose gmp)
Comment 1 Dirk Meyer freebsd_committer freebsd_triage 2002-07-17 06:18:59 UTC
Responsible Changed
From-To: freebsd-ports->ports

I will look into it.
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2002-07-17 06:18:59 UTC
Responsible Changed
From-To: freebsd-ports->dinoex

I will look into it.
Comment 3 Dirk Meyer freebsd_committer freebsd_triage 2002-07-17 06:18:59 UTC
Responsible Changed
From-To: freebsd-ports->dinoex

I will look into it.
Comment 4 Dirk Meyer freebsd_committer freebsd_triage 2002-08-23 20:06:34 UTC
State Changed
From-To: open->closed

Committed, Thanks.
Comment 5 Stanislav Grozev 2002-09-02 11:09:30 UTC
On Fri, Aug 23, 2002 at 12:06:55PM -0700, Dirk Meyer wrote:
> Synopsis: lang/pike fails to build on -current, due to missing libgmp (fix attached)
> 
> State-Changed-From-To: open->closed
> State-Changed-By: dinoex
> State-Changed-When: Fri Aug 23 12:06:34 PDT 2002
> State-Changed-Why: 
> Committed, Thanks.
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=40450
> 

yes, but why did you use double-quotes instead of single-quotes, as
in my patch? now ${OSVERSION} is interpolated before the insertion
in Makefile.inc, thus giving an error later. my patch used single
quotes, which take that into account. please fix it correctly.
thanks :-)

-tacho
Comment 6 Dirk Meyer freebsd_committer freebsd_triage 2002-09-09 18:17:18 UTC
State Changed
From-To: analyzed->closed

Fix committed with other changes. Thanks.