Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jul 2019 15:41:44 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r505685 - in head/cad/lepton-eda: . files
Message-ID:  <201907021541.x62FfiaS086175@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Tue Jul  2 15:41:44 2019
New Revision: 505685
URL: https://svnweb.freebsd.org/changeset/ports/505685

Log:
  - Restrict Python run-time dependency to version 2.7 because
    supplied scripts use the old syntax (print statement, etc.)
  - Add a patch to fix regressions of transition to Guile 2.2
  
  Submitted by:	maintainer
  Upstream bug:	https://github.com/lepton-eda/lepton-eda/issues/440

Added:
  head/cad/lepton-eda/files/patch-m4_geda-guile.m4   (contents, props changed)
  head/cad/lepton-eda/files/patch-schematic_scheme_gschem_action.scm   (contents, props changed)
Modified:
  head/cad/lepton-eda/Makefile

Modified: head/cad/lepton-eda/Makefile
==============================================================================
--- head/cad/lepton-eda/Makefile	Tue Jul  2 15:24:50 2019	(r505684)
+++ head/cad/lepton-eda/Makefile	Tue Jul  2 15:41:44 2019	(r505685)
@@ -2,7 +2,7 @@
 
 PORTNAME=	lepton-eda
 PORTVERSION=	1.9.7
-PORTREVISION=	1
+PORTREVISION=	2
 DISTVERSIONSUFFIX=	-20181211
 CATEGORIES=	cad
 
@@ -18,9 +18,9 @@ LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 		libpng.so:graphics/png \
 		libstroke.so:devel/libstroke
 
-USES=		autoreconf desktop-file-utils gettext-tools gnome groff:build \
-		libtool localbase makeinfo pathfix perl5 pkgconfig python:run \
-		shared-mime-info shebangfix
+USES=		autoreconf desktop-file-utils gettext-tools gnome \
+		groff:build libtool localbase makeinfo pathfix perl5 \
+		pkgconfig python:2.7,run shared-mime-info shebangfix
 USE_GITHUB=	yes
 USE_GNOME=	cairo gtk20
 USE_LDCONFIG=	yes
@@ -52,10 +52,6 @@ OPTIONS_SUB=	yes
 
 NLS_CONFIGURE_ENABLE=	nls
 NLS_USES=		gettext-runtime
-
-post-patch:
-	@${REINPLACE_CMD} -e 's,guile-2\.0,guile-2.2,' \
-		${WRKSRC}/m4/geda-guile.m4
 
 # work around for errors while running
 # build-tools/icon-theme-installer:

