1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

security category: Remove $PTHREAD_LIBS

approved by:	PTHREAD blanket
This commit is contained in:
John Marino 2015-03-25 08:30:27 +00:00
parent f7fc243237
commit c55ac89dcd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=382200
26 changed files with 39 additions and 68 deletions

View File

@ -8,11 +8,11 @@ CATEGORIES= security
MASTER_SITES= SF \
http://www.cs.tut.fi/~rammer/
MAINTAINER= cy@FreeBSD.org
COMMENT= Replacement and extension for Tripwire
LIB_DEPENDS= libmhash.so:${PORTSDIR}/security/mhash
USES= bison gmake
USE_AUTOTOOLS= autoconf
@ -22,7 +22,7 @@ CONFIGURE_ARGS+=--with-mhash \
--mandir=${MANPREFIX}/man \
--with-config_file=${PREFIX}/etc/aide.conf
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
LDFLAGS+= -lpthread -L${LOCALBASE}/lib
CFLAGS+= -I${LOCALBASE}/include
SUB_FILES= pkg-message

View File

@ -76,14 +76,11 @@ CONFIGURE_ARGS= --libdir=${PREFIX}/lib \
--enable-gethostbyname_r \
--disable-dependency-tracking \
--enable-clamdtop
CPPFLAGS+= -I${LOCALBASE}/include \
${PTHREAD_CFLAGS}
LDFLAGS+= -L${LOCALBASE}/lib \
${PTHREAD_LIBS}
CPPFLAGS+= -I${LOCALBASE}/include
# This port has a problem with -pthread,
# force to use -lthr until it's not fixed.
PTHREAD_LIBS= -lthr
LDFLAGS+= -lthr -L${LOCALBASE}/lib
CONFLICTS?= clamav-milter-[0-9]*
@ -167,7 +164,7 @@ CFLAGS+= -march=i486
.endif
post-patch:
@${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' \
@${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|-lthr|g' \
-e 's|LC_REVISION=22|LC_REVISION=24|' \
${WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} -e 's,^\(pkgconfigdir = \).*$$,\1$$\(prefix\)/libdata/pkgconfig,g' \

View File

@ -18,8 +18,8 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-clamav-config=${LOCALBASE}/bin \
--with-courier-config=${LOCALBASE}/bin
CPPFLAGS+= -I${LOCALBASE}/include
CFLAGS+= ${PTHREAD_CFLAGS} -I${LOCALBASE}/include
LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -lpthread -L${LOCALBASE}/lib
PLIST_DIRS= etc/courier/clamcour
PLIST_FILES= libexec/filters/clamcour man/man1/clamcour.1.gz

View File

@ -34,7 +34,6 @@ SUB_LIST+= CLAMD=
.endif
post-patch:
@${REINPLACE_CMD} -e "s,%%PTHREAD_LIBS%%,${PTHREAD_LIBS}," ${WRKSRC}/configure
@${REINPLACE_CMD} -e "s,/var/run/clamav/clamd,/var/run/clamav/clamd.sock," \
${WRKSRC}/doc/clamsmtpd.conf \
${WRKSRC}/doc/clamsmtpd.conf.5 \

View File

@ -5,7 +5,7 @@
# which is a program returning the flags for the Pth emulation library.
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+acx_pthread_flags="pthreads none -Kthread -kthread %%PTHREAD_LIBS%% -pthreads lthread -mthreads pthread --thread-safe -mt pthread-config"
+acx_pthread_flags="pthreads none -Kthread -kthread -lpthread -pthread -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:

View File

@ -30,8 +30,6 @@ PORTDOCS= README
post-patch:
@${REINPLACE_CMD} -e 's/%%CFLAGS%%/${CFLAGS}/' ${WRKSRC}/makefile
@${REINPLACE_CMD} -e 's/%%PTHREAD_CFLAGS%%/${PTHREAD_CFLAGS}/' ${WRKSRC}/makefile
@${REINPLACE_CMD} -e 's/%%PTHREAD_LIBS%%/${PTHREAD_LIBS}/' ${WRKSRC}/tools/getlibs.sh
do-install:
${INSTALL_DATA} ${WRKSRC}/libcl.a ${WRKSRC}/libcl.so.${PORTVERSION} \

View File

@ -5,7 +5,7 @@
./tools/buildasm.sh $(AS) $(OBJPATH) ; \
make $(DEFINES) EXTRAOBJS="$(ASMOBJS)" CFLAGS="$(CFLAGS) -DUSE_ASM \
- -fomit-frame-pointer -pthread" ; \
+ %%CFLAGS%% %%PTHREAD_CFLAGS%%" ; \
+ %%CFLAGS%%" ; \
else \
make $(DEFINES) CFLAGS="$(CFLAGS) -fomit-frame-pointer -pthread" ; \
fi

View File

@ -1,11 +0,0 @@
--- tools/getlibs.sh.orig Mon Nov 13 08:18:56 2006
+++ tools/getlibs.sh Mon Nov 13 08:19:14 2006
@@ -92,7 +92,7 @@
echo "" ;;
'FreeBSD'|'NetBSD')
- echo "-lpthread" ;;
+ echo "%%PTHREAD_LIBS%%" ;;
'HP-UX')
case `uname -r | sed 's/^[A-Z].//' | cut -f 1 -d '.'` in

