Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 May 2010 07:20:36 +0400
From:      Anonymous <swell.k@gmail.com>
To:        jhell <jhell@dataix.net>
Cc:        Stephen Montgomery-Smith <stephen@missouri.edu>, freebsd-ports@freebsd.org
Subject:   Re: How to extract tcl src
Message-ID:  <86ocg7z4l7.fsf@gmail.com>
References:  <4BF85A4A.8060209@missouri.edu> <86632fa5d4.fsf@gmail.com> <4BF88ED7.5020309@dataix.net>

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

jhell <jhell@dataix.net> writes:

> On 05/22/2010 19:23, Anonymous wrote:
>> BUILD_DEPENDS=  ${NONEXISTENT}:${PORTSDIR}/lang/tcl85:extract
>
> Attached is the Makefile I just edited to configure against tcl and tk
> 8.5 instead of 8.4.

I think using bsd.tcl.mk is better idea, see below


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=a.diff

Index: graphics/togl/Makefile
===================================================================
RCS file: /a/.cvsup/ports/graphics/togl/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- graphics/togl/Makefile	22 Aug 2009 00:23:10 -0000	1.20
+++ graphics/togl/Makefile	23 May 2010 03:15:07 -0000
@@ -15,34 +15,30 @@ DISTNAME=	Togl-${PORTVERSION}
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	A Tk OpenGL widget
 
-LIB_DEPENDS=	tk84.1:${PORTSDIR}/x11-toolkits/tk84 \
-		tcl84.1:${PORTSDIR}/lang/tcl84
-
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
 USE_GL=		yes
 USE_XORG=	x11 xt xmu
+USE_TK=		85+
+PATCH_TK_SCRIPTS=*.tcl
 MAKE_ENV=	PTHREAD_LIBS="${PTHREAD_LIBS}" \
 		PTHREAD_CFLAGS="${PTHREAD_CFLAGS}"
-CONFIGURE_ENV=	CFLAGS="-I${LOCALBASE}/include/tk8.4" \
-		LDFLAGS="-L${LOCALBASE}/lib/tk8.4"
-CONFIGURE_ARGS=	--with-tk=${LOCALBASE}/lib/tk8.4 \
-		--with-tcl=${LOCALBASE}/lib/tcl8.4 \
-		--with-tclinclude=${LOCALBASE}/include/tcl8.4 \
+CONFIGURE_ENV=	CFLAGS="-I${TK_INCLUDEDIR}" \
+		LDFLAGS="-L${TK_LIBDIR}"
+CONFIGURE_ARGS=	--with-tk=${TK_LIBDIR} \
+		--with-tcl=${TCL_LIBDIR} \
+		--with-tclinclude=${TCL_INCLUDEDIR} \
 
-TOGL_INSTDIR=	${PREFIX}/lib/tk8.4/${DISTNAME}
+TOGL_INSTDIR=	${TK_LIBDIR:S/${LOCALBASE}/${PREFIX}/}/${DISTNAME}
 PLIST_SUB=	TOGL_INSTDIR=${TOGL_INSTDIR:S,^${PREFIX}/,,}
 
 .if !defined(NOPORTDOCS)
 PORTDOCS=	*
 .endif
 
-post-patch:
-	@${REINPLACE_CMD} -e 's|wish |wish8.4 |' ${WRKSRC}/*.tcl
-
 do-install:
 	@${MKDIR} ${TOGL_INSTDIR}
-	${INSTALL_DATA} ${WRKSRC}/libTogl1.7.so ${TOGL_INSTDIR}/togl.so
+	${INSTALL_DATA} ${WRKSRC}/libTogl${PORTVERSION}.so ${TOGL_INSTDIR}/togl.so
 	${INSTALL_DATA} ${WRKSRC}/togl.h ${WRKSRC}/pkgIndex.tcl ${TOGL_INSTDIR}
 	@${MKDIR} ${EXAMPLESDIR}
 	${INSTALL_DATA} ${WRKSRC}/Makefile ${EXAMPLESDIR}

--=-=-=


And user can override it with WITH_TCL_VER/WITH_TK_VER or the port will
pick up already installed version. I for one use tk86.

>
> I have verified it for functionality (as in) extract, configure, make &
> install only.
>
> Before I made the mods I did not make a original copy so this is why I
> did not provide a unified diff but I have bumped the the PORTREVISION
> from _1 to _2 and it should be ready to be committed as this was a
> pretty trivial change.

You could have used CVS, i.e.

  $ cvs -d$CVSROOT co togl
  <make changes>
  $ cvs diff -up

>
> The most significant change mentioned above was changed to:
> BUILD_DEPENDS=  ${NONEXISTENT}:${PORTSDIR}/lang/tcl85:configure

Well, I've tried to update the port myself but I'm yet to figure out how
to reliably determine ${WRKSRC} from lang/tcl${TCL_VER}. It's easy to do
from a slave port but togl is not one.

>
> This was needed to provide configured values that graphics/togl would
> then read.
>
> Regards,

--=-=-=--



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