From owner-svn-ports-head@FreeBSD.ORG Mon Dec 16 18:01:52 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 514362A7; Mon, 16 Dec 2013 18:01:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3BC441853; Mon, 16 Dec 2013 18:01:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBGI1qUP048855; Mon, 16 Dec 2013 18:01:52 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBGI1pIr048846; Mon, 16 Dec 2013 18:01:51 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201312161801.rBGI1pIr048846@svn.freebsd.org> From: Antoine Brodin Date: Mon, 16 Dec 2013 18:01:51 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r336652 - in head/devel/libreadline-java: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2013 18:01:52 -0000 Author: antoine Date: Mon Dec 16 18:01:50 2013 New Revision: 336652 URL: http://svnweb.freebsd.org/changeset/ports/336652 Log: - Fix build with clang - Stage support - Do not hardcode /usr/local PR: ports/184751 Submitted by: Martin Kammerhofer (maintainer) Added: head/devel/libreadline-java/files/jython.sh.in - copied, changed from r336651, head/devel/libreadline-java/files/jython.sh head/devel/libreadline-java/files/pkg-message.in - copied unchanged from r336651, head/devel/libreadline-java/pkg-message Deleted: head/devel/libreadline-java/files/jython.sh head/devel/libreadline-java/pkg-message Modified: head/devel/libreadline-java/Makefile head/devel/libreadline-java/files/JReadlineCompleter.py head/devel/libreadline-java/files/patch-src-native-Makefile head/devel/libreadline-java/files/patch-src-native-org_gnu_readline_Readline.c Modified: head/devel/libreadline-java/Makefile ============================================================================== --- head/devel/libreadline-java/Makefile Mon Dec 16 17:46:49 2013 (r336651) +++ head/devel/libreadline-java/Makefile Mon Dec 16 18:01:50 2013 (r336652) @@ -4,7 +4,7 @@ PORTNAME= libreadline-java PORTVERSION= 0.8.0 DISTVERSIONSUFFIX= -src -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel java MASTER_SITES= SF/java-readline/java-readline/${PORTVERSION} @@ -17,39 +17,33 @@ RUN_DEPENDS= ${LOCALBASE}/include/editli ALL_TARGET= # empty MAKE_ENV= JAVA_HOME="${JAVA_HOME}" JAVA="${JAVA}" JAVAC="${JAVAC}" \ JAVAH="${JAVAH}" JAR_="${JAR}" -PKGMESSAGE= ${WRKDIR}/pkg-message +SUB_FILES= pkg-message jython.sh PLIST_FILES= %%JAVAJARDIR%%/libreadline-java.jar lib/libJavaReadline.so \ lib/libJavaEditline.so lib/libJavaGetline.so -.if !defined(NOPORTDOCS) -PLIST_FILES+= %%DOCSDIR%%/README.1st %%DOCSDIR%%/README \ - %%DOCSDIR%%/jython.sh %%DOCSDIR%%/JReadlineCompleter.py \ - @dirrm\ %%DOCSDIR%% -.endif -USE_GMAKE= yes +PORTDOCS= README.1st README jython.sh JReadlineCompleter.py +USES= gmake USE_JAVA= yes USE_LDCONFIG= yes WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} MAKE_JOBS_UNSAFE= yes -NO_STAGE= yes +OPTIONS_DEFINE= DOCS + +.include + do-install: - ${INSTALL_DATA} ${WRKSRC}/libreadline-java.jar ${JAVAJARDIR} - ${INSTALL_DATA} ${WRKSRC}/libJavaReadline.so ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/libJavaEditline.so ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/libJavaGetline.so ${PREFIX}/lib -.if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README.1st ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} - ${INSTALL_DATA} ${FILESDIR}/jython.sh ${DOCSDIR} - ${INSTALL_DATA} ${FILESDIR}/JReadlineCompleter.py ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/libreadline-java.jar ${STAGEDIR}${JAVAJARDIR} + ${INSTALL_DATA} ${WRKSRC}/libJavaReadline.so ${STAGEDIR}${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/libJavaEditline.so ${STAGEDIR}${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/libJavaGetline.so ${STAGEDIR}${PREFIX}/lib +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.1st ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKDIR}/jython.sh ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${FILESDIR}/JReadlineCompleter.py ${STAGEDIR}${DOCSDIR} .endif -post-install: - @${SED} -e 's|%%JAVAJARDIR%%|${JAVAJARDIR}|g' -- \ - ${.CURDIR}/pkg-message >${PKGMESSAGE} - @${CAT} ${PKGMESSAGE} - .if !defined(BATCH) test: cd ${WRKSRC} && ${MAKE_ENV} ${GMAKE} test # Now type something! Modified: head/devel/libreadline-java/files/JReadlineCompleter.py ============================================================================== --- head/devel/libreadline-java/files/JReadlineCompleter.py Mon Dec 16 17:46:49 2013 (r336651) +++ head/devel/libreadline-java/files/JReadlineCompleter.py Mon Dec 16 18:01:50 2013 (r336652) @@ -4,6 +4,10 @@ # # This is rlcompleter.py from CPython 2.5.1 adapted for Jython # and libreadline-java. +# +# NOTE: Jython >= 2.5 already includes rlcompleter, +# see http://www.jython.org/docs/library/rlcompleter.html +# This is useful for older Jython versions only! """TAB-completion for Jython + libreadline-java @@ -105,9 +109,13 @@ class PyCompleter: try: if state == 0: if "." in text: - self.matches = self.attr_matches(text) + matches = self.attr_matches(text) else: - self.matches = self.global_matches(text) + matches = self.global_matches(text) + # remove duplicates and sort + matches = list(set(matches)) + matches.sort() + self.matches = matches return self.matches[state] except (AttributeError, IndexError, NameError): return None Copied and modified: head/devel/libreadline-java/files/jython.sh.in (from r336651, head/devel/libreadline-java/files/jython.sh) ============================================================================== --- head/devel/libreadline-java/files/jython.sh Mon Dec 16 17:46:49 2013 (r336651, copy source) +++ head/devel/libreadline-java/files/jython.sh.in Mon Dec 16 18:01:50 2013 (r336652) @@ -2,31 +2,39 @@ # Invoke Jython. # jython.sh,v 1.5 2007/09/28 09:13:55 martin Exp # -# The path names below are for Jython 2.2 on FreeBSD. +# The path names below are for Jython 2.5.3 on FreeBSD. # - -CP="/usr/local/lib/jython22/jython.jar" +# NOTE: Jython >= 2.5 already includes rlcompleter, +# see http://www.jython.org/docs/library/rlcompleter.html +# This is useful for older Jython versions only! + +if [ -d "%%LOCALBASE%%/lib/jython22" ] ; then + _ver=22 +else + _ver= +fi +CP="%%LOCALBASE%%/lib/jython${_ver}/jython.jar" defs= wrapper= case "${JYTHON_CONSOLE:-Editline}" in *[Ee]dit[Ll]ine) - CP="$CP:/usr/local/share/java/classes/libreadline-java.jar" + CP="$CP:%%LOCALBASE%%/share/java/classes/libreadline-java.jar" defs="-Dpython.console=org.python.util.ReadlineConsole" defs="$defs -Dpython.console.readlinelib=Editline" ;; *[Gg]et[Ll]ine) - CP="$CP:/usr/local/share/java/classes/libreadline-java.jar" + CP="$CP:%%LOCALBASE%%/share/java/classes/libreadline-java.jar" defs="-Dpython.console=org.python.util.ReadlineConsole" defs="$defs -Dpython.console.readlinelib=Getline" ;; *[Jj][Ll]ine) - CP="$CP:/usr/local/share/java/classes/jline.jar" + CP="$CP:%%LOCALBASE%%/share/java/classes/jline.jar" defs="-Dpython.console=" wrapper=jline.ConsoleRunner ;; *[Rr]ead[Ll]ine) - CP="$CP:/usr/local/share/java/classes/libreadline-java.jar" + CP="$CP:%%LOCALBASE%%/share/java/classes/libreadline-java.jar" defs="-Dpython.console=org.python.util.ReadlineConsole" defs="$defs -Dpython.console.readlinelib=GnuReadline" ;; @@ -41,7 +49,7 @@ if [ -n "$CLASSPATH" ]; then CP="$CP:$CLASSPATH" fi -exec java -Dpython.home="/usr/local/lib/jython22" \ +exec java -Dpython.home="%%LOCALBASE%%/lib/jython${_ver}" \ -Dpython.cachedir="${HOME}/.jython-cachedir" \ -classpath "$CP" $wrapper org.python.util.jython $defs "$@" Modified: head/devel/libreadline-java/files/patch-src-native-Makefile ============================================================================== --- head/devel/libreadline-java/files/patch-src-native-Makefile Mon Dec 16 17:46:49 2013 (r336651) +++ head/devel/libreadline-java/files/patch-src-native-Makefile Mon Dec 16 18:01:50 2013 (r336652) @@ -1,6 +1,13 @@ ---- src/native/Makefile.orig 2003-01-07 07:14:35.000000000 -0300 -+++ src/native/Makefile 2008-02-16 18:53:37.000000000 -0300 -@@ -44,10 +44,12 @@ +--- src/native/Makefile.orig 2003-01-07 11:14:35.000000000 +0100 ++++ src/native/Makefile 2013-12-13 08:29:23.000000000 +0100 +@@ -38,25 +38,28 @@ + INCLUDES = -I "c:/Programme/DevStudio/VC/include" \ + -I $(JAVAINCLUDE) -I $(JAVANATINC) + LIB = "c:/Programme/DevStudio/VC/lib" +-CC = cl ++#CC = gcc + OBJ_EXT := obj + LIB_PRE := LIB_EXT := dll CFLAGS=-DWIN32=$(WIN32) -D__IBMC__ else @@ -16,7 +23,8 @@ ifeq (cygwin,$(WIN32)) JavaGetline_LIBS = -lcygwin endif -@@ -55,8 +57,9 @@ +-CC = gcc ++CC = cc OBJ_EXT := o LIB_PRE := lib LIB_EXT := so Modified: head/devel/libreadline-java/files/patch-src-native-org_gnu_readline_Readline.c ============================================================================== --- head/devel/libreadline-java/files/patch-src-native-org_gnu_readline_Readline.c Mon Dec 16 17:46:49 2013 (r336651) +++ head/devel/libreadline-java/files/patch-src-native-org_gnu_readline_Readline.c Mon Dec 16 18:01:50 2013 (r336652) @@ -1,5 +1,14 @@ --- src/native/org_gnu_readline_Readline.c.orig 2003-01-07 11:14:35.000000000 +0100 -+++ src/native/org_gnu_readline_Readline.c 2007-09-27 09:21:14.000000000 +0200 ++++ src/native/org_gnu_readline_Readline.c 2013-12-12 20:40:36.000000000 +0100 +@@ -430,7 +430,7 @@ + jtext = (*jniEnv)->NewStringUTF(jniEnv,text); + + if (jniMethodId == 0) { +- return; ++ return 0; + } + + completion = (*jniEnv)->CallObjectMethod(jniEnv, jniObject, @@ -560,6 +560,21 @@ #endif Copied: head/devel/libreadline-java/files/pkg-message.in (from r336651, head/devel/libreadline-java/pkg-message) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libreadline-java/files/pkg-message.in Mon Dec 16 18:01:50 2013 (r336652, copy of r336651, head/devel/libreadline-java/pkg-message) @@ -0,0 +1,5 @@ +-------------------------------------------------- +To use readline-java add the file +%%JAVAJARDIR%%/libreadline-java.jar +to your classpath! +--------------------------------------------------