diff --git a/sysutils/LPRng/Makefile b/sysutils/LPRng/Makefile index c822adc90691..36ae870cb4bb 100644 --- a/sysutils/LPRng/Makefile +++ b/sysutils/LPRng/Makefile @@ -1,63 +1,60 @@ PORTNAME= LPRng PORTVERSION= 3.8.C -PORTREVISION= 5 +PORTREVISION= 6 PORTEPOCH= 1 CATEGORIES= sysutils print MASTER_SITES= SF/${PORTNAME:tl}/${PORTNAME:tl} DISTNAME= ${PORTNAME:tl}-${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Enhanced Printer Spooler WWW= https://lprng.sourceforge.net/ LICENSE= ART10 GPLv2 LICENSE_COMB= dual -BROKEN_aarch64= Fails to link: missing sbrk -BROKEN_riscv64= Fails to link: missing sbrk - LIB_DEPENDS= libgdbm.so:databases/gdbm USES= gmake ssl GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-config_subdir="" \ --with-filterdir=${PREFIX}/libexec/filters \ --with-filter_path="${PREFIX}/bin:/bin:/usr/bin:${PREFIX}/sbin:/sbin:/usr/sbin" \ --with-printcap_path=/etc/printcap \ --with-ld_library_path="${PREFIX}/lib:/lib:/usr/lib:/${LOCALBASE}/lib" MAKE_ARGS= INSTALLCONFIGEXAMPLES="" USE_LDCONFIG= yes USE_RC_SUBR= ${PORTNAME:tl} CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib # Upstream dead, don't expect a proper fix. CFLAGS+= -fcommon SUB_FILES= pkg-message CONFLICTS= cups OPTIONS_DEFINE= LIBWRAP NLS OPTIONS_DEFAULT= LIBWRAP OPTIONS_SUB= yes LIBWRAP_CONFIGURE_ENABLE= tcpwrappers NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls NLS_CONFIGURE_ENV= gt_cv_func_gnugettext1_libc=yes \ ac_cv_func_ngettext=yes NLS_LDFLAGS= -lintl post-install: .for i in lpd.perms printcap (cd ${WRKSRC}/conf && $ ${INSTALL_DATA} ${i} \ ${STAGEDIR}/${PREFIX}/etc/${i}.sample) .endfor .for i in lpd.conf (cd ${WRKSRC}/src && $ ${INSTALL_DATA} ${i} \ ${STAGEDIR}/${PREFIX}/etc/${i}.sample) .endfor .include diff --git a/sysutils/LPRng/files/patch-src__common__lpd.c b/sysutils/LPRng/files/patch-src__common__lpd.c index d04b67598230..2ac7b2462566 100644 --- a/sysutils/LPRng/files/patch-src__common__lpd.c +++ b/sysutils/LPRng/files/patch-src__common__lpd.c @@ -1,18 +1,39 @@ --- src/common/lpd.c.orig +++ src/common/lpd.c -@@ -979,7 +979,6 @@ +@@ -64,7 +64,9 @@ + * + ****************************************************************************/ + ++#ifdef DMALLOC + static char *malloc_area; ++#endif + + int main(int argc, char *argv[], char *envp[]) + { +@@ -359,9 +361,9 @@ + first_scan = 0; + } + ++#ifdef DMALLOC + malloc_area = sbrk(0); + +-#ifdef DMALLOC + DEBUG1( "lpd: LOOP START - sbrk 0x%lx", (long)malloc_area ); + { + extern int dmalloc_outfile_fd; +@@ -979,7 +981,6 @@ * libwrap/tcp_wrappers: * draht@suse.de, Mon Jan 28 2002 */ - if( !unix_socket ){ struct request_info wrap_req; request_init(&wrap_req, RQ_DAEMON, "lpd" , RQ_FILE, newsock, NULL); -@@ -993,7 +992,6 @@ +@@ -993,7 +994,6 @@ close( newsock ); return; } - } #endif pid = Start_worker( "server", Service_connection, &args, newsock ); diff --git a/sysutils/LPRng/files/patch-src_common_utilities.c b/sysutils/LPRng/files/patch-src_common_utilities.c new file mode 100644 index 000000000000..553042f6d6fe --- /dev/null +++ b/sysutils/LPRng/files/patch-src_common_utilities.c @@ -0,0 +1,25 @@ +--- src/common/utilities.c.orig ++++ src/common/utilities.c +@@ -600,22 +600,6 @@ + return( n ); + } + +- +-char *Brk_check_size( void ) +-{ +- static char b[128]; +- static char* Top_of_mem; /* top of allocated memory */ +- char *s = sbrk(0); +- int v = s - Top_of_mem; +- if( Top_of_mem == 0 ){ +- plp_snprintf(b, sizeof(b), "BRK: initial value 0x%lx", Cast_ptr_to_long(s) ); +- } else { +- plp_snprintf(b, sizeof(b), "BRK: new value 0x%lx, increment %d", Cast_ptr_to_long(s), v ); +- } +- Top_of_mem = s; +- return(b); +-} +- + char *mystrncat( char *s1, const char *s2, int len ) + { + int size; diff --git a/sysutils/LPRng/files/patch-src_include_utilities.h b/sysutils/LPRng/files/patch-src_include_utilities.h new file mode 100644 index 000000000000..cbeacfeac350 --- /dev/null +++ b/sysutils/LPRng/files/patch-src_include_utilities.h @@ -0,0 +1,10 @@ +--- src/include/utilities.h.orig ++++ src/include/utilities.h +@@ -54,7 +54,6 @@ + int plp_sleep( int i ); + int Get_max_servers( void ); + int Get_max_fd( void ); +-char *Brk_check_size( void ); + char *mystrncat( char *s1, const char *s2, int len ); + char *mystrncpy( char *s1, const char *s2, int len ); + int Get_nonblock_io( int fd );