Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Aug 2010 20:10:34 -0700
From:      Rob Farmer <rfarmer@predatorlabs.net>
To:        utisoft@gmail.com, bf1783@gmail.com, wen heping <wenheping@gmail.com>
Cc:        cvs-ports@freebsd.org, Alexey Dokuchaev <danfe@freebsd.org>, Li-Wen Hsu <lwhsu@freebsd.org>, cvs-all@freebsd.org, ports-committers@freebsd.org
Subject:   Re: cvs commit: ports/java/jgraphx Makefile distinfo
Message-ID:  <AANLkTi=hBLL0076RCsOmHq14cU-F5OZ_sjybOcrT-Kho@mail.gmail.com>
In-Reply-To: <AANLkTinqUUV4v=SGnoq_T8onxss5SkyRm259x04NaGjv@mail.gmail.com>
References:  <201008221158.o7MBwce6093897@repoman.freebsd.org> <AANLkTinwzkmw3%2BkSjddODtzFSCD-5RBb1gU48%2BM6w58E@mail.gmail.com> <20100827062503.GA85184@FreeBSD.org> <AANLkTinnsfdVVRi39HEp24bXMM2ykWydnmt%2BiEdDSqHH@mail.gmail.com> <AANLkTik8O4fpVHU%2B_pFGTRBapTtMx%2B5fJgk4M8QnZsCw@mail.gmail.com> <AANLkTinqUUV4v=SGnoq_T8onxss5SkyRm259x04NaGjv@mail.gmail.com>

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

