Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Aug 2013 11:59:23 GMT
From:      Vitaly Magerya <vmagerya@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/181648: [patch] update devel/lightning from 1.2 to 2.0.0
Message-ID:  <201308291159.r7TBxNRG076991@oldred.freebsd.org>
Resent-Message-ID: <201308291200.r7TC01Uq011232@freefall.freebsd.org>

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

>Number:         181648
>Category:       ports
>Synopsis:       [patch] update devel/lightning from 1.2 to 2.0.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 29 12:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Vitaly Magerya
>Release:        FreeBSD 9.1-STABLE amd64
>Organization:
>Environment:
>Description:
Update devel/lightning from 1.2 to 2.0.0.
See the release announcement at [1].

Note that lightning 2.0 is not compatible with 1.x releases. Normally in such cases we create separate ports for different branches, but I argue that for devel/lightning this is not needed -- no port depends on devel/lightning, it's unmaintained, and the version in ports (1.2) was released in 2004, so anyone who actually used lightning pretty much had to use the development version for a number of years, which indicates that noone uses the version in ports.

Note: I tested the port on one FreeBSD/amd64 machine; if possible, I ask the committer to run "make regression-test" on whatever platforms he has access to (specifically, any of the i386, arm, ia64, powerpc, sparc64 or mips would be great). Lightning is very much a platform-dependent library (it's a JIT compiler), and it's primary developer doesn't use FreeBSD, so who knows if it works at all on those platforms.

[1] https://lists.gnu.org/archive/html/lightning/2013-08/msg00000.html
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN lightning.orig/Makefile lightning/Makefile
--- lightning.orig/Makefile	2013-08-25 15:11:35.000000000 +0300
+++ lightning/Makefile	2013-08-25 18:08:48.000000000 +0300
@@ -1,13 +1,8 @@
-# ex:ts=8
-# Ports collection makefile for:	lightning
-# Date created:			May 9, 2002
-# Whom:				ijliao
-#
+# Created by: ijliao
 # $FreeBSD: ports/devel/lightning/Makefile,v 1.14 2012/11/17 05:55:57 svnexp Exp $
-#
 
 PORTNAME=	lightning
-PORTVERSION=	1.2
+PORTVERSION=	2.0.0
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -15,11 +10,29 @@
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Generates assembly language code at run-time
 
-ONLY_FOR_ARCHS=	i386 sparc64 powerpc
+OPTIONS_DEFINE=	ASSERTIONS
+ASSERTIONS_DESC=Enable runtime code generation assertions
 
+ONLY_FOR_ARCHS=	i386 amd64 arm ia64 powerpc sparc64 mips
+
+USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--enable-disassembler=no
+
+PLIST_SUB+=	JIT_ARCH=${ARCH:S/i386/x86/:S/amd64/x86/:S/sparc64/sparc/:S/powerpc/ppc/}
 
-MAN1=		lightningize.1
 INFO=		lightning
 
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MASSERTIONS}
+CONFIGURE_ARGS+=--enable-assertions=yes
+.else
+CONFIGURE_ARGS+=--enable-assertions=no
+.endif
+
+regression-test: build
+	(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \
+		${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check)
+
 .include <bsd.port.mk>
diff -ruN lightning.orig/distinfo lightning/distinfo
--- lightning.orig/distinfo	2013-08-25 15:11:35.000000000 +0300
+++ lightning/distinfo	2013-08-25 15:18:31.000000000 +0300
@@ -1,2 +1,2 @@
-SHA256 (lightning-1.2.tar.gz) = d16a9f12441f297f7524917bfc97501a8600a93eb9c46d2a7e2a16e5caf11511
-SIZE (lightning-1.2.tar.gz) = 403274
+SHA256 (lightning-2.0.0.tar.gz) = e41736c5c6c40eeb194e3f9fec3209e86f07f9471d0aacc5d35c1c8e55621054
+SIZE (lightning-2.0.0.tar.gz) = 852571
diff -ruN lightning.orig/files/patch-configure lightning/files/patch-configure
--- lightning.orig/files/patch-configure	1970-01-01 03:00:00.000000000 +0300
+++ lightning/files/patch-configure	2013-08-25 15:54:01.000000000 +0300
@@ -0,0 +1,19 @@
+--- configure.orig	2013-08-23 21:12:43.000000000 +0300
++++ configure	2013-08-25 15:53:56.000000000 +0300
+@@ -11650,6 +11650,7 @@
+ fi
+ 
+ case "$host_os" in
++    *freebsd*)	SHLIB=""	    ;;
+     *hpux*)		SHLIB="-ldld"	;;
+     *)			SHLIB="-ldl"	;;
+ esac
+@@ -11657,7 +11658,7 @@
+ 
+ cpu=
+ case "$target_cpu" in
+-    i?86|x86_64)	cpu=x86		;;
++    i?86|x86_64|amd64)	cpu=x86		;;
+     *arm*)		cpu=arm		;;
+     *mips*)		cpu=mips	;;
+     *powerpc*)		cpu=ppc		;;
diff -ruN lightning.orig/pkg-plist lightning/pkg-plist
--- lightning.orig/pkg-plist	2013-08-25 15:11:35.000000000 +0300
+++ lightning/pkg-plist	2013-08-25 18:06:50.000000000 +0300
@@ -1,28 +1,7 @@
-bin/lightningize
-include/lightning/asm-common.h
-include/lightning/asm.h
-include/lightning/core-common.h
-include/lightning/core.h
-include/lightning/fp-common.h
-include/lightning/fp.h
-include/lightning/funcs-common.h
-include/lightning/funcs.h
-include/lightning/i386/asm.h
-include/lightning/i386/core.h
-include/lightning/i386/fp.h
-include/lightning/i386/funcs.h
-include/lightning/ppc/asm.h
-include/lightning/ppc/core.h
-include/lightning/ppc/fp.h
-include/lightning/ppc/funcs.h
-include/lightning/sparc/asm.h
-include/lightning/sparc/core.h
-include/lightning/sparc/fp.h
-include/lightning/sparc/funcs.h
-share/aclocal/lightning.m4
-%%DATADIR%%/Makefile.am
-@dirrm %%DATADIR%%
-@dirrm include/lightning/sparc
-@dirrm include/lightning/ppc
-@dirrm include/lightning/i386
+include/lightning.h
+include/lightning/jit_%%JIT_ARCH%%.h
+lib/liblightning.a
+lib/liblightning.la
+lib/liblightning.so
+lib/liblightning.so.0
 @dirrm include/lightning


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



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