Index: head/devel/libdistance/Makefile =================================================================== --- head/devel/libdistance/Makefile (revision 458027) +++ head/devel/libdistance/Makefile (revision 458028) @@ -1,28 +1,32 @@ # $FreeBSD$ PORTNAME= libdistance PORTVERSION= 0.2.2 PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://monkey.org/~jose/software/libdistance/ MAINTAINER= jonathan@FreeBSD.org COMMENT= Compute the distance between two pieces of data LICENSE= BSD3CLAUSE BUILD_DEPENDS= swig3.0:devel/swig30 USES+= fakeroot pkgconfig tcl USE_LDCONFIG= yes MAKE_ARGS+= INCLUDEDIR=${PREFIX}/include LIBDIR=${PREFIX}/lib MAKE_ARGS+= MANDIR=${PREFIX}/man/man SWIG=swig3.0 CFLAGS+= -fPIC pre-build: mkdir -p ${STAGEDIR}/usr/local/tests/${PORTNAME} +post-patch: + ${REINPLACE_CMD} 's|%%TCL_SHLIB_VER%%|${TCL_SHLIB_VER}|' \ + ${WRKSRC}/swig/tcl/Makefile + MAKE_JOBS_UNSAFE= yes .include Index: head/devel/libdistance/files/patch-swig_tcl_Makefile =================================================================== --- head/devel/libdistance/files/patch-swig_tcl_Makefile (revision 458027) +++ head/devel/libdistance/files/patch-swig_tcl_Makefile (revision 458028) @@ -1,29 +1,29 @@ --- swig/tcl/Makefile.orig 2014-10-10 13:11:38 UTC +++ swig/tcl/Makefile @@ -1,15 +1,16 @@ # $Id: Makefile,v 1.2 2004/11/30 00:26:59 jose Exp $ -all: distance.so +LIB= distance_wrap +SHLIB_MAJOR= 1 -distance_wrap.o: ../distance.i - swig -tcl -namespace -module distance -o distance_wrap.c \ - -v ../distance.i - gcc -c -I../.. -I/usr/local/include/tcl8.4 -fpic distance_wrap.c +SRCS= distance_wrap.c # swig-generated source file +CLEANFILES+= $(SRCS) -distance.so: distance_wrap.o - gcc -shared distance_wrap.o ../../libdistance.a \ - -o distance.so -+CFLAGS= -I ../.. `pkg-config --cflags tcl` -fPIC ++CFLAGS= -I ../.. `pkg-config --cflags tcl%%TCL_SHLIB_VER%%` -fPIC +SWIG?= swig -clean: - rm -f *.o distance_wrap.c *.so *.core *_wrap.c distance.py +distance_wrap.c: ../distance.i + ${SWIG} -tcl -namespace -module distance -o distance_wrap.c \ + -v ../distance.i + +.include