Date: Tue, 14 Feb 2017 22:24:59 +0000 (UTC) From: Tijl Coosemans <tijl@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r434144 - in head/net/olsrd: . files Message-ID: <201702142224.v1EMOxZU080849@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tijl Date: Tue Feb 14 22:24:59 2017 New Revision: 434144 URL: https://svnweb.freebsd.org/changeset/ports/434144 Log: - Remove -fPIC and address the problem where a .o file compiled without -fPIC is being linked into a shared library. Copy the corresponding .c file into the shared library src directory such that it is compiled a second time with -fPIC. - Enable verbose build. - Add a patch to sync Makefile.fbsd with Makefile.linux. Added: head/net/olsrd/files/patch-lib-httpinfo-Makefile (contents, props changed) head/net/olsrd/files/patch-make-Makefile.fbsd (contents, props changed) Modified: head/net/olsrd/Makefile head/net/olsrd/files/patch-Makefile Modified: head/net/olsrd/Makefile ============================================================================== --- head/net/olsrd/Makefile Tue Feb 14 22:23:06 2017 (r434143) +++ head/net/olsrd/Makefile Tue Feb 14 22:24:59 2017 (r434144) @@ -3,6 +3,7 @@ PORTNAME= olsrd PORTVERSION= 0.9.5 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.olsr.org/releases/0.9/ @@ -12,6 +13,7 @@ COMMENT= OLSR routing daemon LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/license.txt +MAKE_ARGS= VERBOSE=1 USES= bison gmake tar:bzip2 USE_LDCONFIG= yes USE_RC_SUBR= olsrd @@ -19,9 +21,6 @@ USE_RC_SUBR= olsrd ALL_TARGET= build_all INSTALL_TARGET= install_all -CFLAGS_aarch64= -fPIC -CFLAGS_amd64= -fPIC - OPTIONS_DEFINE= MULTI_IF MULTI_IF_DESC= IPv4 multiple interface support @@ -30,6 +29,9 @@ MULTI_IF_MAKE_ARGS= LIBNET=1 post-patch: @${REINPLACE_CMD} -e 's|/sbin/ldconfig|:|g' ${WRKSRC}/make/Makefile.fbsd + @${CP} ${WRKSRC}/src/cfgparser/cfgfile_gen.c \ + ${WRKSRC}/src/cfgparser/olsrd_conf.h \ + ${WRKSRC}/lib/httpinfo/src/ post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/${PORTNAME} Modified: head/net/olsrd/files/patch-Makefile ============================================================================== --- head/net/olsrd/files/patch-Makefile Tue Feb 14 22:23:06 2017 (r434143) +++ head/net/olsrd/files/patch-Makefile Tue Feb 14 22:24:59 2017 (r434144) @@ -1,29 +1,6 @@ ---- Makefile.orig 2015-09-20 12:22:23 UTC +--- Makefile.orig 2016-11-22 19:39:42 UTC +++ Makefile -@@ -143,15 +143,15 @@ cfgparser_clean: - $(MAKECMDPREFIX)$(MAKECMD) -C $(CFGDIR) clean - - install_bin: -- mkdir -p $(SBINDIR) -- install -m 755 $(EXENAME) $(SBINDIR) -- $(STRIP) $(SBINDIR)/$(EXENAME) -+ mkdir -p ${DESTDIR}$(SBINDIR) -+ install -m 755 $(EXENAME) ${DESTDIR}$(SBINDIR) -+ $(STRIP) ${DESTDIR}$(SBINDIR)/$(EXENAME) - ifeq ($(SGW_SUPPORT),1) -- $(MAKECMDPREFIX)if [ -e $(SBINDIR)/$(SGW_POLICY_SCRIPT) ]; then \ -- cp -f files/$(SGW_POLICY_SCRIPT) $(SBINDIR)/$(SGW_POLICY_SCRIPT).new; \ -- echo "Policy routing script was saved as $(SBINDIR)/$(SGW_POLICY_SCRIPT).new"; \ -+ $(MAKECMDPREFIX)if [ -e ${DESTDIR}$(SBINDIR)/$(SGW_POLICY_SCRIPT) ]; then \ -+ cp -f files/$(SGW_POLICY_SCRIPT) ${DESTDIR}$(SBINDIR)/$(SGW_POLICY_SCRIPT).new; \ -+ echo "Policy routing script was saved as ${DESTDIR}$(SBINDIR)/$(SGW_POLICY_SCRIPT).new"; \ - else \ -- cp -f files/$(SGW_POLICY_SCRIPT) $(SBINDIR)/$(SGW_POLICY_SCRIPT); \ -+ cp -f files/$(SGW_POLICY_SCRIPT) ${DESTDIR}$(SBINDIR)/$(SGW_POLICY_SCRIPT); \ - fi - endif - -@@ -162,29 +162,26 @@ uninstall_bin: +@@ -167,20 +167,17 @@ uninstall_bin: install_olsrd: install_bin @echo ========= C O N F I G U R A T I O N - F I L E ============ @echo $(EXENAME) uses the configfile $(CFGFILE) @@ -39,40 +16,17 @@ + @echo copy and edit one of these to $(CFGFILE) + @echo If in doubt start with $(CFGFILE).default.lq @echo ========================================================== -- mkdir -p $(ETCDIR) + mkdir -p $(ETCDIR) - $(MAKECMDPREFIX)if [ -e $(CFGFILE) ]; then \ - cp -f files/olsrd.conf.default.lq $(CFGFILE).new; \ - echo "Configuration file was saved as $(CFGFILE).new"; \ - else \ - cp -f files/olsrd.conf.default.lq $(CFGFILE); \ - fi -+ mkdir -p ${DESTDIR}$(ETCDIR) -+ -cp files/olsrd.conf.default.full ${DESTDIR}$(CFGFILE).default.full -+ -cp files/olsrd.conf.default.rfc ${DESTDIR}$(CFGFILE).default.rfc -+ -cp files/olsrd.conf.default.lq ${DESTDIR}$(CFGFILE).default.lq -+ -cp files/olsrd.conf.default.lq-fisheye ${DESTDIR}$(CFGFILE).default.lq-fisheye ++ -cp files/olsrd.conf.default.full $(CFGFILE).default.full ++ -cp files/olsrd.conf.default.rfc $(CFGFILE).default.rfc ++ -cp files/olsrd.conf.default.lq $(CFGFILE).default.lq ++ -cp files/olsrd.conf.default.lq-fisheye $(CFGFILE).default.lq-fisheye @echo ------------------------------------------- @echo Edit $(CFGFILE) before running olsrd!! @echo ------------------------------------------- - @echo Installing manpages $(EXENAME)\(8\) and $(CFGNAME)\(5\) - ifneq ($(MANDIR),) -- mkdir -p $(MANDIR)/man8/ -- cp files/olsrd.8.gz $(MANDIR)/man8/$(EXENAME).8.gz -- mkdir -p $(MANDIR)/man5/ -- cp files/olsrd.conf.5.gz $(MANDIR)/man5/$(CFGNAME).5.gz -+ mkdir -p ${DESTDIR}$(MANDIR)/man8/ -+ cp files/olsrd.8.gz ${DESTDIR}$(MANDIR)/man8/$(EXENAME).8.gz -+ mkdir -p ${DESTDIR}$(MANDIR)/man5/ -+ cp files/olsrd.conf.5.gz ${DESTDIR}$(MANDIR)/man5/$(CFGNAME).5.gz - endif - ifneq ($(RCDIR),) - cp $(RCFILE) $(RCDIR)/olsrd -@@ -239,7 +236,7 @@ libs_clean clean_libs: - -for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=$(LIBDIR) clean;rm -f lib/$$dir/*.so lib/$$dir/*.dll;done - - libs_install install_libs: -- $(MAKECMDPREFIX)set -e;for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=$(LIBDIR) install;done -+ $(MAKECMDPREFIX)set -e;for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=${DESTDIR}$(LIBDIR) install;done - - libs_uninstall uninstall_libs: - $(MAKECMDPREFIX)set -e;for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=$(LIBDIR) uninstall;done Added: head/net/olsrd/files/patch-lib-httpinfo-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/olsrd/files/patch-lib-httpinfo-Makefile Tue Feb 14 22:24:59 2017 (r434144) @@ -0,0 +1,10 @@ +--- lib/httpinfo/Makefile.orig 2016-11-22 19:39:42 UTC ++++ lib/httpinfo/Makefile +@@ -52,7 +52,6 @@ ifdef ADMIN_INTERFACE + CPPFLAGS += -DADMIN_INTERFACE + endif + +-OBJS += $(TOPDIR)/src/cfgparser/cfgfile_gen.o + + default_target: $(PLUGIN_FULLNAME) + ifdef ADMIN_INTERFACE Added: head/net/olsrd/files/patch-make-Makefile.fbsd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/olsrd/files/patch-make-Makefile.fbsd Tue Feb 14 22:24:59 2017 (r434144) @@ -0,0 +1,73 @@ +--- make/Makefile.fbsd.orig 2016-11-22 19:39:42 UTC ++++ make/Makefile.fbsd +@@ -45,44 +45,49 @@ + # FREEBSD SPECIFIC CONFIGURATION + # + +-PREFIX ?= /usr/local +-SBINDIR = $(PREFIX)/sbin +-ETCDIR = $(PREFIX)/etc/olsrd +-LIBDIR = $(PREFIX)/lib +-DOCDIR = $(PREFIX)/share/doc +-MANDIR = $(PREFIX)/man ++DESTDIR ?= ++prefix ?= /usr/local ++etcdir ?= $(prefix)/etc/olsrd ++libdir ?= $(prefix)/lib ++datarootdir ?= $(prefix)/share ++mandir ?= $(prefix)/man ++sbindir ?= $(prefix)/sbin + +-SRCS += $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c) +-HDRS += $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h) ++# the rest are defined in Makefile.inc, but we don't need to override defaults ++ETCDIR = $(DESTDIR)$(etcdir) ++LIBDIR = $(DESTDIR)$(libdir) ++MANDIR = $(DESTDIR)$(mandir) ++SBINDIR = $(DESTDIR)$(sbindir) ++SHAREDIR = $(DESTDIR)$(datarootdir) + +-LIBS = ++SRCS += $(wildcard src/bsd/*.c src/unix/*.c) ++HDRS += $(wildcard src/bsd/*.h src/unix/*.h) + + CPPFLAGS += -DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\" ++LIBS += + + ifdef NO_80211 + CPPFLAGS += -DFBSD_NO_80211=1 + endif + + ifdef LIBNET +- +-CPPFLAGS += -DSPOOF -I$(PREFIX)/include +-LIBS += -L$(PREFIX)/lib -lnet +- ++CPPFLAGS += -I$(prefix)/include -DSPOOF ++LIBS += -L$(prefix)/lib -lnet + endif + ++PLUGIN_SONAME ?= lib$(PLUGIN_NAME).so ++PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER) ++INSTALL_LIB = install -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \ ++ /sbin/ldconfig -m $(LIBDIR) ++UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \ ++ /sbin/ldconfig -m $(LIBDIR) ++ + ifdef OLSRD_PLUGIN + CFLAGS += -fPIC + LDFLAGS += -fPIC + endif + +-PLUGIN_SONAME ?= $(PLUGIN_NAME) +-PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER) +-INSTALL_LIB = install -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \ +- /sbin/ldconfig +-UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \ +- /sbin/ldconfig +- +-OS_LIB_PTHREAD = -pthread ++OS_LIB_PTHREAD = -lpthread + OS_CFLAG_PTHREAD = -pthread + OS_LIB_DYNLOAD = +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702142224.v1EMOxZU080849>