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
This commit is contained in:
Mikhail Teterin 2020-12-31 20:21:52 +00:00
parent b55d47cf5e
commit e7321bbe77
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=559774
3 changed files with 16 additions and 3 deletions

View File

@ -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>

View File

@ -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}

View File

@ -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")