svn commit: r396521 - in head/lang/mosh: . files
Alexey Dokuchaev
danfe at FreeBSD.org
Wed Sep 9 17:26:15 UTC 2015
Author: danfe
Date: Wed Sep 9 17:26:13 2015
New Revision: 396521
URL: https://svnweb.freebsd.org/changeset/ports/396521
Log:
- Unbreak the build on Tier-2 systems (PowerPC and SPARC)
- Define LICENSE and move PROJECTHOST where it logically belongs
- Propagate available SIMD support down to the compiler (x86 only)
- Do not enforce -O3; update/improve `x-generate-plist' target
- Provide a better port description text while I am here
Tested on: local Mac mini G4 (powerpc), flame (sparc64)
Added:
head/lang/mosh/files/
head/lang/mosh/files/patch-configure (contents, props changed)
head/lang/mosh/files/patch-fix-sparc64 (contents, props changed)
Modified:
head/lang/mosh/Makefile
head/lang/mosh/pkg-descr
Modified: head/lang/mosh/Makefile
==============================================================================
--- head/lang/mosh/Makefile Wed Sep 9 16:33:14 2015 (r396520)
+++ head/lang/mosh/Makefile Wed Sep 9 17:26:13 2015 (r396521)
@@ -6,39 +6,41 @@ PORTVERSION= 0.2.7
PORTREVISION= 2
CATEGORIES= lang
MASTER_SITES= GOOGLE_CODE
+PROJECTHOST= mosh-scheme
PKGNAMESUFFIX= -scheme
MAINTAINER= mjt at cltn.org
COMMENT= Fast R6RS Scheme interpreter
+LICENSE= BSD2CLAUSE
+
LIB_DEPENDS= libgmp.so:${PORTSDIR}/math/gmp \
libonig.so:${PORTSDIR}/devel/oniguruma5
+CONFLICTS_INSTALL= mosh-1.[0-9].*
+
USES= gmake
USE_OPENSSL= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --datadir=${PREFIX}/lib
+
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-CONFLICTS_INSTALL= mosh-1.[0-9].*
-
-PROJECTHOST= mosh-scheme
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
-BROKEN= Does not compile on ia64, powerpc, or sparc64
+.if ${MACHINE_CPU:Msse3}
+CONFIGURE_ENV+= MOSH_OPTS="-msse3 -mfpmath=sse"
+.elif ${MACHINE_CPU:Msse2}
+CONFIGURE_ENV+= MOSH_OPTS="-msse2 -mfpmath=sse"
+.elif ${MACHINE_CPU:Msse}
+CONFIGURE_ENV+= MOSH_OPTS="-msse -mfpmath=sse"
+.elif ${MACHINE_CPU:Mmmx}
+CONFIGURE_ENV+= MOSH_OPTS="-mmmx"
.endif
-post-patch:
- ${REINPLACE_CMD} 's|mosh-$$PACKAGE_VERSION|mosh|' ${WRKSRC}/configure
-
-x-generate-plist:
- @${ECHO} bin/mosh > pkg-plist.new
- @${ECHO} bin/mosh_config >> pkg-plist.new
- @${ECHO} bin/nmosh >> pkg-plist.new
- @${FIND} ${LOCALBASE}/lib/mosh -type f | ${SORT} | ${SED} 's|${LOCALBASE}/||' >> pkg-plist.new
- @${FIND} ${LOCALBASE}/lib/mosh -type d | ${SORT} -r | ${SED} 's|${LOCALBASE}/|@dirrm |' >> pkg-plist.new
+x-generate-plist: stage
+ @(${FIND} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/man -name \
+ '*mosh*' ; ${FIND} ${STAGEDIR}${PREFIX}/lib/mosh -type f) \
+ | ${SORT} | ${SED} -e 's,^${STAGEDIR}${PREFIX}/,,' \
+ > pkg-plist.new
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Added: head/lang/mosh/files/patch-configure
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/mosh/files/patch-configure Wed Sep 9 17:26:13 2015 (r396521)
@@ -0,0 +1,37 @@
+--- configure.orig 2011-06-16 09:06:28 UTC
++++ configure
+@@ -3105,7 +3105,7 @@ if test "" = "$CXXFLAGS"; then
+ CXXFLAGS=" "
+ fi
+
+-MOSH_LIB_PATH="${datadir}/mosh-$PACKAGE_VERSION"
++MOSH_LIB_PATH="${datadir}/mosh"
+
+
+ # Checks for programs.
+@@ -5808,7 +5808,6 @@ $as_echo "#define MOSH_HOST_OS \"unknown
+ ;;
+ esac
+
+-MOSH_GENERIC_OPTS="-O3"
+ MOSH_INTEL_OPTS="$MOSH_GENERIC_OPTS -momit-leaf-frame-pointer -fomit-frame-pointer"
+
+ # Checks for O/S specific features
+@@ -5931,7 +5930,7 @@ i[3456]86|pentium)
+ fi
+ ;;
+ *freebsd*)
+- MOSH_OPTS="$MOSH_INTEL_OPTS"
++ MOSH_OPTS="$MOSH_OPTS $MOSH_INTEL_OPTS"
+ MOSH_LDADD_ARCH="-lpthread"
+ ;;
+ *netbsd*)
+@@ -6023,7 +6022,7 @@ $as_echo "x86_64" >&6; }
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_cpu" >&5
+ $as_echo "$host_cpu" >&6; }
+- MOSH_OPTS="-O3"
++ MOSH_LDADD_ARCH="-lpthread"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: architecture $host_cpu is not supported, but may work other than FFI" >&5
+ $as_echo "$as_me: WARNING: architecture $host_cpu is not supported, but may work other than FFI" >&2;}
+
Added: head/lang/mosh/files/patch-fix-sparc64
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/mosh/files/patch-fix-sparc64 Wed Sep 9 17:26:13 2015 (r396521)
@@ -0,0 +1,93 @@
+--- extlibs/gc-cvs/gc_misc.c.orig 2011-06-04 00:48:10 UTC
++++ extlibs/gc-cvs/gc_misc.c
+@@ -1619,7 +1619,7 @@ STATIC void GC_do_blocking_inner(ptr_t d
+ struct blocking_data * d = (struct blocking_data *) data;
+ GC_ASSERT(GC_is_initialized);
+ GC_ASSERT(GC_blocked_sp == NULL);
+-# ifdef SPARC
++# if defined(SPARC) && !defined(__FreeBSD__)
+ GC_blocked_sp = GC_save_regs_in_stack();
+ # else
+ GC_blocked_sp = (ptr_t) &d; /* save approx. sp */
+--- extlibs/gc-cvs/include/gc_config_macros.h.orig 2011-06-04 00:48:10 UTC
++++ extlibs/gc-cvs/include/gc_config_macros.h
+@@ -84,7 +84,7 @@
+ # if defined(__mips) && !defined(__linux__)
+ # define GC_IRIX_THREADS
+ # endif
+-# if defined(__sparc) && !defined(__linux__) \
++# if defined(__sparc) && !defined(__linux__) && !defined(__FreeBSD__) \
+ || defined(sun) && (defined(i386) || defined(__i386__) \
+ || defined(__amd64__))
+ # define GC_SOLARIS_THREADS
+@@ -261,7 +261,7 @@
+ # define GC_CAN_SAVE_CALL_STACKS
+ #endif
+
+-#if defined(__sparc__)
++#if defined(__sparc__) && !defined(__XXXeBSD__)
+ # define GC_CAN_SAVE_CALL_STACKS
+ #endif
+
+--- extlibs/gc-cvs/include/private/gcconfig.h.orig 2011-06-04 00:48:10 UTC
++++ extlibs/gc-cvs/include/private/gcconfig.h
+@@ -2568,7 +2568,7 @@
+ # endif
+ #endif /* !GC_WORD_C */
+
+-#if defined(SPARC)
++#if defined(SPARC) && !defined(__FreeBSD__)
+ # define ASM_CLEAR_CODE /* Stack clearing is crucial, and we */
+ /* include assembly code to do it well. */
+ #endif
+--- extlibs/gc-cvs/mach_dep.c.orig 2011-06-04 00:48:10 UTC
++++ extlibs/gc-cvs/mach_dep.c
+@@ -228,7 +228,7 @@ GC_INNER void GC_with_callee_saves_pushe
+ # endif
+ # endif
+ context = &ctxt;
+-# if defined(SPARC) || defined(IA64)
++# if (defined(SPARC) && !defined(__FreeBSD__)) || defined(IA64)
+ /* On a register window machine, we need to save register */
+ /* contents on the stack for this to work. This may already be */
+ /* subsumed by the getcontext() call. */
+--- extlibs/gc-cvs/pthread_stop_world.c.orig 2011-06-04 00:48:10 UTC
++++ extlibs/gc-cvs/pthread_stop_world.c
+@@ -226,7 +226,7 @@ STATIC void GC_suspend_handler_inner(ptr
+ RESTORE_CANCEL(cancel_state);
+ return;
+ }
+-# ifdef SPARC
++# if defined(SPARC) && !defined(__FreeBSD__)
+ me -> stop_info.stack_ptr = GC_save_regs_in_stack();
+ # else
+ me -> stop_info.stack_ptr = (ptr_t)(&me);
+@@ -322,7 +322,7 @@ GC_INNER void GC_push_all_stacks(void)
+ ++nthreads;
+ if (THREAD_EQUAL(p -> id, self)) {
+ GC_ASSERT(!p->thread_blocked);
+-# ifdef SPARC
++# if defined(SPARC) && !defined(__FreeBSD__)
+ lo = (ptr_t)GC_save_regs_in_stack();
+ # else
+ lo = GC_approx_sp();
+--- extlibs/gc-cvs/pthread_support.c.orig 2011-06-04 00:48:10 UTC
++++ extlibs/gc-cvs/pthread_support.c
+@@ -1058,7 +1058,7 @@ GC_INNER void GC_do_blocking_inner(ptr_t
+ {
+ struct blocking_data * d = (struct blocking_data *) data;
+ GC_thread me;
+-# if defined(SPARC) || defined(IA64)
++# if (defined(SPARC) && !defined(__FreeBSD__)) || defined(IA64)
+ ptr_t stack_ptr = GC_save_regs_in_stack();
+ # endif
+ # if defined(GC_DARWIN_THREADS) && !defined(DARWIN_DONT_PARSE_STACK)
+@@ -1069,7 +1069,7 @@ GC_INNER void GC_do_blocking_inner(ptr_t
+ LOCK();
+ me = GC_lookup_thread(pthread_self());
+ GC_ASSERT(!(me -> thread_blocked));
+-# ifdef SPARC
++# if defined(SPARC) && !defined(__FreeBSD__)
+ me -> stop_info.stack_ptr = stack_ptr;
+ # else
+ me -> stop_info.stack_ptr = GC_approx_sp();
Modified: head/lang/mosh/pkg-descr
==============================================================================
--- head/lang/mosh/pkg-descr Wed Sep 9 16:33:14 2015 (r396520)
+++ head/lang/mosh/pkg-descr Wed Sep 9 17:26:13 2015 (r396521)
@@ -1,3 +1,5 @@
-Mosh is A Fast R6RS Scheme interpreter.
+Mosh is a free and fast interpreter for Scheme as specified in the R6RS.
+R6RS is the latest revision of the Scheme standard; the current release
+of Mosh supports all the features of R6RS.
-WWW: http://code.google.com/p/mosh-scheme/
+WWW: http://mosh.monaos.org/
More information about the svn-ports-all
mailing list