View File

@ -46,8 +46,7 @@ USE_LDCONFIG= yes
.endif
.if ${PORT_OPTIONS:MTHREADS}
CXXFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS}
LDFLAGS+= -lpthread
.endif
do-install:

View File

@ -21,12 +21,10 @@ USE_LDCONFIG= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
pre-configure:
@${REINPLACE_CMD} -e '/LIBS=.*-lpthread/s/-lpthread/${PTHREAD_LIBS}/g' \
${WRKSRC}/${CONFIGURE_SCRIPT}
post-install:
@${MV} ${STAGEDIR}${PREFIX}/lib/libfakeroot-0.so ${STAGEDIR}${PREFIX}/lib/libfakeroot.so.0
@${LN} -sf ${PREFIX}/lib/libfakeroot.so.0 ${STAGEDIR}${PREFIX}/lib/libfakeroot-0.so
${MV} ${STAGEDIR}${PREFIX}/lib/libfakeroot-0.so \
${STAGEDIR}${PREFIX}/lib/libfakeroot.so.0
${LN} -sf ${PREFIX}/lib/libfakeroot.so.0 \
${STAGEDIR}${PREFIX}/lib/libfakeroot-0.so
.include <bsd.port.mk>

View File

@ -21,9 +21,10 @@ PLIST_FILES= bin/gnome-ssh-askpass2
USES= pkgconfig
USE_GNOME= gtk20
CFLAGS+= ${PTHREAD_LIBS}
CFLAGS+= -lpthread
do-install:
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/gnome-ssh-askpass2 ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/gnome-ssh-askpass2 \
${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>

View File

@ -81,8 +81,6 @@ verify: checksum
gpg2 --verify ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}.sig
post-patch:
@${REINPLACE_CMD} -e "s@-lpthread@${PTHREAD_LIBS}@g" ${CONFIGURE_SUB} \
${WRKSRC}/acinclude.m4 ${WRKSRC}/aclocal.m4 ${WRKSRC}/configure
@${REINPLACE_CMD} -e "/#include <utmp.h>/d" \
${WRKSRC}/tools/symcryptrun.c

View File

@ -16,6 +16,7 @@ USES= gmake libtool tar:bzip2
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
MAKE_JOBS_UNSAFE= yes
CPP+= -P
.include <bsd.port.options.mk>

View File

@ -46,8 +46,7 @@ post-patch:
-e 's|LIB_INSTALL_DIR}|CMAKE_INSTALL_PREFIX}/libdata|' \
-e 's|CMAKE_INSTALL_DIR}|CMAKE_INSTALL_DIR}/libssh|' \
${WRKSRC}/CMakeLists.txt
@${REINPLACE_CMD} -e 's|-lssh_threads|-lssh_threads ${PTHREAD_LIBS}|' \
-e 's|$${INCLUDE_INSTALL_DIR}|$${INCLUDE_INSTALL_DIR} ${PTHREAD_CFLAGS}|' \
@${REINPLACE_CMD} -e 's|-lssh_threads|-lssh_threads -lpthread|' \
${WRKSRC}/libssh_threads.pc.cmake
@${REINPLACE_CMD} -e 's| -pedantic-errors||' \
${WRKSRC}/cmake/Modules/DefineCompilerFlags.cmake

View File

@ -207,7 +207,6 @@ post-patch:
@${REINPLACE_CMD} -e 's|-ldes|-lcrypto|g' ${WRKSRC}/configure
@${REINPLACE_CMD} \
-e 's|install: \(.*\) host-key check-config|install: \1|g' \
-e 's|-lpthread|${PTHREAD_LIBS}|' \
${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|' \
${WRKSRC}/pathnames.h ${WRKSRC}/sshd_config.5 \

View File

@ -201,7 +201,6 @@ do-configure:
.if ${PORT_OPTIONS:MTHREADS}
cd ${WRKSRC} \
&& ${SETENV} CC="${CC}" FREEBSDCC="${CC}" CFLAGS="${CFLAGS}" PERL="${PERL}" \
PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS} \
./config --prefix=${PREFIX} --openssldir=${OPENSSLDIR} \
--install_prefix=${STAGEDIR} \
-L${PREFIX}/lib ${EXTRACONFIGURE}