Added: head/cad/lepton-eda/files/patch-m4_geda-guile.m4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/lepton-eda/files/patch-m4_geda-guile.m4	Tue Jul  2 15:41:44 2019	(r505685)
@@ -0,0 +1,26 @@
+--- m4/geda-guile.m4.orig	2018-12-11 19:24:41 UTC
++++ m4/geda-guile.m4
+@@ -34,9 +34,20 @@ AC_DEFUN([AX_CHECK_GUILE],
+   GUILE_MIN_MINOR=`echo ${GUILE_MIN_VER} | sed -e 's;[[^\.]]*\.;;' -e 's;\..*;;g'`
+   GUILE_MIN_TEENY=`echo ${GUILE_MIN_VER} | sed -e 's;.*\.;;'`
+ 
+-  PKG_CHECK_MODULES(GUILE, [guile-2.0 >= $GUILE_MIN_VER],
+-                           [GUILE_PKG_NAME=guile-2.0],
+-                           [AC_MSG_ERROR([you need at least version ${GUILE_MIN_VER} of guile])])
++  _found_pkg_config_guile=yes
++  PKG_CHECK_MODULES(GUILE, [guile-2.2 >= $GUILE_MIN_VER],
++                           [GUILE_PKG_NAME=guile-2.2], [_found_pkg_config_guile=no])
++
++  if test "${_found_pkg_config_guile}" = "no" ; then
++   PKG_CHECK_MODULES(GUILE, [guile-2.0 >= $GUILE_MIN_VER],
++                            [_found_pkg_config_guile=yes
++                             GUILE_PKG_NAME=guile-2.0],
++                            [_found_pkg_config_guile=no])
++  fi
++
++  if test "${_found_pkg_config_guile}" = "no" ; then
++    AC_MSG_ERROR([you need at least version ${GUILE_MIN_VER} of guile])
++  fi
+ 
+   AC_SUBST([GUILE_PKG_NAME])
+ 

Added: head/cad/lepton-eda/files/patch-schematic_scheme_gschem_action.scm
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/lepton-eda/files/patch-schematic_scheme_gschem_action.scm	Tue Jul  2 15:41:44 2019	(r505685)
@@ -0,0 +1,102 @@
+--- schematic/scheme/gschem/action.scm.orig	2018-12-11 19:24:41 UTC
++++ schematic/scheme/gschem/action.scm
+@@ -1,6 +1,7 @@
+ ;; Lepton EDA Schematic Capture
+ ;; Scheme API
+ ;; Copyright (C) 2013 Peter Brett <peter@peter-b.co.uk>
++;; Copyright (C) 2017-2019 Lepton EDA Contributors
+ ;;
+ ;; This program is free software; you can redistribute it and/or modify
+ ;; it under the terms of the GNU General Public License as published by
+@@ -21,11 +22,10 @@
+   #:use-module (gschem core gettext)
+   #:use-module (gschem window)
+   #:use-module (gschem hook)
++  #:use-module (geda log)
+   #:use-module (ice-9 optargs)
+   #:export-syntax (define-action))
+ 
+-(or (defined? 'define-syntax)
+-    (use-modules (ice-9 syncase)))
+ 
+ (define last-action (make-fluid))
+ (define current-action-position (make-fluid))
+@@ -33,18 +33,25 @@
+ ;; Define an eval-in-currentmodule procedure
+ (define (eval-cm expr) (eval expr (current-module)))
+ 
+-;; Evaluates a gschem action.  A gschem action is expected to be a
++;; Evaluates a lepton-schematic action.  An action is expected to be a
+ ;; symbol naming a thunk variable in the current module.
+ ;;
+ ;; The special-case symbol repeat-last-command causes the last action
+ ;; executed to be repeated.
+ (define-public (eval-action! action)
+   (define (invalid-action-error)
+-    (error (_ "~S is not a valid gschem action.") action))
++    (log! 'warning (_ "[~A] is not a valid lepton-schematic action.") action))
++  (define (no-last-action-error)
++    (log! 'message (_ "There is no last action to repeat.")))
+ 
+   (define (eval-action!/recursive a)
+ 
+     (cond
++     ;; The action is #f when the user hits "." (repeat last action)
++     ;; and there is no last action to repeat.
++     ((eq? a #f)
++      (no-last-action-error))
++
+      ;; Handle repeat-last-command
+      ((equal? 'repeat-last-command a)
+       ;; N.b. must call eval-action! rather than
+@@ -107,29 +114,30 @@
+   ;; The action is a magical procedure that does nothing but call
+   ;; eval-action! *on itself*.  This allows you to invoke an action
+   ;; just by calling it like a normal function.
+-  (letrec ((action (lambda () (eval-action! action))))
++  (let ((unique-tag (list #f)))
++    (letrec ((action (case-lambda
++                       (() (eval-action! action))
++                       ((x) unique-tag))))
+ 
+-    ;; The action data is stored in procedure properties -- most
+-    ;; importantly, the actual thunk that the action wraps
+-    (let ((sp! (lambda (k v) (set-procedure-property! action k v))))
+-      (sp! 'gschem-cookie %cookie)
+-      (sp! 'gschem-thunk thunk)
+-      (sp! 'gschem-properties '()))
++      ;; The action data is stored in procedure properties -- most
++      ;; importantly, the actual thunk that the action wraps
++      (let ((sp! (lambda (k v) (set-procedure-property! action k v))))
++        (sp! 'gschem-cookie %cookie)
++        (sp! 'gschem-thunk thunk)
++        (sp! 'gschem-properties '()))
+ 
+-    ;; Deal with any properties.  props should contain arguments in
+-    ;; pairs, where the first element of each pair is a keyword naming
+-    ;; a procedure property (e.g. #:icon) and the second element in
+-    ;; the corresponding value (e.g. "insert-text").
+-    (let loop ((lst props))
+-      (and (< 1 (length lst))
+-           (set-action-property! action
+-                                 (keyword->symbol (list-ref lst 0))
+-                                 (list-ref lst 1))
+-           (loop (list-tail lst 2))))
+-          
+-          
++      ;; Deal with any properties.  props should contain arguments in
++      ;; pairs, where the first element of each pair is a keyword naming
++      ;; a procedure property (e.g. #:icon) and the second element in
++      ;; the corresponding value (e.g. "insert-text").
++      (let loop ((lst props))
++        (and (< 1 (length lst))
++             (set-action-property! action
++                                   (keyword->symbol (list-ref lst 0))
++                                   (list-ref lst 1))
++             (loop (list-tail lst 2))))
+ 
+-    action))
++      action)))
+ 
+ (define (action-thunk action)
+   (procedure-property action 'gschem-thunk))



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