mirror of
https://github.com/netbirdio/FreeBSD-ports.git
synced 2026-05-22 18:42:42 -07:00
sysutils/incron: Fix build with llvm15
- Remove legacy codes related to gcc42 - Pet portclippy - Utilize USES=localbase Approved by: portmgr (blanket)
This commit is contained in:
@@ -15,27 +15,29 @@ LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-X11
|
||||
|
||||
LIB_DEPENDS= libinotify.so:devel/libinotify
|
||||
|
||||
USES= compiler
|
||||
USES= compiler localbase:ldflags
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= ar-
|
||||
GH_TAGNAME= 81421d3a8bde0989d7e167d8a814d5232896c930
|
||||
CPPFLAGS+= -I${LOCALBASE}/include -D__NR_inotify_init
|
||||
LDFLAGS+= -L${LOCALBASE}/lib -linotify
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
|
||||
MAKE_ARGS= PREFIX="${PREFIX}" USER=${UID} \
|
||||
DOCDIR="${PREFIX}/etc" \
|
||||
MANPATH=${MANPREFIX}/man
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
|
||||
CPPFLAGS+= -D__NR_inotify_init
|
||||
LDFLAGS+= -linotify
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400079 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 ))
|
||||
EXTRA_PATCHES= ${FILESDIR}/extra-patch-FreeBSD_14
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's,/etc/incron,${PREFIX}/etc/incron,' \
|
||||
${WRKSRC}/*conf* ${WRKSRC}/Makefile ${WRKSRC}/*.[158h] \
|
||||
${WRKSRC}/*.cpp
|
||||
${REINPLACE_CMD} -e '/INITDIR/d' ${WRKSRC}/Makefile
|
||||
.if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42
|
||||
${REINPLACE_CMD} -e '/pragma/d' ${WRKSRC}/inotify-cxx.cpp \
|
||||
${WRKSRC}/usertable.cpp
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--- usertable.cpp.orig 2023-06-10 14:06:49 UTC
|
||||
+++ usertable.cpp
|
||||
@@ -571,17 +571,6 @@ bool UserTable::MayAccess(const std::string& rPath, bo
|
||||
return false; // no access right found
|
||||
}
|
||||
|
||||
-#ifndef __linux__
|
||||
-static int
|
||||
-clearenv(void)
|
||||
-{
|
||||
- extern char **environ;
|
||||
-
|
||||
- environ[0] = NULL;
|
||||
- return 0;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
void UserTable::RunAsUser(std::string cmd) const
|
||||
{
|
||||
struct passwd* pwd = getpwnam(m_user.c_str());
|
||||
Reference in New Issue
Block a user