Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Oct 2018 14:22:38 +0000 (UTC)
From:      Mateusz Piotrowski <0mp@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r481034 - in head/sysutils/cbsd: . files
Message-ID:  <201810011422.w91EMcdj044919@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: 0mp
Date: Mon Oct  1 14:22:37 2018
New Revision: 481034
URL: https://svnweb.freebsd.org/changeset/ports/481034

Log:
  sysutils/cbsd: Fix build on mips, mips64, powerpc64.
  
  This port unconditionally links against libc++. This needs to be removed
  to build on architectures that don't have libc++.
  
  PR:		231789
  Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl>
  Approved by:	olevole@olevole.ru (maintainer), mat (mentor)
  Sponsored by:	IntegriCloud (hardware)
  Differential Revision:	https://reviews.freebsd.org/D17352

Added:
  head/sysutils/cbsd/files/patch-Makefile   (contents, props changed)
  head/sysutils/cbsd/files/patch-bin_cbsdsh_Makefile   (contents, props changed)
  head/sysutils/cbsd/files/patch-sudoexec_initenv   (contents, props changed)
Modified:
  head/sysutils/cbsd/Makefile

Modified: head/sysutils/cbsd/Makefile
==============================================================================
--- head/sysutils/cbsd/Makefile	Mon Oct  1 14:19:13 2018	(r481033)
+++ head/sysutils/cbsd/Makefile	Mon Oct  1 14:22:37 2018	(r481034)
@@ -10,10 +10,6 @@ COMMENT=	Yet another FreeBSD Jail and Bhyve Management
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BROKEN_mips=		fails to link: cannot find -lc++
-BROKEN_mips64=		fails to link: cannot find -lc++
-BROKEN_powerpc64=	fails to link: cannot find -lc++
-
 RUN_DEPENDS=	rsync:net/rsync \
 		sudo:security/sudo \
 		sqlite3:databases/sqlite3 \

Added: head/sysutils/cbsd/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/cbsd/files/patch-Makefile	Mon Oct  1 14:22:37 2018	(r481034)
@@ -0,0 +1,11 @@
+--- Makefile.orig	2018-09-28 16:15:34 UTC
++++ Makefile
+@@ -76,7 +76,7 @@ cbsd: pkg-config-check
+ 	#${CC} misc/src/sqlcli.c -static -pthread -lsqlite3 -lm -L/usr/local/lib -I/usr/local/include -o misc/sqlcli && ${STRIP} misc/sqlcli
+ 	# ICU?
+ 	#${CC} misc/src/sqlcli.c -static -pthread -lsqlite3 -lpthread -licui18n -licuuc -licudata -lm -L/usr/local/lib -I/usr/local/include -o misc/sqlcli && ${STRIP} misc/sqlcli
+-	${CC} misc/src/sqlcli.c `pkg-config sqlite3 --cflags --libs` -lm -lc++ -o misc/sqlcli && ${STRIP} misc/sqlcli
++	${CC} misc/src/sqlcli.c `pkg-config sqlite3 --cflags --libs` -lm -o misc/sqlcli && ${STRIP} misc/sqlcli
+ 	${CC} misc/src/cbsdlogtail.c -o misc/cbsdlogtail && ${STRIP} misc/cbsdlogtail
+ 	${CC} misc/src/pwcrypt.c -lcrypt -o misc/pwcrypt && ${STRIP} misc/pwcrypt
+ 	${CC} misc/src/chk_arp_byip.c -o misc/chk_arp_byip && ${STRIP} misc/chk_arp_byip

Added: head/sysutils/cbsd/files/patch-bin_cbsdsh_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/cbsd/files/patch-bin_cbsdsh_Makefile	Mon Oct  1 14:22:37 2018	(r481034)
@@ -0,0 +1,11 @@
+--- bin/cbsdsh/Makefile.orig	2018-09-28 16:10:13 UTC
++++ bin/cbsdsh/Makefile
+@@ -21,7 +21,7 @@ NOMAN=		yes
+ 
+ DPADD= ${LIBEDIT} ${LIBTERMCAP}
+ #LDADD= -ledit -ltermcap -lsqlite3 -lm -pthread -ljail
+-LDADD= -ledit -ltermcap -lm -pthread -ljail `pkg-config sqlite3 --libs` -lm -lc++
++LDADD= -ledit -ltermcap -lm -pthread -ljail `pkg-config sqlite3 --libs` -lm
+ 
+ #CFLAGS+=-DSHELL -I. -I${.CURDIR} -DCBSD -I/usr/local/include -L/usr/lib -L/usr/local/lib
+ CFLAGS+=-DSHELL -I. -I${.CURDIR} -DCBSD -I/usr/local/include -L/usr/local/lib

Added: head/sysutils/cbsd/files/patch-sudoexec_initenv
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/cbsd/files/patch-sudoexec_initenv	Mon Oct  1 14:22:37 2018	(r481034)
@@ -0,0 +1,11 @@
+--- sudoexec/initenv.orig	2018-09-28 16:11:43 UTC
++++ sudoexec/initenv
+@@ -264,7 +264,7 @@ phase2()
+ 			echo "pkg-config must be present on the system to build CBSD from the source. Please install it first: pkg install pkgconf";
+ 			exit 1
+ 		fi
+-		${CC_CMD} ${distdir}/misc/src/sqlcli.c $( pkg-config sqlite3 --cflags --libs ) -lm -lc++ -o ${distdir}/misc/sqlcli
++		${CC_CMD} ${distdir}/misc/src/sqlcli.c $( pkg-config sqlite3 --cflags --libs ) -lm -o ${distdir}/misc/sqlcli
+ 	fi
+ 	installne "-s -o ${cbsduser} -g ${cbsduser} -m 500" ${distdir}/misc/sqlcli ${miscdir}/sqlcli
+ 	[ -f ${distdir}/misc/sqlcli ] && /bin/rm -f ${distdir}/misc/sqlcli



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