Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jul 2009 18:17:50 GMT
From:      Vitaly Magerya <vmagerya@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/137312: [patch] devel/lemon: update from 1.39 to 1.69
Message-ID:  <200907311817.n6VIHo1p046719@www.freebsd.org>
Resent-Message-ID: <200907311820.n6VIK10o035897@freefall.freebsd.org>

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

>Number:         137312
>Category:       ports
>Synopsis:       [patch] devel/lemon: update from 1.39 to 1.69
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 31 18:20:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Vitaly Magerya
>Release:        FreeBSD 7.2-STABLE i386
>Organization:
>Environment:
FreeBSD landmine.tx97.net 7.2-STABLE FreeBSD 7.2-STABLE #2: Sun Jun 28 13:40:25 EEST 2009     root@landmine.tx97.net:/usr/obj/usr/src/sys/T40  i386
>Description:
The attached patch updates devel/lemon to 1.69 and makes me maintainer.

Also, with the patch lemon searches for `lempar.c' not only in current dir,
but in DESTDIR also. This way you don't have to copy it into current dir
to use lemon.

Note however that since the patch injects DESTDIR directly into C sources,
errors will occur if DESTDIR contains double quotes or backslashes.
I'll work on this if this is of concern.

Finally, It would be great if the commiter would mirror the distfile somewhere,
since the current MASTER_SITE is not as reliable as I'd like it to be.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN lemon.orig/Makefile lemon/Makefile
--- lemon.orig/Makefile	2009-07-31 17:18:15.000000000 +0300
+++ lemon/Makefile	2009-07-31 20:53:45.000000000 +0300
@@ -6,23 +6,27 @@
 #
 
 PORTNAME=	lemon
-PORTVERSION=	1.39
+PORTVERSION=	1.69
 CATEGORIES=	devel
-MASTER_SITES=	http://people.FreeBSD.org/~seanc/ports/${PORTNAME}/
+MASTER_SITES=	http://tx97.net/pub/distfiles/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	vmagerya@gmail.com
 COMMENT=	An LALR(1) parser generator. Similar in function to yacc and bison
 
 USE_BZIP2=	yes
 
+post-patch:
+	${REINPLACE_CMD} -e 's| = pathsearch(.*| = "${DATADIR}/lempar.c";|' \
+		${WRKSRC}/lemon.c
+
 do-build:
 	cd ${WRKSRC} && ${MAKE} PROG=lemon NOMAN=1 NO_MAN=1 \
-		CFLAGS="-g ${CFLAGS} -DLEMPAR='\"${PREFIX}/share/lemon/lempar.c\"'" \
-			-f /usr/share/mk/bsd.prog.mk
+		CFLAGS="-g ${CFLAGS}" \
+		-f /usr/share/mk/bsd.prog.mk
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
-	${MKDIR} ${PREFIX}/share/lemon
-	${INSTALL_DATA} ${WRKSRC}/lempar.c ${PREFIX}/share/lemon/
+	${INSTALL_PROGRAM} ${WRKSRC}/lemon ${PREFIX}/bin/
+	${MKDIR} ${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/lempar.c ${DATADIR}/
 
 .include <bsd.port.mk>
diff -ruN lemon.orig/distinfo lemon/distinfo
--- lemon.orig/distinfo	2009-07-31 17:18:15.000000000 +0300
+++ lemon/distinfo	2009-07-31 20:15:22.000000000 +0300
@@ -1,3 +1,3 @@
-MD5 (lemon-1.39.tar.bz2) = f6d9ec11feb85fcbc254401796175908
-SHA256 (lemon-1.39.tar.bz2) = 22ea0766611dcfa33629a9d44c275e82c9060bcfd2a2662d0ff533d428b5b5dd
-SIZE (lemon-1.39.tar.bz2) = 34417
+MD5 (lemon-1.69.tar.bz2) = 35aebc84c4f0e186aba1303bbef11a37
+SHA256 (lemon-1.69.tar.bz2) = bc7c1cae233b6af48f4b436ee900843106a15bdb1dc810bc463d8c6aad0dd916
+SIZE (lemon-1.69.tar.bz2) = 35895
diff -ruN lemon.orig/pkg-plist lemon/pkg-plist
--- lemon.orig/pkg-plist	2009-07-31 17:18:15.000000000 +0300
+++ lemon/pkg-plist	2009-07-31 20:15:22.000000000 +0300
@@ -1,3 +1,3 @@
 bin/lemon
-share/lemon/lempar.c
-@dirrm share/lemon
+%%DATADIR%%/lempar.c
+@dirrm %%DATADIR%%


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



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