Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Oct 2019 16:57:52 +0000 (UTC)
From:      Vasil Dimov <vd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r514348 - head/net-p2p/qtum
Message-ID:  <201910121657.x9CGvq3M049468@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vd
Date: Sat Oct 12 16:57:51 2019
New Revision: 514348
URL: https://svnweb.freebsd.org/changeset/ports/514348

Log:
  net-p2p/qtum: fix compilation on FreeBSD 11.x

Modified:
  head/net-p2p/qtum/Makefile

Modified: head/net-p2p/qtum/Makefile
==============================================================================
--- head/net-p2p/qtum/Makefile	Sat Oct 12 16:50:56 2019	(r514347)
+++ head/net-p2p/qtum/Makefile	Sat Oct 12 16:57:51 2019	(r514348)
@@ -27,7 +27,6 @@ USES=		autoreconf bdb:5+ compiler:c++14-lang gmake lib
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV+=	BDB_CFLAGS="-I${BDB_INCLUDE_DIR}" \
 		BDB_LIBS="-L${BDB_LIB_DIR} -l${BDB_LIB_CXX_NAME}" \
-		CPPFLAGS="-I${LOCALBASE}/include" \
 		LDFLAGS="-L${LOCALBASE}/lib"
 # * Man pages have not been adjusted after cloning the Bitcoin code base.
 #   They are the old Bitcoin man pages, so do not install them.
@@ -60,6 +59,17 @@ CONFIGURE_ENV+=	CRYPTO_CFLAGS="-I${OPENSSLINC}" \
 		CRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto" \
 		SSL_CFLAGS="-I${OPENSSLINC}" \
 		SSL_LIBS="-L${OPENSSLLIB} -lssl"
+.endif
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200000
+# Force PIC on FreeBSD 11.x because otherwise linking fails:
+# /usr/bin/ld: qtum_cli-bitcoin-cli.o: relocation R_X86_64_32 against `a local
+# symbol' can not be used when making a shared object; recompile with -fPIC
+CONFIGURE_ENV+=	CPPFLAGS="-I${LOCALBASE}/include -fPIC -DPIC"
+post-patch:
+	${SED} -i '' -e 's/AC_SUBST(PIE_FLAGS)//' ${WRKSRC}/configure.ac
+.else
+CONFIGURE_ENV+=	CPPFLAGS="-I${LOCALBASE}/include"
 .endif
 
 .include <bsd.port.post.mk>



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