aboutsummaryrefslogtreecommitdiffstats
path: root/misc/xdelta3/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'misc/xdelta3/Makefile')
-rw-r--r--misc/xdelta3/Makefile46
1 files changed, 35 insertions, 11 deletions
diff --git a/misc/xdelta3/Makefile b/misc/xdelta3/Makefile
index 0b7b62a2181b..34fb90471c2c 100644
--- a/misc/xdelta3/Makefile
+++ b/misc/xdelta3/Makefile
@@ -6,22 +6,46 @@
#
PORTNAME= xdelta
-PORTVERSION= 3.0u
-CATEGORIES= misc devel
-MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
-DISTNAME= ${PORTNAME}${PORTVERSION}
+DISTVERSION= 3.0y
+PORTREVISION?= 0
+PORTEPOCH?= 1
+CATEGORIES?= misc devel
+MASTER_SITES= GOOGLE_CODE
+DISTNAME= ${PORTNAME}${DISTVERSION}
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Open-source binary diff, VCDIFF/RFC 3284 delta compression
+MAINTAINER?= ports@FreeBSD.org
+COMMENT?= Open-source binary diff, VCDIFF/RFC 3284 delta compression
-ALL_TARGET= xdelta3
USE_GMAKE= yes
-PLIST_FILES= bin/xdelta3
-post-patch:
- ${REINPLACE_CMD} -E -e 's/^(CFLAGS)=/\1+=/' ${WRKSRC}/Makefile
+.include <bsd.port.pre.mk>
+
+.if ${SLAVE_PORT:Mno}
+PLIST_FILES= bin/xdelta3
+.endif
+post-patch: .SILENT
+ ${REINPLACE_CMD} -e '/^CFLAGS/s/=/+&/' \
+ -e 's/-O3//; s/-g//' \
+ -e '/^all:/,/^$$/ { s/:.*/: xdelta3/; /testing/d; }' \
+ ${WRKSRC}/Makefile
+.if ${SLAVE_PORT:Myes}
+ ${REINPLACE_CMD} -i.slave.bak -e '/^SWIG_FLAGS/s/=/& `python$$(PYVER)-config --cflags` -fpic/' \
+ -e '/^xdelta3module\.so:/,/^$$/ { s/ld/$$(CC)/; \
+ s/.*libpython.*\.so.*/`python$$(PYVER)-config --ldflags`/; \
+ /-lc/d; }' \
+ -e 's|/usr/include/python$$(PYVER)|${PYTHON_INCLUDEDIR}|' \
+ -e 's|/usr/lib/python$$(PYVER)|${PYTHON_LIBDIR}|' \
+ -e 's|/usr/lib/libpython|${LOCALBASE}/lib/libpython|' \
+ -e '/^all:/s/:.*/: swigtgt/' \
+ -e '/^PYVER/s/=.*/= ${PYTHON_VER}/' \
+ ${WRKSRC}/Makefile
+ ${REINPLACE_CMD} -e "/^REL/s/=.*/='${PORTVERSION}'/" \
+ -e "/extra_compile_args.*\[/,/]/ { s/'-O3',//; s/'-g',//; }" \
+ ${WRKSRC}/${PYSETUP}
+.else
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xdelta3 ${PREFIX}/bin/
+.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>