View File

@ -5,7 +5,7 @@
# sometimes -D_REENTRANT. FreeBSD 5.x expands it as -lc_r, which
# seems to be sufficient?
-my $BSDthreads="-pthread -D_THREAD_SAFE -D_REENTRANT";
+my $BSDthreads="$ENV{'PTHREAD_LIBS'} -D_REENTRANT $ENV{'PTHREAD_CFLAGS'}";
+my $BSDthreads="-lpthread -D_REENTRANT";
#config-string $cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $cpuid_obj : $bn_obj : $ec_obj : $des_obj : $aes_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $wp_obj : $cmll_obj : $modes_obj : $engines_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags : $multilib

View File

@ -25,8 +25,8 @@ PLIST_FILES= bin/${PORTNAME}
PORTDOCS= ChangeLog.txt README.txt
post-patch:
@${REINPLACE_CMD} -e 's,CC = g++,CXX ?= g++, ; s,CFLAGS =,CXXFLAGS +=, ; \
s,-lpthread,${PTHREAD_LIBS}, ; s,CC,CXX, ; s,CFLAGS,CXXFLAGS,' \
@${REINPLACE_CMD} -e 's,CC = g++,CXX ?= g++, ; \
s,CFLAGS =,CXXFLAGS +=, ; s,CC,CXX, ; s,CFLAGS,CXXFLAGS,' \
${WRKSRC}/Makefile
do-install:

View File

@ -13,17 +13,22 @@ COMMENT= Simple HTTP scanner
USES= dos2unix
PLIST_FILES= bin/${PORTNAME} %%DATADIR%%/requests.txt %%DATADIR%%/subdomains.txt
PLIST_FILES= bin/${PORTNAME} \
%%DATADIR%%/requests.txt \
%%DATADIR%%/subdomains.txt
post-patch:
@${REINPLACE_CMD} -E '/^#define/s!([a-z]*\.txt)!${DATADIR}/\1!' ${WRKSRC}/${DISTNAME:tl}.c
@${REINPLACE_CMD} -E '/^#define/s!([a-z]*\.txt)!${DATADIR}/\1!' \
${WRKSRC}/${DISTNAME:tl}.c
do-build:
@cd ${WRKSRC} && ${CC} ${CFLAGS} ${PTHREAD_CFLAGS} -o ${PORTNAME} ${DISTNAME:tl}.c ${PTHREAD_LIBS}
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${CC} ${CFLAGS} -o ${PORTNAME} ${DISTNAME:tl}.c -lpthread)
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
@${INSTALL} -d ${STAGEDIR}${DATADIR}/
${INSTALL} ${WRKSRC}/requests.txt ${WRKSRC}/subdomains.txt ${STAGEDIR}${DATADIR}/
${INSTALL} ${WRKSRC}/requests.txt ${WRKSRC}/subdomains.txt \
${STAGEDIR}${DATADIR}/
.include <bsd.port.mk>

View File

@ -63,14 +63,12 @@ LDFLAGS+= -lwrap
.if ${PORT_OPTIONS:MUCONTEXT}
CONFIGURE_ARGS+=--with-threads=ucontext
CPPFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS}
LDFLAGS+= -lpthread
.elif ${PORT_OPTIONS:MFORK}
CONFIGURE_ARGS+=--with-threads=fork
.else
CONFIGURE_ARGS+=--with-threads=pthread
CPPFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS}
LDFLAGS+= -lpthread
.endif
post-patch:

View File

@ -109,8 +109,6 @@ post-patch:
${WRKSRC}/configure
post-configure:
@${FIND} -X ${WRKSRC} -type f -name Makefile | ${XARGS} ${REINPLACE_CMD} -e \
"s|-lpthread|${PTHREAD_LIBS}|g"
@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
${WRKSRC}/Makefile

View File

@ -106,7 +106,6 @@ LIB_DEPENDS+= libtcmalloc.so:${PORTSDIR}/devel/google-perftools
.if ${PORT_OPTIONS:MTHREADS}
CONFIGURE_ARGS+= --enable-threads
CFLAGS+= ${PTHREAD_CFLAGS}
.else
CONFIGURE_ARGS+= --disable-threads
.endif
@ -127,8 +126,6 @@ post-patch:
${WRKSRC}/configure
post-configure:
@${FIND} -X ${WRKSRC} -type f -name Makefile | ${XARGS} ${REINPLACE_CMD} -e \
"s|-lpthread|${PTHREAD_LIBS}|g"
@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
${WRKSRC}/Makefile

