Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Dec 2020 20:21:52 +0000 (UTC)
From:      Mikhail Teterin <mi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r559774 - in head: editors/xcoral lang/scm lang/scm/files
Message-ID:  <202012312021.0BVKLqLI084717@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mi
Date: Thu Dec 31 20:21:52 2020
New Revision: 559774
URL: https://svnweb.freebsd.org/changeset/ports/559774

Log:
  Start searching for headers and libraries under ${LOCALBASE}/ --
  in case newer implementations of anything are installed there.
  
  When compiling on 13.x or above, insist on libgnuregex version above
  5 -- earlier FreeBSD releases came with libgnuregex.so.5, but that's
  now gone and replaced by the devel/libgnuregex port, which currently
  installs libgnuregex.so.6.
  
  PR:		252252 252250 252245
  Submitted by:	kevans
  Sponsored by:	United Marsupials

Modified:
  head/editors/xcoral/Makefile
  head/lang/scm/Makefile
  head/lang/scm/files/patch-build.scm

Modified: head/editors/xcoral/Makefile
==============================================================================
--- head/editors/xcoral/Makefile	Thu Dec 31 20:12:18 2020	(r559773)
+++ head/editors/xcoral/Makefile	Thu Dec 31 20:21:52 2020	(r559774)
@@ -20,12 +20,20 @@ USE_XORG=	x11
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--libdir=${PREFIX}/share
 LIBS+=		-lgnuregex
+LDFLAGS+=	-L${LOCALBASE}/lib
+CFLAGS+=	-isystem ${LOCALBASE}/include
 EXTRACT_AFTER_ARGS=	--exclude BR_Parser.[ch]
 
 PLIST_SUB=	VERSION="${PORTVERSION}"
 
 OPTIONS_DEFINE=	DOCS
 
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} > 1300000
+LIB_DEPENDS+=	libgnuregex.so.[6-9]:devel/libgnuregex
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's| regex\.[co] | |g ; \
 		 s| -g | |g' ${WRKSRC}/Makefile.in
@@ -37,4 +45,4 @@ do-install:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/Doc/* ${STAGEDIR}${DOCSDIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/lang/scm/Makefile
==============================================================================
--- head/lang/scm/Makefile	Thu Dec 31 20:12:18 2020	(r559773)
+++ head/lang/scm/Makefile	Thu Dec 31 20:21:52 2020	(r559774)
@@ -56,6 +56,10 @@ SCM_MODULES_X11=x.so
 
 .include <bsd.port.pre.mk>
 
+.if ${OSVERSION} > 1300000
+LIB_DEPENDS+=	libgnuregex.so.[6-9]:devel/libgnuregex
+.endif
+
 .if ${PORT_OPTIONS:MX11}
 SCM_MODULES+=	${SCM_MODULES_X11}
 SCM_DATA+=	${SCM_DATA_X11}

Modified: head/lang/scm/files/patch-build.scm
==============================================================================
--- head/lang/scm/files/patch-build.scm	Thu Dec 31 20:12:18 2020	(r559773)
+++ head/lang/scm/files/patch-build.scm	Thu Dec 31 20:21:52 2020	(r559774)
@@ -9,7 +9,8 @@
       (m freebsd "" "-lm" #f () ())
 -     (curses freebsd "" "-lncurses" "/usr/lib/libncurses.a" () ())
 +     (curses freebsd "" "-lcurses" "/usr/lib/libcurses.a" () ())
-      (regex freebsd "-I/usr/include/gnu" "-lgnuregex" "" () ())
+-     (regex freebsd "-I/usr/include/gnu" "-lgnuregex" "" () ())
++     (regex freebsd "-I%%LOCALBASE%%/include" "-lgnuregex" "" () ())
       (editline freebsd "" "-lreadline" "" () ())
 -     (dlll freebsd "-DSUN_DL" "-export-dynamic" "" () ())
 -     (nostart freebsd "" "-e start -dc -dp -Bstatic -lgnumalloc" #f ("pre-crt0.c") ())
@@ -56,7 +57,7 @@
  		 (cond
  		  ((equal? (car fnames) "edline") "-lreadline")
 -		  ((equal? (car fnames) "x") "-L/usr/X11R6/lib -lSM -lICE -lXext -lX11 -lxpg4")
-+		  ((equal? (car fnames) "rgx") "-lgnuregex")
++		  ((equal? (car fnames) "rgx") "-L%%LOCALBASE%%/lib -lgnuregex")
 +		  ((equal? (car fnames) "x") "-L%%LOCALBASE%%/lib -lSM -lICE -lXext -lX11")
  		  (else ""))
  		 "-o" (string-append (car fnames) ".so")



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