[-- Attachment #1 --]
On Sun, Aug 29, 2010 at 3:23 AM, Chris Rees <utisoft@gmail.com> wrote:
> On 29 August 2010 01:11, Rob Farmer <rfarmer@predatorlabs.net> wrote:
>> On Sat, Aug 28, 2010 at 2:28 AM, Chris Rees <utisoft@gmail.com> wrote:
>>> 2010/8/27 Alexey Dokuchaev <danfe@freebsd.org>:
>>>> On Thu, Aug 26, 2010 at 09:53:32PM -0700, Rob Farmer wrote:
>>>>> This breaks math/scilab (which is the only dependency in the ports
>>>>> tree). Unfortunately, the author of jgraphx seems to completely
>>>>> disregard backwards compatibility and changes the API in virtually
>>>>> every release.
>>>>>
>>>>> I tried to patch Scilab based on their git repository (which has
>>>>> support for 1.4.0.1), but hundreds of revisions have passed and they
>>>>> have rearranged their tree a bit and added/removed some files, so it
>>>>> didn't go well.
>>>>>
>>>>> IMHO, we need to either create a separate jgraphx-scilab port or keep
>>>>> this in sync with Scilab (this is what Debian, Ubuntu, and Gentoo are
>>>>> doing).
>>>>
>>>> Considering Scilab is the only consumer of jgraphx, it seems having
>>>> special port would be an overkill.  I think we should keep the two in
>>>> sync, and probably work with upstream maintainers of both projects to
>>>> improve compatibility and API inheritance in the future.  Separate port
>>>> of jgraphx-scilab is palliative solution, i.e. it simply increases the
>>>> entropy, not solving the underlying problem.
>>>>
>>>> ./danfe
>>>
>>>
>>> Since Scilab is the only consumer of jgraphx, I don't mind reverting it.
>>>
>>> Actually, I wrote that while trying to repair Scilab myself, so if you
>>> want maintainership of jgraphx too, that's fine.
>>
>> I don't want to feel like I'm stealing your ports, but I do think it
>> would be a good idea to have them maintained together.
>>
>>>
>>> Alternatively you could have it as another distfile in Scilab rather
>>> than depending on the port....
>>
>> I hadn't thought about this, but it may actually be the best solution
>> - as far as I'm aware, the reason for having libraries in separate
>> ports is to allow multiple applications to use the same copy, but
>> given the instability of the jgraphx API, I think it is unlikely that
>> multiple ports could depend on one common version of jgraphx (at least
>> without significant patching), so the benefits of having a jgraphx
>> port are probably limited. Thoughts?
>>
>
> You're not stealing my ports, you'd be taking a logical step to fixing
> the madness!
>
> You are welcome to jgraphx if you want it, though having thought about
> the instability, maybe the alternative distfile could be a good
> solution. Have a look at the attached patch; the only thing i haven't
> done is told configure it's not a problem that jgraphx.jar isn't there
> yet...
>
> Of course, jgraphx is still a useful port for people who want to use
> it themselves in their own programming; there are plenty of other
> ports that aren't depended on by anything else!
>
> Chris
>

It turns out that make extract unzips the jar file, so I fixed this
and moved jgraphx inside the GUI option.

I also added in the fix for PR 149659 to avoid having two PORTREVISION
bumps in a short time. Plus, this became MAKE_JOBS_SAFE somewhere
along the line.

-- 
Rob Farmer

[-- Attachment #2 --]
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/math/scilab/Makefile,v
retrieving revision 1.68
diff -u -r1.68 Makefile
--- Makefile	31 May 2010 01:59:48 -0000	1.68
+++ Makefile	30 Aug 2010 02:52:21 -0000
@@ -7,10 +7,13 @@
 
 PORTNAME=	scilab
 PORTVERSION=	5.2.2
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	math cad parallel java
-MASTER_SITES=	http://www.scilab.org/download/${PORTVERSION}/
-EXTRACT_SUFX=	-src.tar.gz
+MASTER_SITES=	http://www.scilab.org/download/${PORTVERSION}/:scilab \
+		http://www.bayofrum.net/dist/jgraphx/:jgraphx \
+		http://cerberus.bayofrum.net/dist/jgraphx/:jgraphx
+DISTFILES=	${DISTNAME}-src.tar.gz:scilab
+EXTRACT_ONLY=	${DISTNAME}-src.tar.gz
 
 MAINTAINER=	rfarmer@predatorlabs.net
 COMMENT=	Scientific software package for numerical computations
@@ -21,7 +24,7 @@
 		pcre.0:${PORTSDIR}/devel/pcre \
 		readline.6:${PORTSDIR}/devel/readline
 
-MAKE_JOBS_UNSAFE=	yes
+MAKE_JOBS_SAFE=	yes
 
 USE_FORTRAN=	yes
 USE_GETTEXT=	yes
@@ -84,13 +87,16 @@
 PLIST_SUB+=	NOGUI=""
 NOPORTDOCS=	YES
 .else
+DISTFILES+=	${JGRAPHX_JAR}:jgraphx
+JGRAPHX_VERSION=	1.3.0.0
+JGRAPHX_JAR=	jgraphx-${JGRAPHX_VERSION:C/\./_/g}.jar
+
 LIB_DEPENDS+=	hdf5.6:${PORTSDIR}/science/hdf5-18
 
 BUILD_DEPENDS+=	ant:${PORTSDIR}/devel/apache-ant \
 		${JAVALIBDIR}/flexdock-0.5.1.jar:${PORTSDIR}/devel/flexdock \
 		${JAVALIBDIR}/jogl.jar:${PORTSDIR}/graphics/jogl \
 		${JAVALIBDIR}/commons-logging.jar:${PORTSDIR}/java/jakarta-commons-logging \
-		${JAVALIBDIR}/jgraphx.jar:${PORTSDIR}/java/jgraphx \
 		${JAVALIBDIR}/looks.jar:${PORTSDIR}/devel/looks \
 		${JAVALIBDIR}/skinlf.jar:${PORTSDIR}/x11-toolkits/skinlf \
 		${JAVALIBDIR}/jrosetta-API.jar:${PORTSDIR}/java/jrosetta \
@@ -112,7 +118,6 @@
 RUN_DEPENDS+=	${JAVALIBDIR}/flexdock-0.5.1.jar:${PORTSDIR}/devel/flexdock \
 		${JAVALIBDIR}/jogl.jar:${PORTSDIR}/graphics/jogl \
 		${JAVALIBDIR}/commons-logging.jar:${PORTSDIR}/java/jakarta-commons-logging \
-		${JAVALIBDIR}/jgraphx.jar:${PORTSDIR}/java/jgraphx \
 		${JAVALIBDIR}/looks.jar:${PORTSDIR}/devel/looks \
 		${JAVALIBDIR}/skinlf.jar:${PORTSDIR}/x11-toolkits/skinlf \
 		${JAVALIBDIR}/jrosetta-API.jar:${PORTSDIR}/java/jrosetta \
@@ -209,6 +214,9 @@
 	${REINPLACE_CMD} -e 's|$$jardir/batik.jar|${LOCALBASE}/share/java/batik/batik.jar|g' ${WRKSRC}/configure
 	${REINPLACE_CMD} -e 's|$$jardir/fop.jar|${LOCALBASE}/share/java/fop/build/fop.jar|' ${WRKSRC}/configure
 	${REINPLACE_CMD} -e 's|$$jardir/jeuclid-core*.jar|${LOCALBASE}/share/java/jeuclid/repo/jeuclid-core*.jar|' ${WRKSRC}/configure
+	${MKDIR} ${WRKSRC}/thirdparty
+	${CP} ${DISTDIR}/${JGRAPHX_JAR} ${WRKSRC}/thirdparty/jgraphx.jar
+	${REINPLACE_CMD} -e 's|@JGRAPHX@|${DATADIR}/modules/jgraphx.jar|g' ${WRKSRC}/etc/classpath.xml.in
 	# Build fixes
 	${REINPLACE_CMD} -e 's|$$(CFLAGS:-O%=)|-I${LOCALBASE}/include -L${LOCALBASE}/lib|' ${WRKSRC}/modules/elementary_functions/Makefile.in
 	${REINPLACE_CMD} -e 's|freebsd|__FreeBSD__|g' ${WRKSRC}/modules/sparse/includes/spConfig.h
@@ -223,6 +231,9 @@
 		${WRKSRC}/modules/call_scilab/examples/call_scilab/NET/VB.NET/My_Project/
 	${REINPLACE_CMD} -e 's|My Project|My_Project|g' ${WRKSRC}/modules/call_scilab/examples/call_scilab/NET/VB.NET/VB.NET.vbproj
 	${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|' ${WRKSRC}/Makefile.in
+	# Run fixes
+	${REINPLACE_CMD} -e 's|%%JAVALIBDIR%%|${JAVALIBDIR}|' ${WRKSRC}/etc/librarypath.xml
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/etc/librarypath.xml
 .if defined(NOPORTDOCS)
 	@${REINPLACE_CMD} -e '/%%PORTDOCS%%/d' ${WRKSRC}/Makefile.in
 .else
@@ -233,5 +244,6 @@
 	@${FIND} ${WRKSRC} -name \*.orig -delete
 	@${FIND} ${WRKSRC} -name \*.bak -delete
 	@${FIND} ${WRKSRC} -name .cvsignore -delete
+	@${MKDIR} ${DATADIR}/modules && ${INSTALL_DATA} ${DISTDIR}/${JGRAPHX_JAR} ${DATADIR}/modules/jgraphx.jar
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/math/scilab/distinfo,v
retrieving revision 1.17
diff -u -r1.17 distinfo
--- distinfo	30 Apr 2010 08:54:39 -0000	1.17
+++ distinfo	30 Aug 2010 00:46:19 -0000
@@ -1,3 +1,6 @@
 MD5 (scilab-5.2.2-src.tar.gz) = 35e8a22edb348f405360d3a07ed4faab
 SHA256 (scilab-5.2.2-src.tar.gz) = 6f8800bc8ac9128187d1f9a98a5e459bbfa2b66967caed8ab659ff2ba51f1cf2
 SIZE (scilab-5.2.2-src.tar.gz) = 54088580
+MD5 (jgraphx-1_3_0_0.jar) = b9e24f0b428c679697e763e9b0ba5671
+SHA256 (jgraphx-1_3_0_0.jar) = 0f3728b47c9fd3977a063212f68e43639c2283eb84fbce437275b679e6e4a6b2
+SIZE (jgraphx-1_3_0_0.jar) = 326596
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/math/scilab/pkg-plist,v
retrieving revision 1.19
diff -u -r1.19 pkg-plist
--- pkg-plist	30 Apr 2010 08:54:39 -0000	1.19
+++ pkg-plist	30 Aug 2010 02:21:37 -0000
@@ -5704,6 +5704,7 @@
 %%GUI%%%%DATADIR%%/modules/javasci/tests/unit_tests/javac.sci
 %%GUI%%%%DATADIR%%/modules/javasci/tests/unit_tests/test_java.sci
 %%GUI%%%%DATADIR%%/modules/javasci/version.xml
+%%GUI%%%%DATADIR%%/modules/jgraphx.jar
 %%DATADIR%%/modules/jvm/changelog.txt
 %%DATADIR%%/modules/jvm/etc/jvm.quit
 %%DATADIR%%/modules/jvm/etc/jvm.start
Index: files/patch-etc-librarypath.xml
===================================================================
RCS file: files/patch-etc-librarypath.xml
diff -N files/patch-etc-librarypath.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-etc-librarypath.xml	30 Aug 2010 01:47:35 -0000
@@ -0,0 +1,21 @@
+--- etc/librarypath.xml.orig	2010-08-18 22:12:51.000000000 -0700
++++ etc/librarypath.xml	2010-08-18 22:15:41.000000000 -0700
+@@ -29,16 +29,11 @@
+ <path value="$SCILAB/modules/xpad/.libs"/>
+ <path value="$SCILAB/.libs"/>
+ 
+-<!-- Default path to the JNI classes under some Linux (JoGL under Debian for example) -->
+-<path value="/usr/lib/jni/"/>
+-
+ <!-- Make install with prefix -->
+ <path value="$SCILAB/../../lib/scilab/"/>
+ 
+ <!-- Standard path -->
+-<path value="/usr/lib/scilab/"/>
+-
+-<!-- Standard path for 64 bits -->
+-<path value="/usr/lib64/scilab/"/>
++<path value="%%JAVALIBDIR%%/"/>
++<path value="%%PREFIX%%/lib/"/>
+ 
+ </librarypaths>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=hBLL0076RCsOmHq14cU-F5OZ_sjybOcrT-Kho>