View File

@ -29,7 +29,7 @@ post-patch:
@echo "CPPFLAGS=-I. -I.. -I${WRKSRC}/ui -I${QT_INCDIR} -I${QT_INCDIR}/Qt -I${LOCALBASE}/include" > ${WRKSRC}/Local.mak
@echo "CFLAGS= ${CFLAGS} -Wall -ggdb" >> ${WRKSRC}/Local.mak
@echo "LDFLAGS= ${LDFLAGS}" >> ${WRKSRC}/Local.mak
@echo "LIBS= ${LIBS} -L${QT_LIBDIR} -L${LOCALBASE}/lib -lQtCore -lQtGui ${PTHREAD_LIBS} -lcrypto -lltdl ${LD_CXX_LIB}" >> ${WRKSRC}/Local.mak
@echo "LIBS= ${LIBS} -L${QT_LIBDIR} -L${LOCALBASE}/lib -lQtCore -lQtGui -lpthread -lcrypto -lltdl ${LD_CXX_LIB}" >> ${WRKSRC}/Local.mak
@echo "MOC=${MOC}" >> ${WRKSRC}/Local.mak
@echo "UIC=${QT_PREFIX}/bin/uic-qt4" >> ${WRKSRC}/Local.mak
@echo "RCC=${LOCALBASE}/bin/rcc" >> ${WRKSRC}/Local.mak

View File

@ -54,12 +54,11 @@ post-patch:
-e '/^XMLSEC_SHLIBSFX="/s|"[^"]*"|".so"|' \
-e 's|openssl_exlibs=-ldl|openssl_exlibs=|' \
-e 's|-ldl"|"|' \
-e 's,with_nspr/include,with_nspr/include/nspr ${PTHREAD_CFLAGS},' \
-e 's,with_nss/include,with_nss/include/nss/nss,' \
-e 's,with_nss/lib,with_nss/lib/nss,g' \
-e 's,\(CPPFLAGS="\$$NSS_CFLAGS\),\1 $$NSPR_CFLAGS,' \
-e '/XMLSEC_CRYPTO_LIST=.*openssl/s,$$,\; CPPFLAGS="$$CPPFLAGS $$OPENSSL_CFLAGS",' \
-e 's,\(-lplc4\)",\1 ${PTHREAD_LIBS}",' \
-e 's,\(-lplc4\)",\1 -lpthread",' \
-e '/ test /s, == , = ,' \
${WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} \
@ -75,7 +74,7 @@ post-patch:
.if ${PORT_OPTIONS:MNSS}
# Makeing the xmlsec1 executable multi-threaded to let load -lnss,
# when needed.
@${REINPLACE_CMD} -e 's,^\(xmlsec1_LDADD = \)\\$$,\1 -L${LOCALBASE}/lib ${PTHREAD_LIBS}\\,' \
@${REINPLACE_CMD} -e 's,^\(xmlsec1_LDADD = \)\\$$,\1 -L${LOCALBASE}/lib -lpthread\\,' \
${WRKSRC}/apps/Makefile.in
.endif

View File

@ -13,9 +13,6 @@ USES= perl5
USE_OPENSSL= yes
USE_PERL5= build
MAKE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS=${PTHREAD_LIBS}
EXAMPLES= vncviewer.zbd vncserver.zbd server.key server.id client1.key \
client2.key clients.id
DOCS= README.txt LICENCE.txt CHANGES.txt zebedee.html ftpgw.tcl.html

View File

@ -72,7 +72,7 @@
-CFLAGS = $(OPTIM) $(DEFINES) -I. $(GMPINC) $(BFINC) $(ZINC) $(BZINC)
+CFLAGS ?= -03
+CFLAGS += $(PTHREAD_CFLAGS) $(OPTIM) $(DEFINES) -I. $(GMPINC) $(BFINC) $(ZINC) $(BZINC)
+CFLAGS += $(OPTIM) $(DEFINES) -I. $(GMPINC) $(BFINC) $(ZINC) $(BZINC)
LIBS = $(GMPLIB) $(BFLIB) $(ZLIB) $(BZLIB) $(OSLIBS)
@ -93,7 +93,7 @@
zebedee$(EXE) : $(OBJS)
- $(CC) $(CFLAGS) -o zebedee$(EXE) $(OBJS) $(LIBS)
+ $(CC) $(CFLAGS) -o zebedee$(EXE) $(OBJS) $(LIBS) $(PTHREAD_LIBS)
+ $(CC) $(CFLAGS) -o zebedee$(EXE) $(OBJS) $(LIBS) -lpthread
huge.o : huge.h